Skip to content

Neovim search replace & Debian DRM

Thought of the day

What are the options for search and replace text in Neovim?

Sometimes error messages are missleading...

Neovim Search and Replaceλ︎

Known options

  • g m A will match text under curor allowing in-place editing with visual-multi plugin
  • :%substitue vim-style search and replace (I find this fiddley and not reliable, although could be user errror)
  • Clojure LSP for symbols, etc.

Use a visual select to search and replace, with confirmation

Note: '<,'> is automatically included when in visual mode and : is pressed to start a command

:'<,'>s/search-text/replace-text/gc

Previous slack discussions - 3 November 2022

:cdo neovim commandλ︎

Telescope can generate a quickfix list, showing the results of pattern matches across the current project files. Then use search and replace on the quickfix list to make changes across the project.

Space f w search for a word across a project

Ctrl q opens the quickfix list

Use :cdo command to search and replace in the quickfix list

:cdo %s/current-pattern/new-pattern/g

Including the c option to confirm each replacement (using a noice popup when using Practicalli AstroNvim-config)

Practicalli Neovim search-replace pages update with lessons learned today

Debian Linuxλ︎

Firefox ESR has DRM disabled by default, so streaming video sites like Amazon Prime and Netflix will show errors

Enable DRM for streaming video sites

Open Settings > General

Scroll down to Play DRM Content option and ensure it is checked.

Amazon Prime shows an error describing how to enable the Widevine Content Decryption Module, however this plugin will not show in the about:plugins until the Settings > General > Play DRM Content option is checked.


Thank you.

🌐 Practical.li Website

Practical.li GitHub Org practicalli-johnny profile

@practicalli@clj.social @practical_li