Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.06 KB

README.md

File metadata and controls

45 lines (27 loc) · 1.06 KB

ccr.nvim

A tiny tool provides Copy Code Reference inspired by AdamWhittingham/vim-copy-filename.

ccr.mp4

⚡️ Requirements

  • Neovim >= 0.7.0

✨ Installation

Install the plugin with lazy.nvim:

-- Lua
{
  "yuchanns/ccr.nvim",
}

Or any package manager you preferred.

🚀 Usage

Call ccr.nvim api in lua:

local ccr = require("ccr")

ccr.copy_rel_path_and_line() -- the mostly used. Copy the relative file path and line number of the code.

ccr.copy_rel_path() -- just copy the relative file path of the code.

ccr.copy_abs_path_and_line() -- copy the absolute file path and line number of the code.

ccr.copy_abs_path() -- just the absolute file path.

ccr.copy_file_name() -- copy the name of the file.

ccr.copy_dir_path() -- copy the absolute parent path of the file.

🙌 Contributing

Bug reports and feature requests are welcome! Feel free to make PRs!