Home - fairulazmin/note GitHub Wiki
u - undo
<Ctrl>+r - redo
:14 - go to line 14
<Ctrl>+z - switch to terminal
fg - get back to vim screen
cc - Delete current line and enter insert mode (unlike dd which leaves you in normal mode)
C - Delete (change) from cursor to end of line, and enter insert mode
:0,2sort - Sort line 0 to 2 in order
:0,2sort! - Sort line 0 to 2 in reverse order
D - Delete until end of line
~ - Swap case under selection
<Ctrl-v> - Enter visual block mode
<Shift-I> - insert
<Shift-A> - append
:ls - list / show available buffers
:e filename - Edit a file in a new buffer
:bn - go to next buffer
:bp - go to previous buffer
:bd - unload a buffer (close a file)
:bw - unload a buffer and deletes it
:wa - write all changed files (save all changes)
:qa - quit all (not if there are unsaved changes)
:tabe filename - opens the file in newtab
:tabe - open an empty tab
gt - go to next tab
gT - go to previous tab
<Ctrl>+W T - Break out current window into a new tabview
<Ctrl>+W o - Close every window in the current tabview but the current one
<Ctrl>+W n - create a new window in the current tabview
<Ctrl>+W c - Close current window in the current tabview
<Ctrl>+w s - Split current window horizontally
<Ctrl>+w v - Split current window vertically
<Ctrl>+w c - Close current window
<Ctrl>+W r - Swap bottom/top if split horizontally
<Ctrl>+W R - Swap top/bottom if split horizontally
<Ctrl>+w <Ctrl>+w - switch between windows
<Ctrl>+w UP - Move to the top window from current window
<Ctrl>+w DOWN - Move to the bottom window from current window
<Ctrl>+w LEFT - Move to the left window from current window
<Ctrl>+w RIGHT - Move to the right window from current window
<Ctrl>+w > - Incrementally increase the window to the right.
<Ctrl>+w < - Incrementally increase the window to the left.
<Ctrl>+w - - Incrementally decrease the window's height.
<Ctrl>+w + - Incrementally increase the window's height.
:term - open terminal
kj - escape from insert/visual mode
<Tab> - go to next buffer
<Shift>+<Tab> - go to previous buffer
<Alt>+j - reduce window size vertically
<Alt>+k - enlarge window size vertically
<Alt>+h - reduce window size horizontally
<Alt>+l - enlarge window size horizontally
<Alt+UP> - move line up
<Alt-DOWN> - move line down
<F9> - run python or javascript code
Coc explorer (Neovim only)
<Space>e - open explorer
<Space>f - open explorer (floating window)
s - open and split current window horizontally
E - open and split current window vertically
t - open in new tab
zh - toggle hidden files
gf - gotoSource:file
gb - gotoSource:buffer
<Ctrl-o> - undo to previous buffer
a - addFile
A - addDirectory
r - rename
df - delete file
you surround inner word, ysiw'
delete surround, ds'
you surround inner Word, ysiW"
VISUAL - surround, veeeS{
change surround, cs"[
you surround line word with spaces, yss{
you surround line word without spaces, yss}
you surround two around words, ys2aW<h1>
delete surround tag, dst
change inside (, ci(
change inside tag, cit
s{char}{char} - search forward
S{char}{char} - search backward
; - to go to the next match
gcc - comment out a line
gcap - comment out a paragraph
gc - comment out the selection in visual mode
:Prettier - format current buffer
<Ctrl>+n - add a new virtual cursor + selection on the next match
<Ctrl>+x - skip the next match
<Ctrl>+p - remove current virtual cursor + selection and go back on previous match
<F8> - open tagbar
<F9> - run javascript or python code
:Bracey - start Bracey server
:BraceyStop - shutdown the server and stop sending commands
:BraceyReload - force the current web page to be reloaded
<Leader>a# - align region at #
<Leader>a% - align region at %
<Leader>a& - align region at &
<Leader>a( - align region at (
<Leader>a) - align region at )
<Leader>a[ - align region at [
<Leader>a] - align region at ]
<Leader>a{ - align region at {
<Leader>a} - align region at }
<Leader>a, - align region at ,
<Leader>a. - align region at .
<Leader>a: - align region at :
<Leader>a; - align region at ;
<Leader>a= - align region at =
<Leader>a- - align region at -
<Leader>a" - align region at "
<Leader>a' - align region at '
:FixWhitespace - fix the whitespace errors
<F7> - Open a floaterm window
<F12> - Open or hide the floaterm window
<Ctrl>+z - Toggle terminal