sudo add-apt-repository ppa:jonathonf/vim sudo apt update sudo apt install vim vim --version
安装 vimplus
1 2 3
git clone https://github.com/chxuan/vimplus.git ~/.vimplus cd ~/.vimplus ./install.sh
需要注意的事 ycm 的安装需要根据自己环境的 phthon 环境做选择
1 2 3
Resolving deltas: 100% (1123/1123), done. Please choose to compile ycm with python2 or python3, if there is a problem with the current selection, please choose another one. [2/3] Compile ycm with python3.
The ycmd server SHUT DOWN(restart with ':YcmRestartServer'). Unexpected exit code 0. Type ':YcmToggleLogs ycmd_45521_stderr_iiwbx058.log' to check the logs.
" 设置帮助语言为中文 set helplang=cn " 语法高亮 syntax enable syntax on
set hlsearch " 搜索高亮设置 set nu " 显示行号 set ts=4 " table 缩进 4 个空格 set sw=4 " 自动缩进的时候缩进 4 个空格 set noexpandtab " 让 table 还原成 table 而非空格 "set mouse=a " 支持鼠标
"字符编码相关设置 set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 set termencoding=utf-8 set encoding=utf-8 set backspace=2 set shortmess+=I " 禁用gd的默认行为
set autoindent " 自动缩进 set incsearch " 逐步搜索模式,对当前键入的字符进行搜索而不必等待键入完成
" -------------------------------------------------------- cscope if filereadable("cscope.out") cs add cscope.out endif
nmap <F2>s :cs find s <C-R>=expand("<cword>")<CR><CR> nmap <F2>g :cs find g <C-R>=expand("<cword>")<CR><CR> nmap <F2>c :cs find c <C-R>=expand("<cword>")<CR><CR> nmap <F2>t :cs find t <C-R>=expand("<cword>")<CR><CR> nmap <F2>e :cs find e <C-R>=expand("<cword>")<CR><CR> nmap <F2>f :cs find f <C-R>=expand("<cfile>")<CR><CR> nmap <F2>i :cs find i <C-R>=expand("<cfile>")<CR><CR> nmap <F2>d :cs find d <C-R>=expand("<cword>")<CR><CR> map <F2> :NERDTreeToggle<CR> map <F3> :TagbarToggle<CR> map <F4> :CtrlPMixed<CR> nnoremap <silent> <C-k> <Plug>(coc-diagnostic-prev) nnoremap <silent> <C-j> <Plug>(coc-diagnostic-next)
" ------------------------------------------------------- cscope end
" ------------------------------------------------------- 配色插件 gruvbox 配置 autocmd vimenter * nested colorscheme gruvbox set t_Co=256 set bg=dark
"""""""""""""""""""""light""""""""""""""""" set nu cursorline set nocompatible wildmenu wrap laststatus=2 syntax on filetype indent on hi Normal ctermbg=0 hi CursorLine cterm=NONE ctermbg=254 hi CursorLineNr cterm=standout ctermfg=251 ctermbg=233 hi WildMenu cterm=NONE ctermfg=231 ctermbg=243 " gruvbox ---------------------------------------------- end
在 Zsh 中,按下两次Tab键会触发自动补全功能。第一次按下Tab键时,它会尝试根据您输入的内容匹配可能的命令、文件名或其他内容。如果有多个匹配项,再次按下Tab键将显示所有可能的匹配项列表。这种模式被称为"双击Tab键补全",它是Z sh 中非常常见的一种操作,用于快速查找和选择文件名、命令、参数等.