<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-878266731516261660</id><updated>2011-09-26T08:11:38.107-07:00</updated><category term='scripting'/><category term='syntax'/><category term='plugins'/><title type='text'>VIM-ing</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://viming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-1076964365284300453</id><published>2011-07-01T12:00:00.000-07:00</published><updated>2011-07-01T09:06:16.701-07:00</updated><title type='text'>Conditionally applying macro recordings.</title><content type='html'>I make and use recordings in Vim all the time. I cannot imagine my daily work-a-day life without them. The most common reason for using recordings is to perform a complex modification of a semi-formatted dataset: SQL result sets, CSV, TSV, XML, HTML, etc...&lt;br /&gt;&lt;br /&gt;As with most things in Vim when you find some new way feature, you find that you probably already had the parts laying before you, but hadn't quite had the 'manual' to put all the parts together. Recently I found a new way to do so conditionally, that I thought I'd share; its one of those methods that has probably been staring me in the face for-ever, and I just didn't see it.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So. What am I talking about? Conditional Macros. Lets break it down:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Macros&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Plain and simple. Here is a simple problem that I think requires a macro. Suppose you have some lines of text like the following:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List A: 108 unique colors, 387 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List B: 266 unique colors, 1343 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List C: 361 unique colors, 2554 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List D: 174 unique colors, 1221 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List E: 301 unique colors, 2665 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Suppose you wanted to compute the difference between the total colors and unique colors. So, in the case of the first line this would be 387 minus 108. You can do this once, sure. But suppose there are a couple thousand lines, and you want it all done, and done in Vim. No problem. You would record a macro like so:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;start your macro recording to register m (&lt;span class="Apple-style-span"&gt;qm&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;go to the beginning of the line (&lt;span class="Apple-style-span"&gt;^&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;move up to the first number (&lt;span class="Apple-style-span"&gt;WW&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;store the first number in a register (&lt;span class="Apple-style-span"&gt;"iyw&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;go to the second number (&lt;span class="Apple-style-span"&gt;f,  &lt;/span&gt;)&lt;/li&gt;&lt;li&gt;store the second number in a register(&lt;span class="Apple-style-span"&gt;"oyw&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;compute the difference between the numbers (&lt;span class="Apple-style-span"&gt;:let @s=@o-@i[carriage return]&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;print out the result at the end of the line (&lt;span class="Apple-style-span"&gt;$a == [control r]s[control c]&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;move to the next line (&lt;span class="Apple-style-span"&gt;j&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;stop recording (&lt;span class="Apple-style-span"&gt;q&lt;/span&gt;)&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;If you were to examine register m, you would see:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;^WW"iywf,  "oyw:let @s=@o-@i[carriage return]$a == [control r]s[control c]j&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And if you executed this macro (&lt;span class="Apple-style-span"&gt;@m&lt;/span&gt;) for each line you would get something like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List A: 108 unique colors, 387 total colors == 279&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List B: 266 unique colors, 1343 total colors == 1077&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List C: 361 unique colors, 2554 total colors == 2193&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List D: 174 unique colors, 1221 total colors == 1047&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List E: 301 unique colors, 2665 total colors == 2364&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To do several lines you would replay the macro by typing something like &lt;span class="Apple-style-span"&gt;5@m&lt;/span&gt; to do it five times, etc.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Conditional&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When conditional modification pops to mind, I think of the global command (&lt;span class="Apple-style-span"&gt;:g//&lt;/span&gt;). Whenever there is a match for the global command, it executes some arbitrary commds. So suppose you had text like the following:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Uninteresting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List A: 108 unique colors, 387 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Uninteresting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Uninteresting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List B: 266 unique colors, 1343 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Uninteresting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List C: 361 unique colors, 2554 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Uninteresting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Uninteresting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You could just delete all the uninteresting lines like so:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;:g/^Uninteresting line$/delete&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Conditional Macros&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, you could just delete everything not interesting and then run your macro on whatever is left. But a lot of times, you might find that you are interested in 'fixing' some lines but leaving the rest of the text unchanged. You can do this by combining the global command with a macro. So suppose you had:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Mildly interesting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List A: 108 unique colors, 387 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Mildly interesting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Mildly interesting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List B: 266 unique colors, 1343 total colors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To execute the macro you created, but only for the interesting lines you can combine the macro with the global command:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;:g/^List/norm @m&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Which would yield the desired result:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Mildly interesting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List A: 108 unique colors, 387 total colors == 279&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Mildly interesting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;Mildly interesting line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;List B: 266 unique colors, 1343 total colors == 1077&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-1076964365284300453?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/1076964365284300453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=1076964365284300453' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/1076964365284300453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/1076964365284300453'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2008/09/conditionally-applying-macro-recordings.html' title='Conditionally applying macro recordings.'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-8713119001510024713</id><published>2011-03-23T09:41:00.000-07:00</published><updated>2011-03-23T11:49:50.499-07:00</updated><title type='text'>New indenthl syntax plugin</title><content type='html'>I've still been getting comments on my &lt;a href="http://viming.blogspot.com/2007/02/indent-level-highlighting.html"&gt;original indenthl post&lt;/a&gt;, lo four or so years ago. Back when I wrote it I was an advocate of the 'set noet' (no expanded tabs - a tab means a tab!) form of consistency. Although I still prefer this method for its individual control (I like 2 char tabs, you like 4 char tabs, some fool likes 8 char tabs) I've noticed at my job people mix spaces and tabs (no we're not a python house, although we were a jython house for a while). The result: UGLY. Anyway, I'm beginning to see some of the virtues of a 'set et' world.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thus saying, I've done some IndentHL syntax updates. It now has a couple new features (and settings!):&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Error highlighting: if you have a line indented with a combination of tabs and spaces then this will highlight it as an error.&lt;/li&gt;&lt;li&gt;'follow the expandtab' setting: If you turn off the expandtab setting then the syntax plugin will highlight anything that isn't TAB'd out as error prone. If you specify et then the syntax plugin will do its same 'indent level highlighting' it did before for spaces (using your shiftwidth setting), and it'll highlight in red anything thats tabbed.&lt;/li&gt;&lt;li&gt;A setting to turn off error highlighting: maybe you don't care about consistency. Well, you can turn it off.&lt;/li&gt;&lt;li&gt;I originally designed three different highlight modes (see my original post). You can now pick which one you want (as a setting).&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Also, I moved this syntax project &lt;a href="https://github.com/dsummersl/indenthl"&gt;over to github&lt;/a&gt;. Of course, its over at &lt;a href="http://www.vim.org/scripts/script.php?script_id=1800"&gt;vim.org as well&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-8713119001510024713?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/8713119001510024713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=8713119001510024713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8713119001510024713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8713119001510024713'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2011/03/new-indenthl-syntax-plugin.html' title='New indenthl syntax plugin'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-5835256986019317666</id><published>2010-11-10T07:30:00.000-08:00</published><updated>2010-11-10T07:49:31.258-08:00</updated><title type='text'>Trying a new configuration scheme</title><content type='html'>So the other day I noticed &lt;a href="https://github.com/sjl/gundo.vim"&gt;this *amazing* plugin&lt;/a&gt; for looking at VIM's undo history. The guy says, if you aren't on &lt;a href="https://github.com/tpope/vim-pathogen"&gt;pathogen&lt;/a&gt; get on it.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Round 1&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="https://github.com/tpope/vim-pathogen"&gt;pathogen&lt;/a&gt; is a simple Vim script that lets you put each plugin into one specific folder all on its own. Its own sandbox. I like this idea because as a user of many many plugins, debugging them can be troublesome: which files are related to the plugins, how, is it documented, etc. Its hard when every single plugin is dumped into your ~/.vim folder. Now each plugin is dumped into ~/.vim/bundle/&lt;plugin&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I made a new .vim folder, and put pathogen in. Tried sticking in each plugin. What a pain, all this manual folder creation. Very very cumbersome. In fact, in the first round I couldn't get most of my plugins to even work. Everybody was complaining.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I gave up, went back to my old .vim folder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Round 2&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Looked around the internet a little more and found &lt;a href="http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen"&gt;this blog entry at Tammeh Saleh&lt;/a&gt; which offered a solution: instead of manually porting all your plugins over, &lt;a href="https://github.com/kossnocorp/dotvim"&gt;use a script&lt;/a&gt; (update_bundles.rb) to setup all of your &lt;a href="http://github.com"&gt;github&lt;/a&gt; and &lt;a href="http://www.vim.org"&gt;vim.org&lt;/a&gt; scripts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Genius, of course!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Tried the script out. Seemed like it might work out. Folders magically appeared in my ~/.vim/bundle folder. But. A lot of things still didn't work.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Upon investigation I realized that a good deal of the vim.org scripts I use are zipped, or tar.bz2'd or targ.gz, or vba.gz'd up. As wonderful as the ruby script was, it assumed that all vim.org scripts are zipped. Wrong.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I gave up, and stewed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Round 3&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Fine. &lt;a href="https://github.com/dsummersl/dotvim"&gt;I'll mod the script&lt;/a&gt;. Now I can totally blow away my ~/.vim/bundle folder and run this little ruby script and it completely regenerates regardless of zip/bzip/vimball/etc&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Requires some slight manual intervention for vimball installation (it launches vim, runs the vimball install, you just have to :quit out after to get it on its way).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I think I'm happy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Switching to pathogen also had another slight improvement. Some of my own personal duct tape type plugins got themselves checked into github for the first time. Probably should have done that awhile ago.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you wanna try this out yourself I suggest you &lt;a href="https://github.com/dsummersl/dotvim/raw/master/update_bundles.rb"&gt;download my script&lt;/a&gt;, and read the &lt;a href="http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen"&gt;Tammeh Saleh blog entry&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-5835256986019317666?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/5835256986019317666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=5835256986019317666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5835256986019317666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5835256986019317666'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2010/11/trying-new-configuration-scheme.html' title='Trying a new configuration scheme'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-3305256779445014451</id><published>2010-03-02T12:50:00.000-08:00</published><updated>2010-03-02T12:55:23.058-08:00</updated><title type='text'>multiline matching</title><content type='html'>Similar to my previous post on &lt;a href="http://viming.blogspot.com/2010/01/some-recent-nontrivial-searches.html"&gt;adjacent nontrivial searches&lt;/a&gt;, I've recently had to do something similar except that I need to find things that are the same on adjacent lines.&lt;br /&gt;&lt;br /&gt;For instance given the following:&lt;br /&gt;&lt;br /&gt;1003065,PARKBT,99.00,0.00,0.00,,2009,1089.00&lt;br /&gt;1003133,PARKBT,210.00,0.00,0.00,,2009,1470.00&lt;br /&gt;1003234,PARKBT,180.00,0.00,0.00,,2009,1980.00&lt;br /&gt;&lt;span style="color: rgb(255, 204, 102);"&gt;1003316&lt;/span&gt;,PARKAT,45.00,0.00,0.00,,2009,45.00&lt;br /&gt;&lt;span style="color: rgb(255, 204, 102);"&gt;1003316&lt;/span&gt;,PARKBT,230.00,0.00,0.00,,2009,2705.00&lt;br /&gt;1003360,PARKBT,210.00,0.00,0.00,,2009,1260.00&lt;br /&gt;1003377,PARKBT,110.00,0.00,0.00,,2009,1210.00&lt;br /&gt;1003404,PARKBT,180.00,0.00,0.00,,2009,1980.00&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this case I'm interested in finding matches where the number at the beginning is repeated in a couple more than once (the lines starting with 1003316). This is the resulting search: &lt;span style="color: rgb(255, 255, 0);"&gt;/^\v(\d+),.*$\_.^\1,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The trick here is to use the &lt;span style="color: rgb(255, 255, 0);"&gt;\_.&lt;/span&gt; to match the end of line, and then match zero width beginning of line.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-3305256779445014451?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/3305256779445014451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=3305256779445014451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/3305256779445014451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/3305256779445014451'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2010/03/multiline-matching.html' title='multiline matching'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-2296857586198937769</id><published>2010-01-27T12:14:00.001-08:00</published><updated>2010-01-27T12:53:08.478-08:00</updated><title type='text'>Still no column level folding in VIM.</title><content type='html'>I used to think that &lt;a href="http://www.vim.org/"&gt;VIM&lt;/a&gt; was right there on the 'cutting edge' of new editing concepts. I remember encountering &lt;a href="http://www.fileguru.com/Origami/info"&gt;Origami&lt;/a&gt; (the original project is dead I guess, can't find a good link) while I was in college. It have this novel idea of 'folding' lines so that you could hide large sections of a file. I thought, interesting. Not long after that feature was incorporated into VIM (no I'm not going to look up version numbers and embarrass/age myself!). A few years ago I had heard that someone had &lt;a href="http://sites.google.com/site/vincenegri/"&gt;written a patch&lt;/a&gt; for VIM that enabled horizontal folding to offer similar advantages to the line level folding: simplification. I didn't think much of it, but stashed it away...confidant that *someday* it'd be part of VIM (if it were useful).&lt;br /&gt;&lt;br /&gt;Well. Its been several years, and I just realized that Intelli has incorporated it into their own editor, and it is useful. Screenshot:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DzJTivKcPJA/S2CgbuuubBI/AAAAAAAAAIk/9sHu80r3QpQ/s1600-h/Screen+shot+2010-01-27+at+10.22.39+AM.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 197px; height: 65px;" src="http://3.bp.blogspot.com/_DzJTivKcPJA/S2CgbuuubBI/AAAAAAAAAIk/9sHu80r3QpQ/s320/Screen+shot+2010-01-27+at+10.22.39+AM.png" alt="" id="BLOGGER_PHOTO_ID_5431517548869741586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;See the little &lt;span style="color: rgb(153, 153, 153);"&gt;&lt;-&gt;&lt;/span&gt;? That's folding along the horizontal line. If you have the 'vi' plugin in Intellij it even acts like a fold: type 'zo' to open it. You get a lot longer string (sorry I'd type it out but blogger's editor doesn't like &lt;&gt; in that particular combination)&lt;hashmap&gt;&lt;object,string&gt;&lt;object,string&gt;. I couldn't say I saw a use for horizontal folding before...but I do now! So much more readable with folding. I want it in VIM!&lt;br /&gt;&lt;br /&gt;Note: I've been using the &lt;a href="http://vim.sourceforge.net/scripts/script.php?script_id=302"&gt;AnsiEsc.vim &lt;/a&gt;plugin for a little while, and I didn't even realize that it'd been specifically written to take advantage of Vince Negri's patch. Shame on me. One more reason to compile &lt;a href="http://code.google.com/p/macvim/"&gt;MacVim&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/object,string&gt;&lt;/object,string&gt;&lt;/hashmap&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-2296857586198937769?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/2296857586198937769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=2296857586198937769' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2296857586198937769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2296857586198937769'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2010/01/still-no-column-level-folding-in-vim.html' title='Still no column level folding in VIM.'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DzJTivKcPJA/S2CgbuuubBI/AAAAAAAAAIk/9sHu80r3QpQ/s72-c/Screen+shot+2010-01-27+at+10.22.39+AM.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-5966709324234538687</id><published>2010-01-20T21:08:00.000-08:00</published><updated>2010-01-20T21:21:23.172-08:00</updated><title type='text'>Macro Search take three (err, update)</title><content type='html'>Okay! So I've been hard at work on some new features. Make sure you've seen &lt;a href="http://www.swfcabin.com/open/1263414672"&gt;the first screencast&lt;/a&gt; - then get a video overview of the new 'under the cursor autosearch' feature by watching the changelog screencast I made:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.swfcabin.com/open/1264047556"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 235px;" src="http://2.bp.blogspot.com/_DzJTivKcPJA/S1fi1ZwbGtI/AAAAAAAAAIU/BF0amCHoO2E/s320/Screen+shot+2010-01-21+at+12.09.51+AM.png" alt="" id="BLOGGER_PHOTO_ID_5429057282893355730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;But. I also left some features out. A mostly complete list of the new features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A new 'under the cursor autosearch' feature. In short: you are shown all 'iskeyword' words in the file that match whatever 'word' is currently under your cursor.&lt;/li&gt;&lt;li&gt;Limited searches: the search and under cursor search plugins are limited to 100 matches so as not to kill you on larger files (searching for redundant things that match everywhere).&lt;/li&gt;&lt;li&gt;Colors! In GUI mode the intensity of the // and \\ colors will go UP when there are lots of matches in that region of the file. Dull == 1 match, brighter == more matches.&lt;/li&gt;&lt;li&gt;console coloring: the console doesn't support this level of granularity so I've given it a basic 8 color black/white/brown so that you get all the same basic functionality (minus the intensity telling you the # of matches).&lt;/li&gt;&lt;li&gt;hopefully more stable? Hopefully more complainy if you don't have +float or +signs support? One hopes :)&lt;/li&gt;&lt;/ul&gt;A screenshot of the plugin in console vim (uhh, this screenshot doesn't make *any* sense unles you've watched the screencasts so...&lt;a href="http://viming.blogspot.com/2010/01/macro-search-take-two.html"&gt;get to it&lt;/a&gt;!):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DzJTivKcPJA/S1fi7y398BI/AAAAAAAAAIc/Lm09biBlEh4/s1600-h/Screen+shot+2010-01-21+at+12.07.32+AM.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 218px;" src="http://2.bp.blogspot.com/_DzJTivKcPJA/S1fi7y398BI/AAAAAAAAAIc/Lm09biBlEh4/s320/Screen+shot+2010-01-21+at+12.07.32+AM.png" alt="" id="BLOGGER_PHOTO_ID_5429057392715100178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If you're interested try it out - just drop it in &lt;a href="http://github.com/dsummersl/vimplugin-macromatches"&gt;git repository&lt;/a&gt;. I'd be interested in some feedback before I tack a version on it and stick it on &lt;a href="http://www.vim.org/"&gt;vim.org&lt;/a&gt;'s plugin site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-5966709324234538687?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/5966709324234538687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=5966709324234538687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5966709324234538687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5966709324234538687'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2010/01/macro-search-take-three-err-update.html' title='Macro Search take three (err, update)'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DzJTivKcPJA/S1fi1ZwbGtI/AAAAAAAAAIU/BF0amCHoO2E/s72-c/Screen+shot+2010-01-21+at+12.09.51+AM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-4491090298721123027</id><published>2010-01-13T12:00:00.000-08:00</published><updated>2010-01-13T13:22:06.729-08:00</updated><title type='text'>Macro Search take two</title><content type='html'>Thats right I've reworked the idea I had earlier for a macro level search in VIM ala the IntelliJ features I had mentioned.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.swfcabin.com/open/1263414672"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 247px;" src="http://2.bp.blogspot.com/_DzJTivKcPJA/S045I1fSn3I/AAAAAAAAAIM/YL7K5HAlqm4/s320/Screen+shot+2010-01-13+at+4.19.46+PM.png" alt="" id="BLOGGER_PHOTO_ID_5426337424988086130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;At any rate - I'm adding another feature or two as I go along which I'll surely blog about. Its buggy, but it mostly works and isn't butt ugly.&lt;br /&gt;&lt;br /&gt;You can try it yourself by downloading it from its &lt;a href="http://github.com/dsummersl/vimplugin-macromatches"&gt;git repository&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-4491090298721123027?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/4491090298721123027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=4491090298721123027' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/4491090298721123027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/4491090298721123027'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2010/01/macro-search-take-two.html' title='Macro Search take two'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DzJTivKcPJA/S045I1fSn3I/AAAAAAAAAIM/YL7K5HAlqm4/s72-c/Screen+shot+2010-01-13+at+4.19.46+PM.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-8110674221732537851</id><published>2010-01-12T08:12:00.000-08:00</published><updated>2010-01-12T09:30:44.043-08:00</updated><title type='text'>Some recent nontrivial searches</title><content type='html'>Doing a lot of CSV file analysis the last couple weeks. Some things I've needed to do:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;[^X]&lt;/b&gt;: Find out if there are any fields that don't match the typical pattern. Here's one. In this file I noticed that most files 2nd field had the pattern of four numbers followed by the letter A. I wanted to see if there were any that had some other character at the end. When I used &lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;s/\d\{4}[^A]&lt;/span&gt;, lo and behold there was indeed a nonstandard entry:&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;102,0949,0277A,1,0.00,"&lt;/div&gt;&lt;div&gt;102,0282,0282A,1,0.00,"&lt;/div&gt;&lt;div&gt;102,0284,&lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;0284B,&lt;/span&gt;1,0.00,"&lt;/div&gt;&lt;div&gt;102,0287,0287A,1,0.00,"&lt;/div&gt;&lt;div&gt;102,0288,0287A,1,0.00,"&lt;/div&gt;&lt;div&gt;102,0289,0289A,1,0.00,"&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;\1&lt;/b&gt;: Then I noticed that in a lot of entries there were field 2 and field 3 pretty much matched in most cases. I wanted to see which ones didn't match. At first it was easier to look for the matching entries with the following &lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;s/\v(\d{4}),\1\u,&lt;/span&gt;: &lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;102,0949,0277A,1,0.00,"&lt;/div&gt;&lt;div&gt;102,&lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;0282,0282A,&lt;/span&gt;1,0.00,"&lt;/div&gt;&lt;div&gt;102,&lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;0284,02&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;84B,&lt;/span&gt;1,0.00,"&lt;/div&gt;&lt;div&gt;102,&lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;0287,0287A,&lt;/span&gt;1,0.00,"&lt;/div&gt;&lt;div&gt;102,0288,0287A,1,0.00,"&lt;/div&gt;&lt;div&gt;102,&lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;0289,0289A,&lt;/span&gt;1,0.00,"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;\@!&lt;/b&gt;: Its actually a little confusing, but it can be done. By using the zero width matcher \@! you can specify that it NOT match the previous but then you have to fill in some for the part that it will match. Strangely the \@! matcher doesn't respect the \v 'verymagic' setting, so you end up with a lot of slashes in the end result. And this is what it looks like &lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;\(\d\{4}\),\(\1\)\@!\d\{4}\u,&lt;/span&gt;:&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;102,&lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;0949,0277A,&lt;/span&gt;1,0.00,"&lt;/div&gt;&lt;div&gt;102,0282,0282A,1,0.00,"&lt;/div&gt;&lt;div&gt;102,0284,0284B,1,0.00,"&lt;/div&gt;&lt;div&gt;102,0287,0287A,1,0.00,"&lt;/div&gt;&lt;div&gt;102,&lt;span class="Apple-style-span"  style="color:#FFFF66;"&gt;0288,0287A,&lt;/span&gt;1,0.00,"&lt;/div&gt;&lt;div&gt;102,0289,0289A,1,0.00,"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-8110674221732537851?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/8110674221732537851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=8110674221732537851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8110674221732537851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8110674221732537851'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2010/01/some-recent-nontrivial-searches.html' title='Some recent nontrivial searches'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-8591962526669916851</id><published>2010-01-07T06:32:00.000-08:00</published><updated>2010-01-07T10:24:54.046-08:00</updated><title type='text'>quick * and # search hack</title><content type='html'>A friend of mine introduced me to a quick way to use the * and # commands (which let you quickly jump to the next or previous instance of the 'word' under your cursor). Generally a word is ([A-z][0-9])+. When you use the &lt;span style="font-weight:bold;"&gt;:set lisp&lt;/span&gt; option though, it then includes the '-' character as well. An old school option that makes for a nice quick hack.&lt;br /&gt;&lt;br /&gt;There is however a general solution: it turns out there is yet another thing I didn't know. You can change what a 'word' is in vim by modifying the 'iskeyword' setting.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see what characters are considered to be part of a word you can type:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#FF0000;"&gt;:set isk&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#999999;"&gt;iskeyword=@,48-57,_,192-255&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I've found that its pretty easy to change things up when you need a slightly different usage from */#. For instance, if you are searching some keywords of the form:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;final int TRANSIENT-RAT-SCH-CODE = -1;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Suppose your cursor is on the 'T'. If you hit * or # you would be brought to the next or previous instance of 'TRANSIENT' because '-' isn't in the 'iskeyword' setting. Quick fix? Do:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#FF0000;"&gt;:set isk+=-&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then it'll match the whole big bad thing.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-8591962526669916851?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/8591962526669916851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=8591962526669916851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8591962526669916851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8591962526669916851'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2009/01/quick-and-search-hack.html' title='quick * and # search hack'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-4733202045374762370</id><published>2009-12-20T21:38:00.000-08:00</published><updated>2009-12-20T22:02:55.614-08:00</updated><title type='text'>entire file view of matching searches.</title><content type='html'>So I've been using IntelliJ a lot for my Java and groovy development lately and noticed a cool feature of its editor recently. When you do a search, a little tick mark is made along the area of the scroll bar for each match to your search. This is kinda cool as it gives you a general idea of how many matches there are in the file, and a general sense of where they are.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DzJTivKcPJA/Sy8MAbOn8TI/AAAAAAAAAH8/k_kWpm5SKsQ/s1600-h/Screen+shot+2009-12-21+at+12.45.17+AM.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 295px;" src="http://2.bp.blogspot.com/_DzJTivKcPJA/Sy8MAbOn8TI/AAAAAAAAAH8/k_kWpm5SKsQ/s320/Screen+shot+2009-12-21+at+12.45.17+AM.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5417562078198624562" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;So I was thinking. I wanna do this in Vim. How? Well, if you have +signs support built in...you could do as I did. This is what I got toward:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DzJTivKcPJA/Sy8NGPj5frI/AAAAAAAAAIE/13RyyAm84yY/s1600-h/Screen+shot+2009-12-21+at+12.51.52+AM.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 306px;" src="http://3.bp.blogspot.com/_DzJTivKcPJA/Sy8NGPj5frI/AAAAAAAAAIE/13RyyAm84yY/s320/Screen+shot+2009-12-21+at+12.51.52+AM.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5417563277657472690" /&gt;&lt;/a&gt;&lt;br /&gt;This works in the same general way: the green hilighted area essentially corresponds to the scrollbar...it shows you what part of the whole file you are looking at right now. The little ticks show you where the other matches are in your file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyway, I think its generally a cool idea. I've made a plugin that shows this stuff on the side whenever you have the 'hls' setting on. Whenever you move around the file it automatically updates so its generally correct. Still some bugs, but I'm working on it. You can try it out yourself &lt;a href="http://github.com/dsummersl/vimplugin-macromatches"&gt;from github&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;General conclusions/thoughts:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1125"&gt;vim-unit&lt;/a&gt; continues to rock. I'm almost to the point of considering going all ruby or all python for serious vim scripting though.&lt;/li&gt;&lt;li&gt;It sure would be nice if there were events you could subscribe to when your location changed in Vim. There is something for window sizes changing...but w/o this you're pretty much stuck using the CursorHold type cludges - which just feel like cludges unless you get your handler code really efficient (quit early, do as little as possible, set udpatetime high).&lt;/li&gt;&lt;li&gt;I wish MacVim supported images for +signs! I've checked out the MacVim project from git. If I get some free holiday time I'll definitely look into making images to get a more IntelliJ like result -- although I suppose the solution I have now is good in that it'd work on the console. Still. &lt;/li&gt;&lt;li&gt;Wouldn't it be sweet if you could have a left gutter +signs support as well as right gutter? IntelliJ really can tell you a lot by making use of them.&lt;/li&gt;&lt;li&gt;I'm thinking this +signs thing for code coverage tools would be kinda nice...have to look into that at some point...&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-4733202045374762370?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/4733202045374762370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=4733202045374762370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/4733202045374762370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/4733202045374762370'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2009/12/entire-file-view-of-matching-searches.html' title='entire file view of matching searches.'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DzJTivKcPJA/Sy8MAbOn8TI/AAAAAAAAAH8/k_kWpm5SKsQ/s72-c/Screen+shot+2009-12-21+at+12.45.17+AM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-7827321655809262798</id><published>2009-11-19T11:36:00.000-08:00</published><updated>2009-11-19T11:40:39.442-08:00</updated><title type='text'>NetRW and MacVim</title><content type='html'>So since I upgraded to snow leopard I could have sworn that the netrw just stopped working. Every time I tried:&lt;br /&gt;&lt;br /&gt;:e scp://somhost/somepath/file.txt&lt;br /&gt;&lt;br /&gt;I would get some gobbly gook about not knowing how to handle a BufEnter event or some such thing with regard to "scp://".&lt;br /&gt;&lt;br /&gt;I'm using &lt;a href="http://code.google.com/p/macvim/wiki/Snapshot"&gt;Snapshot 50&lt;/a&gt; since that works better than the last stable build (I recall some repainting issues). Well, it looks like maybe the snapshot doesn't include the netrw plugin. So I just &lt;a href="http://www.vim.org/scripts/script.php?script_id=1075"&gt;downloaded it&lt;/a&gt; and installed it manually and all is good with the world, yeah!&lt;br /&gt;&lt;br /&gt;:e ~/Downloads/netrw.vba.gz&lt;br /&gt;:so %&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-7827321655809262798?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/7827321655809262798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=7827321655809262798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/7827321655809262798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/7827321655809262798'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2009/11/netrw-and-macvim.html' title='NetRW and MacVim'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-411302370794027005</id><published>2009-09-04T08:03:00.000-07:00</published><updated>2009-09-08T09:57:14.216-07:00</updated><title type='text'>YouTRACK: a bug tracker for the vim-ish?</title><content type='html'>I got an email yesterday from &lt;a href="http://jetbrains.com"&gt;jetbrains&lt;/a&gt;, notifying me that their internal bugtracker &lt;a href="http://www.jetbrains.com/youtrack/index.html"&gt;YouTRACK&lt;/a&gt; has gone beta. "Try it out!", they tell me. Okay, I like jetbrains stuff, so I bit. I'm posting here about it because it kind of reminds me of my learning process with VIM. Back when I first started using VIM I remember that I suffered through the initial arcana: I couldn't do anything at first (it was hard), then I began to cotton on to the general concept (but I couldn't really do it), at last I could do things fast, and finally I wondered why it didn't have all those kitchen sink features other products have. Doesn't this sound sooo reminicent of using VIM?&lt;br /&gt;&lt;br /&gt;If  you have ever used VIM you probably remember struggling just to frickin...TYPE. Type anything at all. And then once you could actually do that, well - what about saving and exiting? Escape? :wq? Ahh...those first few baby steps. YouTrack totally hit me like that. Of course they provide GUI menus for everything but me being a VIMish user, I wasn't interested in the easy/slow way. I had to figure out how to do everything by hot-key only. After all, the speed what supposedly sets this bugtracker apart. The installation part was easy. Download the WAR, stick it in tomcat, and fire it up. Bam. Its up and running. Copy and paste the demo license from their website and I'm good to go until December 2nd (after which point I'll have to buy a commercial license if I actually like the thing? How much?? Who knows...we'll see).&lt;br /&gt;&lt;br /&gt;I setup a couple small projects I'm currently working on (too small for a bug tracker - or rather, too small to be worth the trouble). First impression: interesting. There is a search window with type-ahead keywords that appear as you go. How do I make a new bug? Ah. A hotkey (and by mouse of course, but I'm ignoring that as I said).&lt;br /&gt;&lt;br /&gt;I easily entered a couple bugs and a couple projects in the system. I'm working on a project and I want to pull up all the bugs, how do I do that? It takes me a couple minutes stumbling around with the search window to figure out what the syntax is "project: AA" - ahh...tab completion. Nice. So there were are - a couple bugs. How do I get from searching to modifying bugs? Durn durn durn I stumble on this for 20 minutes.&lt;br /&gt;&lt;br /&gt;Ahah! ESCAPE! Of course. Wouldn't you know it would be the same key that is such a stumbling block in VIM too. Go figure. Once I figure that out, oh my god. Its the frickin easiest thing to add comments and tag bugs. A breeze. Very snappy. I'm loving that. I can now see myself setting up projects and adding bugs for trivial little projects in no time. Nice. Perhaps even todo lists in general. Quick modification of tab names, batch updates, etc. Power.&lt;br /&gt;&lt;br /&gt;Of course, now that I'm enlightened, I have questions. Lots of questions. Kitchen sink type questions. Can I use external java/javascript to make mashups (say burn down charts, remotely add bugs say via my own applications, etc). Whats the best practice for agile delevelopment say? Integrate with other back end bug trackers like bugzilla or trac? As I keep playing with it over the next few weeks I'm sure I'll have more questions and comments. But so far I like it a lot. Just wish I knew what I'm gonna have to pay for the thing once they go commercial with it a few months down the road (ie, once I'm totally addicted).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-411302370794027005?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/411302370794027005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=411302370794027005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/411302370794027005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/411302370794027005'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2009/09/youtrack-bug-tracker-for-vim-ish.html' title='YouTRACK: a bug tracker for the vim-ish?'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-8793400038011515840</id><published>2009-03-04T09:17:00.000-08:00</published><updated>2009-03-04T09:17:31.219-08:00</updated><title type='text'>Daniel in Nowhere: Put Searched results into a split window under VIM</title><content type='html'>Hey this looks pretty cool - every now and then I've wanted to see search results in a nice searchable list. Gonna have to try this plugin out:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://netherlandsdaniel.blogspot.com/2009/03/put-searched-results-into-split-window_03.html"&gt;Daniel in Nowhere: Put Searched results into a split window under VIM&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-8793400038011515840?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://netherlandsdaniel.blogspot.com/2009/03/put-searched-results-into-split-window_03.html' title='Daniel in Nowhere: Put Searched results into a split window under VIM'/><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/8793400038011515840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=8793400038011515840' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8793400038011515840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8793400038011515840'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2009/03/daniel-in-nowhere-put-searched-results.html' title='Daniel in Nowhere: Put Searched results into a split window under VIM'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-6419487122963855938</id><published>2008-12-09T07:34:00.000-08:00</published><updated>2008-12-09T07:55:46.041-08:00</updated><title type='text'>Registers</title><content type='html'>There is always something new to discover out there, particularly with Vim. I thought I knew how registers worked: you got your window manager registers (+ and *); the 'last thing I deleted' register ("); the confusing 'last 10 deletes' registers (0-9); some read only registers that I don't consider to be registers because, hey, you can't write to them (% and #); and then the multipurpose named registers (a-z).&lt;br /&gt;&lt;br /&gt;I've programmed myself over the years to use specific letters for specific purposes. The 'n' and 'm' registers are reserved for recorded macros (yes, macros are saved in registers - handy to know if you want to save a macro in your .vimrc for later use, say), the 'iou' I tend to use for registers that are used in a macro, and 'fvc' for yanking and storing.&lt;br /&gt;&lt;br /&gt;For instance, if the lines below existed, and I wanted to copy the first one for later use:&lt;br /&gt;&lt;br /&gt;every good boy&lt;br /&gt;does good&lt;br /&gt;&lt;br /&gt;I'd do: "fyy&lt;br /&gt;&lt;br /&gt;Now, if you type ":registers" you can see all of your registers, and thats overwhelming. I tend to just look at the register I'm especially intersted in ":echo @f" or ":registers f" does the trick nicely. Also, since I know I use the 'fvc' registers for yanking - I tend to just look in those registers if I forget what I've done with ":reg fvc".&lt;br /&gt;&lt;br /&gt;Did you know that you can append to the named registers? I had NO IDEA. By using the capital letter 'F' instead of the lowercase letter 'f', for instance, you append rather than replace. Take the example above. Say that I was going along editing and I saw another line I might want to use later:&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;blown up beneath my glass.&lt;br /&gt;Colors dazzle insect wings.&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;I could, if I wanted, just add it to register 'f' with the other line by doing: "Fyy&lt;br /&gt;&lt;br /&gt;Type ":reg f" and you see:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;--- Registers ---&lt;/span&gt;&lt;br /&gt;"f Every good boy&lt;span style="color: rgb(255, 0, 0);"&gt;^J&lt;/span&gt;Colors dazzle insect wings.&lt;span style="color: rgb(255, 0, 0);"&gt;^J&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not too pretty, but thats where this comes in handy: ":echo @f"&lt;br /&gt;&lt;br /&gt;Every good boy&lt;br /&gt;Colors dazzle insect wings&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Press ENTER or type command to continue&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There you are - a case for using 'echo' over 'register' and an interesting note about the named registers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-6419487122963855938?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/6419487122963855938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=6419487122963855938' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/6419487122963855938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/6419487122963855938'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2008/12/registers.html' title='Registers'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-4814860024584377838</id><published>2008-11-07T06:46:00.000-08:00</published><updated>2008-11-07T11:15:49.612-08:00</updated><title type='text'>Another one trying to come back to vim. I sense a theme.</title><content type='html'>Just saw &lt;a href="http://www.paperplanes.de/archives/2008/11/4/vim_my_college_sweetheart/"&gt;this post&lt;/a&gt; today, about another person trying out switching from TextMate back to their first love: VIM. He switched back to TextMate, and I can understand his reasons. Plugins in Vim do tend to feel 'bolted on', and they can be kinda slow. Although you can certainly customize Vim so that it fits your work requirements, many times I think &lt;span style="font-weight: bold;"&gt;we all have to customize it&lt;/span&gt; for our own needs because, out of the box, its not doing what we need.&lt;br /&gt;&lt;br /&gt;This makes me think of &lt;a href="http://cream.sourceforge.net/"&gt;cream&lt;/a&gt;, a distribution of Vim customized for non-Vim users, in the mode of word processing.&lt;br /&gt;&lt;br /&gt;We need some other distribution out there that tightly integrates some of the really amazing plugins that are out there. A cream-for-programmers who know the power of TextMate, IntelliJ, etc.&lt;br /&gt;&lt;br /&gt;One thing that might make also go into this soup...has anyone out there noticed the &lt;a href="http://www.vim.org/htmldoc/netbeans.html"&gt;'netbeans' extension&lt;/a&gt; to vim? I've seen the switch and read about what it was supposed to do - tightly integrate Vim on top of netbeans...so you can harness the power of netbeans inside Vim. Fancy icons in the gutters, cool refactoring features of netbeans in Vim. I'm only guessing here, but thats what I *think* the netbeans integration was supposed to have provided. There are certain automagical properties of the big battleship IDEs that Vim just isn't meant to provide...but perhaps providing a way to interface with them would bring those 'other IDE' users back into the fold.&lt;br /&gt;&lt;br /&gt;Eh...I don't know. Personally, a kickass tightly integrated distribution of vim with existing plugins would make me happy ... the IDE integration really seems like overkill. But...who knows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-4814860024584377838?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/4814860024584377838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=4814860024584377838' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/4814860024584377838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/4814860024584377838'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2008/11/another-one-trying-to-come-back-to-vim.html' title='Another one trying to come back to vim. I sense a theme.'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-5843342695496592827</id><published>2008-10-24T07:33:00.000-07:00</published><updated>2008-10-24T08:42:15.705-07:00</updated><title type='text'>file lookups</title><content type='html'>I've been hearing about &lt;a href="http://weblog.jamisbuck.org/2008/10/10/coming-home-to-vim"&gt;this post&lt;/a&gt; from a &lt;a href="http://macromates.com/"&gt;TextMate&lt;/a&gt; guy (I'll call him TM1) finally coming home to &lt;a href="http://www.vim.org/"&gt;Vim&lt;/a&gt;(hey, if you're gonna link to some other random editor, you GOTTA plug your own!). Good good. In fact, from any command line editor's point of view: amazing. Its funny though because &lt;a href="http://loglibrarian.blogspot.com/"&gt;THIS&lt;/a&gt; TextMate guy (call him TM2) got me to write up a plugin very similar to TM1s.&lt;br /&gt;&lt;br /&gt;Before I go any further - just click on the 'this post' link above and watch the short movie the guy recorded. I'm lazy, I'm not going to make a video. Once you've watched the video you'll understand what we're talking about: an gosh-its-almost-like-its-an-IDE friendly way of finding files in your project.&lt;br /&gt;&lt;br /&gt;Its the kind of thing that just has to be there for any programmer under 35 - we're just not going to fall in love with the :find and :grep and :vimgrep commands of the previous generation. Its just not easy enough. For some people the &lt;a href="http://www.vim.org/scripts/script.php?script_id=69"&gt;project plugin&lt;/a&gt; does the job. I admit, I kinda like it myself...but I always missed the easy file lookups you get in &lt;a href="http://www.eclipse.org"&gt;Eclipse&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/idea/features/search_replace.html"&gt;IntelliJ&lt;/a&gt;, etc etc etc. Being a Java guy mainly, I really love how easy Intellij makes it.&lt;br /&gt;&lt;br /&gt;When TM2 expressed interested in making the final journey from emacs-&gt;textmate-&gt;vim, you better believe I was there to encourage him. When he complained that there just wasn't any good Command-T equivelant in Vim, you bet I looked around. I found the &lt;a href="http://www.vim.org/scripts/script.php?script_id=1581"&gt;lookupfile plugin&lt;/a&gt;. At the time this was version 1.4 of the plugin - it was slow, it didn't do camel case searches (fuzzy finder doesn't do that either !?), you couldn't search inside files (ala grep).&lt;br /&gt;&lt;br /&gt;I extended the plugin with my own version and tried to get TM2 to use it. Unfortunately my skillz aren't quite what they could be in vimscript. However I was able to get the following working (and hey, it still works!):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I implemented searching using the standard unixy textutils and findutils packages underneath (find, sed, grep, xargs, etc). The first search is still slow b/c it builds up the search terms, but then they stay cached...so subsequent searches are blindingly fast.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Compatibility with &amp;amp;path and &amp;amp;suffixesadd settings (the variables used by :find, :grep, etc). Basically you can setup &amp;amp;path/&amp;amp;suffixesadd and use :find, :grep, and your friendly lookupfile functions all interoperably. I setup mappings where I only searched say...java files; or java, xml and properties files; or ruby and xml and yaml. Complete control over which directories you search under, as well as their extensions.&lt;/li&gt;&lt;li&gt;Support for case sensitive or non case sensitivity.&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Camel Case search. Not only can you do 'c*frog' to find 'CamelFrogMasterFactory.java' (or with case sensitivity 'C*Fro'), but you can do 'CFro' as well (a * is implied after each capital letter).&lt;/li&gt;&lt;li&gt;Grep search: same way of searching (nice filtering list) but search the file contents as well. If it worked better, I'd maybe win that &lt;a href="http://www.littlehart.net/atthekeyboard/2008/10/20/vim-programming-bounty-fuzzyfind-inside-files/"&gt;$100 bounty&lt;/a&gt; :).&lt;/li&gt;&lt;/ul&gt;But I had a problem - those darned findutils and textutils I built everything on aren't standard on OSX and so my TM2 friend had no end of trouble. It just was buggy. I guess it  still is, but...&lt;br /&gt;&lt;br /&gt;since somone else has published their version, and I found it hella slow, I figure...hell, here's my effort as well. Maybe someone out there would like to pick up where I left off.&lt;br /&gt;&lt;br /&gt;You can find the result of my efforts right &lt;a href="http://github.com/dsummersl/lookupfile-grep/tree/master"&gt;over here&lt;/a&gt;. Now.To work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-5843342695496592827?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/5843342695496592827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=5843342695496592827' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5843342695496592827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5843342695496592827'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2008/10/file-lookups.html' title='file lookups'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-2551627277893124885</id><published>2008-07-10T07:04:00.001-07:00</published><updated>2008-07-10T07:08:14.137-07:00</updated><title type='text'>MacVIM and cd</title><content type='html'>Just a quick note. For you Mac &amp;amp; Vim users out there - &lt;a href="http://code.google.com/p/macvim/"&gt;MACVIM&lt;/a&gt;. It truly rocks.&lt;br /&gt;&lt;br /&gt;Also, a quick "oh my gosh I'm so glad I finally found a command for this," and then a "doh, of course!"&lt;br /&gt;&lt;br /&gt;I often launch Vim and then have to work on a set of files in some specific project directly. Its a pain to have to type something like:&lt;br /&gt;&lt;br /&gt;:e ~/Documents/ProjectA/subProjectX/file1.py&lt;br /&gt;:sp ~/Documents/ProjectA/subProjectX/file2.py&lt;br /&gt;:sp ~/Documents/ProjectA/subProjectX/file3.py&lt;br /&gt;&lt;br /&gt;over and over and over again. I've been looking for the command to set your 'current directory', and I found it: cd. Duh:&lt;br /&gt;&lt;br /&gt;:cd ~/Documents/ProjectA/subProjectX&lt;br /&gt;:e file1.py&lt;br /&gt;:sp file2.py&lt;br /&gt;:sp file3.py&lt;br /&gt;&lt;br /&gt;So much better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-2551627277893124885?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/2551627277893124885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=2551627277893124885' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2551627277893124885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2551627277893124885'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2008/07/macvim-and-cd.html' title='MacVIM and cd'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-5352496313457008467</id><published>2008-07-07T10:16:00.001-07:00</published><updated>2008-07-07T10:16:48.527-07:00</updated><title type='text'>javascript vi clone</title><content type='html'>Thats right, &lt;a href="http://www.hackaday.com/2008/07/04/javascript-vi/"&gt;check this out&lt;/a&gt;. VI implemented in javascript.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-5352496313457008467?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/5352496313457008467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=5352496313457008467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5352496313457008467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5352496313457008467'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2008/07/javascript-vi-clone.html' title='javascript vi clone'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-1439383274288478811</id><published>2008-07-01T05:58:00.000-07:00</published><updated>2008-07-01T07:22:57.208-07:00</updated><title type='text'>Review of "100 Vim Commands every programmer should know"</title><content type='html'>This morning I woke to find that a &lt;a href="http://unixbsd.blogspot.com/2008/06/100-vim-commands-every-programmer.html"&gt;number&lt;/a&gt; of &lt;a href="http://feeds.spiceworks.com/%7Er/SpiceworksCommunity/%7E3/323572926/18312"&gt;blogs&lt;/a&gt; out there there have picked up an article called "&lt;a href="http://www.catswhocode.com/blog/web-development/100-vim-commands-every-programmer-should-know-11"&gt;100 Vim commands every programmer should know&lt;/a&gt;" over at &lt;a href="http://catswhocode.com/"&gt;CatsWhoCode.com&lt;/a&gt;. Of course, I had to go over there and scan down the list to see if there was something there that I might need to know.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Search&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Commands under the 'Search' category are simple enough: straightforward word boundaries and regular expressions mixed in.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Replace&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The 'Replace' category is much the same. Ranges are covered extensively. Unfortunately, I think it got a bit too general. The 'global' command was mixed in here, and only glossed over with the following paltry commands:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 204);"&gt;:g/string/d Delete all lines containing “string”&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 204);"&gt;:v/string/d Delete all lines containing which didn’t contain “string”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Interestingly I'd never heard of the ':v' command, but now I know why...its equivalent to the ':g!' command.&lt;br /&gt;&lt;br /&gt;An oldy  but goody was included in the 'Replace' category as well, to with XML tags:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 204);"&gt;:%s#&lt;[^&gt;]\+&gt;##g Delete HTML tags but keeps text&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At the bottom of this section I saw "Change text to Rot13." &lt;a href="http://www.rot13.com/info.php"&gt;Rot13&lt;/a&gt;?? Ah. To be honest I haven't in my paltry 14 years on the internet ever found myself using Rot13 for anything, so I have to say I'm a little surprise this makes it into the "Top 100". Onward.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Amazing! I have a big black hole in my head when it comes to case commands. Oh no, nevermind. Funny how it is that you sometimes actually have to use the command sequences before you realize, oh...yeah, I know that. Duh. To deal with words I prefer the 'inner word' type commands. Rather than doing 'vE' to select a word as is done a couple times here, I would do 'viw'. I think you would find 'viw' more forgiving than 'vE' if you were whipping up a recording, say, as it'll actually select the whole word. 'vE' only selects the current position to the end of the word. Minor detail I suppose. I didn't know about this setting though. Sweet:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 204);"&gt;:set smartcase Ignore case in searches excepted if an uppercase letter is used&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There were also a number of case replacements using sequences like:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 204);"&gt;:%s/\&lt;./\u&amp;amp;/g Sets first letter of each word to uppercase&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I'd tend to categorize this as 'Replace', but thats just me. Also, I don't often use the these generic sub replace commands in favor of the generic sub replace method. I'd do this more generic replace:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;:%s/\&lt;./\=toupper(submatch(0))/g&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hmm, yes. I should learn to use those other matches. Mines a bit verbose.&lt;br /&gt;&lt;br /&gt;Okay, so I've only reviewed about 1/3'rd of the entire list. On the whole I think its a good list, though the categorization is a bit loose. There were a few good comments on the article (and the author acknowledged them as well; they should get a pat on the back for listening to the readers). Worst offense: leaving out recording macros. Definitely should have been in the top 100.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-1439383274288478811?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/1439383274288478811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=1439383274288478811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/1439383274288478811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/1439383274288478811'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2008/07/review-of-100-vim-commands-every.html' title='Review of &quot;100 Vim Commands every programmer should know&quot;'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-1734397502214898313</id><published>2007-06-27T09:00:00.000-07:00</published><updated>2007-06-27T09:12:10.983-07:00</updated><title type='text'>dip and vip it.</title><content type='html'>Thats right, paragraph manipulation is as easy as three keys. I tend to just use 'dip' and 'vip', but there have gotta be other good ones out there...&lt;br /&gt;&lt;br /&gt;yip? yep.&lt;br /&gt;&lt;br /&gt;grip? Rip? darn! No, that doesn't work. Changes you back into insert mode.&lt;br /&gt;&lt;br /&gt;cip? okay, yes.&lt;br /&gt;&lt;br /&gt;g?ip? Yes, kinda silly though.&lt;br /&gt;&lt;br /&gt;&gt;ip? yes.&lt;br /&gt;&lt;br /&gt;'ip' is just inner paragraph. You could do various kinds of inner blocks and quotes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-1734397502214898313?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/1734397502214898313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=1734397502214898313' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/1734397502214898313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/1734397502214898313'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2007/06/dip-and-vip-it.html' title='dip and vip it.'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-2878552167054507553</id><published>2007-05-23T10:35:00.000-07:00</published><updated>2007-05-24T07:25:01.287-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Convenient tab commands</title><content type='html'>I was conversing with a friend about how to turn a split into a new tab, and vice versa this morning. You can call IMing 'conversing', right? Yes. At this day and age, I'd hope so. Anyway. We came up with a couple convenient commands/abbreviations. Take your pick:&lt;br /&gt;&lt;br /&gt;" Close a split and then open it in a new tab:&lt;br /&gt;:ca tb let a=bufnr("%") &lt;bar&gt; q &lt;bar&gt; tabnew &lt;bar&gt; exe  "b ". a&lt;br /&gt;:command! Tb :let a=bufnr("%") | q | tabnew | exe  "b ". a&lt;br /&gt;&lt;br /&gt;" Close the current tab and open as a split in another existing tab:&lt;br /&gt;:command! Ts :let a=bufnr("%") | tabprev | sp | exe "b ". a | tabnext | q | tabprev&lt;br /&gt;:ca ts :let a=bufnr("%") &lt;bar&gt; tabprev &lt;bar&gt; sp &lt;bar&gt; exe "b ". a &lt;bar&gt; tabnext &lt;bar&gt; q &lt;bar&gt; tabprev&lt;br /&gt;&lt;br /&gt;Note these obviously aren't that smart. If you have no splits,  its not gonna act quite right. I've made the order open X, then close Y so that vim still has *something* open. Hopefully that means your Vim session won't disappear out from underneath you.&lt;br /&gt;&lt;br /&gt;Yep, I just tested it out. Vim doesn't close, and the 'tb' command works fine regardless of the # of windows open. The 'ts' command acts a little funny when there is more than one split open in a tab. It removes one split, sticks it in another tab but doesn't completely remove the other tab b/c there's still a window in it. Not so bad. Just a little wierd.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/bar&gt;&lt;/bar&gt;&lt;/bar&gt;&lt;/bar&gt;&lt;/bar&gt;&lt;/bar&gt;&lt;/bar&gt;&lt;/bar&gt;&lt;/bar&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-2878552167054507553?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/2878552167054507553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=2878552167054507553' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2878552167054507553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2878552167054507553'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2007/05/convenient-tab-commands.html' title='Convenient tab commands'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-8353932048393203649</id><published>2007-05-21T12:34:00.000-07:00</published><updated>2007-05-22T14:38:16.343-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugins'/><title type='text'>Recursive Diffs?</title><content type='html'>It appears that, yes, someone has already gone out and written a plugin for recursive diffing two folders. According to &lt;a href="http://www.dracoware.com/blog/2007/05/21/recursive-diffs-in-vim/trackback/"&gt;one person&lt;/a&gt;, it works relatively well. What I'm wondering is, could this plugin be used to diff two revisions in say, &lt;a href="http://subversion.tigris.org/"&gt;SVN&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;Well, I had a chance to try the thing out and I have to say that I am happier doing:&lt;br /&gt;&lt;br /&gt;:r ! diff -r --brief &lt;onedir&gt; &lt;anotherdir&gt;&lt;br /&gt;&lt;br /&gt;and then making my own quick macro to diff any files mentioned in the diff results. I just like the ability to filter out any lines I already know aren't a factor in my diffing. The DirDiff plugin doesn't allow you to change the contents of the 'diff results'. Well, I was at first. Until I figured out all I had to do was type:&lt;br /&gt;&lt;br /&gt;:set modifiable&lt;br /&gt;&lt;br /&gt;Then I could delete the 'results' screen willy nilly. Much better. It still complained if I tried to insert text or what not...so its kind of a toss up. If I needed to quickly copy the contents back and forth then this DirDiff tool would be just the thing.&lt;br /&gt;&lt;br /&gt;The trouble is most of the time I'm actually looking for a needle in the haystack. Some little change in a text file is causing a world of havoc for me. I don't want to filter out 'types' of files, and copy whole swathes of differences between the trees. In this case, I think manually reading in the diff and recording your own little quick diff macro is the way to go. DirDiff is slightly too constrained in what it wants to let you do.&lt;br /&gt;&lt;br /&gt;In summary: a good plugin if you need to copy back and forth changes, or you don't want to spend the extra 3 minutes it takes to record your own diffing macro. I've rated this script 'Helpful'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-8353932048393203649?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/8353932048393203649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=8353932048393203649' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8353932048393203649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8353932048393203649'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2007/05/recursive-diffs.html' title='Recursive Diffs?'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-7367951901242889724</id><published>2007-05-15T14:50:00.000-07:00</published><updated>2007-05-15T14:58:01.557-07:00</updated><title type='text'>Quickly delete several random lines</title><content type='html'>I just couldn't think of a quick way to take a subset of a file, where some # of lines had been randomly deleted. Since VIM doesn't have its own random() command you have to turn to some external method of determining which lines to delete. My solution was ruby:&lt;br /&gt;&lt;br /&gt;:ruby VIM.command(String(rand(VIM::Buffer.current.count-1)+1) +"|d")&lt;br /&gt;&lt;br /&gt;To repeat the command several times I couldn't think of anything better than a macro recording:&lt;br /&gt;&lt;br /&gt;:let @l=':ruby VIM.command(String(rand(VIM::Buffer.current.count-1)+1) +"|d")^M'&lt;br /&gt;&lt;br /&gt;Where '^M' is really Control-J cariage return. Then to do it...uh, 30,000 times I just typed 30000@l&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-7367951901242889724?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/7367951901242889724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=7367951901242889724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/7367951901242889724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/7367951901242889724'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2007/05/quickly-delete-several-random-lines.html' title='Quickly delete several random lines'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-2953630212158356625</id><published>2007-02-17T12:54:00.000-08:00</published><updated>2007-02-19T14:49:39.976-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='syntax'/><title type='text'>Indent level highlighting</title><content type='html'>I have finally begun to delve into the world of VIM syntax highlighting. The syntax used by VIM that give all my different files such pretty colors have always been something of a mystery to me. Recently a problem caused me to make the jump into the &lt;a href="http://vimdoc.sourceforge.net/htmldoc/syntax.html#:syntax"&gt;:help syntax&lt;/a&gt; pages.&lt;br /&gt;&lt;br /&gt;There was on my part some assumption that someone had already done what I wanted to do, which is to highlight each successive indent level in a file. This would be particularly helpful for python files, but other programming languages as well. The &lt;a href="http://www.vim.org/scripts/script.php?script_id=104"&gt;BlockHL&lt;/a&gt; looked like just what I was looking for. Interesting, and helpful, but not quite.&lt;br /&gt;&lt;br /&gt;Delving into the documentation I eventually found after much scratching of the head how to do exactly what I wanted to. Piddling around with the highlight colors I came up with three variations. I think I like the right most one best.&lt;br /&gt;&lt;br /&gt;&lt;table border="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DzJTivKcPJA/Rdd4tnH5Y4I/AAAAAAAAABs/iuQyizIlKWY/s1600-h/Picture+7.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_DzJTivKcPJA/Rdd4tnH5Y4I/AAAAAAAAABs/iuQyizIlKWY/s200/Picture+7.png" alt="" id="BLOGGER_PHOTO_ID_5032623833601368962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DzJTivKcPJA/Rddv2nH5Y0I/AAAAAAAAAA0/4Ta97zOOdlw/s1600-h/Picture+2.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_DzJTivKcPJA/Rddv2nH5Y0I/AAAAAAAAAA0/4Ta97zOOdlw/s200/Picture+2.png" alt="" id="BLOGGER_PHOTO_ID_5032614092615541570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;i&gt;BlockHL syntax plugin&lt;/i&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;i&gt;Progressively darker indenting, kinda loud.&lt;/i&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DzJTivKcPJA/RddwnHH5Y1I/AAAAAAAAAA8/YVdsCJW1yIQ/s1600-h/Picture+3.png"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_DzJTivKcPJA/RddwnHH5Y1I/AAAAAAAAAA8/YVdsCJW1yIQ/s200/Picture+3.png" alt="" id="BLOGGER_PHOTO_ID_5032614925839197010" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DzJTivKcPJA/RddwtnH5Y2I/AAAAAAAAABE/UkqdSm9x5tU/s1600-h/Picture+6.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_DzJTivKcPJA/RddwtnH5Y2I/AAAAAAAAABE/UkqdSm9x5tU/s200/Picture+6.png" alt="" id="BLOGGER_PHOTO_ID_5032615037508346722" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;i&gt;Alternate coloring. Better.&lt;/i&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;i&gt;Alternate color, with progressively darker shading. Best.&lt;/i&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;I've posted the very simple coloring script on vim, as a script plugin. &lt;a href="http://www.vim.org/scripts/script.php?script_id=1800"&gt;See its page&lt;/a&gt; for further details.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;*** update ***&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well well well, apparently some poeple actually read my postings sometimes and call me out on my shoddy programming skillz. Yes, its true. This plugin only works with TABs. Maybe if I get less lazy, I'll make it work with the tabstop/shiftwidth settings for you non tab users.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-2953630212158356625?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/2953630212158356625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=2953630212158356625' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2953630212158356625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2953630212158356625'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2007/02/indent-level-highlighting.html' title='Indent level highlighting'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_DzJTivKcPJA/Rdd4tnH5Y4I/AAAAAAAAABs/iuQyizIlKWY/s72-c/Picture+7.png' height='72' width='72'/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-5792792662407458382</id><published>2007-02-06T07:45:00.000-08:00</published><updated>2008-08-19T10:58:57.513-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>switching between bash and batch scripts.</title><content type='html'>Were it only as easy as s/sh/tch/! Well, it almost is.&lt;br /&gt;&lt;br /&gt;For the most part only a few search replaces are required. Most of the tme I need to convert a dos batch to a bash script. The first round of conversion includes:&lt;br /&gt;&lt;br /&gt;:set ft=unix&lt;br /&gt;:%s/%\(\w\+\)%/$\1/g&lt;br /&gt;:%s/set //ig&lt;br /&gt;:%s/rem/#/ig&lt;br /&gt;:%s/;/:/g&lt;br /&gt;:%s/\\/\//g&lt;br /&gt;&lt;br /&gt;There is always additional work to do, but these replaces do most of the tedious portion for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-5792792662407458382?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/5792792662407458382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=5792792662407458382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5792792662407458382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5792792662407458382'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2007/02/switching-between-bash-and-batch.html' title='switching between bash and batch scripts.'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-8230517856720353719</id><published>2007-01-11T07:47:00.001-08:00</published><updated>2007-01-11T07:47:40.370-08:00</updated><title type='text'>Multi Line searches</title><content type='html'>&lt;p&gt;I often forget about the "newer" searching features in VIM's regular expression quiver: line aware regular expressions. Today, I needed to detect when certain requests had occured twice in a row without any response in between.&lt;/p&gt;  &lt;p&gt;First, I grepped the patterns important:&lt;/p&gt;  &lt;p&gt;grep "REQ\|RSP" file.txt | vim -&lt;/p&gt;  &lt;p&gt;Then I searched for two REQ's in a row:&lt;/p&gt;  &lt;p&gt;/REQ.*\_..*REQ&lt;/p&gt;  &lt;p&gt;Tada! Wow, that was just so easy.&lt;/p&gt;  &lt;p&gt;I haven't played with these kinds of regexps enough to know if you can extend it to say three lines in a row or say two lines with the pattern, and one without, etc. But, I expect it is quite possible with a little work.&lt;br/&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-8230517856720353719?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/8230517856720353719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=8230517856720353719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8230517856720353719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/8230517856720353719'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2007/01/multi-line-searches.html' title='Multi Line searches'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-5786026918061973888</id><published>2007-01-08T01:51:00.000-08:00</published><updated>2007-01-10T08:28:06.415-08:00</updated><title type='text'>Freezing titles ala spreadsheet land.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DzJTivKcPJA/RaJuAzgCLoI/AAAAAAAAAAY/l_AMbED3AdU/s1600-h/Picture+2.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_DzJTivKcPJA/RaJuAzgCLoI/AAAAAAAAAAY/l_AMbED3AdU/s320/Picture+2.png" alt="" id="BLOGGER_PHOTO_ID_5017693894947778178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Every now and then I have to read the results of a SQL query on the command line, and I find the following setup to work wonders in VIM. At least this works well with MySQL, as its command line query tool is kind enough to spit out the output in tab-delineated form.&lt;br /&gt;&lt;br /&gt;Say you have a query to perform. Do the following:&lt;br /&gt;&lt;br /&gt;echo "select * from tableX;" | mysql -uUser -pPassword databaseName | vim +'set scb sbo+=hor sbo-=ver nowrap ts=30 bt=nofile| sp | exe "norm \&amp;lt;c-w&amp;gt;j\&amp;lt;c-w&amp;gt;_\&amp;lt;c-e&amp;gt;"' -&lt;br /&gt;&lt;br /&gt;This will automatically space out the tabs so you can see each of the search result columns with the data, and then it creates two panes - one for the column descriptions, and one for the data. The scroll options are setup so that you can navigate around the data and always see the column description with the data (particularly helpful for large result sets).&lt;br /&gt;&lt;br /&gt;The only real improvement I can think of is to use the VIM &lt;a href="http://www.vim.org/scripts/script.php?script_id=356"&gt;dbext plugin&lt;/a&gt;. I often find myself on several different machines I don't use often enough to warrant customizing plugins/settings, so this quick and dirty sql result browser setting is very handy to have around.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-5786026918061973888?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/5786026918061973888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=5786026918061973888' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5786026918061973888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/5786026918061973888'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2006/11/freezing-titles-ala-spreadsheet-land.html' title='Freezing titles ala spreadsheet land.'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DzJTivKcPJA/RaJuAzgCLoI/AAAAAAAAAAY/l_AMbED3AdU/s72-c/Picture+2.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-3825811918437903987</id><published>2007-01-05T09:32:00.000-08:00</published><updated>2007-01-05T11:55:43.531-08:00</updated><title type='text'>Automatic formatting.</title><content type='html'>For me it is rare that I use VIM to compose text messages. This is unfortunately due to the nature of writing in VIM: it isn't embedded in the browser window where I am currently composing this blog entry, and it isn't in my mail composer (unless I'm using mutt). Its just not the de facto standard for editing no matter how much I sometimes which is was.&lt;br /&gt;&lt;br /&gt;Nevertheless, sometimes I do want to compose a message in VIM. When I do, its usually so that I can take advantage of the automatic formatting features in VIM. Here are the typical settings I use to setup a text editing session:&lt;br /&gt;&lt;br /&gt;:set tw=80&lt;br /&gt;:set fo=at&lt;br /&gt;&lt;br /&gt;This gets me just the basics: when I insert/delete text in VIM, the text is automatically wrapped/unwrapped.&lt;br /&gt;&lt;br /&gt;But I really want my numbered lists to be formatted correctly. In that case I add on an extra flag:&lt;br /&gt;&lt;br /&gt;:set tw=80&lt;br /&gt;:set ai&lt;br /&gt;:set fo=atn&lt;br /&gt;&lt;br /&gt;Of course, in VIM 7 you can add spell check to that:&lt;br /&gt;&lt;br /&gt;:set spelllang=en_us&lt;br /&gt;:set spell&lt;br /&gt;&lt;br /&gt;Use the the z= command to find alternate spellings underneath your cursor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-3825811918437903987?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/3825811918437903987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=3825811918437903987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/3825811918437903987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/3825811918437903987'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2007/01/automatic-formatting.html' title='Automatic formatting.'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-334213569249520056</id><published>2006-11-23T18:25:00.000-08:00</published><updated>2006-11-23T18:29:01.288-08:00</updated><title type='text'>Capitalizing Sentences</title><content type='html'>Here is a quick way to search for some letters, and then capitalize them quickly. I wanted to capitalize all of the letters at that start a line. Here was my query:&lt;br /&gt;&lt;br /&gt;:%s/^\(\w\)/\=toupper(submatch(0))/&lt;br /&gt;&lt;br /&gt;I forget about Vim's submatching expression, which is extra handy for some of those tasks that just appear to be unavoidable monotony.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-334213569249520056?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/334213569249520056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=334213569249520056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/334213569249520056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/334213569249520056'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2006/11/capitalizing-sentences.html' title='Capitalizing Sentences'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-135130258782377586</id><published>2006-11-18T18:25:00.000-08:00</published><updated>2006-11-18T18:44:28.011-08:00</updated><title type='text'>Arrow keys on the macbook pro</title><content type='html'>I used to have this exact problem when I used Linux on a Thinkpad several years ago. Try to use vim from the console, and the arrow keys simply don't work. There are a couple solutions to this problem, from what I understand, but I like this one b/c its simple and easy to apply on the fly whatever kind of terminal you find yourself in front of.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Lookup the key you want to override - :help terminal-options&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Then type "set ~option~=&lt;ctrl-v&gt;&lt;offending&gt;~Control V~~press the key that doesn't work~"&lt;/offending&gt;&lt;/ctrl-v&gt;&lt;/li&gt;&lt;li&gt;The key is now overriden. To make it permanent, copy the command into your .vimrc (use  :&lt;ctrl-f&gt; to view a buffer of all ex commands for easy copy/pasting).&lt;/ctrl-f&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;This might sound a little complicated. Its not. Here is an example. Say that the 'up' arrow key doesn't do anything when you are in vim. No problem.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Type :help terminal-options --- Aha, I see a table and in that table it says that 't_ku' is the 'arrow up' key.&lt;/li&gt;&lt;li&gt;Type :set t_ku=&lt;ctrl-v&gt;&lt;up&gt;~Ctrl-V~~up~ (where everything between ~s are the control V and then pushing the up key).&lt;/up&gt;&lt;/ctrl-v&gt;&lt;/li&gt;&lt;li&gt;Tada, the up arrow key now works correctly.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-135130258782377586?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/135130258782377586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=135130258782377586' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/135130258782377586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/135130258782377586'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2006/11/arrow-keys-on-macbook-pro.html' title='Arrow keys on the macbook pro'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-2106951852103492506</id><published>2006-11-03T08:28:00.000-08:00</published><updated>2006-11-03T08:34:19.991-08:00</updated><title type='text'>Uncombobulating text</title><content type='html'>I keep forgetting about these two tips, or rather, I get them confused. To decode some stream of data that is encoded as ASCII you can &lt;a href="http://www.vim.org/tips/tip.php?tip_id=1076"&gt;goto vim.org and read up my tip on it&lt;/a&gt;. Basically, install a plugin, and then run a quick search replace. I actually wrote a coder/decoder so that I could whip up custom password bookmarklets easily.&lt;br /&gt;&lt;br /&gt;The other format is base64. I forget that ascii is base16 and base64 is, well, base64 and so has 64 different characters rather than the cleaner 16. In any event, I found &lt;a href="http://www.vim.org/tips/tip.php?tip_id=1134"&gt;this great tip&lt;/a&gt; for decoding base64. Don't follow the tip instructions, scroll down to the last comment on the tip, and use it instead:&lt;br /&gt;&lt;br /&gt;:ruby require "base64"&lt;br /&gt;:.rubydo $_=Base64.decode64 $_&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-2106951852103492506?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/2106951852103492506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=2106951852103492506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2106951852103492506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2106951852103492506'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2006/11/uncombobulating-text.html' title='Uncombobulating text'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-878266731516261660.post-2787440824399653978</id><published>2006-10-29T12:57:00.000-08:00</published><updated>2006-10-29T13:00:58.153-08:00</updated><title type='text'>Test Post</title><content type='html'>Test post. Egad this isn't the prettiest layout, but it is somewhat console-like so I guess I'll stick with it for the time being. A nice lime green monospaced font would be nice.&lt;br /&gt;&lt;br /&gt;Blog topic - all things &lt;a href="http://www.vim.org"&gt;Vim&lt;/a&gt;, and &lt;a href="http://www.macvim.org"&gt;Mac Vim&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/878266731516261660-2787440824399653978?l=viming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://viming.blogspot.com/feeds/2787440824399653978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=878266731516261660&amp;postID=2787440824399653978' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2787440824399653978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/878266731516261660/posts/default/2787440824399653978'/><link rel='alternate' type='text/html' href='http://viming.blogspot.com/2006/10/test-post.html' title='Test Post'/><author><name>DeeSumm</name><uri>http://www.blogger.com/profile/10204423853435462994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_DzJTivKcPJA/SVlYN1vVZnI/AAAAAAAAADo/0fJ6JmWtYtI/S220/Picture+5.png'/></author><thr:total>0</thr:total></entry></feed>
