vim allows a set of keys to be mapped as an alias to a different command in the ~/.vimrc file.
For example:
:nnoremap -d dd
NOTE: This maps that when -d is typed, it actually runs the dd command.
In this example,it would delete the current line.
Why not just map d to dd. Surely this would save typing a keystroke.
:let mapleader = "-"
NOTE: Sets the leader to a hyphen.
:nnoremap <leader>d dd
NOTE: Defining the leader in one place makes it easy to change later.
Vim has a second “leader” key called local leader.
:let maplocalleader = "\\"
NOTE:
The <localleader> can be used just like <leader>.
:help mapleader :help maplocalleader