Advertisement

Responsive Advertisement

Frustasi Clipboard NeoVim

1. pertama pastikan kalian punya sistem clipboard di linux kalian

entah itu xsel atau xclip

install aja pake
"sudo apt install  ....."

2. kalian perlu set 

To make things easier, you can also have the text you copy in Neovim always copied to the system clipboard by adding the following in your ~/.config/nvim/init.vim file (create the file if it doesn't exist or go to the correct file location if you use a custom Neovim setup):

set clipboard=unnamedplus


3. gunakan kopi nya (yank)

Press "*y to copy to the primary selection or "+y to copy to the clipboard.

To paste from the clipboard:

  • Press "*p or "+p in NORMAL mode to paste the content of the primary selection or clipboard, respectively.

    atau kalau kalian mau paste di window normal kalian pake aja ctrl+v langsung.

Key Maps

As a finishing touch I added a key map for this "+y command as it is something I use very regularly:

map("v", "<leader>y", '"+y', opts)

I just used that key map to copy this from my Neovim config file into this article! It’s already helpful.

Posting Komentar

0 Komentar