Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have the following in my ~/.tmux.conf so that whenever I split pane or create a new tmux window, it sets the current working directory of the new pane or window to the same directory in which I was before:

  # Open new pane or window with the current directory
  bind '"' split-window -c "#{pane_current_path}"
  bind % split-window -h -c "#{pane_current_path}"
  bind c new-window -c "#{pane_current_path}"
So although the tmux session is run in my home directory, I only need to change the current working directory to my project directory once and then when I create new panes and windows, they have the project directory as the current working directory.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: