Skip to content

Latest commit

 

History

History
40 lines (37 loc) · 8.3 KB

File metadata and controls

40 lines (37 loc) · 8.3 KB

Some key mappings available

  • Note that the leader key is set to space key instead of the default backslash.
  • Keys in square brackets mean those keys should be combined independently with the other key, for example <leader>[w/q] means <leader>w or <leader>q.
  • It is case sensitive (i.e. J means <shift-j>)
  • There are some automatically configured settings that is not mentioned here, such as the Tabular for auto-formatting tables that use | and &.
Key combination Mode Plugin used What it does
cob Normal toggle the background colour to light/dark theme
gr Normal toggle line wrapping
[S/J] Normal split the current line at the cursor/join the next line with the current line
<leader>[w/q] Normal save current file/quit vim
<leader>[j/k] Normal move to next/previous buffer
<ctrl-[h/j/k/l]> Normal move cursor 10 h/j/k/l positions
<backspace> Normal toggle search highlighting
<leader>s Normal toggle spell checking (NZ English)
gc Visual vim-commentary comment/uncomment selected line(s)
gcc Normal vim-commentary comment/uncomment line(s)
<leader>n Normal vim-submode while the spell checking is on, this will enter a "submode" and allow you to jump to the next misspelt word. Subsequent n/N keys will jump to next/previous misspelt word
<ctrl-k> Insert NeoComplete; ultisnippet autocomplete snippet associated with the keyword (and jump to next field subsequently)
<ctrl-[n/i]> Normal vim-gitgutter jump to the next/previous change (as observed by git) in the file
<ctrl-g>b Normal vim-unite open buffer menu
<ctrl-g>h Normal vim-unite open help menu search
<ctrl-g>m Normal vim-unite open list of most recently opened files
<ctrl-p> Normal vim-unite open filename search
<ctrl-y> Normal vim-unite open search menu for recently yanked words
<ctrl-g>t Normal vim-unite open (jumpable) buffer with all the tags/function/keywords in the currently opened file
<ctrl-g>c Normal vim-unite open a menu with a list of all the colorscheme available
<ctrl-u> Normal undotree open a tree of all the previous changes made to the file
<ctrl-c><ctrl-c> Visual vim-slime specfiy the target tmux panel to send the selected words/lines
<ctrl-c><ctrl-c> Normal vim-slime send the selected words/lines to default/pre-specified tmux panel
S[any reasonable key] Visual vim-surround surround the visually selected area with the key specified
cS[surrounding key][any key] Normal vim-surround while within a word that is surrounded by a pair of keys, change the surrounding key to the key of your preference
dS[surrounding key] Normal vim-surround delete the surrounding key
EasyAlign Visual/Command vim-easy-align format the selected line(s) to your preference
Gstatus Command vim-fugitive open menu showing the git status of your repo and add/stage whatever files in there
Gcommit Command vim-fugitive write commit message and commit the changes
Gdiff Command vim-fugitive show the git diff of the current file in split windows