Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1432570
  • 博文数量: 1334
  • 博客积分: 645
  • 博客等级: 上士
  • 技术积分: 5762
  • 用 户 组: 普通用户
  • 注册时间: 2012-07-25 16:56
文章分类

全部博文(1334)

文章存档

2014年(108)

2013年(1059)

2012年(169)

分类: LINUX

2013-06-13 12:52:21

我linux下.vimrc的内容如下:

" multi-encoding setting
"if has("multi_byte")
"set bomb
"set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
" CJK environment detection and corresponding setting
"if v:lang =~ "^zh_CN"
" Use cp936 to support GBK, euc-cn == gb2312
"set encoding=cp936
"set termencoding=cp936
"set fileencoding=cp936
"elseif v:lang =~ "^zh_TW"
" cp950, big5 or euc-tw
" Are they equal to each other?
"set encoding=big5
"set termencoding=big5
"set fileencoding=big5
"elseif v:lang =~ "^ko"
" Copied from someone's dotfile, untested
"set encoding=euc-kr
"set termencoding=euc-kr
"set fileencoding=euc-kr
"elseif v:lang =~ "^ja_JP"
" Copied from someone's dotfile, untested
"set encoding=euc-jp
"set termencoding=euc-jp
"set fileencoding=euc-jp
"endif
" Detect UTF-8 locale, and replace CJK setting if needed
"if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
"set encoding=utf-8
"set termencoding=utf-8
"set fileencoding=utf-8
"endif
"else
"echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
"endif
set mouse=v
set tabstop=4 sw=4
set autoindent
set smartindent
set incsearch
set tags=tags;
set showmatch
set hlsearch
syntax on
set number   "这行意思是当使用vi的时候显示行号

" Open and close all the three plugins on the same time
nmap   :TrinityToggleAll :set mouse=a

" Open and close the srcexpl.vim separately
nmap   :TrinityToggleSourceExplorer

" Open and close the taglist.vim separately
nmap  :TrinityToggleTagList

" Open and close the NERD_tree.vim separately
nmap  :TrinityToggleNERDTree 
nmap  :set mouse=v 
nmap  :set mouse=a 

nmap ok   "这两行是我新增加的功能(即vi命令的扩展(c代表ctrl -o:表示和o一起使用))
nmap i
"set fdm=syntax

" // The switch of the Source Explorer
"nmap :SrcExplToggle

" // Set the height of Source Explorer window
"et g:SrcExpl_winHeight = 8

" // Set 100 ms for refreshing the Source Explorer
"et g:SrcExpl_refreshTime = 100

" // Set "Enter" key to jump into the exact definition context
"et g:SrcExpl_jumpKey = ""

" // Set "Space" key for back from the definition context
"et g:SrcExpl_gobackKey = ""

" // In order to Avoid conflicts, the Source Explorer should know what plugins
" // are using buffers. And you need add their bufname into the list below
" // according to the command ":buffers!"
"et g:SrcExpl_pluginList = [
        \ "__Tag_List__",
        \ "_NERD_tree_",
        \ "Source_Explorer"
    \ ]
" // Enable/Disable the local definition searching, and note that this is not
" // guaranteed to work, the Source Explorer doesn't check the syntax for now.
" // It only searches for a match with the keyword according to command 'gd'
"et g:SrcExpl_searchLocalDef = 1

" // Let the Source Explorer update the tags file when opening
"et g:SrcExpl_isUpdateTags = 1

" // Use program 'ctags' with argument '--sort=foldcase -R' to create or
" // update a tags file
"et g:SrcExpl_updateTagsCmd = "ctags --sort=foldcase -R ."

" // Set "" key for updating the tags file artificially
"et g:SrcExpl_updateTagsKey = "


这里面的内容我是拷贝另一个工程师的,里面定义了一下vi的新功能键
阅读(287) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~