System : A way to use ":call system('cmd')" via ":! cmd" (note the space)
| script karma
Downloaded by 117
Comments, bugs, improvements
script versions (upload new version)
|If you downrate the plugin, let me know why you don't like the simple hack
[mszamot AT gmail DOT com].
In vim (not gvim) when you execute command via ":!command" you go back and
forth to a terminal. Some times you'd like to avoid this and you'd rather use
":echo system('command')" but that's a lot of typing, there is no completion
and % is not expanded (for some this might be a feature actually). With this
plugin when you type ":! command" (note the space between "!" and the command)
the command will be executed as ":echo system('command')". One of the
benefits is that you have access to the excellent vim command line completion
(for both programs and file names) - something that is inaccessible using
See the script how you can configure it to your needs. The script adds the ":!
command" to the history (so in the history you will find both) and removes the ":call system('command')" from it.
It is very useful, when your background color in vim and terminal are different (for example light terminal and dark vim, in which case executing commands in the terminal will make an annoying flash)
Thanks to emacscommandline plugin vimscript#3554 I knew how to implement this.
|Put the script in to your plugin folder.|
Click on the package to download.
ip used for rating: 18.104.22.168