Hi, I just joined this forum. I can't wait to start learning more advanced
techniques in vim
I have three questions:
1. I would like to map a command that italicizes a word in latex. That is,
if I have a word, say, flah, I would like to be able to put the cursor over
any part of blah and have it be turned into \emph{flah}.
What I have right now is: map <F2> bi\emph{<esc>ea}<esc>
but this clearly does not work if my cursor is on the first letter of flah,
f, (because the "b" causes vim to go back to the NEXT word).
2. what are the most common keys you use to map to? I am trying to figure
out which keys VIM does NOT use.
3. How can I map the arrow keys (or any other key for that matter) to do
something else when I am already in insert mode? I remember reading about it
but forgot and can't find it.
thank you!
scott
--
View this message in context: http://www.nabble.com/simple-mapping-help-tp18790912p18790912.html
Sent from the Vim - General mailing list archive at Nabble.com.
There are lots of places to find examples of scripts. You might be interested in
looking at the following which contain tips that I've worked on recently.
http://vim.wikia.com/wiki/Deleting_a_buffer_without_closing_the_window
http://vim.wikia.com/wiki/View_all_colors_available_to_gvim
http://vim.wikia.com/wiki/Highlight_multiple_words
http://vim.wikia.com/wiki/Working_with_CSV_files
If you have any questions or comments, please edit the Comments section on the tip
page (at the bottom of the tip, click "edit" next to the "Comments" heading).
John