2
1
vim has a really cool feature that allows you to concurrently edit the same file in a single vim session.
I use the i3 window manager. I like it because it allows me to tile my windows, tab them, float them, or some combination of those, according to the situation, regardless of whether the window is a browser, or a terminal or whatever. My typical work flow so far has been to open vim in a new terminal for each file I'm editing. Opening vim in a single terminal and just using the internal buffer management commands would be very restricting; it would prevent me from using all of my favorite i3 functionality.
So is there a way to concurrently edit a single file in separate terminals with vim? Maybe something using vim's client server functionality...
see some discussion on this topic here: http://stackoverflow.com/questions/7842511/safe-to-have-multiple-processes-writing-to-the-same-file-at-the-same-time-cent . Personally my advice is don't.
– Frank Thomas – 2015-08-20T16:40:23.973https://github.com/FredKSchott/CoVim – FDinoff – 2015-08-21T00:37:05.900
@FDinoff, Oh, yiss. This is even better than what I had in mind. Please post this as an answer so I can accept it. – Overdr0ne – 2015-08-21T14:35:45.590
One Vim... Just One – mMontu – 2015-08-21T20:01:51.310
@mMontu, I'm not saying vim doesn't integrate well with the shell, I'm saying I don't want it managing my windows. I don't need vim's split command when my WM does that better, automatically when I open a new window. I can more easily make my buffers span multiple screens/workspaces in groups, according to my needs. The performance hit of multiple vim sessions is vanishingly small on my machine. If multiple terminals could share a vim session, that would be pretty cool, but those components don't seem to be separated. CoVim gives me all the functionality I want with no noticable drawbacks. – Overdr0ne – 2015-08-21T21:08:54.637
I have the same problem. I want to use my window manager for managing windows, not my text editor. Using a text editor for managing windows seems emacsish... – 00prometheus – 2018-04-15T11:17:16.643