Task | Commands |
---|---|
Open file in new tab | tabedit <filename> |
Go to third tab | 2gt |
Wrap paragraph | gq} |
Go to 34% of the file | 34% |
Copy large number of lines | Mark starting line: ma |
At last line, yank from mark: y`a |
|
This can be used to delete too | d`a |
See available color schemes | :colorscheme [space] [CTRL+D] |
Built in color schemes are in | /usr/share/vim/vim90/colors/ |
Open builtin file explorer netrw |
:Explore , :Sexplore , :Vexplore |
GitGutterStageHunk |
Stage the hunk the cursor is on |
In .vimrc
/init.vim
" Auto save for markdown files in insert mode
autocmd BufNewFile,BufRead *.md :autocmd TextChangedI <buffer> if &readonly == 0 | silent write | endif
Check if compiled with clipboard support
vim --version | grep clipboard
# or
:echo has('clipboard'))
Paste from clipboards (When compiled with +clipboard option
"+p
"*p
https://vi.stackexchange.com/a/20220
set tttimeoutlen=5
netrw
# Start with
```
netrw
is good enough for me.