From 080b0582b07fbba55fd1d065e6ebf1a8449b9c9b Mon Sep 17 00:00:00 2001 From: Khaveesh N Date: Sat, 22 Aug 2020 00:27:18 +0530 Subject: [PATCH] Fixed if statements --- ftdetect/fish.vim | 6 +++--- ftplugin/fish.vim | 18 ++++++++---------- syntax/fish.vim | 8 +++----- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/ftdetect/fish.vim b/ftdetect/fish.vim index 2c04f58..e4eaf7b 100644 --- a/ftdetect/fish.vim +++ b/ftdetect/fish.vim @@ -1,6 +1,6 @@ au BufNewFile,BufRead *.fish set ft=fish autocmd BufNewFile,BufRead,StdinReadPost * - \ if getline(1) =~ '^#!.*\Wfish\s*$' | - \ set ft=fish | - \ endif + \ if getline(1) =~ '^#!.*\Wfish\s*$' | + \ set ft=fish | + \ endif diff --git a/ftplugin/fish.vim b/ftplugin/fish.vim index bf643b6..9298474 100644 --- a/ftplugin/fish.vim +++ b/ftplugin/fish.vim @@ -9,20 +9,20 @@ setlocal suffixesadd^=.fish " Use the 'j' format option when available. if v:version ># 703 || v:version ==# 703 && has('patch541') - setlocal formatoptions+=j + setlocal formatoptions+=j endif if executable('fish_indent') - setlocal formatexpr=fish#Format() + setlocal formatexpr=fish#Format() endif if executable('fish') - setlocal omnifunc=fish#Complete - for s:path in split(system("fish -c 'echo $fish_function_path'")) - execute 'setlocal path+='.s:path - endfor + setlocal omnifunc=fish#Complete + for s:path in split(system("fish -c 'echo $fish_function_path'")) + execute 'setlocal path+='.s:path + endfor else - setlocal omnifunc=syntaxcomplete#Complete + setlocal omnifunc=syntaxcomplete#Complete endif " Use the 'man' wrapper function in fish to include fish's man pages. @@ -31,10 +31,8 @@ endif execute 'setlocal keywordprg=fish\ '.fnameescape(expand(':p:h:h').'/bin/man.fish') let b:match_words = - \ escape('<%(begin|function|if|switch|while|for)>:', '<>%|)') + \ escape('<%(begin|function|if|switch|while|for)>:', '<>%|)') let b:endwise_addition = 'end' let b:endwise_words = 'begin,function,if,switch,while,for' let b:endwise_syngroups = 'fishKeyword,fishConditional,fishRepeat' - -endif \ No newline at end of file diff --git a/syntax/fish.vim b/syntax/fish.vim index 852d9ac..55ed872 100644 --- a/syntax/fish.vim +++ b/syntax/fish.vim @@ -1,5 +1,5 @@ if exists('b:current_syntax') - finish + finish endif syntax case match @@ -19,8 +19,8 @@ syntax match fishStatement /\v;\s*\zs\k+>/ syntax match fishCommandSub /\v\(\s*\zs\k+>/ syntax region fishLineContinuation matchgroup=fishStatement - \ start='\v^\s*\zs\k+>' skip='\\$' end='$' - \ contains=fishSpecial,fishIdentifier,fishString,fishCharacter,fishStatement,fishCommandSub,fishComment + \ start='\v^\s*\zs\k+>' skip='\\$' end='$' + \ contains=fishSpecial,fishIdentifier,fishString,fishCharacter,fishStatement,fishCommandSub,fishComment highlight default link fishKeyword Keyword highlight default link fishConditional Conditional @@ -35,5 +35,3 @@ highlight default link fishStatement Statement highlight default link fishCommandSub fishStatement let b:current_syntax = 'fish' - -endif