mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 09:53:47 -05:00
Merge pull request #155 from saep/master
Implement functionality to chose the alternative comment style
This commit is contained in:
@@ -514,6 +514,12 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
||||
let b:NERDCommenterDelims[i] = 0
|
||||
endif
|
||||
endfor
|
||||
" if g:NERD_<filetype>_alt_style is defined, use the alternate style
|
||||
let b:NERDCommenterFirstInit = getbufvar(1,"NERDCommenterFirstInit",0)
|
||||
if exists('g:NERD_'.ft.'_alt_style') && eval('g:NERD_'.ft.'_alt_style') && !b:NERDCommenterFirstInit
|
||||
call s:SwitchToAlternativeDelimiters(0)
|
||||
let b:NERDCommenterFirstInit = 1
|
||||
endif
|
||||
else
|
||||
let b:NERDCommenterDelims = s:CreateDelimMapFromCms()
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user