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

Continuations of multiline comments are incorrectly indented #19

Closed
nornagon opened this issue Jun 9, 2011 · 3 comments
Closed

Continuations of multiline comments are incorrectly indented #19

nornagon opened this issue Jun 9, 2011 · 3 comments

Comments

@nornagon
Copy link

nornagon commented Jun 9, 2011

If you type a /*, then press enter, the * to mark continuation is indented to match the /, not the *.

Desired behaviour:

/* some text<CR>
 *

Actual behaviour:

/* some text<CR>
*
@nornagon
Copy link
Author

nornagon commented Jun 9, 2011

Fixed by this diff, though not sure what it breaks:

diff --git a/indent/javascript.vim b/indent/javascript.vim
index 22893fe..b34deee 100644
--- a/indent/javascript.vim
+++ b/indent/javascript.vim
@@ -39,7 +39,7 @@ let s:syng_strcom = 'javaScript\%(String\|RegexpString\|CommentTodo\|LineComment
 let s:syng_string = 'javaScript\%(RegexpString\)'
 
 " Regex of syntax group names that are strings or documentation.
-let s:syng_stringdoc = 'javaScriptDocComment'
+let s:syng_stringdoc = 'javaScriptDocComment\|javaScriptComment'
 
 " Expression used to check whether we should skip a match with searchpair().
 let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"

@e0da
Copy link

e0da commented Jan 26, 2012

@nornagon you don't know how happy this patch makes me. Thank you, thank you, a thousand times thank you.

@nornagon
Copy link
Author

@sidewaysmilk I'm glad you appreciate it :D

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

No branches or pull requests

3 participants