Announcement

Collapse
No announcement yet.

Alt key mappings for vim in konsole

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Alt key mappings for vim in konsole

    I have not been able to get alt key mappings to work with konsole. They work fine with xterm, but in konsole, as far as vim is aware, pressing Alt-L seems to be equivalent to ESC-L.

    I need the alt key for the latex-suite I downloaded that has a lot of nifty shortcuts using the alt key. This also rules out a lot of the workarounds I found searching on my own. It seems the problem is konsole interpreting characters as 7-bit instead of 8-bit or something like that. If that's what it is I haven't found a way to make konsole do what I need.

    #2
    Does nobody else use vim anymore? I thought this would be a common problem to anyone using programs like vim or emacs that make use of special keys...

    Comment


      #3
      Originally posted by argentum2f View Post
      It seems the problem is konsole interpreting characters as 7-bit instead of 8-bit or something like that.
      Yup. http://vimdoc.sourceforge.net/htmldo...#:map-alt-keys
      Unfortunately, I'm not aware of a way to make konsole use 8-bit input for alt/meta (this doesn't necessarily mean it doesn't exist, but it's well hidden if it does)

      This also rules out a lot of the workarounds I found searching on my own
      I found a couple of workarounds, but these might not be suitable for your use case:
      http://vim.wikia.com/wiki/VimTip738
      http://vim.wikia.com/wiki/Get_Alt_ke...rk_in_terminal
      Last edited by kubicle; Jan 23, 2013, 10:49 AM.

      Comment


        #4
        Originally posted by argentum2f View Post
        Does nobody else use vim anymore?
        Assuredly. In fact, KFN is rivalled for friendly helpfulness by vim_use on google groups: http://groups.google.com/forum/#!forum/vim_use.

        Now, in vim, :help map-alt-keys says:
        By default Vim assumes that pressing the ALT key sets the 8th bit of a typed character. Most decent terminals can work that way, such as xterm, aterm and rxvt. If your <A-k> mappings don't work it might be that the terminal is prefixing the character with an ESC character. But you can just as well type ESC before a character, thus Vim doesn't know what happened (except for checking the delay between characters, which is not reliable).
        As of this writing, some mainstream terminals like gnome-terminal and konsole use the ESC prefix. There doesn't appear a way to have them use the 8th bit instead. Xterm should work well by default. Aterm and rxvt should work well when started with the "--meta8" argument. You can also tweak resources like "metaSendsEscape", "eightBitInput" and "eightBitOutput".
        I see (and ignore) lots of posts on vim_use about Latex, so I think it may be a good place to ask about it.

        Regards, John Little
        Regards, John Little

        Comment

        Working...
        X