Mercurial > vim
comparison runtime/doc/usr_12.txt @ 12045:444ad56c0cac
Update runtime files.
commit https://github.com/vim/vim/commit/1ccd8fff8acfbd5df0fc0e9b4d288af84e51233e
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 11 19:50:37 2017 +0200
Update runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 11 Aug 2017 20:00:05 +0200 |
parents | 9f48eab77d62 |
children | 1174611ad715 |
comparison
equal
deleted
inserted
replaced
12044:f07a8b5428f9 | 12045:444ad56c0cac |
---|---|
1 *usr_12.txt* For Vim version 8.0. Last change: 2007 May 11 | 1 *usr_12.txt* For Vim version 8.0. Last change: 2017 Aug 11 |
2 | 2 |
3 VIM USER MANUAL - by Bram Moolenaar | 3 VIM USER MANUAL - by Bram Moolenaar |
4 | 4 |
5 Clever tricks | 5 Clever tricks |
6 | 6 |
288 :%s/\s\+$// | 288 :%s/\s\+$// |
289 | 289 |
290 The line range "%" is used, thus this works on the whole file. The pattern | 290 The line range "%" is used, thus this works on the whole file. The pattern |
291 that the ":substitute" command matches with is "\s\+$". This finds white | 291 that the ":substitute" command matches with is "\s\+$". This finds white |
292 space characters (\s), 1 or more of them (\+), before the end-of-line ($). | 292 space characters (\s), 1 or more of them (\+), before the end-of-line ($). |
293 Later will be explained how you write patterns like this |usr_27.txt|. | 293 Later will be explained how you write patterns like this, see |usr_27.txt|. |
294 The "to" part of the substitute command is empty: "//". Thus it replaces | 294 The "to" part of the substitute command is empty: "//". Thus it replaces |
295 with nothing, effectively deleting the matched white space. | 295 with nothing, effectively deleting the matched white space. |
296 | 296 |
297 Another wasteful use of spaces is placing them before a tab. Often these can | 297 Another wasteful use of spaces is placing them before a tab. Often these can |
298 be deleted without changing the amount of white space. But not always! | 298 be deleted without changing the amount of white space. But not always! |