Giter VIP home page Giter VIP logo

system's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=4224

I# System Vim Plugin

This is a tiny vim script which might have been discovered ages ago (but I am
unaware). Its rather for vim than gvim users.

When executing commands from vim you enter a vim shell where you see the
output. In many situations this is not what you want and you'd prefer 
```viml
    :call system("command")
```
but it is a lot to type, and you don't have completion. With this snippet
every command which starts with:
```viml
    :! command
```
(note the space after the `!`) will be wrapped into `system()` and the output
will be echoed. The plugin refreshes the history with what you typed rather
than the call to the `system()` function.

There are some configuration variables:
```viml
    g:system_expand = 1
```
by default `%` (with modifiers) is expanded in the same way as by the `:!`.
```viml
    g:system_echocmd = 0
```
echo the command together with its output (by default off).

The reason why I like it is that I have different background colors in vim
(dark) and terminal (light). If I stay inside vim I am not flushed with
bright colors which is a annoying (and may be eyes tiring).

Benefits: you get completion for system commands and system files.

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

# Requirements
You have to also install [CRDispatcher](https://github.com/coot/CRDispatcher)
plugin.

I learned how to do that reading the
[EmacsCommandLine Plugin](https://github.com/houtsnip/vim-emacscommandline).

Other plugins with shell like functionality:
* [vim-addon-async](https://github.com/MarcWeber/vim-addon-async)
* [Conque Shell Plugin](http://code.google.com/p/conque)
* [VimProc Plugin](http://github.com/Shougo/vimproc/tree/master/doc/vimproc.txt)

## Copyright
© Marcin Szamotulski, 2012-2014

## License
Vim license, see :help license

system's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.