summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2022-01-01 18:34:50 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2022-01-01 18:34:50 +0100
commitc96947b1c64c56f70125a9bac9c006f69e45d5d3 (patch)
treee15e44698144fdd94d00a28697708f03df7fa431 /extras
parentf621f6c1eeadf73780ff7a7929a025a25a66702a (diff)
downloadvim-polyglot-c96947b1c64c56f70125a9bac9c006f69e45d5d3.tar.gz
vim-polyglot-c96947b1c64c56f70125a9bac9c006f69e45d5d3.zip
Update
Diffstat (limited to 'extras')
-rw-r--r--extras/filetype.vim17
-rw-r--r--extras/menu.vim7
2 files changed, 18 insertions, 6 deletions
diff --git a/extras/filetype.vim b/extras/filetype.vim
index 78087d04..4313adc2 100644
--- a/extras/filetype.vim
+++ b/extras/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2021 Dec 14
+" Last Change: 2021 Dec 27
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -397,6 +397,7 @@ au BufNewFile,BufRead configure.in,configure.ac setf config
au BufNewFile,BufRead *.cu,*.cuh setf cuda
" Dockerfile; Podman uses the same syntax with name Containerfile
+" Also see Dockerfile.* below.
au BufNewFile,BufRead Containerfile,Dockerfile,*.Dockerfile setf dockerfile
" WildPackets EtherPeek Decoder
@@ -962,9 +963,9 @@ au BufNewFile,BufRead lilo.conf setf lilo
" Lisp (*.el = ELisp, *.cl = Common Lisp)
" *.jl was removed, it's also used for Julia, better skip than guess wrong.
if has("fname_case")
- au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp
+ au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp
else
- au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,.emacs,.sawfishrc setf lisp
+ au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc setf lisp
endif
" SBCL implementation of Common Lisp
@@ -1091,7 +1092,9 @@ au BufNewFile,BufRead *.mmp setf mmp
" Modsim III (or LambdaProlog)
au BufNewFile,BufRead *.mod
- \ if getline(1) =~ '\<module\>' |
+ \ if expand("<afile>") =~ '\<go.mod$' |
+ \ setf gomod |
+ \ elseif getline(1) =~ '\<module\>' |
\ setf lprolog |
\ else |
\ setf modsim3 |
@@ -1666,7 +1669,7 @@ au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
au BufNewFile,BufRead *.zsh setf zsh
" Scheme
-au BufNewFile,BufRead *.scm,*.ss,*.rkt,*.rktd,*.rktl setf scheme
+au BufNewFile,BufRead *.scm,*.ss,*.sld,*.rkt,*.rktd,*.rktl setf scheme
" Screen RC
au BufNewFile,BufRead .screenrc,screenrc setf screen
@@ -1748,6 +1751,7 @@ au BufNewFile,BufRead *.ice setf slice
" Microsoft Visual Studio Solution
au BufNewFile,BufRead *.sln setf solution
+au BufNewFile,BufRead *.slnf setf json
" Spice
au BufNewFile,BufRead *.sp,*.spice setf spice
@@ -2233,6 +2237,9 @@ au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab
" dnsmasq(8) configuration
au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq')
+" Dockerfile
+au BufNewFile,BufRead Dockerfile.*,Containerfile.* call s:StarSetf('dockerfile')
+
" Dracula
au BufNewFile,BufRead drac.* call s:StarSetf('dracula')
diff --git a/extras/menu.vim b/extras/menu.vim
index e1765243..5f4e395e 100644
--- a/extras/menu.vim
+++ b/extras/menu.vim
@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2020 Sep 28
+" Last Change: 2021 Dec 22
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -717,6 +717,11 @@ func s:BMCanAdd(name, num)
return 0
endif
+ " no name with control characters
+ if a:name =~ '[\x01-\x1f]'
+ return 0
+ endif
+
" no special buffer, such as terminal or popup
let buftype = getbufvar(a:num, '&buftype')
if buftype != '' && buftype != 'nofile' && buftype != 'nowrite'