From 4303240b699fd7ecbbb72743c331816bed317f0d Mon Sep 17 00:00:00 2001 From: yannickreiss Date: Tue, 17 Sep 2024 10:01:47 +0200 Subject: [PATCH] Request keywords from command line --- lua/sourcer/init.lua | 2 +- plugin/sourcer.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/sourcer/init.lua b/lua/sourcer/init.lua index c424f76..13b52db 100644 --- a/lua/sourcer/init.lua +++ b/lua/sourcer/init.lua @@ -49,7 +49,7 @@ local function httprequest(url) end function M.lookup() - local keywords = vim.fn.getreg("*") -- receive yanked text + local keywords = vim.fn.input("Keywords: ") local url = "https://dl.acm.org/action/doSearch?AllField=" .. keywords url, empty = url:gsub(" ", "+") open_window() diff --git a/plugin/sourcer.vim b/plugin/sourcer.vim index 61b06ba..df44cae 100644 --- a/plugin/sourcer.vim +++ b/plugin/sourcer.vim @@ -1,7 +1,7 @@ " Title: ACM sourcer " Description: Search for a selected text block for results in the ACM " library -" Last Change: Sun 18 Feb 2024 10:36:59 CET +" Last Change: Tue 17 Sep 2024 09:48:30 CEST " Maintainer: Yannick Reiss " Avoid loading the plugin multiple times