Git Product home page Git Product logo

tslime.vim's Introduction

tslime.vim

This is a simple vim script to send portions of text from a vim buffer to a running tmux session.

It is based on slime.vim, but uses tmux instead of screen. However, unlike tmux, screen doesn't have a notion of panes. This script has been adapted to take panes into account.

Note: If you use a version of tmux earlier than 1.3, you should use the stable branch. The version available in that branch isn't aware of panes so it will paste to pane 0 of the window.

Settings

You can tell tslime.vim to use the current session and current window; this let's you avoid specifying this on every upstart of vim.

let g:tslime_always_current_session = 1
let g:tslime_always_current_window = 1

These are disabled by default, meaning you will have the ability to choose from every session/window/pane combination.

With some interpreters it is often necessary to input an empty line at the end of a code block in order to trigger code execution. Such is the case for instance with the Python interpreter. You can specify language specific settings with autocommands

au FileType python let g:tslime_ensure_trailing_newlines = 2

Setting Keybindings

You can modify default keybindings by setting:

" To grab the current method that a cursor is in normal mode
let g:tslime_normal_mapping = '<c-c><c-c>'
" Or a single line at a time
let g:tslime_normal_next    = '<a-enter>'

" To send a selection in visual mode to tmux
let g:tslime_visual_mapping = '<c-c><c-c>'

" To send any text object or motion to tmux from normal mode
let g:tslime_operator       = '<c-c>o'

" Use the following to reset the session, window, and pane info
let g:tslime_vars_mapping   = '<c-c>v'

tslime.vim's People

Contributors

jgdavey avatar cc0ut avatar unode avatar pbackus avatar trevoke avatar brandonbloom avatar chrisberkhout avatar cheif avatar xuanduc987 avatar teranex avatar jivagoalves avatar kassio avatar nicklamuro avatar nicoder avatar

Watchers

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