comparison runtime/doc/change.txt @ 2826:3c7da93eb7f9

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Tue, 10 May 2011 17:18:44 +0200
parents 1bd8af13fb43
children c869ff170ddc
comparison
equal deleted inserted replaced
2825:4ec043ec556c 2826:3c7da93eb7f9
1 *change.txt* For Vim version 7.3. Last change: 2011 Feb 25 1 *change.txt* For Vim version 7.3. Last change: 2011 May 10
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
917 {Visual}["x]Y Yank the highlighted lines [into register x] (for 917 {Visual}["x]Y Yank the highlighted lines [into register x] (for
918 {Visual} see |Visual-mode|). {not in Vi} 918 {Visual} see |Visual-mode|). {not in Vi}
919 919
920 *:y* *:yank* *E850* 920 *:y* *:yank* *E850*
921 :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the 921 :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
922 "* or "+ registers is possible only in GUI versions or 922 "* or "+ registers is possible only when the
923 when the |+xterm_clipboard| feature is included. 923 |+clipboard| feature is included.
924 924
925 :[range]y[ank] [x] {count} 925 :[range]y[ank] [x] {count}
926 Yank {count} lines, starting with last line number 926 Yank {count} lines, starting with last line number
927 in [range] (default: current line |cmdline-ranges|), 927 in [range] (default: current line |cmdline-ranges|),
928 [into register x]. 928 [into register x].
1388 for the new line: " * ". To close this comment you just have to type "/" 1388 for the new line: " * ". To close this comment you just have to type "/"
1389 before typing anything else on the new line. This will replace the 1389 before typing anything else on the new line. This will replace the
1390 middle-comment leader with the end-comment leader and apply any specified 1390 middle-comment leader with the end-comment leader and apply any specified
1391 alignment, leaving just " */". There is no need to hit BackSpace first. 1391 alignment, leaving just " */". There is no need to hit BackSpace first.
1392 1392
1393 When there is a match with a middle part, but there also is a maching end part
1394 which is longer, the end part is used. This makes a C style comment work
1395 without requiring the middle part to end with a space.
1393 1396
1394 Here is an example of alignment flags at work to make a comment stand out 1397 Here is an example of alignment flags at work to make a comment stand out
1395 (kind of looks like a 1 too). Consider comment string > 1398 (kind of looks like a 1 too). Consider comment string: >
1396 sr:/***,m:**,ex2:******/ 1399 :set comments=sr:/***,m:**,ex-2:******/
1397 1400 <
1398 /*** 1401 /*** ~
1399 **<--right aligned from "r" flag 1402 **<--right aligned from "r" flag ~
1400 ** 1403 ** ~
1401 offset 2 spaces from the "2" flag--->** 1404 offset 2 spaces for the "-2" flag--->** ~
1402 ******/ 1405 ******/ ~
1403 In this case, the first comment was typed, then return was pressed 4 times, 1406 In this case, the first comment was typed, then return was pressed 4 times,
1404 then "/" was pressed to end the comment. 1407 then "/" was pressed to end the comment.
1405 1408
1406 Here are some finer points of three part comments. There are three times when 1409 Here are some finer points of three part comments. There are three times when
1407 alignment and offset flags are taken into consideration: opening a new line 1410 alignment and offset flags are taken into consideration: opening a new line
1415 Enabling 'cindent' will override the alignment flags in many cases. 1418 Enabling 'cindent' will override the alignment flags in many cases.
1416 Reindenting using a different method like |gq| or |=| will not consult 1419 Reindenting using a different method like |gq| or |=| will not consult
1417 alignment flags either. The same behaviour can be defined in those other 1420 alignment flags either. The same behaviour can be defined in those other
1418 formatting options. One consideration is that 'cindent' has additional options 1421 formatting options. One consideration is that 'cindent' has additional options
1419 for context based indenting of comments but cannot replicate many three piece 1422 for context based indenting of comments but cannot replicate many three piece
1420 indent alignments. However, 'indentexpr' is has the ability to work better 1423 indent alignments. However, 'indentexpr' has the ability to work better with
1421 with three piece comments. 1424 three piece comments.
1422 1425
1423 Other examples: > 1426 Other examples: >
1424 "b:*" Includes lines starting with "*", but not if the "*" is 1427 "b:*" Includes lines starting with "*", but not if the "*" is
1425 followed by a non-blank. This avoids a pointer dereference 1428 followed by a non-blank. This avoids a pointer dereference
1426 like "*str" to be recognized as a comment. 1429 like "*str" to be recognized as a comment.