I once wrote a quick note
(or Vim and Vala) and the use of the Tag List plugin
. Here is a clean post about these two beasts.
Vim — probably the best editor out there, at least always after trying out different editors I end up with Vim — has great plugins. However there is a lack of support for the Vala language. So here are two basic add-ins to include in the Vim editor.
First there is no syntax color for this language. A quick fix is to use the C# syntax with the command :set filetype=cs
. That works but is not ideal, ideal is to install a vim.syntax
file, and there is one available on this GNOME Live! page
First download the file from this page
and save it under ~/.vim/syntax
. Next at the following lines to your ~/.vimrc
au! BufRead,BufNewFile *.vala,*.vapi setfiletype vala
autocmd BufRead *.vala,*.vapi set tw=100 efm=%f:%1.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
Tag List is a powerful plugin that lets you explore classes or functions from a source file, also called a source code browser. The installation steps
are simple, they are also available bellow, and again to get it working with Vim there is a small hack to include inside the ~/.vimrc
First download the latest version of taglist from this page
. Than uncompress the archive with, for example, the command line:
unzip -x taglist_45.zip -d $HOME/.vim/
Than go inside ~/.vim/doc
, run Vim and inside Vim execute the command :helptags .
Finally add the following lines inside ~/.vimrc
" Work-around Tag List for Vala
Now Vim is ready for Vala, and it's possible to browse source code by typing the command :TListToggle
|Vim Vala Tag List|