diff --git a/pages/common/vim.md b/pages/common/vim.md index ba1d4f445..f8846af4b 100644 --- a/pages/common/vim.md +++ b/pages/common/vim.md @@ -23,9 +23,9 @@ `/{{search_pattern}}` -- Perform a regex substitution in the whole file (from the start, `1`, to the end, `$`): +- Perform a regex substitution in the whole file (from the start to the end(% holds the file name)): -`:1,$s/{{pattern}}/{{replacement}}/g` +`:%/{{pattern}}/{{replacement}}/g` - Save (write) the file, and quit: