Hi all, I posted this on StackOverflow but didn’t get any fixes there. I figured you might be able to help me out. Thanks!
Hyphens vs Underscore
If the hypen and the underscore is not in word separators, then try disabling third party packages installed till works. If does not works, then open
“Sublime Text->Preferences->Settings - User”, and replace your word-separators with the line Brian give you,
“word_separators”: “./\()”’:,.;<>~!@#$%^&*|+=]{}`~?",
So underscore / hyphen / camel case all currently work the same for you?
If so, how do I go about disabling 3rd party packages? Any idea which ones would be causing it?
My word separators is the same as that, except for not having the @ in it, and pretty much always has been that way.
Thanks
Thanks for the help there but it still doesn’t work for me. I removed the data directory entirely then added in the word separators. That makes the double click work properly, however the CTRL-arrow skips to the end. Without the word separators, the double click doesn’t select the whole thing but the CTRL-arrow correctly lands on it. So it’s behaving the same as it was before removing the data directory.
Just to verify again, if you have:
word_one
word-one
wordOne
They all behave the same for you with both a double click and a CTRL-arrow? Are you on a Mac or PC?
Thanks again for your time.
Yep, Windows.
-
Create a new tab with
word_one
word-one
wordOne -
Restart sublime
-
Main menu .> View -> Show Console
4 . Paste this in the console
sublime.log_commands(True);sublime.log_input(True);s=sublime.load_settings(“Preferences.sublime-settings”);print(s.get(‘word_separators’, ‘Nothing’));s=sublime.load_settings(“Package Control.sublime-settings”);print(s.get(‘installed_packages’, ‘Nothing’)); -
Now try to CTRL+Arrow (left or rigth) in the three words.
-
Copy all the console input and raw paste(no quote, no code) here.
Hmm, maybe it’s Mac vs Windows thing?
Here’s the output. I clicked at the front of each line then hit CTRL-right until I got to the end (twice for _ & camel and once for -)
startup, version: 3059 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/jasonwlogsdon/Library/Application Support/Sublime Text 3/Packages
state path: /Users/jasonwlogsdon/Library/Application Support/Sublime Text 3/Local
hardware concurrency: 4
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/jasonwlogsdon/Library/Application Support/Sublime Text 3/Installed Packages
found 3 files for base name Default.sublime-keymap
found 1 files for base name Default.sublime-mousemap
found 1 files for base name Main.sublime-menu
loading bindings
loading pointer bindings
found 1 files for base name Default.sublime-theme
theme loaded
app ready
startup cache, total files: 145 cache hits: 145
pre session restore time: 0.185636
using gpu buffer for window
using gamma: 2 (err: 6.9282)
first paint time: 0.250498
startup time: 0.268586
launching: /Applications/Sublime Text.app/Contents/MacOS/plugin_host
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_file_settings
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
plugins loaded
loaded 837 snippets
sublime.log_commands(True);sublime.log_input(True);s=sublime.load_settings(“Preferences.sublime-settings”);print(s.get(‘word_separators’, ‘Nothing’));s=sublime.load_settings(“Package Control.sublime-settings”);print(s.get(‘installed_packages’, ‘Nothing’));
./()"’:,.;<>~!@#$%^&*|+=]{}`~?
Nothing
command: drag_select {“event”: {“button”: 1, “x”: 49.12109375, “y”: 38.703125}}
key evt: control+right
command: move {“by”: “subword_ends”, “forward”: true}
key evt: control+right
command: move {“by”: “subword_ends”, “forward”: true}
command: drag_select {“event”: {“button”: 1, “x”: 52.6484375, “y”: 60.984375}}
key evt: control+right
command: move {“by”: “subword_ends”, “forward”: true}
command: drag_select {“event”: {“button”: 1, “x”: 49.25390625, “y”: 75.94921875}}
key evt: control+right
command: move {“by”: “subword_ends”, “forward”: true}
key evt: control+right
command: move {“by”: “subword_ends”, “forward”: true}
command: drag_select {“event”: {“button”: 1, “x”: 427.51171875, “y”: 687.78125}}
key evt: super+a
command: select_all
And here’s a quick video of that process so you know I’m not completely crazy :
dl.dropboxusercontent.com/u/575111/hyphens.mp4
I bet other applications behave the same, right?
Take a look to the default keybindings, search for “subwords”, and “words”; customize as desired and paste the result in you user keybindings.