let mapleader=","
"语言部分
set helplang=cn
set encoding=utf-8
syntax enable
syntax on
colorscheme desert
set nobackup "不自动备份
"se bdir=~/.cache/vim
set noswapfile
set clipboard+=unnamed " yank and copy to X clipboard
"菜单部分
set encoding=chinese
set langmenu=zh_CN.UTF-8
set imcmdline
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set gfn=Monospace\ 14 "默认字体及大小
"杂项
set hlsearch "高亮显示结果
set incsearch "在输入要搜索的文字时,vim会实时匹配
set backspace=indent,eol,start whichwrap+=<,>,[,] "允许退格键的使用
filetype plugin on
filetype indent on
filetype on " 侦测文件类型
set foldmethod=marker
set shell=/bin/bash "
"杂项2
set number "显示行号
set nowrap "不自动换行
set tabstop=4 "让一个tab等于4个空格
set cindent shiftwidth=4
set cmdheight=1 " set the command height
set showmatch " show matching brackets (),{},[]
"自相3
set mousemodel=popup "当右键单击窗口的时候, 弹出快捷菜单
" Fast saving
nmap <leader>wf :w!<cr>
nmap <leader>wt :TlistToggle<CR>
nmap <leader>wd :NERDTreeToggle<cr>
nmap <leader>wv :e ~/.vimrc<cr>
nmap <leader>ws :vsplit<cr>
nmap <leader>wc :close<cr>
nmap <leader>wn :bnext<cr>
nmap <leader>wp :bpre<cr>
nmap <leader>w1 :bfirst<cr>
nmap <leader>w9 :blast<cr>
nmap <leader>ws :ConqueTerm bash<cr>
nmap qw :w!<cr>
nmap <leader>cd :Dox<cr>
"save
map <C-s> :wa<CR>
imap <C-s> <ESC>:wa<CR>li
"close
map <C-q> :q<CR>
imap <C-q> <ESC>:q<CR>
"buffer
map <C-S-J> :bnext<CR>
map ; : "不用 shift+: 了直接按 ; 就可以倏然命令了
"复制,粘贴
nmap ct "+gP
vmap cf "+y
vmap cx "+x
"cscope
set cscopetag "cst
set csto=0 "0 cscope db search first other tag first
""""""""""""""""""""""""""""""
" => Minibuffer plugin
""""""""""""""""""""""""""""""
let g:miniBufExplMapWindowNavVim = 2
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
let g:miniBufExplorerMoreThanOne = 2
let g:miniBufExplUseSingleClick = 1
""""""""""""""""""""""""""""""""
" => taglist
"""""""""""""""""""""""""""""""
let Tlist_File_Fold_Auto_Close=1 "非当前文件,函数列表折叠隐藏
let Tlist_Show_One_File=1 "让taglist可以同时展示多个文件的函数列表,如果想只有1个,设置为1
let Tlist_Use_Right_Window=1 "让窗口显示在右边,0的话就是显示在左边
let Tlist_Process_File_Always=0 "不是一直实时更新tags,因为没有必要
'ctrlp 一个非常有用的文件搜索插件,可以快速定位你要打开的文件,特别时再看linux 源代码时,
"0 - don’t manage working directory.
"1 - the parent directory of the current file.
let g:ctrlp_working_path_mode = 2
"Remember the last input string and position of the selection in the match window:
let g:ctrlp_persistent_input = 0
我的 vim 配置
最新推荐文章于 2024-08-24 18:45:15 发布