I love Vim's sessions and create them all the time locally enjoying the use of
my .vimrc with plugins and color schemes, etc.
But I would love to do this on servers I regularly work on from my local
machine like:
:source scp://server-name/work.vim
This works somewhat but the files are empty so I usually check the session file
for "lcd /whatever/path" and some something like:
:tabdo :e scp://server-name/file/path/%
and I'm back working again.
This is begging me to script it (or if there's a better way to do this please
enlighten me!).
Only problem is thus far is my VimScript foo being weak, here's what I'm
starting to stub out:
function RemoteCheck()
let sesh_path = expand('<afile>')
let test_for_scp = "scp:"
if match(remote_sesh, test_for_scp)
:echom 'this is indeed scp sesh do something about it'
else
:echom 'nope just a regular .vim file to source proceed'
endif
endfunction
autocmd SourceCmd *vim call RemoteCheck()
I think I have a few syntax issues so far – can someone help me? This is like
my second vim function ever so it's slow going so far. Thanks!
--
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.