How to setup Neovim
My nvim config is based on the following tutorial series Neovim from scratch
Clone repository:
git clone git@github.com:owodunni/nvim.git ~/.config/nvim
Install packages:
sudo pacman -S --needed - < pkglist.txt
Make sure to install the fonts in the fonts
folder. I have not managed to find nerd fonts that support all the icons I use.
But the fonts from the gnome-terminal works well. I think its because they package in all the variants (bold, italic, etc).
Javascript Install the following
npm i -g prettier eslint eslint-plugin-vue yaml-language-server tree-sitter-phpdoc neovim vls
pip install flake8 black beancount
cargo install beancount-language-server
To find LSP servers for different languages run :LSPInstallInfo
also look at nvim-lspconfig
FzF and ripgrep promise increased productivity.
Articles
- How FZF abd repgrep improved my workflow
- Optimizing your workflow with fzf and ripgrep
- ripgrep + FZF + vim = super vim
Install:
<c-o>
and<c-i>
moves back and forward from once you came. Usefull after searching.
To change every occurrence of a character string between two lines, type
:#,#s/old/new/g
where #,# are the line numbers of the range of lines where the substitution is to be done.
Type
:%s/old/new/g
to change every occurrence in the whole file.
Type
:%s/old/new/gc
to find every occurrence in the whole file, with a prompt whether to substitute or not.
To execute a external command
:!cmd
To execute a external command and paste the result in current doc:
:r !cmd
The popup menu is useful for autocompletions.
Here are some useful shortcuts:
Ctrl+N/Ctrl+P - open popup menu and cycle through menu
Ctrl+Y/Ctrl+E - accept/cancel menu
To manage windows and virtual desktops we use the following keybindings:
Move to workspace left/right: (GUI+h/l) Move window to workspace left/right: (GUI+ALT+H/L) Resize window: (GUI+SHIFT+H/J/K/L)
Move to next buffer with arrow keys