mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 09:53:47 -05:00
Compare commits
3 Commits
b4a57a0b4f
...
7361e41811
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7361e41811 | ||
|
|
66c07e4083 | ||
|
|
c7c99edfb7 |
@@ -421,6 +421,7 @@ let s:delimiterMap = {
|
|||||||
\ 'txt2tags': { 'left': '%' },
|
\ 'txt2tags': { 'left': '%' },
|
||||||
\ 'typescript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'typescript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
\ 'typescriptreact': { 'left': '//', 'leftAlt': '{/*', 'rightAlt': '*/}' },
|
\ 'typescriptreact': { 'left': '//', 'leftAlt': '{/*', 'rightAlt': '*/}' },
|
||||||
|
\ 'typst': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
\ 'uc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'uc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
\ 'uc4': { 'left': '!' },
|
\ 'uc4': { 'left': '!' },
|
||||||
\ 'uil': { 'left': '!' },
|
\ 'uil': { 'left': '!' },
|
||||||
@@ -665,7 +666,7 @@ function! s:CommentBlock(top, bottom, lSide, rSide, forceNested) abort
|
|||||||
"alternative delimiters (if THEY are) as the comment will be better and more
|
"alternative delimiters (if THEY are) as the comment will be better and more
|
||||||
"accurate with multipart delimiters
|
"accurate with multipart delimiters
|
||||||
let switchedDelims = 0
|
let switchedDelims = 0
|
||||||
if !s:Multipart() && g:NERDAllowAnyVisualDelims && s:AltMultipart()
|
if !s:Multipart() && !g:NERDAllowAnyVisualDelims && s:AltMultipart()
|
||||||
let switchedDelims = 1
|
let switchedDelims = 1
|
||||||
call nerdcommenter#SwitchToAlternativeDelimiters(0)
|
call nerdcommenter#SwitchToAlternativeDelimiters(0)
|
||||||
endif
|
endif
|
||||||
@@ -1082,7 +1083,7 @@ function! s:CommentRegion(topLine, topCol, bottomLine, bottomCol, forceNested) a
|
|||||||
|
|
||||||
"switch delimiters (if we can) if the current set isn't multipart
|
"switch delimiters (if we can) if the current set isn't multipart
|
||||||
let switchedDelims = 0
|
let switchedDelims = 0
|
||||||
if !s:Multipart() && s:AltMultipart() && g:NERDAllowAnyVisualDelims
|
if !s:Multipart() && s:AltMultipart() && !g:NERDAllowAnyVisualDelims
|
||||||
let switchedDelims = 1
|
let switchedDelims = 1
|
||||||
call nerdcommenter#SwitchToAlternativeDelimiters(0)
|
call nerdcommenter#SwitchToAlternativeDelimiters(0)
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user