| lua | feature add: Word Grouping with double quotes | |
| plugin | Initial commit | |
| LICENSE | Initial commit | |
| multisearch.sh | feature add: Word Grouping with double quotes | |
| README.md | README.md: made a few additional explanations. | |
'find-vimwiki-words' NeoVim plugin
A plugin that lets you search for words in your whole VimWiki with Telescope even if they are on different lines. So you can easily find your Tags, Headlines or whatever. Regex is not supported, but the words can be in random order and negation of words is also possible.
The 'FindVimwikiWords' Command
The command FindVimwikiWords will open a Telescope picker, which narrows down
the list of files containing your words as you type them. The words can even be
on different lines for a match.
If a word is prefixed with a "!" like "!task" it will only find files which don't contain the word 'task'. You can mix these as you want, for example:
Log !Sunday Updates !neovim will find all files which contain the words
Log and Updates but not Sunday or neovim.
You can also group words with double quotes, for example to find Headings:
"## Tasks" "Edit Notes" will find the heading '## Tasks' and the grouped words
'Edit Notes'. You can even exclude word groups: "!## Sunday" which will find
every file except those which contain '## Sunday'. You can mix them with single
word searches.
Dependencies
There are a few plugin dependencies this plugin relies on: "vimwiki/vimwiki",
"nvim-telescope/telescope.nvim", the "bash" shell and "ripgrep" ('rg').
If these conditions are met, you should be able to use this plugin.
Keybindings
You have to set up your keybindings yourself. I set the keys <Leader>tw and I
set <space> as the leader key, so I have to press <space>, t and then w
consecutively to run the FindVimwikiWords command. The keys were set up in my
LazyVim plugin configuration file
~/.config/nvim/lua/plugins/find-vimwiki-words.lua which I'll post below.
LazyVim Plugin setup
For LazyVim you have to put a file into .config/nvim/lua/plugins. I called
mine find-vimwiki-words.lua. You have to specify the full URL to the
repository with the url key, because it's hosted on Codeberg.org and not on
GitHub. It looks like this:
return {
"fab/find-vimwiki-words.nvim",
url = "https://codeberg.org/fab/find-vimwiki-words.nvim.git",
lazy = false,
dependencies = { { "vimwiki/vimwiki" }, { "nvim-telescope/telescope.nvim" } },
keys = {
{
"<leader>tw",
function()
require("find-vimwiki-words").find_vimwiki_words()
end,
desc = "Telescope Find VimWiki words",
},
},
}
Setup with vim-plug
With vim-plug from GitHub it should be
possible too, but you have to give the full URL to the repository in the 'Plug'
command: 'Plug 'https://codeberg.org/fab/find-vimwiki-words.nvim.git'. I've
not tested it. Try yourself:
call plug#begin()
" Dependencies
Plug 'vimwiki/vimwiki'
Plug 'nvim-telescope/telescope.nvim'
" FindVimwikiWords plugin with FULL URL
Plug 'https://codeberg.org/fab/find-vimwiki-words.nvim.git'
call plug#end()
Remember to set up your keybindings. But the FindVimwikiWords command should
already be usable.
This is an early version
This is a very early version of this plugin so you will run into bugs! Please
report them on the issues pages on Codeberg.org or send a direct email to me:
-fab- fab@redterminal.org.
Contributing
You can send in Pull Requests with Codeberg.org or send your patches/commits
directly to my Email account with git send-email if you've setup your git to
send emails.
License
The code is MIT licensed so you can do very much what you want with it. Here is the License file.