diff options
-rw-r--r-- | software/vim.page | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/software/vim.page b/software/vim.page index f4b7e95..9fe5176 100644 --- a/software/vim.page +++ b/software/vim.page @@ -30,12 +30,11 @@ Here's what a typical ``.vimrc`` looks like for me:: Commands ------------- -I search and replace globally a lot:: +Search and replace globally:: :%s/before/after/g -Tricks -------------- + I often want to pull a particular gnarly line or two from another file; here's the command I use to grab three lines of context around 'phrase':: @@ -62,7 +61,7 @@ using:: :w !sudo tee % -Strip all trailing whitespace from a file:: +Search for trailing whitespace, or just strip it all:: + /\s\+$ :%s/\s\+$// - |