The current tmux-navigator plugin doesn't handle terminal mode (term) navigation seamlessly. When using terminal splits in Vim alongside tmux panes, the navigation breaks down. This functionality had been left out because it collided with Vim FZF
Solution
Added terminal mode support with FZF-awareness:
New terminal mode mappings that integrate with existing tmux navigation
Added IsFZF() function to detect when we're in FZF
Used mappings to conditionally pass through controls to FZF when appropriate
This adds a workaround for the netrw keymapping conflict for ctrl-l by
setting the `g:Netrw_UserMaps` list. To limit the impact to users, this
will leave the list alone if the user has already set the variable and
instead gives a warning to prompt the user about the issue.
This mapping workaround can be disabled by setting either
`g:tmux_navigator_no_mappings` or
`g:tmux_navigator_disable_netrw_workaround`.
Fixes#189, Fixes#251, Fixes#379
This reverts commit a40cc7a527.
The `<Cmd>` mapping is a recent addition so we'll want to add a version
check, but for now I'm just reverting to get back to good.
Use `(nore)map` to map the functions in visual, select and
operator-pending mode instead of only in normal mode.
Use `<C-U>` (:h c_CTRL-U) to delete the automatically inserted range
when pressing `:` in visual mode, as the functions do not support a
range.
Update all references in the README and help page.
* Add g:tmux_navigator_preserve_zoom option
Tmux offers a `-Z` option on the `select-pane` command that preserves
the zoom state when navigating between panes. This adds an option to
enable this behavior in tmux-navigator.
Previously we used the `{pane_current_command}` tmux variable and
matched against that, but a while back we switched to using the process
list to better handle some edge cases.
Overall that change has been a win, but the documentation has lagged a
bit around the debugging command `:TmuxPaneCurrentCommand` which is no
longer relevant.
This change replaces `:TmuxPaneCurrentCommand` with a new
`:TmuxNavigatorProcessList` which should allow us to debug the actual
issue related to the `ps` command.
Users have requested the ability to disable navigation while the Vim
tmux pane is zoomed, to prevent accidentally unzooming the pane when
navigating past the edges.
This change adds an option to prevent using tmux navigation when the Vim
pane is zoomed, and requiring an explicit unzooming of the tmux pane
before the plugin resumes its magic.
Summary: Added a new behaviour to tmux_navigator_save_on_switch which, when
set, causes all open and changed buffers to be written when navigating away
from a vim session.
Summary: Fixes#142. An issue existed where opening vim without a file
path and then navigating away (with autosave turned on) resulted in an
error being thrown. Now, this error is caught and consumed and not
propagated to the user.
Test Plan:
1) Started up a vim instance without a file path.
2) Created a second tmux pane.
3) navigated to tmux pane with vim
4) entered insert mode and wrote some gibberish
5) navigated away from the tmux pane containing the vim instance
6) no error message was shown to me
- Provide global option to disable default mappings
- Provide commands for use in custom mappings
- Provide standard split navigation via maps when not in Tmux