Git Product home page Git Product logo

tmux-fingers's Introduction

tmux-fingers

CircleCI

tmux-fingers: copy pasting with vimium/vimperator like hints.

yay

Usage

When called ( prefix + F ), it will highlight relevant stuff in the current pane along with letter hints. By pressing those letters, the highlighted match will be yanked. Less keystrokes == profit!

Relevant stuff:

  • File paths
  • git SHAs
  • numbers ( 4+ digits )
  • urls
  • ip addresses

It also works on copy mode, but requires tmux 2.2 or newer to properly take the scroll position into account.

Additionally, you can install tmux-yank for system clipboard integration.

Requirements

  • bash 4+
  • tmux 2.1+ ( 2.2 recommended )

Installation

Using Tmux Plugin Manager

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

set -g @plugin 'Morantron/tmux-fingers'

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

Manual

Clone the repo:

➜ git clone https://github.com/Morantron/tmux-fingers ~/clone/path

Source it in your .tmux.conf:

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

Reload TMUX conf by running:

➜ tmux source-file ~/.tmux.conf

Configuration

You can change the key that invokes tmux-fingers:

@fingers-key

F is the default key, but you can set another one.

set -g @fingers-key F

@fingers-patterns-N

You can also add additional patterns if you want more stuff to be highlighted:

set -g @fingers-pattern-0 'git rebase --(abort|continue)'
set -g @fingers-pattern-1 'yolo'
.
.
.
set -g @fingers-pattern-50 'whatever'

NOTE: patterns are case insensitive, and grep's extended syntax should be used. man grep for more info.

If the introduced regexp contains an error, an error will be shown when invoking the plugin.

@fingers-copy-command

By default tmux-fingers will just yank matches using tmux clipboard ( or tmux-yank if present ).

If you still want to set your own custom command you can do so like this:

set -g @fingers-copy-command 'xclip -selection clipboard'

Acknowledgements and inspiration

This plugin is heavily inspired by tmux-copycat ( tmux-fingers predefined search are copycatted :trollface: from tmux-copycat ).

Kudos to bruno- for paving the way to tmux plugins! 👏 👏

License

MIT

tmux-fingers's People

Contributors

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