Different types of file opening tasks

From Issawiki
Jump to: navigation, search


  1. I have a specific path/file I want to open, and I know exactly where it is. Here, I just want to type it out, possibly with some minimal tab-completions so I don't have to type out the whole path. It's also fine if there are some other kinds of "help" the computer provides, like highlighting in red the part of the path that doesn't exist. But importantly, I don't want stuff like fuzzy search or for the program to recursively search my whole filesystem or other annoying things like this. This is why fzf feels so bad to use for me (for file searching; I love it for shell history search), because a lot of the time I know where the thing is, but fzf wants to search my whole hard drive looking in places that I don't care about, and then it often doesn't even find the file I want because other "matches" have filled the results list. Emacs's ido-mode is a good example of a pretty good UI for this. File Pilot also has a "filter" search mode that does a pretty good job of this.
  2. I have already opened the thing before, or the file is nearby to my current file, or I've added my "library" or whatever to tell the program where to find files, and then I want to just search by the filename, very quickly. This is what stuff like fzf, Neovim's telescope plugin, SumatraPDF's Ctrl-k, are coming from. You know you only need to search a small space, a very limited region, so you want fuzzy find, you want things to just automagically show up as you're typing. But importantly, this only works well if you're searching a small space! If you're searching your whole hard drive, it doesn't work well. Vim natively doesn't have this, which I think is why the plugins like telescope and whatever focus on this use-case, even though in my opinion it's not the most important one.
  3. You only roughly know where the file is, or maybe not at all, or maybe you aren't even sure if the file exists on your system, so you just want to recursively search from some starting "root" location, and it's ok if the search takes a little longer, because you're not doing it on every keystroke, you're just firing off this search process as a widely cast net to see what comes up. This is Vim's :e **/* and :find command with path+=** and stuff is all about. Gnome's file search thing works pretty well, I think. But it can only do this kind of recursive search. fzf doesn't work well for this use-case either, even though I think it's trying to, because it does fuzzy search by default, whereas for this use-case you probably want case-insensitive substring match by default. Also stuff like Google search is kind of in this use-case as well, even though there you're not searching for a file, rather some websites (but a URL is kind of like a file anyway).

And I want to be able to have my program just ... seamlessly be able to transition or somehow magically guess which one the user wants? Or at least be able to have all three through separate keybindings. Most programs can only do one or two of these things, so when I want to do the third thing it feels frustrating.