commit da4259a603b49886b276c2c46e5e9ba7c6ae85b7 parent 922b4ac3239fd5ae47cb53275cccc8afe66d2795 Author: breadcat <peter@minskio.co.uk> Date: Thu, 3 Dec 2020 08:50:50 +0000 Who knew vim could do this What a world we live in Diffstat:
M | content/posts/personal-vim-cheatsheet.md | | | 4 | ++++ |
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/content/posts/personal-vim-cheatsheet.md b/content/posts/personal-vim-cheatsheet.md @@ -70,6 +70,8 @@ $ move to the end of the line :%s/old/new/gc replace old with new every time in the whole file, but prompting beforehand :! run shell command +:r filename read text from filename +:r ! command read output from running command :norm run command on highlighted lines @@ -116,3 +118,5 @@ Add the below to your `init.vim` file (if using neovim): autocmd BufWritePre * %s/\s\+$//e autocmd BufWritepre * %s/\n\+\%$//e ``` + +* **Edit 2020-12-02:** Added notes regarding reading file contents and command output.