Sublime Forum

Inc-Dec-Value (ST2 and ST3)

#15

[quote=“bizoo”]Nice plugin, thanks for sharing.

Could you put it in the Package Control repository to simplify the installation and make it more visible for the users ?[/quote]

“PackageControl” - I have not used it yet. It’s really good?
I’m still doing everything manually.

0 Likes

#16

[quote=“rmaksim”]
“PackageControl” - I have not used it yet. It’s really good?
I’m still doing everything manually.[/quote]

Yep, it really make life easier, especially for the automatic update of the plugins.

Simply clone the repository (https://github.com/wbond/package_control_channel), add your plugin and send a pull request.
You could also put a link to github/bitbucket in the Packages\User\Package Control.sublime-settings for plugins not in the central repository (what I’ve done for your plugin and a few others).

0 Likes

#17

+1 for adding this to Package Control (This would really help to discover this nice plugin for potential users - https://forum.sublimetext.com/t/plugin-idea-number-adder-substracter/3211/1)

0 Likes

#18

This plugin is totally awesome. Thank you very very much!

0 Likes

#19

I sent pull request github.com/wbond/package_contro … el/pull/42
Probably have to wait a bit.

0 Likes

#20

UPDATE: v0.1.0

opposite relations or cycled enumerations
true/false, True/False, TRUE/FALSE, left/right
also
** truE > false, tRUe > false, FaLsE > true, LeFT > right`**

Pressing the key **`super+alt+up/down`** changes the value under the cursor ("true" or "false") to the opposite

**Version 0.1.0** adds the ability **to cycle more than two values**:

** “Jan” > “Feb” > “Mar” > … > “Dec” > “Jan”**

Example of settings see in [https://github.com/rmaksim/Sublime-Text-2-Inc-Dec-Value/blob/master/inc_dec_value.sublime-settings](https://github.com/rmaksim/Sublime-Text-2-Inc-Dec-Value/blob/master/inc_dec_value.sublime-settings)

also in v0.1.0 settings added to the menu

Preferences -> Package Settings -> Inc-Dec-Value (Settings and Key Bindings)

0 Likes

#21

A really great plugin, thanks for sharing.

There is only one issue:
There is no “super” key in Windows, so the included keymaps doesn’t work (or I don’t know how to trigger it).

FWYK, the only free keymaps with the up/down arrows is shift+alt+(up/down)

0 Likes

#22

Thanks! )

in Linux super = win, may be and in Windows?

0 Likes

#23

[quote=“rmaksim”]

in Linux super = win, may be and in Windows?[/quote]

You’re right! Never realized that.
Unfortunately win+(up/down) is already used by Windows 7, so it doesn’t work for ST2.

May I ask you to replace the super+(up/down) keymaps by ctrl+super+(up/down) (or something else) in Windows keymaps file?
Thanks.

0 Likes

#24

[quote]Unfortunately win+(up/down) is already used by Windows 7, so it doesn’t work for ST2.

May I ask you to replace the super+(up/down) keymaps by ctrl+super+(up/down) (or something else) in Windows keymaps file?
Thanks.[/quote]

in windows used by default with ctrl+alt

{ "keys": "ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} }, { "keys": "ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
also in windows and linux

{ "keys": "ctrl+up"], "command": "scroll_lines", "args": {"amount": 1.0 } }, { "keys": "ctrl+down"], "command": "scroll_lines", "args": {"amount": -1.0 } },

I did so, that would be adjacent keys, and did not have to memorize other combinations
alt, win, alt+win

May be other suggestions?
for example: alt+left/right, super+left/right, super+alt+left/right - if you’re not using them
or alt+pageup/pagedown, super+pageup/pagedown, super+alt+pageup/pagedown

0 Likes

#25

Just wanted to say: I love this plugin. Great idea and well executed.

I did change my keymapping on OS X to:


    { "keys": "alt+up"],         "command": "inc_dec_value", "args": { "action": "inc_min" } },
    { "keys": "alt+down"],       "command": "inc_dec_value", "args": { "action": "dec_min" } },

    { "keys": "super+alt+up"],       "command": "inc_dec_value", "args": { "action": "inc_max" } },
    { "keys": "super+alt+down"],     "command": "inc_dec_value", "args": { "action": "dec_max" } },

    { "keys": "super+alt+ctrl+up"],   "command": "inc_dec_value", "args": { "action": "inc_all" } },
    { "keys": "super+alt+ctrl+down"], "command": "inc_dec_value", "args": { "action": "dec_all" } }
]

…as i very often use cmd-up/down as Home/End when editing code.

0 Likes

#26

[quote=“natebeaty”]Just wanted to say: I love this plugin. Great idea and well executed.

I did change my keymapping on OS X to:


    { "keys": "alt+up"],         "command": "inc_dec_value", "args": { "action": "inc_min" } },
    { "keys": "alt+down"],       "command": "inc_dec_value", "args": { "action": "dec_min" } },

    { "keys": "super+alt+up"],       "command": "inc_dec_value", "args": { "action": "inc_max" } },
    { "keys": "super+alt+down"],     "command": "inc_dec_value", "args": { "action": "dec_max" } },

    { "keys": "super+alt+ctrl+up"],   "command": "inc_dec_value", "args": { "action": "inc_all" } },
    { "keys": "super+alt+ctrl+down"], "command": "inc_dec_value", "args": { "action": "dec_all" } }
]

…as i very often use cmd-up/down as Home/End when editing code.[/quote]

These keymaps works fine for Windows 7 too.
And I find them good and logic, more key you press, bigger the increments.

0 Likes

#27

[quote=“bizoo”]These keymaps works fine for Windows 7 too.
And I find them good and logic, more key you press, bigger the increments.[/quote]

I am very glad that you have found the use of this package.
Everyone has their own preferences, and given this wonderful opportunity to change the settings.

Thank you for your understanding.

0 Likes

#28

:question:
Sorry but maybe my bad English play tricks on me, do you mean that you don’t want to change the keymaps for Windows ?
Or you don’t like the propositions ?

{ "keys": "super+up"], "command": "inc_dec_value", "args": { "action": "inc_max" } }, { "keys": "super+down"], "command": "inc_dec_value", "args": { "action": "dec_max" } },
These keymaps are impossible to trigger in a Windows 7, so don’t you think they must be replaced by something else ?

Well, I put my keymaps in my user file so it doesn’t really matter for me, I only think it’s better for new users.

0 Likes

#29

I suggest the following key combination for Windows:

alt+up/down => inc_min/dec_min
super+alt+up/down => inc_max/dec_max

super+ctrl+up/down => inc_all/dec_all

Try it, whether it is convenient to use that key combination?
My idea was to “min” and “max” were as close as possible to each other, “all” as a complement to them.

Or do you suggest as suggested by natebeaty? I’m sorry, but I got confused in the proposals :unamused:

0 Likes

#30

[quote=“rmaksim”]

I suggest the following key combination for Windows:

alt+up/down => inc_min/dec_min
super+alt+up/down => inc_max/dec_max

super+ctrl+up/down => inc_all/dec_all

Try it, whether it is convenient to use that key combination?
My idea was to “min” and “max” were as close as possible to each other, “all” as a complement to them.

Or do you suggest as suggested by natebeaty? I’m sorry, but I got confused in the proposals :unamused:[/quote]

These keymaps work fine for Windows 7 and are as good as others.
My personal preference go to natebeaty proposition cos all his keymaps share the same ‘base’ (alt+up/down) and you add one or two more key to increase the increment, find it easy to remember and easy to use.

But anyway the only important thing is to have functional keymaps in all OS. People could change them easy to what they want.
Thanks again for your works.

0 Likes

#31

Any good idea on how to easy convert something like

  • 1
  • 1
  • 1
  • 1
  • 1
  • to

  • 1
  • 2
  • 3
  • 4
  • 5
  • thx

    0 Likes

    #32

    One way:

    • Install PowerShellUtils package
    • Select all numbers
    • Run “run_powershell” command
    • Type “++$a” in the prompt (without quotes)
    • Press Enter

    There might be other plugins out there to do the same, but this is the one I use. Of course, it will only work on Windows :confused:

    0 Likes

    #33

    [quote=“whololo”]

  • 1
  • 2
  • 3
  • 4
  • 5
  • [/quote]

    If you are using ZenCoding you can write the following:

    li*5>{$}and press Tab

    0 Likes

    #34

    I just want to say that this plugin is just fu****g great!!! :smile:
    Awesome work!

    0 Likes