<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Peter-McKinney</title>
    <description>The latest articles on DEV Community by Peter-McKinney (@petermckinney).</description>
    <link>https://dev.to/petermckinney</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F194424%2F4354a75f-9bee-4e2e-ae95-a73e94049c4e.png</url>
      <title>DEV Community: Peter-McKinney</title>
      <link>https://dev.to/petermckinney</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/petermckinney"/>
    <language>en</language>
    <item>
      <title>Opening Files in Neovim from Terminal Output with tmux-fzf-open-files-nvim</title>
      <dc:creator>Peter-McKinney</dc:creator>
      <pubDate>Sun, 27 Jul 2025 18:45:53 +0000</pubDate>
      <link>https://dev.to/petermckinney/opening-files-in-neovim-from-terminal-output-with-tmux-fzf-open-files-nvim-1cb2</link>
      <guid>https://dev.to/petermckinney/opening-files-in-neovim-from-terminal-output-with-tmux-fzf-open-files-nvim-1cb2</guid>
      <description>&lt;p&gt;Over a year ago, I released a plugin called &lt;a href="https://github.com/Peter-McKinney/tmux-fzf-open-files-nvim" rel="noopener noreferrer"&gt;tmux-fzf-open-files-nvim&lt;/a&gt; — a small tool for developers who live in tmux and use neovim as their daily driver. Since then, it’s been tried, tested, and refined by myself and others in real-world workflows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91l4hew17rzxlq9k6idi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91l4hew17rzxlq9k6idi.png" alt="tmux-fzf-open-files-nvm picker with files and selection" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Video demos can be found in the readme: &lt;a href="https://github.com/Peter-McKinney/tmux-fzf-open-files-nvim/blob/main/README.md" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does It Do?
&lt;/h2&gt;

&lt;p&gt;If you’ve ever wanted to open a file (even with line number information!) directly from a terminal command’s output — a grep result, a test failure, a stack trace — you know the pain of copying the path manually in tmux copy mode and switching context to open it in neovim. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Peter-McKinney/tmux-fzf-open-files-nvim" rel="noopener noreferrer"&gt;tmux-fzf-open-files-nvim&lt;/a&gt; solves this.&lt;/p&gt;

&lt;p&gt;It allows you to pipe output into a fzf tmux picker that extracts and filters file paths, lets you choose one or several with the tab key, and opens it in a new (or existing) neovim instance in another tmux pane. If line number information is included in the file, it will open the file in neovim at that line number (row,col).&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;This plugin uses native linux tools awk and sed to parse file paths from any arbitrary terminal output. &lt;/p&gt;

&lt;p&gt;Pipes (|) link together all stages of the operation to ensure reduced memory footprint and parallel processing. Pipes avoid storing entire data blobs in variables and instead stream line-by-line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extending the plugin
&lt;/h2&gt;

&lt;p&gt;The utility for parsing files and opening an fzf popup in tmux is encapsulated into one script found in &lt;code&gt;utilities/fzf-files.sh&lt;/code&gt;. That means if you would like to use this as a part of a different workflow (perhaps you want to write a telescope extension) you can do so by running `./utilities/fzf-files.sh' which will output the user selected files. &lt;/p&gt;

&lt;h2&gt;
  
  
  Modes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Capture the output visible in the current pane
&lt;/h3&gt;

&lt;p&gt;The default keybinding of &lt;code&gt;prefix + F&lt;/code&gt; will search the visible content in the current tmux pane for file paths.&lt;/p&gt;

&lt;h3&gt;
  
  
  Capture the entire history of the current pane:
&lt;/h3&gt;

&lt;p&gt;The default keybinding of &lt;code&gt;prefix + H&lt;/code&gt; will search the history of the current pain for file paths.&lt;/p&gt;

&lt;h3&gt;
  
  
  Capture the entire history of all panes in a window:
&lt;/h3&gt;

&lt;p&gt;The default keybinding of &lt;code&gt;prefix + G&lt;/code&gt; will search the history of all panes in a tmux window for file paths.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/tmux/tmux" rel="noopener noreferrer"&gt;tmux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/junegunn/fzf" rel="noopener noreferrer"&gt;fzf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://neovim.io/" rel="noopener noreferrer"&gt;neovim&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  TPM
&lt;/h3&gt;

&lt;p&gt;If you’re using TPM (Tmux Plugin Manager), add this to your .tmux.conf:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;set -g @plugin 'Peter-McKinney/tmux-fzf-open-files-nvim'&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Reload tmux environment
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;tmux source ~/.tmux.conf&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Then press prefix + I (capital I) to install
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: I have sometimes noticed I have to completely reload tmux after this step by exiting tmux and opening it once more.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  No TPM?
&lt;/h3&gt;

&lt;p&gt;Clone the repository:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone https://github.com/Peter-McKinney/tmux-fzf-open-files-nvim ~/.tmux/plugins/tmux-fzf-open-files-nvim&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add a binding in your .tmux.conf:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bind-key F run-shell '~/.tmux/plugins/tmux-fzf-open-files-nvim/scripts/tmux-fzf-open-files-nvim.sh'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Reload your .tmux.conf:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;tmux source ~/.tmux.conf&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Keybindings:
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Default Binding&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;@open-file-nvim-key&lt;/td&gt;
&lt;td&gt;Parses the current visible pane output for filenames&lt;/td&gt;
&lt;td&gt;prefix + F&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;@open-file-nvim-all-key&lt;/td&gt;
&lt;td&gt;Parses the entire available history in the current pane for filenames&lt;/td&gt;
&lt;td&gt;prefix + H&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;@open-file-nvim-all-history-key&lt;/td&gt;
&lt;td&gt;Parses the entire history from all panes in a window&lt;/td&gt;
&lt;td&gt;prefix + G&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you have ideas, feedback, or improvements, feel free to open an issue or submit a PR!&lt;/p&gt;

</description>
      <category>tmux</category>
      <category>neovim</category>
      <category>tpm</category>
      <category>terminal</category>
    </item>
  </channel>
</rss>
