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

Re: Ctrl-T mapped to Toggle()

Expand Messages
  • Richard Hartmann
    ... Setting pastetoggle to F1 was the best thing I ever did :) SCNR, Richard --~--~---------~--~----~------------~-------~--~----~ You received this message
    Message 1 of 4 , Feb 2, 2008
    • 0 Attachment
      On Feb 2, 2008 2:32 PM, Tony Mechelynck <antoine.mechelynck@...> wrote:

      > I recommend using F keys (with
      > or without Shift, and possibly excepting F1=Help and F10=Menu) as your best
      > bets for "user" mappings;

      Setting pastetoggle to F1 was the best thing I ever did :)


      SCNR,
      Richard

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Volker Glave
      On Feb 2, 2:32 pm, Tony Mechelynck ... Ok, thank you. ... Since I do not need Toggle() that much I do a ... in vimrc now to undo
      Message 2 of 4 , Feb 4, 2008
      • 0 Attachment
        On Feb 2, 2:32 pm, Tony Mechelynck <antoine.mechely...@...>
        wrote:
        > Volker Glave wrote:
        > > There's a toggle.vim plugin here doing mappings
        > > | 46 imap <S-C-T> <C-O>:call Toggle()<CR>
        > > | 47 nmap <S-C-T> :call Toggle()<CR>
        >
        > > But instead as it seems the mapping goes to <C-T> ...
        > > | :map <S-C-T>
        > > | n <C-T> :call Toggle()<CR>
        > > ... so I'm losing default Ctrl-T (Jump to older entry in the
        > > tag stack).
        >
        > > So, are S-C-mappings in general getting reshaped to
        > > C-mappings?
        > > Hm, from todo.txt:
        > > "8 Should mapping <C-A> and <C-S-A> both work?"
        >
        > IIUC, when x is a letter, C-x is represented as (x and 0x1F) regardless of
        > whether x is upper- or lower-case: Ctrl-a and Ctrl-A are both 0x01, Ctrl-b and
        > Ctrl-B are both 0x02, etc., so, yes, S-C-mappings *for letters* are the same
        > as C-mappings. It's not really Vim's fault, it's (IIRC) part of the ASCII
        > specification. For non-printing keys (such as arrow keys and F keys) it's
        > different. For non-letter printing keys, I'm not sure.

        Ok, thank you.

        > If you want to keep the special Ctrl-T mapping, you can always map the default
        > Ctrl-T function by using (for instance) ":noremap <F2> <C-T>"

        Since I do not need Toggle() that much I do a
        :autocmd VimEnter * unmap <C-T>
        in vimrc now to undo the mapping.

        > In general, when creating "custom" mappings in Vim, it's best to stay away
        > from printing keys and cursor movement keys (with or without Shift and/or
        > Ctrl) because most of these are already taken. I recommend using F keys ...

        Yes. (In this case the mapping was done in an existing toggle.vim
        plugin, that I don't have access to, though. To be true, I do have
        access,
        but it's a given profile that may update itself now and than, so a
        change
        won't last ...)

        Greetings
        Volker
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.