comparison runtime/doc/usr_12.txt @ 24520:5bda4653aced

Update runtime files Commit: https://github.com/vim/vim/commit/11e3c5ba820325b69cb56f70e13c21d7b8808d33 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 21 18:09:37 2021 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Wed, 21 Apr 2021 18:15:04 +0200
parents af69c9335223
children f8116058ca76
comparison
equal deleted inserted replaced
24519:da748a66a65a 24520:5bda4653aced
1 *usr_12.txt* For Vim version 8.2. Last change: 2017 Aug 11 1 *usr_12.txt* For Vim version 8.2. Last change: 2021 Apr 19
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
178 *12.4* Reverse line order 178 *12.4* Reverse line order
179 179
180 The |:global| command can be combined with the |:move| command to move all the 180 The |:global| command can be combined with the |:move| command to move all the
181 lines before the first line, resulting in a reversed file. The command is: > 181 lines before the first line, resulting in a reversed file. The command is: >
182 182
183 :global/^/m 0 183 :global/^/move 0
184 184
185 Abbreviated: > 185 Abbreviated: >
186 186
187 :g/^/m 0 187 :g/^/m 0
188 188
189 The "^" regular expression matches the beginning of the line (even if the line 189 The "^" regular expression matches the beginning of the line (even if the line
190 is blank). The |:move| command moves the matching line to after the mythical 190 is blank). The |:move| command moves the matching line to after the imaginary
191 zeroth line, so the current matching line becomes the first line of the file. 191 zeroth line, so the current matching line becomes the first line of the file.
192 As the |:global| command is not confused by the changing line numbering, 192 As the |:global| command is not confused by the changing line numbering,
193 |:global| proceeds to match all remaining lines of the file and puts each as 193 |:global| proceeds to match all remaining lines of the file and puts each as
194 the first. 194 the first.
195 195