Adds a `cycle_setting` command to Sublime Text 2, complementing the built-in `set_setting` and `toggle_setting`.
- Total 154
- Win 83
- OS X 46
- Linux 25
|Nov 15||Nov 14||Nov 13||Nov 12||Nov 11||Nov 10||Nov 9||Nov 8||Nov 7||Nov 6||Nov 5||Nov 4||Nov 3||Nov 2||Nov 1||Oct 31||Oct 30||Oct 29||Oct 28||Oct 27||Oct 26||Oct 25||Oct 24||Oct 23||Oct 22||Oct 21||Oct 20||Oct 19||Oct 18||Oct 17||Oct 16||Oct 15||Oct 14||Oct 13||Oct 12||Oct 11||Oct 10||Oct 9||Oct 8||Oct 7||Oct 6||Oct 5||Oct 4||Oct 3||Oct 2|
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.