7
|
1
|
|
2 Test Visual block mode commands
|
1528
|
3 And test "U" in Visual mode, also on German sharp S.
|
7
|
4
|
6579
|
5 #define BO_ALL 0x0001
|
|
6 #define BO_BS 0x0002
|
|
7 #define BO_CRSR 0x0004
|
|
8
|
7
|
9 STARTTEST
|
|
10 :so small.vim
|
1528
|
11 :so mbyte.vim
|
1537
|
12 :" This only works when 'encoding' is "latin1", don't depend on the environment
|
|
13 :set enc=latin1
|
7
|
14 /^abcde
|
|
15 :" Test shift-right of a block
|
|
16 jlllljj>wlljlll>
|
|
17 :" Test shift-left of a block
|
|
18 G$hhhhkk<
|
|
19 :" Test block-insert
|
|
20 GklkkkIxyz
|
|
21 :" Test block-replace
|
|
22 Gllllkkklllrq
|
|
23 :" Test block-change
|
|
24 G$khhhhhkkcmno
|
1528
|
25 :$-4,$w! test.out
|
5471
|
26 :" Test block-insert using cursor keys for movement
|
|
27 /^aaaa/
|
|
28 :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right> \<Esc>"
|
|
29 :/^aa/,/^$/w >> test.out
|
6138
|
30 /xaaa$/
|
|
31 :exe ":norm! \<C-V>jjjI<>\<Left>p\<Esc>"
|
|
32 :/xaaa$/,/^$/w >> test.out
|
5500
|
33 :" Test for Visual block was created with the last <C-v>$
|
|
34 /^A23$/
|
|
35 :exe ":norm! l\<C-V>j$Aab\<Esc>"
|
|
36 :.,/^$/w >> test.out
|
|
37 :" Test for Visual block was created with the middle <C-v>$ (1)
|
|
38 /^B23$/
|
|
39 :exe ":norm! l\<C-V>j$hAab\<Esc>"
|
|
40 :.,/^$/w >> test.out
|
|
41 :" Test for Visual block was created with the middle <C-v>$ (2)
|
|
42 /^C23$/
|
|
43 :exe ":norm! l\<C-V>j$hhAab\<Esc>"
|
|
44 :.,/^$/w >> test.out
|
6460
|
45 :" Test for Visual block insert when virtualedit=all and utf-8 encoding
|
|
46 :set ve=all enc=utf-8
|
5730
|
47 :/\t\tline
|
|
48 :exe ":norm! 07l\<C-V>jjIx\<Esc>"
|
6460
|
49 :.,/^$/w >> test.out
|
|
50 :" Test for Visual block append when virtualedit=all
|
|
51 :exe ":norm! 012l\<C-v>jjAx\<Esc>"
|
|
52 :set ve= enc=latin1
|
5730
|
53 :.,/^$/w >> test.out
|
1528
|
54 :" gUe must uppercase a whole word, also when ß changes to SS
|
|
55 Gothe youtußeuu endYpk0wgUe
|
|
56 :" gUfx must uppercase until x, inclusive.
|
|
57 O- youßtußexu -0fogUfx
|
|
58 :" VU must uppercase a whole line
|
|
59 YpkVU
|
|
60 :" same, when it's the last line in the buffer
|
|
61 YPGi111VUddP
|
|
62 :" Uppercase two lines
|
|
63 Oblah di
|
|
64 doh dutVkUj
|
|
65 :" Uppercase part of two lines
|
|
66 ddppi333k0i222fyllvjfuUk
|
5428
|
67 :" visual replace using Enter or NL
|
|
68 G3o1234567892k05l2jr
G3o987652k02l2jr
|
|
69 G3o1234567892k05l2jr
|
|
70 G3o987652k02l2jr
|
5600
|
71 :"
|
|
72 :" Test cursor position. When ve=block and Visual block mode and $gj
|
|
73 :set ve=block
|
|
74 :exe ":norm! 2k\<C-V>$gj\<Esc>"
|
|
75 :let cpos=getpos("'>")
|
|
76 :$put ='col:'.cpos[2].' off:'.cpos[3]
|
6579
|
77 :"
|
|
78 :" block_insert when replacing spaces in front of the block with tabs
|
|
79 :set ts=8 sts=4 sw=4
|
|
80 :4,7y
|
|
81 Gp
|
|
82 :exe ":norm! f0\<C-V>2jI\<tab>\<esc>"
|
1528
|
83 :/^the/,$w >> test.out
|
|
84 :qa!
|
7
|
85 ENDTEST
|
|
86
|
5730
|
87 line1
|
|
88 line2
|
|
89 line3
|
|
90
|
5471
|
91 aaaaaa
|
|
92 bbbbbb
|
|
93 cccccc
|
|
94 dddddd
|
|
95
|
6138
|
96 xaaa
|
|
97 bbbb
|
|
98 cccc
|
|
99 dddd
|
|
100
|
6448
|
101 yaaa
|
|
102 ¿¿¿
|
|
103 bbb
|
|
104
|
5500
|
105 A23
|
|
106 4567
|
|
107
|
|
108 B23
|
|
109 4567
|
|
110
|
|
111 C23
|
|
112 4567
|
|
113
|
7
|
114 abcdefghijklm
|
|
115 abcdefghijklm
|
|
116 abcdefghijklm
|
|
117 abcdefghijklm
|
|
118 abcdefghijklm
|