Re: [Vala] [OT] indentation config for vim/emacs
- From: Xavier Bestel <xavier bestel free fr>
- To: Stian Selnes <stian selnes gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] [OT] indentation config for vim/emacs
- Date: Thu, 26 Feb 2009 09:37:29 +0100
On Thu, 2009-02-26 at 09:30 +0100, Xavier Bestel wrote:
On Wed, 2009-02-25 at 21:50 +0100, Stian Selnes wrote:
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.
That's exactly what I was looking for. Thanks a lot Stian !
Now I just have to find the equivalent for Vim, and that'd be perfect.
Your blog's title is a neat google criteria:
http://www.nabble.com/Indent-with-tabs,-align-with-spaces-td21135245.html
Xav
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]