Wednesday, February 23, 2011

Single Instance in Console?

One can edit many files with a single instance of vim, with the
argument --remote-tab-silent. Although not clear in the documentation,
the `remote' features only work in ms windows and X windows -- not in
a console window, dos box, or non-graphic shell.

In this regard, I wish the `remote' functions had corresponding
options one could set in .vimrc.

Is there some way one could use only one instance of vim, when editing
files in a plain old unix shell? Only way I can think of, offhand, is
to write a vim shell script that ran instead of vim.exe. Then, vim
filename -- would check if an instance of vim was already running or
suspended. If so, it would first write a little file containing :arge
filename. Then it would execute a fg or exit shell command. In turn
vim would source the little file when it wakes up, via an autocommand
for the shellcmdPost event.

Any more elegant way to do this?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment