On 08/08/12 01:05, sinbad wrote:
> how can one capitalize the current word or the 
> word just before the current cursor position 
> with out leaving the insert mode ? leaving insert
> mode and capitalize and come back to insert mode
> is becoming a tedious task for me ...:)

In attempting to answer sinbad's question, I figured it was the
perfect opportunity for i_CTRL-\_CTRL-u which is described as "like
CTRL-O but don't move the cursor".  So I created a mapping:

  :inoremap ~ <c-bslash><c-o>gUB

yet if I insert "This is a test~" (expecting it to change it to
"This is a TEST" with the cursor where it started after "test") it
changes where my insertion point is.  Are others seeing this too?
Is this a bug or my misunderstanding of i_CTRL-\_CTRL-u?

-tim

PS: to the OP, you can use

  :inoremap <f4> <esc>gUiwgi

which is just these 3 bits together:

:help gU
:help iw
:help gi

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

Reply via email to