目前使用的Vim启动脚本

来源:互联网 发布:网络攻防技术与实践 编辑:程序博客网 时间:2024/05/22 06:23


"-------------------------------------------------------------------------------
"general option
set nocompatible
set hls                         "high light search
set showcmd                     "show command
set nu                          "show line number
set ru
set cindent shiftwidth=4        "auto align
set shiftwidth=4                "unknown
set backspace=indent,eol,start  "unknown
set expandtab                   "expand tab enable
set tabstop=4                   "expand tab width
set textwidth=0                 "auto wrap width
set nowrap                      "wuyt
set scrolloff=7                 "vertical scroll offset
set sidescroll=2                "horizontal scroll step
set ignorecase                  "ignore-case when search
set autoindent                 
set fo +=2nmM                   "suitable for chinese edit
set path+=./**/                 "include-search path
set completeopt=longest,menu    "auto-complete option


syn on
colorscheme murphy
"-------------------------------------------------------------------------------
"map
inoremap [] []<Left>
inoremap () ()<Left>
inoremap {} {}<Left><CR><Up><Right><CR>
inoremap "" ""<Left>
"Toggle file-manager window
nmap <S-A-p> :WMToggle<cr>
"Toggle tag-list window
nmap <S-A-i> :Tlist<cr>
"calendar
nmap <S-A-c> :Calendar<cr>

map <Tab> I    <Esc>
"-------------------------------------------------------------------------------
"Plugin option
"Tlist
let Tlist_Use_Right_Window     = 1
let Tlist_Auto_Update          = 1
let Tlist_File_Fold_Auto_Close = 1
    "let Tlist_Auto_Open            = 1

"win manager
let g:winManagerWindowLayout='FileExplorer'

filetype plugin indent on


"-------------------------------------------------------------------------------
"瑙e喅瀛椾綋缂栫爜鏍煎紡閫犳垚鐨勪贡鐮侀棶棰?
"set fileencodings=utf-8,cp936,big5,latin1
set fileencodings=cp936

"an 20.4109 &Edit.-SEP6-
"an 20.4109.10 &Edit.Encoding.&GBK :set encoding=gbk
"an 20.4109.11 &Edit.Encoding.&Big5 :set encoding=big5
"an 20.4109.12 &Edit.Encoding.&UTF-8 :set encoding=utf-8

"an 20.4119.10 &Edit.Fileencodings.&GBK :set fileencodings=gbk
"an 20.4119.11 &Edit.Fileencodings.&Big5 :set fileencodings=big5
"an 20.4119.12 &Edit.Fileencodings.&UTF-8 :set fileencodings=utf-8

"an 20.4139 &Edit.gb  convert.gb->big5 :%!autogb -i gb -o big5
"an 20.4139 &Edit.gb  convert.gb->utf8 :%!autogb -i gb -o utf8

"an 20.4149 &Edit.big5  convert.big5->gb :%!autogb -i big5 -o gb
"an 20.4149 &Edit.big5  convert.big5->utf8 :%!autogb -i big5 -o utf8

"an 20.4159 &Edit.utf8  convert.utf8->gb :%!autogb -i utf8 -o gb
"an 20.4159 &Edit.utf8  convert.utf8->big5 :%!autogb -i utf8 -o big5/


"-------------------------------------------------------------------------------
"璁剧疆瀛椾綋
set guifont=Courier/ 10/ Pitch/ 12
map <F12> :%s/Return///end{verbatim}/r//textbf{Return:}/////r//begin{verbatim}/g<cr>

"-------------------------------------------------------------------------------
"__________the following is added by liql
"打开对应的.h文件
nnoremap <silent> <F12> :A<cr>
"搜索光标处的字符串
nnoremap <silent> <F4> :Grep<cr>

nmap <F5> :Tlist<ESC>

imap jj <ESC>:w!<CR>;<ESC>
"let g:DoxygenToolkit_briefTag_pre="@Synopsis  "
"let g:DoxygenToolkit_paramTag_pre="@Param "
"let g:DoxygenToolkit_returnTag="@Returns   "
"let g:DoxygenToolkit_blockHeader="--------------------------------------------------------------------------"
"let g:DoxygenToolkit_blockFooter="----------------------------------------------------------------------------"
"let g:DoxygenToolkit_authorName="Mathias Lorente"
"let g:DoxygenToolkit_licenseTag="My own license"  
"
"
"

 

原创粉丝点击