Requested vimrc and webpage...


Subject: Requested vimrc and webpage...
From: David J. Weller-Fahy (largely@innocent.com)
Date: Thu Jul 18 2002 - 08:19:52 AKDT


Last night at the meeting I mentioned a bios mods web page. Here it is:

http://www.biosmods.com

Disclaimer: Do a LOT of reading before using a custom BIOS, there are a
ton of things that could go wrong!

Also, some vimrc tips that I've come accross. I'd list the people that
originally came up with these ideas, but I've lost track of all the
original vimrc files that I used.

Restore cursor to last position of previous editing session. Line may
wrap, so make sure it's all on one line in your vimrc.

#v+
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
#v-

Make p in Visual mode replace the selected text with the "" register.
This is really handy, you can activate visual mode (v), use the cursor
keys to highlight the text you want to move, delete it (d), then go to
the text that you want to replace, activate visual mode, highlight the
text that you want to replace, and press (p). The highlighted text is
replace by the text you deleted.

#v+
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
#v-

Macro to get rid of trailing whitespace at the end of lines, and quote
indicators at the beginning of them. These come in handy when you get a
forwarded message that is actually worth keeping. When reformatting it
(as I do often) you'll be able to get rid of the ' > >> >' stuff at
the beginning of all the lines by hitting two keys (that's the second
macro), and also get rid of all trailing whitespace (that's the first
one).

#v+
nmap ,w :%s/ *$//g<CR>
nmap ,b :%s/^ *\(> \\|>\)\+ *//g<CR>
#v-

That's about it. The full vimrc is at...

http://sinecure.pointclark.net/files/vimrc.txt

BTW - Thanks Mike for the presentation last night, learned a lot!

Regards,

  Dave

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Thu Jul 18 2002 - 08:19:58 AKDT