andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 39 forks source link

Idea about using fuzzy opener without project whatsoever. #328

Closed vi closed 8 years ago

vi commented 8 years ago
  1. Implement things from #327 (files opened or created gets to fuzzyopener cache);
  2. Don't delete files from the cache if they are closed;
  3. Add new mode: p /dev/null command explicitly turns off scanning filesystem.

Result: I can use fuzzy-open just to switch between already (or previously) opened files. No scanning, yet fuzzy opening.

/dev/null seems to be already a "keyword" for Enki for file deletion, so it won't hurt to reuse it (even on Windows, etc.) for a "null project".

andreikop commented 8 years ago

Does is make sense to manually switch off scanning? If you don't need it - just ignore.

vi commented 8 years ago

The scenario is Enki opened as root to edit multiple config files in multiple locations (including, for example, on some sshfs). I don't want to scan, but I want fuzzy-opener-like switching between files.

  1. Project directory may be inappropriate, with many hard-to-scan files;
  2. Extra files overload the fuzzyopener results;

Workaround is simple, just create empty directory and specify it as project path. But p /dev/null looks more ideomatic.

andreikop commented 8 years ago

Still don't understand reason for /dev/null.

vi commented 8 years ago

I don't care if my HDD or Enki is working hard in background while the UI is responsive.

  • Example of hard-to-scan file is a file on failed NFS mount. It can bring thread to uninterruptible sleep.
  • Enki don't show the list of fuzzyopener suggestions until if finished the scanning.

Currently Enki consider only scanned files for fuzzy opener, i.e. there is one source of information for the fuzzy opener to sort.

When opened files are also considered, there will be two sources of information for fuzzy opener:

If seems to be natural to be able to turn off the first source when it is not meaningful (i.e. in projectless mode).


Fuzzy Switcher

Currently re-opening already opened file means switching to it, so with separate switcher it would feel duplicated.

Also I want opened previoulsy, but now closed files to be still on the list (to avoid keeing numerous opened files just for switcher to keep a tab on)

andreikop commented 8 years ago

First version works fine for me. Will be released soon

andreikop commented 8 years ago

This comment was for another issue. But similar for this one. Now releasing as is. There are more important features. Will use fuzzy-opener more in the battle and see if project-less mode is useful.