vim + COPY + mac over SSH

后端 未结 12 1214
悲哀的现实
悲哀的现实 2021-01-30 01:12

I access a sever over ssh on which I run vim for editing files. When I try to yank text from vim into an editor locally on my mac (lion) either with y OR \"+y it does not work.

12条回答
  •  不知归路
    2021-01-30 01:35

    My go-to solution is to edit the file with vim from your local machine via scp.

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

    This keeps your buffer local and makes it easy to copy to your local clipboard.

    The other advantage is that you get to use your local vim setup (.vimrc settings, plugins, etc.)

提交回复
热议问题