Does anyone have her vim setting that uses hard tabs as indentation but uses spaces for alignment? The problem is that when starting the continuation line, as in
if (condition1 && (anotherlongcondition || |-------|------- whatever
then cin
(which is necessary for me) adds some tuning as I prefer positionally , but this alignment is created using as many hard tabs as possible and filling the rest with spaces (as I tried to render).
So, in short, cin
doesn't really highlight indentation and alignment . I would really like all the added alignment in the example above to be spaces. Thus, the alignment will be saved correctly when temporarily switching ts
.
To clarify this again, I would like to write the following code without pressing <TAB>
or <SPACE>
before the first non-empty character on any line (and without performing any manual switching or anything else):
void foo(int bar) { |-------somestatement; |-------if (somecondition && (someothercondition || |------- whatevercomesnext)) |-------|-------dosomething; }
I already tried ctab.vim
, but it focuses on editing the alignment line with soft tabs, which seems silly to me, because manual alignment is a task that provides a 1-step refinement rather than a step width step. I have not changed the way cin
uses mixed tabs and spaces for alignment.
I could not find any built-in way to do this. Maybe one more? In any case, I doubt that there is a plugin. Although, I admittedly, I am not a vim-script myself and, perhaps, do not have enough experience, I must say that most of the plugins that I tried only spoiled my editor configuration ...
Jo so
source share