From fb9d244826027c65219f8624fb52d5d5481a3c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Andrei=20Minc=C4=83?= Date: Sun, 13 Oct 2024 23:14:33 +0200 Subject: [PATCH] fix: add 'vim' syntax highlighting where needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: Related: Signed-off-by: Daniel Andrei Mincă --- content/posts/vim-for-hackers.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/posts/vim-for-hackers.md b/content/posts/vim-for-hackers.md index 37072a1..b745f8e 100644 --- a/content/posts/vim-for-hackers.md +++ b/content/posts/vim-for-hackers.md @@ -139,7 +139,7 @@ The first step can be done with any command that populates the quickfix list: ` Taking `:grep` as an example: -``` +```vim :grep foo **/*.js ``` @@ -148,14 +148,14 @@ will populate the quickfix list with an entry for every `foo` found in `*.js` The second step involves `:help :cdo` or `:help :cfdo`: -``` +```vim :cdo s/foo/bar/gc ``` which will substitute every `foo` with `bar` on each line in the quickfix list and ask for confirmation. With `:cfdo` it would look like that: -``` +```vim :cfdo %s/foo/bar/gc ``` @@ -164,7 +164,7 @@ If you are super confident, you can drop the `c` at the end. See `:help :s_fl The third step involves `:help :update`: -``` +```vim :cfdo update ``` @@ -173,7 +173,7 @@ which will write every file in the quickfix list to disk if they have been chang In short: -``` +```vim :gr foo **/*.js :cdo s/foo/bar/gc :cfdo up