Re: .vimrc from URL

2007-01-12 Thread Charles E Campbell Jr

A.J.Mechelynck wrote:


Charles E Campbell Jr wrote:


OK, with all that:

 vim -U NONE -c set nocp|so $HOME/.vim/plugin/netrwPlugin.vim -c 
so scp://HOSTNAME/.vimrc




Rather than -U NONE (i.e., no gvimrc) shouldn't that be -u NORC 
(i.e., with small u: don't source $HOME/.vimrc but do source the 
global plugins)? I suggest the amended command-line below (with --cmd 
for early sourcing):


vim -u NORC -N --cmd runtime plugin/netrwPlugin.vim --cmd source 
scp://HOSTNAME/.vimrc



Sounds better!

I'll put a note to that effect in pi_netrw.txt.

Regards,
Chip Campbell



Re: .vimrc from URL

2007-01-11 Thread A.J.Mechelynck

Charles E Campbell Jr wrote:

Maurí­cio wrote:


I change my .vimrc very often, and I use vim
in many computers. The result is that my changes
are not always updated to all computers.

Is it possible to ask vim to update its
.vimrc from an URL, like an FTP address?



With v108c, netrw can source remote files.  You can get v108c from my 
website:

  http://mysite.verizon.net/astronaut/vim/index.html#NETRW

With vim 7.0 and official patches 1-182, vim will emit an error message 
(but works anyway) when sourcing a remote file.
With the same plus the patch to vim's source at 
http://mysite.verizon.net/astronaut/vim/index.html#SOURCECMD, no error 
message gets issued.
The patch at my website provides a new autocmd event: SourceCmd, which 
netrw will take advantage of if present.


OK, with all that:

 vim -U NONE -c set nocp|so $HOME/.vim/plugin/netrwPlugin.vim -c so 
scp://HOSTNAME/.vimrc


will

 (a) avoid attempting to source in any local .vimrc
 (b) source in netrwPlugin.vim from $HOME/.vim/plugin
 (c) source in the remote .vimrc via scp, presumably on HOSTNAME.

Regards,
Chip Campbell




Rather than -U NONE (i.e., no gvimrc) shouldn't that be -u NORC (i.e., with 
small u: don't source $HOME/.vimrc but do source the global plugins)? I 
suggest the amended command-line below (with --cmd for early sourcing):


vim -u NORC -N --cmd runtime plugin/netrwPlugin.vim --cmd source 
scp://HOSTNAME/.vimrc



Best regards,
Tony.