Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

perhaps, I'm forgetting something, but these solutions seem overly complicated.

I just have this in my .vimrc, and pasting (with formatting), is as simple as copying text, going to vim and hitting 'p' in command mode.

  for middle-click (system) clipboard:
    :set clipboard=unnamed
  for ctrl-c (X11) clipboard:
    :set clipboard=unnamedplus

  couple caveats:
  * +xterm_clipboard
  * 'unnamedplus' is only for >= 7.3.74 
see here for more info http://vim.wikia.com/wiki/Accessing_the_system_clipboard

note: I used unnamedplus for a bit, but found it to be much less desirable than using the unnamed middle-click buffer...YMMV



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: