MacVim + Command-T plugin, how open in new tab by default
I would like to do the following with the Command-T plugin for V开发者_如何学PythonIM: Make opening files be in a new tab by default, instead of having to hit CTRL-T when a file is selected. I would like [Enter] to open the selected file in a new tab. I can't find anything in the options about this behavior.
You can add this to your .vimrc file to avoid editing the controller.rb file.
let g:CommandTAcceptSelectionMap = '<C-t>'
let g:CommandTAcceptSelectionTabMap = '<CR>'
This basically switches the two mappings so that Enter opens the selected file in a tab and CTRL-T opens in the same tab.
I don't think that there are an option to do this. But you can hack the functionality by yourself. In your .vim directory open the file ruby/command-t/controller.rb and go to line 260. Around this line you should see some keybindings. Just change <CR> to <C-t> for "AcceptSelection" and change <C-t> to <CR> for "AcceptSelectionTab" and then restart vim.
精彩评论