Adds a `cycle_setting` command to Sublime Text 2, complementing the built-in `set_setting` and `toggle_setting`.
- Total 154
- Win 83
- Mac 46
- Linux 25
|Jun 4||Jun 3||Jun 2||Jun 1||May 31||May 30||May 29||May 28||May 27||May 26||May 25||May 24||May 23||May 22||May 21||May 20||May 19||May 18||May 17||May 16||May 15||May 14||May 13||May 12||May 11||May 10||May 9||May 8||May 7||May 6||May 5||May 4||May 3||May 2||May 1||Apr 30||Apr 29||Apr 28||Apr 27||Apr 26||Apr 25||Apr 24||Apr 23||Apr 22||Apr 21|
Cycle Setting plugin for Sublime Text 2.
Copyright 2012 Jesse McCarthy <http://jessemccarthy.net/>.
Adds a command that can be called from a key binding to toggle or
cycle through values for a non-boolean setting.
The Software may be used under the MIT (aka X11) license or Simplified
BSD (aka FreeBSD) license. See LICENSE
There are 'set_setting' and 'toggle_setting' commands built in to
Sublime Text 2 that can be called from key bindings. But, as far as I
can tell, 'toggle_setting' only works for boolean settings, such as
This plugin adds a 'cycle_setting' command that can cycle through
several values for a setting, or toggle between two for a non-boolean
setting. An example setting is 'draw_white_space'. 'cycle_setting'
can be used to cycle through the values 'none', 'selection', and
'all', or toggle between two, such as 'none' and 'all'.
Currently this changes the setting for the current buffer, like the
built in 'set_setting' and 'toggle_setting'.
See the sample sublime-keymap file for an example.
Set 'command' to 'cycle_setting'.
Set 'args.setting' to the desired setting.
Set 'args.options' to a list of the setting values you want to cycle
* Figure out a way to skip this code if a built in command of the same
* name, and especially with the same features, is introduced.
* Figure out if some settings have enumerated values that I can read
* in the plugin, in case the user would just like to cycle through all
* available options.