How can I restrict my other terminals from accessing one of my already opened file (within vim
)?
Sometimes I forget which one of my terminals has that particular file already opened and again open it in a new different GNOME terminal
. What I would like to have is, vim would warn me or simply refuse to open it, because its already openned in another GNOME terminal. I found an -e
switch, but it opens a blank window and says:
Entering Ex mode. Type "visual" to go to Normal mode.
which I dont know what purpose.
Any ideas how can I tell vim to open it and do not let any other applications anyway open it until I'm done finish closing it?
kill
...)). You can also setdirectory
to a spot where you want all the swap files to go, if you don't like them in the current directory (e.g.,set directory ^=~/.swap//
)