Is using vim working on a file cache instead of the actual file?

I usually ssh to another computer to do my development using vim (don't send "Use Emacs", please). However, I noticed that vim is very slow when my internet is slow (duh).

EDIT: I use a terminal on my local machine and open the remote file with the vim scp: // host / file command. However, when I do this, every keystroke that I insert causes vim to go online, drastically slowing down. Instead, I want vim to read the remote file, allow me to do local editing and only go online when I run the command: w. Think of it as a writeback cache.

I know that Komodo Edit offers this functionality, where I got this idea from.

+3
source share
6 answers

You can edit ssh directly in vim as follows:

:e scp://remoteuser@server.tld//path/to/document

You can find more information in this server question .

+6
source

Vim has a plugin (which I think is standard for most recent vims) called netrw. This basically does what you want, I believe: it allows you to open the file on a remote server by copying it transparently.

See :help netrwor Vim Script Page

+1
source

vim scp:/// , , - . Vim .

, ? - , , .

+1

sshfs . sftp, vim ( - ) . Ubuntu sudo apt-get install sshfs.

0

, vim, Linux, sshfs. FUSE ( ) ssh, , . ( ssh , , , , ...).

I use it almost every day and it is a really great tool.

0
source

:e scp user@host:/path/file

See :help netrwalso :help sshin Vim.

0
source

Source: https://habr.com/ru/post/1712191/


All Articles