Quickly open any path on your terminal window in your $EDITOR of choice!

Related tags

CLI Tools tmux-fpp
Overview

Tmux fpp

Plugin wrapper around Facebook PathPicker.

Quickly open any path on your terminal window in your $EDITOR of choice!

Demo

Demo tmux-fpp

Dependencies

  • fpp - Facebook PathPicker.

Key bindings

  • prefix + f - open a new window with a fpp selection of your current tmux pane.

Installation with Tmux Plugin Manager (recommended)

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

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

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-fpp ~/clone/path

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

run-shell ~/clone/path/fpp.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 "f" key binding to something else? For example, key "x"?

Put set -g @fpp-key 'x' in tmux.conf.

How can I paste the selected file paths into my original pane, instead of launching an editor?

Put set -g @fpp-mode 'paste' in tmux.conf.

Alternatively you can bind both behaviours to different keys manually:

# Disable default binding
set -g @fpp-bind off

# Bind 'f' to run FPP launching an editor
bind-key f run-shell '~/.tmux/plugins/tmux-fpp start edit'

# Bind 'x' to run FPP and paste the list of files in the initial pane
bind-key x run-shell '~/.tmux/plugins/tmux-fpp start paste'

How can I specify custom path to fpp?

Put set -g @fpp-path '~/my/path/fpp' in tmux.conf.

Other goodies

tmux-fpp works great with:

  • tmux-urlview - a plugin for quickly opening any url on your terminal window
  • tmux-copycat - a plugin for regex searches in tmux and fast match selection
  • tmux-yank - enables copying highlighted text to system clipboard

License

MIT

Comments
  • Extra Window opens and shuts immediately

    Extra Window opens and shuts immediately

    When I try to use this plugin, I see the extra tmux window appear, but it immediately shuts without me switching to it. I cleared tmux conf down to simply loading this and the plugin loader and saw the same issue.

    This is on OSX Yosemite in iTerm2, the only irregularity I have is that I use Fish Shell instead of bash/zsh/etc.

    opened by benmccormick 5
  • Rewrite to support a new

    Rewrite to support a new "paste" mode

    This adds a new mode that pastes the selected file list back into the pane you were initially on.

    Useful for invoking while editing a command line or configuration file, for example.

    The defaults are kept to be fully backwards compatible.

    There are now three configurable options:

    • @fpp-bind on/off
      • Whether to bind keys on initialization.
      • Defaults to 'on'.
    • @fpp-key
      • The tmux key to bind to launching FPP.
      • Defaults to 'f'.
    • @fpp-mode edit/paste
      • Whether to launch EDITOR after FPP or paste the file list into the invoking pane.
      • Defaults to 'edit'
    opened by rwe 3
  • Not respecting EDITOR

    Not respecting EDITOR

    I've tried setting the following variables:

    export FPP_EDITOR='emacsclient -n'
    export EDITOR='emacsclient -n'
    export VISUAL='emacsclient -n'
    

    ...but I cannot get tmux-fpp to open the files in anything other than vim.

    However, when I run:

    git status | fpp
    

    ...that will open my files using emacsclient -n

    Any idea what's going on here?

    bug 
    opened by wpcarro 3
  • Add tmux note to keybinding for list-keys

    Add tmux note to keybinding for list-keys

    This PR simply adds a -N note so that the chosen key binding appears in tmux list-keys / <prefix> + ? and "Describe key binding" <prefix> + /, which is useful when you have a lot of custom keybindings.

    opened by eggbean 2
  • Add an option for specify the full path of 'fpp'

    Add an option for specify the full path of 'fpp'

    It appears that 'fpp' may stand for something else, for example, Intel Fortran Preprocessor Options. An option to specify the whole path may be helpful in this case.

    opened by guotsuan 2
  • Not working on macOS Catalina

    Not working on macOS Catalina

    Hi,

    I've been using this plugin for some time now but it stopped working and I didn't make any config change.

    I was thinking that may be since I updated to macOS Catalina because the bind-key looks like this:

    bind-key -T prefix       f                 capture-pane -J \; save-buffer /var/folders/_d/pl4l0yy16s78vbnmjxhx95sc0000gn/T//tmux-buffer \; delete-buffer \; new-window -c "#{pane_current_path}" -n fpp "sh -c 'cat \"/var/folders/_d/pl4l0yy16s78vbnmjxhx95sc0000gn/T//tmux-buffer\" | fpp ; rm \"/var/folders/_d/pl4l0yy16s78vbnmjxhx95sc0000gn/T//tmux-buffer\"'"
    

    I had problems with other vim plugins because of these weird temporary folders used.

    Thanks!

    bug 
    opened by jmolero 1
  • how to use with tmux-yank ?

    how to use with tmux-yank ?

    So how am I supposed to use this with tmux-yank? I tried pressing y, - y and so on and was hoping to copy the selected filenames in the clipboard, but this was not working.

    opened by tfriedel 1
  • Use $TMPDIR for temp directory

    Use $TMPDIR for temp directory

    The TMPDIR environment variable should be honored if set, as it may point to something other than /tmp (e.g. /tmp/.private/$(whoami) on my system). Fallback to /tmp if $TMPDIR is unset or empty.

    opened by laomaiweng 1
  • Clear buffer after dumping to disk

    Clear buffer after dumping to disk

    The tmux buffer created by capture-pane lingers on after it has been dumped to the disk for fpp. It should be removed to prevent polluting the user's list of buffers.

    opened by laomaiweng 1
  • Unwrap lines before calling `fpp`

    Unwrap lines before calling `fpp`

    tmux-fpp fails to correctly detect line-wrapped file names and may truncate the file names. Using the -J flag lets tmux join wrapped lines when capturing the pane contents.

    From the tmux man page section on capture-pane:

    -J joins wrapped lines and preserves trailing spaces at each line's end.
    

    PS: this looks an awful lot like tmux-plugins/tmux-urlview#1 ;-)

    opened by laomaiweng 1
  • Remove the temp buffer even if fpp

    Remove the temp buffer even if fpp "fails"

    With '&&' in the shell script calling fpp, the temporary buffer is not deleted if fpp fails for some reason. ';' seems to me like it should be preferred.

    opened by laomaiweng 1
  • Doesn't seem to work on tmux copy-mode history

    Doesn't seem to work on tmux copy-mode history

    If I scroll up into tmux copy-mode history and use this plugin, I only get the latest part of it (ie. the current terminal screen and not the tmux copy-mode history).

    Is this a deficiency of fpp, or is it something in my configuration or can I do something so that tmux-fpp works on tmux copy-mode history?

    opened by eggbean 0
  • Feature request - preserve escape sequences in display

    Feature request - preserve escape sequences in display

    Often when debugging various programs, test output will be verbose but color/bolding/italicizing makes it significantly easier to visualize/navigate. When jumping into fpp, this data is lost, making it much harder to quickly navigate to the file path I am looking for.

    enhancement 
    opened by majuscule 0
Owner
null
The project help you to quickly build layouts in terminal,cross-platform

The project help you to quickly build layouts in terminal,cross-platform

gojuukaze 133 Nov 30, 2022
Gamestonk Terminal is an awesome stock and crypto market terminal

Gamestonk Terminal is an awesome stock and crypto market terminal. A FOSS alternative to Bloomberg Terminal.

Gamestonk Terminal 18.6k Jan 3, 2023
open a remote repo locally quickly

A command line tool to peek a remote repo hosted on github or gitlab locally and view it in your favorite editor. The tool handles cleanup of the repo once you exit your editor.

Rahul Nair 44 Dec 16, 2022
Several tools that can be added to your `PATH` to make your life easier.

CK-CLI Tools Several tools that can be added to your PATH to make your life easier. prettypath Prints the $PATH variable in a human-readable way. It a

Christopher Kumm 2 Apr 21, 2022
Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections.

code-connect Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections. Motivation VS Code supports opening

Christian Volkmann 56 Nov 19, 2022
A CLI tools to get you started on any project in any language

Any Template A faster easier to Quick start any programming project. Installation pip3 install any-template Features No third party dependencies. Tem

Adwaith Rajesh 2 Jan 11, 2022
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Shreyash Chavan 2 Apr 4, 2022
Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.

Unofficial Open Corporates CLI OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unoff

Richard Mwewa 30 Sep 8, 2022
🎈 `st` is a CLI to quickly kick-off your new Streamlit project

?? st - a friendly Streamlit CLI st is a CLI that helps you kick-off a new Streamlit project so you can start crafting the app as soon as possible! Ho

Arnaud 18 Dec 19, 2022
An open source terminal project made in python

Calamity-Terminal An open source terminal project made in python. Calamity Terminal is a free and open source lightweight terminal. Its made 100% off

null 1 Mar 8, 2022
TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal.

TerminalGV So I got bored in the train, TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal. The "on-tr

Samuel 8 Dec 15, 2022
slipit is a command line utility for creating archives with path traversal elements.

slipit is a command line utility for creating archives with path traversal elements. It is basically a successor of the famous evilarc utility with an extended feature set and improved base functionality.

usd AG 35 Dec 23, 2022
cmdpxl: a totally practical command-line image editor

cmdpxl: a totally practical command-line image editor

Jieruei Chang 476 Jan 7, 2023
f90nml - A Fortran namelist parser, generator, and editor

f90nml - A Fortran namelist parser, generator, and editor A Python module and command line tool for parsing Fortran namelist files Documentation The c

Marshall Ward 110 Dec 14, 2022
🦎 A NeoVim plugin for highlighting visual selections like in a normal document editor!

?? HighStr.nvim A NeoVim plugin for highlighting visual selections like in a normal document editor! Demo TL;DR HighStr.nvim is a NeoVim plugin writte

Pocco81 222 Jan 3, 2023
A CLI for creating styled-components for React projects quickly

new-component Ian Cleary (iancleary) Description Welcome! This is a CLI for creating styled-components for React projects quickly. Note: I've rewrote

Ian Cleary (he/him/his) 1 Feb 15, 2022
Ralph is a command-line tool to fetch, extract, convert and push your tracking logs from various storage backends to your LRS or any other compatible storage or database backend.

Ralph is a command-line tool to fetch, extract, convert and push your tracking logs (aka learning events) from various storage backends to your

France Université Numérique 18 Jan 5, 2023
Darkdump - Search The Deep Web Straight From Your Terminal

Darkdump - Search The Deep Web Straight From Your Terminal About Darkdump Darkdump is a simple script written in Python3.9 in which it allows users to

Josh Schiavone 264 Dec 30, 2022