Re: [Vala] [OT] indentation config for vim/emacs
- From: Stian Selnes <stian selnes gmail com>
- To: Xavier Bestel <xavier bestel free fr>
- Cc: vala-list gnome org
- Subject: Re: [Vala] [OT] indentation config for vim/emacs
- Date: Wed, 25 Feb 2009 21:50:42 +0100
Google didn't help me either, so I ended up writing some code for
Emacs that enables indentation and line continuation the way I want it
to. If I understand you correctly this might be what you're looking
for. There is a screenshot at
http://stianse.wordpress.com/2008/11/17/indent-with-tabs-align-with-spaces/
you can look at and decide before going through the setup of Emacs. I
wrote it with C code in mind, but it seems to work for Vala as well if
you set up the Vala-mode as described at
http://live.gnome.org/Vala/Emacs.
Just put the code listed at
http://stianse.wordpress.com/2008/11/17/indent-with-tabs-align-with-spaces/
in your .emacs file. To enable it for Vala-mode, put for instance the
following in .emacs:
(defun vala-indentation-setup ()
(setq c-special-indent-hook nil)
(add-hook 'c-special-indent-hook 'c-indent-align-with-spaces-hook))
(add-hook 'vala-mode-hook 'vala-indentation-setup)
Hope it's what you're looking for.
- Stian
On Wed, Feb 25, 2009 at 10:02, Xavier Bestel <xavier bestel free fr> wrote:
Hi,
AFAICS Vala code is indented by tabs + space (tabs for proper
indentation, spaces for line continuation). That's fine by me.
Now, does anyone know how to configure Vim and Emacs for this
indentation style ? My google-fu seems to be lacking here.
Thanks,
Xav
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]