Skip to content

Find selected text #124

Answered by Mirodin
lua-rocks asked this question in Q&A
Aug 3, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote
-- Copy selected text into search field
keys["ctrl+f"] = function()
    local text = not buffer.selection_empty and buffer:get_sel_text() or nil
    ui.find.focus{find_entry_text = text}
end

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lua-rocks
Comment options

@lua-rocks
Comment options

@Mirodin
Comment options

Answer selected by lua-rocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants