Friday, June 24, 2011

Re: indentation based on a file type

On Jun 24, 1:01 pm, cyboman <rail.shafigu...@gmail.com> wrote:
> i found solutions online on how to do indentation based on a filetype
> however none of them worked except the last one. i would really
> appreciate if someone could explain to me what was i doing wrong.
>

If all you want to do is set the shiftwidth/tabstop then you can put
those commands in your filtetype plugin's main file, for yours
presumably in the /ftplugin/mine.vim file. That file will be sourced
each time a file has its filetype set to 'mine'.

If you want to do more complicated indenting based on the syntax in
your filetype's files, then you should make a file with indent rules
and place it in the /indent directory. See :h indent-txt for more
info on the more complicated indent settings.

-- Herb Sitz

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: