Giter Club home page Giter Club logo

tmux-open's Introduction

Tmux open

Plugin for opening highlighted selection directly from Tmux copy mode.

Tested and working on Linux, OSX and Cygwin.

Key bindings

In tmux copy mode:

  • o - "open" a highlighted selection with the system default program. open for OS X or xdg-open for Linux.
  • Ctrl-o - open a highlighted selection with the $EDITOR

Examples

In copy mode:

  • highlight file.pdf and press o - file will open in the default PDF viewer.
  • highlight file.doc and press o - file will open in system default .doc file viewer.
  • highlight http://example.com and press o - link will be opened in the default browser.
  • highlight file.txt and press Ctrl-o - file will open in $EDITOR.

Screencast

screencast screenshot

Installation with Tmux Plugin Manager (recommended)

Add plugin to the list of TPM plugins in .tmux.conf:

set -g @plugin 'tmux-plugins/tmux-open'

Hit prefix + I to fetch the plugin and source it. You should now be able to use the plugin.

Manual Installation

Clone the repo:

$ git clone https://github.com/tmux-plugins/tmux-open ~/clone/path

Add this line to the bottom of .tmux.conf:

run-shell ~/clone/path/open.tmux

Reload TMUX environment:

# type this in terminal
$ tmux source-file ~/.tmux.conf

You should now be able to use the plugin.

Configuration

How can I change the default "o" key binding to something else? For example, key "x"?

Put set -g @open 'x' in tmux.conf.

How can I change the default "Ctrl-o" key binding to "Ctrl-x"?

Put set -g @open-editor 'C-x' in tmux.conf.

Other goodies

tmux-open works great with:

  • tmux-copycat - a plugin for regex searches in tmux and fast match selection
  • tmux-yank - enables copying highlighted text to system clipboard

License

MIT

tmux-open's People

Contributors

jonlorusso avatar knakayama avatar

Watchers

 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.