[prev in list] [next in list] [prev in thread] [next in thread]
List: vim
Subject: Re: Managing autoindent, filtypes, and tabs for html or java files.
From: "Antoine J. Mechelynck" <antoine.mechelynck () belgacom ! net>
Date: 2005-02-18 1:26:19
Message-ID: 4215443B.2010900 () belgacom ! net
[Download RAW message or body]
Keith Roberts wrote:
>>-----Original Message-----
>>From: Eddine [mailto:eddine777@yahoo.fr]
>>Sent: Wednesday, February 09, 2005 2:08 AM
>>To: vim@vim.org
>>Subject: Managing autoindent, filtypes, and tabs for html or
>>java files.
>>
>>I'm no longer used with the way how Vim manage autoindenting
>>since the filetype function has been added.
>>When I write HTML or Java, I just want to have the autoindent
>>basic function plus a tab equals to 3 spaces, and if I press
>>backspace (after inserting a tab) just once it would also
>>erase those 3 spaces at the same time.
>>Is there a way to do that by setting some options in my rc file.
>>I tried to do that with those settings :
>>autocmd BufNewfile,BufRead *.java set expandtab
>>autocmd BufNewfile,BufRead *.java set tabstop=3
>>
>>But Vim keeps ignoring them, due to the ftplugin which I can't disable.
>>Can someone give me clues ?
>
>
> You should be able to do this with one autocmd, but you probably need to
> change more than 'ts'. Try:
>
> autocmd BufNewfile,BufRead *.java set et ts=3 sts=3 sw=3
>
> -Keith
>
>
>
>
>
You can add your own ftplugin instead, see ":help after-directory". The
following overrides any possible "standard ftplugin" settings for those
same options while leaving the rest of the ftplugin unchanged:
>>>>> ~/.vim/after/ftplugin/java.vim [Unix]
>>>>> ~/vimfiles/after/ftplugin/java.vim [Windows]
set expandtab tabstop=3 softtabstop=3 shiftwidth=3
<<<<< end
HTH,
Tony.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic