special characters in abbreviations

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

special characters in abbreviations

Robert Bower
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
From my understanding the capslock key can not be referenced in vim, so I tried using just the keycode but if I replace <esc> with the keycode for the capslock key I just get the literal string.

I have also added an additional escape key at the os level to <S-F12> and tried using that in Vim but no go.

I am new enough in Vim I am not sure where to find the answer.

Thanks

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: special characters in abbreviations

Erik Christiansen
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.