statox / blog-comments

Hosting comments for www.statox.fr
1 stars 0 forks source link

"Highlighting yanked text with pure vimscript" #9

Open statox opened 4 years ago

statox commented 4 years ago

Hello people from Reddit!

About 600 of you came directly from this post, making it by far my most successful one so far :tada:

damonmccain commented 12 months ago

Hi Statox how could I install this without a plugin manager?

statox commented 12 months ago

@damonmccain Honestly that's something I have never tried, I think a plugin manager is definitely one of the most useful components when using vim/neovim.

If you are using neovim you can simply add the first snippet of the article (calling lua require'vim.highlight'.on_yank()) in your favorite config file

You can check How do I install a package in Neovim without a package manager? on vi.stackexchange.com and directly clone the github repo linked in the article in your package path. You can do something similar in Vim but you need to make sure you configure your runtime path properly (there are resources online)

Or you could go the manual way and copy the relevant code (i.e. the autocommand from plugin/FYT.vim and the functions from autoload/FYT.vim that you might need to rename) in your vimrc or the relevant files you have in your config.