4 ms·
Speaking of SSH, I thought of vim/neovim. I frequently use neovim over SSH to company's computer for development, but the experience is horrible if the connecti
by pca006132 5y ago
Speaking of SSH, I thought of vim/neovim. I frequently use neovim over SSH to company's computer for development, but the experience is horrible if the connection is unstable. If I remember correctly, other editors such as VSCode SSH plugin uses a local buffer for editing which is much better when the network is slightly unstable or high latency. Wondering if there is a way to do this for vim/neovim...
- nousermane 5y agoFor the same snappy "local buffer" experience with ssh/vi, you can mount remote repo using sshfs, then open with vi from that local mount: sshfs user@computer.company.com:/home/repo ~/repo vi ~/repo/file.py
- pca006132 5y agoThanks, I've heard of this earlier. However, I use ssh as I don't want to install some development packages on my local computer, and I need language server to work (which requires the development environment to work properly). sshfs is not an option here as the problem is the development environment rather than the files.
- des429 5y ago'vim user@computer.company.com:/home/repo' also works afaik :-). Vim has support for this built in.
- deleted 5y ago[deleted]
- dietr1ch 5y agotramp-mode does this on emacs. It's nice that it's just opening a file with only the `/ssh:user@host:` prefix, but a few things need tweaks (project tree, shell). BTW `/sudo:user@machine:` works too. It still feels like there's value in making this work simply outside of emacs so more programs can make use of the cached copies. Is there a more resilient alternative to `sshfs`?
- Jeff_Brown 5y agoTramp mode is great. My only pain point with it is it operates purely in serial.When i save a buffer i have to wait for it to complete on the remote server before I can switch to another. It's almost enough for me to want to open a separate emacs instance for each remote file I'm editing. (Which in tmux might even be feasible ... hmm ...)
- memco 5y agoThere's a neovim plugin in development which aims to solve this: https://github.com/chipsenkbeil/distant.nvim https://github.com/chipsenkbeil/distant.nvim.
- wumpus 5y agomosh + {emacs,vim} work pretty well on less-than-perfect links. One thing that I might miss with a local buffer is good syntax checking support (I use "flycheck" in emacs) -- it requires the server's software, and so composing local editing with server-based syntax checking sounds pretty hard to get working well.