Browse Source

vim: simplify substitution in whole file (#1555)

Starbeamrainbowlabs 7 years ago
parent
commit
83f4361136
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pages/common/vim.md

+ 2 - 2
pages/common/vim.md

@@ -23,9 +23,9 @@
 
 `<Esc>/{{search_pattern}}<Enter>`
 
-- Perform a regex substitution in the whole file (from the start, `1`, to the end, `$`):
+- Perform a regex substitution in the whole file:
 
-`<Esc>:1,$s/{{pattern}}/{{replacement}}/g<Enter>`
+`<Esc>:%s/{{pattern}}/{{replacement}}/g<Enter>`
 
 - Save (write) the file, and quit: