On 15/03/14 22:44, Ingo Karkat wrote:
I think you're looking for
:set preserveindent copyindent
-- regards, ingo
I tried both flags as you suggested. My original problem disappears but
a new problem appears. Actually, the "preserveindent" option seems to be
very strange in its behaviour.
Here was the original text. I highlighted it and press SHIFT + '>':
TAB>sprintf(szSomeVariable,
TAB>........"Some text %i, %i, %i, %i\n",
TAB>........some_very_long_expression_that_takes_up_most_of_the_line_#1,
TAB>........some_very_long_expression_that_takes_up_most_of_the_line_#2,
TAB>........some_very_long_expression_that_takes_up_most_of_the_line_#3,
TAB>........some_very_long_expression_that_takes_up_most_of_the_line_#4);
Here's what I wanted:
TAB>TAB>sprintf(szSomeVariable,
TAB>TAB>........"Some text %i, %i, %i, %i\n",
TAB>TAB>........some_very_long_expression_that_takes_up_most_of_the_line_#1,
TAB>TAB>........some_very_long_expression_that_takes_up_most_of_the_line_#2,
TAB>TAB>........some_very_long_expression_that_takes_up_most_of_the_line_#3,
TAB>TAB>........some_very_long_expression_that_takes_up_most_of_the_line_#4);
Instead, this is what "preserveindent" gave me:
TAB>sprintf(szSomeVariable,
........TAB>"Some text %i, %i, %i, %i\n",
........TAB>some_very_long_expression_that_takes_up_most_of_the_line_#1,
........TAB>some_very_long_expression_that_takes_up_most_of_the_line_#2,
........TAB>some_very_long_expression_that_takes_up_most_of_the_line_#3,
........TAB>some_very_long_expression_that_takes_up_most_of_the_line_#4);
This is completely not what I was expecting. It preserved the whitespace
Ok, however the tab was inserted not at the beginning of the line before
the whitespace as it should be, but *after* the whitespace.
Is this a bug?
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.