Sublime Forum

Dev Build 2041

#2

Contexts aren’t supported in mousemaps, but there’s no reason they couldn’t be - just need some compelling examples to justify the code.

I’m planning to add mouse gestures in the future, but it needs UI support to be done properly, and there are other things that need doing first.

0 Likes

#3

Here’s an example of something else that can be done in the mousemap:

{
	"button": "button4", "modifiers": "ctrl"],
	"command": "cut", "press_command": "drag_select"
}

This will let you select a block of text with ctrl+mouse4, and the text will be cut as soon as you release the button.

0 Likes

#4

This sounds pretty interesting:

Build files may specify environment variables, using the env key
Added build_env file preference, which will be picked up by the build system
Added env file preference, which will be picked up by the build system

Could you elaborate on how this works?

0 Likes

#5

Now all I need is my 8-button mouse!

0 Likes

#6

Not sure if that’s related but the thing I wanted to do is to put “Copy full file path” item into tab’s context menu.

So I’ve added:
" { “command”: “copy_path”, “caption”: “Copy Full File Path” }, "
to “Tab Context.sublime-menu”.

and that works but only on active tab. If I use it on background tab then it still copies path of active file.

So if that’s somehow related to your work done here, then maybe it’s easy to fix now.

0 Likes

#7

[quote=“sublimator”]
Seems exec takes env keyword arg for per run configuration, seemingly expecting a mapping like {“BLA”: “BLA”}.

There’s also a settings key build_env which takes a map. I’m assuming the run env vars win[/quote]

I guess so. I haven’t downloaded the build yet, was hoping for easy answers :smile:

0 Likes

#8

Take for example “left click on a link opens an url”. I’ve written a syntax file and a TextCommand. With mouse bindings I would also be able to trigger this TextCommand via a left click. Currently it’s only triggered when in the correct scope and pressing enter.

PS: I’m currently writing something like orgmode. Of course it does not have all the bells and whistles yet, but mouse interaction is one thing I would need/want anyway for this project.

0 Likes

#9

Or another example:
My orgmode plugin has checkboxes. These can currently be toggled by bringing the cursor over them (correct scope) and hitting return. This could also be triggered alternatively by a left click.

0 Likes

#10

[quote=“theblacklion”]Or another example:
My orgmode plugin has checkboxes. These can currently be toggled by bringing the cursor over them (correct scope) and hitting return. This could also be triggered alternatively by a left click.[/quote]

I take it the context would be that the mouse click is between ] right?

0 Likes

#11

[quote=“jbrooksuk”]

[quote=“theblacklion”]Or another example:
My orgmode plugin has checkboxes. These can currently be toggled by bringing the cursor over them (correct scope) and hitting return. This could also be triggered alternatively by a left click.[/quote]

I take it the context would be that the mouse click is between ] right?[/quote]

The scope currently covers the brackets. So it would be anywhere on or between these.

0 Likes

#12

Jon, I’ve an issue with the key bindings on OSX. When defining super+shift+o for example, it requires me to define super+shift+O. This is obviously strange and only applies to super+shift+something bindings.

0 Likes

#13

I feel as if I was in a flight simulator… My mouse wheel scrolls the screen in the opposite direction :smile:

0 Likes

#14

BUG:? Double clicking a file in the sidebar (as is customary to open a file on windows) will open the file directly above the file clicked on (in the sidebar dir tree).

0 Likes

#15

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)?

0 Likes

#16

Am I supposed to be able to edit a file while the Goto Anything panel is up? If I bring up the panel and select a file but don’t hit Return, I can click in the previewed file to activate it, and then I can edit it, scroll around, etc., all while the GA panel just hangs out in front. Not sure if this is intended behavior.

0 Likes

#17

Thanks for pointing this out! I thought I was going insane…

0 Likes

#18

The new mousemap files are great. It is a very innovative idea.
It would be great if you could target specific areas of the UI as well.
This would allow for configuring things like double clicking on the tab bar for a new file or triple-click for open.
Hold right-click and click left to save all, double-click to close a tab, hold ctrl and click left on a tab to save … you get the idea.
This would be even more useful when interacting with the sidebar.

0 Likes

#19

[quote=“tstrokes”]The new mousemap files are great. It is a very innovative idea.
It would be great if you could target specific areas of the UI as well.
This would allow for configuring things like double clicking on the tab bar for a new file or triple-click for open.
Hold right-click and click left to save all, double-click to close a tab, hold ctrl and click left on a tab to save … you get the idea.
This would be even more useful when interacting with the sidebar.[/quote]

Things like tabs could then be caught via context - I want to have context support ^^.

0 Likes

#20

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:

Thanx!
Richard

0 Likes

#21

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

0 Likes