Patch: Customizable file filters for :browse
- I have made some modifications to the Windows versions of gvim to allow the
user to customize the items in the "Files of Type" combo box in the Browse
dialog. The documentation is:
For MS Windows, you can modify the filters that are used in the browse
By setting the g:browsefilter or b:browsefilter variables, you can change the
filters globally or locally to the buffer. The variable is set to a
the format "<filter label>\t<filemask>\n" where <filter label> is the
appears in the "Files of Type" comboBox, and <filemask> is the pattern which
filters the filenames.
For example, to have only Vim files in the dialog, you could use the
let g:browsefilter="Vim Scripts\t*.vim\nVim Startup Files\t*vimrc\n"
You can then override this setting on a per-buffer basis by setting the
b:browsefilter variable. You would most likely set b:browsefilter in a
filetype plugin, so that the browse dialog would contain entries related to
the type of file you are currently editing.
Let me know if I need to add more.