Execute A Shell Command On Multiple Lines In Neovim
August 2023
This is how you do it with hitting ":" but you can just hit "!" and not have to type it.
- Add some text
- Select it visually
-
Hit the
:It'll show something like:
'<,'> -
Add a
!then the command you want to run. For example, this sorts the selected lines:
'<,'>! sortend of line