Skip to content

Instantly share code, notes, and snippets.

@emanon001
Created March 28, 2012 03:51
Show Gist options
  • Save emanon001/2223439 to your computer and use it in GitHub Desktop.
Save emanon001/2223439 to your computer and use it in GitHub Desktop.
Definition of key-mapping using a prefix key. (ideal)
PrefixedMapBegin <SID>[Tag]
" {map-command} {map-arguments} <Nop>
" -> {map-command} {map-arguments} {prefix-key} <Nop>
nnoremap <Nop>
" {map-command} {map-arguments} {lhs} {rhs}
" -> {map-command} {map-arguments} {prefix-key}{lhs} {rhs}
nnoremap <silent> <Space> <C-]>
nnoremap <silent> j :<C-u>tag<CR>
nnoremap <silent> k :<C-u>pop<CR>
nnoremap <silent> s :<C-u>tags<CR>
nnoremap <silent> n :tnext<CR>
nnoremap <silent> p :tprevious<CR>
nnoremap <silent> f :tfirst<CR>
nnoremap <silent> l :tlast<CR>
PrefixedMapEnd
nnoremap <script> t <SID>[Tag]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment