How can I use local vim setting on AWS server?

2019-06-09 17:07发布

问题:

Is there a faster way to edit AWS EC2 config file using my local env vimrc?

I found that it is very hard to edit file in remote server using default vim settings

Any one has good solution to make ourself better?

回答1:

Remote editing

I suppose you're using ssh to log into your AWS server and launch Vim there. An alternative is to launch Vim on your local system, and open the remote file in there, e.g. via the built-in netrw plugin:

$ vim scp://hostname/path/to/file

or within Vim:

:edit scp://hostname/path/to/file

Sharing Vim configuration across machines

There are many different approaches for sharing your .vimrc and plugins across multiple machines. Possible solutions were recently collected at What is the best way to deal with vim plugins on multiple machines?