rosshemsley / iOpener

Open files from path, with completion, listings and history. Similar to Emacs find file.
GNU General Public License v2.0
55 stars 19 forks source link

Allow sublime_text_4 and above by checking for version 1 instead #38

Closed nvaytet closed 3 years ago

nvaytet commented 3 years ago

Fixes #37

Jesse-Weinstein-Zonar commented 3 years ago

If anyone else is looking for how to monkey patch this, see https://packagecontrol.io/docs/customizing_packages

(edited to add: Much thanks to rosshemsley for originally writing this, and nvaytet for this fix. Maintainers don't get thanked enough, so let this be a counter-example.)

sjoertvv commented 3 years ago

If anyone else is looking for how to monkey patch this, see https://packagecontrol.io/docs/customizing_packages

Alternative patchy solution: I forked @nvaytet's repo and merged the branch with the fix into the master. You can install this using Package Manager (using Remove/Add Repository, followed by Install Package). I had to restart Sublime to make it work.

https://github.com/sjoertvv/iOpener

tomhundt commented 3 years ago

So, just to spell out the "monkey patch" solution (that customizing_packages page is a bit dense – the TLDR being, you can put custom settings files in Packages/User but actual package code has to be under Packages – which is a bummer if you are syncing your User folder among several computers via some cloud)

Here we go:

  1. Download a copy of the repo including the fix which means branch allow_versions_above_3. For me, this meant hacking the URL to have the right branch name at the end: https://codeload.github.com/nvaytet/iOpener/zip/refs/heads/allow_versions_above_3 (because GitHub wants to download branch master when you do Code > Download Zip, even if you're looking at a different branch at the time).
  2. Unzip it somewhere (Downloads folder, whatever).
  3. In Sublime, do Preferences > Browse packages... which opens your directory browsing tool on your Packages folder.
  4. Open your Sublime's console (it's Ctrl` on Mac), because it's fun to see stuff happening.
  5. Delete the old iOpener package by moving it out of there (e.g., to the Trash).
  6. Move the new, just downloaded and unzipped, version to Packages. The folder name doesn't actually matter – I left mine as iOpener-allow_versions_above_3 as sort of a reminder and to leave it untouched if somebody/thing went crazy and reinstalled the real iOpener for some reason.
  7. Now, if you have been watching your console, you should have seen it unload the old iOpener when you moved it out, and reload the new one when you moved that in. And your File-Open shortcut should work again the way you wanted. Yee hah!

Props to @nvaytet for the fix and @rosshemsley for the original plugin.

stoivo commented 3 years ago

master branch is updated with a patch, release will come soon