• JoYo@lemmy.ml
    link
    fedilink
    English
    arrow-up
    30
    ·
    6 months ago

    ive never had to think about clipboard buffers until i used a modal editor.

    now i spend %60 of my time trying to figure out where the copied symbol went.

    • evatronic@lemm.ee
      link
      fedilink
      English
      arrow-up
      7
      ·
      6 months ago

      I don’t have the name handy, but there’s at least one plugin for vim that shows buffer previews in a popup. I’ve got it mapped to leader-sb (for “show buffer”).

    • unhinge@programming.dev
      link
      fedilink
      arrow-up
      6
      ·
      6 months ago

      You can see all registers in use with :registers, to paste from a register say "2 in insert mode use key combination <ctrl-r>2 or in normal mode "2p. You can check out more in :help registers. Unnamed register or "" is the system clipboard I think. To copy texts in a register you can prepend yank (/delete/cut, etc.) with that register "_ (for black hole register[1]) This is for neovim. Have keybinds for them and there saved you a plugin :D


      1. Text yanked in this register is gone, i.e. it’s not saved in any register. ↩︎

    • whats_all_this_then@programming.devOP
      link
      fedilink
      arrow-up
      5
      ·
      6 months ago

      So far I haven’t been brave enough for that feature. It’s either “that main place yank goes”, “system clipboard”, or “that place that makes it disappear” for me

      • suy@programming.dev
        link
        fedilink
        arrow-up
        9
        arrow-down
        2
        ·
        6 months ago

        Meanwhile, this was a feature on KDE-land since Klipper, which goes back (as far as I know and if I remember well) to KDE 3 or sooner.

        • dariusj18@lemmy.world
          link
          fedilink
          arrow-up
          5
          arrow-down
          1
          ·
          6 months ago

          There have been third party clipboard managers forever in windows, which is kind of funny because that is almost more like the unix philosophy than expecting the UI system to handle it all.

          • suy@programming.dev
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            6 months ago

            Klipper was entirely a different program, process, etc. that was using the system tray. Nowadays it seems to be a plasmoid in the system tray. How can that be less of a UNIX philosophy than the Windows alternative? Because it’s developed by the same community that makes the shell? That doesn’t make sense to me.

            • dariusj18@lemmy.world
              link
              fedilink
              arrow-up
              3
              arrow-down
              1
              ·
              6 months ago

              Then it’s not really an apt comparison as the two are comparable. I had assumed based on context we were talking about our of the box functionality from KDE, but if it’s not, then KDE and Windows had equivalent lack of clipboard history without extra tools installed.

    • barsquid@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      6 months ago

      I only know how to use them with q. I hope that’s a register, otherwise I will look foolish.

      • suy@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        6 months ago

        They are. Registers are just “named boxes” where you can store some text and/or keystrokes. When yanking and pasting, the unnamed register is used if you don’t specify a name (you can still see or edit it explicitly). For recording a macro there is no default register, though. You need to give it a name.

    • JoYo@lemmy.ml
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      1
      ·
      edit-2
      6 months ago

      they have no use for copy buffers, they are still configuring emacs.

    • sping@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      I’m just an emacs … enjoyer (…?) and I just don’t understand the post. I’m pretty sure buffers here refer to something different from emacs buffers as they’re completely unrelated to clipboards. Then from a quick scan of the plug-in mentioned it seems to mimic the clipboard ring emacs has had for many decades (always?).

      Basically I have no idea what’s going on here.

    • TheOakTree@beehaw.org
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      6 months ago

      I had to learn emacs for my engineering computation class, up to the point that we were required to present our code in emacs if we had questions to ask during office hours.

      I got quite used to it by the end of that course.

    • Hexarei@programming.dev
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      6 months ago

      What would an operating system need yank registers for? Maybe if you get a good text editor to go with it, like Evil Mode 😉

  • hakunawazo@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    6 months ago

    I like vim and use it almost every day, but sometimes I miss Strg+D and Alt+F3 from Sublime (multi edit). Block select + c isn’t as useful as this.

    • owsei@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      6 months ago

      the vim-visual-multi plugin tries to do this. It takes some time to get the hang of it, but, even if using only the simplest features, it’s way better than not having the option.

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      Give the Kakoune editor a try for native multi cursor editing. Or better yet, if you are a developer, the Helix editor.

      I’m a web developer and transitioned quite seamlessly to the Helix editor from Visual Studio Code without much hassle.

      The Helix editor is growing and gaining new functionality all the time.

  • DavidP@midwest.social
    link
    fedilink
    arrow-up
    3
    ·
    6 months ago

    Give CopyQ a try. Open source, cross platform clipboard manager with tons of features.

    One example option is being able to only ever paste plain text. It also has lots of programming hooks, I have a few for doing things like converting a line-feed delimited list into one delimited by commas and quoting the values.