- Review configuration from: https://github.com/nvim-lua/kickstart.nvim
source: https://www.youtube.com/watch?v=stqUbv-5u2s
- Better which key with (allows hints for operators and text objects) https://github.com/folke/which-key.nvim
Ephemiral devs can now be used to install this configuration
Install patched fonts from:
https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Inconsolata/complete
For windows we need to enable the fonts in the terminal options:
https://docs.microsoft.com/en-us/windows/terminal/tutorials/custom-prompt-setup
Create symbolic link for vim
~/.vim -> vim
Linux:
ln -s ~/dotfiles/vim ~/.vim
Windows:
New-Item -ItemType SymbolicLink -Path ~/vimfiles -Target C:\Users\blasc\dotfiles\vim
Create symbolic link for neovim:
Linux:
ln -s ~/dotfiles/vim ~/.config/nvim
Windows:
New-Item -ItemType SymbolicLink -Path ~/AppData/Local/nvim -Target C:\Users\blasc\dotfiles\vim
To fix the white borders in gtk-3.0
~/.config/gtk-3.0/gtk.css -> gtk.css
ln -s ~/dotfiles/vim/gtk.css ~/.config/gtk-3.0/
Install rip grep: https://github.com/BurntSushi/ripgrep
To get an entry on dmenu for neovim:
sudo ln -s ~/dotfiles/vim/nvim.desktop /usr/share/applications/
Check also the mime type to make sure that nvim is used to open text files:
xdg-mime query default text/plain
xdg-mime default nvim.desktop text/plain
Almost always the best choice when moving within a line
Command | Mnemonic |
---|---|
f |
find |
Shift + f |
Shift to reverse direction |
t |
to / until |
Shift + t |
Shift to reverse direction |
Use easy-motion plugin to enhance search navigation
Plug 'easymotion/vim-easymotion'
Command | Proposed Keybinding |
---|---|
^ | Ctrl+h |
$ | Ctrl+l |
Mnemonic: like h
and l
but with Ctrl
, which is the same modifier for moving with bigger motion brushes like up, down, forward, backward.
Command | Mnemonic |
---|---|
W | Word |
E | End |
B | Beginning |
Command | Mnemonic |
---|---|
w | word |
e | end |
b | beginning |
h
l
<number>j
<number>k
If you are not comfortable writing numbers,I recommend using easy-motion plugin
Command | Mnemonic |
---|---|
s+k |
search up k |
s+j |
search down j |
Command | Proposed keybinding |
---|---|
{ |
Ctrl+j |
} |
Ctrl+k |
Mnemonic: like j
and k
but with Ctrl
, which is the same modifier for moving with bigger motion brushes like up, down, forward, backward.
j
k
Command | Mnemonic |
---|---|
/ |
|
Shift + / (with the right keyboard layout) |
Shift to reverse direction |
n |
next |
Shift+n |
Shift to reverse direction |
If we use easy motion plugin, we can map the search all as follows:
Command | Mnemonic |
---|---|
s+a |
Search all |
Command | Mnemonic |
---|---|
Ctrl+i |
jump Ctrl +in |
`Ctrl+o`` | jump Ctrl +out |
Add the following to be able to jump in and out of relative line jumps
" Add {count}[j|k] to the jump list
nnoremap <expr> k (v:count > 1 ? "m`" . v:count : "") . "gk"
nnoremap <expr> j (v:count > 1 ? "m`" . v:count : "") . "gj"
*
This plugin really makes a big difference when working with the star
Plug 'haya14busa/vim-asterisk'
With this plugin we can mark a word with *
and then navigate with n
, N
keeping the initial position within the word marked with *
. Great for repeating edits with the dot operator!
When we are exploring and we don’t know very well the text (smooth scrolling for not getting sick and lost).
Command | Mnemonic |
---|---|
Ctrl+u |
Scroll Ctrl +up |
Ctrl+d |
Scroll Ctrl +down |
When we want to advance a whole page of text.
Command | Mnemonic |
---|---|
Ctrl+f |
Scroll Ctrl +forwards |
Ctrl+b |
Scroll Ctrl +bbackwards |
When navigating use zz
to scroll current line to middle of the screen.
Mnemonic: Use zz
in order to be able to zzee