inoremap <C-`>

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

inoremap <C-`>

Ethan Hereth
Hey everybody,

I just got a wild hair and decided to try to create the following mapping:

inoremap <C-`> <Esc>b~ea

I want to use this to twiddle the case of the current word I'm typing (e.g. if I've tab completed a word, and it's the correct word but I don't want the first letter to be upper case.)

This does not work, I'm having a hard time figuring out what exactly it is doing, I seem to get new lines of text every time I execute the map consisting of text I've recently added to the buffer. But what exactly gets inserted is hard to pin down in terms of a pattern.

I hope this is making at least a little sense. This same behavior occurs when I start vim with -u NONE -U NONE

On the other hand, if I create the map this way

inoremap <C-p> <Esc>b~ea

it works as expected.

Does anybody know what's going on? By the way, I know that the map probably isn't as robust as it could be, but that's besides the point right now!

Thanks!

Ethan Alan

--
--
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: inoremap <C-`>

Christian Brabandt
Hi Ethan!

On Di, 03 Mär 2015, Ethan Hereth wrote:

> Hey everybody,
>
> I just got a wild hair and decided to try to create the following mapping:
>
> inoremap <C-`> <Esc>b~ea
>
> I want to use this to twiddle the case of the current word I'm typing (e.g. if
> I've tab completed a word, and it's the correct word but I don't want the first
> letter to be upper case.)
>
> This does not work, I'm having a hard time figuring out what exactly it is
> doing, I seem to get new lines of text every time I execute the map consisting
> of text I've recently added to the buffer. But what exactly gets inserted is
> hard to pin down in terms of a pattern.
>
> I hope this is making at least a little sense. This same behavior occurs when I
> start vim with -u NONE -U NONE
>
> On the other hand, if I create the map this way
>
> inoremap <C-p> <Esc>b~ea
>
> it works as expected.
>
> Does anybody know what's going on? By the way, I know that the map probably
> isn't as robust as it could be, but that's besides the point right now!

http://vimhelp.appspot.com/vim_faq.txt.html#faq-20.5

Best,
Christian
--
Wer Weinbrände erfolgreich mit Obstwasser bekämpft hat, hat sich sein Bier
tapfer verdient.

--
--
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: inoremap <C-`>

Ethan Hereth

On Tue, Mar 3, 2015 at 3:38 PM, Christian Brabandt <[hidden email]> wrote:
Hi Ethan!

On Di, 03 Mär 2015, Ethan Hereth wrote:

> Hey everybody,
>
> I just got a wild hair and decided to try to create the following mapping:
>
> inoremap <C-`> <Esc>b~ea
>
> I want to use this to twiddle the case of the current word I'm typing (e.g. if
> I've tab completed a word, and it's the correct word but I don't want the first
> letter to be upper case.)
>
> This does not work, I'm having a hard time figuring out what exactly it is
> doing, I seem to get new lines of text every time I execute the map consisting
> of text I've recently added to the buffer. But what exactly gets inserted is
> hard to pin down in terms of a pattern.
>
> I hope this is making at least a little sense. This same behavior occurs when I
> start vim with -u NONE -U NONE
>
> On the other hand, if I create the map this way
>
> inoremap <C-p> <Esc>b~ea
>
> it works as expected.
>
> Does anybody know what's going on? By the way, I know that the map probably
> isn't as robust as it could be, but that's besides the point right now!

http://vimhelp.appspot.com/vim_faq.txt.html#faq-20.5

Thanks Christian, that explains it!
 


Best,
Christian
--
Wer Weinbrände erfolgreich mit Obstwasser bekämpft hat, hat sich sein Bier
tapfer verdient.

--
--
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.

--
--
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.