20240807
This commit is contained in:
parent
0b3e9c6d4b
commit
4396724c36
2 changed files with 4 additions and 9 deletions
|
@ -16,13 +16,7 @@ local function paste_titled_link()
|
||||||
local filename_part = parts[1]
|
local filename_part = parts[1]
|
||||||
local filename_and_category = vim.split(filename_part, "/")
|
local filename_and_category = vim.split(filename_part, "/")
|
||||||
local title = parts[#parts]:match("^%s*(.-)%s*$")
|
local title = parts[#parts]:match("^%s*(.-)%s*$")
|
||||||
local link = "["
|
local link = "[" .. title .. "](" .. filename_and_category[#filename_and_category] .. ")"
|
||||||
.. title
|
|
||||||
.. "](../"
|
|
||||||
.. filename_and_category[#filename_and_category - 1]
|
|
||||||
.. "/"
|
|
||||||
.. filename_and_category[#filename_and_category]
|
|
||||||
.. ")"
|
|
||||||
vim.api.nvim_put({ link }, "", true, true)
|
vim.api.nvim_put({ link }, "", true, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -68,12 +62,12 @@ M.search_raw_title = function(opts)
|
||||||
"--with-filename",
|
"--with-filename",
|
||||||
"--line-number",
|
"--line-number",
|
||||||
"-i",
|
"-i",
|
||||||
"raw_title:.*" .. prompt,
|
"title:.*" .. prompt,
|
||||||
search_dir,
|
search_dir,
|
||||||
}
|
}
|
||||||
return cmd
|
return cmd
|
||||||
end, opts.entry_maker or function(entry)
|
end, opts.entry_maker or function(entry)
|
||||||
local filename, lnum, raw_title = entry:match("([^:]+):(%d+):raw_title:(.*)")
|
local filename, lnum, raw_title = entry:match("([^:]+):(%d+):title:(.*)")
|
||||||
if not filename then
|
if not filename then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -79,6 +79,7 @@ alias py='python'
|
||||||
alias todo="todo.sh -d ~/Dropbox/TextSync/TODO/todo.cfg"
|
alias todo="todo.sh -d ~/Dropbox/TextSync/TODO/todo.cfg"
|
||||||
## eton
|
## eton
|
||||||
alias et="eton"
|
alias et="eton"
|
||||||
|
alias zk="eton zk"
|
||||||
## toipe (https://github.com/Samyak2/toipe)
|
## toipe (https://github.com/Samyak2/toipe)
|
||||||
alias to="toipe"
|
alias to="toipe"
|
||||||
## jrnl.sh
|
## jrnl.sh
|
||||||
|
|
Loading…
Add table
Reference in a new issue