summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-11-16 15:28:10 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-16 15:28:10 +0000
commitb1b163efd7bb3ca68cce101d4e431559d2944a8e (patch)
treeb31b1181058410bf9541bdfa143fa62fe7ffdec2 /runtime
parent1be7e215830d6ec9aa6200aac4ef34ac0ae85af5 (diff)
downloadvim-git-b1b163efd7bb3ca68cce101d4e431559d2944a8e.tar.gz
patch 8.2.3603: fish filetype not recognizedv8.2.3603
Problem: Fish filetype not recognized. Solution: Add a file pattern and match script line. (Doug Kearns)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/filetype.vim3
-rw-r--r--runtime/scripts.vim4
2 files changed, 7 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 8fd2fc04a..875823c48 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -617,6 +617,9 @@ autocmd BufRead,BufNewFile *.fnl setf fennel
" Fetchmail RC file
au BufNewFile,BufRead .fetchmailrc setf fetchmail
+" Fish shell
+au BufNewFile,BufRead *.fish setf fish
+
" FlexWiki - disabled, because it has side effects when a .wiki file
" is not actually FlexWiki
"au BufNewFile,BufRead *.wiki setf flexwiki
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index 79fd0a77e..0ff8e4908 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -194,6 +194,10 @@ if s:line1 =~# "^#!"
elseif s:name =~# 'rsc\>'
set ft=routeros
+ " Fish shell
+ elseif s:name =~# 'fish\>'
+ set ft=fish
+
endif
unlet s:name