When I want to come and go several project windows frequently, if I use VSCode then using vscode-ghq and switching window is enough for me. But if I need to work on terminals, I'd rather want to use terminals like iTerm2 than terminal in VSVode.
I wanted to do like what I do in VSCode, but I used to do operations like below.
- Find the target repository from the opened windows (relying on my memory).
- If the target repository is opened in some window, then switch to it.
- Otherwise, create a window with prefix + c on tmux and move to it by using ghq.
In this article, I will explain how to do following operations with just 1 command.
- Show a list of repository with ghq from any windows.
- Find the window which directory is the selected repository.
- If the target repository is opened in existing window, then move to it.
- Otherwise create a new window, move to it, and change the directory to that of selected repository.