I like to type :cd to get into a working folder and then combinations of :e, :split and :vsplit to get my working setup functional. However, since I am working with .tex files, there are often different file types generated by my .tex file at compilation (.log, .aux, etc.) within my working folder.
Is there any way to force VIM to only list the files in my directory containing certain extensions? For example, it would be great if it only displayed files of type related to programming languages such as .tex, .cpp, .cs, .py, .json, etc. The point is that I never open some file types in VIM (image files, pdf files, and so on), so I don't see why they should show up in my :e search.
You can use 'wildignore' to set a list of file patterns which are ignored for expanding wildcards and completing file/directory names.
You can do add filename patterns to 'wildignore' by using += with :set in your vimrc. Example:
set wildignore+=*.o
set wildignore+=*.obj
set wildignore+=*.log
set wildignore+=*.aux
See :h 'wildingore' for more information.
You may also be interested in using <c-d> to list completions. This can be helpful navigation with :e, :sp, and friends. See :h c_CTRL-D.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With