Skip to content

t-bltg/ToggleWords

 
 

Repository files navigation

#About

Plugin for Sublime Text 3 - toggle words with support for user defined arrays.

 true -> false
  yes -> no
   on -> off
    0 -> 1
 left -> right
  top -> bottom
   up -> down
width -> height

and this automatically understand original words and ->

false <-> true
False <-> True
FALSE <-> TRUE

#Usage

Set cursor on word or select word and press Cmd+Alt+x (OS X), WinKey+Alt+x (Windows) or Super+Alt+x (Linux).

#Installation

  1. Install Package Control
  2. Open ST command panel (Shift+Control+P), choose Package Control — Install Package, type Toggle, find Toggle Words and press Enter
  3. Have fun!

or

  1. Open you Sublime Text 3 Packages directory
  2. Run git clone git://github.com/gordio/ToggleWords
  3. Have fun!

#Configure

Keys

You may redefine the key bindings in your sublime-keymap with command toggle_word.

User defined arrays

You can define lists of words, which will be cycled through in order.

Example file ToggleWords.sublime-settings:

{
    // User defined words
    "toggle_word_dict": [
        ["left", "right"],
        ["up", "down"],
        ["top", "bottom"],
        ["width", "height"],
        ["red","orange","yellow","green","blue","purple"],
        ["true", "false"],
        ["yes", "no"],
        ["on", "off"],
        ["0", "1"]
    ]
}

If installed using Package Control dictionary file should be located in <data_path>/Packages. To get there select Preferences -> Browse Packages... in Sublime menu. Create one if it does not exist.

About

Sublime Text 3 Plugin - Toggle words on hotkey

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 59.7%
  • JavaScript 40.3%