gvim配置

阅读更多
  "======================================================================================
  "General settings
  "======================================================================================
  syntax on
  set expandtab
  set guifont=Courier\ New\ 12
  set guifontwide=STXihei:h14
  "set guifont=Bitstream\ Vera\ Sans\ Mono:h14
  "set nomacatsui
  "set termencoding=macroman
  set backspace=indent,eol,start
  set whichwrap=b,s,<,>,[,]
  colorscheme desert
  set cmdheight=1
  set laststatus=2
  set shiftwidth=4
  set tabstop=4
  set number
  set nolinebreak
  set nocompatible
  set nobackup
  set nowb
  set noswapfile
  set mouse=a
  set incsearch
  set hlsearch
  set history=400
  set hidden
  set expandtab
  set confirm
  set et
  set wrap
  set cindent
  set ambiwidth=double
  set foldlevel=999
  set helplang=cn
  set cmdheight=2
  set mouse=a
  set encoding=utf-8
  "set go=e
  set backspace=indent,eol,start
 
  set ambiwidth=double
 
  set dictionary-=/opt/local/share/vim/vim72/plugin/funclist.txt dictionary+=/opt/local/share/vim/vim72/plugin/funclist.txt
  set complete-=k complete+=k
 
  function! InsertTabWrapper()
      let col=col('.')-1
      if !col || getline('.')[col-1] !~ '\k'
          return "\"
      else
          return "\"
      endif
  endfunction
 
  "Remap the tab key to select action with InsertTabWrapper
  inoremap =InsertTabWrapper()
 
  map :NERDTreeToggle
  "imap :NERDTreeToggle
 
   
  if has("gui_macvim")
      let macvim_skip_cmd_opt_movement = 1
      let macvim_hig_shift_movement = 1
 
   
  set transparency = 2
  set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
  "GUI界面里的字体,默认有抗锯齿
  set guifont=Monaco:h12:cANSI
  "行间距,如果默认值太小,代码会非常纠结
  set linespace=4                                                                      
  "用<>调整缩进时的长度
  set shiftwidth=4
  "制表符的长度,统一为4个空格的宽度
  set tabstop=4
  "初始窗口的宽度
  set columns=195
  "初始窗口的高度
  set lines=45
  "初始窗口的位置
  winpos 52 42
   
  "显示行号
  set number
  "行号栏的宽度
  set numberwidth=4
  "禁止自动换行
  set nowrap
  "在输入命令时列出匹配项目,也就是截图底部的效果
  set wildmenu
  "显示光标位置
  set ruler
  "分割窗口时保持相等的宽/高
  set equalalways
   
  "匹配括号的规则,增加针对html的<>
  set matchpairs=(:),{:},[:],<:>
  "让退格,空格,上下箭头遇到行首行尾时自动移到下一行(包括insert模式)
  set whichwrap=b,s,<,>,[,]
  "取消自动备份
  set nobackup
  "保存关闭文件之前保留一个备份
  set writebackup
   
  "js语法高亮脚本的设置
  let g:javascript_enable_domhtmlcss=1
 
  "设置自定义的快捷键
  let mapleader=","
  let g:mapleader=","
 
  """"""""""""""""""""""""""""""
  " bufExplorer插件的设置
  """"""""""""""""""""""""""""""
  let g:bufExplorerSortBy='mru'
  let g:bufExplorerSplitRight=0    
  let g:bufExplorerSplitVertical=1    .
  let g:bufExplorerSplitVertSize = 30
  let g:bufExplorerUseCurrentWindow=1
  autocmd BufWinEnter \[Buf\ List\] setl nonumber
   
   """"""""""""""""""""""""""""""
   " winManager插件的设置
   """"""""""""""""""""""""""""""
   let g:winManagerWindowLayout = "BufExplorer,FileExplorer|TagList"
   let g:winManagerWidth = 30
   let g:defaultExplorer = 0
   nmap wm :WMToggle
   
   """"""""""""""""""""""""""""""
   " netrw插件的快捷键
   """"""""""""""""""""""""""""""
   let g:netrw_winsize = 30
   nmap fe :Sexplore!
     
   
   
   
     macm File.Save          key=
     macm File.Undo          key=
     macm File.Copy          key=
     macm File.Paste         key=v>
     macm File.Cut           key=
     macm File.Select\ All   key=
   
  endif
   
  "Tab configuration
  map tn :tabnew
  map te :tabedit
  map tc :tabclose
  map tm :tabmove
  map tt :tabnext
  map tp :tabprevious
  map tl :tablast
  map tf :tabfirst
  try
     set switchbuf=usetab
     set stal=2
  catch
  endtry
 

v>

 

linux下,配置文件放到home根部录下,即:~/.vimrc文件。

你可能感兴趣的:(linux,gvim)