Skip to content

Commit

Permalink
Update docs to reflect changes to <Plug> mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
wincent committed Dec 25, 2015
1 parent 922a808 commit 246df91
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions doc/command-t.txt
Original file line number Diff line number Diff line change
Expand Up @@ -551,26 +551,36 @@ COMMANDS *command-t-commands*

MAPPINGS *command-t-mappings*

By default Command-T comes with only two mappings:
By default Command-T comes with only three mappings:

<Leader>t bring up the Command-T file window
<Leader>b bring up the Command-T buffer window
*<Plug>(CommandT)*

However, Command-T won't overwrite a pre-existing mapping so if you prefer
<Leader>t bring up the Command-T file window

*<Plug>(CommandTBuffer)*

<Leader>b bring up the Command-T buffer window

*<Plug>(CommandTJump)*

<Leader>j bring up the Command-T jumplist window

Note that Command-T won't overwrite a pre-existing mapping so if you prefer
to define different mappings use lines like these in your `~/.vimrc`:

nnoremap <silent> <Leader>t :CommandT<CR>
nnoremap <silent> <Leader>b :CommandTBuffer<CR>
nnoremap <silent> <Leader>t <Plug>(CommandT)
nnoremap <silent> <Leader>b <Plug>(CommandTBuffer)
nnoremap <silent> <Leader>j <Plug>(CommandTJump)

Replacing "<Leader>t" or "<Leader>b" with your mapping of choice.
Replacing "<Leader>t", "<Leader>b" or "<Leader>j" with your mapping of choice.

Note that in the case of MacVim you actually can map to Command-T (written
as <D-t> in Vim) in your `~/.gvimrc` file if you first unmap the existing menu
binding of Command-T to "New Tab":

if has("gui_macvim")
macmenu &File.New\ Tab key=<nop>
map <D-t> :CommandT<CR>
map <D-t> <Plug>(CommandT)
endif

When the Command-T window is active a number of other additional mappings
Expand Down Expand Up @@ -1418,6 +1428,10 @@ HISTORY *command-t-history*
- don't clobber |alternate-file| name when opening Command-T match listing
(patch from Jerome Castaneda)
- add |g:CommandTCursorColor| option
- expose mappings for |:CommandT| and |:CommandTBuffer| using `<Plug>`
mappings |<Plug>(CommandT)| and |<Plug>(CommandT)|
- add `<Leader>j` mapping to |:CommandTJump|, via |<Plug>(CommandTJump)|
(defined only if no pre-existing mapping exists)

1.13 (29 April 2015)

Expand Down

0 comments on commit 246df91

Please sign in to comment.