Configure VIM

2024-08-08T21:55:28+02:00

Here comes another strange time when I want to install new plugin into VIM. Fourth, in my case. I always forget how to do it. But not this time! Here we go, my VIM8!

cd ~/.vim
mkdir -p pack/whatever/start
cd pack/whatever/start
git clone https://github.com/editorconfig/editorconfig-vim.git
git clone https://github.com/nvie/vim-flake8.git
git clone https://github.com/cofyc/vim-uncrustify.git
git clone https://github.com/rhysd/reply.vim.git

And, to make it complete:

$ cat ~/.vimrc
set background=dark
highlight Normal ctermbg=Black ctermfg=White guibg=Black guifg=White
syntax on
filetype plugin indent on
set nu
set ai

command Doc set tw=72
command Cod set tw=79

autocmd BufWritePost *.py call flake8#Flake8()

autocmd FileType hh,hpp,cc,cpp nnoremap <buffer> ,u :call Uncrustify('cpp')<cr>
autocmd FileType hh,hpp,cc,cpp vnoremap <buffer> ,u :call RangeUncrustify('cpp')<cr>

nnoremap RR :botright Repl racket<CR>
nnoremap ,, :ReplSend<CR>
xnoremap ,, :ReplSend<CR>

Not sure what the second line of config does, though.