LoginSignup
28
25

More than 5 years have passed since last update.

sshごしのvimからクリップボードにコピーする

Last updated at Posted at 2013-04-11

<もっと評価されるべき>

参考サイト

必要な作業

  • clipboard_text_listerner.pl

    • TCPで受け取った情報をクリップボードに突っ込むスクリプトです
    • cloneして起動します

      git clone git://github.com/yoshikaw/ClipboardTextListener.git
      cd ClipboardTextListener
      ./clipboard_text_listener.pl -key パスワード文字列 -encoding utf8 -debug 2
      
  • 送信用vimスクリプト

    • netcatを使って、TCPでvimのregisterの中身を送信するスクリプトです
      • ncコマンドがない環境では動きません
    • .vimrcにコピペします
    • ~/.exchange.key にパスワード文字列を保存しておきます
    • 普通にyankした後、<Leader>yを押すと、送信されるはずです!

      • 成功していれば、下記のようなメッセージがclipboard_text_listener.plのコンソールに出るはずです

        2013/04/11 12:33:09 TextListener[36155]: (127.0.0.1:53529) *** RECEIVE DATA *** (166/3)
        
28
25
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
28
25