···11+I regularly switch between exactly two things while working,
22+a "current" and an "alternate" item; a lot of tools I use
33+seem to support this flow.
44+55+#### git
66+77+Pass `-` to `git-checkout` to switch to the previously
88+active branch:
99+1010+```bash
1111+$ git branch
1212+* foo
1313+ bar
1414+1515+$ git checkout bar
1616+$ git branch
1717+ foo
1818+* bar
1919+2020+$ git checkout -
2121+$ git branch
2222+* foo
2323+ bar
2424+```
2525+2626+#### bash - cd
2727+2828+This may not be exclusive to `bash`:
2929+3030+```bash
3131+~/foo $ cd ~/bar
3232+~/bar $ cd -
3333+~/foo $
3434+```
3535+3636+This is especially handy in combination with my [git-worktree
3737+flow](../curing_a_case_of_git-UX/):
3838+3939+```bash
4040+~/main-branch $ gwj feature
4141+~/feat-branch $ cd -
4242+~/main-branch $
4343+```
4444+4545+#### bash - jobs
4646+4747+I often suspend multiple `vim` sessions with `Ctrl-Z`:
4848+4949+```bash
5050+$ jobs
5151+[1]+ Stopped vim transpiler/src/transform.rs
5252+[2]- Stopped git commit --verbose
5353+```
5454+5555+In the above example: I suspended `vim` when working on
5656+`transform.rs`, and then began working on a commit by
5757+running `git commit` without a message flag (lets you craft
5858+a message in `$EDITOR`). To bring the current job to the
5959+foreground, you can use `fg`:
6060+6161+```bash
6262+$ fg
6363+```
6464+6565+With a job identifier:
6666+6767+```bash
6868+$ fg %2 # resumes interactive git commit
6969+```
7070+7171+Or switch to "last" job, or the second-most-recently-resumed
7272+job:
7373+7474+```bash
7575+$ fg %-
7676+$ %- # shorthand
7777+7878+```
7979+8080+#### vim
8181+8282+Switch to the last active buffer with `Ctrl+^`. In
8383+command-mode, `#` refers to the last active buffer, you can
8484+use this as an argument to a few commands:
8585+8686+```vimscript
8787+:b# " switch to alternate buffer (same as Ctrl+^)
8888+:vsp# " create a vertical split with the alternate buffer
8989+:read# " read contents of alternate buffer into current buffer
9090+:!wc # " pass file name of alternate buffer to the command `wc`
9191+```
9292+9393+See `:help c_#` for more.
9494+9595+#### tmux
9696+9797+Switch to the last active tmux session with
9898+`<prefix>+shift+L`.
9999+100100+#### qutebrowser
101101+102102+Switch to the last active tab with `g$`.