Thursday, June 13, 2013

Re: Sending buffer to Vim server

On Fri, 14 Jun 2013 at 12:56am -0000, Marcin Szamotulski wrote:

> You cannot send buffers to a server. But you can read buffers: just use
> :edit filename, and when vim detects that there was a change choose
> [R]eadonly. Alternatively you can write a function which ask the
> server for a buffer's contents and puts it to new buffer in the 'email'
> instance of vim.

Thanks for the reply. This led me to a good solution: I start Vim from
within my mail client as "vim --servername mail", which enables me to
open files there from within any other vim instance. For that I added
the following to my .vimrc:

function! OpenOnVimServerMail()
exec '!view --servername mail --remote-tab "%"'
endfunction
nmap <leader>m :call OpenOnVimServerMail()<cr>

Possibly there is a more elegant solution, but it works.

Best,
Claus

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment