Move a Pane with Directional Swaps
Nash 0.13.7 adds directional pane swaps. When your editor belongs beside a test runner instead of above it, exchange it with an adjacent pane without restarting either program or selecting a target from on-screen labels.
The bundled shortcuts use the familiar directional keys:
| Shortcut | Swap direction |
|---|---|
SUPER+Shift+H | Left |
SUPER+Shift+J | Down |
SUPER+Shift+K | Up |
SUPER+Shift+L | Right |
On macOS, SUPER is Command. Focus follows the moved pane, so repeated swaps keep moving the same editor or shell. Your next keystroke goes to that program, not whichever program previously occupied its new position. The commands also appear in the command palette and under Window → Move Pane.
Pick the Neighbor by Its Shared Edge
A swap needs a shared border in the requested direction. Corner contact does not count, and there is no wrapping: without a neighbor, nothing happens.
When several panes touch that edge, Nash chooses the longest shared border. Imagine an editor filling the left column, with a small shell above a larger test runner on the right. Swapping right exchanges the editor with the test runner. Equal borders choose the uppermost neighbor for horizontal swaps or the leftmost for vertical swaps. This differs from ordinary directional focus navigation, which resolves ambiguous neighbors by focus recency.
Swaps exchange individual panes, not whole groups. Unfolded panes take each other's space and resize to fit. Folded panes keep their fold state, which can move a divider as the visible layout adjusts. Swapping does nothing while the tab is zoomed or covered by a tab overlay.
Make Room for Swaps in Your Shortcuts
Fast H/J/K/L resizing now adds Alt: use SUPER+Alt+Shift+H/J/K/L instead of
SUPER+Shift+H/J/K/L. The CTRL+ALT+SHIFT resizing alternatives and arrow-key
resize bindings are unchanged.
Your commands.toml overrides are preserved, so an old custom resizing keys
list can still occupy the new swap chords. To inherit the updated defaults,
remove the old keys fields from your resize_pane_*_fast overrides; keep any
other custom fields you want. Omitting keys inherits the defaults, whereas
keys = [] disables the command's shortcuts.
For a different swap chord, merge an override into
~/.config/nash/commands.toml, for example:
[[command]]
id = 'swap_pane_left'
keys = [{ key = 'h', mods = 'CTRL|SUPER|SHIFT' }]Linux window managers may intercept SUPER chords, making rebinding useful. For related controls, see pane navigation and the 0.13.7 release notes.