sponsor Vim development Vim logo Vim Book Ad

CRDispatcher : dispatch CR in the command line

 script karma  Rating 20/5, Downloaded by 1734  Comments, bugs, improvements  Vim wiki

created by
Marcin Szamotulski
 
script type
utility
 
description
# CRDispatcher Vim Plugin
This is a utility plugin which is used in my other Vim plugins.  It let
regieter callback functions which transform the command line after hitting
enter: for example EnchantedVim is using it to add `\v` to patterns.

It also has a nice hack to make `c_CTRL-f` work nicely: it will transform
the line when entering the command line.  The `crdispatcher#CRDsiaptcher` dict
which is passed to callbacks has `ctrl_f` entry which is `1` in this case.
This is useful if a callback should only be used with `<cr>` or `ctrl-f`.

The plugins that depend on it are:
* [System](https://github.com/coot/System)
* [CommandAlias](https://www.github.com/coot/cmdalias_vim)
* [EnchantedVim](https://github.com/coot/EnchantedVim)

## Callbacks
Every callback function axcepts one argument: the crdispatcher#CRDispatcher
dictionary, and it can modify the cmdline value.

## Note
You can use the expression register with Vim 7.3.686 or later.  With an earlier version
you will not be able to use it.

## Code
This plugin is a simple example of OO programing in VimL.

* Copyright: © Marcin Szamotulski, 2014
* License: vim-license, see `:help license`
 
install details
Open the vimball file in vim and source it with  :so%
 

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
crdispatcher.vmb 2 2014-03-01 7.0 Marcin Szamotulski New better version which includes parsers for command line.
crdispatcher.vba 1 2014-02-06 7.3 Marcin Szamotulski Initial upload
ip used for rating: 142.132.191.50

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.
   
Vim at Github