Gangmax Blog

自由之思想,独立之精神

Clojure Syntax Highlight in Vim and Gedit

| Comments

From here and here.

vim

  1. Download the “VimClojure” plugin from here;

  2. Unzip the package zip file to your “~/.vim/”;

  3. Make sure you have the following lines into your “~/.vimrc” file:

1
2
syntax on
filetype plugin indent on
  1. Now open a clojure file in vim and you will see the syntax highlight.

gedit

  1. Clone the “clojure_for_gedit” project from GitHub;

  2. Run the “install.sh” script or the commands below(for my Ubuntu 12.04 specifically):

1
2
3
4
sudo cp clojure.lang /usr/share/gtksourceview-3.0/language-specs/clojure.lang
sudo cp clojure.xml /usr/share/mime/packages/clojure.xml
cd /usr/share/
sudo update-mime-database mime
  1. Open gedit again and you will see the Clojure syntax highlight.

Comments