From 8f0ec154c012c78bf20a348c158c2f6f89d2d5cf Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Tue, 2 Aug 2016 18:51:28 -0500 Subject: [PATCH] Add Reset Target tslime Pane as a vim til --- README.md | 3 ++- vim/reset-target-tslime-pane.md | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 vim/reset-target-tslime-pane.md diff --git a/README.md b/README.md index 4c81fd4..e27834e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really warrant a full blog post. These are mostly things I learn by pairing with smart people at [Hashrocket](http://hashrocket.com/). -_447 TILs and counting..._ +_448 TILs and counting..._ --- @@ -503,6 +503,7 @@ _447 TILs and counting..._ - [Repeat The Previous Change](vim/repeat-the-previous-change.md) - [Repeating Characters](vim/repeating-characters.md) - [Replace A Character](vim/replace-a-character.md) +- [Reset Target tslime Pane](vim/reset-target-tslime-pane.md) - [Reverse A Group Of Lines](vim/reverse-a-group-of-lines.md) - [Running Bundle With vim-bundler](vim/running-bundle-with-vim-bundler.md) - [Scrolling Relative to the Cursor](vim/scrolling-relative-to-the-cursor.md) diff --git a/vim/reset-target-tslime-pane.md b/vim/reset-target-tslime-pane.md new file mode 100644 index 0000000..b32c711 --- /dev/null +++ b/vim/reset-target-tslime-pane.md @@ -0,0 +1,23 @@ +# Reset Target tslime Pane + +The combination of [`tslime`](https://github.com/jgdavey/tslime.vim) and +[`turbux`](https://github.com/jgdavey/vim-turbux) make running tests from +Vim in a tmux session as easy as a single key binding. One problem that can +arise from time to time is having `tslime` focused on an undesired tmux +window/pane combination. There is no binding to tell `tslime` that you'd +like to re-select the target window and pane. + +I've often resorted to closing out of Vim in order to reset the prompt. +There is a better way and it doesn't require you to wipe out your Vim +session. + +Just `unlet` the global Vim variable for the `tslime` plugin like so: + +``` +:unlet g:tslime +``` + +The next time you invoke `turbux` it will see that `g:tslime` isn't set and +will prompt you for a new window and pane combination. + +h/t Josh Davey