Giter Club home page Giter Club logo

Comments (7)

EugeneLoy avatar EugeneLoy commented on May 15, 2024

I have a request related to shortcuts.

Please, add eclipse-way shortcut for "close Glance" and shortcut for "return focus to editor" or something like this.
When You start search from editor and want to go back to editing text You are forced to use mouse in order to go back and remain highlights.
Pressing "ESC" do returns focus to editor but Glance disappears(so do search highlights) and there is no way to configure this at the moment.

In my case things even worse - I have "ESC" mapped to "focus on editor" shortcut (borrowed from Qt Creator key mapping) and it conflicts with Glance's hardcoded shortcut.

My proposal is to add 2 shortcuts that can be configured in eclipse-way:

  1. "close Glance" - this should work both when focus is in "search box" and when focus is somewhere else(may be useful if You want to disable highlights during editing text without using mouse).
  2. add shortcut "return focus to editor(without closing Glance)" and/or make Glance play nice with default "Activate Editor" shortcut(maybe by adding adding "searching with Glance" context to avoid shortcut conflicts (I do not remember how this is actually called in eclipse internals terms. I mean the thing that You can pick in "when combobox" when setting shortcuts)).

Thanks.

from glance.

zapletnev avatar zapletnev commented on May 15, 2024

Implemented, now glance has configurable shortcuts (open/next,prev results/close).
Also, when using open shortcut in the search panel the focus goes back to the editor.

from glance.

ystrot avatar ystrot commented on May 15, 2024

@EugenyLoy I mostly agree with your points. The only thing I don't like is to have more than one shortcut in the global space. Close Glance shortcut can be useful, but not so often to define one more global key sequince. When you need it you still can use CTRL+ALT+F, ESC.

So what we have now are 1 global shortcut to open glance (CTRL+ALT+F) and 4 search panel shortcuts: next match (ENTER), prev match (SHIFT+ENTER), close (ESC), return focus back (CTRL+ALT+F). As you see, by default you can use the same shortcut to move focus to search panel and back to editor. While all shorcuts configurable you can simply bind close to another key sequence and use ESC for return focus back.

from glance.

EugeneLoy avatar EugeneLoy commented on May 15, 2024

@ystrot Sounds pretty solid to me. Waiting for new release:)

from glance.

max99x avatar max99x commented on May 15, 2024

Somewhat late to the party, but I definitely think that most of the shortcuts should be global. The user can always limit them in the settings. My usage pattern is quite simple. I want to iterate over all matches and edit some of them. The best I can do with the current shortcuts is this:

  • Ctrl+F (Open Glance)
  • <type query>
  • Enter (Go to first match)
  • Esc (Return focus to editor)
  • <edit>
  • F3 (Open Glance, but really Return to Glance)
  • F3 (Find next instance, perhaps multiple times)
  • Esc (Return focus to editor)
  • <edit>
  • Repeat the last 4 steps N times.
  • F3 (Return to Glance, only so I can close it and remove highlights)
  • Ctrl+Esc (Close Glance)

If shortcuts were global, I could do this much more smoothly:

  • Ctrl+F (Open Glance)
  • <type query>
  • Enter (Go to first match)
  • Esc (Return focus to editor)
  • <edit>
  • F3 (Find next instance, perhaps multiple times)
  • <edit>
  • Repeat the last 2 steps N times.
  • Esc (Close Glance)

Here I avoided the extra trip to the glance bar and back to go to the next match, as well as another trip to it so I can close it, and I can reuse Esc to both return to glance and close glance, since I can configure one to work in the glance context, and one in the window context from the Eclipse preferences.

from glance.

ystrot avatar ystrot commented on May 15, 2024

@max99x This use case makes sense, but there are no useful available shortcuts in the global scope. Looks like you're using F3 for find next which is used by Java editor by default. So if you want to use global scope you need to configure shortcuts for your needs anyway.

I think we can try to allow using global scope for glance shortcuts. In this case you can change shortcut context in the Eclipse preferences. Currently our binding implementation is a bit tricky, that's why global scope doesn't work for glance shortucts. But we'll try to find another way to implement it.

from glance.

max99x avatar max99x commented on May 15, 2024

Thanks for the reply. I use Glance as replacement for the built-in Eclipse search, so it only makes sense to use the same shortcuts. Of course, not everyone does that, so the default shortcuts shouldn't conflict with Eclipse's. If Glance allowed shortcut scope to be configured in the preferences and was able to capture global keystrokes, I wouldn't care what the default is.

from glance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.