How to make Vim ignore file extensions when opening files through the command line/shell? -


consider following directory tree:

root/include/file.hpp root/source/file.cpp root/images/file.png 

the command line inside directory root.

in vimrc file, there set wildignore=*.png.

if open vim in folder root , run :next */file.*, opens file.hpp , file.cpp.

however, if launch vim command line vim */file.*, opens 3 files.

so, when feeding filename, first loads files, vimrc? there way ignore extensions when opening files vim through command line? or make vim load vimrc first?

in first scenario, glob expansion done vim , obeys rules in vimrc.

in second scenario, glob expansion done shell , there's no reason expect obey rules in vimrc.

you can $ vim -c "next */file.*", opens vim without filename , executes next */file.*.

or can exclude pattern directly in shell. assuming have extglob set, can done in bash $ vim !(file.png).


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -