Tuesday, May 26, 2015

Re: Newbie question about mapping...

Thanks guys, particularly Youen.  Those were helpful. 

On Mon, May 25, 2015 at 11:35 PM, Youen Lansade <youen_lansade@mailhaven.com> wrote:
You could start the command by inserting a character and delete it after you get back in insert mode:
 
  :inoremap <c-d> _<esc>viwU<esc>gi<bs>
 
Also, the second esc is useless since pressing U should take you back to normal mode:
 
  :inoremap <c-d> _<esc>viwUgi<bs>
 
And, although it's not wrong to go into visual mode to set some text uppercase, it's interesting to know vim has normal mode commands to change the case of letters. For example, to set the current word to uppercase, you could use gUiw. For more informations: :h case
 
Youen

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/A-J-dAXwhxw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Sonny.
----------------------------------------------------------------------------
Be true to your work, your word, and your friend. Henry David Thoreau.

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