We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e9424d commit 75d9087Copy full SHA for 75d9087
1 file changed
indent/javascript.vim
@@ -443,11 +443,17 @@ function! Fixedgq(lnum, count)
443
let l:tw = &tw ? &tw : 80;
444
445
let l:count = a:count
446
+ let l:first_char = indent(a:lnum) + 1
447
448
if mode() == 'i' " gq was not pressed, but tw was set
449
return 1
450
endif
451
452
+ " This gq is only meant to do code with strings, not comments
453
+ if s:IsLineComment(a:lnum, l:first_char) || s:IsInMultilineComment(a:lnum, l:first_char)
454
+ return 1
455
+ endif
456
+
457
if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq
458
459
0 commit comments