Friday, May 24, 2013

Re: indenting contnued line

On Friday, May 24, 2013 7:03:34 PM UTC-5, rudrab wrote:
> Hello friends,
> for a continued line, say, in C,
> void some_function(argument1,
> more_arg)
>
> is the natural behavior of vim (with my current vimrc).
> I want it to be like
> void some_function(argument1,
> more_arg)
>
> i.e. when I press enter after reaching the end of first line, cursor should come to the suitable position, rather then first column.
>
> This will happen if my argument list is longer, and if I manually shift the 2nd line at the position I like, third line will come directly below it. But 2nd line has to be shifted manually.
> Whats more, using autoindent (shift+G+=+G) will also shift them bact to column 1.
> any solution?

Try turning on filetype-based indentation.

Near the top of your .vimrc, put:

filetype indent on

or

filetype indent plugin on

http://vim.wikia.com/wiki/Indenting_source_code#Methods_for_automatic_indentation

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: