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

Add multi-line comments for Elm #283

Merged
merged 1 commit into from
Feb 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugin/NERD_commenter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ let s:delimiterMap = {
\ 'eiffel': { 'left': '--' },
\ 'elf': { 'left': "'" },
\ 'elixir': { 'left': '#' },
\ 'elm': { 'left': '--' },
\ 'elm': { 'left': '--', 'leftAlt': '{--', 'rightAlt': '--}' },
\ 'elmfilt': { 'left': '#' },
\ 'ember-script': { 'left': '#' },
\ 'emblem': { 'left': '/' },
Expand Down Expand Up @@ -622,7 +622,7 @@ function s:AppendCommentToLine()

"stick the delimiters down at the end of the line. We have to format the
"comment with spaces as appropriate
execute ":normal! " . insOrApp . (isLineEmpty ? '' : ' ') . left . right
execute ":normal! " . insOrApp . (isLineEmpty ? '' : ' ') . left . right

" if there is a right delimiter then we gotta move the cursor left
" by the length of the right delimiter so we insert between the delimiters
Expand Down Expand Up @@ -1417,7 +1417,7 @@ function s:SetupStateBeforeLineComment(topLine, bottomLine)
let state = {'foldmethod' : &foldmethod,
\'ignorecase' : &ignorecase}

" Vim's foldmethods are evaluated every time we use 'setline', which can
" Vim's foldmethods are evaluated every time we use 'setline', which can
" make commenting wide ranges of lines VERY slow. We'll change it to
" manual, do the commenting stuff and recover it later. To avoid slowing
" down commenting few lines, we avoid doing this for ranges smaller than
Expand Down Expand Up @@ -1622,7 +1622,7 @@ function s:UncommentLinesSexy(topline, bottomline)
let theLine = s:SwapOuterPlaceHoldersForMultiPartDelims(theLine)
call setline(bottomline, theLine)
endif

" remove trailing whitespaces for first and last line
if g:NERDTrimTrailingWhitespace == 1
let theLine = getline(a:bottomline)
Expand Down