Z Space Blog

your source for Game Z

Posts tagged Vim. Subscribe?

Page 1 of 1

Vim Author Bram Moolenaar Has Died

I woke up to a huge gut punch this morning: Bram Moolenaar, legendary author of the Vim text editor, has passed away. Given the occasion, I want to express some thoughts regarding both Bram and his software. Without his work, I'm not sure I would be the same person.

Read more...

Easy diffing with Vim

Vim has good support for showing the differences between two (or three) files with either the vimdiff command or setting up a diff session manually. This often requires opening the files in their own window panes, then using :diffthis in all the relevant files. If you're in the middle of an editing session, stopping to set up this diff session can cause you to lose focus. I wrote a function in my vimrc that automates this process, so the user can focus on making decisions instead of building their UI or some other flow-breaking process.

Read more...

Counting Lines of Code in Vim

Vim is a wonderfully extensible text editor. I use it to work with all sorts of text. While I was browsing reddit, I saw a thread asking for a way to prevent :number from counting blank lines. I checked it out to see if there were any cool answers. None of what I saw were adequate. For instance, :%s/\S\+//n makes every match highlight, clobbering the last text that was searched for. I figured it was time for me to learn a little more about Vimscript, and so I wrote a function that will tell you how many actual lines of code are in your file:

Read more...

Page 1 of 1