Code Monkey home page Code Monkey logo

vim-tmux-navigator's Introduction

Tmux Navigator

This plugin is a repackaging of Mislav Marohnić's tmux-navigator configuration described in this gist. Please note that this plugin only captures the Vim specific configuration. In order to get the full functionality, there is a script file and a set of tmux mappings that are needed. Please see the previously mentioned gist for additional instructions.

Usage

This plugin, when used in conjunction with the other scripts listed in the gist referenced above, will allow for seamless navigation between Vim splits and tmux panes. By default it provides the following mappings:

  • <ctrl-h> => Left
  • <ctrl-j> => Down
  • <ctrl-k> => Up
  • <ctrl-l> => Right

If you don't want the plugin to create any mappings, you can use the four provided functions to define your own custom maps. Add the following to your vimrc to use custom maps:

let g:tmux_navigator_no_mappings = 1

nmap <silent> {Left-mapping} :TmuxNavigateLeft<cr>
nmap <silent> {Down-Mapping} :TmuxNavigateDown<cr>
nmap <silent> {Up-Mapping} :TmuxNavigateUp<cr>
nmap <silent> {Right-Mapping} :TmuxNavigateRight<cr>

Note Each instance of {Left-Mapping} or {Down-Mapping} must be replaced in the above code with the desired mapping. Ie, the mapping for <ctrl-h> => Left would be created with nmap <silent> <c-h> :TmuxNavigateLeft<cr>.

Installation

The main goal of this repo is to wrap Mislav's original plugin for easy installation using Pathogen, Vundle, or similar plugin management option to add it to Vim's runtime path.

For Vundle, add the following line to your vimrc:

Bundle 'christoomey/vim-tmux-navigator'

Then from within Vim run the :BundleInstall command and Vundle will take care of the rest.

For Pathogen, run the following commands in your shell:

cd ~/.vim
mkdir -p bundle # creates bundle directory if it doesn't exist
cd bundles
git clone https://github.com/christoomey/vim-tmux-navigator.git

vim-tmux-navigator's People

Contributors

christoomey avatar

Watchers

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