Global Feed Post Login
Replying to Avatar pleblee

TIL if I just rebuild vim-huge in nix, I'll get vim with clipboard support enabled. Upstream defaults ftw. Every distro ships vim without clipboard enabled, nixos included. But this is nixos, so I can just set it in configuration.nix and forget it.

Try it out if you want:

```

nix-shell -p 'vim_configurable.overrideAttrs (oldAttrs: { features = "huge"; })'

```

Boom. You can yank to the system primary clipboard using key chorn `"+y`

Supposedly you're supposed to be able have the normal yank chords do this to by setting `set clipboard+=unnamedplus`, but that didn't work in my environement for some reason. So I just did the reckless thing and remapped them directly:

```

" -- Buffers: yank to system primary clipboard. yay!

nnoremap y "+y

nnoremap yy "+yy

noremap y "+y

```

AT LAST. YES!

Avatar
pleblee 1y ago

chord*

Reply to this note

Please Login to reply.

Discussion

No replies yet.