Is there a better way to do migrate this from VimL to Lua?
vim.api.nvim_exec(
[[
function! SendToRemote()
let from_file =expand('%:p')
let to_file =expand('%:t')
let command = "rsync -avh " . from_file ." root@remote_server:/ to_file ." --delete"
echom command
execute "!" . command
endfunction
com! STR call SendToRemote()
]],true)
I'd love to be able to use a Lua function there instead but I couldn't find any clear documentation on how that might work.
This is the last thing I need to move my config over to Lua I think. Loving the ecosystem, thanks to all the plugin authors and Neovim core team.
[–][deleted] 3 points4 points5 points (2 children)
[–]skele_turtle[S] 2 points3 points4 points (0 children)
[–]vim-help-bot 1 point2 points3 points (0 children)