diff options
author | bnewbold <bryan@octopart.com> | 2011-12-13 16:28:13 -0500 |
---|---|---|
committer | bnewbold <bryan@octopart.com> | 2011-12-13 16:28:13 -0500 |
commit | 59afb68757fd581893441f1b477019e278eadfe6 (patch) | |
tree | e7b777fb47362e07270954739365973509bec179 /software | |
parent | 767fcf16721f2df1daf39411f7c463d09f70291d (diff) | |
download | knowledge-59afb68757fd581893441f1b477019e278eadfe6.tar.gz knowledge-59afb68757fd581893441f1b477019e278eadfe6.zip |
vim whitespace
Diffstat (limited to 'software')
-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\+$// - |