.. title: #11 Vim NERDTree toggle shortcut
.. slug: 11-vim-nerdtree-toggle-shortcut
.. date: 2023-04-07 09:45:30 UTC+02:00
.. tags: vim
.. category: 
.. link: 
.. description: 
.. type: text

Useful shortcut for opening NERDTree
======================================

The NERDTree is a file system explorer for the Vim editor. Using this plugin, users can visually browse complex directory hierarchies, quickly open files for reading or editing, and perform basic file system operations.

`NerdTree on github <https://github.com/preservim/nerdtree>`_

Add these lines to your .vimrc :

.. code-block:: bash

    Plugin 'preservim/nerdtree'
    map <leader>nj :NERDTreeToggle<CR>

**leader** is a special key which you press indicate a next keystrokes will 
trigger a shortcut to a command in Vim.

I have my leader defined in .vimrc :

.. code-block:: bash

    let mapleader = "," 

::

    "*<Leader>* *mapleader* To define a mapping which uses the "mapleader" 
    variable, the special string "<Leader>" can be used.  
    It is replaced with the string value of "mapleader"                        

..    include:: <isonum.txt>


|amp|   
|apos|  
|ast|   
|brvbar|
|bsol|  
|cent|  
|colon| 
|comma| 
|commat|
|copy|  
|curren|
|darr|  
|deg|   
|divide|
|dollar|
|equals|
|excl|  
|frac12|
|frac14|
|frac18|
|frac34|
|frac38|
|frac58|
|frac78|
|gt|    
|half|  
|horbar|
|hyphen|
|iexcl| 
|iquest|
|laquo| 
|larr|  
|lcub|  
|ldquo| 
|lowbar|
|lpar|  
|lsqb|  
|lsquo| 
|lt|    
|micro| 
|middot|
|nbsp|  
|not|   
|num|   
|ohm|   
|ordf|  
|ordm|  
|para|  
|percnt|
|period|
|plus|  
|plusmn|
|pound| 
|quest| 
|quot|  
|raquo| 
|rarr|  
|rcub|  
|rdquo| 
|reg|   
|rpar|  
|rsqb|  
|rsquo| 
|sect|  
|semi|  
|shy|   
|sol|   
|sung|  
|sup1|  
|sup2|  
|sup3|  
|times| 
|trade| 
|uarr|  
|verbar|
|yen|   


