I donât get whereâs the problem is ?
If I run the plugin, select an unopened file and hit ESC, I have the focus on the beginning of the file.
Is it related to OS ?
startup, version: 3035 windows x64 channel: dev
I donât get whereâs the problem is ?
If I run the plugin, select an unopened file and hit ESC, I have the focus on the beginning of the file.
Is it related to OS ?
startup, version: 3035 windows x64 channel: dev
Quite possibly related to OS.
Iâm on linux usually. Will try now on this OSX [size=50]piece of crap[/size] wonderful device
Having same problems with my plugin on OSX [size=50]piece of crap[/size] device
Does the command you are referring to alter the selection in any way?
[quote=âcastles_made_of_sandâ]Having same problems with my plugin on OSX [size=50]piece of crap[/size] device
Does the command you are referring to alter the selection in any way?[/quote]
I only tried to reproduce the problem with FuzzyFileNav plugin, which run the following code:
# Open file
new_view = self.window.open_file(self.cls.cwd)
if new_view is not None:
self.window.focus_view(new_view)
So no the selection is not modified.
Sorry, I didnât understand that it was related to the modifying selection.
Yeah, I donât know, havenât really followed this thread entirely.
My plugin Iâm experiencing problems with navigates to a section in the file, making a new selection.
If FuzzyNav doesnât alter selection ( why would it I guess ? ) and you are having focus problems, it could be due to layout split groups. If I recall correctly window.focus_view(v) only focuses a view in a given group, yet you still have to call window.focus_group(i)
Calling focus_group makes no difference.
The only way I have been able to get focus so far is to do something like this (which is horribly ugly):
[pre=#252525] multi = (
bool(sublime.load_settings(FUZZY_SETTINGS).get(âkeep_panel_open_after_actionâ, False)) and
âopenâ not in sublime.load_settings(FUZZY_SETTINGS).get(âkeep_panel_open_exceptionsâ, ])
)
new_view = self.window.open_file(self.cls.cwd)
if new_view is not None:
def fun(v, multi):
self.window.focus_view(v)
if not multi:
self.window.run_command(âshow_panelâ, {âpanelâ: âconsoleâ})
self.window.run_command(âhide_panelâ, {âcancelâ: True})
sublime.set_timeout(lambda: fun(new_view, multi), 500)
# sublime.set_timeout(lambda: self.window.focus_view(new_view), 500)[/pre]
I basically have to wait till the quick panel closes and then force a panel to open and close to trigger the refocusingâŚthis is ugly and stupid. I shouldnât have to do this kind of stuff.
lol, yeah I just got used to showing the goto line dialogue manually
I can live with hacky for an editor plugin I think Iâll do the same in mine for the moment.
Since I donât want to mess with closing peopleâs output/console panels that are up, I found that opening and closing a quickpanel to be more acceptable and less intrusive:
[pre=#141414] def fun(v, multi):
v.window().focus_view(v)
if not multi:
v.window().show_quick_panel(âNoneâ], None)
v.window().run_command(âhide_overlayâ)
sublime.set_timeout(lambda: fun(new_view, multi), 500)[/pre]
It seems to have worked.
Do you monitor this thread manually? Is there any way to get an email alert when there is a new response?
Does the Sublime Text developer ever show up in these forums? It would be good to draw his attention to some of these niggling issues in new releases.
It looks like youâre on a coding spree again, so Iâve come out of the woodwork to ask again:
Any chance of implementing a âproperâ save? By which I mean using FuzzyFileNav instead of my OSs âSave AsâŚâ dialog.
Alex
@quodlibet, yeah, I am on a bit of a coding spree. Squashing a couple of bugs here and there, and pushing out some personal plugins that have been sitting in my settings folder (at least the stable ones).
As for your âSave AsâŚâ request, I will take a look again. If I do it, it canât replace the built-in save completely, and it may not work with on save, pre-save events. I need to dig into it again. I have a couple of bugs and features that are on my list to get done before I burn out, so we shall see what I get to .
For the record, this is what I have in mind:
This seems to cover most cases (?). (Or maybe not. Itâs a little late and Iâm not thinking all that clearly.)
The above setup seems feasible to me if you provide new commands to bind Ctrl+S and Ctrl+Shift+S to. Or perhaps you can interfere with on_command with some setting to toggle it?
Iâm not sure how youâd handle the âcurrent directoryâ for unsaved files. Sublime uses the directory of the file from which you opened the new file/tab (I think.) Is this information available for you to use? Opening FuzzyNav on an unsaved file is a always a little surprising.
Something else: Is there a binding I can set to open multiple files? I mean regardless of the keep_panel_open_exceptions setting. Iâd like to set Alt+Right (or something) to open a file without closing FuzzyNav, mimicking the paletteâs right arrow functionality.
Alex
Edit: would you prefer these in GHâs issues?
Github issues are more likely to prompt me to do something. I say things in this forum that I often forget.
I honestly approach issues with no pressure. I havenât cracked down and disabled filing issues to encourage pull requests, but I basically approach it by leaving issues open that I think I might do one dayâŚand one day if I feel like it, and no one else has opted to do it for me, I do it . Github issues helps me remember what issues or requests I havenât turned downâŚsometimes I go dark for months at a time, and when I poke my head out again, I barely remember what it is I was going to do.
FuzzyFileNav will now display the current working directory in the status bar as long as the quick panel is open. A number of people have complained they get lost when navigating, this should now allow everyone to always know where they are at .
Sorry, small additional fix. Sidebar option introduced unexpected scenario where a FuzzyFileNav Command can be launched while a FuzzyFileNav panel was still open putting the plugin in a weird state. This should now be resolved.
Right arrow to open files is not working for me â not sure why. I must be missing blatantly obvious.
@quodlibet, any errors in the console? I tried this in Windows in OSX and it works fine. Linux should be no different.
You, know what it might be? Try auditing what commands are getting launched by logging commands. Maybe another plugin that is doing some clever stuff with cursor movement and is hijacking the ârightâ key, but not excluding the functionality in widgets.
Man, I donât know what to tell you, but itâs working now. It works great â thank you! The CWD is also a nice touch (it also wasnât working).
My guess is that the package didnât update properly on account of the very shoddy way I share Packages (not just User) across OSs. Maybe.
I also closed the github issue.