Live data from Hacker News

The weight of the clipboard

kinduff.com

21–30 of 139 posts

Re: The weight of the clipboard

#21
To all of you who stopped worrying thanks to a clipboard manager, how do you handle sensitive contents in your clipboard?

For example, I routinely copy-paste my passwords from KeePass, and I have disabled all clipboard management to avoid copies of my passwords lingering around.

Re: The weight of the clipboard

#22
post #21

To all of you who stopped worrying thanks to a clipboard manager, how do you handle sensitive contents in your clipboard? For example, I routinely copy-paste my passwords from KeePass, and I have disabled all clipboard management to avoid copies of my passwords lingering around.

At least on MacOS "sensitive" contents copied to clipboard by apps can be marked as such, and won't be persisted by my clipboard manager.

Re: The weight of the clipboard

#23

Unify your vim clipboard with the system clipboard, they said. The integration is wonderful, they said. Well: 1/ copy URL from browser 2/ alt tab to vim notes 3/ delete old URL from notes 4/ paste new URL but get the old URL instead?! How do I do the FORTH equivalent of swapping the two items on the top of the stack (and have a stack in the first place)? :)

> 4/ paste new URL but get the old URL instead?!

To paste the copied URL instead of the deleted one, you can paste from the 0 register by using "0p.

Otherwise, depending on your system, pasting from the * or + registers (using "*p or "+p) will paste what you copied from the browser.

Re: The weight of the clipboard

#24

Unify your vim clipboard with the system clipboard, they said. The integration is wonderful, they said. Well: 1/ copy URL from browser 2/ alt tab to vim notes 3/ delete old URL from notes 4/ paste new URL but get the old URL instead?! How do I do the FORTH equivalent of swapping the two items on the top of the stack (and have a stack in the first place)? :)

After reading this my mind went to the same place of viewing the clipboard as a stack. Wonder if that’s possible system-wide. One solution I have in vim which I always forget to use is adding an additional d or p to use a secondary paste buffer: vnoremap dd "ad nnoremap ddd "add nnoremap pp "ap

You can also move lines up and down using the move command:

  :[range]m[ove] {address}
Some common remaps:

  vnoremap  :m '>+1gv=gv
  vnoremap  :m 'gv=gv
  inoremap  :m .+1==gi
  inoremap  :m .-2==gi
  nnoremap j :m .+1==
  nnoremap k :m .-2==

Re: The weight of the clipboard

#25
post #21

To all of you who stopped worrying thanks to a clipboard manager, how do you handle sensitive contents in your clipboard? For example, I routinely copy-paste my passwords from KeePass, and I have disabled all clipboard management to avoid copies of my passwords lingering around.

If you copy your password then use it and then delete the item from the clipboard manager manually.

Re: The weight of the clipboard

#26

I stopped worrying about it when I installed the Ditto clipboard Manager[0]. It keeps everything, so don't have to keep track of what I copied in my short term memory. I offloaded that task to the computer. Turns out they're good at that kind of thing. I wrote about it back in 2016 on my very ugly website: https://www.tidbitsfortechs.com/2016/02/clipboard-manager/ [0] https://ditto-cp.sourceforge.io/

I use ditto too and set it so it has everyting I copied in the last 2 weeks. It's really nice to be able to instantly retrieve some text which I copied 4 days ago, for example.

Re: The weight of the clipboard

#27
Under X, the clipboard is especially heavy: you have two ways to copy and paste (Ctrl+c/v versus selection and middle mouse button), and Ctrl+v doesn't work in terminals. It's confusing.

Re: The weight of the clipboard

#28

I stopped worrying about it when I installed the Ditto clipboard Manager[0]. It keeps everything, so don't have to keep track of what I copied in my short term memory. I offloaded that task to the computer. Turns out they're good at that kind of thing. I wrote about it back in 2016 on my very ugly website: https://www.tidbitsfortechs.com/2016/02/clipboard-manager/ [0] https://ditto-cp.sourceforge.io/

It’s such an unassuming piece of software but it might be the most important executable on my laptop. It’s basically an instant notebook. Find anything remotely interesting? Just CTRL-C it and it’s there whenever I need it.

Re: The weight of the clipboard

#30
I have a tangentially related issue. It's completely irrational, but I can't shake it. Sometimes when writing code, I need to add a block that looks a lot like an existing one, so I'll copy it and paste just below. (Yes, I know, DRY. Sue me :)

The irrational part comes in when it's time for me to make the tweaks. Maybe I'm working on a yaml config file, and I need to specify two objects that are mostly the same, with minor changes to one of them.

I'll make sure I'm working on "the copy", and not "the original". So, let's say I start with this:

    - author: E. Hemingway
      title: The Old Man and the Sea
      medium: hardcover
      edition: 1
      published: 1952
And the project manager says I need to add the second edition paperback to the list. I'll find that block, copy the whole thing, and *then make sure I don't disturb the "original":

    - author: E. Hemingway
      title: The Old Man and the Sea
      medium: hardcover
      edition: 1
      published: 1952
    - author: E. Hemingway
      title: The Old Man and the Sea
      medium: trade
      edition: 2
      published: 1953
Basically, I've internalized that my bits have a color[1].

[1] https://ansuz.sooke.bc.ca/entry/23

Post reply on HN