Paolo Donadeo — LifeLOG

All about my life, job and thoughts
  • rss
  • Home
  • Blog
  • Contacts
    • GPG public key
    • Alessandro Donadeo — Curriculum Vitæ

Vim syntax highlighting for GIT and Cogito

Paolo | 20/10/2007 | 1:08

If you use GIT or Cogito like I do every day, you might find useful to have the commit messages highlighted inside Vim (of course I assume you use Vim :-) ).

First of all, copy these two syntax file into your ~/.vim/syntax/ directory:

  • Vim syntax file for Cogito
  • Vim syntax file for GIT

Then add these two lines in your ~/.vimrc:
au BufNewFile,BufRead /tmp/gitci* setlocal textwidth=75 fileencoding=utf-8 encoding=utf-8 filetype=cogito
au BufNewFile,BufRead COMMIT_EDITMSG setlocal textwidth=75 fileencoding=utf-8 encoding=utf-8 filetype=gitcommit

This will load the correct syntax file and set the encoding of the message to UTF-8, which is the recommended encoding for GIT commit messages.

That’s all.

Comments
Comments Off
Categories
Editors, English, Tips
Comments rss Comments rss
Trackback Trackback

No software patents!

stopsoftwarepatents.eu petition banner

Facets (like tags, but better)

Article Books Chillout Cinema Computer programming Digital life Editors Essay Information retrieval Internet Job Karate Librarianship Life Linux Music News Nu-jazz Objective Caml Photography PHP Politics Python Random thoughts Review Science fiction South American literature Spare time Tips Visual arts Writing

Recent Posts

  • Avatar
  • Mike: preferisco ricordarlo così
  • PyCon3
  • La somma dei giorni
  • I see angels…
  • This man doesn’t speak in my name!
  • Vals Im Bashir

Site map

  • Home
  • Blog
  • Contacts
    • GPG public key
    • Alessandro Donadeo — Curriculum Vitæ

Old posts

Blogroll

  • Alex
  • Andrea
  • Anna on MySpace
  • Benji
  • Dome
  • Gigi
  • Ilaria
  • kOoLiNuS’s blog (English)
  • kOoLiNuS’s blog (italian)
  • Le ricette del secco
  • Roberto Gastaldi
  • Tommaso Carullo

Make me a present…

My Amazon.com Wish List
My Hoepli.it Wish List
My Hoepli.it Wish List

La mia libreria

Administration

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
rss Comments rss valid xhtml 1.1 Viewable With Any Browser design by jide