Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Andy Wokula
2017-03-31 21:13:38 +02:00
2 changed files with 9 additions and 5 deletions

View File

@@ -151,7 +151,7 @@ let s:delimiterMap = {
\ 'eiffel': { 'left': '--' },
\ 'elf': { 'left': "'" },
\ 'elixir': { 'left': '#' },
\ 'elm': { 'left': '--' },
\ 'elm': { 'left': '--', 'leftAlt': '{--', 'rightAlt': '--}' },
\ 'elmfilt': { 'left': '#' },
\ 'ember-script': { 'left': '#' },
\ 'emblem': { 'left': '/' },
@@ -185,6 +185,7 @@ let s:delimiterMap = {
\ 'gentoo-package-use': { 'left': '#' },
\ 'gitcommit': { 'left': '#' },
\ 'gitconfig': { 'left': ';' },
\ 'gitignore': { 'left': '#' },
\ 'gitrebase': { 'left': '#' },
\ 'gnuplot': { 'left': '#' },
\ 'go': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
@@ -262,6 +263,7 @@ let s:delimiterMap = {
\ 'master': { 'left': '$' },
\ 'matlab': { 'left': '%', 'leftAlt': '%{', 'rightAlt': '%}' },
\ 'mel': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
\ 'meson': { 'left': '#' },
\ 'mib': { 'left': '--' },
\ 'mips': { 'left': '#'},
\ 'mirah': {'left': '#'},
@@ -363,6 +365,7 @@ let s:delimiterMap = {
\ 'sgmldecl': { 'left': '--', 'right': '--' },
\ 'sgmllnx': { 'left': '<!--', 'right': '-->' },
\ 'sh': { 'left': '#' },
\ 'shader_test': { 'left': '#' },
\ 'sicad': { 'left': '*' },
\ 'sile': { 'left': '%' },
\ 'simula': { 'left': '%', 'leftAlt': '--' },
@@ -614,7 +617,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
@@ -1387,7 +1390,7 @@ function s:RemoveDelimiters(left, right, line)
"if the user has specified that there is a space before the right delimiter
"then check for the space and remove it if it is there
if delimsSpaced && strpart(line, rightIndx-s:lenSpaceStr, s:lenSpaceStr) == s:spaceStr && s:Multipart()
if delimsSpaced && strpart(line, rightIndx-s:lenSpaceStr, s:lenSpaceStr) == s:spaceStr && (s:Multipart() || s:AltMultipart())
let line = strpart(line, 0, rightIndx-s:lenSpaceStr) . strpart(line, rightIndx)
endif
endif
@@ -1409,7 +1412,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
@@ -1614,7 +1617,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)

View File

@@ -1093,6 +1093,7 @@ Simon Hengel htmlcheetah
Matt Tolton javacc
Ivan Devat javascript.jquery
tpope cucumber,pdf
Lyude Paul piglit shader_test
==============================================================================
10. License *NERDComLicense*