annotate src/testdir/test29.in @ 5026:aa1ebdf70483

Added tag v7-3-1256 for changeset 322441058afc
author Bram Moolenaar <bram@vim.org>
date Fri, 28 Jun 2013 20:16:55 +0200
parents 297771eff080
children 81c26975e8f9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2291
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
1 Test for joining lines and marks in them
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
2 in compatible and nocompatible modes
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 and with 'joinspaces' set or not
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 and with 'cpoptions' flag 'j' set or not
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 STARTTEST
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
7 :so small.vim
2456
2876ac15b8c8 Avoid that running tests changes viminfo.
Bram Moolenaar <bram@vim.org>
parents: 2291
diff changeset
8 :set nocompatible viminfo+=nviminfo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 :set nojoinspaces
2291
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
10 :set cpoptions-=j
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 /firstline/
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
12 j"td/^STARTTEST/-1
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
13 PJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j
2291
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
14 j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j joinspaces
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16 j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j nojoinspaces compatible
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
17 j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj4Jy3l$pjd/STARTTEST/-2
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 firstline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 asdfasdf.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 asdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 asdfasdf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 asdf
2291
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
49 zx cvn.
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
50 as dfg?
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
51 hjkl iop!
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
52 ert
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
53 zx cvn.
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
54 as dfg?
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
55 hjkl iop!
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
56 ert
f412e141c821 Improve test for joining lines. (Milan Vancura)
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
57
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
58 STARTTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
59 /^{/+1
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
60 :set comments=s1:/*,mb:*,ex:*/,://
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
61 :set nojoinspaces fo=j
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
62 :set backspace=eol,start
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
63 :.,+3join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
64 j4J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
65 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
66 j3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
67 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
68 j3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
69 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
70 jj3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
71 ENDTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
72
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
73 {
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
74
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
75 /*
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
76 * Make sure the previous comment leader is not removed.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
77 */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
78
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
79 /*
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
80 * Make sure the previous comment leader is not removed.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
81 */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
82
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
83 // Should the next comment leader be left alone?
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
84 // Yes.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
85
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
86 // Should the next comment leader be left alone?
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
87 // Yes.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
88
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
89 /* Here the comment leader should be left intact. */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
90 // And so should this one.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
91
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
92 /* Here the comment leader should be left intact. */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
93 // And so should this one.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
94
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
95 if (condition) // Remove the next comment leader!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
96 // OK, I will.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
97 action();
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
98
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
99 if (condition) // Remove the next comment leader!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
100 // OK, I will.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
101 action();
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
102 }
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
103
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
104 STARTTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
105 /^{/+1
3580
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
106 :set comments=sO:*\ -,mO:*\ \ ,exO:*/
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
107 :set comments+=s1:/*,mb:*,ex:*/,://
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
108 :set comments+=s1:>#,mb:#,ex:#<,:<
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
109 :set cpoptions-=j joinspaces fo=j
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
110 :set backspace=eol,start
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
111 :.,+3join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
112 j4J
3580
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
113 :.,+8join
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
114 j9J
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
115 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
116 j3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
117 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
118 j3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
119 :.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
120 jj3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
121 j:.,+2join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
122 jj3J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
123 j:.,+5join
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
124 j6J
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
125 oSome code! // Make sure backspacing does not remove this comment leader.0i
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
126 ENDTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
127
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
128 {
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
129
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
130 /*
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
131 * Make sure the previous comment leader is not removed.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
132 */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
133
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
134 /*
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
135 * Make sure the previous comment leader is not removed.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
136 */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
137
3580
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
138 /* List:
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
139 * - item1
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
140 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
141 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
142 * - item2
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
143 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
144 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
145 */
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
146
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
147 /* List:
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
148 * - item1
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
149 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
150 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
151 * - item2
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
152 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
153 * foo bar baz
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
154 */
297771eff080 updated for version 7.3.550
Bram Moolenaar <bram@vim.org>
parents: 3562
diff changeset
155
3562
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
156 // Should the next comment leader be left alone?
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
157 // Yes.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
158
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
159 // Should the next comment leader be left alone?
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
160 // Yes.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
161
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
162 /* Here the comment leader should be left intact. */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
163 // And so should this one.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
164
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
165 /* Here the comment leader should be left intact. */
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
166 // And so should this one.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
167
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
168 if (condition) // Remove the next comment leader!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
169 // OK, I will.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
170 action();
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
171
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
172 if (condition) // Remove the next comment leader!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
173 // OK, I will.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
174 action();
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
175
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
176 int i = 7 /* foo *// 3
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
177 // comment
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
178 ;
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
179
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
180 int i = 7 /* foo *// 3
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
181 // comment
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
182 ;
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
183
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
184 ># Note that the last character of the ending comment leader (left angle
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
185 # bracket) is a comment leader itself. Make sure that this comment leader is
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
186 # not removed from the next line #<
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
187 < On this line a new comment is opened which spans 2 lines. This comment should
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
188 < retain its comment leader.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
189
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
190 ># Note that the last character of the ending comment leader (left angle
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
191 # bracket) is a comment leader itself. Make sure that this comment leader is
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
192 # not removed from the next line #<
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
193 < On this line a new comment is opened which spans 2 lines. This comment should
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
194 < retain its comment leader.
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
195
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
196 }
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
197
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
198 STARTTEST
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
199 :g/^STARTTEST/.,/^ENDTEST/d
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
200 :?firstline?+1,$w! test.out
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
201 :qa!
5c1aaf9b4b1b updated for version 7.3.541
Bram Moolenaar <bram@vim.org>
parents: 2456
diff changeset
202 ENDTEST