UPDATE: Support dates in ISO format “YYYY-MM-DD”
The increase in year / month / day is its own, without checking the validity of the resulting date.
For days, the value of loops between 1 and 31, for months - loops between 1 and 12.
UPDATE: Support dates in ISO format “YYYY-MM-DD”
The increase in year / month / day is its own, without checking the validity of the resulting date.
For days, the value of loops between 1 and 31, for months - loops between 1 and 12.
UPDATE: BONUS - string actions - uppercase/lowercase/capitalize
Pressing the key alt+up
makes the first letter in the word in Uppercase (Capitalize) without affecting the remaining characters.
Pressing the key super+up
makes the word in UPPERCASE.
Pressing the key alt+down
or super+down
makes the word in lowercase.
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=“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.
[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).
+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)
I sent pull request github.com/wbond/package_contro … el/pull/42
Probably have to wait a bit.
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)
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)
[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.
[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
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=“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.
[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.
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.
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
[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 [/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.