From 59afb68757fd581893441f1b477019e278eadfe6 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 13 Dec 2011 16:28:13 -0500 Subject: vim whitespace --- software/vim.page | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'software') 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\+$// - -- cgit v1.2.3