Loading ...
Sorry, an error occurred while loading the content.

Patch: Customizable file filters for :browse

Expand Messages
  • Dan Sharp
    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.
    Message 1 of 1 , Apr 5, 2001
    • 0 Attachment
      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:

      *browsefilter*
      For MS Windows, you can modify the filters that are used in the browse
      dialog.
      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
      string in
      the format "<filter label>\t<filemask>\n" where <filter label> is the
      text that
      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
      following
      command:

      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.

      Dan Sharp
    Your message has been successfully submitted and would be delivered to recipients shortly.