Monthly Archives: March 2010

vim folding

A concise article on Linux.com (that I keep referring back to) about vim folding. I’ve been using vi/vim for years and vi keystrokes just “happen”, but it’s always nice to learn a few more tricks, especially when working with larger scripts.

A brief summary of folding:

  • highlight some text using v visual mode, zf to fold, zo to unfold (ie open)
  • put cursor on an opening curly bracket, and  zfa} to fold until closing curly bracket (or zfa) or zfa] for parentheses, square brackets)
  • add this to your .vimrc to remember folds:
au BufWinLeave * mkview
au BufWinEnter * silent loadview

Lots more commands in the article.

BJJ Black Eye

I’m sporting a nice black eye at the moment from BJJ. It’s not actually one black eye but three, all received in the last week. The first one was a jab in the eye at the Victorian (Australia) state competition last week (which I won). Then a few days later Eric (the feisty Judo black belt I like to tangle with) accidentally elbowed me – instant shiner. Then the following day Eleni accidentally scratched the same eye – ouch! I haven’t copped a black eye for years, so I must be doing something different. Hmmm….

It’s the start of Autumn here, so we’re back to more gi than no-gi training. A battle getting back into a gi, with the heat and humidity. Yesterday it was 29C (80F) with 80% humidity – erk. Our instructor (Daniel Sainty) is usually fairly strict about drink breaks, but last night he was positively encouraging us to drink water – four breaks in all during the two hours of training. But it’s hard living in paradise (Sydney, Australia) – clear skies, beaches, surf, good food from over 100 cultures, handsome Brazilian tourists and immigrants everywhere :-)

(Thanks to Gui Neves for the photo).