Sublime Forum

Dev Build 2041

#25

[quote=“adzenith”]I’m really excited about the mouse commands!

Quick question: if I log_commands and click around, it prints a fair amount of information:

command: mouse_test {"event": {"button": 1, "x": 426, "y": 246}, "subtractive": true}

But if I make a test command, and print out the args and kwargs, I don’t get any of that sweet mouse information:

code
(‘kwargs:’, {‘subtractive’: True})
[/code]
Is there any way to access this? Perhaps also a command like view.rowcol(x_coord, y_coord)?[/quote]

The event parameter is stripped out in sublime_plugin.py, I’ve got nothing against including it, but as you say, it’ll need some corresponding API commands that deal with screen coordinates.

0 Likes

#26

Thanks - the problem with key bindings and super+shift+something on OSX seems to be solved.
Let’s see if the key binding for fast project switching stays put.

0 Likes

#27

[quote=“jps”]

You could make a .sublime-build file like this:

{
    "cmd": "$file"]
}

I should probably include this in the default distribution.[/quote]

this was the respond:

Running N:\ahk work\bödöníró_v2.2_beta.ahk
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 218, in run_
    return self.run(**args)
  File ".\exec.py", line 118, in run
  File ".\exec.py", line 29, in __init__
  File ".\subprocess.py", line 633, in __init__
  File ".\subprocess.py", line 842, in _execute_child
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 14: ordinal not in range(128)

Then i realised that, maybe something wrong my “wierd” letters in my file name. With normal file name :

[Error 193] %1 is not a valid Win32 application
[Finished]
0 Likes

#28

[quote=“jps”]

Can you provide some more details? My mouse wheels are all scrolling the correct way[/quote]

Only happened on Windows XP Pro after trying random combinations like ctrl+shift+right button. I tried a few and later I realized the problem. I haven’t been able to reproduce it. For completeness, the machine where I had this problem has Japanese support installed.

Tried the same at home on Windows 7 Ultimate and haven’t been able to reproduce this.

0 Likes

#29

I have this too, added to userecho before I saw it here sublimetext.userecho.com/feedbac … e-in-list/

Basically double-click opens the file, adds it to the group list in the sidebar which pushes all the files down by 1 step, and then there’s a strange “third” click which focuses the next file up in the list (which is now in the same position as the cursor).

0 Likes

#30

[quote=“JLikeF”]
I have this too, added to userecho before I saw it here sublimetext.userecho.com/feedbac … e-in-list/

Basically double-click opens the file, adds it to the group list in the sidebar which pushes all the files down by 1 step, and then there’s a strange “third” click which focuses the next file up in the list (which is now in the same position as the cursor).[/quote]

I can reproduce the same problem. Windows 7 x64, Sublime Text 2 build 2042 (x64)

Steps to reproduce:

  • No file is open

  • Single click a file in the sidebar, it previews in the main area

  • Double click the file, it opens, but tab is not focused

  • Double click another file, it opens, but the focus is not on the new file

  • Single click on the file in the sidebar bring focus to the newer file

0 Likes

#31

That’s for the details repro - I can replicate it here now; will fix for the next version.

0 Likes

#32

Thanks! The amount of times I’ve opened a file today and thought “huh, where’s my code? what’s going on?”, I’m sure sleep and other factors are involved but it’s getting me almost every time!

0 Likes

#33

JSON.tmLanguage should be thought about this extension to enable highlighting.

0 Likes

#34

[quote=“rchl”]

JSON.tmLanguage should be thought about this extension to enable highlighting.[/quote]

Also:

  • typo here: “// Switch files with buttonns 4 and 5”
  • my mouse also has wheel that can be tilted. On Windows, these trigger WM_MOUSEHWHEEL message. Can this be customizable too as scroll_left/scroll_right actions? I would like to bind these to tab change.
0 Likes

#35

scroll_left and scroll_right should already work as bindable buttons.

0 Likes

#36

In general, only commands that take “group” and “index” arguments should be used in the tab context menu, that way they’ll apply to the correct tab (commands that are independent of the clicked on tab, like new_file, are fine too). It’s not possible to make commands that do this with the API yet, unfortunately.

0 Likes

#37

Added:

{ "button": "scroll_left", "modifiers": ], "command": "prev_view" },
{ "button": "scroll_right", "modifiers": ], "command": "next_view" },

but didn’t really have any success with that.

0 Likes

#38

scroll_left and right aren’t usable for mouse bindings by themselves, as they’ll get eaten for scrolling. They have to be used with at least one modifier (but note that ctrl and shift modifiers don’t work with scroll_left and scroll_right in this version, I’ll fix it for the next one).

0 Likes

#39

For some reason none of the completions/snippets that use “:” are ever working for me.

For example groovy has “m:” as a tab target but pressing “m”+":"+“tab” never works.
Same goes for the “<:” in text.xml scope.

anyone else experiencing this?

I’m using Sublime Text 2 Build 2042 Win x64 (portable zip).

0 Likes

#40

You know what?
I’m figuring that colon is used to differentiate between snippets and completions in the completions drop down list (ctrl+space) and is not part of the tab target.

What is interesting is that the text.xml scope has long-tag and short-tag snippets and the tab targets for those do include a trailing colon. Yet those don’t trigger. In source.groovy’s completions drop down list there’s “::” "key value pair (hash) and “!:” “assert” and others that do not include a trailing colon in the snippet’s tab target yet they don’t fire on tab either.

I think the problem lies in some ST2’s function not recognizing non-alpha-numeric characters as tag triggers.
So, definitely a bug.

0 Likes

#41

Snippets don’t trigger on non-alphanumeric triggers. This was introduced in the recent snippet rework, it’s on the TODO list to enable it again.

0 Likes

#42

Thanks for confirming this :smile:

0 Likes

#43

[quote=“RNHurt”]I’m on OS X and switching between tabs with the keyboard shortcut is not working reliably. Previously, using CMD+SHIFT+} to go to the next tab worked very well but after this update it seems to break when ST2 loses focus. I’m forced to go to the File->Switch Files->Next File menu item and then the keyboard shortcuts seem to start working again.

I can’t reproduce the problem with 100% certainty and at first I thought it was my imagination. But it’s happened several times in the past several hours and I’m pretty sure its a bug. If there is a better place to file a bug report please let me know and I’ll make it official. :smile:
[/quote]

Build 2042 solved this problem.

Thanx!
Richard

0 Likes

#44

Bug report in OS X:
With no windows open:

  • Create a new document (creates a new window)

  • Open Goto Anything

  • Press cmd+w twice (once to close the document, once to close the window)

Sublime Text 2 crashes.

Also, in Google Chrome, pressing cmd+l with no open windows will create a new window and then focus on the address bar there. Could similar behavior be added to Sublime Text? I.e., if I press cmd+p with no open windows, it’d be nice if a window could open to show the panel, or if the panel could show without a window. That’s how I hit this bug—I hit cmd+n to make a new window just so I could hit cmd+p to bring up the panel and cmd+w to close the temporary document I made.

0 Likes