Skip to content

Commit 5074f71

Browse files
author
Bruno Sutic
committed
Improve split-window bindings
split-window bindings will now always create a pane with the same current directory path as the original pane.
1 parent 135e4e2 commit 5074f71

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
22

3+
### master
4+
- split-window bindings "|" and "-" now create a new pane with the same path as
5+
the original one the split started from.
6+
37
### v0.0.1, 2014-05-23
48
- first version out

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ The amount of cells to resize can be configured with `@pane_resize` option. See
4343

4444
<img align="right" src="/screenshots/pane_splitting.gif" alt="pane splitting"/>
4545

46-
<br/><br/>
46+
<br/>
4747

4848
**Splitting panes**
4949

5050
- `|` - split current pane horizontally
5151
- `-` - split current pane vertically
5252

53+
Newly created pane always has the same path as the original pane.
54+
5355
<br/><br/><br/><br/><br/>
5456

5557
### Installation with [Tmux Plugin Manager](https://github.com/bruno-/tpm) (recommended)

pain_control.tmux

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ pane_resizing_bindings() {
3535
}
3636

3737
pane_split_bindings() {
38-
tmux bind-key "|" split-window -h
39-
tmux bind-key "-" split-window -v
38+
tmux bind-key "|" split-window -h -c "$PWD"
39+
tmux bind-key "-" split-window -v -c "$PWD"
4040
}
4141

4242
main() {

0 commit comments

Comments
 (0)