Hacker News new | past | comments | ask | show | jobs | submit login

Utilizing cross-window copy/paste, cross-window repeat, opening a new file (window) with a single command vs new tmux pane then initializing vim. Those are just a few of the many reasons. IMO, using a new tmux pane for each vim instance would be a HUGE anti-pattern. Most people with the tmux/vim setup will use a single tmux pane for vim, then N number of other tmux panes for other required needs (compiling, tests, etc...).

Do people usually have multiple vim splits open? At least I usually just have one terminal with new tmux splits and usually one vim with multiple buffers I switch between if needed.

However if I'm looking for something or doing something in another split and I need to view a file or edit a file I don't go back to my vim split and open it there I just open vim right there where I am.

I typically split if I have some interrelated code that I need to cross-reference, e.g. when refactoring. Especially if this code is in the same file, in which case windows into the same buffer have the added benefit of synchronized editing. Another example: when programming C, it is useful sometimes to have the header in one vim window and the definitions in the other. Or you're navigating via ctags, and it's convenient to view a tag in a new window rather than change the buffer for the current window.

If I'm just editing two completely unrelated files I don't see any advantages to this workflow over opening multiple instances. Maybe if you have plugins that are slow to start up?

In standard usage, I am using splits (horizontal). The only real time I am using buffers is when I open up multiple files from command line in some type of ‘vim ‘git grep -l “<search>” .’‘ scenario where I will do an action against all opened buffers in vim.

Regarding your second point, I behave similarly. If I am off in one of my non main editor tmux panes and I need to open a quick file, I will do it there instead of moving back to my main editor vim session. This is usually due to the file needing to be opened is outside the cwd of the main vim session.

Registration is open for Startup School 2019. Classes start July 22nd.

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