My .vimrc

Andrew Woods
Andrew Woods
https://andrewwoods.net/blog/2011/my-vimrc/

One of my main text editors is vim, which comes pre-installed on every mac and linux distro. It can be a pain to create a .vimrc file, so i thought i’d share mine with you. I’m a web developer that writes mostly php, so I’ve a couple of tricks at the bottom to help with things i do a lot.

One thing is commenting my code. Sometimes I want to write a comment on a single line but use the /* and */ syntax. This works for both PHP and CSS.
When I’m in insert mode, I’ll go a new line and type scom. I have an abbreviation set up that writes the comment characters AND moves the cursor back a few characters, so I can type the text of the comment. Pretty cool, eh?

You can download my vimrc file. It should be put into your $HOME directory and renamed to .vimrc.

Sorry, but comments are closed. I hope you enjoyed the article