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.

Share this page
Subscribedel.icio.usRedditTechnorati
Categories
Editors, English, Tips
Comments rss
Comments rss
Trackback
Trackback

« Penguin visual effects Tagging is not the right way »

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Administration

  • Log in
  • Entries RSS
  • Comments RSS

Search with Google

Facets (like tags, but better)

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

Facets hierarchy

Site map

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

RSS Recent links on del.icio.us

  • nautilussvn - Google Code
  • Apache CouchDB: The CouchDB Project
  • Creating a Progress Bar Using CSS and JavaScript
  • MooCrop: Mootools 1.2 Image Cropping
  • OCamlP3l
  • 10 Useful Techniques To Improve Your User Interface Designs
  • on facebook and graphology

RSS Interesting News

  • Putting OCaml's type system to work: Writing statically-checked XML [PDF]programming: what's new online
  • L'inadatto presidenteAntonio Di Pietro
  • Unemployment fears worry GermansBBC News | Europe | World Edition
  • on facebook and graphologyi'm in a hurry - stefano zacchiroli blog
  • Comic for December 14, 2008Dilbert Daily Strip
  • Fast PDF viewing right in your browserGmail Blog
  • Abruzzo: un modello virtuosoAntonio Di Pietro

My Last.Fm

Recent Posts

  • Si riparte…
  • Draw something on the screen… and interact with it!
  • Ascoltare Radio Monte Carlo… con Linux
  • Holiday!
  • Vacanze!
  • Ritardo Cronico
  • PyCon Due

Old posts

  • September 2008 (2)
  • August 2008 (1)
  • July 2008 (2)
  • June 2008 (1)
  • May 2008 (1)
  • April 2008 (2)
  • March 2008 (1)
  • January 2008 (4)
  • November 2007 (2)
  • October 2007 (6)
  • August 2007 (2)

Blogroll

  • Alex
  • Andrea
  • 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
rss Comments rss valid xhtml 1.1 Viewable With Any Browser design by jide