• You are not logged in.

    SnippetsEmu with colemak.vim

    • Started by itwastrees
    • 5 Replies:
    • Reputation: 0
    • Registered: 27-Sep-2009
    • Posts: 9

    I'm using Shai's colemak.vim remapping, and I'd like to use the SnippetsEmu plugin, which makes it faster to type boilerplate code. I set the trigger key to <S-Space> because the default <C-Tab> conflicted with the Colemak remapping:

    let g:snippetsEmu_key = "<S-Space>"

    But now the trigger key just deletes what I've typed, and sometimes enters a few garbage characters. Is there an easy way to fix this? If not, does anybody have suggestions for typing boilerplate code? (Now that I think about it, Autohotkey would do the trick, and it would work across editors.)

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,364

    Probably a case of double remapping somewhere? Can't recall the command for seeing what your mappings are (is it just ':map' I wonder?) but check it out.

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 27-Sep-2009
    • Posts: 9

    :map does let you see your key mappings, but even when I map it to something obscure like <C-S-F6>, for which there shouldn't be any conflicts, it has the same effect (deleting what I typed). It deletes what I type only if it's a trigger word (for, do, main, etc.). And SnippetsEmu does work fine when I use the Vim's default keymap. Thanks anyway! I learned about the :map command.

    Last edited by itwastrees (27-Feb-2012 07:59:32)
    Offline
    • 0
    • Reputation: 0
    • Registered: 27-Sep-2009
    • Posts: 9

    I'm having a similar problem with the c.vim plugin. It works fine with the default Vim keymap, but using it with the colemak.vim keymap results in odd behavior.

    Offline
    • 0
    • Reputation: 2
    • From: Aalborg, Denmark
    • Registered: 18-Feb-2011
    • Posts: 166

    I don't use "the official" colemak.vim and I don't have the time to try it now, but if I may suggest using less invasive remappings, take a look here:

    https://forum.colemak.com/viewtopic.php?id=1059

    or just use my file: https://bitbucket.org/erw/colemak/src/tip/colemak.vim

    I don't know if it will solve the problems you experience, but I think it's a good idea anyway :-)

    Offline
    • 0
    • Reputation: 0
    • Registered: 27-Sep-2009
    • Posts: 9

    Thanks, erw! Your less-invasive mappings did the trick. Now I just have to get used to them after using the official ones for about a year. :S There are a few things that I'll miss: tab instead of escape for normal mode, ; instead of : for commands, turbo nav, more-intuitive navigation keys... Oh well, that's the price you pay for compatibility. And I suppose I could enable at least some of them without creating any conflicts.

    Last edited by itwastrees (28-Feb-2012 07:48:42)
    Offline
    • 0