-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Repeatable Test Environment (#5)
* Add /test README.md * Add basic Tmux configuration for testing * Add Makefile for testing * Add basic vimrc to source for testing * Comment out vim-tmux-navigator lines from test tmux.conf * Move Makefile out to project root * Replace test/README with a contributing guide * Remove commented lines from /test/.tmux.conf
- Loading branch information
1 parent
f3c4b95
commit 219bdec
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Contibuting | ||
|
||
If you find any issues with this repo that you wish to fix, feel free to fork | ||
it and submit Pull Request with a fix. | ||
|
||
## Testing | ||
|
||
This plugin does not currently support any automated testing mechanism. Testing | ||
is instead accomplished manually, aided by using supplied configuration files. | ||
|
||
The easiest way to test changes is to use the Makefile supplied. From a | ||
terminal **with no tmux session**, run: | ||
|
||
``` | ||
make test | ||
``` | ||
|
||
This will load a new vim session inside of a new tmux session. Both sessions | ||
will use the *.tmux.conf* and *.vimrc* from */test* in this repo, instead of | ||
your user's configuration files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.PHONY: test | ||
|
||
test: | ||
tmux -f test/.tmux.conf new-session "nvim -u test/.vimrc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Tmux configuration with only bindings required for better-vim-tmux-resizer | ||
|
||
# Smart pane switching with awareness of Vim splits. | ||
# See: https://github.com/christoomey/vim-tmux-navigator | ||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | ||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | ||
|
||
# Tmux-vim-resizer | ||
bind-key -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 10' | ||
bind-key -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 5' | ||
bind-key -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 5' | ||
bind-key -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 10' | ||
|
||
# Tmux-vim-resizer copy-mode | ||
bind-key -T copy-mode-vi 'M-h' resize-pane -L 10 | ||
bind-key -T copy-mode-vi 'M-j' resize-pane -D 5 | ||
bind-key -T copy-mode-vi 'M-k' resize-pane -U 5 | ||
bind-key -T copy-mode-vi 'M-l' resize-pane -R 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source plugin/better_vim_tmux_resizer.vim |