Giter VIP home page Giter VIP logo

screen-vim---gnu-screentmux's Introduction

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

Screenshot:
http://eclim.org/_images/screenshots/vim/gnu_screen_shell.png

This plugin aims to simulate an embedded shell in vim by allowing you to easily
convert your current vim session into one running in gnu screen (or tmux) with
a split gnu screen window containing a shell, and to quickly send statements /
code to whatever program is running in that shell (bash, python, irb, etc.).
Spawning the shell in your favorite terminal emulator is also supported for
gvim users or anyone else that just prefers an external shell.

Currently tested on Linux and Windows (win32 gvim and cygwin vim), but
should also work on any unix based platform where screen is supported
(OSX, BSD, Solaris, etc.).

Windows Users: Whether you are using gvim or not, you will need cygwin
installed with cygwin's bin directory in your windows PATH.

Commands:
  :ScreenShell [cmd] - Starts a screen hosted shell performing the
    following steps depending on your environment.

    When running a console vim on a unix based OS (Linux, BSD, OSX):
      1. save a session file from your currently running vim instance
         (current tab only)
      2. start gnu screen with vim running in it
      3. load your saved session file
      4. create a lower gnu screen split window and start a shell, or if
         g:ScreenShellExternal is set, start an external terminal with
         screen running.
      5. if a command was supplied to :ScreenShell, run it in the new
         shell.
         Ex. :ScreenShell ipython

      Note: If you are already in a gnu screen session, then only steps
            4 and 5 above will be run.

    When running gvim:
      1. start an external terminal with screen running.
      2. if a command was supplied to :ScreenShell, run it in the new
         shell.
         Ex. :ScreenShell ipython

  :ScreenSend - Send the visual selection or the entire buffer contents to
    the running gnu screen shell window.

An example workflow may be:
  Open a python file to work on:
    $ vim something.py

  Decide you want to run all or pieces of the code in an interactive
  python shell:
    :ScreenShell python

  Send code from a vim buffer to the shell:
    :ScreenSend

  Quit the screen session and return to your original vim session:
    :ScreenQuit
      or
    :qa

github repo: http://github.com/ervandew/screen

screen-vim---gnu-screentmux's People

Contributors

ervandew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.