Resources 📚


How to fix the code command not working when using tmux in the integrated terminal of VSCode

Solution: Tmux code command fix - ChatGPT

Summary: Check and copy the value of the VSCODE_IPC_HOOK_CLI environment variable via

export -p | grep -i vscode

Copy it and export the correct value inside the tmux session:

export VSCODE_IPC_HOOK_CLI="${WHATEVER_THE_IPC_SOCKET_PATH_WAS.sock}"

For example, the previous line could look like:

export VSCODE_IPC_HOOK_CLI="/run/user/1046/vscode-ipc-7c5f0793-10fa-4852-a65f-0d36365fb9b0.sock"

Searching the Console Output of a tmux pane (buffer)

To search in the tmux history buffer for the current window, press Ctrl-b [ to enter copy mode.

If you’re using emacs key bindings (the default), press Ctrl-s then type the string to search for and press Enter. Press n to search for the same string again. Press Shift-n for reverse search. Press Escape twice to exit copy mode. You can use Ctrl-r to search in the reverse direction. Note that since tmux is in control of the keyboard in copy mode, Ctrl-s works regardless of the stty ixon setting (which I like to have as stty -ixon to enable forward searches in Bash).

If you’re using vi key bindings (Ctrl-b:set-window-option -g mode-keys vi), press / then type the string to search for and press Enter. Press n to search for the same string again. Press Shift-n for reverse search as in emacs mode. Press q twice to exit copy mode. You can use ? to search in the reverse direction.

Source: Answer to How can I search within the output buffer of a tmux shell?