From e0c786c04597bf19cbd8f0507b7132bc2face9fe Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Mon, 18 Mar 2019 13:00:05 -0500 Subject: [PATCH] Add Go Back To The Previous Window as a vim til --- README.md | 3 ++- vim/go-back-to-the-previous-window.md | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 vim/go-back-to-the-previous-window.md diff --git a/README.md b/README.md index 8ea62b1..eea587a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_785 TILs and counting..._ +_786 TILs and counting..._ --- @@ -802,6 +802,7 @@ _785 TILs and counting..._ - [From Ruby Variables To JavaScript Variables](vim/from-ruby-variables-to-javascript-variables.md) - [Generate and Edit Rails Migration](vim/generate-and-edit-rails-migration.md) - [Get The pid Of The Session](vim/get-the-pid-of-the-session.md) +- [Go Back To The Previous Window](vim/go-back-to-the-previous-window.md) - [Go To File With Line Number](vim/go-to-file-with-line-number.md) - [Grepping Through The Vim Help Files](vim/grepping-through-the-vim-help-files.md) - [Head of File Name](vim/head-of-file-name.md) diff --git a/vim/go-back-to-the-previous-window.md b/vim/go-back-to-the-previous-window.md new file mode 100644 index 0000000..1722d66 --- /dev/null +++ b/vim/go-back-to-the-previous-window.md @@ -0,0 +1,14 @@ +# Go Back To The Previous Window + +When working with multiple files, you may have one or more window splits +open. You may even be moving back and forth between two in particular -- +perhaps if you are iterating on a test and its implementation. You can move +back to the previous window using `Ctrl-w Ctrl-w`. This is the same as +hitting `Ctrl-w w`. + +Once you've moved back to the previous window, the window you were just in +is now the previous window. That means you can keep hitting `Ctrl-w Ctrl-w` +to toggle back and forth. + +See `:h ctrl-w w` for the exact command and `:h ctrl-w` for more on window +commands.