vim book dedicated to scripting

2 views
Skip to first unread message

Scott Kostyshak

unread,
Nov 10, 2008, 9:32:32 PM11/10/08
to v...@vim.org
I've been using vim for a little while now and want to get into some scripting. Is there any good recommended starting place?

The most interesting book I have found so far is Hacking Vim: A Cookbook... by Kim Schulz. Is there any thumbs up for this book or a better recommendation?

Thanks!

Scott Kostyshak

unread,
Nov 16, 2008, 2:13:10 PM11/16/08
to vim...@googlegroups.com
I've been using vim for a little while now and want to get into some scripting. Is there any good recommended starting place?

The most interesting book I have found so far is Hacking Vim: A Cookbook... by Kim Schulz. Is there any thumbs up for this book or a better recommendation?

Thanks!

2008/8/2 PGScooter <PGSc...@gmail.com>


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.




xulxer

unread,
Nov 17, 2008, 2:30:20 AM11/17/08
to vim...@googlegroups.com
Hi,

as far as i know there is no such book. I have read "Hacking Vim" and
would not recommend as most examples a taken right from the vim
help and if things get interesting and complicated it refers the
reader back to the vim docs.

The best thing i found so far to learn vim scripting is foo.vim.
This is a large collection of little vim scripts with annotations.
You can find it here.

http://www.vim.org/scripts/script.php?script_id=72

Kind regards

Chris
--
Bitte beachten Sie auch die Rückseite dieses Schreibens.

Scott Kostyshak

unread,
Nov 18, 2008, 10:41:28 PM11/18/08
to vim...@googlegroups.com
Thanks, Chris,

Alright, I'll give it a look. I guess learning by example is the best way to go.


2008/11/16 xulxer <xul...@gmail.com>

John Beckett

unread,
Nov 19, 2008, 6:16:45 PM11/19/08
to vim...@googlegroups.com
Scott Kostyshak wrote:
> Alright, I'll give it a look. I guess learning by example
> is the best way to go.

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

Scott Kostyshak

unread,
Nov 21, 2008, 9:44:42 PM11/21/08
to vim...@googlegroups.com
ok, I'll take a look at those as well.

Thank you.

2008/11/19 John Beckett <johnb....@gmail.com>
Reply all
Reply to author
Forward
0 new messages