runtime: Fix typos in various files

closes: #12836

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
This commit is contained in:
Viktor Szépe
2023-08-23 21:20:00 +02:00
committed by Christian Brabandt
parent afe0466fb1
commit 3fc7a7e44a
30 changed files with 47 additions and 47 deletions

View File

@ -15,7 +15,7 @@ setlocal nosmartindent
setlocal noautoindent
setlocal indentexpr=GetNsisIndent(v:lnum)
setlocal indentkeys=!^F,o,O
setlocal indentkeys+==~${Else,=~${EndIf,=~${EndUnless,=~${AndIf,=~${AndUnless,=~${OrIf,=~${OrUnless,=~${Case,=~${Default,=~${EndSelect,=~${EndSwith,=~${Loop,=~${Next,=~${MementoSectionEnd,=~FunctionEnd,=~SectionEnd,=~SectionGroupEnd,=~PageExEnd,0=~!macroend,0=~!if,0=~!else,0=~!endif
setlocal indentkeys+==~${Else,=~${EndIf,=~${EndUnless,=~${AndIf,=~${AndUnless,=~${OrIf,=~${OrUnless,=~${Case,=~${Default,=~${EndSelect,=~${EndSwitch,=~${Loop,=~${Next,=~${MementoSectionEnd,=~FunctionEnd,=~SectionEnd,=~SectionGroupEnd,=~PageExEnd,0=~!macroend,0=~!if,0=~!else,0=~!endif
let b:undo_indent = "setl ai< inde< indk< si<"

View File

@ -327,13 +327,13 @@ endfun
function! FindArrowIndent (lnum) " {{{
let parrentArrowPos = -1
let parentArrowPos = -1
let cursorPos = -1
let lnum = a:lnum
while lnum > 1
let last_line = getline(lnum)
if last_line =~ '^\s*->'
let parrentArrowPos = indent(a:lnum)
let parentArrowPos = indent(a:lnum)
break
else
@ -355,28 +355,28 @@ function! FindArrowIndent (lnum) " {{{
else
endif
else
let parrentArrowPos = -1
let parentArrowPos = -1
break
end
endif
if cleanedLnum =~ '->'
call cursor(lnum, cursorPos == -1 ? strwidth(cleanedLnum) : cursorPos)
let parrentArrowPos = searchpos('->', 'cWb', lnum)[1] - 1
let parentArrowPos = searchpos('->', 'cWb', lnum)[1] - 1
break
else
let parrentArrowPos = -1
let parentArrowPos = -1
break
endif
endif
endwhile
if parrentArrowPos == -1
let parrentArrowPos = indent(lnum) + shiftwidth()
if parentArrowPos == -1
let parentArrowPos = indent(lnum) + shiftwidth()
end
return parrentArrowPos
return parentArrowPos
endfun "}}}
function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{

View File

@ -146,7 +146,7 @@ endfunction
" Returns the length of the line until a:str occur outside a string or
" comment. Search starts at string index a:startIdx.
" If a:str is a word also add word bounderies and case insesitivity.
" If a:str is a word also add word boundaries and case insensitivity.
" Note: rapidTodoComment and rapidDebugComment are not taken into account.
function s:RapidLenTilStr(lnum, str, startIdx) abort
@ -179,8 +179,8 @@ function s:RapidLenTilStr(lnum, str, startIdx) abort
return -1
endfunction
" a:lchar shoud be one of (, ), [, ], { or }
" returns the number of opening/closing parenthesise which have no
" a:lchar should be one of (, ), [, ], { or }
" returns the number of opening/closing parentheses which have no
" closing/opening match in getline(a:lnum)
function s:RapidLoneParen(lnum,lchar) abort
if a:lchar == "(" || a:lchar == ")"
@ -205,7 +205,7 @@ function s:RapidLoneParen(lnum,lchar) abort
endif
let l:opnParen = 0
" count opening brakets
" count opening brackets
let l:i = 0
while l:i >= 0
let l:i = s:RapidLenTilStr(a:lnum, l:opnParChar, l:i)
@ -216,7 +216,7 @@ function s:RapidLoneParen(lnum,lchar) abort
endwhile
let l:clsParen = 0
" count closing brakets
" count closing brackets
let l:i = 0
while l:i >= 0
let l:i = s:RapidLenTilStr(a:lnum, l:clsParChar, l:i)
@ -242,7 +242,7 @@ function s:RapidPreNoneBlank(lnum) abort
let nPreNoneBlank = prevnonblank(a:lnum)
while nPreNoneBlank>0 && getline(nPreNoneBlank) =~ '\v\c^\s*(\%\%\%|!)'
" Previouse none blank line irrelevant. Look further aback.
" Previous none blank line irrelevant. Look further aback.
let nPreNoneBlank = prevnonblank(nPreNoneBlank - 1)
endwhile