pangloss / vim-javascript

Vastly improved Javascript indentation and syntax support in Vim.
http://www.vim.org/scripts/script.php?script_id=4452
3.8k stars 358 forks source link

Indentation w/ cino=(0 differs when et vs. noet #892

Closed tvenable-mie closed 7 years ago

tvenable-mie commented 7 years ago

Using these settings - :set ts=2 sw=2 et cino=(0 This example is indented like this, which is correct (note eight spaces at the start):

        if (one
            && two) {
        }

Now use tabs to indent, change spaces to tabs, and go to line 2 - :set noet | retab! | 2 Reindent that line with == and the file becomes:

                if (one
                && two) {
                }

The indentation should be like it was in the first example (aside from every two spaces should be a tab instead).

Thanks for looking!

bounceme commented 7 years ago

I think you're setting tabstop is the issue. Just found out that that is a problem

bounceme commented 7 years ago

what version of vim do you use?

bounceme commented 7 years ago

https://github.com/vim/vim/issues/1581