From b87948d4b61d72d89eb568011448eaefdb78d3f4 Mon Sep 17 00:00:00 2001 From: ponkio-o <29038315+ponkio-o@users.noreply.github.com> Date: Thu, 27 Apr 2023 00:03:10 +0900 Subject: [PATCH] chore: format --- autoload/nerdcommenter.vim | 24 ++++++++++++------------ doc/nerdcommenter.txt | 30 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/autoload/nerdcommenter.vim b/autoload/nerdcommenter.vim index 50758ae..2382e3e 100644 --- a/autoload/nerdcommenter.vim +++ b/autoload/nerdcommenter.vim @@ -1309,7 +1309,7 @@ endfunction " Function: nerdcommenter#IsCharCommented(line, col) abort " Check if the character at [line, col] is inside a comment " Note the Comment delimeter it self is considered as part of the comment -" +" " Args: " -line the line number of the character " -col the column number of the character @@ -1317,7 +1317,7 @@ endfunction function! nerdcommenter#IsCharCommented(line, col) abort " Function: s:searchfor(str, line, col, direction, [maxline]) " search str in the buffer, including the character at [line, col] - " Args: + " Args: " -str: the string for search " -line: the line number where search begins " -col: the column number where search begins @@ -1385,14 +1385,14 @@ function! nerdcommenter#IsCharCommented(line, col) abort let leftpos = s:searchfor(a:left, a:line, a:col, 1) if leftpos == [0, 0] if !blockcommented | let blockcommented = 0 | endif - else + else " call s:searchfor(a:right, a:line, a:col, 0) let rightpos = s:searchfor(a:right, leftpos[0], leftpos[1] + strlen(a:right) + 1, 0) if rightpos != [0, 0] if rightpos[0] < a:line if !blockcommented | let blockcommented = 0 | endif elseif rightpos[0] == a:line - if !blockcommented + if !blockcommented let blockcommented = (rightpos[1] + strlen(a:right) > a:col) ? 1 : 0 endif else " rightpos > a:line @@ -1406,14 +1406,14 @@ function! nerdcommenter#IsCharCommented(line, col) abort return linecommented || blockcommented endfunction return s:checkwith( - \ b:NERDCommenterDelims['left'], - \ b:NERDCommenterDelims['right'], - \ a:line, - \ a:col) || + \ b:NERDCommenterDelims['left'], + \ b:NERDCommenterDelims['right'], + \ a:line, + \ a:col) || \ s:checkwith( - \ b:NERDCommenterDelims['leftAlt'], - \ b:NERDCommenterDelims['rightAlt'], - \ a:line, + \ b:NERDCommenterDelims['leftAlt'], + \ b:NERDCommenterDelims['rightAlt'], + \ a:line, \ a:col) endfunction @@ -2528,7 +2528,7 @@ function! s:IsDelimValid(delimiter, delIndx, line) abort "vim comments are so fucking stupid!! Why the hell do they have comment "delimiters that are used elsewhere in the syntax?!?! We need to check - "some conditions especially for vim. + "some conditions especially for vim. "Also check &commentstring because it may be overwritten for embedded lua. if &filetype ==# 'vim' && &commentstring[0] ==# '"' if !s:IsNumEven(s:CountNonESCedOccurances(preComStr, '"', "\\")) diff --git a/doc/nerdcommenter.txt b/doc/nerdcommenter.txt index fc417c6..626d4da 100644 --- a/doc/nerdcommenter.txt +++ b/doc/nerdcommenter.txt @@ -66,7 +66,7 @@ creates a namespace so that custom commands don't interfere with Vim's built-in shortcuts. The leader key can be mapped to whatever the user likes (see :help mapleader). -In the definition of custom commands || is the placeholder for the +In the definition of custom commands || is the placeholder for the leader key. To see the current mapping for || type :echo mapleader. If it reports an undefined variable it means the leader key is set to the default of '\'. @@ -464,38 +464,38 @@ change the filetype back: > |'NERDCustomDelimiters'| Add or override delimiters for any filetypes. - + |'NERDDefaultNesting'| Tells the script to use nested comments by default. - + |'NERDMenuMode'| Specifies how the NERD commenter menu will appear (if at all). - + |'NERDLPlace'| Specifies what to use as the left delimiter placeholder when nesting comments. - + |'NERDUsePlaceHolders'| Specifies which filetypes may use placeholders when nesting comments. - + |'NERDRemoveAltComs'| Tells the script whether to remove alternative comment delimiters when uncommenting. - + |'NERDRemoveExtraSpaces'| Tells the script to always remove the extra spaces when uncommenting (regardless of whether NERDSpaceDelims is set). - + |'NERDRPlace'| Specifies what to use as the right delimiter placeholder when nesting comments. - + |'NERDSpaceDelims'| Specifies whether to add extra spaces around delimiters when commenting, and whether to remove them when uncommenting. - + |'NERDTrimTrailingWhitespace'| Specifies if trailing whitespace should be deleted when uncommenting. @@ -506,7 +506,7 @@ change the filetype back: > one of 'none', 'left', 'start', or 'both'. -|'NERDToggleCheckAllLines'| Enable NERDCommenterToggle to check +|'NERDToggleCheckAllLines'| Enable NERDCommenterToggle to check all selected lines is commented or not. ------------------------------------------------------------------------------ @@ -826,7 +826,7 @@ again. Values: 0 or 1. Default 0. -When this option is set to 1, NERDCommenterToggle will check all selected line, +When this option is set to 1, NERDCommenterToggle will check all selected line, if there have oneline not be commented, then comment all lines. ------------------------------------------------------------------------------ @@ -901,15 +901,15 @@ NERDComment({mode}, {type}) *NERDComment()* {mode}: character indicating the mode in which the comment is requested: 'n' for Normal mode, 'x' for Visual mode - {type}: the type of commenting requested. Can be 'Sexy', - 'Invert', 'Minimal', 'Toggle', 'AlignLeft', + {type}: the type of commenting requested. Can be 'Sexy', + 'Invert', 'Minimal', 'Toggle', 'AlignLeft', 'AlignBoth', 'Comment', 'Nested', 'ToEOL', 'Append', 'Insert', 'Uncomment', 'Yank' NERDCommentIsCharCommented({line}, {col}) *NERDCommentIsCharCommented()* Check if the character at [{line}, {col}] is inside a comment - Note the Comment delimeter it self is considered as part of the + Note the Comment delimeter it self is considered as part of the comment Args: