diff options
Diffstat (limited to 'runtime/ftplugin')
87 files changed, 701 insertions, 305 deletions
diff --git a/runtime/ftplugin/aap.vim b/runtime/ftplugin/aap.vim index df839c99ae..cd7e2a425e 100644 --- a/runtime/ftplugin/aap.vim +++ b/runtime/ftplugin/aap.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Aap recipe " Maintainer: The Vim Project <https://github.com/vim/vim> -" Last Change: 2023 Aug 10 +" Last Change: 2024 Jan 14 " Former Maintainer: Bram Moolenaar <Bram@vim.org> " Only do this when not done yet for this buffer @@ -28,6 +28,11 @@ setlocal commentstring=#\ %s setlocal expandtab if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") - let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\nAll Files (*.*)\t*.*\n" + let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\n" + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" + endif let b:undo_ftplugin ..= " | unlet! b:browsefilter" endif diff --git a/runtime/ftplugin/abap.vim b/runtime/ftplugin/abap.vim index 61db8093fb..8b2040e5aa 100644 --- a/runtime/ftplugin/abap.vim +++ b/runtime/ftplugin/abap.vim @@ -3,7 +3,8 @@ " Author: Steven Oliver <oliver.steven@gmail.com> " Copyright: Copyright (c) 2013 Steven Oliver " License: You may redistribute this under the same terms as Vim itself -" Last Change: 2023 Aug 28 by Vim Project (undo_ftplugin) +" Last Change: 2023 Aug 28 by Vim Project (undo_ftplugin) +" 2024 Jan 14 by Vim Project (browsefilter) " -------------------------------------------------------------------------- " Only do this when not done yet for this buffer @@ -21,10 +22,14 @@ setlocal suffixesadd=.abap let b:undo_ftplugin = "setl sts< sua< sw<" " Windows allows you to filter the open file dialog -if has("gui_win32") && !exists("b:browsefilter") - let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n" . - \ "All Files (*.*)\t*.*\n" - let b:undo_ftplugin .= " | unlet! b:browsefilter" +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n" + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" + endif + let b:undo_ftplugin ..= " | unlet! b:browsefilter" endif let &cpo = s:cpo_save diff --git a/runtime/ftplugin/abaqus.vim b/runtime/ftplugin/abaqus.vim index 5931cd921d..c16e7b032e 100644 --- a/runtime/ftplugin/abaqus.vim +++ b/runtime/ftplugin/abaqus.vim @@ -2,6 +2,7 @@ " Language: Abaqus finite element input file (www.abaqus.com) " Maintainer: Carl Osterwisch <costerwi@gmail.com> " Last Change: 2022 Oct 08 +" 2024 Jan 14 by Vim Project (browsefilter) " Only do this when not done yet for this buffer if exists("b:did_ftplugin") | finish | endif @@ -49,8 +50,12 @@ endif if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "Abaqus Input Files (*.inp *.inc)\t*.inp;*.inc\n" . \ "Abaqus Results (*.dat)\t*.dat\n" . - \ "Abaqus Messages (*.pre *.msg *.sta)\t*.pre;*.msg;*.sta\n" . - \ "All Files (*.*)\t*.*\n" + \ "Abaqus Messages (*.pre, *.msg, *.sta)\t*.pre;*.msg;*.sta\n" + if has("win32") + let b:browsefilter .= "All Files (*.*)\t*\n" + else + let b:browsefilter .= "All Files (*)\t*\n" + endif let b:undo_ftplugin .= "|unlet! b:browsefilter" endif diff --git a/runtime/ftplugin/ant.vim b/runtime/ftplugin/ant.vim index aee07ca4b9..65e01a1a76 100644 --- a/runtime/ftplugin/ant.vim +++ b/runtime/ftplugin/ant.vim @@ -1,10 +1,11 @@ " Vim filetype plugin file -" Language: ant +" Language: ant " " This runtime file is looking for a new maintainer. " " Former maintainer: Dan Sharp -" Last Changed: 20 Jan 2009 +" Last Change: 2009 Jan 20 +" 2024 Jan 14 by Vim Project (browsefilter) if exists("b:did_ftplugin") | finish | endif @@ -15,8 +16,12 @@ set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" -let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . - \ "All Files (*.*)\t*.*\n" +let s:browsefilter = "XML Files (*.xml)\t*.xml\n" +if has("win32") + let s:browsefilter .= "All Files (*.*)\t*\n" +else + let s:browsefilter .= "All Files (*)\t*\n" +endif runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim let b:did_ftplugin = 1 @@ -30,7 +35,7 @@ if exists("b:browsefilter") endif " Change the :browse e filter to primarily show Ant-related files. -if has("gui_win32") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "Build Files (build.xml)\tbuild.xml\n" . \ "Java Files (*.java)\t*.java\n" . \ "Properties Files (*.prop*)\t*.prop*\n" . diff --git a/runtime/ftplugin/aspvbs.vim b/runtime/ftplugin/aspvbs.vim index 70a130d287..6979bb8f84 100644 --- a/runtime/ftplugin/aspvbs.vim +++ b/runtime/ftplugin/aspvbs.vim @@ -1,10 +1,11 @@ " Vim filetype plugin file -" Language: aspvbs +" Language: aspvbs " " This runtime file is looking for a new maintainer. " " Former maintainer: Dan Sharp -" Last Changed: 20 Jan 2009 +" Last Change: 2009 Jan 20 +" 2024 Jan 14 by Vim Project (browsefilter) if exists("b:did_ftplugin") | finish | endif @@ -15,8 +16,12 @@ set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" -let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" . - \ "All Files (*.*)\t*.*\n" +let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" +if has("win32") + let s:browsefilter .= "All Files (*.*)\t*\n" +else + let s:browsefilter .= "All Files (*)\t*\n" +endif let s:match_words = "" runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim @@ -51,7 +56,7 @@ if exists("loaded_matchit") endif " Change the :browse e filter to primarily show ASP-related files. -if has("gui_win32") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter endif diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim index 40fe304cf4..bcd772350a 100644 --- a/runtime/ftplugin/awk.vim +++ b/runtime/ftplugin/awk.vim @@ -2,7 +2,7 @@ " Language: awk, nawk, gawk, mawk " Maintainer: Doug Kearns <dougkearns@gmail.com> " Previous Maintainer: Antonio Colombo <azc100@gmail.com> -" Last Change: 2020 Sep 28 +" Last Change: 2024 Jan 14 " This plugin was prepared by Mark Sikora " This plugin was updated as proposed by Doug Kearns @@ -25,8 +25,7 @@ setlocal formatoptions-=t formatoptions+=croql setlocal define=function setlocal suffixesadd+=.awk -let b:undo_ftplugin = "setl fo< com< cms< def< sua<" . - \ " | unlet! b:browsefilter" +let b:undo_ftplugin = "setl fo< com< cms< def< sua<" " TODO: set this in scripts.vim? if exists("g:awk_is_gawk") @@ -49,8 +48,13 @@ if exists("g:awk_is_gawk") endif if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") - let b:browsefilter = "Awk Source Files (*.awk,*.gawk)\t*.awk;*.gawk\n" . - \ "All Files (*.*)\t*.*\n" + let b:browsefilter = "Awk Source Files (*.awk, *.gawk)\t*.awk;*.gawk\n" + if has("win32") + let b:browsefilter .= "All Files (*.*)\t*\n" + else + let b:browsefilter .= "All Files (*)\t*\n" + endif + let b:undo_ftplugin .= " | unlet! b:browsefilter" endif let &cpo = s:cpo_save diff --git a/runtime/ftplugin/basic.vim b/runtime/ftplugin/basic.vim index 4399fbf3ad..32f713b43e 100644 --- a/runtime/ftplugin/basic.vim +++ b/runtime/ftplugin/basic.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: BASIC (QuickBASIC 4.5) " Maintainer: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2022 Jun 22 +" Last Change: 2024 Jan 14 if exists("b:did_ftplugin") finish @@ -45,8 +45,12 @@ endif if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" .. - \ "BASIC Include Files (*.bi, *.bm)\t*.bi;*.bm\n" .. - \ "All Files (*.*)\t*.*\n" + \ "BASIC Include Files (*.bi, *.bm)\t*.bi;*.bm\n" + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" + endif let b:basic_set_browsefilter = 1 let b:undo_ftplugin ..= " | unlet! b:browsefilter b:basic_set_browsefilter" endif diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim index 4ddc4a5392..e2eebc5492 100644 --- a/runtime/ftplugin/c.vim +++ b/runtime/ftplugin/c.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: C " Maintainer: The Vim Project <https://github.com/vim/vim> -" Last Change: 2023 Aug 10 +" Last Change: 2023 Aug 22 " Former Maintainer: Bram Moolenaar <Bram@vim.org> " Only do this when not done yet for this buffer @@ -48,24 +48,26 @@ if !exists("b:match_words") let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words" endif -" Win32 can filter files in the browse dialog +" Win32 and GTK can filter files in the browse dialog if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") if &ft == "cpp" - let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . - \ "C Header Files (*.h)\t*.h\n" . - \ "C Source Files (*.c)\t*.c\n" . - \ "All Files (*.*)\t*.*\n" + let b:browsefilter = "C++ Source Files (*.cpp, *.c++)\t*.cpp;*.c++\n" .. + \ "C Header Files (*.h)\t*.h\n" .. + \ "C Source Files (*.c)\t*.c\n" elseif &ft == "ch" - let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" . - \ "C Header Files (*.h)\t*.h\n" . - \ "C Source Files (*.c)\t*.c\n" . - \ "All Files (*.*)\t*.*\n" + let b:browsefilter = "Ch Source Files (*.ch, *.chf)\t*.ch;*.chf\n" .. + \ "C Header Files (*.h)\t*.h\n" .. + \ "C Source Files (*.c)\t*.c\n" else - let b:browsefilter = "C Source Files (*.c)\t*.c\n" . - \ "C Header Files (*.h)\t*.h\n" . - \ "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" . - \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . - \ "All Files (*.*)\t*.*\n" + let b:browsefilter = "C Source Files (*.c)\t*.c\n" .. + \ "C Header Files (*.h)\t*.h\n" .. + \ "Ch Source Files (*.ch, *.chf)\t*.ch;*.chf\n" .. + \ "C++ Source Files (*.cpp, *.c++)\t*.cpp;*.c++\n" + endif + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" endif let b:undo_ftplugin ..= " | unlet! b:browsefilter" endif diff --git a/runtime/ftplugin/clojure.vim b/runtime/ftplugin/clojure.vim index c922d75699..4da7554d85 100644 --- a/runtime/ftplugin/clojure.vim +++ b/runtime/ftplugin/clojure.vim @@ -6,6 +6,7 @@ " URL: https://github.com/clojure-vim/clojur |