不定期更新這篇,因為查詢到好用的設定或者插件就會更新自己的設定。

let $LANG="zh_TW.UTF-8"
set langmenu=zh_tw.utf-8
set encoding=utf8

source $VIMRUNTIME/vimrc_example.vim

set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg1 = substitute(arg1, '!', '\!', 'g')
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg2 = substitute(arg2, '!', '\!', 'g')
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let arg3 = substitute(arg3, '!', '\!', 'g')
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
if empty(&shellxquote)
let l:shxq_sav = ''
set shellxquote&
endif
let cmd = '"' . $VIMRUNTIME . '\diff"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
let cmd = substitute(cmd, '!', '\!', 'g')
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
if exists('l:shxq_sav')
let &shellxquote=l:shxq_sav
endif
endfunction

set nobackup
set noundofile
set noswapfile
":imap ( ()<ESC>i
":imap { {<CR>}<ESC>O
":imap [ []<ESC>i

"-----------------------------------------------------------
" Vundle
"-----------------------------------------------------------
set nocompatible
filetype off
set rtp+=$VIM/vimfiles/bundle/Vundle.vim
call vundle#begin('$VIM/vimfiles/bundle/')
Plugin 'gmarik/Vundle.vim'
Plugin 'L9'
Plugin 'scrooloose/nerdtree'
Bundle 'majutsushi/tagbar'
call vundle#end()
filetype plugin indent on

"-----------------------------------------------------------
" NERDTree & tagbar
"-----------------------------------------------------------
nmap <F2> :NERDTreeToggle <CR>
nmap <F3> :Tagbar <CR>
autocmd VimEnter * NERDTree
autocmd VimEnter * Tagbar
let g:tagbar_ctags_gin = '$VIM/ctags/ctags.exe'
set tags=tags

"-----------------------------------------------------------
" short key setting
"-----------------------------------------------------------
nmap ,s :e $VIM/_vimrc
imap aa <C-N>
nmap qw <C-Q>
nmap <Space>j <C-W>j
nmap <Space>h <C-W>h
nmap <Space>k <C-W>k
nmap <Space>l <C-W>l
nmap <F1> :Explore<CR>
imap aa <C-N>

"-----------------------------------------------------------
" GUI setting
"-----------------------------------------------------------
set t_Co=256
set nu
set incsearch
set ai
set cursorline
set tabstop=4
set shiftwidth=4
set ignorecase
syntax on
set laststatus=2
set columns=180
set lines=50

"-----------------------------------------------------------
" GVim mapping key
"-----------------------------------------------------------
"<BS> Backspace
"<Tab> Tab
"<CR> Enter
"<Enter> Enter
"<Return> Enter
"<Esc> Escape
"<Space> Space
"<Up> Up arrow
"<Down> Down arrow
"<Left> Left arrow
"<Right> Right arrow
"<F1> - <F12> Function keys 1 to 12
"#1, #2..#9,#0 Function keys F1 to F9, F10
"<Insert> Insert
"<Del> Delete
"<Home> Home
"<End> End
"<PageUp> Page-Up
"<PageDown> Page-Down
"<bar> the '|' character, which otherwise needs to be escaped '\|'

(原創) Gvim 個人習慣常用設定 (vim)的更多相关文章

  1. [個人紀錄] git 設定

    -- git history git config --global alias.history=log --graph --all --pretty=format:'%C(bold blue)%H% ...

  2. (原創) 如何在Nios II顯示8位數的七段顯示器? (SOC) (Nios II) (SOPC Builder) (DE2-70)

    Abstract本文討論如何在Nios II控制8位數的七段顯示器. Introduction使用環境:Quartus II 8.0 + Nios II EDS 8.0 + DE2-70 (Cyclo ...

  3. [個人紀錄] RabbitMQ安裝

    參考資料 https://blog.csdn.net/tjcyjd/article/details/77150893 https://blog.csdn.net/u014308482/article/ ...

  4. System.Web.Compilation.BuildManager.CopyPrecompiledFile 並未將物件參考設定為物件的執行個體

    使用MSBUild 的 aspnet_compiler.exe 发布网站, 过程中出现错误 [NullReferenceException]: 並未將物件參考設定為物件的執行個體  System.W ...

  5. [個人紀錄] postgre dump出table 再用psql還原

    --dump tablepg_dump --host #server --port 5432 --username #username --format plain --ignore-version ...

  6. 记录git多人协作开发常用的流程,供新手参考

    声明:博主写的博客都是经过自己总结或者亲测成功的实例,绝不乱转载.读者可放心看,有不足之处请私信我,或者给我发邮件:pangchao620@163.com. 写作目的: 记录一下我看完廖学锋老师的gi ...

  7. webrtc笔记(3): 多人视频通讯常用架构Mesh/MCU/SFU

    问题:为什么要搞这么多架构? webrtc虽然是一项主要使用p2p的实时通讯技术,本应该是无中心化节点的,但是在一些大型多人通讯场景,如果都使用端对端直连,端上会遇到很带宽和性能的问题,所以就有了下图 ...

  8. 個人最近做的最多的重複工作就是excel导出

    //导出事件,这个是有合并动态列的 double num1 = 0, num2 = 0, num3 = 0; protected void btnExcel_Click(object sender,  ...

  9. WCF最简单的一次通信(有部分參考,多爲原創)

    不廢話,直接上乾貨 1.先创建一个wcf服务库,是服务类库,远程的lib 2.全部按照默认设置,不修改.然后点发布,会出现一个wcf测试客户端,可以看有没有发布成功. 3.msdn的wcf教程还要求输 ...

随机推荐

  1. 微信小程序中出现Invoking Page() in async task.问题

    在做项目中需要让页面跳到外网,用到了<web-view src=""> </web-view>组件,需要新建一个文件放这个组件,调接口的时候链接连到这个页面 ...

  2. 1-5 构建官方example-Windows平台

    https://github.com/facebook/react-native https://github.com/facebook/react-native.git  https://githu ...

  3. Composert 的命令

    (1) php artisan       ----查看所有的命令帮助 (2) php artisan make:controller StudentController      ----创建一个控 ...

  4. 关于getchar的一些思考

    这个问题是有一段代码引起的: 代码1: #include<iostream> using namespace std; int main() { char t; t=getchar(); ...

  5. 293. Flip Game只翻转一步的加减号翻转游戏

    [抄题]: You are playing the following Flip Game with your friend: Given a string that contains only th ...

  6. c# 判断网络地址是否存在

    方法一:网络地址存在,有可能可以访问,也有可能不能访问.此方法用来判断地址存在. static bool UrlIsExist(String url) { System.Uri u = null; t ...

  7. Linux内核的特征

    Linux内核的特征 Linux是个人计算机和工作站上的Unix类操作系统.但是,它绝不是简化的Unix.相反,Linux是强有力和具有创新意义的Unix类操作系统.它不仅继承了Unix的特征,而且在 ...

  8. 安装CentOS 6网络配置问题

    安装CentOS 6网络配置问题 今天决定把家中的CentOS从5升级至6.但安装完CentOS 6.2之后发现eth0没有像往常一样通过DHCP自动获取IP.打开“/etc/sysconfig/ne ...

  9. PCL 编程多个点云合成

    博客转载自:https://blog.csdn.net/sunboyiris/article/details/72636809 pcl::PointCloud<pcl::PointXYZRGBA ...

  10. linux安装JDK后发现系统带有openjdk的处理

    1.JDK下载. 官网下载网址:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html ...