Vim

To be added

Table of contents
  1. Window
  2. Key mapping
  3. NerdTree

Window

To split,

:sp    # Split window horizontally
:vsp   # Split window vertically

To navigate between windows,

<Ctrl> + w + w         # Navigate between viewports
<Ctrl> + w + h/j/k/l   # Navigate to respective direction

Key mapping

There are 6 types of mapping commands:

:map         # Recursive / Works in normal, visual, select and operator modes
:noremap     # Non-recursive version
:nmap        # Recursive / Works in normal mode
:nnoremap
:vmap        # Recursive / Works in visual mode
:vnoremap

Type one of the above to list the current key mappings.

To set new mappings, add them to ~/.vim/vimrc:

"Example
nnoremap <C-n> :<NERDTreeToggle<CR>

NerdTree

Set shortcut to toggle NerdTree:

nnoremap nerd :<NERDTreeToggle<CR>

In NerdTree, type ? to toggle help.


References:


Table of contents