Tuesday, November 4, 2003, 6:43:56 PM, you wrote:
SH> You should find that the autocmds I included accomplish the same task
SH> without having to pass the function call on startup.
Sorry, it seems I can't find no autocommands in the function that you
post. There is the entire function:
" always merge a new instance of Vim into a (single) existing one
" don't use in terminal!
" if this isn't the primary server
if v:servername !=? "GVIM"
" compose command to re-open this file if real
" get file name/path
let myfile = expand("%:p")
" reverse backslashes (Windows and Unix compatibility)
let myfile = substitute(myfile, '\\', '/', 'g')
" escape spaces
let myfile = escape(myfile, ' ')
" command to edit current file and maintain position
let mycmd = '<C-o>:edit +' . line('.') . ' ' . myfile . '<CR>'
" compose command to open a new buffer
let mycmd = '<C-o>:enew<CR>'
" pass file open/position command to primary server
call remote_send('GVIM', mycmd)
" call primary server to foreground
" quit this server
>> If there is a way to eliminate 'Swap already exists' message?
SH> I've not been able to find a way, other than turning off swap files
SH> with :set noswapfile. You could probably derive some very nasty hack
SH> where it is only momentarily turned off as the two servers are merged,
SH> passing the file info back and forth a few times, but it seems like
SH> too much overhead for me.
Yes, thank you for an explanation.
SH> Besides Vim never crashes, so who needs swap files? :)
PGP key: mailto:pgp-public-keys@...
np: 01 - Горький Ангел [stopped]