make a writing category

This commit is contained in:
2025-04-01 23:29:17 +02:00
parent 7292e0625e
commit 92145ac4b7
7 changed files with 0 additions and 0 deletions

22
writing/vim/search.md Normal file
View File

@@ -0,0 +1,22 @@
---
title: "vim search"
tags: [ "vim", "search" ]
---
Search for the next and or previous occurrence of the word under your cursor with `*` and `#`.
Search and replace the first 'one' found with 'two':
`:%s/one/two/`
Same, but replace 'one' globally:
`:%s/one/two/g`
Put quotes around every occurrence of `$HOME`:
`:%s/$HOME/"&"`
Same, but add curly brackets around `$HOSTNAME`:
`:%s/$HOSTNAME/{&}`