From da4259a603b49886b276c2c46e5e9ba7c6ae85b7 Mon Sep 17 00:00:00 2001 From: breadcat Date: Thu, 3 Dec 2020 08:50:50 +0000 Subject: Who knew vim could do this What a world we live in --- content/posts/personal-vim-cheatsheet.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'content/posts/personal-vim-cheatsheet.md') diff --git a/content/posts/personal-vim-cheatsheet.md b/content/posts/personal-vim-cheatsheet.md index 04744ec..42e1cc9 100644 --- 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. -- cgit v1.2.3