From c8267ba3955970f20031ff54e507629bf273abb8 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sat, 16 Nov 2024 15:51:55 +0000 Subject: [PATCH] plugins/tmux-navigator: re-word usage instructions --- plugins/by-name/tmux-navigator/default.nix | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/plugins/by-name/tmux-navigator/default.nix b/plugins/by-name/tmux-navigator/default.nix index fc585d7c..7f5fbd2a 100644 --- a/plugins/by-name/tmux-navigator/default.nix +++ b/plugins/by-name/tmux-navigator/default.nix @@ -32,7 +32,34 @@ helpers.vim-plugin.mkVimPlugin { ## Configure tmux - There are two main ways to configure tmux. Either install the `tmuxPlugins.vim-tmux-navigator` plugin or add a snippet to your tmux config: + > [!NOTE] + > There are two main ways to configure tmux. + + #### Option 1: using a plugin + + You can install the `vim-tmux-navigator` plugin. + + If you're using TPM, add this to your tmux config: + + ```shell + set -g @plugin 'christoomey/vim-tmux-navigator' + ``` + + If you're using nixos or home-manager to manager tmux, you can use the `programs.tmux.plugins` option for this: + + ```nix + plugins.tmux.plugins = [ + pkgs.tmuxPlugins.vim-tmux-navigator + ]; + ``` + + #### Option 2: manually specify keybindings + + Alternatively, you can specify the keybinding in your tmux config. + + If you're using nixos or home-manager to manager tmux, you can use the `programs.tmux.extraConfig` option for this. + + Example config from the [upstream docs]: ```shell # Smart pane switching with awareness of vim splits.