Tip #397: mapping for better browsing of :help docs
tip karma |
Rating 17/8, Viewed by 319
|
created: |
|
January 9, 2003 23:01 |
|
complexity: |
|
basic |
author: |
|
Stanislav Sitar |
|
as of Vim: |
|
6.0 |
I personally find it very akward and un-intuitive to browse the documentation
using Ctrl-] for following the link and Ctrl-Shift-t to go back.
I have had an idea to to remap those commands to Enter and Backspace, since
I do not use those keys in help in normal mode.
The command :nnoremap <buffer> can remap the key only in the given buffer
without affecting the other buffers.
just create file
$VIMRUNTIME/ftplugin/help.vim
with following contens
""""""""""""""""""""""""""""""""""""""""""""""""
"""" begining of the file
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" map ctrl-] to enter in normal mode only for this buffer
nnoremap <buffer><cr> <c-]>
" map ctrl-T to backspace in normal mode only for this buffer
nnoremap <buffer><bs> <c-T>
"""" End of the file
""""""""""""""""""""""""""""""""""""""""""""""""
<<Highlighting whitespaces at end of line |
Mapping for quicker access to macros >>
Additional Notes
|