Switch

Switch is a simple switch that allows quick toggling of boolean options in Vim.
Download

Switch Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Toms Ribeiro Cardoso
  • Publisher web site:
  • http://www.vim.org/scripts/script.php?script_id=2214

Switch Tags


Switch Description

Switch is a simple switch that allows quick toggling of boolean options in Vim. Switch is a simple switch that allows quick toggling of boolean options in Vim.This plugin enables you to toggle any vim boolean options between 'on' and 'off' using just one key mapping.That's how it works:- The key mapping asks for one character as input and passes it to a function;- The function searches for the given key in the boolean options dictionary;- The function toggle the boolean option that corresponds to the found key.That's how to configure it:The options dictionary is found inside the 'config' section and is structured as the following sample, where the key entries are single alphabetic characters and the value entries are vim boolean options::let g:prev_Switch_Dict = { 'a' : 'showmatch' , 'b' : 'linebreak' , 'e' : 'errorbells' , 'f' : 'foldenable' , 'h' : 'hlsearch' }You should edit the options dictionary to your preference and that can be done in two ways:- Editing it inside the switch.vim file;- Setting it inside your .vimrc file.To see the list of the available boolean options type :set invThe dictionary can be quite large (as the default one is), yet switch.vim doesn't occupy any more then one key mapping. Note that getting used to those few keys you need most is far enough for this plugin to be helpful.That's how to use it:The default key mapping is < C-Q > (change it if you want to).- To see the actual dictionary content you type < C-Q >< Space >;- To toggle an option you type < C-Q >{key} Requirements:· VimWhat's New in This Release:· Many 'key:option' pairs added to the default boolean options dictionary· Echoing of the dictionary's keys visually improved· Dictionary's name changed to g:prev_Switch_Dict


Switch Related Software