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

Single click for opening files & directories #114

Open
stelonix opened this issue May 4, 2016 · 9 comments
Open

Single click for opening files & directories #114

stelonix opened this issue May 4, 2016 · 9 comments
Labels

Comments

@stelonix
Copy link

stelonix commented May 4, 2016

Is it possible to require only a single click in order to open files & expand directories?

@vovkkk
Copy link
Collaborator

vovkkk commented May 5, 2016

Should be possible theoretically.

You have to create your own command with unique name which will handle click (like our doubleclick) and bind this new command to click in sublime-mousemap file (like Default.sublime-mousemap).
Keep both files in Packages/User folder.

Now the trick is that you should call 'drag_select' first, so it will change position of cursor, and then call appropriate command of SFB.

@vovkkk vovkkk added the question label May 5, 2016
@aramk
Copy link

aramk commented May 31, 2016

I can't get double click to work - is it enabled by default?

@vovkkk
Copy link
Collaborator

vovkkk commented May 31, 2016

Yes, double click is enabled, perhaps you have to restart Sublime Text.
Also, if it doesn’t work after restart, look at console, is there any error? View → Show Console

@aramk
Copy link

aramk commented May 31, 2016

Hi @vovkkk, no errors. I'm running 3114 after restarting.

@vovkkk
Copy link
Collaborator

vovkkk commented May 31, 2016

What exactly happen when you double click?
OS?
Any other plugins change mouse interactions? show me content of Preferences → Package Settings → Package Control → Settings — User

@aramk
Copy link

aramk commented May 31, 2016

@vovkkk I'm using Mac OS X. Nothing happens on double click.

{
    "bootstrapped": true,
    "in_process_packages":
    [
    ],
    "installed_packages":
    [
        "AngularJS",
        "Babel",
        "Better CoffeeScript",
        "BetterFindBuffer",
        "ColorPicker",
        "Diffy",
        "DocBlockr",
        "FileBrowser",
        "Git",
        "GitGutter",
        "GotoWindow",
        "Gradle_Language",
        "Gutter Color",
        "Jade",
        "JavaScript Refactor",
        "JsFormat",
        "LESS",
        "LineEndings",
        "Material Theme - White Panels",
        "Maybs Quit",
        "Oceanic Next Color Scheme",
        "One Dark Color Scheme",
        "Origami",
        "Package Control",
        "Predawn",
        "Pretty JSON",
        "Pretty YAML",
        "Sass",
        "SideBarEnhancements",
        "Solarized Color Scheme",
        "SublimeLinter",
        "SublimeLinter-annotations",
        "SublimeLinter-coffee",
        "SublimeLinter-coffeelint",
        "SublimeLinter-contrib-ruby-lint",
        "SublimeLinter-contrib-sass-lint",
        "SublimeLinter-csslint",
        "SublimeLinter-html-tidy",
        "SublimeLinter-jscs",
        "SublimeLinter-json",
        "SublimeLinter-pyyaml",
        "SublimeXiki",
        "Terminal",
        "tern_for_sublime",
        "Theme - Centurion",
        "Theme - Spacegray",
        "TodoReview",
        "Tomorrow Color Schemes",
        "WordHighlight",
        "Wrap Plus",
        "Zen Tabs"
    ]
}

@vovkkk
Copy link
Collaborator

vovkkk commented May 31, 2016

You have two plugins, mouse-maps of which are conflicting with SFB: WordHighlight, and SublimeXiki.

You may add them to ignored packages and see if dblclk works, to be sure if I’m right or not: Preferences → Settings — User:

{
    "ignored_packages":
    [
        "WordHighlight",
        "SublimeXiki",
        "Vintage"
    ]
}

The easiest fix is dropping SFB mouse-map to your Packages/User directory.

@aramk
Copy link

aramk commented May 31, 2016

Thanks that fixes the double click

@sahilrajput03
Copy link

sahilrajput03 commented Nov 5, 2020

Make a little extesion like -

# Path to save this file => Packages/User/NoPreview.py
import sublime
import sublime_plugin
import os

class NoPreview(sublime_plugin.EventListener):
    def on_load(self, view):
        if (os.path.exists(view.file_name())):
            view.run_command('save')

and name this file as NoPreview.py and save it to Packages/User/ directory.

It works good for me to open files with single click, I'm using windows 8.1.

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

No branches or pull requests

4 participants