- use vim-plug as plug manager
- use coc.nvim as VSCode-like IDE plug
- file type specified located in dir ~/.vim/lang/
- golang out of the box using vim-go and coc.nvim
- python out of the box using coc-python
- more humanized tab label
- [experimental]rust out of the box using rust.vim
First, you should add the export below to you .bashrc or .zshrc etc and reload it.
export VIMINIT='source $MYVIMRC'
export MYVIMRC='~/.vim/vimrc'
Then, coc.nvim need nodejs:
curl -sL install-node.now.sh/lts | bash
Finally, install
- git clone https://github.com/tomjamescn/vimrc.git ~/.vim
- cd ~/.vim
- ./install.sh
- [optional] git checkout some-vers
leader key is
,
F4
enter paste modeF5
refresh all bufferF7
open nerdtree window on leftF8
open tagbar window on right
[g
and]g
to navigate diagnosticsgd
to goto definition and<ctrl>o
to go backgr
to get all referencesK
to show documentation in preview window<leader>rn
to renaming symbol<leader>f
to format selected code<leader>a
to applying codeAction to the selected region<leader>qf
to apply AutoFix to problem on the current line<space>a
to show all diagnostics
:CocConfig
to config coc.nvim:Format
to format current buffer:Fold
to fold current buffer
https://github.com/honza/vim-snippets/tree/master/UltiSnips
please visit this post, this was written in Chinese.
# install requirement and git clone vimrc
curl https://cdn.jsdelivr.net/gh/tomjamescn/[email protected]/install-python-ide-in-docker.sh | bash
# install plug
vim -c PlugInstall +qall
# install coc plug extensions
vim -c 'CocInstall -sync coc-json coc-snippets coc-git coc-python|q'