From c9dccf346210dfdb3a52908a35b706f6905cf53c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 18 Jun 2022 18:12:52 +1000 Subject: [PATCH] Support browsefilter with the GTK GUI Also adds the standard "All files" filter to allow for finding filetypes other than Julia from the file dialog. --- ftplugin/julia.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim index 2f9a9a2..e29b238 100644 --- a/ftplugin/julia.vim +++ b/ftplugin/julia.vim @@ -103,8 +103,9 @@ endif let b:commentary_format = "# %s" " for tpope/vim-commentary let b:smartcomment_force_linemode = 1 " for carlobaldassi/vim-smartcomment -if has("gui_win32") - let b:browsefilter = "Julia Source Files (*.jl)\t*.jl\n" +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Julia Source Files (*.jl)\t*.jl\n" . + \ "All Files (*.*)\t*.*\n" let b:undo_ftplugin = b:undo_ftplugin . " | unlet! b:browsefilter" endif