Thursday, May 31, 2018

Re: special characters in abbreviations

On 31.05.18 08:09, Robert Bower wrote:
> I have the following abbreviation
> iab julianheader <esc>:r!~/.bin/datevim.sh<cr>
>
> It worked fine till I swapped the caps lock and the escape key at the
> os level. FYI I am using Ubuntu 16.04 Now the abbreviation no longer
> works. I am assuming <esc> in Vim now points to capslock

If you use xmodmap to swap caps lock and the escape, then Vim should
only see the keystrokes after filtering, and be unaware that it has
occurred. Here I have only made caps lock into escape, with no reverse
mapping, It works fine with:

" ^U Uppercase current word, in insert mode:
inoremap <C-U> <Esc>gUiw`]a

That's with:

keycode 0x42 = Escape
clear Lock

in ~/.Xmodmap.

I haven't tried it with the reverse mapping as well.

Erik

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: