Loading ...
Sorry, an error occurred while loading the content.

Re: using cmd -t to open file in a new tab

Expand Messages
  • Jang-hwan Kim
    ... Do you mean mapping the `CTRL-W_gf` (Open a new tab page and edit the file name under the cursor) to CMD-t, replacing the original New-Tab action MacVim
    Message 1 of 3 , Feb 22 12:45 PM
    • 0 Attachment
      On Friday, February 22, 2013 7:48:31 AM UTC+9, Hyrum Tanner wrote:
      > Anyone know a way to have a match found with cmd -t open in a new tab instead of clobbering the file already opened in the tab?

      Do you mean mapping the `CTRL-W_gf` (Open a new tab page and edit the file name under the cursor) to CMD-t, replacing the original "New-Tab" action MacVim provides?

      By reading help in `:macmenu`, I see that you can do this by adding the following lines to your rc file:

      " disable current mapping - opening a new tab
      macmenu File.New\ Tab key=<nop>
      " nmap to open file under cursor
      nmap <D-t> <C-W>gf

      --
      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_mac" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Phil Dobbin
      ... I, personally, just map: nnoremap rt :tabnew in my vimrc Cheers, Phil... -- -- You received this message from the vim_mac maillist. Do not
      Message 2 of 3 , Feb 22 1:57 PM
      • 0 Attachment
        On 21/02/2013 22:48, Hyrum Tanner wrote:
        > Anyone know a way to have a match found with cmd -t open in a new tab instead of clobbering the file already opened in the tab?
        >

        I, personally, just map:

        'nnoremap <leader>rt :tabnew<cr>'

        in my vimrc

        Cheers,

        Phil...


        --
        --
        You received this message from the "vim_mac" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_mac" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.