Giter Club home page Giter Club logo

vim-tmuxify's Introduction

vim-tmuxify

This is a shiny Vim plugin for handling tmux panes from within Vim!

Features:

  • create/kill associated panes
  • associate tmuxify to already existing panes
  • send visually highlighted lines to the associated pane
  • send to pane by prompting for input
  • send to pane by setting a run command for the current filetype
  • once set, run commands are remembered, but can easily be reset
  • all the plugin configuration happens in one dictionary that holds filetypes as keys and run commands as values

Feedback, please!

If you use any of my plugins, star it on github. This is a great way of getting feedback! Same for issues or feature requests.

Thank you for flying mhi airlines. Get the Vim on!

Installation

If you have no preferred installation method, I suggest using tpope's pathogen:

  1. git clone https://github.com/tpope/vim-pathogen ~/.vim/bundle/vim-pathogen
  2. mkdir -p ~/.vim/autoload && cd ~/.vim/autoload
  3. ln -s ../bundle/vim-pathogen/autoload/pathogen.vim

Afterwards, installing tmuxify is as easy as pie:

  1. git clone https://github.com/mhinz/vim-tmuxify ~/.vim/bundle/vim-tmuxify
  2. start Vim
  3. :Helptags
  4. :h tmuxify

Options

Put these variables into your vimrc for great enjoyment. The shown examples are also the default values.

let g:tmuxify_pane_split = '-v'

Split either vertically or horizontally. The two possible values are therefore '-v' and '-h'.

let g:tmuxify_pane_size = '10'

The size of the associated pane.

let g:tmuxify_run = {}

Set run commands for specific filetypes. '%' will be replaced by the full path to the current buffer.

Example:

let g:tmuxify_run = {
    \ 'sh': 'bash %',
    \ 'go': 'go build %',
    \}

Mappings

<leader>mn

Executes TxCreate. Creates a new pane and associates with it.

<leader>mq

Executes TxKill. Closes the associated pane.

<leader>ms

Executes TxSend. Prompts for input and sends it to the associated pane. This mapping also works on visual selections.

<leader>mr

Executes TxRun. Prompts for input if there is no entry in g:tmuxify_run for the current filetype. '%' will be replaced by the full path to the current buffer.

<leader>mt

Executes TxSetRunCmd. Change the run command for the current filetype.

<leader>mp

Executes TxSetPane. Associate an already existing pane with tmuxify. Note: You can use tab completion here.

<leader>mc

Executes TxClear. This is a shortcut for TxSend('clear').

<leader>mb

Executes TxSigInt. Sends an interrupt signal to the associated pane.

Documentation

:h tmuxify

Author

Marco Hinz <[email protected]>

License

Copyright © Marco Hinz. Distributed under the same terms as Vim itself. See :help license.

vim-tmuxify's People

Contributors

mhinz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

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.