Created
August 22, 2020 15:25
-
-
Save ruanlinos/eb9432349100978a797066be51012d57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
, - Map leader, nearly all my custom mappings starts with pressing the comma key | |
,q - Sidebar filetree viewer (NERDTree) | |
,w - Sidebar classes, functions, variables list (TagBar) | |
\ - Toggle both NERDTree and TagBar | |
,ee - Change colorscheme (with fzf fuzzy finder) | |
,ea - Change Airline theme | |
,e1 - Color mode: Dracula (Dark) | |
,e2 - Color mode: Seoul256 (Between Dark & Light) | |
,e3 - Color mode: Forgotten (Light) | |
,e4 - Color mode: Zazen (Black & White) | |
,r - Refresh/source ~/.config/nvim/init.vim | |
,t - Trim all trailing whitespaces | |
,a - Auto align variables (vim-easy-align), eg. do ,a= while your cursor is on a bunch of variables to align their equal signs | |
,s - New terminal in horizontal split | |
,vs - New terminal in vertical split | |
,d - Automatically generate Python docstrings while cursor is hovering above a function or class | |
,f - Fuzzy find a file (fzf) | |
,g - Toggle Goyo mode (Goyo), super clean and minimalistic viewing mode | |
,h - Toggle rainbow parentheses highlighting | |
,j - Set filetype to "journal" which makes the syntax highlighting beautiful when working on regular text files and markdown | |
,k - Toggle coloring of hex colors | |
,l - Toggle Limelight mode (Limelight), highlight the lines near cursor only | |
,c<Space> - Toggle comment for current line (Nerd Commenter) | |
<Alt-r> - Toggle RGB color picker | |
<Tab> - Next buffer | |
<Shift-Tab> - Previous buffer | |
i - Insert Mode | |
Shift + a - Insert Mode - Append | |
o - Insert Mode - New Line After | |
Shift + Up/Down - Scrolling | |
:wq - Write and Quit | |
:e [file] - Edit Another File | |
gg - Goto First Line | |
G - Goto Last Line | |
u - Undo | |
Ctrl + r - Redo | |
. - Repeat Previous Command | |
/[word] - Search | |
n - Search - Next | |
Shift + n - Search - Previous | |
/[word], [edit], n, . - Search, modify, next search, repeat for next | |
:%s/old/new/g - Replace All | |
:[startline],[endline]s/old/new/g - Replace Between Lines | |
:%s/^/[word]/g - Append Word to Start of Every Line | |
:%s/$/[word]/g - Append Word to End of Every Line | |
Ctrl + w and v - Splitting Window Vertically | |
Ctrl + w and Shift + s - Splitting Window Horizontally | |
v - Visual Select | |
Shift + v - Visual Select - Line | |
Ctrl + v - Visual Select - Block | |
Shift + v and [number]> - Tab a Line Multiple Times | |
d - Delete/Cut | |
dd - Delete Current Line | |
d[number]d - Delete Multiple Lines | |
y - Yank/Copy | |
p - Paste | |
gg=G - Fix All Indentations | |
vi" - Select everything within double quotes | |
va" - Select everything within and including double quotes | |
vi"d - Delete everything within double quotes | |
vi"s - Delete everything within double quotes then go into insert mode | |
:sp filename Open filename in horizontal split | |
:vsp filename Open filename in vertical split | |
Ctrl-w h Ctrl-w ← Shift focus to split on left of current | |
Ctrl-w l Ctrl-w → Shift focus to split on right of current | |
Ctrl-w j Ctrl-w ↓ Shift focus to split below the current | |
Ctrl-w k Ctrl-w ↑ Shift focus to split above the current | |
Ctrl-w n+ Increase size of current split by n lines | |
Ctrl-w n- Decrease size of current split by n lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment