From fd3c2ee1a63d0225c8c3253574912b41fb007579 Mon Sep 17 00:00:00 2001 From: Jorge Morante Date: Sun, 1 May 2016 19:50:41 +0200 Subject: [PATCH] README.md + LICENSE --- LICENSE | 21 +++++++++++++ README.md | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..82dea29 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jorge Morante Cabrera + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0c3f038 --- /dev/null +++ b/README.md @@ -0,0 +1,91 @@ +# tmux-fingers + +**tmux-fingers**: copy pasting with vimium/vimperator like hints. + +# 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 with 4+ digits + +It also works on copy mode, but requires *tmux 2.2* or newer to properly take +the scroll position into account. + +# Installation + +## Using [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) + +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 +``` + +# Customization + +You can change the key that invokes **tmux-fingers**: + +``` +# F is the default, but you can set another one +set -g @fingers-key F +``` + +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. + +# Acknowledgements and inspiration + +This plugin is heavily inspired by +[tmux-copycat](https://github.com/tmux-plugins/tmux-copycat) ( **tmux-fingers** +predefined search are *copycatted* :trollface: from +[tmux-copycat](https://github.com/tmux-plugins/tmux-copycat) ). + +Kudos to [bruno-](https://github.com/bruno-) for paving the way to tmux +plugins! :clap: :clap: + +# License + +MIT