Toggle_words is a Vim add-on that streamlines word toggling, enabling users to alternate between equivalent pairs, such as "True" and "False" or "true" and "false," with ease.
One of the great things about toggle_words is how customizable it is. You can define specific words and sequences for toggling in different file types by adding configurations to your .vimrc file. For example, to define some words for Python, you can add the following configuration:
let g:toggle_words_dict = {'python': [['if', 'elif', 'else']]}
There are also default words included in the plugin that work for all file types.
When using toggle_words, the script takes the case of the word into account. This means that 'True' will toggle to 'False' instead of 'false'. While the case sensitivity is currently rather simple, it works well for most usage scenarios.
To make using toggle_words even easier, you can define a map for the :ToggleWord command. For example:
nmap ,t :ToggleWord
Overall, toggle_words is a great plugin for Vim users who want a quick and handy way to toggle words without the hassle of manual editing. If you have any comments, suggestions or bug reports, the developer is more than happy to hear them.
In case you're not familiar with Vim, it is a popular text editor that was first released in 1991. Vim is designed primarily for editing program source code and has many helpful features to make this task easier. While Vim is available for multiple operating systems, it is most commonly used on Unix-like systems. It is also free and open source software, with a tutorial for beginners and a detailed manual for more advanced features. Vim's interface is based on commands in a text user interface, though its GUI mode includes menus and toolbars as well. To use toggle_words, you just need to put the script into your Vim plugin folder – it's that easy!
The latest release of toggle_words includes a fix for the error of 'E488: Trailing characters', so you can be sure that the plugin is up to date and running smoothly.
Version 1.3: N/A