It is my personal Vim/Neovim configuration! I use Neovim on Ubuntu (Linux) with Terminator and zsh
.
First, remove your old folders .vim/
and nvim/
and files init.vim
and .vimrc
.
$ git clone --recursive https://github.com/FtZzy/vim-conf.git ~/.config/nvim
$ ln -rs ~/.config/nvim ~/.vim
$ ln -rs ~/.config/nvim/init.vim ~/.vimrc
By default ctags use zsh if it is installed, else use bash.
I use vim-plug so you need it.
- For nvim:
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- For vim:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- Launch
nvim
orvim
and run:PlugInstall
$ mkdir -p ~/Software/neovim/py2
$ mkdir -p ~/Software/neovim/py3
$ cd ~/Software/neovim
$ virtualenv -p /usr/bin/python2.7 py2
$ python3 -m venv py3
$ /home/nathan/Software/neovim/py2/bin/pip install pynvim
$ /home/nathan/Software/neovim/py3/bin/pip install pynvim
I consider that you know how to use the default vim.
You don't need plugin to use them... The mouse is activated and my leader key is ','. You can change it in the file init.vim.
;;
~<Esc>
0
~^
<Ctrl>j
and<Ctrl>k
~ Drag line(s)<leader><space>
~ Disable research highlight<leader>w
~ Delete trailing spaces<leader>-
~ Fold between {}
You can check the spell in vim.
<F6>
~ French<F7>
~ Englishz=
~ Display possible correctionszg
~ Add to dictionaryzug
~ Cancel the addition]s
~ Next misspelled word[s
~ Previous misspelled word
Navigation into tabs or buffer:
<leader>t
~ Create new tab<leader><
~ Go to the previous tab<leader>>
~ Go to the next tab<leader><Right>
~ Go to the next buffer<leader><Left>
~ Go to previous buffer
<leader>n
~ Display or hide the file system explorer<leader>nf
~ Display the file system explorer at current file- And a lot of more, see them here
<leader>cc
~ comment in visual mode<leader>c<space>
~ comment/uncomment line(s)- And a lot of more, see them here.
cs"'
~ Change"toto"
to'toto'
cs'<q>
~ Change'toto'
to<q>toto</q>
ds"
~ Delete the delimitersyss)
~ Put the entire line between parentheses- And a lot of more, see them here.
I will just present the shortcuts, learn more about coc.nvim on their page.
<tab>
~ Use for completion (check if it not ever used before with:verbose imap <tab>
)<c-space>
~ Trigger completion[g
~ See the next diagnosticg]
~ See the previous diagnosticgd
~ Go to definitiongy
~ Go to type definitiongi
~ Go to implementationgr
~ Go to referencesK
~ Show documentation<leader>rn
~ Rename symbol<leader>f
~ Format selected code<leader>a
~ Apply action to the selected region (ex:<leader>aap
)<leader>ac
~ Apply action to the current buffer<leader>qf
~ AutoFix problem on the current line<C-f>
and<C-b>
~ Scroll float windows<C-s>
~ Select ranges<space>a
~ List all diagnostics<space>e
~ Manage extensions<space>c
~ Show commands<space>o
~ Find symbol of current document<space>s
~ Search workspace symbols<space>j
~ Do default action for next item<space>k
~ Do default action for previous item<space>p
~ Resume latest coc list:Format
~ Format current buffer:Fold
~ Fold current buffer:OR
~ Organize imports of the current buffer
<leader>u
~ Display the UndoTree+/-
~ Grow/reduce the vim-expand-region:Tabularize /=
~ Align the symbols with tabular
The homepage when you launch vim
allow to see recent files.
I use the famous colorschemes solarized or monokai. My airline's theme is set to ravenpower, among a big choice.
In normal mode we get a relative position, to simplify the commands, with number.
Finally I use rainbow to see the pairs for parentheses and symbols. And they autoclose thanks lexima. Moreover I use too closetag for the tags.
For the programmation, I check syntax with ale but it is disable by default: use :ALEToggle
.
Using git, I have vim-gitgutter show the modifications (+, - or ~). Moreover, I use vim-fugitive to manage git with vim:
:Gread
~ Revert current file:Gwrite
~ Add current file:Gremove
~ Delete current file:Gmove
~ Rename current file:Gdiff
~ Show difference between actual and last version for the current file- And a lot of more, see them here.
Finally, I use black for python. It's simple tu use, you just need to use :Black
.
Copyright (c) 2021 Krupa Nathan