Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore multiline comment blocks in JavaScript #2

Merged
1 commit merged into from
Oct 12, 2010

Conversation

brandonaaron
Copy link
Contributor

Often JavaScript has multiline comment blocks at the top of the file which will throw off the indentation detection. Adding JavaScript to the ignore comment code.

idbrii added a commit to idbrii/detectindent that referenced this pull request Feb 25, 2015
Always set softtabstop. This is more consistent with previous behavior
and from reading the softtabstop help seems to make more sense that we
set all of these values to the same thing.

In the case where we find both tabs and spaces, now we set expandtab as
described in ciaranm#2:

	2. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use
	   'expandtab'.  This way you will always insert spaces.  The
	   formatting will never be messed up when 'tabstop' is changed.

Alternatively, we could follow ciaranm#1 and set tabstop=8 (instead of
guessing) and use noexpandtab:

	1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4
	   (or 3 or whatever you prefer) and use 'noexpandtab'.  Then Vim
	   will use a mix of tabs and spaces, but typing <Tab> and <BS> will
	   behave like a tab appears every 4 (or 3) characters.

That's what vim-sleuth does, so why copy their recipe? Guessing is
probably more useful to users.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant