anaconda icon indicating copy to clipboard operation
anaconda copied to clipboard

Python context menu

Open evandrocoan opened this issue 6 years ago • 2 comments

Issue:

  1. https://github.com/DamnWidget/anaconda/issues/571 Hide Anaconda context menu entry on non-python projects

evandrocoan avatar Aug 05 '17 20:08 evandrocoan

Hi,

  1. Because I we need to rename the file Context.sublime-menu to some else as Base Context.sublime-menu, then on plugin_loaded() we copy it or to Context.sublime-menu or Context.sublime-menu-hidden. So when upgrading the file Context.sublime-menu we only need to change the Base Context.sublime-menu. Also, would be a pain with git as both files Context.sublime-menu and Context.sublime-menu-hidden are constantly changing their names. We would be a lot of, a) the fine is missing now, b) the file is not missing now.
  2. I think I can, but a better solution would be writing a dedicated package to handle this for all other packages. For now I am short of time, so unless I am really required to write a package as for performance loss due too much threads being created. For example, the other related packages as https://github.com/DamnWidget/anaconda_rust/blob/master/Context.sublime-menu also has the menu entry, so if use them I would need to include this there too, which seems not nice to be doing around.

But perhaps we should just wait Sublime Text core implement this as a built-in feature:

  1. https://github.com/SublimeTextIssues/Core/issues/1859 Allow to hide .sublime-menu folders

evandrocoan avatar Aug 05 '17 21:08 evandrocoan

The thing is this will make ST3 to dynamically reload the Context file giving some kind of log behind in the console, I understand that this solution will work but I think is way too clever and a bit hacky. Maybe is worth just to wait till the right fix come from the ST3 development team.

DamnWidget avatar Aug 05 '17 21:08 DamnWidget