high-str.nvim icon indicating copy to clipboard operation
high-str.nvim copied to clipboard

Switching from inkarkat/vim-mark?

Open barries opened this issue 7 months ago • 1 comments

[Q&A, not an issue]

Has anyone here switch from or evaluated vim-mark? If so, what worked better / worse?

The author, @inkarkat did a thorough survey of prior art & inspirations, summarizing other similar plugins and their limitations--that might be of special interest to @pocco81 and others as a source of Future Features. However, overloading "mark" to mean something different than it normally means in vimworld makes his plugin hard to find and hard to disambiguate when talking w/ folks who know about vim marks.

I've been using a small part that plugin for well over a decade at this point, but am curious about folks experience vis-à-vis high-str, since I've been moving to more Lua plugins lately because I can read and, when needed, fork and tweak them more easily. For now, I'm sticking with that plugin, but am curious anyways.

Screenshot

Here's my config, with some highlighting (see also palette):

Image

(not obvious form the above is that I type {N}<leader>hh, (as 1\hh) a lot to apply highlight color N (see palette) to additional cwords/selections--e.g. sets of related variables--see the palette entry #1 below to see how that ends up adding to pattern #1).

Palette (<leader>hl output)

(the patterns are for the config screenshot above)

Image

My config:

-- The options globals must be done before vim-mark is loaded
-- (this is an old-skool vimscript plugin).
--
-- vim-mark maps a fair number of sequences, including \r, which
-- I map for replace, and # and *, which make search on mark
-- not work intuitively for me, so I disable the default keymaps.
-- and map only the few functions I need.

vim.g.mw_no_mappings               = 1   -- 1: Tell mark.vim not to install global mapping
vim.g.mwHistAdd                    = ""  -- "": Don"t auto add to search or input history
vim.g.mwDefaultHighlightingPalette = "maximum"

vim.keymap.set({"n", "x"}, "<Leader>hh", "<Plug>MarkSet",              { desc = "Toggle [H]ighlight/unhighlight on cword / selection" });
vim.keymap.set({"n", "x"}, "<Leader>hc", "<Plug>MarkClear",            { desc = "[c]lear highlights"                                  });
vim.keymap.set({"n", "x"}, "<Leader>hl", ":<C-u>call mark#List()<cr>", { desc = "[l]list highlights (show palette)"                   });
vim.keymap.set({"n", "x"}, "<Leader>hC", "<Plug>MarkConfirmAllClear",  { desc = "[C]lear all highlights (with confirmation)"          });

barries avatar May 25 '25 13:05 barries

There's a pity here. It seems the author do not maintenance his plugins here. I used to using several plugins by him, but after several years, they are all not updated for a long time.

tan-wei avatar Dec 03 '25 13:12 tan-wei