laher / decorated_yank

decorated yank plugin for neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decorated Yank

A Plugin to decorate a yank with the filename and line numbers. For example, given the following code in main.go:

package main

import "fmt"

func main() {
	fmt.Println("Hello World")
}

func anotherPrint() {
	fmt.Println("Hello Again")
}

By visually selecting the anotherPrint function and running :DecoratedYank() the following will be copied to the clipboard:

--------
main.go:
--------

9 func anotherPrint() {
10 	fmt.Println("Hello Again")
11 }

A mapping (in this case ctrl + y) can be defined like this:

vim.api.nvim_set_keymap("v", "<C-y>", "<cmd>DecoratedYank<cr>", opts)

About

decorated yank plugin for neovim


Languages

Language:Lua 75.1%Language:Vim Script 24.9%