Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underline all clickable text elements when pressed ctrl #1371

Open
evandrocoan opened this issue Sep 17, 2016 · 6 comments
Open

Underline all clickable text elements when pressed ctrl #1371

evandrocoan opened this issue Sep 17, 2016 · 6 comments

Comments

@evandrocoan
Copy link

evandrocoan commented Sep 17, 2016

Underline all clickable text elements when pressed ctrl

The enhancement is to apply a different theme style as underline, to all clickable text elements when one configured keyboard modifier as ctrl is pressed. This way you may easily visualize all symlinks there are on the screen.

Usually clickable text/code elements are the go to symbol accessed by f12 usually.
If all symbols is to much, apply the them to the current symbol under the mouse as the Eclipse IDE currently does:
multiselection_jumps

There is something related here: https://sublimetext.userecho.com/topics/2036-ctrl-click-on-hyperlinks-to-known-symbols/

Of course, allow a .sublime-mousemap to use the same modifier key as ctrl to click and jump to the definition:

    {
        "button": "button1", "count": 1, "modifiers": ["ctrl"],
        "press_command": "drag_select",
        "command": "goto_definition"
    },
    {
        "button": "button2", "count": 1, "modifiers": ["ctrl"],
        "command": "jump_back"
    },
@keith-hall
Copy link
Collaborator

Currently, there is no way for a keybinding to be defined for when only a modifier key i.e. Ctrl is pressed.

Unknown key ctrl

@evandrocoan
Copy link
Author

I am not saying to dynamically create keybindings, I want to the ctrl modifier to trigger the underline for clickable elements, and also allow my .sublime-mousemap to be working using the ctrl+left_mouse_click.

@FichteFoll
Copy link
Collaborator

FichteFoll commented Sep 21, 2016

What defines "clickable text"? This is not clear from your description.

@evandrocoan
Copy link
Author

Everything I may use Go to symbol.

@FichteFoll
Copy link
Collaborator

FichteFoll commented Sep 21, 2016

If it is supposed to be inferred from the symbol list for goto definition, depending on whether or not you defined a mousebinding such as in your original post, this is too specific and undetectable.

Unfortunately, as @keith-hall said, you also can't really do this with a plugin either. Or well, you can, but you'll need to refer to OS APIs using the ctypes module in order to find out whether the ctrl key is held or not. What I would do then is to just underline all words that are indexed (window.indexed_symbols()).

Edit: The easy way would be to just define a key binding that underlines all "go to symbol"-able words. Either as a toggle or with a timeout.

@evandrocoan
Copy link
Author

Well, you may see on the screencast/gif, eclipse is doing it. But all the symbols? Looks to much for big files. Do you mean all screen visible symbols? Should be created a way to fast find all symbols within a specific range on the file, other wise we may 'lag/free' sublime text. Or not, we may look into the Eclipse IDE implementation for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants