5 ms·
I wrote that article, and it is true I don't know anything about configuring vim that I didn't learn by wanting it to do something it wasn't doing. However, I
by eof 16y ago
I wrote that article, and it is true I don't know anything about configuring vim that I didn't learn by wanting it to do something it wasn't doing.
However, I am not sure
:e **/
does what you are talking about.
Tab completion has always worked for me "out of the box" (though without that wildmenu which is cool); but only in one directory at a time.
This allows me to open vim in /home/eof
and type
:e **/foo<tab>
and tab between
/home/eof/somefolder/deeper/food.gif
and
/home/eof/something/very/deep/foolsinlove.mp3
This is really useful, obviously, if you are jumping around a larger project.
- jcr 16y agoI really should have phrased that a bit more politely. Sorry. The cool part about learning to configure vim is by doing so, you are actually learning to both USE and enhance vim. It is definitely worth the effort. My all time favorite "configuration" of vim is automatically reloading ~/.vimrc on save. " auto-reload vimrc on save changes au! BufWritePost .vimrc source % With the above, you do have to be a bit careful though, since if you define something save/reload, then delete said definition line and save/reload again, it is still defined. For me, and obviously many others, it is important for tab completion to be consistent between my editor and my shell. In my case using ksh for my shell, the above settings make tab completion in vim behave just like it does in my shell. If ``:e /foo'' is used in a shallow and lightly filled subdirectory, like for some project dir, it's more usable and useful. On the other hand, if you have tons of stuff in your current (home) directory, it takes far too long. If you're not really specific with your search term, you'll get the "E77: Too many file names" error. Though often wishful thinking, I prefer to remember where the hell I put the damn files. ;)
- eof 16y agoAh; I am using bash. I'll take a deeper look at ksh. It's really fine, I don't know how to configure vim. To be fair, there are a lot of options and you can get a long way just figuring out easy ways to do things you do all the time; while never really bothering to study it in depth. All that being said, I downloaded and ran ksh; and I don't think what you've said is capturing the functionality of :e **/ It's not usually a matter of 'remembering' where I put my files; it's being in /modules/module_dir/specific_module/module.file and needing to edit /views/view_name/js/some_shit.js ,esome_s<tab> is a nice way of jumping to that file
- jcr 16y agoI've never really learned bash, so I'm more than a bit ignorant there. On the other hand, tab completion in ksh is very useful. The first time you hit tab, it completes, but if you hit tab a second time, it gives you a nice list of options for completion (i.e. directory listing with matching if provided). It does not do the kind of find(1) type search that ``e: /'' will do, but if you have a vague idea where something is located, what it is called and don't want to type out everything, the ksh-style tab completion (one or two taps) is very useful and often much faster than than a depth search.
- eof 16y agoah. I see now you typed :e **/ but it came out without the stars because of formatting.