vim 編輯器優化問題

用xhell連接服務器使用優化過的 vim編輯器無法出現選項


set nocompatible
set history=100
filetype on
filetype plugin on
filetype indent on
set autoread

set mouse=a

syntax enable
set cursorline
hi cursorline guibg=#00ff00
hi CursorColumn guibg=#00ff00
set foldenable
set foldmethod=manual
set foldcolumn=0
setlocal foldlevel=3
set foldclose=all
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set ai
set si
set wrap
set sw=4
set wildmenu
set ruler
set cmdheight=1
set lz
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set magic
set noerrorbells
set novisualbell
set showmatch
set mat=4
set hlsearch
set ignorecase
set encoding=utf-8
set fileencodings=utf-8
set termencoding=utf-8
set smartindent
set cin
set showmatch
set guioptions-=T
set guioptions-=m
set vb t_vb=
set laststatus=4
set pastetoggle=<F9>
set background=dark
highlight Search ctermbg=black ctermfg=white guifg=white guibg=black
autocmd BufNewFile .py,.cc,.sh,.java exec ":call SetTitle()"
func SetTitle()
if expand("%:e") == 'sh'
call setline(1, "#!/bin/bash")
call setline(2, "##############################################################")
call setline(3, "# 腳本名稱: ".expand("%"))
call setline(4, "# vim版本: V1.1")
call setline(5, "# 所屬: 隨便")
call setline(6, "# 反饋: 聯繫地址")
call setline(7, "# 腳本生成日期 : 啦啦啦德瑪西亞".strftime("%F %T"))
call setline(8, "# VIM說明: 所屬o")
call setline(9, "##############################################################")
endif
endfunc


原因---配置文件中 set mouse=a 表示啓用所有模塊
相當於覆蓋【解釋的不準確大神繞過】了xshell的右擊代表的功能
所以把 set mouse=a 改了 就行了或者
在set模塊中
加入if has('mouse') set mouse-=a endif
即可...


set helplang=cn "中文幫助文檔(前提是下了中文包)
syntax enable
syntax on " 自動語法高亮
set number"顯示行號
colorscheme desert" 設定配色方案
set guifont=Consolas:h12:cANSI"英文字體
set guifontwide=SimSun-ExtB:h12:cGB2312
set tabstop=4"表示Tab代表4個空格的寬度
set expandtab"表示Tab自動轉換成空格
set autoindent"表示換行後自動縮進
set autoread " 當文件在外部被修改時,自動重新讀取
set history=400"vim記住的歷史操作的數量,默認的是20
set nocompatible"使用vim自己的鍵盤模式,而不是兼容vi的模式
set confirm"處理未保存或者只讀文件時,給出提示
set smartindent"智能對齊
set shiftwidth=4

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章