Archive for July, 2011

h1

The Clean Coder

July 15, 2011

Just finished Bob Martin’s book, The Clean Coder. Excellent guide to professionalism in the Software Engineering industry. I highly recommend it.

http://www.amazon.co.uk/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073

h1

Stop vim replicating comments on a new line

July 4, 2011

I use vim for programming on Mac OSX. The version of vim has problem sharing clipboard with the mac so I don’t seem to be able to yank to the system clipboard or paste from the system clipboard.

I can paste using the usual cmd+v in insert mode but this types the contents of the system clipboard into VIM. what this means is that when I paste a line of comment in followed by lines of code, the code is commented out as VIM helpfully continues comments on the next line.

To stop vim doing this before a paste from the system clipboard, first issue the VIM command:

:set fo=cqt

To set Vim back into its previous new line continue commenting state use

:set fo=crqt