8000 Copy and paste from Dit from and to outside · Issue #9 · hishamhm/dit · GitHub
[go: up one dir, main page]

Skip to content
  • Copy and paste from Dit from and to outside #9

    Open

    Description

    @ooker777

    Hi, I would like to copy a word or phrase from Dit to other application, such as Firefox and vice versa. Is there a way to do so?

    Thank you.

    Activity

    1. hishamhm commented on May 23, 2014

      @hishamhm
      Owner

      You can copy and paste to/from ncurses applications such as Dit holding the Shift and selecting to copy, and holding Shift and pressing the middle button of the mouse to paste. (I think this can vary from terminal to terminal.)

    2. ooker777 commented on May 24, 2014

      @ooker777
      Author

      No, I mean the shortcut to cut, copy and paste. In Dit, when I use Ctrl+Shift+C to
      copy then paste to outside it (Firefox for example), the only sequence I get is
      ********. Copy text from outside then paste it on Dit by using Ctrl+Shift+V works as

      expected.

      Ooker.

      You can copy and paste to/from ncurses applications such as Dit holding the Shift
      and selecting to copy, and holding Shift and pressing the middle button of the
      mouse to paste. (I think this can vary from terminal to terminal.)
      —Reply to this email directly or view it on GitHub[1].[2]


      [1] #9 (comment)
      [2]
      https://github.com/notifications/beacon/6695517__eyJzY29wZSI6Ik5ld3NpZXM6Q
      mVhY29uIiwiZXhwaXJlcyI6MTcxNjUwMTMxNCwiZGF0YSI6eyJpZCI6MzI5MDY0Mz
      J9fQ==--137a29eaa226a2d54b265ef65615a17ead75d38a.gif

    3. hishamhm commented on May 24, 2014

      @hishamhm
      Owner

      That's because Ctrl+Shift+C and Ctrl+Shfit+V are provided by your terminal, not by Dit.

      There's a "hidden" feature to workaround this, but it's not enabled by default. Edit dit.c and change static int xclipOk = 0 to static int xclipOk = 1; then install the xclip application and see if Ctrl+C copies to the X11 clipboard as you'd like. If it doesn't change, popen("xclip -i 2> /dev/null", "w") to popen("xclip -i -selection clipboard 2> /dev/null", "w")

      Let me know your results!

    4. ooker777 commented on May 24, 2014

      @ooker777
      Author

      The result is better. The pasted text is not "*******" anymore. However sometimes I

      can only paste from Dit to the outside, sometimes reverse work, not both of them.

      Ooker.

      That's because Ctrl+Shift+C and Ctrl+Shfit+V are provided by your terminal, not by
      Dit.
      There's a "hidden" feature to workaround this, but it's not enabled by default. Edit
      dit.c and change static int xclipOk = 0 to static int xclipOk = 1; then install the xclip
      application and see if Ctrl+C copies to the X11 clipboard as you'd like. If it doesn't
      change, popen("xclip -i 2> /dev/null", "w") to popen("xclip -i -selection clipboard 2>
      /dev/null", "w")
      Let me know your results!
      —Reply to this email directly or view it on GitHub[1].[2]


      [1] #9 (comment)
      [2]
      https://github.com/notifications/beacon/6695517__eyJzY29wZSI6Ik5ld3NpZXM6Q
      mVhY29uIiwiZXhwaXJlcyI6MTcxNjUxNzcxNiwiZGF0YSI6eyJpZCI6MzI5MDY0MzJ9
      fQ==--cfc7941dfadf056e217933cc6c60989eb22637ae.gif

    5. hishamhm commented on May 24, 2014

      @hishamhm
      Owner

      I have some ideas how to improve this, but for now you'll have to use Ctrl+Shift+V to paste from the outside world; Ctrl+V will only paste the last thing copied from inside Dit.

    6. ooker777 commented on May 24, 2014

      @ooker777
      Author

      OK, I'll wait for the next release, thank you so much :D

      Ooker.

      I have some ideas how to improve this, but for now you'll have to use Ctrl+Shift+V to
      paste from the outside world; Ctrl+V will only paste the last thing copied from inside
      Dit.
      —Reply to this email directly or view it on GitHub[1].[2]


      [1] #9 (comment)
      [2]
      https://github.com/notifications/beacon/6695517__eyJzY29wZSI6Ik5ld3NpZXM6Q
      mVhY29uIiwiZXhwaXJlcyI6MTcxNjUyMDU4MCwiZGF0YSI6eyJpZCI6MzI5MDY0Mz
      J9fQ==--2c4f1e97eb623e998acc9fc28a5d8bbccca4a334.gif

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      No labels
      No labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

      • 0