[Yanel-dev] Vim configuration for Yanel development

Mehmet Birgi mehmet.birgi at wyona.com
Tue Apr 6 14:52:13 CEST 2010


Update: the version with softtabstop (below) doesn't seem to work as
expected, so I have reverted to Guillaume's proposal (using "set
tabstop=3D2"), which seems to work. Next I will document this in our
documentation.

Cheers,

Memo



On Thu, Apr 1, 2010 at 2:34 PM, Mehmet Birgi <mehmet.birgi at wyona.com> wrote:

> Thanks, Guillaume.
>
> I had to make a small adaptation to make it work, because I am using "set
> softtabstop=3DX". Now it seems to work nicely.
>
> Here is the part of my .vimrc concerning tabs:
>
> set autoindent
> set softtabstop=3D2
> set shiftwidth=3D2
> set expandtab
> "indentation for languages using braces for nesting like Java, Javascript,
> CSS. etc.
> au BufNewFile,BufRead *.java,*.js,*.css set softtabstop=3D4 shiftwidth=3D4
>
> Also, there is more information on that subject at
> http://vim.wikia.com/wiki/Indenting_source_code
>
>
>
>
> 2010/4/1 Guillaume D=E9flache <guillaume.deflache at wyona.com>
>
> Hi!
>>
>> AFAIK this is all that is needed to make Vim behave WRT indentation to
>> meet Yanel coding conventions.
>> This is the most safe and straightforward way I found, but it can probab=
ly
>> be done differently/better:
>> ---8<---
>> set expandtab " never add TAB characters
>> set tabstop=3D2 shiftwidth=3D2 " by default indentation is 2, e.g. for H=
TML
>> and XML-based syntaxes like XHTML, XSLT, etc.
>> au BufNewFile,BufRead *.java,*.js,*.css set tabstop=3D4 shiftwidth=3D4 "
>> indentation is 4 for languages using braces for nesting like Java,
>> Javascript, CSS. etc.
>> ---8<---
>>
>> Of course you may want to use an IDE like Eclipse or IntelliJ IntelliJ
>> IDEA instead! :P
>>
>> HTH,
>>   Guillaume
>> --
>> Yanel-development mailing list Yanel-development at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>
>
>
>
> --
> Mehmet Birgi
> www.wyona.com
>
>


-- =

Mehmet Birgi
www.wyona.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010040=
6/e4d12a31/attachment.htm


More information about the Yanel-development mailing list