fix: support yank line number

This commit is contained in:
2022-10-24 14:18:46 +08:00
parent f8ce101c7e
commit f76fd515d5
5 changed files with 42 additions and 8 deletions
+9
View File
@@ -4,10 +4,19 @@ local lv_utils = {}
-- copy current filepath to clipboard
function lv_utils.yank_filepath()
local p = vim.fn.expand('%:p')
local line = vim.fn.line(".")
p = p..":"..line
print(p)
vim.fn.setreg('+',p)
end
function lv_utils.yank_file_dir()
local p = vim.fn.expand('%:p:h')
print(p)
vim.fn.setreg('+',p)
end
function lv_utils.open_md()
local p = vim.fn.expand('%:p')
vim.fn.system("open -a typora "..p)