Created
May 30, 2013 01:25
-
-
Save kristjan/5675218 to your computer and use it in GitHub Desktop.
A clever way to copy from a remote vim session to your local system clipboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host my.remote.host | |
RemoteForward 12888 localhost:12888 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map <Leader>y :echo system('echo -n '.shellescape(@").' \| npaste')<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while sleep 0.1; do nc -l 12888 | pbcopy; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ "$*" ] && cat $* | nc localhost 12888 || nc localhost 12888 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment