" Author: Marcin Szamotulski " Email: mszamot [AT] gmail [DOT] com " License: vim-license, see :help license " if !exists("g:system_expand") let g:system_expand = 1 " If 1 expand % as in the command line. endif if !exists("g:system_echocmd") let g:system_echocmd = 0 endif fun! WrapCmdLine(dispatcher) " {{{ " a:dispatcher: is crdispatcher#CRDispatcher dict if a:dispatcher.cmdtype !=# ':' || a:dispatcher.ctrl_f " Do not fire with return endif let cmdline = a:dispatcher.cmdline " Add cmdline to the history if cmdline[0:1] == "! " let cmd = cmdline[2:] call histadd(":", cmdline) if g:system_expand let cmd_split = split(cmd, '\ze\\\@