commit bc9066be9a20b176e686afb5955d12f2aa2298e0 parent 8c48270e8e7672425f78a47975ae0dc5823bcfd0 Author: pyratebeard <root@pyratebeard.net> Date: Thu, 17 Nov 2022 15:39:26 +0000 updates updates Diffstat:
M | software/vim.md | | | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/software/vim.md b/software/vim.md @@ -187,6 +187,12 @@ https://stackoverflow.com/a/19996145 :%v/^Pattern/s/^/\t/ ``` +## write regex match lines to new file +``` +:g/^Pattern/ .w >> <filename> +``` +* use `.w!` if file doesn't exist + ## sort visual block https://vim.fandom.com/wiki/How_to_sort_using_visual_blocks ```