sponsor Vim development Vim logo Vim Book Ad

smartchr : Insert several candidates with a single key

 script karma  Rating 52/16, Downloaded by 2869  Comments, bugs, improvements  Vim wiki

created by
Kana Natsuno
script type
*smartchr* is a Vim plugin to support input several candidates with a single
key, like ess-smart-underscore in Emacs Speaks Statistics -- when user types
"_" key, it inserts " <- " for the first time or it replaces " <- " by "_" for
the second time.  This plugin provides functions to support to define such
key bindings easily.  For example:

inoremap <expr> _  smartchr#one_of(' <- ', '_')

- Vim 7.1 or later

Latest version:

Document in HTML format:
install details

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-smartchr-0.1.1.zip 0.1.1 2010-02-21 7.0 Kana Natsuno - Add |smartchr-context| to enable/disable |smartchr-functions| in specified context.

  Example configuration:
  cnoremap <expr> (  smartchr#loop('\(', '(', {'ctype': '/?'})
vim-smartchr-0.1.0.zip 0.1.0 2010-02-17 7.0 Kana Natsuno - Support Command-line mode.  (Thanks to Tatsuhiro Ujihisa for reporting this)

  Example configuration:
  cnoremap <expr> <Bslash>  smartchr#loop('~/', '<Bslash>')
vim-smartchr-0.0.1.zip 0.0.1 2008-08-27 7.0 Kana Natsuno - Add |smartchr#loop()|.
vim-smartchr-0.0.0.zip 0.0.0 2008-07-11 7.0 Kana Natsuno Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.