source: patches/vim-7.0-fixes-13.patch@ d67c60d0

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since d67c60d0 was 9903b4e, checked in by Jim Gifford <clfs@…>, 18 years ago

Updated vim patch

  • Property mode set to 100644
File size: 236.4 KB
RevLine 
[d28a23b]1Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
[9903b4e]2Date: 2006-09-18
[d28a23b]3Initial Package Version: 7.0
4Origin: Upstream
5Upstream Status: Applied
6Description: Contains Patch 001-004, 006-026, 028-031, 033-044, 036-056,
[9903b4e]7 058-064, 066-073, 075-107, and 109 from Upstream
8 005, 027, 032, 045, 057, 066, 074, 108 are for the extras, Mac, or
[d28a23b]9 Windows 32 only
10
11diff -Naur vim70.orig/configure vim70/configure
12--- vim70.orig/configure 2004-07-05 02:02:24.000000000 -0700
13+++ vim70/configure 2006-08-09 08:37:06.000000000 -0700
14@@ -3,4 +3,4 @@
15 # This is just a stub for the Unix configure script, to provide support for
16 # doing "./configure" in the top Vim directory.
17
18-cd src && ./configure "$@"
19+cd src && exec ./configure "$@"
20diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim
21--- vim70.orig/runtime/autoload/ccomplete.vim 2006-05-03 07:35:56.000000000 -0700
22+++ vim70/runtime/autoload/ccomplete.vim 2006-07-14 08:51:21.000000000 -0700
23@@ -1,7 +1,7 @@
24 " Vim completion script
25 " Language: C
26 " Maintainer: Bram Moolenaar <Bram@vim.org>
27-" Last Change: 2006 May 03
28+" Last Change: 2006 May 08
29
30
31 " This function is used for the 'omnifunc' option.
32@@ -458,7 +458,7 @@
33 " member.
34 function! s:StructMembers(typename, items, all)
35 " Todo: What about local structures?
36- let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
37+ let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
38 if fnames == ''
39 return []
40 endif
41diff -Naur vim70.orig/runtime/autoload/gzip.vim vim70/runtime/autoload/gzip.vim
42--- vim70.orig/runtime/autoload/gzip.vim 2006-03-31 07:12:15.000000000 -0800
43+++ vim70/runtime/autoload/gzip.vim 2006-08-09 08:37:36.000000000 -0700
44@@ -1,6 +1,6 @@
45 " Vim autoload file for editing compressed files.
46 " Maintainer: Bram Moolenaar <Bram@vim.org>
47-" Last Change: 2006 Mar 31
48+" Last Change: 2006 Jul 19
49
50 " These functions are used by the gzip plugin.
51
52@@ -127,9 +127,9 @@
53 let nmt = s:tempname(nm)
54 if rename(nm, nmt) == 0
55 if exists("b:gzip_comp_arg")
56- call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt)
57+ call system(a:cmd . " " . b:gzip_comp_arg . " '" . nmt . "'")
58 else
59- call system(a:cmd . " " . nmt)
60+ call system(a:cmd . " '" . nmt . "'")
61 endif
62 call rename(nmt . "." . expand("<afile>:e"), nm)
63 endif
64diff -Naur vim70.orig/runtime/autoload/paste.vim vim70/runtime/autoload/paste.vim
65--- vim70.orig/runtime/autoload/paste.vim 2006-04-21 11:31:01.000000000 -0700
66+++ vim70/runtime/autoload/paste.vim 2006-07-14 08:51:21.000000000 -0700
67@@ -1,6 +1,6 @@
68 " Vim support file to help with paste mappings and menus
69 " Maintainer: Bram Moolenaar <Bram@vim.org>
70-" Last Change: 2006 Apr 21
71+" Last Change: 2006 Jun 23
72
73 " Define the string to use for items that are present both in Edit, Popup and
74 " Toolbar menu. Also used in mswin.vim and macmap.vim.
75@@ -12,7 +12,7 @@
76 if has("virtualedit")
77 let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
78 let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
79- let paste#paste_cmd['i'] = '<Esc>' . paste#paste_cmd['n'] . 'gi'
80+ let paste#paste_cmd['i'] = 'x<BS><Esc>' . paste#paste_cmd['n'] . 'gi'
81
82 func! paste#Paste()
83 let ove = &ve
84diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
85--- vim70.orig/runtime/autoload/spellfile.vim 2006-02-01 04:12:24.000000000 -0800
86+++ vim70/runtime/autoload/spellfile.vim 2006-09-11 08:32:21.000000000 -0700
87@@ -1,9 +1,9 @@
88 " Vim script to download a missing spell file
89 " Maintainer: Bram Moolenaar <Bram@vim.org>
90-" Last Change: 2006 Feb 01
91+" Last Change: 2006 Aug 29
92
93 if !exists('g:spellfile_URL')
94- let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell'
95+ let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
96 endif
97 let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
98
99@@ -61,13 +61,13 @@
100 new
101 setlocal bin
102 echo 'Downloading ' . fname . '...'
103- exe 'Nread ' g:spellfile_URL . '/' . fname
104+ call spellfile#Nread(fname)
105 if getline(2) !~ 'VIMspell'
106 " Didn't work, perhaps there is an ASCII one.
107 g/^/d
108 let fname = a:lang . '.ascii.spl'
109 echo 'Could not find it, trying ' . fname . '...'
110- exe 'Nread ' g:spellfile_URL . '/' . fname
111+ call spellfile#Nread(fname)
112 if getline(2) !~ 'VIMspell'
113 echo 'Sorry, downloading failed'
114 bwipe!
115@@ -95,7 +95,7 @@
116 g/^/d
117 let fname = substitute(fname, '\.spl$', '.sug', '')
118 echo 'Downloading ' . fname . '...'
119- exe 'Nread ' g:spellfile_URL . '/' . fname
120+ call spellfile#Nread(fname)
121 if getline(2) !~ 'VIMsug'
122 echo 'Sorry, downloading failed'
123 else
124@@ -109,3 +109,15 @@
125 bwipe
126 endif
127 endfunc
128+
129+" Read "fname" from the server.
130+function! spellfile#Nread(fname)
131+ if g:spellfile_URL =~ '^ftp://'
132+ " for an ftp server use a default login and password to avoid a prompt
133+ let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
134+ let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
135+ exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
136+ else
137+ exe 'Nread ' g:spellfile_URL . '/' . a:fname
138+ endif
139+endfunc
[9903b4e]140diff -Naur vim70.orig/runtime/menu.vim vim70/runtime/menu.vim
141--- vim70.orig/runtime/menu.vim 2006-04-17 06:47:28.000000000 -0700
142+++ vim70/runtime/menu.vim 2006-09-18 08:56:52.000000000 -0700
143@@ -2,7 +2,7 @@
144 " You can also use this as a start for your own set of menus.
145 "
146 " Maintainer: Bram Moolenaar <Bram@vim.org>
147-" Last Change: 2006 Apr 17
148+" Last Change: 2006 Sep 14
149
150 " Note that ":an" (short for ":anoremenu") is often used to make a menu work
151 " in all modes and avoid side effects from mappings defined by the user.
152@@ -885,6 +885,8 @@
153 if exists("s:changeitem") && s:changeitem != ''
154 call <SID>SpellDel()
155 endif
156+
157+ " Return quickly if spell checking is not enabled.
158 if !&spell || &spelllang == ''
159 return
160 endif
161@@ -908,18 +910,18 @@
162 let s:fromword = w
163 let pri = 1
164 for sug in s:suglist
165- exe 'amenu 1.5.' . pri . ' PopUp.' . s:changeitem . '.' . escape(sug, ' .')
166+ exe 'anoremenu 1.5.' . pri . ' PopUp.' . s:changeitem . '.' . escape(sug, ' .')
167 \ . ' :call <SID>SpellReplace(' . pri . ')<CR>'
168 let pri += 1
169 endfor
170
171 let s:additem = 'add\ "' . escape(w, ' .') . '"\ to\ word\ list'
172- exe 'amenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>'
173+ exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>'
174
175 let s:ignoreitem = 'ignore\ "' . escape(w, ' .') . '"'
176- exe 'amenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>'
177+ exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>'
178
179- amenu 1.8 PopUp.-SpellSep- :
180+ anoremenu 1.8 PopUp.-SpellSep- :
181 endif
182 endif
183 endfunc
184@@ -938,7 +940,9 @@
185 let s:changeitem = ''
186 endfun
187
188- au! MenuPopup * call <SID>SpellPopup()
189+ augroup SpellPopupMenu
190+ au! MenuPopup * call <SID>SpellPopup()
191+ augroup END
192 endif
193
194 " The GUI toolbar (for MS-Windows and GTK)
195@@ -1013,9 +1017,9 @@
196 tmenu ToolBar.FindPrev Find Previous
197 tmenu ToolBar.Replace Find / Replace...
198 endif
199- tmenu ToolBar.LoadSesn Chose a session to load
200+ tmenu ToolBar.LoadSesn Choose a session to load
201 tmenu ToolBar.SaveSesn Save current session
202- tmenu ToolBar.RunScript Chose a Vim Script to run
203+ tmenu ToolBar.RunScript Choose a Vim Script to run
204 tmenu ToolBar.Make Make current project (:make)
205 tmenu ToolBar.RunCtags Build tags in current directory tree (!ctags -R .)
206 tmenu ToolBar.TagJump Jump to tag under cursor
[d28a23b]207diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
208--- vim70.orig/runtime/plugin/matchparen.vim 2006-04-27 06:31:26.000000000 -0700
209+++ vim70/runtime/plugin/matchparen.vim 2006-09-11 09:04:35.000000000 -0700
210@@ -1,6 +1,6 @@
211 " Vim plugin for showing matching parens
212 " Maintainer: Bram Moolenaar <Bram@vim.org>
213-" Last Change: 2006 Apr 27
214+" Last Change: 2006 Sep 09
215
216 " Exit quickly when:
217 " - this plugin was already loaded (or disabled)
218@@ -44,7 +44,7 @@
219 let before = 0
220
221 let c = getline(c_lnum)[c_col - 1]
222- let plist = split(&matchpairs, ':\|,')
223+ let plist = split(&matchpairs, '.\zs[:,]')
224 let i = index(plist, c)
225 if i < 0
226 " not found, in Insert mode try character before the cursor
227@@ -90,19 +90,19 @@
228 " Find the match. When it was just before the cursor move it there for a
229 " moment.
230 if before > 0
231- let save_cursor = getpos('.')
232+ let save_cursor = winsaveview()
233 call cursor(c_lnum, c_col - before)
234 endif
235
236 " When not in a string or comment ignore matches inside them.
237 let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
238- \ '=~? "string\\|comment"'
239+ \ '=~? "string\\|character\\|singlequote\\|comment"'
240 execute 'if' s_skip '| let s_skip = 0 | endif'
241
242 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
243
244 if before > 0
245- call setpos('.', save_cursor)
246+ call winrestview(save_cursor)
247 endif
248
249 " If a match is found setup match highlighting.
250diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim
251--- vim70.orig/runtime/scripts.vim 2006-03-28 11:30:49.000000000 -0800
252+++ vim70/runtime/scripts.vim 2006-08-09 08:38:04.000000000 -0700
253@@ -1,7 +1,7 @@
254 " Vim support file to detect file types in scripts
255 "
256 " Maintainer: Bram Moolenaar <Bram@vim.org>
257-" Last change: 2006 Mar 28
258+" Last change: 2006 Jul 08
259
260 " This file is called by an autocommand for every file that has just been
261 " loaded into a buffer. It checks if the type of file can be recognized by
262@@ -54,6 +54,12 @@
263 let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
264 endif
265
266+ " tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
267+ " third line. Suggested by Steven Atkinson.
268+ if getline(3) =~ '^exec wish'
269+ let s:name = 'wish'
270+ endif
271+
272 " Bourne-like shell scripts: bash bash2 ksh ksh93 sh
273 if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
274 call SetFileTypeSH(s:line1) " defined in filetype.vim
275diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile
276--- vim70.orig/runtime/tutor/Makefile 2004-06-07 07:32:39.000000000 -0700
277+++ vim70/runtime/tutor/Makefile 2006-09-11 09:26:16.000000000 -0700
278@@ -2,8 +2,13 @@
279 #
280 # The Japanese tutor exists in three encodings. Use the UTF-8 version as the
281 # original and create the others with conversion.
282+#
283+# Similarly for Russian and Korean
284
285-all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc
286+all: tutor.ja.sjis tutor.ja.euc \
287+ tutor.ko.euc \
288+ tutor.ru tutor.ru.cp1251 \
289+ tutor.gr tutor.gr.cp737
290
291 tutor.ja.sjis: tutor.ja.utf-8
292 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
293@@ -13,3 +18,15 @@
294
295 tutor.ko.euc: tutor.ko.utf-8
296 iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc
297+
298+tutor.ru: tutor.ru.utf-8
299+ iconv -f UTF-8 -t KOI8-R tutor.ru.utf-8 > tutor.ru
300+
301+tutor.ru.cp1251: tutor.ru.utf-8
302+ iconv -f UTF-8 -t cp1251 tutor.ru.utf-8 > tutor.ru.cp1251
303+
304+tutor.gr: tutor.gr.utf-8
305+ iconv -f UTF-8 -t ISO-8859-7 tutor.gr.utf-8 > tutor.gr
306+
307+tutor.gr.cp737: tutor.gr.utf-8
308+ iconv -f UTF-8 -t cp737 tutor.gr.utf-8 > tutor.gr.cp737
309diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8
310--- vim70.orig/runtime/tutor/tutor.gr.utf-8 1969-12-31 16:00:00.000000000 -0800
311+++ vim70/runtime/tutor/tutor.gr.utf-8 2006-09-11 09:26:16.000000000 -0700
312@@ -0,0 +1,815 @@
313+===============================================================================
314+= Î. αλ Ï. Ï. ή ρ Ξ α Ï. ε Ï. Ï. ο V I M T u t o r - Î.κΎοÏ.η 1.5 =
315+===============================================================================
316+
317+ Î. Vim είΜαι έΜαÏ. Ï.αΜίÏ.Ï.Ï.ροÏ. Ï.Ï.ÎœÏ.άκÏ.ηÏ. Ï.οÏ. έÏ.ει Ï.ολλέÏ. εΜÏ.ολέÏ., Ï.άρα
318+ Ï.ολλέÏ. για Μα εΟηγήÏ.οÏ.Όε Ï.ε Όία Ï.εριήγηÏ.η Ï.Ï.Ï.Ï. αÏ.Ï.ή. Î.Ï.Ï.ή η Ï.εριήγηÏ.η
319+ Ï.Ï.εΎιάÏ.Ï.ηκε για Μα Ï.εριγράÏ.ει ικαΜοÏ.οιηÏ.ικά Ï.ιÏ. εΜÏ.ολέÏ. Ï.οÏ. Ξα Ï.αÏ.
320+ κάΜοÏ.Îœ Μα Ï.ρηÏ.ιΌοÏ.οιείÏ.ε εύκολα Ï.οΜ Vim Ï.αΜ έΜαΜ γεΜικήÏ. Ï.ρήÏ.ηÏ. Ï.Ï.ÎœÏ.άκÏ.η.
321+
322+ Î. καÏ.ά Ï.ροÏ.έγγιÏ.η Ï.ρÏ.ΜοÏ. Ï.οÏ. αÏ.αιÏ.είÏ.αι για Μα ολοκληρÏ.Ï.εÏ.ε Ï.ηΜ Ï.εριήγηÏ.η
323+ είΜαι 25-30 λεÏ.Ï.ά, εΟαρÏ.Ï.ÎœÏ.αÏ. αÏ.Ï. Ï.ο Ï.Ï.Ï.ο Ï.ρÏ.Μο Ξα ΟοΎέÏ.εÏ.ε για
324+ Ï.ειραΌαÏ.ιÏ.ΌούÏ..
325+
326+ Î.ι εΜÏ.ολέÏ. Ï.Ï.α ΌαΞήΌαÏ.α Ξα Ï.ροÏ.οÏ.οιήÏ.οÏ.Îœ Ï.ο κείΌεΜο. Î.ηΌιοÏ.ργήÏ.Ï.ε έΜα
327+ αΜÏ.ίγραÏ.ο αÏ.Ï.ού Ï.οÏ. αρÏ.είοÏ. για Μα εΟαÏ.κηΞείÏ.ε (αΜ ΟεκιΜήÏ.αÏ.ε Ï.ο
328+ "Vimtutor" αÏ.Ï.Ï. είΜαι ήΎη έΜα αΜÏ.ίγραÏ.ο).
329+
330+ Î.ίΜαι Ï.ηΌαΜÏ.ικÏ. Μα ΞÏ.ΌάÏ.Ï.ε Ï.Ï.ι αÏ.Ï.ή η Ï.εριήγηÏ.η είΜαι οργαΜÏ.ΌέΜη έÏ.Ï.ι
331+ Ï.Ï.Ï.ε Μα ΎιΎάÏ.κει ΌέÏ.Ï. Ï.ηÏ. Ï.ρήÏ.ηÏ.. Î.Ï.Ï.Ï. Ï.ηΌαίΜει Ï.Ï.ι Ï.ρειάζεÏ.αι Μα
332+ εκÏ.ελείÏ.ε Ï.ιÏ. εΜÏ.ολέÏ. για Μα Ï.ιÏ. ΌάΞεÏ.ε Ï.Ï.Ï.Ï.ά. Î.Îœ ΎιαβάζεÏ.ε ÎŒÏ.Μο Ï.ο
333+ κείΌεΜο, Ξα Ï.ιÏ. ΟεÏ.άÏ.εÏ.ε!
334+
335+ ΀Ï.ρα, βεβαιÏ.ΞείÏ.ε Ï.Ï.ι Ï.ο Ï.λήκÏ.ρο Shift-Lock Î.Î.Ν είΜαι Ï.αÏ.ηΌέΜο και
336+ Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο j αρκεÏ.έÏ. Ï.ορέÏ. για Μα ΌεÏ.ακιΜήÏ.εÏ.ε Ï.οΜ ΎροΌέα έÏ.Ï.ι
337+ Ï.Ï.Ï.ε Ï.ο Î.άΞηΌα 1.1 Μα γεΌίÏ.ει Ï.λήρÏ.Ï. Ï.ηΜ οΞÏ.Μη.
338+
339+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
340+ Î.άΞηΌα 1.1: Î.Î.΀Î.Î.Î.ΝÎ.Ν΀Î.Σ ΀Î.Ν Î.ΡÎ.Î.Î.Î.
341+
342+ ** Î.ια Μα κιΜήÏ.εÏ.ε Ï.οΜ ΎροΌέα, Ï.αÏ.ήÏ.Ï.ε Ï.α Ï.λήκÏ.ρα h,j,k,l Ï.Ï.Ï.Ï. ΎείÏ.ΜεÏ.αι. **
343+ ^
344+ k Hint: ΀ο Ï.λήκÏ.ρο h είΜαι αριÏ.Ï.ερά και κιΜεί Ï.Ï.' αριÏ.Ï.ερά.
345+ < h l > ΀ο Ï.λήκÏ.ρο l είΜαι ΎεΟιά και κιΜεί Ï.Ï.α ΎεΟιά.
346+ j ΀ο Ï.λήκÏ.ρο j Όοιάζει Όε βελάκι Ï.ροÏ. Ï.α κάÏ.Ï..
347+ v
348+
349+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.ριγύρÏ. Ï.Ï.ηΜ οΞÏ.Μη ΌέÏ.ρι Μα ΜοιÏ.ΞεÏ.ε άΜεÏ.α.
350+
351+ 2. Î.ραÏ.ήÏ.Ï.ε Ï.αÏ.ηΌέΜο Ï.ο κάÏ.Ï. Ï.λήκÏ.ρο (j) ΌέÏ.ρι Μα εÏ.αΜαληÏ.Ξεί.
352+---> ΀Ï.ρα ΟέρεÏ.ε Ï.Ï.Ï. Μα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο εÏ.Ï.ΌεΜο ΌάΞηΌα.
353+
354+ 3. ΧρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ο κάÏ.Ï. Ï.λήκÏ.ρο, ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο Î.άΞηΌα 1.2.
355+
356+ΣηΌείÏ.Ï.η: Î.Îœ αΌÏ.ιβάλλεÏ.ε για κάÏ.ι Ï.οÏ. Ï.αÏ.ήÏ.αÏ.ε, Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα βρεΞείÏ.ε
357+ Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. Î.εÏ.ά Ï.αÏ.ήÏ.Ï.ε ΟαΜά Ï.ηΜ εΜÏ.ολή Ï.οÏ. ΞέλαÏ.ε.
358+
359+ΣηΌείÏ.Ï.η: ΀α Ï.λήκÏ.ρα Ï.οÏ. ΎροΌέα Ξα Ï.ρέÏ.ει εÏ.ίÏ.ηÏ. Μα ΎοÏ.λεύοÏ.Îœ. Î.λλά Όε Ï.α hjkl
360+ Ξα ÎŒÏ.ορείÏ.ε Μα κιΜηΞείÏ.ε Ï.ολύ γρηγορÏ.Ï.ερα, ÎŒÏ.λιÏ. Ï.α Ï.Ï.ΜηΞίÏ.εÏ.ε.
361+
362+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
363+ Î.άΞηΌα 1.2: Î.Î Î.Î.ΝÎ.Ν΀Î.Σ Î.Î.Î. Î.Î.Î.Î.ΝÎ.Ν΀Î.Σ Σ΀Î.Ν VIM
364+
365+ !! ΣÎ.Î.Î.Î.ΩΣÎ.: ΠριΜ εκÏ.ελέÏ.εÏ.ε κάÏ.οιο αÏ.Ï. Ï.α βήΌαÏ.α, ΎιαβάÏ.Ï.ε Ï.λο Ï.ο ΌάΞηΌα!!
366+
367+ 1. ΠαÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο <ESC> (για Μα είÏ.Ï.ε Ï.ίγοÏ.ρα Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η).
368+
369+ 2. ΠληκÏ.ρολογήÏ.Ï.ε: :q! <ENTER>.
370+
371+---> Î.Ï.Ï.Ï. εΟέρÏ.εÏ.αι αÏ.Ï. Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η ΧΩΡÎ.Σ Μα Ï.Ï.Ï.ει Ï.Ï.οιεÏ. αλλαγέÏ. έÏ.εÏ.ε κάΜει.
372+ Î.Îœ ΞέλεÏ.ε Μα Ï.Ï.Ï.εÏ.ε Ï.ιÏ. αλλαγέÏ. και Μα εΟέρΞεÏ.ε Ï.ληκÏ.ρολογήÏ.Ï.ε:
373+ :wq <ENTER>
374+
375+ 3. Î.Ï.αΜ ΎείÏ.ε Ï.ηΜ Ï.ροÏ.ροÏ.ή Ï.οÏ. Ï.λοιού, Ï.ληκÏ.ρολογήÏ.Ï.ε Ï.ηΜ εΜÏ.ολή Όε Ï.ηΜ οÏ.οία
376+ ÎŒÏ.ήκαÏ.ε Ï.ε αÏ.Ï.ήΜ Ï.ηΜ Ï.εριήγηÏ.η. Î.Ï.ορεί Μα είΜαι: vimtutor <ENTER>
377+ Î.αΜοΜικά Ξα Ï.ρηÏ.ιΌοÏ.οιούÏ.αÏ.ε: vim tutor <ENTER>
378+
379+---> 'vim' Ï.ηΌαίΜει ειÏ.αγÏ.γή Ï.Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η vim, 'tutor' είΜαι Ï.ο αρÏ.είο Ï.οÏ.
380+ ΞέλοÏ.Όε Μα ΎιορΞÏ.Ï.οÏ.Όε.
381+
382+ 4. Î.Îœ έÏ.εÏ.ε αÏ.οΌΜηΌοΜεύÏ.ει αÏ.Ï.ά Ï.α βήΌαÏ.α και έÏ.εÏ.ε αÏ.Ï.οÏ.εÏ.οίΞηÏ.η, εκÏ.ελέÏ.Ï.ε
383+ Ï.α βήΌαÏ.α 1 έÏ.Ï. 3 για Μα βγείÏ.ε και Μα ÎŒÏ.είÏ.ε ΟαΜά Ï.Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η. Î.εÏ.ά
384+ ΌεÏ.ακιΜήÏ.Ï.ε Ï.οΜ ΎροΌέα κάÏ.Ï. Ï.Ï.ο Î.άΞηΌα 1.3.
385+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
386+ Î.άΞηΌα 1.3: Î.Î.Î.ΡÎ.ΩΣÎ. Î.Î.Î.Î.Î.ΝÎ.Î¥ - Î.Î.Î.Î.ΡÎ.ΊÎ.
387+
388+ ** Î.Ï.ο είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε x για Μα ΎιαγράÏ.εÏ.ε Ï.οΜ
389+ Ï.αρακÏ.ήρα κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα. **
390+
391+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
392+
393+ 2. Î.ια Μα ΎιορΞÏ.Ï.εÏ.ε Ï.α λάΞη, κιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα ΌέÏ.ρι Μα είΜαι Ï.άΜÏ. αÏ.Ï.
394+ Ï.οΜ Ï.αρακÏ.ήρα Ï.οÏ. Ξα ΎιαγραÏ.εί.
395+
396+ 3. ΠαÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο x για Μα ΎιαγράÏ.εÏ.ε Ï.οΜ αΜεÏ.ιΞύΌηÏ.ο Ï.αρακÏ.ήρα.
397+
398+ 4. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 ΌέÏ.ρι 4 ΌέÏ.ρι η Ï.ρÏ.Ï.αÏ.η Μα είΜαι Ï.Ï.Ï.Ï.ή.
399+
400+---> The ccow jumpedd ovverr thhe mooon.
401+
402+ 5. ΀Ï.ρα Ï.οÏ. η γραΌΌή είΜαι Ï.Ï.Ï.Ï.ή, Ï.ηγαίΜÏ.ε Ï.Ï.ο Î.άΞηΌα 1.4.
403+
404+ΣÎ.Î.Î.Î.ΩΣÎ.: Î.αΞÏ.Ï. ΎιαÏ.ρέÏ.εÏ.ε αÏ.Ï.ήΜ Ï.ηΜ Ï.εριήγηÏ.η, Ï.ροÏ.Ï.αΞήÏ.Ï.ε Μα ΌηΜ
405+ αÏ.οΌΜηΌοΜεύεÏ.ε, ΌαΞαίΜεÏ.ε Όε Ï.η Ï.ρήÏ.η.
406+
407+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408+ Î.άΞηΌα 1.4: Î.Î.Î.ΡÎ.ΩΣÎ. Î.Î.Î.Î.Î.ΝÎ.Î¥ - Î Î.ΡÎ.Î.Î.Î.Î.Î.
409+
410+ ** Î.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε i για Μα Ï.αρεΌβάλλεÏ.ε κείΌεΜο. **
411+
412+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
413+
414+ 2. Î.ια Μα κάΜεÏ.ε Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή ίΎια Όε Ï.ηΜ ΎεύÏ.ερη, ΌεÏ.ακιΜείÏ.Ï.ε Ï.οΜ
415+ ΎροΌέα Ï.άΜÏ. Ï.Ï.οΜ Ï.ρÏ.Ï.ο Ï.αρακÏ.ήρα Î.Î.΀Î. αÏ.Ï. Ï.Ï.οÏ. Ξα Ï.αρεΌβληΞεί Ï.ο κείΌεΜο.
416+
417+ 3. ΠαÏ.ήÏ.Ï.ε Ï.ο i και Ï.ληκÏ.ρολογήÏ.Ï.ε Ï.ιÏ. αÏ.αραίÏ.ηÏ.εÏ. Ï.ροÏ.ΞήκεÏ..
418+
419+ 4. Î.αΞÏ.Ï. ΎιορΞÏ.ΜεÏ.ε κάΞε λάΞοÏ. Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα εÏ.ιÏ.Ï.ρέÏ.εÏ.ε Ï.Ï.ηΜ
420+ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 ΌέÏ.ρι 4 για Μα ΎιορΞÏ.Ï.εÏ.ε
421+ Ï.ηΜ Ï.ρÏ.Ï.αÏ.η.
422+
423+---> There is text misng this .
424+---> There is some text missing from this line.
425+
426+ 5. Î.Ï.αΜ είÏ.Ï.ε άΜεÏ.οι Όε Ï.ηΜ Ï.αρεΌβολή κειΌέΜοÏ. ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ
427+ Ï.αρακάÏ.Ï. Ï.ερίληÏ.η.
428+
429+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
430+ Î.Î.Î.Î.Î.Î. 1 Î Î.ΡÎ.Î.Î.ΚÎ.
431+
432+
433+ 1. Î. ΎροΌέαÏ. κιΜείÏ.αι Ï.ρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. είÏ.ε Ï.α Ï.λήκÏ.ρα ΎροΌέα ή Ï.α hjkl.
434+ h (αριÏ.Ï.έρα) j (κάÏ.Ï.) k (Ï.άΜÏ.) l (ΎεΟιά)
435+
436+ 2. Î.ια Μα ÎŒÏ.είÏ.ε Ï.Ï.οΜ Vim (αÏ.Ï. Ï.ηΜ Ï.ροÏ.ροÏ.ή %) γράÏ.Ï.ε: vim Î.ΡΧÎ.Î.Î. <ENTER>
437+
438+ 3. Î.ια Μα βγείÏ.ε γράÏ.Ï.ε: <ESC> :q! <ENTER> για αÏ.Ï.ρριÏ.η Ï.Ï.Îœ αλλαγÏ.Îœ.
439+ Î. γράÏ.Ï.ε: <ESC> :wq <ENTER> για αÏ.οΞήκεÏ.Ï.η Ï.Ï.Îœ αλλαγÏ.Îœ.
440+
441+ 4. Î.ια Μα ΎιαγράÏ.εÏ.ε έΜαΜ Ï.αρακÏ.ήρα κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα Ï.ε
442+ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε: x
443+
444+ 5. Î.ια Μα ειÏ.άγεÏ.ε κείΌεΜο Ï.Ï.οΜ ΎροΌέα Ï.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η γράÏ.Ï.ε:
445+ i Ï.ληκÏ.ρολογήÏ.Ï.ε Ï.ο κείΌεΜο <ESC>
446+
447+ΣÎ.Î.Î.Î.ΩΣÎ.: ΠαÏ.Ï.ÎœÏ.αÏ. <ESC> Ξα Ï.οÏ.οΞεÏ.ηΞείÏ.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η ή Ξα
448+ ακÏ.ρÏ.Ï.εÏ.ε Όία αΜεÏ.ιΞύΌηÏ.η και ΌερικÏ.Ï. ολοκληρÏ.ΌέΜη εΜÏ.ολή.
449+
450+΀Ï.ρα Ï.Ï.ΜεÏ.ίÏ.Ï.ε Όε Ï.ο Î.άΞηΌα 2.
451+
452+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
453+ Î.άΞηΌα 2.1: Î.Ν΀Î.Î.Î.Σ Î.Î.Î.Î.ΡÎ.ΊÎ.Σ
454+
455+ ** Î.ράÏ.Ï.ε dw για Μα ΎιαγράÏ.εÏ.ε ΌέÏ.ρι Ï.ο Ï.έλοÏ. ΌίαÏ. λέΟηÏ.. **
456+
457+ 1. ΠαÏ.ήÏ.Ï.ε <ESC> για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η.
458+
459+ 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
460+
461+ 3. ΠηγαίΜεÏ.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ αρÏ.ή Ï.ηÏ. λέΟηÏ. Ï.οÏ. Ï.ρέÏ.ει Μα ΎιαγραÏ.εί.
462+
463+ 4. Î.ράÏ.Ï.ε dw για Μα κάΜεÏ.ε Ï.ηΜ λέΟη Μα εΟαÏ.αΜιÏ.Ï.εί.
464+
465+ΣÎ.Î.Î.Î.ΩΣÎ.: ΀α γράΌΌαÏ.α dw Ξα εΌÏ.αΜιÏ.Ï.ούΜ Ï.Ï.ηΜ Ï.ελεÏ.Ï.αία γραΌΌή Ï.ηÏ. οΞÏ.ΜηÏ. Ï.Ï.ο
466+ Ï.α Ï.ληκÏ.ρολογείÏ.ε. Î.Îœ γράÏ.αÏ.ε κάÏ.ι λάΞοÏ., Ï.αÏ.ήÏ.Ï.ε <ESC> και
467+ ΟεκιΜήÏ.Ï.ε αÏ.Ï. Ï.ηΜ αρÏ.ή.
468+
469+---> There are a some words fun that don't belong paper in this sentence.
470+
471+ 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 3 και 4 ΌέÏ.ρι η Ï.ρÏ.Ï.αÏ.η Μα είΜαι Ï.Ï.Ï.Ï.ή και
472+ Ï.ηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 2.2.
473+
474+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
475+ Î.άΞηΌα 2.2: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ.Σ Î.Ν΀Î.Î.Î.Σ Î.Î.Î.Î.ΡÎ.ΊÎ.Σ
476+
477+ ** ΠληκÏ.ρολογήÏ.Ï.ε d$ για Μα ΎιαγράÏ.εÏ.ε ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ.. **
478+
479+ 1. ΠαÏ.ήÏ.Ï.ε <ESC> για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η.
480+
481+ 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
482+
483+ 3. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.έλοÏ. Ï.ηÏ. Ï.Ï.Ï.Ï.ήÏ. γραΌΌήÏ. (Î.Î.΀Î. Ï.ηΜ Ï.ρÏ.Ï.η . ).
484+
485+ 4. ΠαÏ.ήÏ.Ï.ε d$ για Μα ΎιαγράÏ.εÏ.ε ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ..
486+
487+---> Somebody typed the end of this line twice. end of this line twice.
488+
489+ 5. ΠηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 2.3 για Μα καÏ.αλάβεÏ.ε Ï.ι Ï.Ï.ΌβαίΜει.
490+
491+
492+
493+
494+
495+
496+
497+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
498+ Î.άΞηΌα 2.3: Î Î.ΡÎ. Î.Ν΀Î.Î.ΩΝ Î.Î.Î. Î.Ν΀Î.Î.Î.Î.Î.Î.ΝΩΝ
499+
500+
501+Î. ΌορÏ.ή Ï.ηÏ. εΜÏ.ολήÏ. ΎιαγραÏ.ήÏ. d είΜαι Ï.Ï. εΟήÏ.:
502+
503+ [αριΞΌÏ.Ï.] d αΜÏ.ικείΌεΜο Î. d [αριΞΌÏ.Ï.] αΜÏ.ικείΌεΜο
504+ Î.Ï.οÏ.:
505+ αριΞΌÏ.Ï. - Ï.Ï.Ï.εÏ. Ï.ορέÏ. Ξα εκÏ.ελεÏ.Ï.εί η εΜÏ.ολή (Ï.ροαιρεÏ.ικÏ., εΟ' οριÏ.Όού=1).
506+ d - η εΜÏ.ολή Ï.ηÏ. ΎιαγραÏ.ήÏ..
507+ αΜÏ.ικείΌεΜο - Ï.άΜÏ. Ï.ε Ï.ι Ξα λειÏ.οÏ.ργήÏ.ει η εΜÏ.ολή (Ï.αρακάÏ.Ï. λίÏ.Ï.α).
508+
509+ Î.ία Όικρή λίÏ.Ï.α αÏ.Ï. αΜÏ.ικείΌεΜα:
510+ w - αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. λέΟηÏ., Ï.εριλαΌβάΜοΜÏ.αÏ. Ï.ο ΎιάÏ.Ï.ηΌα.
511+ e - αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. λέΟηÏ., ΧΩΡÎ.Σ Ï.ο ΎιάÏ.Ï.ηΌα.
512+ $ - αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ..
513+
514+ΣÎ.Î.Î.Î.ΩΣÎ.: Î.ια Ï.οÏ.Ï. Ï.ύÏ.οÏ.Ï. Ï.ηÏ. Ï.εριÏ.έÏ.ειαÏ., Ï.αÏ.Ï.ÎœÏ.αÏ. αÏ.λÏ.Ï. Ï.ο αΜÏ.ικείΌεΜο Ï.Ï.ο
515+ είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.Ï.ρίÏ. κάÏ.οια εΜÏ.ολή Ξα ΌεÏ.ακιΜήÏ.εÏ.ε
516+ Ï.οΜ ΎροΌέα Ï.Ï.Ï.Ï. καΞορίζεÏ.αι Ï.Ï.ηΜ λίÏ.Ï.α αΜÏ.ικειΌέΜÏ.Îœ.
517+
518+
519+
520+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
521+ Î.άΞηΌα 2.4: Î.Î.Î. Î.Î.Î.Î.ΡÎ.ΣÎ. Σ΀Î.Ν 'Î.Ν΀Î.Î.Î.-Î.Ν΀Î.Î.Î.Î.Î.Î.ΝÎ.'
522+
523+ ** ΠληκÏ.ρολογήÏ.Ï.ε dd για Μα ΎιαγράÏ.εÏ.ε Ï.λη Ï.η γραΌΌή. **
524+
525+ Î.ΟαιÏ.ίαÏ. Ï.ηÏ. Ï.Ï.Ï.ÎœÏ.Ï.ηÏ.αÏ. Ï.ηÏ. ΎιαγραÏ.ήÏ. ολÏ.κληρηÏ. γραΌΌήÏ., οι Ï.Ï.εΎιαÏ.Ï.έÏ.
526+ Ï.οÏ. Vim αÏ.οÏ.άÏ.ιÏ.αΜ Ï.Ï.ι Ξα ήÏ.αΜ εÏ.κολÏ.Ï.ερο Μα γράÏ.εÏ.ε αÏ.λÏ.Ï. Ύύο d Ï.Ï.η
527+ Ï.ειρά για Μα ΎιαγράÏ.εÏ.ε Όία γραΌΌή.
528+
529+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.η ΎεύÏ.ερη γραΌΌή Ï.ηÏ. Ï.αρακάÏ.Ï. Ï.ράÏ.ηÏ..
530+ 2. Î.ράÏ.Ï.ε dd για Μα ΎιαγράÏ.εÏ.ε Ï.η γραΌΌή.
531+ 3. ΀Ï.ρα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ Ï.έÏ.αρÏ.η γραΌΌή.
532+ 4. Î.ράÏ.Ï.ε 2dd (ΞÏ.ΌηΞείÏ.ε αριΞΌÏ.Ï.-εΜÏ.ολή-αΜÏ.ικείΌεΜο) για Μα
533+ ΎιαγράÏ.εÏ.ε Ύύο γραΌΌέÏ..
534+
535+ 1) Roses are red,
536+ 2) Mud is fun,
537+ 3) Violets are blue,
538+ 4) I have a car,
539+ 5) Clocks tell time,
540+ 6) Sugar is sweet
541+ 7) And so are you.
542+
543+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
544+ Î.άΞηΌα 2.5: Î. Î.Ν΀Î.Î.Î. Î.ΝÎ.Î.ΡÎ.ΣÎ.Σ
545+
546+ ** ΠαÏ.ήÏ.Ï.ε u για Μα αΜαιρέÏ.εÏ.ε Ï.ιÏ. Ï.ελεÏ.Ï.αίεÏ. εΜÏ.ολέÏ.,
547+ U για Μα ΎιορΞÏ.Ï.εÏ.ε Ï.λη Ï.η γραΌΌή. **
548+
549+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε ---> και
550+ Ï.οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ Ï.άΜÏ. Ï.Ï.ο Ï.ρÏ.Ï.ο λάΞοÏ..
551+ 2. ΠαÏ.ήÏ.Ï.ε x για Μα ΎιαγράÏ.εÏ.ε Ï.οΜ Ï.ρÏ.Ï.ο αΜεÏ.ιΞύΌηÏ.ο Ï.αρακÏ.ήρα.
552+ 3. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε u για Μα αΜαιρέÏ.εÏ.ε Ï.ηΜ Ï.ελεÏ.Ï.αία εκÏ.ελεÏ.ΌέΜη εΜÏ.ολή.
553+ 4. Î.Ï.Ï.ή Ï.η Ï.ορά ΎιορΞÏ.Ï.Ï.ε Ï.λα Ï.α λάΞη Ï.Ï.η γραΌΌή Ï.ρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ηΜ εΜÏ.ολή x.
554+ 5. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε έΜα κεÏ.αλαίο U για Μα εÏ.ιÏ.Ï.ρέÏ.εÏ.ε Ï.η γραΌΌή Ï.Ï.ηΜ αρÏ.ική
555+ Ï.ηÏ. καÏ.άÏ.Ï.αÏ.η.
556+ 6. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε u ΌερικέÏ. Ï.ορέÏ. για Μα αΜαιρέÏ.εÏ.ε Ï.ηΜ U και
557+ Ï.ροηγούΌεΜεÏ. εΜÏ.ολέÏ..
558+ 7. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε CTRL-R (κραÏ.Ï.ÎœÏ.αÏ. Ï.αÏ.ηΌέΜο Ï.ο Ï.λήκÏ.ρο CTRL καΞÏ.Ï. Ï.αÏ.άÏ.ε Ï.ο R)
559+ ΌερικέÏ. Ï.ορέÏ. για Μα εÏ.αΜαÏ.έρεÏ.ε Ï.ιÏ. εΜÏ.ολέÏ. (αΜαίρεÏ.η Ï.Ï.Îœ αΜαιρέÏ.εÏ.Îœ).
560+
561+---> Fiix the errors oon thhis line and reeplace them witth undo.
562+
563+ 8. Î.Ï.Ï.έÏ. είΜαι Ï.ολύ Ï.ρήÏ.ιΌεÏ. εΜÏ.ολέÏ.. ΀Ï.ρα Ï.ηγαίΜεÏ.ε Ï.Ï.ηΜ
564+ ΠερίληÏ.η Ï.οÏ. Î.αΞήΌαÏ.οÏ. 2.
565+
566+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
567+ Î.Î.Î.Î.Î.Î. 2 Î Î.ΡÎ.Î.Î.ΚÎ.
568+
569+
570+ 1. Î.ια Μα ΎιαγράÏ.εÏ.ε αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. λέΟηÏ. γράÏ.Ï.ε: dw
571+
572+ 2. Î.ια Μα ΎιαγράÏ.εÏ.ε αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. γραΌΌήÏ. γράÏ.Ï.ε: d$
573+
574+ 3. Î.ια Μα ΎιαγράÏ.εÏ.ε ολÏ.κληρη Ï.η γραΌΌή γράÏ.Ï.ε: dd
575+
576+ 4. Î. ΌορÏ.ή για Όία εΜÏ.ολή Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η είΜαι:
577+
578+ [αριΞΌÏ.Ï.] εΜÏ.ολή αΜÏ.ικείΌεΜο Î. εΜÏ.ολή [αριΞΌÏ.Ï.] αΜÏ.ικείΌεΜο
579+ Ï.Ï.οÏ.:
580+ αριΞΌÏ.Ï. - Ï.Ï.Ï.εÏ. Ï.ορέÏ. Μα εÏ.αΜαληÏ.Ξεί η εΜÏ.ολή
581+ εΜÏ.ολή - Ï.ι Μα γίΜει, Ï.Ï.Ï.Ï. η d για ΎιαγραÏ.ή
582+ αΜÏ.ικείΌεΜο - Ï.άΜÏ. Ï.ε Ï.ι Μα εΜεργήÏ.ει η εΜÏ.ολή, Ï.Ï.Ï.Ï. w (λέΟη),
583+ $ (Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ.), κÏ.λ.
584+
585+ 5. Î.ια Μα αΜαιρέÏ.εÏ.ε Ï.ροηγούΌεΜεÏ. εΜέργειεÏ., Ï.αÏ.ήÏ.Ï.ε: u (Ï.εζÏ. u)
586+ Î.ια Μα αΜαιρέÏ.εÏ.ε Ï.λεÏ. Ï.ιÏ. αλλαγέÏ. Ï.Ï.η γραΌΌή, Ï.αÏ.ήÏ.Ï.ε: U (κεÏ.αλαίο U)
587+ Î.ια Μα αΜαιρέÏ.εÏ.ε Ï.ιÏ. αΜαιρέÏ.ειÏ., Ï.αÏ.ήÏ.Ï.ε: CTRL-R
588+
589+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
590+ Î.άΞηΌα 3.1: Î. Î.Ν΀Î.Î.Î. ΀Î.Î Î.Î.Î.΀Î.ΣÎ.Σ
591+
592+
593+ ** ΠαÏ.ήÏ.Ï.ε p για Μα Ï.οÏ.οΞεÏ.ήÏ.εÏ.ε Ï.ηΜ Ï.ελεÏ.Ï.αία ΎιαγραÏ.ή ΌεÏ.ά Ï.οΜ ΎροΌέα. **
594+
595+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.ηÏ. Ï.αρακάÏ.Ï. οΌάΎαÏ..
596+
597+ 2. ΠαÏ.ήÏ.Ï.ε dd για Μα ΎιαγράÏ.εÏ.ε Ï.η γραΌΌή και Μα Ï.ηΜ αÏ.οΞηκεύÏ.εÏ.ε Ï.ε
598+ Ï.ροÏ.Ï.ριΜή ΌΜήΌη Ï.οÏ. Vim.
599+
600+ 3. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.η γραΌΌή Î Î.ΝΩ αÏ.Ï. εκεί Ï.οÏ. Ξα Ï.ρέÏ.ει Μα Ï.άει
601+ η ΎιαγραΌΌέΜη γραΌΌή.
602+
603+ 4. Î.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η, Ï.αÏ.ήÏ.Ï.ε p για Μα βάλεÏ.ε Ï.η γραΌΌή.
604+
605+ 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 έÏ.Ï. 4 για Μα βάλεÏ.ε Ï.λεÏ. Ï.ιÏ. γραΌΌέÏ. Ï.Ï.η
606+ Ï.Ï.Ï.Ï.ή Ï.ειρά.
607+
608+ d) Can you learn too?
609+ b) Violets are blue,
610+ c) Intelligence is learned,
611+ a) Roses are red,
612+
613+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
614+ Î.άΞηΌα 3.2: Î. Î.Ν΀Î.Î.Î. Î.Ν΀Î.Î.Î.΀Î.Σ΀Î.ΣÎ.Σ
615+
616+
617+ ** ΠαÏ.ήÏ.Ï.ε r και Ï.αρακÏ.ήρα για Μα αλλάΟεÏ.ε αÏ.Ï.Ï.Îœ Ï.οÏ. είΜαι
618+ κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα. **
619+
620+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
621+
622+ 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα έÏ.Ï.ι Ï.Ï.Ï.ε Μα είΜαι Ï.άΜÏ. Ï.Ï.ο Ï.ρÏ.Ï.ο λάΞοÏ..
623+
624+ 3. ΠαÏ.ήÏ.Ï.ε r και ΌεÏ.ά Ï.οΜ Ï.αρακÏ.ήρα ο οÏ.οίοÏ. ΎιορΞÏ.Μει Ï.ο λάΞοÏ..
625+
626+ 4. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 και 3 ΌέÏ.ρι Μα είΜαι Ï.Ï.Ï.Ï.ή η Ï.ρÏ.Ï.η γραΌΌή.
627+
628+---> Whan this lime was tuoed in, someone presswd some wrojg keys!
629+---> When this line was typed in, someone pressed some wrong keys!
630+
631+ 5. ΀Ï.ρα Ï.ηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 3.2.
632+
633+ΣÎ.Î.Î.Î.ΩΣÎ.: Να ΞÏ.ΌάÏ.Ï.ε Ï.Ï.ι Ï.ρέÏ.ει Μα ΌαΞαίΜεÏ.ε Όε Ï.η Ï.ρήÏ.η, και Ï.Ï.ι Όε
634+ Ï.ηΜ αÏ.οΌΜηΌÏ.ΜεÏ.Ï.η.
635+
636+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
637+ Î.άΞηΌα 3.3: Î. Î.Ν΀Î.Î.Î. Î.Î.Î.Î.Î.Î.Σ
638+
639+ ** Î.ια Μα αλλάΟεÏ.ε Ï.ΌήΌα ή Ï.λη Ï.η λέΟη, Ï.αÏ.ήÏ.Ï.ε cw . **
640+
641+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
642+
643+ 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.άΜÏ. Ï.Ï.ο u Ï.ηÏ. λέΟηÏ. lubw.
644+
645+ 3. ΠαÏ.ήÏ.Ï.ε cw και Ï.η Ï.Ï.Ï.Ï.ή λέΟη (Ï.Ï.ηΜ Ï.ερίÏ.Ï.Ï.Ï.η αÏ.Ï.ή, γράÏ.Ï.ε 'ine'.)
646+
647+ 4. ΠαÏ.ήÏ.Ï.ε <ESC> και Ï.ηγαίΜεÏ.ε Ï.Ï.ο εÏ.Ï.ΌεΜο λάΞοÏ. (Ï.Ï.οΜ Ï.ρÏ.Ï.ο
648+ Ï.αρακÏ.ήρα Ï.ροÏ. αλλαγή).
649+
650+ 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 3 και 4 ΌέÏ.ριÏ. Ï.Ï.οÏ. η Ï.ρÏ.Ï.η Ï.ρÏ.Ï.αÏ.η Μα είΜαι
651+ ίΎια Όε Ï.η ΎεύÏ.ερη.
652+
653+---> This lubw has a few wptfd that mrrf changing usf the change command.
654+---> This line has a few words that need changing using the change command.
655+
656+ΠαραÏ.ηρείÏ.Ï.ε Ï.Ï.ι η cw Ï.Ï.ι ÎŒÏ.Μο αΜÏ.ικαΞιÏ.Ï.άει Ï.η λέΟη, αλλά Ï.αÏ. ειÏ.άγει
657+εÏ.ίÏ.ηÏ. Ï.ε Ï.αρεΌβολή.
658+
659+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
660+ Î.άΞηΌα 3.4: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ.Σ Î.Î.Î.Î.Î.Î.Σ Î.Î. c
661+
662+
663+ ** Î. εΜÏ.ολή αλλαγήÏ. Ï.ρηÏ.ιΌοÏ.οιείÏ.αι Όε Ï.α ίΎια αΜÏ.ικείΌεΜα Ï.ηÏ. ΎιαγραÏ.ήÏ.. **
664+
665+
666+ 1. Î. εΜÏ.ολή αλλαγήÏ. ΎοÏ.λεύει Όε Ï.οΜ ίΎιο Ï.ρÏ.Ï.ο Ï.Ï.Ï.Ï. η ΎιαγραÏ.ή. Î. ΌορÏ.ή είΜαι:
667+
668+ [αριΞΌÏ.Ï.] c αΜÏ.ικείΌεΜο Î. c [αριΞΌÏ.Ï.] αΜÏ.ικείΌεΜο
669+
670+ 2. ΀α αΜÏ.ικείΌεΜα είΜαι Ï.άλι Ï.α ίΎια, Ï.Ï.Ï.Ï. w (λέΟη), $ (Ï.έλοÏ. γραΌΌήÏ.), κÏ.λ.
671+
672+ 3. Î.εÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
673+
674+ 4. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.ρÏ.Ï.ο λάΞοÏ..
675+
676+ 5. Î.ράÏ.Ï.ε c$ για Μα κάΜεÏ.ε Ï.ο Ï.Ï.Ï.λοιÏ.ο Ï.ηÏ. γραΌΌήÏ. ίΎιο Όε Ï.η ΎεύÏ.ερη
677+ και Ï.αÏ.ήÏ.Ï.ε <ESC>.
678+
679+---> The end of this line needs some help to make it like the second.
680+---> The end of this line needs to be corrected using the c$ command.
681+
682+
683+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
684+ Î.Î.Î.Î.Î.Î. 3 Î Î.ΡÎ.Î.Î.ΚÎ.
685+
686+
687+ 1. Î.ια Μα Ï.οÏ.οΞεÏ.ήÏ.εÏ.ε κείΌεΜο Ï.οÏ. ÎŒÏ.λιÏ. έÏ.ει ΎιαγραÏ.εί, Ï.αÏ.ήÏ.Ï.ε p .
688+ Î.Ï.Ï.Ï. Ï.οÏ.οΞεÏ.εί Ï.ο ΎιαγραΌΌέΜο κείΌεΜο Î.Î.΀Î. Ï.οΜ ΎροΌέα (αΜ ΎιαγράÏ.Ï.ηκε
689+ γραΌΌή Ξα Ï.άει ΌεÏ.ά Ï.Ï.η γραΌΌή κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα.
690+
691+ 2. Î.ια Μα αΜÏ.ικαÏ.αÏ.Ï.ήÏ.εÏ.ε Ï.οΜ Ï.αρακÏ.ήρα κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα, Ï.αÏ.ήÏ.Ï.ε r
692+ και ΌεÏ.ά Ï.οΜ Ï.αρακÏ.ήρα Ï.οÏ. Ξα αΜÏ.ικαÏ.αÏ.Ï.ήÏ.ει Ï.οΜ αρÏ.ικÏ..
693+
694+ 3. Î. εΜÏ.ολή αλλαγήÏ. Ï.αÏ. εÏ.ιÏ.ρέÏ.ει Μα αλλάΟεÏ.ε Ï.ο καΞοριÏ.ΌέΜο αΜÏ.ικείΌεΜο
695+ αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.οÏ. αΜÏ.ικείΌεΜο. Î .Ï.. γράÏ.Ï.ε cw για Μα
696+ αλλάΟεÏ.ε αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. λέΟηÏ., c$ για Μα αλλάΟεÏ.ε
697+ ΌέÏ.ρι Ï.ο Ï.έλοÏ. γραΌΌήÏ..
698+
699+ 4. Î. ΌορÏ.ή για Ï.ηΜ αλλαγή είΜαι:
700+
701+ [αριΞΌÏ.Ï.] c αΜÏ.ικείΌεΜο Î. c [αριΞΌÏ.Ï.] αΜÏ.ικείΌεΜο
702+
703+΀Ï.ρα Ï.Ï.ΜεÏ.ίÏ.Ï.ε Όε Ï.ο εÏ.Ï.ΌεΜο ΌάΞηΌα.
704+
705+
706+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
707+ Î.άΞηΌα 4.1: Î.Î.ΣÎ. Î.Î.Î. Î.Î.΀Î.Σ΀Î.ΣÎ. Î.ΡΧÎ.Î.Î.Î¥
708+
709+
710+ ** ΠαÏ.ήÏ.Ï.ε CTRL-g για Μα εΌÏ.αΜιÏ.Ï.εί η ΞέÏ.η Ï.αÏ. Ï.Ï.ο αρÏ.είο και η καÏ.άÏ.Ï.αÏ.ή Ï.οÏ..
711+ ΠαÏ.ήÏ.Ï.ε SHIFT-G για Μα Ï.άÏ.ε Ï.ε Όία γραΌΌή Ï.Ï.ο αρÏ.είο. **
712+
713+ ΣηΌείÏ.Ï.η: Î.ιαβάÏ.Ï.ε ολÏ.κληρο Ï.ο ΌάΞηΌα Ï.ριΜ εκÏ.ελέÏ.εÏ.ε κάÏ.οιο αÏ.Ï. Ï.α βήΌαÏ.α!!
714+
715+ 1. Î.ραÏ.ήÏ.Ï.ε Ï.αÏ.ηΌέΜο Ï.ο Ï.λήκÏ.ρο Ctrl και Ï.αÏ.ήÏ.Ï.ε g . Î.ία γραΌΌή καÏ.άÏ.Ï.αÏ.ηÏ.
716+ Ξα εΌÏ.αΜιÏ.Ï.εί Ï.Ï.ο κάÏ.Ï. ΌέροÏ. Ï.ηÏ. Ï.ελίΎαÏ. Όε Ï.ο Ï.ΜοΌα αρÏ.είοÏ. και Ï.η
717+ γραΌΌή Ï.οÏ. είÏ.Ï.ε. Î.Ï.ΌηΞείÏ.ε Ï.οΜ αριΞΌÏ. γραΌΌήÏ. για Ï.ο Î.ήΌα 3.
718+
719+ 2. ΠαÏ.ήÏ.Ï.ε shift-G για Μα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο Ï.έλοÏ. Ï.οÏ. αρÏ.είοÏ..
720+
721+ 3. ΠαÏ.ήÏ.Ï.ε Ï.οΜ αριΞΌÏ. Ï.ηÏ. γραΌΌήÏ. Ï.οÏ. ήÏ.αÏ.Ï.αΜ και ΌεÏ.ά shift-G. Î.Ï.Ï.Ï. Ξα
722+ Ï.αÏ. εÏ.ιÏ.Ï.ρέÏ.ει Ï.Ï.η γραΌΌή Ï.οÏ. ήÏ.αÏ.Ï.αΜ Ï.ριΜ Ï.αÏ.ήÏ.εÏ.ε για Ï.ρÏ.Ï.η Ï.ορά Ctrl-g.
723+ (Î.Ï.αΜ Ï.ληκÏ.ρολογείÏ.ε Ï.οÏ.Ï. αριΞΌούÏ., Î.Î.Ν Ξα εΌÏ.αΜίζοΜÏ.αι Ï.Ï.ηΜ οΞÏ.Μη).
724+
725+ 4. Î.Îœ ΜοιÏ.ΞεÏ.ε Ï.ίγοÏ.ροÏ. για αÏ.Ï.Ï., εκÏ.ελέÏ.Ï.ε Ï.α βήΌαÏ.α 1 έÏ.Ï. 3.
726+
727+
728+
729+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
730+ Î.άΞηΌα 4.2: Î. Î.Ν΀Î.Î.Î. Î.ΝÎ.Î.Î.΀Î.ΣÎ.Σ
731+
732+
733+ ** ΠαÏ.ήÏ.Ï.ε / ακολοÏ.ΞούΌεΜο αÏ.Ï. Ï.η Ï.ράÏ.η Ï.οÏ. Ï.άÏ.ΜεÏ.ε. **
734+
735+ 1. Σε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε Ï.οΜ Ï.αρακÏ.ήρα / . ΠαραÏ.ηρήÏ.Ï.ε Ï.Ï.ι αÏ.Ï.Ï.Ï. και
736+ ο ΎροΌέαÏ. εΌÏ.αΜίζοΜÏ.αι Ï.Ï.ο κάÏ.Ï. ΌέροÏ. Ï.ηÏ. οΞÏ.ΜηÏ. Ï.Ï.Ï.Ï. Όε Ï.ηΜ εΜÏ.ολή : .
737+
738+ 2. ΀Ï.ρα γράÏ.Ï.ε 'errroor' <ENTER>. Î.Ï.Ï.ή είΜαι η λέΟη Ï.οÏ. ΞέλεÏ.ε Μα Ï.άΟεÏ.ε.
739+
740+ 3. Î.ια Μα Ï.άΟεÏ.ε ΟαΜά για Ï.ηΜ ίΎια Ï.ράÏ.η, Ï.αÏ.ήÏ.Ï.ε αÏ.λÏ.Ï. n .
741+ Î.ια Μα Ï.άΟεÏ.ε Ï.ηΜ ίΎια Ï.ράÏ.η Ï.Ï.ηΜ αΜÏ.ίΞεÏ.η καÏ.εύΞÏ.ÎœÏ.η, Ï.αÏ.ήÏ.Ï.ε Shift-N .
742+
743+ 4. Î.Îœ ΞέλεÏ.ε Μα Ï.άΟεÏ.ε για Όία Ï.ράÏ.η Ï.ροÏ. Ï.α Ï.ίÏ.Ï., Ï.ρηÏ.ιΌοÏ.οιήÏ.Ï.ε Ï.ηΜ εΜÏ.ολή ? αΜÏ.ί Ï.ηÏ. / .
744+
745+---> Î.Ï.αΜ η αΜαζήÏ.ηÏ.η Ï.Ï.άÏ.ει Ï.Ï.ο Ï.έλοÏ. Ï.οÏ. αρÏ.είοÏ. Ξα Ï.Ï.ΜεÏ.ίÏ.ει αÏ.Ï. Ï.ηΜ αρÏ.ή.
746+
747+ "errroor" is not the way to spell error; errroor is an error.
748+
749+
750+
751+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
752+ Î.άΞηΌα 4.3: Î.ΥΡÎ.ΣÎ. ΀Î.Î.ΡÎ.Î.Σ΀ΩΝ Î Î.ΡÎ.ΝÎ.Î.ΣÎ.ΩΝ
753+
754+
755+ ** ΠαÏ.ήÏ.Ï.ε % για Μα βρείÏ.ε Ï.ηΜ αΜÏ.ίÏ.Ï.οιÏ.η ), ], ή } . **
756+
757+ 1. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.ε κάÏ.οια (, [, ή { Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή
758+ Ï.ηΌειÏ.ΌέΜη Όε --->.
759+
760+ 2. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε Ï.οΜ Ï.αρακÏ.ήρα % .
761+
762+ 3. Î. ΎροΌέαÏ. Ξα Ï.ρέÏ.ει Μα είΜαι Ï.Ï.ηΜ αΜÏ.ίÏ.Ï.οιÏ.η Ï.αρέΜΞεÏ.η ή αγκύλη.
763+
764+ 4. ΠαÏ.ήÏ.Ï.ε % για Μα ΌεÏ.ακιΜήÏ.εÏ.ε Ï.οΜ ΎροΌέα Ï.ίÏ.Ï. Ï.Ï.ηΜ Ï.ρÏ.Ï.η αγκύλη
765+ (Ï.οÏ. ζεÏ.γαριού).
766+
767+---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
768+
769+ΣÎ.Î.Î.Î.ΩΣÎ.: Î.Ï.Ï.Ï. είΜαι Ï.ολύ Ï.ρήÏ.ιΌο Ï.Ï.ηΜ αÏ.οÏ.Ï.αλΌάÏ.Ï.Ï.η εΜÏ.Ï. Ï.ρογράΌΌαÏ.οÏ.
770+ Όε Όη Ï.αιριαÏ.Ï.έÏ. Ï.αρεΜΞέÏ.ειÏ.!
771+
772+
773+
774+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
775+ Î.άΞηΌα 4.4: Î.ΝÎ.Σ ΀ΡÎ.Î Î.Σ Î.Î.Î. Î.Î.Î.Î.Î.Î. Î.Î.Î.ΩΝ
776+
777+
778+ ** Î.ράÏ.Ï.ε :s/old/new/g για Μα αλλάΟεÏ.ε Ï.ο 'new' Όε Ï.ο 'old'. **
779+
780+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
781+
782+ 2. Î.ράÏ.Ï.ε :s/thee/the <ENTER> . ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι αÏ.Ï.ή η εΜÏ.ολή αλλάζει ÎŒÏ.Μο
783+ Ï.ηΜ Ï.ρÏ.Ï.η εΌÏ.άΜιÏ.η Ï.Ï.η γραΌΌή.
784+
785+ 3. ΀Ï.ρα γράÏ.Ï.ε :s/thee/the/g εΜΜοÏ.ÎœÏ.αÏ. γεΜική αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.Ï.η
786+ γραΌΌή. Î.Ï.Ï.Ï. αλλάζει Ï.λεÏ. Ï.ιÏ. εΌÏ.αΜίÏ.ειÏ. εÏ.ί Ï.ηÏ. γραΌΌήÏ..
787+
788+---> thee best time to see thee flowers is in thee spring.
789+
790+ 4. Î.ια Μα αλλάΟεÏ.ε κάΞε εΌÏ.άΜιÏ.η ΌίαÏ. Ï.Ï.ΌβολοÏ.ειράÏ. ΌεÏ.αΟύ Ύύο γραΌΌÏ.Îœ,
791+ γράÏ.Ï.ε :#,#s/old/new/g Ï.Ï.οÏ. #,# οι αριΞΌοί Ï.Ï.Îœ Ύύο γραΌΌÏ.Îœ.
792+ Î.ράÏ.Ï.ε :%s/old/new/g για Μα αλλάΟεÏ.ε κάΞε εΌÏ.άΜιÏ.η Ï.ε Ï.λο Ï.ο αρÏ.είο.
793+
794+
795+
796+
797+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
798+ Î.Î.Î.Î.Î.Î. 4 Î Î.ΡÎ.Î.Î.ΚÎ.
799+
800+
801+ 1. ΀ο Ctrl-g εΌÏ.αΜίζει Ï.η ΞέÏ.η Ï.αÏ. Ï.Ï.ο αρÏ.είο και Ï.ηΜ καÏ.άÏ.Ï.αÏ.ή Ï.οÏ..
802+ ΀ο Shift-G Ï.ηγαίΜει Ï.Ï.ο Ï.έλοÏ. Ï.οÏ. αρÏ.είοÏ.. Î.ΜαÏ. αριΞΌÏ.Ï. γραΌΌήÏ.
803+ ακολοÏ.ΞούΌεΜοÏ. αÏ.Ï. Shift-G Ï.ηγαίΜει Ï.ε εκείΜη Ï.η γραΌΌή.
804+
805+ 2. Î.ράÏ.οΜÏ.αÏ. / ακολοÏ.ΞούΌεΜο αÏ.Ï. Όία Ï.ράÏ.η Ï.άÏ.Μει Ï.ροÏ. Ï.α Î.ΠΡÎ.Σ΀Î. για
806+ Ï.η Ï.ράÏ.η. Î.ράÏ.οΜÏ.αÏ. ? ακολοÏ.ΞούΌεΜο αÏ.Ï. Όία Ï.ράÏ.η Ï.άÏ.Μει Ï.ροÏ. Ï.α Î Î.ΣΩ
807+ για Ï.η Ï.ράÏ.η. Î.εÏ.ά αÏ.Ï. Όία αΜαζήÏ.ηÏ.η Ï.αÏ.ήÏ.Ï.ε n για Μα βρείÏ.ε Ï.ηΜ
808+ εÏ.Ï.ΌεΜη εΌÏ.άΜιÏ.η Ï.ροÏ. Ï.ηΜ ίΎια καÏ.εύΞÏ.ÎœÏ.η ή Shift-N για Μα Ï.άΟεÏ.ε
809+ Ï.ροÏ. Ï.ηΜ αΜÏ.ίΞεÏ.η καÏ.εύΞÏ.ÎœÏ.η.
810+
811+ 3. ΠαÏ.Ï.ÎœÏ.αÏ. % Ï.Ï.ο ο ΎροΌέαÏ. είΜαι Ï.άΜÏ. Ï.ε Όία (,),[,],{, ή } εΜÏ.οÏ.ίζει
812+ Ï.ο αΜÏ.ίÏ.Ï.οιÏ.ο Ï.αίρι Ï.οÏ. ζεÏ.γαριού.
813+
814+ 4. Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Όε new Ï.οÏ. Ï.ρÏ.Ï.οÏ. old Ï.Ï.η γραΌΌή γράÏ.Ï.ε :s/old/new
815+ Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Όε new Ï.λÏ.Îœ Ï.Ï.Îœ 'old' Ï.Ï.η γραΌΌή γράÏ.Ï.ε :s/old/new/g
816+ Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.ράÏ.εÏ.Îœ ΌεÏ.αΟύ Ύύο # γραΌΌÏ.Îœ γράÏ.Ï.ε :#,#s/old/new/g
817+ Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.λÏ.Îœ Ï.Ï.Îœ εΌÏ.αΜίÏ.εÏ.Îœ Ï.Ï.ο αρÏ.είο γράÏ.Ï.ε :%s/old/new/g
818+ Î.ια ερÏ.Ï.ηÏ.η εÏ.ιβεβαίÏ.Ï.ηÏ. κάΞε Ï.ορά Ï.ροÏ.ΞέÏ.Ï.ε έΜα 'c' "%s/old/new/gc
819+
820+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
821+ Î.άΞηΌα 5.1: ΠΩΣ Î.Î.΀Î.Î.Ω Î.Î.Î. Î.Î.Ω΀Î.ΡÎ.Î.Î. Î.Ν΀Î.Î.Î.
822+
823+
824+** Î.ράÏ.Ï.ε :! ακολοÏ.ΞούΌεΜο αÏ.Ï. Όία εΟÏ.Ï.ερική εΜÏ.ολή για Μα Ï.ηΜ εκÏ.ελέÏ.εÏ.ε. **
825+
826+ 1. ΠαÏ.ήÏ.Ï.ε Ï.ηΜ οικεία εΜÏ.ολή : για Μα ΞέÏ.εÏ.ε Ï.οΜ ΎροΌέα Ï.Ï.ο κάÏ.Ï. ΌέροÏ.
827+ Ï.ηÏ. οΞÏ.ΜηÏ.. Î.Ï.Ï.Ï. Ï.αÏ. εÏ.ιÏ.ρέÏ.ει Μα ÎŽÏ.Ï.εÏ.ε Όία εΜÏ.ολή.
828+
829+ 2. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε Ï.ο ! (ΞαÏ.ΌαÏ.Ï.ικÏ.). Î.Ï.Ï.Ï. Ï.αÏ. εÏ.ιÏ.ρέÏ.ει Μα εκÏ.ελέÏ.εÏ.ε
830+ οÏ.οιαΎήÏ.οÏ.ε εΟÏ.Ï.ερική εΜÏ.ολή Ï.οÏ. Ï.λοιού.
831+
832+ 3. ΣαΜ Ï.αράΎειγΌα γράÏ.Ï.ε ls ΌεÏ.ά αÏ.Ï. Ï.ο ! και Ï.αÏ.ήÏ.Ï.ε <ENTER>. Î.Ï.Ï.Ï. Ξα
833+ Ï.αÏ. εΌÏ.αΜίÏ.ει Όία λίÏ.Ï.α Ï.οÏ. καÏ.αλÏ.γοÏ. Ï.αÏ., ακριβÏ.Ï. Ï.αΜ Μα ήÏ.αÏ.Ï.αΜ Ï.Ï.ηΜ
834+ Ï.ροÏ.ροÏ.ή Ï.οÏ. Ï.λοιού. Î. Ï.ρηÏ.ιΌοÏ.οιήÏ.Ï.ε :!dir αΜ Ï.ο ls ΎεΜ ΎοÏ.λεύει.
835+
836+---> ΣηΌείÏ.Ï.η: Î.ίΜαι ÎŽÏ.ΜαÏ.Ï.Îœ Μα εκÏ.ελέÏ.εÏ.ε οÏ.οιαΎήÏ.οÏ.ε εΟÏ.Ï.ερική εΜÏ.ολή
837+ Όε αÏ.Ï.Ï.Îœ Ï.οΜ Ï.ρÏ.Ï.ο.
838+
839+---> ΣηΌείÏ.Ï.η: Î.λεÏ. οι εΜÏ.ολέÏ. : Ï.ρέÏ.ει Μα Ï.ερΌαÏ.ίζοΜÏ.αι Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο <ENTER>.
840+
841+
842+
843+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
844+ Î.άΞηΌα 5.2: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ. Î Î.ΡÎ. Î.Î.Î.ΡÎ.ΊÎ.Σ Î.ΡΧÎ.Î.ΩΝ
845+
846+
847+ ** Î.ια Μα Ï.Ï.Ï.εÏ.ε Ï.ιÏ. αλλάγεÏ. Ï.οÏ. κάΜαÏ.ε Ï.Ï.ο αρÏ.είο, γράÏ.Ï.ε :w Î.ΡΧÎ.Î.Î.. **
848+
849+ 1. Î.ράÏ.Ï.ε :!dir ή :!ls για Μα Ï.άρεÏ.ε Όία λίÏ.Ï.α Ï.οÏ. καÏ.αλÏ.γοÏ. Ï.αÏ..
850+ Î.Ύη ΟέρεÏ.ε Ï.Ï.ι Ï.ρέÏ.ει Μα Ï.αÏ.ήÏ.εÏ.ε <ENTER> ΌεÏ.ά αÏ.Ï. αÏ.Ï.Ï..
851+
852+ 2. Î.ιαλέΟÏ.ε έΜα Ï.ΜοΌα αρÏ.είοÏ. Ï.οÏ. ΎεΜ Ï.Ï.άρÏ.ει ακÏ.Όα, Ï.Ï.Ï.Ï. Ï.ο TEST.
853+
854+ 3. ΀Ï.ρα γράÏ.Ï.ε: :w TEST (Ï.Ï.οÏ. TEST είΜαι Ï.ο Ï.ΜοΌα αρÏ.είοÏ. Ï.οÏ. ΎιαλέΟαÏ.ε).
855+
856+ 4. Î.Ï.Ï.Ï. Ï.Ï.ζει Ï.λο Ï.ο αρÏ.είο (vim Tutor) Όε Ï.ο Ï.ΜοΌα TEST. Î.ια Μα Ï.ο
857+ εÏ.αληΞεύÏ.εÏ.ε, γράÏ.Ï.ε ΟαΜά :!dir για Μα ΎείÏ.ε Ï.οΜ καÏ.άλογÏ. Ï.αÏ..
858+
859+---> ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι αΜ βγαίΜαÏ.ε αÏ.Ï. Ï.οΜ Vim και ÎŒÏ.αίΜαÏ.ε ΟαΜά Όε Ï.ο Ï.ΜοΌα
860+ αρÏ.είοÏ. TEST, Ï.ο αρÏ.είο Ξα ήÏ.αΜ ακριβέÏ. αΜÏ.ίγραÏ.ο Ï.οÏ. tutor Ï.Ï.αΜ Ï.ο Ï.Ï.Ï.αÏ.ε.
861+
862+ 5. ΀Ï.ρα ΎιαγράÏ.Ï.ε Ï.ο αρÏ.είο γράÏ.οΜÏ.αÏ. (MS-DOS): :!del TEST
863+
864+
865+
866+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
867+ Î.άΞηΌα 5.3: Î.Î Î.Î.Î.Î.΀Î.Î.Î. Î.Ν΀Î.Î.Î. Î.Î.Î.ΡÎ.ΊÎ.Σ
868+
869+
870+ ** Î.ια Μα Ï.Ï.Ï.εÏ.ε Ï.ΌήΌα Ï.οÏ. αρÏ.είοÏ., γράÏ.Ï.ε :#,# w Î.ΡΧÎ.Î.Î. **
871+
872+ 1. Î.λλη Όια Ï.ορά, γράÏ.Ï.ε :!dir ή :!ls για Μα Ï.άρεÏ.ε Όία λίÏ.Ï.α αÏ.Ï. Ï.οΜ
873+ καÏ.άλογÏ. Ï.αÏ. και ΎιαλέΟÏ.ε έΜα καÏ.άλληλο Ï.ΜοΌα αρÏ.είοÏ. Ï.Ï.Ï.Ï. Ï.ο TEST.
874+
875+ 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.άΜÏ. ΌέροÏ. αÏ.Ï.ήÏ. Ï.ηÏ. Ï.ελίΎαÏ. και Ï.αÏ.ήÏ.Ï.ε
876+ Ctrl-g για Μα βρείÏ.ε Ï.οΜ αριΞΌÏ. αÏ.Ï.ήÏ. Ï.ηÏ. γραΌΌήÏ..
877+ ΝÎ. Î.Î¥Î.Î.Σ΀Î. Î.Υ΀Î.Ν ΀Î.Ν Î.ΡÎ.Î.Î.Î.!
878+
879+ 3. ΀Ï.ρα Ï.ηγαίΜεÏ.ε Ï.Ï.ο κάÏ.Ï. ΌέροÏ. Ï.ηÏ. Ï.ελίΎαÏ. και Ï.αÏ.ήÏ.Ï.ε Ctrl-g ΟαΜά.
880+ ΝÎ. Î.Î¥Î.Î.Σ΀Î. Î.Î.Î. Î.Υ΀Î.Ν ΀Î.Ν Î.ΡÎ.Î.Î.Î.!
881+
882+ 4. Î.ια Μα Ï.Ï.Ï.εÏ.ε Î.Î.ΝÎ. έΜα Ï.ΌήΌα Ï.ε αρÏ.είο, γράÏ.Ï.ε :#,# w TEST
883+ Ï.Ï.οÏ. #,# οι Ύύο αριΞΌοί Ï.οÏ. αÏ.οΌΜηΌοΜεύÏ.αÏ.ε (Ï.άΜÏ.,κάÏ.Ï.) και TEST Ï.ο
884+ Ï.ΜοΌα Ï.οÏ. αρÏ.είοÏ. Ï.αÏ..
885+
886+ 5. Î.αΜά, ΎείÏ.ε Ï.Ï.ι Ï.ο αρÏ.είο είΜαι εκεί Όε Ï.ηΜ :!dir αλλά Î.Î.Ν Ï.ο ΎιαγράÏ.εÏ.ε.
887+
888+
889+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
890+ Î.άΞηΌα 5.4: Î.ΝÎ.Î.΀ΩΝ΀Î.Σ Î.Î.Î. Î.ΝΩΝÎ.Ν΀Î.Σ Î.ΡΧÎ.Î.Î.
891+
892+
893+ ** Î.ια Μα ειÏ.άγεÏ.ε Ï.α Ï.εριεÏ.Ï.ΌεΜα εΜÏ.Ï. αρÏ.είοÏ., γράÏ.Ï.ε :r Î.ΡΧÎ.Î.Î. **
894+
895+ 1. Î.ράÏ.Ï.ε :!dir για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι Ï.ο TEST Ï.Ï.άρÏ.ει αÏ.Ï. Ï.ριΜ.
896+
897+ 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.άΜÏ. ΌέροÏ. Ï.ηÏ. Ï.ελίΎαÏ..
898+
899+ΣÎ.Î.Î.Î.ΩΣÎ.: Î.Ï.Ï.Ï.οÏ. εκÏ.ελέÏ.εÏ.ε Ï.ο Î.ήΌα 3 Ξα ΎείÏ.ε Ï.ο Î.άΞηΌα 5.3.
900+ Î.εÏ.ά κιΜηΞείÏ.ε Î.Î.΀Ω ΟαΜά Ï.ροÏ. Ï.ο ΌάΞηΌα αÏ.Ï.Ï..
901+
902+ 3. ΀Ï.ρα αΜακÏ.ήÏ.Ï.ε Ï.ο αρÏ.είο Ï.αÏ. TEST Ï.ρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ηΜ εΜÏ.ολή :r TEST
903+ Ï.Ï.οÏ. TEST είΜαι Ï.ο Ï.ΜοΌα Ï.οÏ. αρÏ.είοÏ..
904+
905+ΣÎ.Î.Î.Î.ΩΣÎ.: ΀ο αρÏ.είο Ï.οÏ. αΜακÏ.άÏ.ε Ï.οÏ.οΞεÏ.είÏ.αι ΟεκιΜÏ.ÎœÏ.αÏ. εκεί Ï.οÏ. βρίÏ.κεÏ.αι
906+ ο ΎροΌέαÏ..
907+
908+ 4. Î.ια Μα εÏ.αληΞεύÏ.εÏ.ε Ï.Ï.ι Ï.ο αρÏ.είο αΜακÏ.ήΞηκε, Ï.ίÏ.Ï. Ï.οΜ ΎροΌέα και
909+ Ï.αραÏ.ηρήÏ.Ï.ε Ï.Ï.ι Ï.Ï.άρÏ.οÏ.Îœ Ï.Ï.ρα Ύύο αΜÏ.ίγραÏ.α Ï.οÏ. Î.αΞήΌαÏ.οÏ. 5.3, Ï.ο
910+ αρÏ.ικÏ. και η έκΎοÏ.η Ï.οÏ. αρÏ.είοÏ..
911+
912+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
913+ Î.Î.Î.Î.Î.Î. 5 Î Î.ΡÎ.Î.Î.ΚÎ.
914+
915+
916+ 1. :!εΜÏ.ολή εκÏ.ελεί Όία εΟÏ.Ï.ερική εΜÏ.ολή.
917+
918+ Î.ερικά Ï.ρήÏ.ιΌα Ï.αραΎείγΌαÏ.α είΜαι (MS-DOS):
919+ :!dir - εΌÏ.άΜιÏ.η λίÏ.Ï.αÏ. εΜÏ.Ï. καÏ.αλÏ.γοÏ..
920+ :!del Î.ΡΧÎ.Î.Î. - ΎιαγράÏ.ει Ï.ο Î.ΡΧÎ.Î.Î..
921+
922+ 2. :w Î.ΡΧÎ.Î.Î. γράÏ.ει Ï.ο Ï.ρέÏ.Ï.Îœ αρÏ.είο Ï.οÏ. Vim Ï.Ï.ο ΎίÏ.κο Όε Ï.ΜοΌα Î.ΡΧÎ.Î.Î..
923+
924+ 3. :#,#w Î.ΡΧÎ.Î.Î. Ï.Ï.ζει Ï.ιÏ. γραΌΌέÏ. αÏ.Ï. # ΌέÏ.ρι # Ï.Ï.ο Î.ΡΧÎ.Î.Î..
925+
926+ 4. :r Î.ΡΧÎ.Î.Î. αΜακÏ.εί Ï.ο αρÏ.είο ΎίÏ.κοÏ. Î.ΡΧÎ.Î.Î. και Ï.ο Ï.αρεΌβάλλει ΌέÏ.α
927+ Ï.Ï.ο Ï.ρέÏ.οΜ αρÏ.είο ΌεÏ.ά αÏ.Ï. Ï.η ΞέÏ.η Ï.οÏ. ΎροΌέα.
928+
929+
930+
931+
932+
933+
934+
935+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
936+ Î.άΞηΌα 6.1: Î. Î.Ν΀Î.Î.Î. Î.ΝÎ.Î.Î.Î.Î.΀Î.Σ
937+
938+
939+ ** ΠαÏ.ήÏ.Ï.ε o για Μα αΜοίΟεÏ.ε Όία γραΌΌή κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα και Μα
940+ βρεΞείÏ.ε Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ.. **
941+
942+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
943+
944+ 2. ΠαÏ.ήÏ.Ï.ε o (Ï.εζÏ.) για Μα αΜοίΟεÏ.ε Όία γραΌΌή Î.Î.΀Ω αÏ.Ï. Ï.οΜ ΎροΌέα και Μα
945+ βρεΞείÏ.ε Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ..
946+
947+ 3. ΀Ï.ρα αΜÏ.ιγράÏ.Ï.ε Ï.η Ï.ηΌειÏ.ΌέΜη Όε ---> γραΌΌή και Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα
948+ βγείÏ.ε αÏ.Ï. Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ..
949+
950+---> After typing o the cursor is placed on the open line in Insert mode.
951+
952+ 4. Î.ια Μα αΜοίΟεÏ.ε Όία γραΌΌή Î Î.ΝΩ αÏ.Ï. Ï.οΜ ΎροΌέα, Ï.αÏ.ήÏ.Ï.ε αÏ.λά έΜα κεÏ.αλαίο
953+ O, αΜÏ.ί για έΜα Ï.εζÏ. o. Î.οκιΌάÏ.Ï.ε Ï.ο Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή.
954+Î.ΜοίγεÏ.ε γραΌΌή Ï.άΜÏ. αÏ.Ï. αÏ.Ï.ήΜ Ï.αÏ.Ï.ÎœÏ.αÏ. Shift-O Ï.Ï.ο ο ΎροΌέαÏ. είΜαι Ï.Ï.η γραΌΌή
955+
956+
957+
958+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
959+ Î.άΞηΌα 6.2: Î. Î.Ν΀Î.Î.Î. ΠΡÎ.ΣÎ.Î.Î.Î.Σ
960+
961+ ** ΠαÏ.ήÏ.Ï.ε a για Μα ειÏ.άγεÏ.ε κείΌεΜο Î.Î.΀Î. Ï.οΜ ΎροΌέα. **
962+
963+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.έλοÏ. Ï.ηÏ. Ï.ρÏ.Ï.ηÏ. γραΌΌήÏ. Ï.αρακάÏ.Ï.
964+ Ï.ηΌειÏ.ΌέΜη Όε ---> Ï.αÏ.Ï.ÎœÏ.αÏ. $ Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η.
965+
966+ 2. ΠαÏ.ήÏ.Ï.ε έΜα a (Ï.εζÏ.) για Μα Ï.ροÏ.ΞέÏ.εÏ.ε κείΌεΜο Î.Î.΀Î. αÏ.Ï. Ï.οΜ Ï.αρακÏ.ήρα
967+ Ï.οÏ. είΜαι κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα. (΀ο κεÏ.αλαίο A Ï.ροÏ.ΞέÏ.ει Ï.Ï.ο Ï.έλοÏ.
968+ Ï.ηÏ. γραΌΌήÏ.).
969+
970+ΣηΌείÏ.Ï.η: Î.Ï.Ï.Ï. αÏ.οÏ.εύγει Ï.ο Ï.άÏ.ηΌα Ï.οÏ. i , Ï.οΜ Ï.ελεÏ.Ï.αίο Ï.αρακÏ.ήρα, Ï.ο
971+ κείΌεΜο Ï.ηÏ. ειÏ.αγÏ.γήÏ., <ESC>, ΎροΌέα-ΎεΟιά, και Ï.έλοÏ., x, ÎŒÏ.Μο και
972+ ÎŒÏ.Μο για Μα Ï.ροÏ.ΞέÏ.εÏ.ε Ï.Ï.ο Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ.!
973+
974+ 3. ΣÏ.ÎŒÏ.ληρÏ.Ï.Ï.ε Ï.Ï.ρα Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή. ΣηΌειÏ.Ï.Ï.ε εÏ.ίÏ.ηÏ. Ï.Ï.ι η Ï.ροÏ.Ξήκη είΜαι
975+ ακριβÏ.Ï. ίΎια Ï.Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ. Όε Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ιÏ.αγÏ.γήÏ., εκÏ.Ï.Ï.
976+ αÏ.Ï. Ï.η ΞέÏ.η Ï.οÏ. ειÏ.άγεÏ.αι Ï.ο κείΌεΜο.
977+
978+---> This line will allow you to practice
979+---> This line will allow you to practice appending text to the end of a line.
980+
981+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
982+ Î.άΞηΌα 6.3: Î.Î.Î.Î. Î.Î.Î.Î.ΣÎ. ΀Î.Σ Î.Ν΀Î.Î.Î.΀Î.Σ΀Î.ΣÎ.Σ
983+
984+
985+ ** ΠαÏ.ήÏ.Ï.ε κεÏ.αλαίο R για Μα αλλάΟεÏ.ε Ï.εριÏ.Ï.Ï.Ï.εροÏ.Ï. αÏ.Ï. έΜαΜ Ï.αρακÏ.ήρεÏ.. **
986+
987+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
988+
989+ 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ αρÏ.ή Ï.ηÏ. Ï.ρÏ.Ï.ηÏ. λέΟηÏ. Ï.οÏ. είΜαι ΎιαÏ.ορεÏ.ική
990+ αÏ.Ï. Ï.η ΎεύÏ.ερη γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε ---> (η λέΟη 'last').
991+
992+ 3. ΠαÏ.ήÏ.Ï.ε Ï.Ï.ρα R και αλλάΟÏ.ε Ï.ο Ï.Ï.Ï.λοιÏ.ο Ï.οÏ. κειΌέΜοÏ. Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή
993+ γράÏ.οΜÏ.αÏ. Ï.άΜÏ. αÏ.Ï. Ï.ο Ï.αλιÏ. κείΌεΜο Ï.Ï.Ï.ε Μα κάΜεÏ.ε Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή ίΎια
994+ Όε Ï.η ΎεύÏ.ερη.
995+
996+---> To make the first line the same as the last on this page use the keys.
997+---> To make the first line the same as the second, type R and the new text.
998+
999+ 4. ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι Ï.Ï.αΜ Ï.αÏ.άÏ.ε <ESC> για Μα βγείÏ.ε, Ï.αραΌέΜει οÏ.οιοΎήÏ.οÏ.ε
1000+ αΜαλλοίÏ.Ï.ο κείΌεΜο.
1001+
1002+
1003+
1004+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1005+ Î.άΞηΌα 6.4: ΡΥÎ.Î.Î.ΣÎ. Î.Î Î.Î.Î.Î.Î.Σ
1006+
1007+
1008+ ** ΡÏ.ΞΌίÏ.Ï.ε Όία εÏ.ιλογή έÏ.Ï.ι Ï.Ï.Ï.ε η αΜαζήÏ.ηÏ.η ή η αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Μα αγΜοεί
1009+ Ï.η ΎιαÏ.ορά Ï.εζÏ.Îœ-κεÏ.αλαίÏ.Îœ **
1010+
1011+ 1. ΚάΟÏ.ε για 'ignore' ειÏ.άγοΜÏ.αÏ.:
1012+ /ignore
1013+ ΣÏ.ΜεÏ.ίÏ.Ï.ε αρκεÏ.έÏ. Ï.ορέÏ. Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο Ï.λήκÏ.ρο n.
1014+
1015+ 2. Î.έÏ.Ï.ε Ï.ηΜ εÏ.ιλογή 'ic' (Ignore case) γράÏ.οΜÏ.αÏ.:
1016+ :set ic
1017+
1018+ 3. ΚάΟÏ.ε Ï.Ï.ρα ΟαΜά για 'ignore' Ï.αÏ.Ï.ÎœÏ.αÏ.: n
1019+ ΣÏ.ΜεÏ.ίÏ.Ï.ε Ï.ηΜ αΜαζήÏ.ηÏ.η ΌερικέÏ. ακÏ.Όα Ï.ορέÏ. Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο Ï.λήκÏ.ρο n
1020+
1021+ 4. Î.έÏ.Ï.ε Ï.ιÏ. εÏ.ιλογέÏ. 'hlsearch' και 'incsearch':
1022+ :set hls is
1023+
1024+ 5. Î.ιÏ.άγεÏ.ε Ï.Ï.ρα ΟαΜά Ï.ηΜ εΜÏ.ολή αΜαζήÏ.ηÏ.ηÏ., και ΎείÏ.ε Ï.ι Ï.Ï.ΌβαίΜει
1025+ /ignore
1026+
1027+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1028+ Î.Î.Î.Î.Î.Î. 6 Î Î.ΡÎ.Î.Î.ΚÎ.
1029+
1030+
1031+ 1. ΠαÏ.Ï.ÎœÏ.αÏ. o αΜοίγει Όία γραΌΌή Î.Î.΀Ω αÏ.Ï. Ï.οΜ ΎροΌέα και Ï.οÏ.οΞεÏ.εί Ï.οΜ
1032+ ΎροΌέα Ï.Ï.ηΜ αΜοιÏ.Ï.ή γραΌΌή Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ..
1033+
1034+ 2. ΠαÏ.ήÏ.Ï.ε a για Μα ειÏ.άγεÏ.ε κείΌεΜο Î.Î.΀Î. Ï.οΜ Ï.αρακÏ.ήρα Ï.Ï.οΜ οÏ.οίο είΜαι
1035+ ο ΎροΌέαÏ.. ΠαÏ.Ï.ÎœÏ.αÏ. κεÏ.αλαίο A αÏ.Ï.Ï.ΌαÏ.α Ï.ροÏ.ΞέÏ.ει κείΌεΜο Ï.Ï.ο Ï.έλοÏ.
1036+ Ï.ηÏ. γραΌΌήÏ..
1037+
1038+ 3. ΠαÏ.Ï.ÎœÏ.αÏ. κεÏ.αλαίο R ειÏ.έρÏ.εÏ.αι Ï.Ï.ηΜ Î.αÏ.άÏ.Ï.αη Î.ÎœÏ.ικαÏ.άÏ.Ï.αÏ.ηÏ. ΌέÏ.ρι Μα
1039+ Ï.αÏ.ηΞεί Ï.ο <ESC> και Μα εΟέλΞει.
1040+
1041+ 4. Î.ράÏ.οΜÏ.αÏ. ":set xxx" ρÏ.ΞΌίζει Ï.ηΜ εÏ.ιλογή "xxx".
1042+
1043+
1044+
1045+
1046+
1047+
1048+
1049+
1050+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1051+ Î.Î.Î.Î.Î.Î. 7: ON-LINE Î.Ν΀Î.Î.Î.Σ Î.Î.Î.Î.Î.Î.Î.Σ
1052+
1053+
1054+ ** ΧρηÏ.ιΌοÏ.οιήÏ.Ï.ε Ï.ο on-line Ï.ύÏ.Ï.ηΌα βοήΞειαÏ. **
1055+
1056+ Î. Vim έÏ.ει έΜα Ï.εριεκÏ.ικÏ. on-line Ï.ύÏ.Ï.ηΌα βοήΞειαÏ.. Î.ια Μα ΟεκιΜήÏ.ει,
1057+ ΎοκιΌάÏ.Ï.ε κάÏ.οιο αÏ.Ï. Ï.α Ï.ρία:
1058+ - Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο <HELP> (αΜ έÏ.εÏ.ε κάÏ.οιο)
1059+ - Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο <F1> (αΜ έÏ.εÏ.ε κάÏ.οιο)
1060+ - γράÏ.Ï.ε :help <ENTER>
1061+
1062+ Î.ράÏ.Ï.ε :q <ENTER> για Μα κλείÏ.εÏ.ε Ï.ο Ï.αράΞÏ.ρο Ï.ηÏ. βοήΞειαÏ..
1063+
1064+ Î.Ï.ορείÏ.ε Μα βρείÏ.ε βοήΞεια Ï.άΜÏ. Ï.ε κάΞε αΜÏ.ικείΌεΜο, ΎίΜοΜÏ.αÏ. Όία Ï.αράΌεÏ.ρο
1065+ Ï.Ï.ηΜ εΜÏ.ολή ":help". Î.οκιΌάÏ.Ï.ε αÏ.Ï.ά (ΌηΜ ΟεÏ.ΜάÏ.ε Μα Ï.αÏ.άÏ.ε <ENTER>):
1066+
1067+ :help w
1068+ :help c_<T
1069+ :help insert-index
1070+ :help user-manual
1071+
1072+
1073+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1074+ Î.Î.Î.Î.Î.Î. 8: Î.Î.Î.Î.Î.ΥΡÎ.Î.Σ΀Î. Î.ΝÎ. SCRIPT Î.Î.Î.Î.ΝÎ.ΣÎ.Σ
1075+
1076+ ** Î.ΜεργοÏ.οιήÏ.Ï.ε Ï.αρακÏ.ηριÏ.Ï.ικά Ï.οÏ. Vim **
1077+
1078+ Î. Vim έÏ.ει Ï.ολλά Ï.εριÏ.Ï.Ï.Ï.ερα Ï.αρακÏ.ηριÏ.Ï.ικά αÏ.' Ï.,Ï.ι ο Vi, αλλά Ï.α
1079+ Ï.εριÏ.Ï.Ï.Ï.ερα είΜαι αρÏ.ικά αÏ.εΜεργοÏ.οιηΌέΜα. Î.ια Μα αρÏ.ίÏ.εÏ.ε Μα Ï.ρηÏ.ιΌοÏ.οιείÏ.ε
1080+ Ï.εριÏ.Ï.Ï.Ï.ερα Ï.αρακÏ.ηριÏ.Ï.ικά Ï.ρέÏ.ει Μα Ï.Ï.ιάΟεÏ.ε έΜα αρÏ.είο "vimrc".
1081+
1082+ 1. Î.ρÏ.ίÏ.Ï.ε ΎιορΞÏ.ΜοΜÏ.αÏ. Ï.ο αρÏ.είο "vimrc", αÏ.Ï.Ï. εΟαρÏ.άÏ.αι αÏ.Ï. Ï.ο Ï.ύÏ.Ï.ηΌά Ï.αÏ.:
1083+ :edit ~/.vimrc για Unix
1084+ :edit $VIM/_vimrc για MS-Windows
1085+
1086+ 2. ΀Ï.ρα ειÏ.άγεÏ.ε Ï.ο κείΌεΜο Ï.αραΎείγΌαÏ.οÏ. για αρÏ.είο "vimrc":
1087+ :read $VIMRUNTIME/vimrc_example.vim
1088+
1089+ 3. Î.ράÏ.Ï.ε Ï.ο αρÏ.είο Όε Ï.ηΜ:
1090+ :write
1091+
1092+ ΀ηΜ εÏ.Ï.ΌεΜη Ï.ορά Ï.οÏ. Ξα ΟεκιΜήÏ.εÏ.ε Ï.οΜ Vim Ξα Ï.ρηÏ.ιΌοÏ.οιήÏ.ει Ï.Ï.Ï.ιÏ.ÎŒÏ.
1093+ Ï.ύΜÏ.αΟηÏ.. Î.Ï.ορείÏ.ε Μα Ï.ροÏ.ΞέÏ.εÏ.ε Ï.λεÏ. Ï.ιÏ. Ï.ροÏ.ιΌÏ.ΌεΜεÏ. εÏ.ιλογέÏ. Ï.' αÏ.Ï.Ï.
1094+ Ï.ο αρÏ.είο "vimrc".
1095+
1096+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1097+
1098+ Î.ÎŽÏ. ολοκληρÏ.ΜεÏ.αι Ï.ο Vim Tutor. ΣκοÏ.Ï.Ï. Ï.οÏ. ήÏ.αΜ Μα ÎŽÏ.Ï.ει Όία Ï.ύΜÏ.οΌη
1099+ Ï.ερίληÏ.η Ï.οÏ. Ï.Ï.ÎœÏ.άκÏ.η Vim, Ï.οÏ.λάÏ.ιÏ.Ï.οΜ Ï.Ï.Ï.η Ï.Ï.Ï.ε Μα Ï.αÏ. εÏ.ιÏ.ρέÏ.ει Μα
1100+ Ï.ρηÏ.ιΌοÏ.οιήÏ.εÏ.ε Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η αρκεÏ.ά εύκολα. Î.Ï.έÏ.ει Ï.ολύ αÏ.Ï. Όία
1101+ ολοκληρÏ.ΌέΜη Ï.αροÏ.Ï.ίαÏ.η καΞÏ.Ï. ο Vim έÏ.ει Ï.άρα Ï.ολλέÏ. εΜÏ.ολέÏ.. Î.ιαβάÏ.Ï.ε
1102+ καÏ.Ï.Ï.ιΜ Ï.ο εγÏ.ειρίΎιο Ï.ρήÏ.ηÏ.:
1103+ ":help user-manual".
1104+
1105+ Î.ια Ï.εραιÏ.έρÏ. ΎιάβαÏ.Όα και ΌελέÏ.η, Ï.Ï.Ï.Ï.ήΜεÏ.αι αÏ.Ï.Ï. Ï.ο βιβλίο:
1106+ Vim - Vi Improved - by Steve Oualline
1107+ Publisher: New Riders
1108+ ΀ο Ï.ρÏ.Ï.ο βιβλίο Ï.λήρÏ.Ï. αÏ.ιερÏ.ΌέΜο Ï.Ï.οΜ Vim.
1109+ Î.ΎιαίÏ.ερα Ï.ρήÏ.ιΌο για αρÏ.άριοÏ.Ï..
1110+ Î¥Ï.άρÏ.οÏ.Îœ Ï.ολλά Ï.αραΎείγΌαÏ.α και εικÏ.ΜεÏ..
1111+ Î.είÏ.ε Ï.ηΜ http://iccf-holland.org/click5.html
1112+
1113+ Î.Ï.Ï.Ï. Ï.ο βιβλίο είΜαι Ï.αλιÏ.Ï.ερο και Ï.εριÏ.Ï.Ï.Ï.ερο για Ï.οΜ Vi Ï.αρά για Ï.οΜ Vim,
1114+ αλλά εÏ.ίÏ.ηÏ. Ï.Ï.ΜιÏ.Ï.Ï.ΌεΜο:
1115+ Learning the Vi Editor - by Linda Lamb
1116+ Publisher: O'Reilly & Associates Inc.
1117+ Î.ίΜαι έΜα καλÏ. βιβλίο για Μα ΌάΞεÏ.ε Ï.Ï.εΎÏ.Îœ Ï.α Ï.άΜÏ.α Ï.οÏ. ΞέλεÏ.ε
1118+ Μα κάΜεÏ.ε Όε Ï.οΜ Vi.
1119+ Î. έκÏ.η έκΎοÏ.η Ï.εριέÏ.ει ακÏ.Όα Ï.ληροÏ.ορίεÏ. για Ï.οΜ Vim.
1120+
1121+ Î.Ï.Ï.ή η Ï.εριήγηÏ.η γράÏ.Ï.ηκε αÏ.Ï. Ï.οÏ.Ï. Michael C. Pierce και Robert K. Ware,
1122+ Colorado School of Mines Ï.ρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. ιΎέεÏ. αÏ.Ï. Ï.οΜ Charles Smith,
1123+ Colorado State University. E-mail: bware@mines.colorado.edu.
1124+
1125+ ΠροÏ.αρΌογή για Ï.οΜ Vim αÏ.Ï. Ï.οΜ Bram Moolenaar.
1126+
1127+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1128diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8
1129--- vim70.orig/runtime/tutor/tutor.ru.utf-8 1969-12-31 16:00:00.000000000 -0800
1130+++ vim70/runtime/tutor/tutor.ru.utf-8 2006-09-11 08:57:09.000000000 -0700
1131@@ -0,0 +1,834 @@
1132+===============================================================================
1133+= Ð. П б Ñ. П п П ж а л П в а Ñ. Ñ. в Ñ. Ñ. е б Ðœ О к VIM - Ð.еÑ.сОя 1.5 =
1134+===============================================================================
1135+ Vim --- эÑ.П ПÑ.еМÑ. ЌПÑ.ÐœÑ.й Ñ.еЎакÑ.ПÑ., ОЌеÑ.Ñ.Ой ЌМПжесÑ.вП кПЌаМЎ, слОÑ.кПЌ
1136+ ЌМПгП Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. ОÑ. все ЌПжМП бÑ.лП ПпОсаÑ.Ñ. в Ñ.акПЌ Ñ.Ñ.ебМОке, как
1137+ эÑ.ПÑ.. ЭÑ.ПÑ. Ñ.Ñ.ебМОк пÑ.ОзваМ ПбÑ.ясМОÑ.Ñ. ЎПсÑ.аÑ.ПÑ.МПе Ñ.ОслП кПЌаМЎ Ўля Ñ.ПгП,
1138+ Ñ.Ñ.ПбÑ. Ð.Ñ. ЌПглО с легкПсÑ.Ñ.Ñ. ОспПлÑ.зПваÑ.Ñ. Vim в каÑ.есÑ.ве Ñ.еЎакÑ.ПÑ.а ПбÑ.егП
1139+ МазМаÑ.еМОя.
1140+
1141+ Ð.аЌ пПÑ.Ñ.ебÑ.еÑ.ся пÑ.ОблОзОÑ.елÑ.МП 25-30 ЌОМÑ.Ñ. Ма ПсвПеМОе ЎаММПгП Ñ.Ñ.ебМОка в
1142+ завОсОЌПсÑ.О ПÑ. Ñ.ПгП, скПлÑ.кП вÑ.еЌеМО Ð.Ñ. пПÑ.Ñ.аÑ.ОÑ.е Ма экспеÑ.ОЌеМÑ.Ñ..
1143+
1144+ Ð.ПЌаМЎÑ. в Ñ.Ñ.ПкаÑ. бÑ.ÐŽÑ.Ñ. ЌПЎОÑ.ОÑ.ОÑ.ПваÑ.Ñ. Ñ.ексÑ.. СПзЎайÑ.е кПпОÑ. эÑ.ПгП Ñ.айла,
1145+ Ñ.Ñ.ПбÑ. пПпÑ.акÑ.ОкПваÑ.Ñ.ся Ма Мей (еслО Ð.Ñ. запÑ.сÑ.ОлО "vimtutor", Ñ.П эÑ.П Ñ.же
1146+ кПпОя).
1147+
1148+ Ð.ажМП пПЌМОÑ.Ñ., Ñ.Ñ.П эÑ.ПÑ. Ñ.Ñ.ебМОк пÑ.еЎМазМаÑ.еМ Ўля ПбÑ.Ñ.еМОя в пÑ.ПÑ.ессе
1149+ ОспПлÑ.зПваМОя. ЭÑ.П ПзМаÑ.аеÑ., Ñ.Ñ.П Ð.Ñ. ЎПлжМÑ. запÑ.скаÑ.Ñ. кПЌаМЎÑ. Ўля Ñ.ПгП,
1150+ Ñ.Ñ.ПбÑ. как слеЎÑ.еÑ. ОÑ. ОзÑ.Ñ.ОÑ.Ñ.. Ð.слО Ð.Ñ. пÑ.ПсÑ.П пÑ.ПÑ.ОÑ.аеÑ.е Ñ.ексÑ., Ñ.П
1151+ забÑ.ЎеÑ.е кПЌаМЎÑ.!
1152+
1153+ ТепеÑ.Ñ. Ñ.беЎОÑ.есÑ. в Ñ.ПЌ, Ñ.Ñ.П клавОÑ.а CapsLock Ме вклÑ.Ñ.еМа О МажЌОÑ.е
1154+ клавОÑ.Ñ. j МескПлÑ.кП Ñ.аз, Ñ.ак, Ñ.Ñ.ПбÑ. УÑ.Пк 1.1 пПлМПсÑ.Ñ.Ñ. пПЌесÑ.Олся Ма
1155+ экÑ.аМе.
1156+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1157+ УÑ.Пк 1.1: Ð.Ð.Ð Ð.Ð.Ð.ЩÐ.НÐ.Ð. Ð.УРСÐ.РА
1158+
1159+** Ð.ля пеÑ.еЌеÑ.еМОя кÑ.Ñ.сПÑ.а МажЌОÑ.е клавОÑ.О h,j,k,l Ñ.ак, как пПказаМП МОже. **
1160+ ^
1161+ k СПвеÑ.Ñ.: Ð.лавОÑ.а h МаÑ.ПЎОÑ.ся слева О пеÑ.еЌеÑ.аеÑ. влевП.
1162+ < h l > Ð.лавОÑ.а l МаÑ.ПЎОÑ.ся спÑ.ава О пеÑ.еЌеÑ.аеÑ. впÑ.авП.
1163+ j Ð.лавОÑ.а j пПÑ.Пжа Ма сÑ.Ñ.елкÑ. `вМОз'.
1164+ v
1165+ 1. Ð.ПЎвОгайÑ.е кÑ.Ñ.сПÑ. пП экÑ.аМÑ., пПка Ме пПÑ.Ñ.всÑ.вÑ.еÑ.е себя Ñ.веÑ.еММП.
1166+
1167+ 2. НаЎавОÑ.е клавОÑ.Ñ. `вМОз' (j) пПка ПМа Ме МаÑ.МеÑ. пПвÑ.ПÑ.яÑ.Ñ.ся.
1168+---> ТепеÑ.Ñ. Ð.Ñ. зМаеÑ.е, как пеÑ.ейÑ.О к слеЎÑ.Ñ.Ñ.еЌÑ. Ñ.Ñ.ПкÑ..
1169+
1170+ 3. Ð.спПлÑ.зÑ.я клавОÑ.Ñ. `вМОз' пеÑ.ейЎОÑ.е к УÑ.ПкÑ. 1.2.
1171+
1172+Ð.аЌеÑ.аМОе: Ð.слО вÑ. пПка Ме Ñ.веÑ.еМÑ. в Ñ.ПЌ, Ñ.Ñ.П МабОÑ.аеÑ.е, МажЌОÑ.е <ESC> Ўля
1173+ пеÑ.еÑ.ПЎа в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ (Normal mode). Ð.Псле эÑ.ПгП пеÑ.еМабеÑ.ОÑ.е
1174+ Ñ.Ñ.ебÑ.еЌÑ.Ñ. кПЌаМЎÑ..
1175+
1176+Ð.аЌеÑ.аМОе: Ð.бÑ.Ñ.ÐœÑ.е клавОÑ.О Ñ.пÑ.авлеМОя кÑ.Ñ.сПÑ.ПЌ (сÑ.Ñ.елкО) Ñ.акже ЎПлжМÑ.
1177+ Ñ.абПÑ.аÑ.Ñ.. Ð.ЎМакП, клавОÑ.О hjkl пПзвПляÑ. Ð.аЌ пеÑ.еЌеÑ.аÑ.Ñ.ся
1178+ зМаÑ.ОÑ.елÑ.МП бÑ.сÑ.Ñ.ее, как Ñ.ПлÑ.кП Ð.Ñ. МаÑ.Ñ.ОÑ.есÑ. ОЌО пПлÑ.зПваÑ.Ñ.ся.
1179+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1180+ УÑ.Пк 1.2: Ð.АÐ.УСÐ. Ð. Ð.АÐ.Ð.РКÐ.НÐ.Ð. РАÐ.Ð.ТЫ С VIM
1181+
1182+!! Ð.НÐ.Ð.АНÐ.Ð.! Ð.Ñ.ежЎе, Ñ.еЌ вÑ.пПлМяÑ.Ñ. лÑ.бПй Оз ПпОсаММÑ.Ñ. МОже Ñ.агПв, пÑ.ПÑ.Ñ.ОÑ.е
1183+ Ñ.Ñ.Пк Ñ.елОкПЌ !!
1184+
1185+ 1. НажЌОÑ.е клавОÑ.Ñ. <ESC> (Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.ЎПсÑ.ПвеÑ.ОÑ.Ñ.ся, Ñ.Ñ.П Ð.Ñ. в ПбÑ.Ñ.МПЌ
1186+ Ñ.ежОЌе (Normal mode)).
1187+
1188+ 2. НабеÑ.ОÑ.е: :q! <ENTER>.
1189+
1190+---> ЭÑ.П пПзвПлОÑ. Ð.аЌ вÑ.йÑ.О Оз Ñ.еЎакÑ.ПÑ.а Ð.Ð.Ð. СÐ.ХРАНÐ.НÐ.Я лÑ.бÑ.Ñ. сЎелаММÑ.Ñ.
1191+ ОзЌеМеМОй. Ð.слО Ð.Ñ. Ñ.ПÑ.ОÑ.е сПÑ.Ñ.аМОÑ.Ñ. ОзЌеМеМОя О вÑ.йÑ.О:
1192+ :wq <ENTER>
1193+
1194+ 3. Ð.ПгЎа Ð.Ñ. Ñ.вОЎОÑ.е пÑ.ОглаÑ.еМОе кПЌаМЎМПй ПбПлПÑ.кО, МабеÑ.ОÑ.е кПЌаМЎÑ.,
1195+ кПÑ.ПÑ.ая пÑ.Овела Ð.ас в эÑ.ПÑ. Ñ.Ñ.ебМОк. ЭÑ.П ЌПжеÑ. бÑ.Ñ.Ñ.
1196+ vimtutor ru <ENTER>
1197+ Ð.бÑ.Ñ.МП ЌПжМП ОспПлÑ.зПваÑ.Ñ.: vim tutor.ru <ENTER>
1198+
1199+---> 'vim' пПзвПляеÑ. запÑ.сÑ.ОÑ.Ñ. Ñ.еЎакÑ.ПÑ. vim, 'tutor.ru' --- эÑ.П Ñ.айл, кПÑ.ПÑ.Ñ.й
1200+ Ð.Ñ. бÑ.ЎеÑ.е Ñ.еЎакÑ.ОÑ.ПваÑ.Ñ..
1201+
1202+ 4. Ð.слО Ð.Ñ. Ñ.веÑ.еМÑ. в Ñ.ПЌ, Ñ.Ñ.П запПЌМОлО эÑ.О Ñ.агО, вÑ.пПлМОÑ.е Ñ.агО ПÑ. 1 ЎП 3
1203+ Ñ.Ñ.ПбÑ. вÑ.йÑ.О сМПва запÑ.сÑ.ОÑ.Ñ. Ñ.еЎакÑ.ПÑ.. Ð.аÑ.еЌ пеÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз к
1204+ УÑ.ПкÑ. 1.3.
1205+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1206+ УÑ.Пк 1.3: Ð Ð.Ð.АÐ.ТÐ.Ð Ð.Ð.АНÐ.Ð. ТÐ.Ð.СТА - УÐ.АÐ.Ð.НÐ.Ð.
1207+
1208+
1209+** НаÑ.ПЎясÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе МажЌОÑ.е x, Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ. сОЌвПл пПЎ кÑ.Ñ.сПÑ.ПЌ. **
1210+
1211+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к сÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->.
1212+
1213+ 2. Ð.ля ОспÑ.авлеМОя ПÑ.ОбПк, пеÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ., пПка ПМ Ме ПкажеÑ.ся МаЎ
1214+ Ñ.ЎаляеЌÑ.ÐŒ сОЌвПлПЌ.
1215+
1216+ 3. НажЌОÑ.е клавОÑ.Ñ. x Ўля Ñ.ЎалеМОя Ñ.Ñ.ебÑ.еЌПгП сОЌвПла.
1217+
1218+ 4. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4 пПка сÑ.Ñ.Пка Ме бÑ.ЎеÑ. ОспÑ.авлеМа.
1219+
1220+---> Ð.Ñ. Ñ.Ñ.Ñ.ПпПÑ.а кПпÑ.Ñ.Ñ. пппÑ.лÑ. ппП пппПлÑ. леÑ.Ñ.ОÑ.Ñ..
1221+
1222+ 5. ТепеÑ.Ñ., кПгЎа сÑ.Ñ.Пка ПÑ.кПÑ.Ñ.екÑ.ОÑ.ПваМа, пеÑ.еÑ.ПЎОÑ.е к Ñ.Ñ.ПкÑ. 1.4.
1223+
1224+Ð.АÐ.Ð.ЧАНÐ.Ð.: Ð. Ñ.ПЎе ПсвПеМОя эÑ.ПгП Ñ.Ñ.ебМОка Ме пÑ.Ñ.айÑ.есÑ. запПЌОМаÑ.Ñ., Ñ.Ñ.ОÑ.е
1225+ в пÑ.ПÑ.ессе ОспПлÑ.зПваМОя.
1226+
1227+
1228+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1229+ УÑ.Пк 1.4: Ð Ð.Ð.АÐ.ТÐ.Ð Ð.Ð.АНÐ.Ð. ТÐ.Ð.СТА - Ð.СТАÐ.Ð.А
1230+
1231+
1232+ ** НаÑ.ПЎясÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode), МажЌОÑ.е i Ўля всÑ.авкО Ñ.ексÑ.а. **
1233+
1234+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к пеÑ.вПй сÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->.
1235+
1236+ 2. Ð.ля Ñ.ПгП, Ñ.Ñ.ПбÑ. сЎелаÑ.Ñ. пеÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ. ОЎеМÑ.ОÑ.МПй вÑ.ПÑ.Пй, пПЌесÑ.ОÑ.е
1237+ кÑ.Ñ.сПÑ. Ма сОЌвПл Ð.Ð.Ð Ð.Ð. кПÑ.ПÑ.Ñ.ÐŒ слеЎÑ.еÑ. всÑ.авОÑ.Ñ. Ñ.ексÑ..
1238+
1239+ 3. НажЌОÑ.е i О МабеÑ.ОÑ.е Ñ.Ñ.ебÑ.еЌÑ.е ЎПбавлеМОя.
1240+
1241+ 4. Ð.Псле ОспÑ.авлеМОя всеÑ. ПÑ.ОбПк МажЌОÑ.е <ESC> Ўля вПзвÑ.аÑ.а в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ.
1242+ Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4, пПка Ñ.Ñ.аза Ме бÑ.ЎеÑ. ОспÑ.авлеМа пПлМПсÑ.Ñ.Ñ..
1243+
1244+---> ЧасÑ.Ñ. Ñ.ексÑ.а в сÑ.Ñ.Пке беслеЎМП .
1245+---> ЧасÑ.Ñ. Ñ.ексÑ.а в эÑ.Пй сÑ.Ñ.Пке бесслеЎМП пÑ.Ппала.
1246+
1247+ 5. Ð.ПгЎа ПсвПОÑ.е всÑ.авкÑ. Ñ.ексÑ.а, пеÑ.еÑ.ПЎОÑ.е ЎалÑ.Ñ.е к РезÑ.Ќе.
1248+
1249+
1250+
1251+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1252+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 1
1253+
1254+ 1. Ð.Ñ.Ñ.сПÑ. пеÑ.еЌеÑ.аеÑ.ся лОбП клавОÑ.аЌО сП сÑ.Ñ.елкаЌО, лОбП клавОÑ.аЌО hjkl.
1255+ h (влевП) j (вМОз) k (ввеÑ.Ñ.) l (впÑ.авП)
1256+
1257+ 2. Ð.ля запÑ.ска Vim (Оз пÑ.ОглаÑ.еМОя % кПЌаМЎМПй ПбПлПÑ.кО) МабеÑ.ОÑ.е:
1258+ vim Ð.Ð.Я_ЀАÐ.Ð.А <ENTER>
1259+
1260+ 3. Ð.ля завеÑ.Ñ.еМОя Ñ.абПÑ.Ñ. с Vim МабеÑ.ОÑ.е:
1261+ <ESC> :q! <ENTER> Ñ.Ñ.ПбÑ. ПÑ.казаÑ.Ñ.ся ПÑ. сПÑ.Ñ.аМеМОя ОзЌеМеМОй.
1262+ Ð.лО МабеÑ.ОÑ.е:
1263+ <ESC> :wq <ENTER> Ñ.Ñ.ПбÑ. сПÑ.Ñ.аМОÑ.Ñ. ОзЌеМеМОя.
1264+
1265+ 4. Ð.ля Ñ.ЎалеМОя сОЌвПла пПЎ кÑ.Ñ.сПÑ.ПЌ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе, МабеÑ.ОÑ.е: x
1266+
1267+ 5. ЧÑ.ПбÑ. всÑ.авОÑ.Ñ. Ñ.ексÑ. пеÑ.еЎ кÑ.Ñ.сПÑ.ПЌ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе, МабеÑ.ОÑ.е:
1268+ i ввПЎОÑ.е Ñ.ексÑ. <ESC>
1269+
1270+Ð.АÐ.Ð.ЧАНÐ.Ð.: НажаÑ.Ое <ESC> пеÑ.еЌесÑ.ОÑ. Ð.ас в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ (Normal mode) лОбП
1271+ пÑ.еÑ.веÑ. МежелаÑ.елÑ.ÐœÑ.Ñ. О Ñ.асÑ.ОÑ.МП завеÑ.Ñ.еММÑ.Ñ. кПЌаМЎÑ..
1272+
1273+ТепеÑ.Ñ. пеÑ.еÑ.ПЎОЌ к УÑ.ПкÑ. 2.
1274+
1275+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1276+ УÑ.Пк 2.1: Ð.Ð.Ð.АНÐ.Ы УÐ.АÐ.Ð.НÐ.Я
1277+
1278+
1279+ ** НабеÑ.ОÑ.е dw Ўля Ñ.ЎалеМОя Ñ.Ñ.асÑ.ка Ñ.ексÑ.а ЎП кПМÑ.а слПва. **
1280+
1281+ 1. НажЌОÑ.е <ESC>, Ñ.Ñ.ПбÑ. пеÑ.ейÑ.О в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ.
1282+
1283+ 2. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1284+
1285+ 3. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. в МаÑ.алП слПва, кПÑ.ПÑ.Пе слеЎÑ.еÑ. Ñ.ЎалОÑ.Ñ..
1286+
1287+ 4. НабеÑ.ОÑ.е dw , Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ. эÑ.П слПвП.
1288+
1289+Ð.АÐ.Ð.ЧАНÐ.Ð.: Ð.П вÑ.еЌя МабПÑ.а бÑ.квÑ. dw пПявяÑ.ся в пПслеЎМей сÑ.Ñ.Пке экÑ.аМа. Ð.слО
1290+ Ð.Ñ. Ñ.Ñ.П-Ñ.П МабеÑ.еÑ.е МепÑ.авОлÑ.МП, МажЌОÑ.е <ESC> О МаÑ.МОÑ.е сМаÑ.ала.
1291+
1292+---> НескПлÑ.кП слПв Ñ.аÑ.ОМаЎ в эÑ.ПЌ пÑ.еЎлПжеМОО авÑ.ПкÑ.аМ ОзлОÑ.МО.
1293+
1294+ 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 3 О 4, пПка Ме ОспÑ.авОÑ.е все ПÑ.ОбкО О пеÑ.еÑ.ПЎОÑ.е к
1295+ УÑ.ПкÑ. 2.2.
1296+
1297+
1298+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1299+ УÑ.Пк 2.2: Ð.Ð.Ð.Ð.Ð.НÐ.ТÐ.Ð.ЬНЫÐ. Ð.Ð.Ð.АНÐ.Ы УÐ.АÐ.Ð.НÐ.Я
1300+
1301+
1302+ ** НабеÑ.ОÑ.е d$ Ўля Ñ.ЎалеМОя Ñ.ексÑ.а ЎП кПМÑ.а сÑ.Ñ.ПкО. **
1303+
1304+ 1. НажЌОÑ.е <ESC>, Ñ.Ñ.ПбÑ. пеÑ.ейÑ.О в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ.
1305+
1306+ 2. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1307+
1308+ 3. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к кПМÑ.Ñ. пÑ.авОлÑ.МПй сÑ.Ñ.ПкО (Ð.Ð.СÐ.Ð. пеÑ.вПй . ).
1309+
1310+ 4. ЧÑ.ПбÑ. Ñ.ЎалОÑ.Ñ. ПсÑ.аÑ.Пк сÑ.Ñ.ПкО, МабеÑ.ОÑ.е d$ .
1311+
1312+---> Ð.Ñ.П-Ñ.П МабÑ.ал ПкПМÑ.аМОе эÑ.Пй сÑ.Ñ.ПкО ЎважЎÑ.. ПкПМÑ.аМОе эÑ.Пй сÑ.Ñ.ПкО ЎважЎÑ..
1313+
1314+
1315+ 5.ЧÑ.ПбÑ. лÑ.Ñ.Ñ.е Ñ.азПбÑ.аÑ.Ñ.ся в эÑ.ПЌ, пеÑ.еÑ.ПЎОÑ.е к УÑ.ПкÑ. 2.3.
1316+
1317+
1318+
1319+
1320+
1321+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1322+ УÑ.Пк 2.3: Ð.Ð.Ð.АНÐ.Ы Ð. Ð.Ð.ЪÐ.Ð.ТЫ
1323+
1324+
1325+ ЀПÑ.ЌаÑ. кПЌаМЎÑ. `Ñ.ЎалеМОе' d Ñ.акПв:
1326+
1327+ [Ñ.ОслП] d ПбÑ.екÑ. Ð.Ð.Ð. d [Ñ.ОслП] ПбÑ.екÑ.
1328+ Ð.ЎесÑ.:
1329+ Ñ.ОслП - скПлÑ.кП Ñ.аз ОспПлМОÑ.Ñ. кПЌаМЎÑ. (МеПбязаÑ.елÑ.МП, пП Ñ.ЌПлÑ.аМОÑ.=1).
1330+ d - кПЌаМЎа Ñ.ЎалеМОя.
1331+ ПбÑ.екÑ. - с Ñ.еЌ кПЌаМЎа ЎПлжМа бÑ.Ñ.Ñ. вÑ.пПлМеМа (пеÑ.еÑ.ОслеМП МОже).
1332+
1333+ Ð.Ñ.аÑ.кОй спОсПк ПбÑ.екÑ.Пв:
1334+ w - ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а слПва, вклÑ.Ñ.ая завеÑ.Ñ.аÑ.Ñ.Ой пÑ.Пбел.
1335+ e - ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а слПва, НÐ. вклÑ.Ñ.ая завеÑ.Ñ.аÑ.Ñ.Ой пÑ.Пбел.
1336+ $ - ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а сÑ.Ñ.ПкО.
1337+ ^ - ПÑ. кÑ.Ñ.сПÑ.а ЎП МаÑ.ала сÑ.Ñ.ПкО.
1338+
1339+Ð.АÐ.Ð.ЧАНÐ.Ð.: Ð.Ñ.ПсÑ.Пе МажаÑ.Ое Ма сОЌвПл ПбÑ.екÑ.а в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode)
1340+ без ЎПпПлМОÑ.елÑ.ÐœÑ.Ñ. кПЌаМЎ пеÑ.еЎвОМеÑ. кÑ.Ñ.сПÑ. Ñ.ак, как Ñ.казаМП в
1341+ спОске ПбÑ.екÑ.Пв.
1342+
1343+
1344+
1345+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1346+ УÑ.Пк 2.4: Ð.СÐ.Ð.ЮЧÐ.НÐ.Ð. Ð.Ð. Ð.РАÐ.Ð.Ð.А `Ð.Ð.Ð.АНÐ.А-Ð.Ð.ЪÐ.Ð.Т'
1347+
1348+
1349+ ** НабеÑ.ОÑ.е dd Ўля Ñ.ЎалеМОя всей сÑ.Ñ.ПкО. **
1350+
1351+ Ð.слеЎсÑ.вОе Ñ.асÑ.ПгП пÑ.ОЌеМеМОя ПпеÑ.аÑ.ОО Ñ.ЎалеМОя всей сÑ.Ñ.ПкО, Ñ.азÑ.абПÑ.Ñ.ОкО
1352+ Vim Ñ.еÑ.ОлО, Ñ.Ñ.П Ўля эÑ.ПгП пÑ.ПÑ.е всегП пÑ.ПсÑ.П МабÑ.аÑ.Ñ. d ЎважЎÑ..
1353+
1354+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, кП вÑ.ПÑ.Пй сÑ.Ñ.Пке Ñ.Ñ.азÑ..
1355+ 2. НабеÑ.ОÑ.е dd Ўля Ñ.ЎалеМОя сÑ.Ñ.ПкО.
1356+ 3. ТепеÑ.Ñ. пеÑ.еЌесÑ.ОÑ.есÑ. к Ñ.еÑ.веÑ.Ñ.Пй сÑ.Ñ.Пке.
1357+ 4. НабеÑ.ОÑ.е 2dd (вспПЌМОÑ.е пÑ.авОлП `Ñ.ОслП-кПЌаМЎа-ПбÑ.екÑ.'), Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ.
1358+ Ўве сÑ.Ñ.ПкО.
1359+
1360+ 1) Ð.еÑ.ПЌ я Ñ.ПжÑ. Ма сÑ.аЎОПМ,
1361+ 2) Ð., как вМезапМП кПМÑ.Олся ЎОваМ!
1362+ 3) Я бПлеÑ. за ``Ð.еМОÑ.'', ``Ð.еМОÑ.'' --- Ñ.еЌпОПМ!
1363+ 4) Ð.еÑ.алÑ.МП я гляжÑ. Ма МаÑ.е пПкПлеМОе!
1364+ 5) Ð.гП гÑ.яЎÑ.Ñ.ее ОлÑ. пÑ.сÑ.П ОлÑ. Ñ.еЌМП...
1365+ 6) Я сОжÑ. Ма скаЌейке в лПже `Ð.'
1366+ 7) Ð. ОгÑ.аÑ. Ма бПлÑ.Ñ.Пй жесÑ.яМПй Ñ.Ñ.Ñ.бе.
1367+
1368+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1369+ УÑ.Пк 2.5: Ð.Ð.Ð.АНÐ.А `Ð.ТÐ.АТ'
1370+
1371+
1372+ ** НажЌОÑ.е u Ўля ПÑ.ЌеМÑ. Ñ.езÑ.лÑ.Ñ.аÑ.а Ñ.абПÑ.Ñ. пÑ.еЎÑ.ÐŽÑ.Ñ.ей кПЌаМЎÑ., U Ўля ПÑ.ЌеМÑ.
1373+ ОспÑ.авлеМОй вП всей сÑ.Ñ.Пке. **
1374+
1375+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй ---> О Ñ.сÑ.аМПвОÑ.е егП Ма
1376+ пеÑ.вÑ.Ñ. ПÑ.ОбкÑ..
1377+ 2. НажЌОÑ.е x Ўля Ñ.ЎалеМОя пеÑ.вПгП МепÑ.авОлÑ.МПгП сОЌвПла.
1378+ 3. ТепеÑ.Ñ. МажЌОÑ.е u Ўля ПÑ.ЌеМÑ. (ПÑ.каÑ.а) пПслеЎМей вÑ.пПлМеММПй кПЌаМЎÑ..
1379+ 4. Ð.спÑ.авÑ.Ñ.е все ПÑ.ОбкО в сÑ.Ñ.Пке, ОспПлÑ.зÑ.я кПЌаМЎÑ. x .
1380+ 5. ТепеÑ.Ñ. МажЌОÑ.е заглавМÑ.Ñ. U Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. веÑ.ÐœÑ.Ñ.Ñ. всÑ. сÑ.Ñ.ПкÑ. в ОсÑ.ПЎМПе
1381+ сПсÑ.ПяМОе.
1382+ 6. НажЌОÑ.е u МескПлÑ.кП Ñ.аз Ўля ПÑ.ЌеМÑ. кПЌаМЎÑ. U О пÑ.еЎÑ.ÐŽÑ.Ñ.ОÑ. кПЌаМЎ.
1383+ 7. НажЌОÑ.е Ñ.епеÑ.Ñ. CTRL-R (Ñ.ЎеÑ.жОвайÑ.е клавОÑ.Ñ. CTRL МажаÑ.Пй в ЌПЌеМÑ. МажаÑ.Оя
1384+ R) МескПлÑ.кП Ñ.аз Ўля вПзвÑ.аÑ.а кПЌаМЎ (ПÑ.каÑ. ПÑ.каÑ.а).
1385+
1386+---> Ð.спÑ.Ñ.авÑ.Ñ.е ППÑ.ОбкО в эÑ.Пйй сÑ.Ñ.Пке О веÑ.МОÑ.Ñ.е ОÑ. сс пПЌПÑ.Ñ.Ñ.Ñ. `ПÑ.каÑ.а'.
1387+
1388+ 8. ЭÑ.П бÑ.лО ПÑ.еМÑ. пПлезМÑ.е кПЌаМЎÑ.. Ð.алее пеÑ.еÑ.ПЎОÑ.е к РезÑ.Ќе УÑ.Пка 2.
1389+
1390+
1391+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1392+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 2
1393+
1394+
1395+ 1. Ð.ля Ñ.ЎалеМОя Ñ.ексÑ.а ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а слПва МабеÑ.ОÑ.е: dw
1396+
1397+ 2. Ð.ля Ñ.ЎалеМОя Ñ.ексÑ.а ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а сÑ.Ñ.ПкО МабеÑ.ОÑ.е: d$
1398+
1399+ 3. Ð.ля Ñ.ЎалеМОя всей сÑ.Ñ.ПкО МабеÑ.ОÑ.е: dd
1400+
1401+ 4. ЀПÑ.ЌаÑ. кПЌаМЎÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе ОЌееÑ. вОЎ:
1402+
1403+ [Ñ.ОслП] кПЌаМЎа ПбÑ.екÑ. Ð.Ð.Ð. кПЌаМЎа [Ñ.ОслП] ПбÑ.екÑ.
1404+ гЎе:
1405+ Ñ.ОслП - скПлÑ.кП Ñ.аз пПвÑ.ПÑ.ОÑ.Ñ. вÑ.пПлМеМОе кПЌаМЎÑ.
1406+ кПЌаМЎа - Ñ.Ñ.П вÑ.пПлМОÑ.Ñ., МапÑ.ОЌеÑ. d Ўля Ñ.ЎалеМОя
1407+ ПбÑ.екÑ. - Ма Ñ.Ñ.П ЎПлжМа вПзЎейсÑ.вПваÑ.Ñ. кПЌаМЎа, МапÑ.ОЌеÑ. w (слПвП),
1408+ $ (ЎП кПМÑ.а сÑ.Ñ.ПкО), О Ñ..ÐŽ.
1409+
1410+ 5. Ð.ля ПÑ.ЌеМÑ. (ПÑ.каÑ.а) пÑ.еЎÑ.есÑ.вÑ.Ñ.Ñ.ОÑ. ЎейсÑ.вОй МабеÑ.ОÑ.е: u (сÑ.Ñ.ПÑ.Мая u)
1411+ Ð.ля ПÑ.ЌеМÑ. (ПÑ.каÑ.а) всеÑ. ОзЌеМеМОй в сÑ.Ñ.Пке МабеÑ.ОÑ.е: U (пÑ.ПпОсМая U)
1412+ Ð.ля ПÑ.ЌеМÑ. ПÑ.каÑ.а МабеÑ.ОÑ.е: CTRL-R
1413+
1414+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1415+ УÑ.Пк 3.1: Ð.Ð.Ð.АНÐ.А Ð.СТАÐ.Ð.Ð.
1416+
1417+
1418+ ** НабеÑ.ОÑ.е p Ўля всÑ.авкО пПслеЎМегП Ñ.ЎалеММПгП Ñ.ексÑ.а пПсле кÑ.Ñ.сПÑ.а. **
1419+
1420+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз к пПслеЎМей сÑ.Ñ.Пке Оз МабПÑ.а.
1421+
1422+ 2. НабеÑ.ОÑ.е dd Ўля Ñ.ЎалеМОя сÑ.Ñ.ПкО О ее сПÑ.Ñ.аМеМОя в бÑ.Ñ.еÑ.е Vim'а.
1423+
1424+ 3. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к сÑ.Ñ.Пке НАÐ. Ñ.еЌ ЌесÑ.ПЌ, кÑ.Ўа слеЎÑ.еÑ. всÑ.авОÑ.Ñ.
1425+ Ñ.ЎалеММÑ.Ñ. сÑ.Ñ.ПкÑ..
1426+
1427+ 4. НаÑ.ПЎясÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе МабеÑ.ОÑ.е p Ўля заЌеМÑ. сÑ.Ñ.ПкО.
1428+
1429+ 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4, пПка Ме Ñ.ассÑ.авОÑ.е все сÑ.Ñ.ПкО в ÐœÑ.жМПЌ пПÑ.яЎке.
1430+
1431+ г) Ð. лÑ.Ñ.Ñ.е вÑ.ÐŽÑ.ЌаÑ.Ñ. Ме ЌПг.
1432+ б) Ð.ПгЎа Ме в Ñ.Ñ.Ñ.кÑ. заМеЌПг,
1433+ в) Ð.Ðœ Ñ.важаÑ.Ñ. себя засÑ.авОл
1434+ а) Ð.Пй ЎяЎя саЌÑ.Ñ. Ñ.есÑ.ÐœÑ.Ñ. пÑ.авОл
1435+
1436+
1437+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1438+ УÑ.Пк 3.2: Ð.Ð.Ð.АНÐ.А Ð.АÐ.Ð.НЫ
1439+
1440+
1441+ ** НабеÑ.ОÑ.е r О сОЌвПл, заЌеМяÑ.Ñ.Ой сОЌвПл пПЎ кÑ.Ñ.сПÑ.ПЌ. **
1442+
1443+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1444+
1445+ 2. УсÑ.аМПвОÑ.е кÑ.Ñ.сПÑ. Ñ.ак, Ñ.Ñ.ПбÑ. ПМ МаÑ.ПЎОлся МаЎ пеÑ.вПй ПÑ.ОбкПй.
1446+
1447+ 3. НабеÑ.ОÑ.е r О заÑ.еЌ сОЌвПл, ОспÑ.авляÑ.Ñ.Ой ПÑ.ОбкÑ..
1448+
1449+ 4. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2 О 3, пПка пеÑ.вая сÑ.Ñ.Пка Ме бÑ.ЎеÑ. ОспÑ.авлеМа.
1450+
1451+---> Ð. ЌПЌегÑ. МабÑ.Ñ.а эÑ.Пй Ñ.Ñ.Ñ.ПкО кПе0кÑ.П с Ñ.Ñ.Ñ.ЎПЌ пПпвЎал пП клваОÑ.аЌ!
1452+---> Ð. ЌПЌеМÑ. МабПÑ.а эÑ.Пй сÑ.Ñ.ПкО кПе-кÑ.П с Ñ.Ñ.Ñ.ЎПЌ пПпаЎал пП клавОÑ.аЌ!
1453+
1454+ 5. ТепеÑ.Ñ. пеÑ.еÑ.ПЎОÑ.е к УÑ.ПкÑ. 3.2.
1455+
1456+Ð.АÐ.Ð.ЧАНÐ.Ð.: Ð.ПЌМОÑ.е, Ñ.Ñ.П вÑ. ЎПлжМÑ. Ñ.Ñ.ОÑ.Ñ.ся в пÑ.ПÑ.ессе Ñ.абПÑ.Ñ., а Ме пÑ.ПсÑ.П
1457+ запПЌОМая.
1458+
1459+
1460+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1461+ УÑ.Пк 3.3: Ð.Ð.Ð.АНÐ.А Ð.Ð.Ð.Ð.НÐ.НÐ.Я
1462+
1463+
1464+ ** Ð.ля ОзЌеМеМОя Ñ.асÑ.О слПва МабеÑ.ОÑ.е cw . **
1465+
1466+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1467+
1468+ 2. РаспПлПжОÑ.е кÑ.Ñ.сПÑ. МаЎ бÑ.квПй `o' в слПве `сПла'.
1469+
1470+ 3. НабеÑ.ОÑ.е cw О ОспÑ.авÑ.Ñ.е слПвП (в ЎаММПЌ слÑ.Ñ.ае, МабеÑ.ОÑ.е `лПв'.)
1471+
1472+ 4. НажЌОÑ.е <ESC> О пеÑ.еÑ.ПЎОÑ.е к слеЎÑ.Ñ.Ñ.ей ПÑ.Обке (к пеÑ.вПЌÑ. сОЌвПлÑ., кПÑ.ПÑ.Ñ.й
1473+ МаЎП ОзЌеМОÑ.Ñ..)
1474+
1475+ 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 3--4 пПка пеÑ.вПе пÑ.еЎлПжеМОе Ме сÑ.аМеÑ. ОЎеМÑ.ОÑ.ÐœÑ.ÐŒ вÑ.ПÑ.ПЌÑ..
1476+
1477+---> НескПлÑ.кП сПла в эÑ.гÑ. сÑ.Ñ.Пке Ñ.пгÑ.Ñ.бÑ. Ñ.еЎалзкÑ.Ñ.ОесвÑ..
1478+---> НескПлÑ.кП слПв в эÑ.Пй сÑ.Ñ.Пке Ñ.Ñ.ебÑ.Ñ.Ñ. Ñ.еЎакÑ.ОÑ.ПваМОя.
1479+
1480+Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе, Ñ.Ñ.П cw Ме Ñ.ПлÑ.кП заЌеМяеÑ. слПвП, МП О пеÑ.евПЎОÑ. вас в Ñ.ежОЌ
1481+всÑ.авкО.
1482+
1483+
1484+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1485+ УÑ.Пк 3.4: Ð.Ð Ð.Ð.Ð.Ð.Ð.АÐ.Ð. Ð.Ð.Ð.Ð.НЯТЬ С Ð.Ð.Ð.АНÐ.Ð.Ð. c
1486+
1487+
1488+** Ð.ПЌаМЎа заЌеМÑ. ОспПлÑ.зÑ.еÑ.ся с Ñ.еЌО же ПбÑ.екÑ.аЌО, Ñ.Ñ.П О кПЌаМЎа Ñ.ЎалеМОя. **
1489+
1490+ 1. Ð.ПЌаМЎа ОзЌеМеМОя пÑ.ОЌеМяеÑ.ся Ñ.акОЌ же ПбÑ.азПЌ, как О кПЌаМЎа Ñ.ЎалеМОя.
1491+ Ð.е Ñ.ПÑ.ЌаÑ. Ñ.акПв:
1492+
1493+ [Ñ.ОслП] c ПбÑ.екÑ. Ð.Ð.Ð. c [Ñ.ОслП] ПбÑ.екÑ.
1494+
1495+ 2. Ð.бÑ.екÑ.Ñ. Ñ.акже сПвпаЎаÑ.Ñ.: w (слПвП), $ (кПМеÑ. сÑ.Ñ.ПкО) О Ñ..п.
1496+
1497+ 3. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1498+
1499+ 4. Ð.еÑ.ейЎОÑ.е к пеÑ.вПй ПÑ.Обке.
1500+
1501+ 5. НабеÑ.ОÑ.е c$ О ПÑ.Ñ.еЎакÑ.ОÑ.Ñ.йÑ.е пеÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ. Ñ.ак, Ñ.Ñ.ПбÑ. ПМа сПвпаЎала сП
1502+ вÑ.ПÑ.Пй, пПсле Ñ.егП МажЌОÑ.е <ESC>.
1503+
1504+---> Ð.ПМеÑ. эÑ.Пй сÑ.Ñ.ПкО ÐœÑ.жЎаеÑ.ся в пПЌПÑ.О, Ñ.Ñ.ПбÑ. сÑ.аÑ.Ñ. пПÑ.ПжОЌ Ма вÑ.ПÑ.Пй.
1505+---> Ð.ПМеÑ. эÑ.Пй сÑ.Ñ.ПкО ÐœÑ.жЎаеÑ.ся в пПЌПÑ.О кПЌаМЎÑ. c$ .
1506+
1507+
1508+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1509+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 3
1510+
1511+
1512+ 1. Ð.ля всÑ.авкО Ñ.ексÑ.а, кПÑ.ПÑ.Ñ.й Ñ.ПлÑ.кП Ñ.Ñ.П бÑ.л Ñ.ЎалеМ, МабеÑ.ОÑ.е p . ЭÑ.а
1513+ кПЌаМЎа всÑ.авОÑ. Ñ.ЎалеММÑ.й Ñ.ексÑ. Ð.Ð.СÐ.Ð. кÑ.Ñ.сПÑ.а (еслО бÑ.ла Ñ.ЎалеМа сÑ.Ñ.Пка,
1514+ Ñ.П ПМа бÑ.ЎеÑ. пПЌеÑ.еМа в сÑ.Ñ.Пке пПЎ кÑ.Ñ.сПÑ.ПЌ).
1515+
1516+ 2. Ð.ля заЌеМÑ. сОЌвПла пПЎ кÑ.Ñ.сПÑ.ПЌ МабеÑ.ОÑ.е r О заÑ.еЌ заЌеМяÑ.Ñ.Ой сОЌвПл.
1517+
1518+ 3. Ð.ПЌаМЎа ОзЌеМеМОя пПзвПляеÑ. Ð.аЌ ОзЌеМОÑ.Ñ. Ñ.казаММÑ.й ПбÑ.екÑ. ПÑ. кÑ.Ñ.сПÑ.а ЎП
1519+ кПМÑ.а эÑ.ПгП ПбÑ.екÑ.а. НапÑ.ОЌеÑ., МабеÑ.ОÑ.е cw Ўля заЌеМÑ. ПÑ. кÑ.Ñ.сПÑ.а ЎП
1520+ кПМÑ.а слПва, c$ Ўля ОзЌеМеМОя ЎП кПМÑ.а сÑ.Ñ.ПкО.
1521+
1522+ 4. ЀПÑ.ЌаÑ. кПЌаМЎÑ. ОзЌеМеМОя Ñ.акПв:
1523+
1524+ [Ñ.ОслП] c ПбÑ.екÑ. Ð.Ð.Ð. c [Ñ.ОслП] ПбÑ.екÑ.
1525+
1526+ТепеÑ.Ñ. ПÑ.пÑ.авляйÑ.есÑ. к слеЎÑ.Ñ.Ñ.еЌÑ. Ñ.Ñ.ПкÑ..
1527+
1528+
1529+
1530+
1531+
1532+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1533+ УÑ.Пк 4.1: Ð.НЀÐ.Ð Ð.АЊÐ.Я Ð. ЀАÐ.Ð.Ð. Ð. РАСÐ.Ð.Ð.Ð.Ð.Ð.НÐ.Ð. Ð. НÐ.Ð.
1534+
1535+
1536+ ** НабеÑ.ОÑ.е CTRL-g Ñ.Ñ.ПбÑ. Ñ.вОЎеÑ.Ñ. Ð.аÑ.е ЌесÑ.ПÑ.аспПлПжеМОе в Ñ.айле О ОМÑ.ПÑ.ЌаÑ.ОÑ.
1537+ П МеЌ.
1538+ НабеÑ.ОÑ.е SHIFT-G Ўля пеÑ.еЌеÑ.еМОя к заЎаММПй сÑ.Ñ.Пке в Ñ.айле. **
1539+
1540+ Ð.аЌеÑ.аМОе: Ð.Ñ.ПÑ.ОÑ.айÑ.е весÑ. Ñ.Ñ.Пк пÑ.ежЎе Ñ.еЌ вÑ.пПлМяÑ.Ñ. лÑ.бÑ.е кПЌаМЎÑ.!!
1541+
1542+ 1. УЎеÑ.жОвая клавОÑ.Ñ. Ctrl МажЌОÑ.е g . Ð.МОзÑ. экÑ.аМа пПявОÑ.ся сÑ.Ñ.Пка сÑ.аÑ.Ñ.са с
1543+ ОЌеМеЌ Ñ.айла О МПЌеÑ.ПЌ сÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй Ð.Ñ. МаÑ.ПЎОÑ.есÑ.. Ð.апПЌМОÑ.е МПЌеÑ.
1544+ сÑ.Ñ.ПкО, ПМ пПÑ.Ñ.ебÑ.еÑ.ся Ма Каге 3.
1545+
1546+ 2. НажЌОÑ.е shift-G Ўля пеÑ.еЌеÑ.еМОя к кПМÑ.Ñ. Ñ.айла.
1547+
1548+ 3. НабеÑ.ОÑ.е МПЌеÑ. сÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй вÑ. МаÑ.ПЎОлОсÑ. О заÑ.еЌ shift-G. ЭÑ.П
1549+ веÑ.МеÑ. Ð.ас к сÑ.Ñ.Пке, в кПÑ.ПÑ.Пй Ð.Ñ. бÑ.лО, кПгЎа в пеÑ.вÑ.й Ñ.аз МажалО Ctrl-g.
1550+ (Ð.ПгЎа Ð.Ñ. бÑ.ЎеÑ.е МабОÑ.аÑ.Ñ. Ñ.ОÑ.Ñ.Ñ., ПМО НÐ. ПÑ.ПбÑ.азяÑ.ся Ма экÑ.аМе.)
1551+
1552+ 4. Ð.слО Ð.Ñ. запПЌМОлО все вÑ.Ñ.есказаММПе, вÑ.пПлМОÑ.е Ñ.агО 1--3.
1553+
1554+
1555+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1556+ УÑ.Пк 4.2: Ð.Ð.Ð.АНÐ.А Ð.Ð.Ð.СÐ.А
1557+
1558+ ** НабеÑ.ОÑ.е / О заÑ.еЌ ввеЎОÑ.е ОскПЌÑ.Ñ. Ñ.Ñ.азÑ.. **
1559+
1560+ 1. Ð. ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode) МабеÑ.ОÑ.е сОЌвПл / . Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе,
1561+ Ñ.Ñ.П ПМ вЌесÑ.е с кÑ.Ñ.сПÑ.ПЌ пПявОÑ.ся вМОзÑ. экÑ.аМа, как эÑ.П пÑ.ПОсÑ.ПЎОÑ. с
1562+ кПЌаМЎПй : .
1563+
1564+ 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е 'ПÑ.Ñ.Ñ.Обка' <ENTER>. ЭÑ.П Ñ.П слПвП, кПÑ.ПÑ.Пе Ð.Ñ. бÑ.ЎеÑ.е
1565+ ОскаÑ.Ñ..
1566+
1567+ 3. Ð.ля Ñ.ПгП, Ñ.Ñ.ПбÑ. пПвÑ.ПÑ.ОÑ.Ñ. пПОск, пÑ.ПсÑ.П МажЌОÑ.е n .
1568+ Ð.ля пПОска эÑ.Пй Ñ.Ñ.азÑ. в ПбÑ.аÑ.МПЌ МапÑ.авлеМОО, МажЌОÑ.е Shift-N .
1569+
1570+ 4. Ð.слО Ð.Ñ. желаеÑ.е сÑ.азÑ. ОскаÑ.Ñ. в ПбÑ.аÑ.МПЌ МапÑ.авлеМОО, ОспПлÑ.зÑ.йÑ.е
1571+ кПЌаМЎÑ. ? вЌесÑ.П / .
1572+
1573+---> Ð.ПгЎа Ð.Ñ. пÑ.О пПОске ЎПсÑ.ОгМеÑ.е кПМÑ.а Ñ.айла, пПОск бÑ.ЎеÑ. пÑ.ПЎПлжеМ с
1574+ МаÑ.ала.
1575+
1576+ "ПÑ.Ñ.Ñ.Обка" эÑ.П Ме спПсПб пÑ.ПОзМесеМОя слПва `ПÑ.Обка'; ПÑ.Ñ.Ñ.Обка эÑ.П ПÑ.Обка.
1577+
1578+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1579+ УÑ.Пк 4.3: Ð.Ð.Ð.СÐ. Ð.АРНЫХ СÐ.Ð.Ð.Ð.Ð.
1580+
1581+
1582+ ** НабеÑ.ОÑ.е % Ўля пПОска паÑ.ÐœÑ.Ñ. ),] ОлО } . **
1583+
1584+ 1. Ð.ПЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. МаЎ лÑ.бПй Оз (, [ ОлО { в сÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->.
1585+
1586+ 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е сОЌвПл % .
1587+
1588+ 3. Ð.Ñ.Ñ.сПÑ. ЎПлжеМ пеÑ.ескПÑ.ОÑ.Ñ. Ма паÑ.ÐœÑ.Ñ. скПбкÑ..
1589+
1590+ 4. НабеÑ.ОÑ.е % Ўля вПзвÑ.аÑ.а кÑ.Ñ.сПÑ.а МазаЎ к пеÑ.вПй скПбке.
1591+
1592+---> ЭÑ.П ( сÑ.Ñ.Пка, сПЎеÑ.жаÑ.ая Ñ.акОе (, Ñ.акОе [ ] О Ñ.акОе { } скПбкО. ))
1593+
1594+Ð.аЌеÑ.аМОе: ЭÑ.П ПÑ.еМÑ. Ñ.ЎПбМП пÑ.О ПÑ.лаЎке пÑ.ПгÑ.аЌЌ с пÑ.ПпÑ.Ñ.еММÑ.ЌО скПбкаЌО!
1595+
1596+
1597+
1598+
1599+
1600+
1601+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1602+ УÑ.Пк 4.4: СÐ.Ð.СÐ.Ð. Ð.СÐ.РАÐ.Ð.Ð.НÐ.Я Ð.КÐ.Ð.Ð.Ð.
1603+
1604+
1605+ ** НабеÑ.ОÑ.е :s/бÑ.лП/сÑ.алП/g Ўля заЌеМÑ. 'бÑ.лП' Ма 'сÑ.алП'. **
1606+
1607+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1608+
1609+ 2. НабеÑ.ОÑ.е :s/Ñ.вПЎÑ./Ñ.вПжÑ. <ENTER> . Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе Ма Ñ.П, Ñ.Ñ.П эÑ.а кПЌаМЎа
1610+ заЌеМОÑ. Ñ.ПлÑ.кП пеÑ.вПе МайЎеММПе вÑ.ПжЎеМОе в сÑ.Ñ.Пке.
1611+
1612+ 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е :s/Ñ.вПЎÑ./Ñ.вПжÑ./g , ПзМаÑ.аÑ.Ñ.ее пПЎсÑ.аМПвкÑ. глПбалÑ.МП вП
1613+ всей сÑ.Ñ.Пке. ЭÑ.П заЌеМОÑ. все МайЎеММÑ.е в сÑ.Ñ.Пке вÑ.ПжЎеМОя.
1614+
1615+---> Я Ñ.вПЎÑ. к ПÑ.веÑ.жеММÑ.ÐŒ селеМÑ.яЌ, я Ñ.вПЎÑ. сквПзÑ. векПвеÑ.ÐœÑ.й сÑ.ПМ, я Ñ.вПЎÑ. к
1616+ забÑ.Ñ.Ñ.ÐŒ пПкПлеМÑ.яЌ.
1617+
1618+ 4. Ð.ля заЌеМÑ. всеÑ. вÑ.ПжЎеМОй пПслеЎПваÑ.елÑ.МПсÑ.О сОЌвПлПв ЌежЎÑ. ЎвÑ.Ќя
1619+ сÑ.Ñ.ПкаЌО,
1620+ МабеÑ.ОÑ.е :#,#s/бÑ.лП/сÑ.алП/g гЎе #,# --- МПЌеÑ.а эÑ.ОÑ. сÑ.Ñ.Пк.
1621+ НабеÑ.ОÑ.е :%s/бÑ.лП/сÑ.алП/g Ўля заЌеМÑ. всеÑ. вÑ.ПжЎеМОй вП всеЌ Ñ.айле.
1622+
1623+
1624+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1625+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 4
1626+ 1. Ctrl-g пПказÑ.ваеÑ. ваÑ.е пПлПжеМОе в Ñ.айле О ОМÑ.ПÑ.ЌаÑ.ОÑ. П МеЌ.
1627+ Shift-G пеÑ.еЌеÑ.аеÑ. Ð.ас в кПМеÑ. Ñ.айла. НПЌеÑ., за кПÑ.ПÑ.Ñ.ÐŒ слеЎÑ.еÑ. Shift-G
1628+ пПзвПляеÑ. пеÑ.ейÑ.О к сÑ.Ñ.Пке с эÑ.ОЌ МПЌеÑ.ПЌ.
1629+
1630+ 2. НажаÑ.Ое / О заÑ.еЌ ввПЎ сÑ.Ñ.ПкО пПзвПляеÑ. пÑ.ПОзвесÑ.О пПОск эÑ.Пй сÑ.Ñ.ПкО
1631+ Ð.Ð.Ð.Ð Ð.Ð. пП Ñ.ексÑ.Ñ..
1632+ НажаÑ.Ое ? О заÑ.еЌ ввПЎ сÑ.Ñ.ПкО пПзвПляеÑ. пÑ.ПОзвесÑ.О пПОск эÑ.Пй сÑ.Ñ.ПкО
1633+ НАÐ.АÐ. пП Ñ.ексÑ.Ñ..
1634+ Ð.Псле пПОска МабеÑ.ОÑ.е n Ўля пеÑ.еÑ.ПЎа к слеЎÑ.Ñ.Ñ.еЌÑ. вÑ.ПжЎеМОÑ. ОскПЌПй
1635+ сÑ.Ñ.ПкО в Ñ.ПЌ же МапÑ.авлеМОО ОлО Shift-N Ўля пеÑ.еÑ.ПЎа в пÑ.ПÑ.ОвПпПлПжМПЌ
1636+ МапÑ.авлеМОО.
1637+
1638+ 3. НажаÑ.Ое % , кПгЎа кÑ.Ñ.сПÑ. МаÑ.ПЎОÑ.ся Ма (,),[,],{, ОлО } пПзвПляеÑ. МайÑ.О
1639+ паÑ.ÐœÑ.Ñ. скПбкÑ..
1640+
1641+ 4. Ð.ля пПЎсÑ.аМПвкО `сÑ.алП' вЌесÑ.П пеÑ.вПгП `бÑ.лП' в сÑ.Ñ.Пке, МабеÑ.ОÑ.е
1642+ :s/old/new
1643+ Ð.ля пПЎсÑ.аМПвкО `сÑ.алП' вЌесÑ.П всеÑ. `бÑ.лП' в сÑ.Ñ.Пке, МабеÑ.ОÑ.е
1644+ :s/old/new/g
1645+ Ð.ля заЌеМÑ. в ОМÑ.еÑ.вале ЌежЎÑ. ЎвÑ.Ќя сÑ.Ñ.ПкаЌО, МабеÑ.ОÑ.е
1646+ :#,#s/old/new/g
1647+ Ð.ля заЌеМÑ. всеÑ. вÑ.ПжЎеМОй `бÑ.лП' Ма `сÑ.алП' в Ñ.айле, МабеÑ.ОÑ.е
1648+ :%s/old/new/g
1649+ ЧÑ.ПбÑ. Ñ.еЎакÑ.ПÑ. кажЎÑ.й Ñ.аз запÑ.аÑ.Овал пПЎÑ.веÑ.жЎеМОе, ЎПбавÑ.Ñ.е 'c'
1650+ :%s/old/new/gc
1651+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1652+ УÑ.Пк 5.1: Ð.АÐ. Ð.ЫÐ.Ð.Ð.НÐ.ТЬ Ð.НÐ.КНЮЮ Ð.Ð.Ð.АНÐ.У
1653+
1654+
1655+ ** НабеÑ.ОÑ.е :! О заÑ.еЌ вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ., кПÑ.ПÑ.Ñ.Ñ. слеЎÑ.еÑ. вÑ.пПлМОÑ.Ñ.. **
1656+
1657+ 1. НабеÑ.ОÑ.е Ñ.же зМакПЌÑ.Ñ. Ð.аЌ кПЌаМЎÑ. : Ўля Ñ.сÑ.аМПвкО кÑ.Ñ.сПÑ.а в кПЌаМЎМÑ.Ñ.
1658+ сÑ.Ñ.ПкÑ. Ñ.еЎакÑ.ПÑ.а. ЭÑ.П пПзвПлОÑ. Ð.аЌ ввесÑ.О кПЌаМЎÑ..
1659+
1660+ 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е сОЌвПл ! (вПсклОÑ.аÑ.елÑ.ÐœÑ.й зМак). ТепеÑ.Ñ. ЌПжМП ОспПлМОÑ.Ñ.
1661+ вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ., ОспПлÑ.зÑ.я кПЌаМЎМÑ.Ñ. ПбПлПÑ.кÑ..
1662+
1663+ 3. Ð.ля пÑ.ОЌеÑ.а МабеÑ.ОÑ.е ls пПсле ! О МажЌОÑ.е <ENTER>. ЭÑ.а кПЌаМЎа вÑ.веЎеÑ.
1664+ спОсПк Ñ.айлПв в Ñ.екÑ.Ñ.еЌ каÑ.алПге, Ñ.ПÑ.МП Ñ.акже, как еслО бÑ. Ð.Ñ. ввелО эÑ.Ñ.
1665+ кПЌаМЎÑ. в пÑ.ОглаÑ.еМОО ПбПлПÑ.кО. Ð.лО пПпÑ.ПбÑ.йÑ.е :!dir , еслО пÑ.еЎÑ.ÐŽÑ.Ñ.ая
1666+ кПЌаМЎа Ме сÑ.абПÑ.ала.
1667+
1668+---> Ð.аЌеÑ.аМОе: ТакОЌ спПсПбПЌ ЌПжМП вÑ.пПлМОÑ.Ñ. лÑ.бÑ.Ñ. вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ..
1669+
1670+---> Ð.аЌеÑ.аМОе: Ð.се кПЌаМЎÑ., МаÑ.ОМаÑ.Ñ.Оеся с : , ЎПлжМÑ. завеÑ.Ñ.аÑ.Ñ.ся МажаÑ.ОеЌ
1671+ <ENTER>.
1672+
1673+
1674+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1675+ УÑ.Пк 5.2: Ð.АÐ. Ð.АÐ.Ð.САТЬ ЀАÐ.Ð.
1676+
1677+
1678+** Ð.ля сПÑ.Ñ.аМеМОя ОзЌеМеМОй, пÑ.ПОзвеЎеММÑ.Ñ. в Ñ.айле, МабеÑ.ОÑ.е :w Ð.Ð.Я_ЀАÐ.Ð.А. **
1679+
1680+ 1. НабеÑ.ОÑ.е :!dir ОлО :!ls Ўля пПлÑ.Ñ.еМОя спОска Ñ.айлПв в Ñ.екÑ.Ñ.еЌ каÑ.алПге.
1681+ Ð.ак Ð.аЌ Ñ.же ОзвесÑ.МП, Ð.Ñ. ЎПлжМÑ. МажаÑ.Ñ. <ENTER> пПсле ввПЎа эÑ.ОÑ. кПЌаМЎ.
1682+
1683+ 2. Ð.Ñ.ОЎÑ.ЌайÑ.е МазваМОе Ўля Ñ.айла, кПÑ.ПÑ.Пе еÑ.е Ме сÑ.Ñ.есÑ.вÑ.еÑ., МапÑ.ОЌеÑ. TEST.
1684+
1685+ 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е :w TEST (гЎе TEST --- эÑ.П ОЌя Ñ.айла, пÑ.ОЎÑ.ЌаММПе Ð.аЌО.)
1686+
1687+ 4. ЭÑ.а кПЌаМЎа сПÑ.Ñ.аМОÑ. весÑ. Ñ.айл (УÑ.ебМОк пП Vim) пПЎ ОЌеМеЌ TEST. ЧÑ.ПбÑ.
1688+ Ñ.ЎПсÑ.ПвеÑ.ОÑ.Ñ.ся в эÑ.ПЌ, сМПва МабеÑ.ОÑ.е :!dir О пÑ.ПсЌПÑ.Ñ.ОÑ.е каÑ.алПг.
1689+
1690+---> Ð.аЌеÑ.Ñ.Ñ.е, Ñ.Ñ.П еслО Ð.Ñ. вÑ.йЎеÑ.е Оз Vim О заÑ.еЌ запÑ.сÑ.ОÑ.е егП сМПва с
1691+ Ñ.айлПЌ TEST, эÑ.ПÑ. Ñ.айл бÑ.ЎеÑ. Ñ.ПÑ.МПй кПпОей Ñ.Ñ.ебМОка в Ñ.ПÑ. ЌПЌеМÑ., кПгЎа
1692+ Ð.Ñ. егП сПÑ.Ñ.аМОлО.
1693+
1694+ 5. ТепеÑ.Ñ. Ñ.ЎалОÑ.е эÑ.ПÑ. Ñ.айл, МабÑ.ав :!del TEST
1695+
1696+
1697+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1698+ УÑ.Пк 5.3: Ð.ЫÐ.Ð.Ð Ð.ЧНÐ.Ð. СÐ.ХРАНÐ.НÐ.Ð.
1699+
1700+
1701+ ** Ð.ля сПÑ.Ñ.аМеМОя Ñ.асÑ.О Ñ.айла, МабеÑ.ОÑ.е :#,# w Ð.Ð.Я_ЀАÐ.Ð.А **
1702+
1703+ 1. Ð.Ñ.е Ñ.аз МабеÑ.ОÑ.е :!dir ОлО :!ls Ўля пПлÑ.Ñ.еМОя спОска Ñ.айлПв в Ñ.екÑ.Ñ.еЌ
1704+ каÑ.алПге О вÑ.беÑ.ОÑ.е пПЎÑ.ПЎяÑ.ее ОЌя, МапÑ.ОЌеÑ. TEST.
1705+
1706+ 2. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к МаÑ.алÑ. эÑ.Пй сÑ.Ñ.аМОÑ.Ñ. О МажЌОÑ.е Ctrl-g Ўля МаÑ.ПжЎеМОя
1707+ МПЌеÑ.а сÑ.Ñ.ПкОto. Ð.АÐ.Ð.Ð.НÐ.ТÐ. ЭТÐ.Т НÐ.Ð.Ð.Ð !
1708+
1709+ 3. ТепеÑ.Ñ. пеÑ.еЌесÑ.ОÑ.есÑ. в кПМеÑ. сÑ.Ñ.аМОÑ.Ñ. О вМПвÑ. МабеÑ.ОÑ.е Ctrl-g. Ð.АÐ.Ð.Ð.НÐ.ТÐ.
1710+ Ð. ЭТÐ.Т НÐ.Ð.Ð.РТÐ.Ð.Ð.!
1711+
1712+ 4. Ð.ля сПÑ.Ñ.аМеМОя ТÐ.Ð.ЬÐ.Ð. ЧАСТÐ. Ñ.айла МабеÑ.ОÑ.е :#,# w TEST , гЎе #,# --- эÑ.П
1713+ МПЌеÑ.а, кПÑ.ПÑ.Ñ.е Ð.Ñ. запПЌМОлО (МаÑ.алП, кПМеÑ.), а TEST --- ОЌя ваÑ.егП Ñ.айла.
1714+
1715+ 5. Ð.ак О пÑ.ежЎе, Ñ.беЎОÑ.есÑ. в МалОÑ.ОО эÑ.ПгП Ñ.айла кПЌаМЎПй :!dir , МП НÐ.
1716+ УÐ.АÐ.ЯÐ.ТÐ. егП.
1717+
1718+
1719+
1720+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1721+ УÑ.Пк 5.4: ЧТÐ.НÐ.Ð. Ð. Ð.Ð.ЪÐ.Ð.Ð.НÐ.НÐ.Ð. ЀАÐ.Ð.Ð.Ð.
1722+
1723+ ** Ð.ля всÑ.авкО сПЎеÑ.жОЌПгП Ñ.айла, МабеÑ.ОÑ.е :r FILENAME **
1724+
1725+ 1. НабеÑ.ОÑ.е :!dir Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.беЎОÑ.Ñ.ся в Ñ.ПЌ, Ñ.Ñ.П Ñ.айл TEST все еÑ.е
1726+ сÑ.Ñ.есÑ.вÑ.еÑ..
1727+
1728+ 2. УсÑ.аМПвОÑ.е кÑ.Ñ.сПÑ. в веÑ.Ñ.Мей Ñ.асÑ.О эÑ.Пй сÑ.Ñ.аМОÑ.Ñ..
1729+
1730+Ð.аЌеÑ.аМОе: Ð.Псле вÑ.пПлМеМОя Ñ.ага 3 Ð.Ñ. Ñ.вОЎОÑ.е УÑ.Пк 5.3. Ð.Псле эÑ.ПгП
1731+ пеÑ.еЌеÑ.айÑ.есÑ. Ð.НÐ.Ð., сМПва к эÑ.ПЌÑ. Ñ.Ñ.ПкÑ..
1732+
1733+ 3. ТепеÑ.Ñ. пÑ.ПÑ.ОÑ.айÑ.е Ð.аÑ. Ñ.айл TEST, ОспПлÑ.зÑ.я кПЌаМЎÑ. :r TEST , гЎе
1734+ TEST --- эÑ.П ОЌя Ñ.айла.
1735+
1736+Ð.аЌеÑ.аМОе: Ð.Ñ.ПÑ.ОÑ.аММÑ.й Ð.аЌО Ñ.айл бÑ.ЎеÑ. всÑ.авлеМ в Ñ.ПЌ ЌесÑ.е, гЎе МаÑ.ПЎОÑ.ся
1737+ кÑ.Ñ.сПÑ..
1738+
1739+ 4. ЧÑ.ПбÑ. Ñ.беЎОÑ.Ñ.ся в Ñ.ПЌ, Ñ.Ñ.П Ñ.айл пÑ.ПÑ.ОÑ.аМ, пеÑ.еЌесÑ.ОÑ.есÑ. МеЌМПгП МазаЎ пП
1740+ Ñ.ексÑ.Ñ. О заЌеÑ.Ñ.Ñ.е, Ñ.Ñ.П Ñ.епеÑ.Ñ. сÑ.Ñ.есÑ.вÑ.Ñ.Ñ. Ўве кПпОО УÑ.Пка 5.3, ОсÑ.ПЎМая
1741+ О пПлÑ.Ñ.еММая Оз Ñ.айла.
1742+
1743+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1744+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 5
1745+
1746+
1747+ 1. :!кПЌаМЎа ОспПлМяеÑ. вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ..
1748+
1749+ НекПÑ.ПÑ.Ñ.е пПлезМÑ.е пÑ.ОЌеÑ.Ñ.:
1750+ :!dir --- вÑ.вПЎОÑ. спОсПк Ñ.айлПв в каÑ.алПге.
1751+ :!del FILENAME --- Ñ.ЎаляеÑ. Ñ.айл FILENAME.
1752+
1753+ 2. :w FILENAME запОсÑ.ваеÑ. Ñ.екÑ.Ñ.Ой Ñ.еЎакÑ.ОÑ.Ñ.еЌÑ.й Ñ.айл Ма ЎОск
1754+ пПЎ ОЌеМеЌ FILENAME.
1755+
1756+ 3. :#,#w FILENAME сПÑ.Ñ.аМяеÑ. сÑ.Ñ.ПкО ПÑ. # ЎП # в Ñ.айл FILENAME.
1757+
1758+ 4. :r FILENAME сÑ.ОÑ.Ñ.ваеÑ. с ЎОска Ñ.айл FILENAME О пПЌеÑ.аеÑ. егП в Ñ.екÑ.Ñ.Ой
1759+ Ñ.айл слеЎПЌ за пПзОÑ.Оей кÑ.Ñ.сПÑ.а.
1760+
1761+
1762+
1763+
1764+
1765+
1766+
1767+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1768+ УÑ.Пк 6.1: Ð.Ð.Ð.АНÐ.А СÐ.Ð.Ð.АНÐ.Я
1769+
1770+
1771+ ** НабеÑ.ОÑ.е o Ñ.Ñ.ПбÑ. сПзЎаÑ.Ñ. пÑ.сÑ.Ñ.Ñ. сÑ.Ñ.ПкÑ. пПЎ кÑ.Ñ.сПÑ.ПЌ О пеÑ.ейÑ.О в Ñ.ежОЌ
1772+ всÑ.авкО (Insert mode) **
1773+
1774+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1775+
1776+ 2. НабеÑ.ОÑ.е o (в МОжМеЌ Ñ.егОсÑ.Ñ.е) Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. сПзЎаÑ.Ñ. пÑ.сÑ.Ñ.Ñ. сÑ.Ñ.ПкÑ.
1777+ НÐ.Ð.Ð. кÑ.Ñ.сПÑ.а О пеÑ.ейÑ.О в Ñ.ежОЌ всÑ.авкО (Insert mode).
1778+
1779+ 3. ТепеÑ.Ñ. скПпОÑ.Ñ.йÑ.е пПЌеÑ.еММÑ.Ñ. ---> сÑ.Ñ.ПкÑ. О МажЌОÑ.е <ESC> Ўля вÑ.Ñ.ПЎа Оз
1780+ Ñ.ежОЌа всÑ.авкО.
1781+
1782+---> Ð.Псле МажаÑ.Оя o кÑ.Ñ.сПÑ. пеÑ.ейЎеÑ. Ма МПвÑ.Ñ. пÑ.сÑ.Ñ.Ñ. сÑ.Ñ.ПкÑ. в Ñ.ежОЌе всÑ.авкО.
1783+
1784+ 4. Ð.ля сПзЎаМОя сÑ.Ñ.ПкО Ð.ЫКÐ. кÑ.Ñ.сПÑ.а, пÑ.ПсÑ.П МабеÑ.ОÑ.е заглавМÑ.Ñ. O, вЌесÑ.П
1785+ сÑ.Ñ.ПÑ.МПй o. Ð.ПпÑ.ПбÑ.йÑ.е пÑ.ПЎелаÑ.Ñ. эÑ.П с МОжеслеЎÑ.Ñ.Ñ.ей сÑ.Ñ.ПкПй.
1786+СПзЎайÑ.е МПвÑ.Ñ. сÑ.Ñ.ПкÑ. МаЎ эÑ.Пй, Мажав Shift-O, пПЌесÑ.Ов кÑ.Ñ.сПÑ. Ма эÑ.Ñ. сÑ.Ñ.ПкÑ..
1787+
1788+
1789+
1790+
1791+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1792+ УÑ.Пк 6.2: Ð.Ð.Ð.АНÐ.А Ð.Ð.Ð.АÐ.Ð.Ð.НÐ.Я
1793+
1794+ ** НабеÑ.ОÑ.е a , Ñ.Ñ.ПбÑ. всÑ.авОÑ.Ñ. Ñ.ексÑ. Ð.Ð.СÐ.Ð. кÑ.Ñ.сПÑ.а. **
1795+
1796+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, в кПМеÑ. пеÑ.вПй сÑ.Ñ.ПкО, пПЌеÑ.еММПй ---> ,
1797+ МабÑ.ав $ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode).
1798+
1799+ 2. НабеÑ.ОÑ.е a (в МОжМеЌ Ñ.егОсÑ.Ñ.е) Ўля ЎПбавлеМОя Ñ.ексÑ.а Ð.Ð.СÐ.Ð. сОЌвПла,
1800+ МаÑ.ПЎяÑ.егПся пПЎ кÑ.Ñ.сПÑ.ПЌ. (Ð.аглавМая A пПзвПляеÑ. ЎПбавОÑ.Ñ. в кПМеÑ.
1801+ сÑ.Ñ.ПкО.)
1802+
1803+Ð.аЌеÑ.аМОе: ЭÑ.П пПзвПляеÑ. ОзбежаÑ.Ñ. МажаÑ.Оя i , пПслеЎМегП сОЌвПла, Ñ.ексÑ.а Ўля
1804+ всÑ.авкО, <ESC>, кÑ.Ñ.сПÑ.-впÑ.авП, О, МакПМеÑ., x , пÑ.ПсÑ.П Ўля Ñ.ПгП,
1805+ Ñ.Ñ.ПбÑ. ЎПбавОÑ.Ñ. Ñ.есÑ. в кПМеÑ. сÑ.Ñ.ПкО!
1806+
1807+ 3. ТепеÑ.Ñ. завеÑ.Ñ.ОÑ.е пеÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ.. Ð.аЌеÑ.Ñ.Ñ.е Ñ.акже, Ñ.Ñ.П ЎПбавлеМОе эÑ.П в
1808+ Ñ.ПÑ.МПсÑ.О Ñ.П же саЌПе, Ñ.Ñ.П О Ñ.ежОЌ всÑ.авкО, за ОсклÑ.Ñ.еМОеЌ пПзОÑ.ОО, в
1809+ кПÑ.ПÑ.Ñ.Ñ. бÑ.ЎеÑ. всÑ.авлеМ Ñ.ексÑ..
1810+
1811+---> ЭÑ.а сÑ.Ñ.ПÑ.ка пПзвПлОÑ. Ð.аЌ пПпÑ.акÑ.ОкПваÑ.Ñ.ся
1812+---> ЭÑ.а сÑ.Ñ.ПÑ.ка пПзвПлОÑ. Ð.аЌ пПпÑ.акÑ.ОкПваÑ.Ñ.ся в ЎПбавлеМОО Ñ.ексÑ.а в кПМеÑ.
1813+ сÑ.Ñ.ПкО.
1814+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1815+ УÑ.Пк 6.3: Ð.ЩÐ. Ð.Ð.Ð.Н СÐ.Ð.СÐ.Ð. Ð.АÐ.Ð.НЫ
1816+
1817+
1818+ ** НабеÑ.ОÑ.е заглавМÑ.Ñ. R Ўля заЌеМÑ. бПлее, Ñ.еЌ ПЎМПгП сОЌвПла. **
1819+
1820+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1821+
1822+ 2. РаспПлПжОÑ.е кÑ.Ñ.сПÑ. в МаÑ.але пеÑ.вПгП слПва, ПÑ.лОÑ.аÑ.Ñ.егПся ПÑ.
1823+ сППÑ.веÑ.сÑ.вÑ.Ñ.Ñ.егП в слеЎÑ.Ñ.Ñ.ей сÑ.Ñ.Пке, пПЌеÑ.еММПй ---> (слПвП 'пПслеЎМей').
1824+
1825+ 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е R О заЌеМОÑ.е ПсÑ.аÑ.Пк Ñ.ексÑ.а в пеÑ.вПй сÑ.Ñ.Пке, МабÑ.ав
1826+ пПвеÑ.Ñ. сÑ.аÑ.ПгП Ñ.ексÑ.а Ñ.ак, Ñ.Ñ.ПбÑ. Пбе сÑ.Ñ.ПкО сÑ.алО ПЎОМакПвÑ.ЌО.
1827+
1828+---> Ð.еÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ. ЌПжМП сÑ.авМяÑ.Ñ. с пПслеЎМей, ОспПлÑ.зÑ.я клавОÑ.О.
1829+---> Ð.еÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ. ЌПжМП сÑ.авМяÑ.Ñ. с вÑ.ПÑ.Пй, ОспПлÑ.зÑ.я R О МабÑ.ав МПвÑ.й Ñ.ексÑ..
1830+
1831+ 4. Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе, Ñ.Ñ.П пÑ.О МажаÑ.ОО <ESC> Ўля завеÑ.Ñ.еМОя, лÑ.бПй
1832+ Ме ОзЌеМеММÑ.й Ñ.ексÑ. сПÑ.Ñ.аМОÑ.ся.
1833+
1834+
1835+
1836+
1837+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1838+ УÑ.Пк 6.4: УСТАНÐ.Ð.Ð.А Ð.АРАÐ.Ð.ТРÐ.Ð.
1839+
1840+
1841+** УсÑ.аМПвОЌ паÑ.аЌеÑ.Ñ.Ñ. Ñ.ак, Ñ.Ñ.ПбÑ. ОгМПÑ.ОÑ.ПваÑ.Ñ. Ñ.егОсÑ.Ñ. пÑ.О пПОске ОлО заЌеМе **
1842+
1843+
1844+ 1. Ð.ПОÑ.ОÑ.е слПвП 'ОгМПÑ.ОÑ.ПваÑ.Ñ.', МабÑ.ав:
1845+ /ОгМПÑ.ОÑ.ПваÑ.Ñ.
1846+ Ð.ПвÑ.ПÑ.ОÑ.е пПОск МескПлÑ.кП Ñ.аз, МажОЌая клавОÑ.Ñ. n
1847+
1848+ 2. Ð.клÑ.Ñ.ОÑ.е паÑ.аЌеÑ.Ñ. 'ic' (Ð.гМПÑ.ОÑ.ПваÑ.Ñ. Ñ.егОсÑ.Ñ.), МабÑ.ав:
1849+ :set ic
1850+
1851+ 3. ТепеÑ.Ñ. сМПва сЎелайÑ.е пПОск слПва 'ОгМПÑ.ОÑ.ПваÑ.Ñ.', Мажав: n
1852+ Ð.ПвÑ.ПÑ.ОÑ.е пПОск МескПлÑ.кП Ñ.аз, МажОЌая клавОÑ.Ñ. n
1853+
1854+ 4. Ð.клÑ.Ñ.ОÑ.е паÑ.аЌеÑ.Ñ.Ñ. 'hlsearch' О 'incsearch':
1855+ :set hls is
1856+
1857+ 5. ТепеÑ.Ñ. ПпяÑ.Ñ. ввеЎОÑ.е кПЌаМЎÑ. пПОска О пПсЌПÑ.Ñ.ОÑ.е, Ñ.Ñ.П пПлÑ.Ñ.ОÑ.ся:
1858+ /ОгМПÑ.ОÑ.ПваÑ.Ñ.
1859+
1860+
1861+
1862+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1863+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 6
1864+
1865+
1866+ 1. НажаÑ.Ое o сПзЎаеÑ. сÑ.Ñ.ПкÑ. НÐ.Ð.Ð. кÑ.Ñ.сПÑ.а О пеÑ.еЌеÑ.аеÑ. кÑ.Ñ.сПÑ. в Мее в Ñ.ежОЌе
1867+ всÑ.авкО.
1868+ НажаÑ.Ое заглавМПй O сПзЎаеÑ. сÑ.Ñ.ПкÑ. Ð.ЫКÐ. сÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй МаÑ.ПЎОÑ.ся
1869+ кÑ.Ñ.сПÑ..
1870+
1871+ 2. НабеÑ.ОÑ.е a Ўля всÑ.авкО Ñ.ексÑ.а Ð.Ð.СÐ.Ð. сОЌвПла, Ма кПÑ.ПÑ.ПЌ МаÑ.ПЎОÑ.ся кÑ.Ñ.сПÑ..
1872+ НажаÑ.Ое заглавМПй A авÑ.ПЌаÑ.ОÑ.ескО пеÑ.еЌеÑ.аеÑ. Ð.ас Ўля ЎПбавлеМОя Ñ.ексÑ.а
1873+ в кПМеÑ. сÑ.Ñ.ПкО.
1874+
1875+ 3. НажаÑ.Ое заглавМПй R пеÑ.евПЎОÑ. Ð.ас в Ñ.ежОЌ заЌеМÑ. ЎП Ñ.еÑ. пПÑ., пПка Ме
1876+ бÑ.ЎеÑ. МажаÑ.а клавОÑ.а <ESC> Ўля завеÑ.Ñ.еМОя.
1877+
1878+ 4. НабÑ.ав ":set xxx" вÑ. сЌПжеÑ.е вклÑ.Ñ.ОÑ.Ñ. паÑ.аЌеÑ.Ñ. "xxx"
1879+
1880+
1881+
1882+
1883+
1884+
1885+
1886+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1887+ УÑ.Пк 7: Ð.Ð.Ð.АНÐ.Ы Ð.Ð.Ð.УЧÐ.НÐ.Я Ð.СТРÐ.Ð.ННÐ.Ð. СÐ.РАÐ.Ð.Ð.
1888+
1889+ ** Ð.спПлÑ.зÑ.йÑ.е всÑ.Ñ.ПеММÑ.Ñ. спÑ.авПÑ.ÐœÑ.Ñ. сОсÑ.еЌÑ. **
1890+
1891+ Vim ПблаЎаеÑ. ЌПÑ.МПй всÑ.Ñ.ПеММПй спÑ.авПÑ.МПй сОсÑ.еЌПй. Ð.ля МаÑ.ала пПпÑ.ПбÑ.йÑ.е
1892+ ПЎОМ Оз Ñ.Ñ.еÑ. ваÑ.ОаМÑ.Пв:
1893+ - МажЌОÑ.е клавОÑ.Ñ. <HELP> (еслО Ñ.акПвая ОЌееÑ.ся Ма клавОаÑ.Ñ.Ñ.е)
1894+ - МажЌОÑ.е клавОÑ.Ñ. <F1> (еслО Ñ.акПвая ОЌееÑ.ся Ма клавОаÑ.Ñ.Ñ.е)
1895+ - МабеÑ.ОÑ.е :help <ENTER>
1896+
1897+ НабеÑ.ОÑ.е :q <ENTER> Ñ.Ñ.ПбÑ. закÑ.Ñ.Ñ.Ñ. ПкМП спÑ.авкО.
1898+
1899+ Ð.Ñ. ЌПжеÑ.е МайÑ.О спÑ.авкÑ. Ўля лÑ.бПгП пПМяÑ.Оя ОлО кПЌаМЎÑ., пÑ.ПсÑ.П заЎав
1900+ сППÑ.веÑ.сÑ.вÑ.Ñ.Ñ.Ой аÑ.гÑ.ЌеМÑ. кПЌаМЎе ":help". Ð.ПпÑ.ПбÑ.йÑ.е слеЎÑ.Ñ.Ñ.ее (Ме забÑ.ÐŽÑ.Ñ.е
1901+ МажаÑ.Ñ. <ENTER>):
1902+
1903+ :help w
1904+ :help c_<T
1905+ :help insert-index
1906+
1907+
1908+
1909+
1910+
1911+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1912+ УÑ.Пк 8: СÐ.Ð.Ð.АНÐ.Ð. СТАРТÐ.Ð.Ð.Ð.Ð. СÐ.Ð Ð.Ð.ТА
1913+
1914+ ** Ð.клÑ.Ñ.ОЌ вПзЌПжМПсÑ.О Vim **
1915+
1916+ Vim ОЌееÑ. МаЌМПгП бПлÑ.Ñ.е вПзЌПжМПсÑ.ей, Ñ.еЌ Vi, ПЎМакП бПлÑ.Ñ.ОМсÑ.ваП Оз МОÑ.
1917+ вÑ.клÑ.Ñ.еМÑ. пП Ñ.ЌПлÑ.аМОÑ.. Ð.ля Ñ.ПгП, Ñ.Ñ.ПбÑ. МаÑ.аÑ.Ñ. ОспПлÑ.зПваÑ.Ñ. МПвÑ.е
1918+ вПзЌПжМПсÑ.О Ð.аЌ слеЎÑ.еÑ. сПзЎаÑ.Ñ. Ñ.айл "vimrc".
1919+
1920+ 1. Ð.Ñ.Ñ.еЎакÑ.ОÑ.Ñ.йÑ.е Ñ.айл "vimrc", егП Ñ.аспПлПжеМОе завОсОÑ. ПÑ. ОспПлÑ.зÑ.еЌПй
1921+ сОсÑ.еЌÑ.:
1922+
1923+ :edit ~/.vimrc Ўля Unix
1924+ :edit $VIM/_vimrc Ўля MS-Windows
1925+
1926+ 2. ТепеÑ.Ñ. пÑ.ПÑ.ОÑ.айÑ.е пÑ.ОЌеÑ. Ñ.айла "vimrc":
1927+
1928+ :read $VIMRUNTIME/vimrc_example.vim
1929+
1930+ 3. Ð.апОÑ.ОÑ.е Ñ.айл:
1931+
1932+ :write
1933+
1934+ ТепеÑ.Ñ. пÑ.О слеЎÑ.Ñ.Ñ.еЌ запÑ.ске Vim бÑ.ЎеÑ. вклÑ.Ñ.еМа пПЎсвеÑ.ка сОМÑ.аксОса. Ð.се
1935+ МасÑ.Ñ.ПйкО, пÑ.еЎпПÑ.ОÑ.аеЌÑ.е Ð.аЌО, ЌПгÑ.Ñ. бÑ.Ñ.Ñ. ЎПбавлеМÑ. в Ñ.айл "vimrc".
1936+
1937+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1938+ На эÑ.ПЌ завеÑ.Ñ.аеÑ.ся УÑ.ебМОк Vim. Ð.Ðœ бÑ.л пÑ.еЎМазМаÑ.еМ Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. ЎаÑ.Ñ.
1939+ ПбÑ.ее пÑ.еЎсÑ.авлеМОе П Ñ.еЎакÑ.ПÑ.е Vim, ЎПсÑ.аÑ.ПÑ.МПе Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. с легкПсÑ.Ñ.Ñ.
1940+ ОспПлÑ.зПваÑ.Ñ. егП. УÑ.ебМОк Ўалек ПÑ. пПлМПÑ.Ñ., пПскПлÑ.кÑ. Vim ОЌееÑ. ПÑ.еМÑ. ЌМПгП
1941+ кПЌаМЎ. Ð.Ñ.ПÑ.ОÑ.айÑ.е Ñ.епеÑ.Ñ. Ñ.Ñ.кПвПЎсÑ.вП пПлÑ.зПваÑ.еля: ":help user-manual".
1942+
1943+ Ð.ля ЎалÑ.МейÑ.егП Ñ.Ñ.еМОя Ñ.екПЌеМЎÑ.еÑ.ся кМОга:
1944+ Vim - Vi Improved - АвÑ.ПÑ.: Steve Oualline
1945+ Ð.зЎаÑ.елÑ.: New Riders
1946+ ЭÑ.а кМОга пПлМПсÑ.Ñ.Ñ. пПсвяÑ.еМа Vim. Ð.сПбеММП пПлезМа МПвОÑ.каЌ. СПЎеÑ.жОÑ.
1947+ ЌМПжесÑ.вП пÑ.ОЌеÑ.Пв О ОллÑ.сÑ.Ñ.аÑ.Ой.
1948+ Ð.згляМОÑ.е Ма See http://iccf-holland.org/click5.html
1949+
1950+ СлеЎÑ.Ñ.Ñ.ая кМОга бПлее пПÑ.Ñ.еММПгП вПзÑ.асÑ.а О пПсвяÑ.еМа бПлÑ.Ñ.е Vi, Ñ.еЌ Vim,
1951+ ПЎМакП Ñ.акже Ñ.екПЌеМЎÑ.еÑ.ся:
1952+ Learning the Vi Editor - АвÑ.ПÑ.: Linda Lamb
1953+ Ð.зЎаÑ.елÑ.: O'Reilly & Associates Inc.
1954+ ЭÑ.П Ñ.ПÑ.ПÑ.ая кМОга Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.зМаÑ.Ñ. все, Ñ.Ñ.П Ñ.ПлÑ.кП ЌПжМП пÑ.ПЎелÑ.ваÑ.Ñ. с
1955+ Vi. КесÑ.Пе ОзЎаМОе Ñ.акже вклÑ.Ñ.аеÑ. ОМÑ.ПÑ.ЌаÑ.ОÑ. П Vim.
1956+
1957+ ЭÑ.ПÑ. Ñ.Ñ.ебМОк бÑ.л МапОсаМ Michael C. Pierce О Robert K. Ware, Colorado School
1958+ of Mines с ОспПлÑ.зПваМОеЌ ОЎей, пÑ.еЎлПжеММÑ.Ñ. Charles Smith, Colorado State
1959+ University. E-mail: bware@mines.colorado.edu.
1960+
1961+ Ð.ПÑ.абПÑ.аМП Ўля Vim Bram Moolenaar.
1962+
1963+ Ð.еÑ.евПЎ: АМЎÑ.ей Ð.Оселев <a_kissel@eudoramail.com>, 2002.
1964+ Translator: Andrey Kiselev <a_kissel@eudoramail.com>, 2002.
1965+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1966diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim
1967--- vim70.orig/runtime/tutor/tutor.vim 2006-03-18 12:20:36.000000000 -0800
1968+++ vim70/runtime/tutor/tutor.vim 2006-09-11 09:26:16.000000000 -0700
1969@@ -1,6 +1,6 @@
1970 " Vim tutor support file
1971 " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
1972-" Last Change: 2006 Mar 18
1973+" Last Change: 2006 Sep 09
1974
1975 " This small source file is used for detecting if a translation of the
1976 " tutor file exist, i.e., a tutor.xx file, where xx is the language.
1977@@ -93,9 +93,16 @@
1978 endif
1979 endif
1980
1981-" The Greek tutor is available in two encodings, guess which one to use
1982-if s:ext =~? '\.gr' && &enc =~ 737
1983- let s:ext = ".gr.cp737"
1984+" The Greek tutor is available in three encodings, guess what to use.
1985+" We used ".gr" (Greece) instead of ".el" (Greek); accept both.
1986+if s:ext =~? '\.gr\|\.el'
1987+ if &enc == "iso-8859-7"
1988+ let s:ext = ".gr"
1989+ elseif &enc == "utf-8"
1990+ let s:ext = ".gr.utf-8"
1991+ elseif &enc =~ 737
1992+ let s:ext = ".gr.cp737"
1993+ endif
1994 endif
1995
1996 " The Slovak tutor is available in two encodings, guess which one to use
1997@@ -103,11 +110,15 @@
1998 let s:ext = ".sk.cp1250"
1999 endif
2000
2001-" The Russian tutor is available in two encodings, guess which one to use.
2002-" This segment is from the above lines and modified by
2003-" Alexey I. Froloff <raorn@altlinux.org> for Russian vim tutorial
2004-if s:ext =~? '\.ru' && &enc =~ 1251
2005- let s:ext = ".ru.cp1251"
2006+" The Russian tutor is available in three encodings, guess which one to use.
2007+if s:ext =~? '\.ru'
2008+ if &enc == 'utf-8'
2009+ let s:ext = '.ru.utf-8'
2010+ elseif &enc =~ '1251'
2011+ let s:ext = '.ru.cp1251'
2012+ elseif &enc =~ 'koi8'
2013+ let s:ext = '.ru'
2014+ endif
2015 endif
2016
2017 " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).
2018diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure
2019--- vim70.orig/src/auto/configure 2006-05-04 03:46:19.000000000 -0700
2020+++ vim70/src/auto/configure 2006-09-11 09:02:36.000000000 -0700
2021@@ -4014,7 +4014,7 @@
2022 LDFLAGS=$ldflags_save
2023 if test $perl_ok = yes; then
2024 if test "X$perlcppflags" != "X"; then
2025- PERL_CFLAGS="$perlcppflags"
2026+ PERL_CFLAGS=`echo "$perlcppflags" | sed 's/-pipe //'`
2027 fi
2028 if test "X$perlldflags" != "X"; then
2029 LDFLAGS="$perlldflags $LDFLAGS"
2030diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c
2031--- vim70.orig/src/buffer.c 2006-04-26 14:37:23.000000000 -0700
2032+++ vim70/src/buffer.c 2006-09-11 09:04:57.000000000 -0700
2033@@ -434,12 +434,8 @@
2034 if (usingNetbeans)
2035 netbeans_file_closed(buf);
2036 #endif
2037-#ifdef FEAT_AUTOCHDIR
2038- /* Change directories when the acd option is set on. */
2039- if (p_acd && curbuf->b_ffname != NULL
2040- && vim_chdirfile(curbuf->b_ffname) == OK)
2041- shorten_fnames(TRUE);
2042-#endif
2043+ /* Change directories when the 'acd' option is set. */
2044+ DO_AUTOCHDIR
2045
2046 /*
2047 * Remove the buffer from the list.
2048@@ -1390,7 +1386,8 @@
2049 }
2050 else
2051 {
2052- need_fileinfo = TRUE; /* display file info after redraw */
2053+ if (!msg_silent)
2054+ need_fileinfo = TRUE; /* display file info after redraw */
2055 (void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */
2056 #ifdef FEAT_AUTOCMD
2057 curwin->w_topline = 1;
2058@@ -1422,12 +1419,8 @@
2059 netbeans_file_activated(curbuf);
2060 #endif
2061
2062-#ifdef FEAT_AUTOCHDIR
2063- /* Change directories when the acd option is set on. */
2064- if (p_acd && curbuf->b_ffname != NULL
2065- && vim_chdirfile(curbuf->b_ffname) == OK)
2066- shorten_fnames(TRUE);
2067-#endif
2068+ /* Change directories when the 'acd' option is set. */
2069+ DO_AUTOCHDIR
2070
2071 #ifdef FEAT_KEYMAP
2072 if (curbuf->b_kmap_state & KEYMAP_INIT)
2073@@ -1436,6 +1429,18 @@
2074 redraw_later(NOT_VALID);
2075 }
2076
2077+#if defined(FEAT_AUTOCHDIR) || defined(PROTO)
2078+/*
2079+ * Change to the directory of the current buffer.
2080+ */
2081+ void
2082+do_autochdir()
2083+{
2084+ if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK)
2085+ shorten_fnames(TRUE);
2086+}
2087+#endif
2088+
2089 /*
2090 * functions for dealing with the buffer list
2091 */
2092@@ -3324,7 +3329,7 @@
2093 {
2094 usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox);
2095 if (usefmt == NULL)
2096- usefmt = (char_u *)"";
2097+ usefmt = fmt;
2098 }
2099 #endif
2100
2101@@ -5420,11 +5425,7 @@
2102 buf_T *newbuf;
2103 int differ = TRUE;
2104 linenr_T lnum;
2105-#ifdef FEAT_AUTOCMD
2106 aco_save_T aco;
2107-#else
2108- buf_T *old_curbuf = curbuf;
2109-#endif
2110 exarg_T ea;
2111
2112 /* Allocate a buffer without putting it in the buffer list. */
2113@@ -5439,13 +5440,8 @@
2114 return TRUE;
2115 }
2116
2117-#ifdef FEAT_AUTOCMD
2118 /* set curwin/curbuf to buf and save a few things */
2119 aucmd_prepbuf(&aco, newbuf);
2120-#else
2121- curbuf = newbuf;
2122- curwin->w_buffer = newbuf;
2123-#endif
2124
2125 if (ml_open(curbuf) == OK
2126 && readfile(buf->b_ffname, buf->b_fname,
2127@@ -5466,13 +5462,8 @@
2128 }
2129 vim_free(ea.cmd);
2130
2131-#ifdef FEAT_AUTOCMD
2132 /* restore curwin/curbuf and a few other things */
2133 aucmd_restbuf(&aco);
2134-#else
2135- curbuf = old_curbuf;
2136- curwin->w_buffer = old_curbuf;
2137-#endif
2138
2139 if (curbuf != newbuf) /* safety check */
2140 wipe_buffer(newbuf, FALSE);
2141diff -Naur vim70.orig/src/configure vim70/src/configure
2142--- vim70.orig/src/configure 2006-05-07 07:17:49.000000000 -0700
2143+++ vim70/src/configure 2006-08-09 08:37:06.000000000 -0700
2144@@ -2,5 +2,9 @@
2145 # run the automatically generated configure script
2146 CONFIG_STATUS=auto/config.status \
2147 auto/configure "$@" --srcdir="${srcdir:-.}" --cache-file=auto/config.cache
2148+result=$?
2149+
2150 # Stupid autoconf 2.5x causes this file to be left behind.
2151 if test -f configure.lineno; then rm -f configure.lineno; fi
2152+
2153+exit $result
2154diff -Naur vim70.orig/src/configure.in vim70/src/configure.in
2155--- vim70.orig/src/configure.in 2006-05-04 03:46:11.000000000 -0700
2156+++ vim70/src/configure.in 2006-09-11 09:02:36.000000000 -0700
2157@@ -508,7 +508,8 @@
2158 LDFLAGS=$ldflags_save
2159 if test $perl_ok = yes; then
2160 if test "X$perlcppflags" != "X"; then
2161- PERL_CFLAGS="$perlcppflags"
2162+ dnl remove -pipe, it confuses cproto
2163+ PERL_CFLAGS=`echo "$perlcppflags" | sed 's/-pipe //'`
2164 fi
2165 if test "X$perlldflags" != "X"; then
2166 LDFLAGS="$perlldflags $LDFLAGS"
2167diff -Naur vim70.orig/src/edit.c vim70/src/edit.c
2168--- vim70.orig/src/edit.c 2006-05-07 04:48:51.000000000 -0700
[9903b4e]2169+++ vim70/src/edit.c 2006-09-18 08:55:16.000000000 -0700
[d28a23b]2170@@ -129,7 +129,7 @@
2171
2172 static void ins_ctrl_x __ARGS((void));
2173 static int has_compl_option __ARGS((int dict_opt));
2174-static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int dup));
2175+static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int adup));
2176 static int ins_compl_equal __ARGS((compl_T *match, char_u *str, int len));
2177 static void ins_compl_longest_match __ARGS((compl_T *match));
2178 static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase));
[9903b4e]2179@@ -707,6 +707,11 @@
2180 lastc = c; /* remember previous char for CTRL-D */
2181 c = safe_vgetc();
2182
2183+#ifdef FEAT_AUTOCMD
2184+ /* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */
2185+ did_cursorhold = TRUE;
2186+#endif
2187+
2188 #ifdef FEAT_RIGHTLEFT
2189 if (p_hkmap && KeyTyped)
2190 c = hkmap(c); /* Hebrew mode mapping */
2191@@ -719,9 +724,14 @@
[d28a23b]2192 #ifdef FEAT_INS_EXPAND
2193 /*
2194 * Special handling of keys while the popup menu is visible or wanted
2195- * and the cursor is still in the completed word.
2196+ * and the cursor is still in the completed word. Only when there is
2197+ * a match, skip this when no matches were found.
2198 */
2199- if (compl_started && pum_wanted() && curwin->w_cursor.col >= compl_col)
2200+ if (compl_started
2201+ && pum_wanted()
2202+ && curwin->w_cursor.col >= compl_col
2203+ && (compl_shown_match == NULL
2204+ || compl_shown_match != compl_shown_match->cp_next))
2205 {
2206 /* BS: Delete one character from "compl_leader". */
2207 if ((c == K_BS || c == Ctrl_H)
[9903b4e]2208@@ -751,7 +761,7 @@
[d28a23b]2209 continue;
2210 }
2211
2212- /* Pressing CTRL-Y selects the current match. Shen
2213+ /* Pressing CTRL-Y selects the current match. When
2214 * compl_enter_selects is set the Enter key does the same. */
2215 if (c == Ctrl_Y || (compl_enter_selects
2216 && (c == CAR || c == K_KENTER || c == NL)))
[9903b4e]2217@@ -877,6 +887,7 @@
[d28a23b]2218 /* Close the cmdline window. */
2219 cmdwin_result = K_IGNORE;
2220 got_int = FALSE; /* don't stop executing autocommands et al. */
2221+ nomove = TRUE;
2222 goto doESCkey;
2223 }
2224 #endif
[9903b4e]2225@@ -1383,6 +1394,12 @@
2226 break;
2227 } /* end of switch (c) */
2228
2229+#ifdef FEAT_AUTOCMD
2230+ /* If typed something may trigger CursorHoldI again. */
2231+ if (c != K_CURSORHOLD)
2232+ did_cursorhold = FALSE;
2233+#endif
2234+
2235 /* If the cursor was moved we didn't just insert a space */
2236 if (arrow_used)
2237 inserted_space = FALSE;
2238@@ -2112,7 +2129,7 @@
[d28a23b]2239 * maybe because alloc() returns NULL, then FAIL is returned.
2240 */
2241 static int
2242-ins_compl_add(str, len, icase, fname, cptext, cdir, flags, dup)
2243+ins_compl_add(str, len, icase, fname, cptext, cdir, flags, adup)
2244 char_u *str;
2245 int len;
2246 int icase;
[9903b4e]2247@@ -2120,7 +2137,7 @@
[d28a23b]2248 char_u **cptext; /* extra text for popup menu or NULL */
2249 int cdir;
2250 int flags;
2251- int dup; /* accept duplicate match */
2252+ int adup; /* accept duplicate match */
2253 {
2254 compl_T *match;
2255 int dir = (cdir == 0 ? compl_direction : cdir);
[9903b4e]2256@@ -2134,7 +2151,7 @@
[d28a23b]2257 /*
2258 * If the same match is already present, don't add it.
2259 */
2260- if (compl_first_match != NULL && !dup)
2261+ if (compl_first_match != NULL && !adup)
2262 {
2263 match = compl_first_match;
2264 do
[9903b4e]2265@@ -2399,7 +2416,7 @@
[d28a23b]2266 /* compl_pattern doesn't need to be set */
2267 compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
2268 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
2269- -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
2270+ -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
2271 return;
2272
2273 /* Handle like dictionary completion. */
[9903b4e]2274@@ -2409,6 +2426,7 @@
[d28a23b]2275 compl_matches = ins_compl_make_cyclic();
2276 compl_started = TRUE;
2277 compl_used_match = TRUE;
2278+ compl_cont_status = 0;
2279
2280 compl_curr_match = compl_first_match;
2281 ins_complete(Ctrl_N);
[9903b4e]2282@@ -2753,6 +2771,7 @@
[d28a23b]2283 }
2284 else
2285 # endif
2286+ if (count > 0) /* avoid warning for using "files" uninit */
2287 {
2288 ins_compl_files(count, files, thesaurus, flags,
2289 &regmatch, buf, &dir);
[9903b4e]2290@@ -2813,7 +2832,7 @@
[d28a23b]2291 ptr = find_word_end(ptr);
2292 add_r = ins_compl_add_infercase(regmatch->startp[0],
2293 (int)(ptr - regmatch->startp[0]),
2294- FALSE, files[i], *dir, 0);
2295+ p_ic, files[i], *dir, 0);
2296 if (thesaurus)
2297 {
2298 char_u *wstart;
[9903b4e]2299@@ -2849,7 +2868,7 @@
[d28a23b]2300 ptr = find_word_end(ptr);
2301 add_r = ins_compl_add_infercase(wstart,
2302 (int)(ptr - wstart),
2303- FALSE, files[i], *dir, 0);
2304+ p_ic, files[i], *dir, 0);
2305 }
2306 }
2307 if (add_r == OK)
[9903b4e]2308@@ -3015,9 +3034,6 @@
[d28a23b]2309 if ((int)(p - line) - (int)compl_col <= 0)
2310 return K_BS;
2311
2312- /* For redo we need to repeat this backspace. */
2313- AppendCharToRedobuff(K_BS);
2314-
2315 /* Deleted more than what was used to find matches or didn't finish
2316 * finding all matches: need to look for matches all over again. */
2317 if (curwin->w_cursor.col <= compl_col + compl_length
[9903b4e]2318@@ -3046,7 +3062,6 @@
[d28a23b]2319 ins_compl_delete();
2320 ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
2321 compl_used_match = FALSE;
2322- compl_enter_selects = FALSE;
2323
2324 if (compl_started)
2325 ins_compl_set_original_text(compl_leader);
[9903b4e]2326@@ -3076,6 +3091,7 @@
[d28a23b]2327 compl_restarting = FALSE;
2328 }
2329
2330+#if 0 /* disabled, made CTRL-L, BS and typing char jump to original text. */
2331 if (!compl_used_match)
2332 {
2333 /* Go to the original text, since none of the matches is inserted. */
[9903b4e]2334@@ -3087,9 +3103,15 @@
[d28a23b]2335 compl_curr_match = compl_shown_match;
2336 compl_shows_dir = compl_direction;
2337 }
2338+#endif
2339+ compl_enter_selects = !compl_used_match;
2340
2341 /* Show the popup menu with a different set of matches. */
2342 ins_compl_show_pum();
2343+
2344+ /* Don't let Enter select the original text when there is no popup menu. */
2345+ if (compl_match_array == NULL)
2346+ compl_enter_selects = FALSE;
2347 }
2348
2349 /*
[9903b4e]2350@@ -3115,10 +3137,6 @@
[d28a23b]2351 #endif
2352 ins_char(c);
2353
2354- /* For redo we need to count this character so that the number of
2355- * backspaces is correct. */
2356- AppendCharToRedobuff(c);
2357-
2358 /* If we didn't complete finding matches we must search again. */
2359 if (compl_was_interrupted)
2360 ins_compl_restart();
[9903b4e]2361@@ -3175,10 +3193,32 @@
[d28a23b]2362 char_u *p;
2363 int len = curwin->w_cursor.col - compl_col;
2364 int c;
2365+ compl_T *cp;
2366
2367 p = compl_shown_match->cp_str;
2368 if ((int)STRLEN(p) <= len) /* the match is too short */
2369- return;
2370+ {
2371+ /* When still at the original match use the first entry that matches
2372+ * the leader. */
2373+ if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
2374+ {
2375+ p = NULL;
2376+ for (cp = compl_shown_match->cp_next; cp != NULL
2377+ && cp != compl_first_match; cp = cp->cp_next)
2378+ {
2379+ if (ins_compl_equal(cp, compl_leader,
2380+ (int)STRLEN(compl_leader)))
2381+ {
2382+ p = cp->cp_str;
2383+ break;
2384+ }
2385+ }
2386+ if (p == NULL || (int)STRLEN(p) <= len)
2387+ return;
2388+ }
2389+ else
2390+ return;
2391+ }
2392 p += len;
2393 #ifdef FEAT_MBYTE
2394 c = mb_ptr2char(p);
[9903b4e]2395@@ -3198,7 +3238,6 @@
[d28a23b]2396 int c;
2397 {
2398 char_u *ptr;
2399- int temp;
2400 int want_cindent;
2401 int retval = FALSE;
2402
[9903b4e]2403@@ -3354,6 +3393,7 @@
[d28a23b]2404 if (compl_curr_match != NULL || compl_leader != NULL || c == Ctrl_E)
2405 {
2406 char_u *p;
2407+ int temp = 0;
2408
2409 /*
2410 * If any of the original typed text has been changed, eg when
[9903b4e]2411@@ -3369,16 +3409,21 @@
[d28a23b]2412 ptr = compl_leader;
2413 else
2414 ptr = compl_orig_text;
2415- p = compl_orig_text;
2416- for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp]; ++temp)
2417- ;
2418+ if (compl_orig_text != NULL)
2419+ {
2420+ p = compl_orig_text;
2421+ for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp];
2422+ ++temp)
2423+ ;
2424 #ifdef FEAT_MBYTE
2425- if (temp > 0)
2426- temp -= (*mb_head_off)(compl_orig_text, p + temp);
2427+ if (temp > 0)
2428+ temp -= (*mb_head_off)(compl_orig_text, p + temp);
2429 #endif
2430- for (p += temp; *p != NUL; mb_ptr_adv(p))
2431- AppendCharToRedobuff(K_BS);
2432- AppendToRedobuffLit(ptr + temp, -1);
2433+ for (p += temp; *p != NUL; mb_ptr_adv(p))
2434+ AppendCharToRedobuff(K_BS);
2435+ }
2436+ if (ptr != NULL)
2437+ AppendToRedobuffLit(ptr + temp, -1);
2438 }
2439
2440 #ifdef FEAT_CINDENT
[9903b4e]2441@@ -3578,7 +3623,7 @@
[d28a23b]2442 {
2443 char_u *word;
2444 int icase = FALSE;
2445- int dup = FALSE;
2446+ int adup = FALSE;
2447 char_u *(cptext[CPT_COUNT]);
2448
2449 if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
[9903b4e]2450@@ -3595,7 +3640,7 @@
[d28a23b]2451 if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
2452 icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
2453 if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
2454- dup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
2455+ adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
2456 }
2457 else
2458 {
[9903b4e]2459@@ -3604,7 +3649,7 @@
[d28a23b]2460 }
2461 if (word == NULL || *word == NUL)
2462 return FAIL;
2463- return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, dup);
2464+ return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
2465 }
2466 #endif
2467
[9903b4e]2468@@ -3796,7 +3841,7 @@
[d28a23b]2469 TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
2470 TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
2471 {
2472- ins_compl_add_matches(num_matches, matches, FALSE);
2473+ ins_compl_add_matches(num_matches, matches, p_ic);
2474 }
2475 p_ic = save_p_ic;
2476 break;
[9903b4e]2477@@ -3837,7 +3882,7 @@
[d28a23b]2478 num_matches = expand_spelling(first_match_pos.lnum,
2479 first_match_pos.col, compl_pattern, &matches);
2480 if (num_matches > 0)
2481- ins_compl_add_matches(num_matches, matches, FALSE);
2482+ ins_compl_add_matches(num_matches, matches, p_ic);
2483 #endif
2484 break;
2485
[9903b4e]2486@@ -3971,7 +4016,7 @@
[d28a23b]2487 continue;
2488 }
2489 }
2490- if (ins_compl_add_infercase(ptr, len, FALSE,
2491+ if (ins_compl_add_infercase(ptr, len, p_ic,
2492 ins_buf == curbuf ? NULL : ins_buf->b_sfname,
2493 0, flags) != NOTDONE)
2494 {
[9903b4e]2495@@ -4100,6 +4145,21 @@
[d28a23b]2496 && compl_shown_match->cp_next != NULL
2497 && compl_shown_match->cp_next != compl_first_match)
2498 compl_shown_match = compl_shown_match->cp_next;
2499+
2500+ /* If we didn't find it searching forward, and compl_shows_dir is
2501+ * backward, find the last match. */
2502+ if (compl_shows_dir == BACKWARD
2503+ && !ins_compl_equal(compl_shown_match,
2504+ compl_leader, (int)STRLEN(compl_leader))
2505+ && (compl_shown_match->cp_next == NULL
2506+ || compl_shown_match->cp_next == compl_first_match))
2507+ {
2508+ while (!ins_compl_equal(compl_shown_match,
2509+ compl_leader, (int)STRLEN(compl_leader))
2510+ && compl_shown_match->cp_prev != NULL
2511+ && compl_shown_match->cp_prev != compl_first_match)
2512+ compl_shown_match = compl_shown_match->cp_prev;
2513+ }
2514 }
2515
2516 if (allow_get_expansion && insert_match
[9903b4e]2517@@ -4124,8 +4184,6 @@
[d28a23b]2518 {
2519 if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL)
2520 {
2521- if (compl_pending != 0)
2522- --compl_pending;
2523 compl_shown_match = compl_shown_match->cp_next;
2524 found_end = (compl_first_match != NULL
2525 && (compl_shown_match->cp_next == compl_first_match
[9903b4e]2526@@ -4134,14 +4192,24 @@
[d28a23b]2527 else if (compl_shows_dir == BACKWARD
2528 && compl_shown_match->cp_prev != NULL)
2529 {
2530- if (compl_pending != 0)
2531- ++compl_pending;
2532 found_end = (compl_shown_match == compl_first_match);
2533 compl_shown_match = compl_shown_match->cp_prev;
2534 found_end |= (compl_shown_match == compl_first_match);
2535 }
2536 else
2537 {
2538+ if (!allow_get_expansion)
2539+ {
2540+ if (advance)
2541+ {
2542+ if (compl_shows_dir == BACKWARD)
2543+ compl_pending -= todo + 1;
2544+ else
2545+ compl_pending += todo + 1;
2546+ }
2547+ return -1;
2548+ }
2549+
2550 if (advance)
2551 {
2552 if (compl_shows_dir == BACKWARD)
[9903b4e]2553@@ -4149,14 +4217,27 @@
[d28a23b]2554 else
2555 ++compl_pending;
2556 }
2557- if (!allow_get_expansion)
2558- return -1;
2559
2560 /* Find matches. */
2561 num_matches = ins_compl_get_exp(&compl_startpos);
2562- if (compl_pending != 0 && compl_direction == compl_shows_dir
2563+
2564+ /* handle any pending completions */
2565+ while (compl_pending != 0 && compl_direction == compl_shows_dir
2566 && advance)
2567- compl_shown_match = compl_curr_match;
2568+ {
2569+ if (compl_pending > 0 && compl_shown_match->cp_next != NULL)
2570+ {
2571+ compl_shown_match = compl_shown_match->cp_next;
2572+ --compl_pending;
2573+ }
2574+ if (compl_pending < 0 && compl_shown_match->cp_prev != NULL)
2575+ {
2576+ compl_shown_match = compl_shown_match->cp_prev;
2577+ ++compl_pending;
2578+ }
2579+ else
2580+ break;
2581+ }
2582 found_end = FALSE;
2583 }
2584 if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
[9903b4e]2585@@ -4265,9 +4346,9 @@
[d28a23b]2586 return;
2587 count = 0;
2588
2589- ++no_mapping;
2590+ /* Check for a typed key. Do use mappings, otherwise vim_is_ctrl_x_key()
2591+ * can't do its work correctly. */
2592 c = vpeekc_any();
2593- --no_mapping;
2594 if (c != NUL)
2595 {
2596 if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R)
[9903b4e]2597@@ -4277,12 +4358,27 @@
[d28a23b]2598 (void)ins_compl_next(FALSE, ins_compl_key2count(c),
2599 c != K_UP && c != K_DOWN);
2600 }
2601- else if (c != Ctrl_R)
2602- compl_interrupted = TRUE;
2603+ else
2604+ {
2605+ /* Need to get the character to have KeyTyped set. We'll put it
2606+ * back with vungetc() below. */
2607+ c = safe_vgetc();
2608+
2609+ /* Don't interrupt completion when the character wasn't typed,
2610+ * e.g., when doing @q to replay keys. */
2611+ if (c != Ctrl_R && KeyTyped)
2612+ compl_interrupted = TRUE;
2613+
2614+ vungetc(c);
2615+ }
2616 }
2617 if (compl_pending != 0 && !got_int)
2618- (void)ins_compl_next(FALSE, compl_pending > 0
2619- ? compl_pending : -compl_pending, TRUE);
2620+ {
2621+ int todo = compl_pending > 0 ? compl_pending : -compl_pending;
2622+
2623+ compl_pending = 0;
2624+ (void)ins_compl_next(FALSE, todo, TRUE);
2625+ }
2626 }
2627
2628 /*
[9903b4e]2629@@ -4611,10 +4707,12 @@
[d28a23b]2630 (int)STRLEN(compl_pattern), curs_col);
2631 if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL
2632 || compl_xp.xp_context == EXPAND_NOTHING)
2633- return FAIL;
2634- startcol = (int)(compl_xp.xp_pattern - compl_pattern);
2635- compl_col = startcol;
2636- compl_length = curs_col - startcol;
2637+ /* No completion possible, use an empty pattern to get a
2638+ * "pattern not found" message. */
2639+ compl_col = curs_col;
2640+ else
2641+ compl_col = (int)(compl_xp.xp_pattern - compl_pattern);
2642+ compl_length = curs_col - compl_col;
2643 }
2644 else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
2645 {
[9903b4e]2646@@ -4668,11 +4766,17 @@
[d28a23b]2647 else
2648 compl_col = spell_word_start(startcol);
2649 if (compl_col >= (colnr_T)startcol)
2650- return FAIL;
2651- spell_expand_check_cap(compl_col);
2652+ {
2653+ compl_length = 0;
2654+ compl_col = curs_col;
2655+ }
2656+ else
2657+ {
2658+ spell_expand_check_cap(compl_col);
2659+ compl_length = (int)curs_col - compl_col;
2660+ }
2661 /* Need to obtain "line" again, it may have become invalid. */
2662 line = ml_get(curwin->w_cursor.lnum);
2663- compl_length = (int)curs_col - compl_col;
2664 compl_pattern = vim_strnsave(line + compl_col, compl_length);
2665 if (compl_pattern == NULL)
2666 #endif
[9903b4e]2667@@ -4720,7 +4824,7 @@
[d28a23b]2668 vim_free(compl_orig_text);
2669 compl_orig_text = vim_strnsave(line + compl_col, compl_length);
2670 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
2671- -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
2672+ -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
2673 {
2674 vim_free(compl_pattern);
2675 compl_pattern = NULL;
[9903b4e]2676@@ -8508,7 +8612,12 @@
[d28a23b]2677 tpos = curwin->w_cursor;
2678 if (oneleft() == OK)
2679 {
2680- start_arrow(&tpos);
2681+#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
2682+ /* Only call start_arrow() when not busy with preediting, it will
2683+ * break undo. K_LEFT is inserted in im_correct_cursor(). */
2684+ if (!im_is_preediting())
2685+#endif
2686+ start_arrow(&tpos);
2687 #ifdef FEAT_RIGHTLEFT
2688 /* If exit reversed string, position is fixed */
2689 if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol)
2690diff -Naur vim70.orig/src/eval.c vim70/src/eval.c
2691--- vim70.orig/src/eval.c 2006-05-05 10:15:26.000000000 -0700
2692+++ vim70/src/eval.c 2006-09-11 09:04:12.000000000 -0700
2693@@ -454,7 +454,7 @@
2694 static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
2695 static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
2696 static int call_func __ARGS((char_u *name, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
2697-static void emsg_funcname __ARGS((char *msg, char_u *name));
2698+static void emsg_funcname __ARGS((char *ermsg, char_u *name));
2699
2700 static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
2701 static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
2702@@ -701,6 +701,7 @@
2703 static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string));
2704 static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
2705 static int var_check_ro __ARGS((int flags, char_u *name));
2706+static int var_check_fixed __ARGS((int flags, char_u *name));
2707 static int tv_check_lock __ARGS((int lock, char_u *name));
2708 static void copy_tv __ARGS((typval_T *from, typval_T *to));
2709 static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID));
2710@@ -2260,7 +2261,7 @@
2711 EMSG(_(e_letunexp));
2712 else
2713 {
2714- char_u *tofree = NULL;
2715+ char_u *ptofree = NULL;
2716 char_u *s;
2717
2718 p = get_tv_string_chk(tv);
2719@@ -2269,7 +2270,7 @@
2720 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
2721 if (s != NULL)
2722 {
2723- p = tofree = concat_str(s, p);
2724+ p = ptofree = concat_str(s, p);
2725 vim_free(s);
2726 }
2727 }
2728@@ -2278,7 +2279,7 @@
2729 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
2730 arg_end = arg + 1;
2731 }
2732- vim_free(tofree);
2733+ vim_free(ptofree);
2734 }
2735 }
2736
2737@@ -3364,6 +3365,8 @@
2738 hi = hash_find(ht, varname);
2739 if (!HASHITEM_EMPTY(hi))
2740 {
2741+ if (var_check_fixed(HI2DI(hi)->di_flags, name))
2742+ return FAIL;
2743 if (var_check_ro(HI2DI(hi)->di_flags, name))
2744 return FAIL;
2745 delete_var(ht, hi);
2746@@ -6059,6 +6062,10 @@
2747 tabpage_T *tp;
2748 #endif
2749
2750+ /* Only do this once. */
2751+ want_garbage_collect = FALSE;
2752+ may_garbage_collect = FALSE;
2753+
2754 /*
2755 * 1. Go through all accessible variables and mark all lists and dicts
2756 * with copyID.
2757@@ -7595,8 +7602,8 @@
2758 * Give an error message with a function name. Handle <SNR> things.
2759 */
2760 static void
2761-emsg_funcname(msg, name)
2762- char *msg;
2763+emsg_funcname(ermsg, name)
2764+ char *ermsg;
2765 char_u *name;
2766 {
2767 char_u *p;
2768@@ -7605,7 +7612,7 @@
2769 p = concat_str((char_u *)"<SNR>", name + 3);
2770 else
2771 p = name;
2772- EMSG2(_(msg), p);
2773+ EMSG2(_(ermsg), p);
2774 if (p != name)
2775 vim_free(p);
2776 }
2777@@ -8252,6 +8259,12 @@
2778 EMSG(_("E785: complete() can only be used in Insert mode"));
2779 return;
2780 }
2781+
2782+ /* Check for undo allowed here, because if something was already inserted
2783+ * the line was already saved for undo and this check isn't done. */
2784+ if (!undo_allowed())
2785+ return;
2786+
2787 if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL)
2788 {
2789 EMSG(_(e_invarg));
2790@@ -9173,25 +9186,25 @@
2791 typval_T save_key;
2792 int rem;
2793 int todo;
2794- char_u *msg = map ? (char_u *)"map()" : (char_u *)"filter()";
2795+ char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()";
2796 int save_did_emsg;
2797
2798 rettv->vval.v_number = 0;
2799 if (argvars[0].v_type == VAR_LIST)
2800 {
2801 if ((l = argvars[0].vval.v_list) == NULL
2802- || (map && tv_check_lock(l->lv_lock, msg)))
2803+ || (map && tv_check_lock(l->lv_lock, ermsg)))
2804 return;
2805 }
2806 else if (argvars[0].v_type == VAR_DICT)
2807 {
2808 if ((d = argvars[0].vval.v_dict) == NULL
2809- || (map && tv_check_lock(d->dv_lock, msg)))
2810+ || (map && tv_check_lock(d->dv_lock, ermsg)))
2811 return;
2812 }
2813 else
2814 {
2815- EMSG2(_(e_listdictarg), msg);
2816+ EMSG2(_(e_listdictarg), ermsg);
2817 return;
2818 }
2819
2820@@ -9223,7 +9236,7 @@
2821 {
2822 --todo;
2823 di = HI2DI(hi);
2824- if (tv_check_lock(di->di_tv.v_lock, msg))
2825+ if (tv_check_lock(di->di_tv.v_lock, ermsg))
2826 break;
2827 vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
2828 if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
2829@@ -9242,7 +9255,7 @@
2830 {
2831 for (li = l->lv_first; li != NULL; li = nli)
2832 {
2833- if (tv_check_lock(li->li_tv.v_lock, msg))
2834+ if (tv_check_lock(li->li_tv.v_lock, ermsg))
2835 break;
2836 nli = li->li_next;
2837 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
2838@@ -9598,7 +9611,9 @@
2839 typval_T *argvars;
2840 typval_T *rettv;
2841 {
2842- garbage_collect();
2843+ /* This is postponed until we are back at the toplevel, because we may be
2844+ * using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". */
2845+ want_garbage_collect = TRUE;
2846 }
2847
2848 /*
2849@@ -9792,6 +9807,9 @@
2850 varnumber_T n;
2851 int error = FALSE;
2852
2853+ /* Position the cursor. Needed after a message that ends in a space. */
2854+ windgoto(msg_row, msg_col);
2855+
2856 ++no_mapping;
2857 ++allow_keys;
2858 if (argvars[0].v_type == VAR_UNKNOWN)
2859@@ -11312,14 +11330,19 @@
2860
2861 static int inputsecret_flag = 0;
2862
2863+static void get_user_input __ARGS((typval_T *argvars, typval_T *rettv, int inputdialog));
2864+
2865 /*
2866- * "input()" function
2867- * Also handles inputsecret() when inputsecret is set.
2868+ * This function is used by f_input() and f_inputdialog() functions. The third
2869+ * argument to f_input() specifies the type of completion to use at the
2870+ * prompt. The third argument to f_inputdialog() specifies the value to return
2871+ * when the user cancels the prompt.
2872 */
2873 static void
2874-f_input(argvars, rettv)
2875+get_user_input(argvars, rettv, inputdialog)
2876 typval_T *argvars;
2877 typval_T *rettv;
2878+ int inputdialog;
2879 {
2880 char_u *prompt = get_tv_string_chk(&argvars[0]);
2881 char_u *p = NULL;
2882@@ -11369,10 +11392,10 @@
2883 if (defstr != NULL)
2884 stuffReadbuffSpec(defstr);
2885
2886- if (argvars[2].v_type != VAR_UNKNOWN)
2887+ if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN)
2888 {
2889 char_u *xp_name;
2890- int xp_namelen;
2891+ int xp_namelen;
2892 long argt;
2893
2894 rettv->vval.v_string = NULL;
2895@@ -11404,6 +11427,18 @@
2896 }
2897
2898 /*
2899+ * "input()" function
2900+ * Also handles inputsecret() when inputsecret is set.
2901+ */
2902+ static void
2903+f_input(argvars, rettv)
2904+ typval_T *argvars;
2905+ typval_T *rettv;
2906+{
2907+ get_user_input(argvars, rettv, FALSE);
2908+}
2909+
2910+/*
2911 * "inputdialog()" function
2912 */
2913 static void
2914@@ -11443,7 +11478,7 @@
2915 }
2916 else
2917 #endif
2918- f_input(argvars, rettv);
2919+ get_user_input(argvars, rettv, TRUE);
2920 }
2921
2922 /*
2923@@ -11471,6 +11506,7 @@
2924 }
2925
2926 msg_start();
2927+ msg_row = Rows - 1; /* for when 'cmdheight' > 1 */
2928 lines_left = Rows; /* avoid more prompt */
2929 msg_scroll = TRUE;
2930 msg_clr_eos();
2931@@ -13250,7 +13286,7 @@
2932 if (argvars[2].v_type != VAR_UNKNOWN)
2933 EMSG2(_(e_toomanyarg), "remove()");
2934 else if ((d = argvars[0].vval.v_dict) != NULL
2935- && !tv_check_lock(d->dv_lock, (char_u *)"remove()"))
2936+ && !tv_check_lock(d->dv_lock, (char_u *)"remove() argument"))
2937 {
2938 key = get_tv_string_chk(&argvars[1]);
2939 if (key != NULL)
2940@@ -13270,7 +13306,7 @@
2941 else if (argvars[0].v_type != VAR_LIST)
2942 EMSG2(_(e_listdictarg), "remove()");
2943 else if ((l = argvars[0].vval.v_list) != NULL
2944- && !tv_check_lock(l->lv_lock, (char_u *)"remove()"))
2945+ && !tv_check_lock(l->lv_lock, (char_u *)"remove() argument"))
2946 {
2947 int error = FALSE;
2948
2949@@ -14157,11 +14193,7 @@
2950 typval_T *rettv;
2951 {
2952 buf_T *buf;
2953-#ifdef FEAT_AUTOCMD
2954 aco_save_T aco;
2955-#else
2956- buf_T *save_curbuf;
2957-#endif
2958 char_u *varname, *bufvarname;
2959 typval_T *varp;
2960 char_u nbuf[NUMBUFLEN];
2961@@ -14178,12 +14210,7 @@
2962 if (buf != NULL && varname != NULL && varp != NULL)
2963 {
2964 /* set curbuf to be our buf, temporarily */
2965-#ifdef FEAT_AUTOCMD
2966 aucmd_prepbuf(&aco, buf);
2967-#else
2968- save_curbuf = curbuf;
2969- curbuf = buf;
2970-#endif
2971
2972 if (*varname == '&')
2973 {
2974@@ -14210,11 +14237,7 @@
2975 }
2976
2977 /* reset notion of buffer */
2978-#ifdef FEAT_AUTOCMD
2979 aucmd_restbuf(&aco);
2980-#else
2981- curbuf = save_curbuf;
2982-#endif
2983 }
2984 }
2985
2986@@ -16173,7 +16196,7 @@
2987 curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
2988 curwin->w_set_curswant = FALSE;
2989
2990- curwin->w_topline = get_dict_number(dict, (char_u *)"topline");
2991+ set_topline(curwin, get_dict_number(dict, (char_u *)"topline"));
2992 #ifdef FEAT_DIFF
2993 curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill");
2994 #endif
2995@@ -16218,6 +16241,7 @@
2996 #ifdef FEAT_VIRTUALEDIT
2997 dict_add_nr_str(dict, "coladd", (long)curwin->w_cursor.coladd, NULL);
2998 #endif
2999+ update_curswant();
3000 dict_add_nr_str(dict, "curswant", (long)curwin->w_curswant, NULL);
3001
3002 dict_add_nr_str(dict, "topline", (long)curwin->w_topline, NULL);
3003@@ -16438,9 +16462,12 @@
3004 long i = 0;
3005 long n;
3006
3007- /* List must be: [fnum, lnum, col, coladd] */
3008- if (arg->v_type != VAR_LIST || l == NULL
3009- || l->lv_len != (fnump == NULL ? 3 : 4))
3010+ /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there
3011+ * when "fnump" isn't NULL and "coladd" is optional. */
3012+ if (arg->v_type != VAR_LIST
3013+ || l == NULL
3014+ || l->lv_len < (fnump == NULL ? 2 : 3)
3015+ || l->lv_len > (fnump == NULL ? 3 : 4))
3016 return FAIL;
3017
3018 if (fnump != NULL)
3019@@ -16466,8 +16493,9 @@
3020 #ifdef FEAT_VIRTUALEDIT
3021 n = list_find_nr(l, i, NULL);
3022 if (n < 0)
3023- return FAIL;
3024- posp->coladd = n;
3025+ posp->coladd = 0;
3026+ else
3027+ posp->coladd = n;
3028 #endif
3029
3030 return OK;
3031@@ -17759,6 +17787,13 @@
3032 }
3033 else /* add a new variable */
3034 {
3035+ /* Can't add "v:" variable. */
3036+ if (ht == &vimvarht)
3037+ {
3038+ EMSG2(_(e_illvar), name);
3039+ return;
3040+ }
3041+
3042 /* Make sure the variable name is valid. */
3043 for (p = varname; *p != NUL; ++p)
3044 if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
3045@@ -17792,7 +17827,7 @@
3046 }
3047
3048 /*
3049- * Return TRUE if di_flags "flags" indicate read-only variable "name".
3050+ * Return TRUE if di_flags "flags" indicates variable "name" is read-only.
3051 * Also give an error message.
3052 */
3053 static int
3054@@ -17814,6 +17849,23 @@
3055 }
3056
3057 /*
3058+ * Return TRUE if di_flags "flags" indicates variable "name" is fixed.
3059+ * Also give an error message.
3060+ */
3061+ static int
3062+var_check_fixed(flags, name)
3063+ int flags;
3064+ char_u *name;
3065+{
3066+ if (flags & DI_FLAGS_FIX)
3067+ {
3068+ EMSG2(_("E795: Cannot delete variable %s"), name);
3069+ return TRUE;
3070+ }
3071+ return FALSE;
3072+}
3073+
3074+/*
3075 * Return TRUE if typeval "tv" is set to be locked (immutable).
3076 * Also give an error message, using "name".
3077 */
3078@@ -18786,6 +18838,7 @@
3079 if (dict_add(fudi.fd_dict, fudi.fd_di) == FAIL)
3080 {
3081 vim_free(fudi.fd_di);
3082+ vim_free(fp);
3083 goto erret;
3084 }
3085 }
3086@@ -18963,7 +19016,8 @@
3087 else if (lead > 0)
3088 {
3089 lead = 3;
3090- if (eval_fname_sid(lv.ll_exp_name != NULL ? lv.ll_exp_name : *pp))
3091+ if ((lv.ll_exp_name != NULL && eval_fname_sid(lv.ll_exp_name))
3092+ || eval_fname_sid(*pp))
3093 {
3094 /* It's "s:" or "<SID>" */
3095 if (current_SID <= 0)
3096@@ -19685,6 +19739,7 @@
3097 v->di_tv.vval.v_list = &fc.l_varlist;
3098 vim_memset(&fc.l_varlist, 0, sizeof(list_T));
3099 fc.l_varlist.lv_refcount = 99999;
3100+ fc.l_varlist.lv_lock = VAR_FIXED;
3101
3102 /*
3103 * Set a:firstline to "firstline" and a:lastline to "lastline".
3104@@ -19761,7 +19816,7 @@
3105 if (p_verbose >= 14)
3106 {
3107 char_u buf[MSG_BUF_LEN];
3108- char_u numbuf[NUMBUFLEN];
3109+ char_u numbuf2[NUMBUFLEN];
3110 char_u *tofree;
3111
3112 msg_puts((char_u *)"(");
3113@@ -19773,8 +19828,8 @@
3114 msg_outnum((long)argvars[i].vval.v_number);
3115 else
3116 {
3117- trunc_string(tv2string(&argvars[i], &tofree, numbuf, 0),
3118- buf, MSG_BUF_CLEN);
3119+ trunc_string(tv2string(&argvars[i], &tofree,
3120+ numbuf2, 0), buf, MSG_BUF_CLEN);
3121 msg_puts(buf);
3122 vim_free(tofree);
3123 }
3124@@ -19852,13 +19907,13 @@
3125 else
3126 {
3127 char_u buf[MSG_BUF_LEN];
3128- char_u numbuf[NUMBUFLEN];
3129+ char_u numbuf2[NUMBUFLEN];
3130 char_u *tofree;
3131
3132 /* The value may be very long. Skip the middle part, so that we
3133 * have some idea how it starts and ends. smsg() would always
3134 * truncate it at the end. */
3135- trunc_string(tv2string(fc.rettv, &tofree, numbuf, 0),
3136+ trunc_string(tv2string(fc.rettv, &tofree, numbuf2, 0),
3137 buf, MSG_BUF_CLEN);
3138 smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
3139 vim_free(tofree);
3140diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c
3141--- vim70.orig/src/ex_cmds2.c 2006-04-17 03:19:07.000000000 -0700
3142+++ vim70/src/ex_cmds2.c 2006-09-11 08:23:15.000000000 -0700
3143@@ -3648,13 +3648,13 @@
3144 * Return FALSE when not sourcing a file.
3145 */
3146 int
3147-source_finished(getline, cookie)
3148- char_u *(*getline) __ARGS((int, void *, int));
3149+source_finished(fgetline, cookie)
3150+ char_u *(*fgetline) __ARGS((int, void *, int));
3151 void *cookie;
3152 {
3153- return (getline_equal(getline, cookie, getsourceline)
3154+ return (getline_equal(fgetline, cookie, getsourceline)
3155 && ((struct source_cookie *)getline_cookie(
3156- getline, cookie))->finished);
3157+ fgetline, cookie))->finished);
3158 }
3159 #endif
3160
3161diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c
3162--- vim70.orig/src/ex_cmds.c 2006-04-22 11:56:56.000000000 -0700
3163+++ vim70/src/ex_cmds.c 2006-09-11 09:03:01.000000000 -0700
3164@@ -95,7 +95,10 @@
3165 _("<%s>%s%s %d, Hex %02x, Octal %03o"),
3166 transchar(c), buf1, buf2, c, c, c);
3167 #ifdef FEAT_MBYTE
3168- c = cc[ci++];
3169+ if (enc_utf8)
3170+ c = cc[ci++];
3171+ else
3172+ c = 0;
3173 #endif
3174 }
3175
3176@@ -108,7 +111,7 @@
3177 if (len > 0)
3178 IObuff[len++] = ' ';
3179 IObuff[len++] = '<';
3180- if (utf_iscomposing(c)
3181+ if (enc_utf8 && utf_iscomposing(c)
3182 # ifdef USE_GUI
3183 && !gui.in_use
3184 # endif
3185@@ -120,7 +123,10 @@
3186 : _("> %d, Hex %08x, Octal %o"), c, c, c);
3187 if (ci == MAX_MCO)
3188 break;
3189- c = cc[ci++];
3190+ if (enc_utf8)
3191+ c = cc[ci++];
3192+ else
3193+ c = 0;
3194 }
3195 #endif
3196
3197@@ -185,6 +191,7 @@
3198 new_indent = indent;
3199 else
3200 {
3201+ has_tab = FALSE; /* avoid uninit warnings */
3202 len = linelen(eap->cmdidx == CMD_right ? &has_tab
3203 : NULL) - get_indent();
3204
3205@@ -1772,10 +1779,9 @@
3206 ? (st_old.st_mode & 0020)
3207 : (st_old.st_mode & 0002))))
3208 {
3209- int tt;
3210+ int tt = msg_didany;
3211
3212 /* avoid a wait_return for this message, it's annoying */
3213- tt = msg_didany;
3214 EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
3215 msg_didany = tt;
3216 fclose(fp_in);
3217@@ -2458,6 +2464,8 @@
3218 #ifdef FEAT_AUTOCMD
3219 apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
3220 #endif
3221+ /* Change directories when the 'acd' option is set. */
3222+ DO_AUTOCHDIR
3223 }
3224 /* print full file name if :cd used */
3225 fileinfo(FALSE, FALSE, eap->forceit);
3226@@ -2675,8 +2683,13 @@
3227 eap, eap->append, eap->forceit, TRUE, FALSE);
3228
3229 /* After ":saveas fname" reset 'readonly'. */
3230- if (eap->cmdidx == CMD_saveas && retval == OK)
3231- curbuf->b_p_ro = FALSE;
3232+ if (eap->cmdidx == CMD_saveas)
3233+ {
3234+ if (retval == OK)
3235+ curbuf->b_p_ro = FALSE;
3236+ /* Change directories when the 'acd' option is set. */
3237+ DO_AUTOCHDIR
3238+ }
3239 }
3240
3241 theend:
3242@@ -3547,11 +3560,9 @@
3243 foldUpdateAll(curwin);
3244 #endif
3245
3246-#ifdef FEAT_AUTOCHDIR
3247- if (p_acd && curbuf->b_ffname != NULL
3248- && vim_chdirfile(curbuf->b_ffname) == OK)
3249- shorten_fnames(TRUE);
3250-#endif
3251+ /* Change directories when the 'acd' option is set. */
3252+ DO_AUTOCHDIR
3253+
3254 /*
3255 * Careful: open_buffer() and apply_autocmds() may change the current
3256 * buffer and window.
3257@@ -3718,12 +3729,8 @@
3258 if (p_im)
3259 need_start_insertmode = TRUE;
3260
3261-#ifdef FEAT_AUTOCHDIR
3262- /* Change directories when the acd option is set on. */
3263- if (p_acd && curbuf->b_ffname != NULL
3264- && vim_chdirfile(curbuf->b_ffname) == OK)
3265- shorten_fnames(TRUE);
3266-#endif
3267+ /* Change directories when the 'acd' option is set. */
3268+ DO_AUTOCHDIR
3269
3270 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
3271 if (gui.in_use && curbuf->b_ffname != NULL)
3272diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h
3273--- vim70.orig/src/ex_cmds.h 2006-04-07 02:44:46.000000000 -0700
3274+++ vim70/src/ex_cmds.h 2006-07-14 08:51:21.000000000 -0700
3275@@ -262,7 +262,7 @@
3276 EX(CMD_comclear, "comclear", ex_comclear,
3277 TRLBAR|CMDWIN),
3278 EX(CMD_compiler, "compiler", ex_compiler,
3279- BANG|TRLBAR|WORD1),
3280+ BANG|TRLBAR|WORD1|CMDWIN),
3281 EX(CMD_continue, "continue", ex_continue,
3282 TRLBAR|SBOXOK|CMDWIN),
3283 EX(CMD_confirm, "confirm", ex_wrongmodifier,
3284diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c
3285--- vim70.orig/src/ex_docmd.c 2006-05-05 09:33:19.000000000 -0700
3286+++ vim70/src/ex_docmd.c 2006-09-11 09:27:48.000000000 -0700
3287@@ -58,9 +58,9 @@
3288 #endif
3289
3290 #ifdef FEAT_EVAL
3291-static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*getline)(int, void *, int), void *cookie));
3292+static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie));
3293 #else
3294-static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*getline)(int, void *, int), void *cookie));
3295+static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie));
3296 static int if_level = 0; /* depth in :if */
3297 #endif
3298 static char_u *find_command __ARGS((exarg_T *eap, int *full));
3299@@ -831,10 +831,13 @@
3300
3301 /*
3302 * If requested, store and reset the global values controlling the
3303- * exception handling (used when debugging).
3304+ * exception handling (used when debugging). Otherwise clear it to avoid
3305+ * a bogus compiler warning when the optimizer uses inline functions...
3306 */
3307- else if (flags & DOCMD_EXCRESET)
3308+ if (flags & DOCMD_EXCRESET)
3309 save_dbg_stuff(&debug_saved);
3310+ else
3311+ memset(&debug_saved, 0, 1);
3312
3313 initial_trylevel = trylevel;
3314
3315@@ -1574,24 +1577,24 @@
3316 #endif
3317
3318 /*
3319- * If "getline" is get_loop_line(), return TRUE if the getline it uses equals
3320- * "func". * Otherwise return TRUE when "getline" equals "func".
3321+ * If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals
3322+ * "func". * Otherwise return TRUE when "fgetline" equals "func".
3323 */
3324 /*ARGSUSED*/
3325 int
3326-getline_equal(getline, cookie, func)
3327- char_u *(*getline) __ARGS((int, void *, int));
3328- void *cookie; /* argument for getline() */
3329+getline_equal(fgetline, cookie, func)
3330+ char_u *(*fgetline) __ARGS((int, void *, int));
3331+ void *cookie; /* argument for fgetline() */
3332 char_u *(*func) __ARGS((int, void *, int));
3333 {
3334 #ifdef FEAT_EVAL
3335 char_u *(*gp) __ARGS((int, void *, int));
3336 struct loop_cookie *cp;
3337
3338- /* When "getline" is "get_loop_line()" use the "cookie" to find the
3339+ /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
3340 * function that's orignally used to obtain the lines. This may be nested
3341 * several levels. */
3342- gp = getline;
3343+ gp = fgetline;
3344 cp = (struct loop_cookie *)cookie;
3345 while (gp == get_loop_line)
3346 {
3347@@ -1600,29 +1603,29 @@
3348 }
3349 return gp == func;
3350 #else
3351- return getline == func;
3352+ return fgetline == func;
3353 #endif
3354 }
3355
3356 #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
3357 /*
3358- * If "getline" is get_loop_line(), return the cookie used by the original
3359+ * If "fgetline" is get_loop_line(), return the cookie used by the original
3360 * getline function. Otherwise return "cookie".
3361 */
3362 /*ARGSUSED*/
3363 void *
3364-getline_cookie(getline, cookie)
3365- char_u *(*getline) __ARGS((int, void *, int));
3366- void *cookie; /* argument for getline() */
3367+getline_cookie(fgetline, cookie)
3368+ char_u *(*fgetline) __ARGS((int, void *, int));
3369+ void *cookie; /* argument for fgetline() */
3370 {
3371 # ifdef FEAT_EVAL
3372 char_u *(*gp) __ARGS((int, void *, int));
3373 struct loop_cookie *cp;
3374
3375- /* When "getline" is "get_loop_line()" use the "cookie" to find the
3376+ /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
3377 * cookie that's orignally used to obtain the lines. This may be nested
3378 * several levels. */
3379- gp = getline;
3380+ gp = fgetline;
3381 cp = (struct loop_cookie *)cookie;
3382 while (gp == get_loop_line)
3383 {
3384@@ -1648,7 +1651,7 @@
3385 * 5. parse arguments
3386 * 6. switch on command name
3387 *
3388- * Note: "getline" can be NULL.
3389+ * Note: "fgetline" can be NULL.
3390 *
3391 * This function may be called recursively!
3392 */
3393@@ -1663,14 +1666,14 @@
3394 #ifdef FEAT_EVAL
3395 cstack,
3396 #endif
3397- getline, cookie)
3398+ fgetline, cookie)
3399 char_u **cmdlinep;
3400 int sourcing;
3401 #ifdef FEAT_EVAL
3402 struct condstack *cstack;
3403 #endif
3404- char_u *(*getline) __ARGS((int, void *, int));
3405- void *cookie; /* argument for getline() */
3406+ char_u *(*fgetline) __ARGS((int, void *, int));
3407+ void *cookie; /* argument for fgetline() */
3408 {
3409 char_u *p;
3410 linenr_T lnum;
3411@@ -1698,7 +1701,7 @@
3412 if (quitmore
3413 #ifdef FEAT_EVAL
3414 /* avoid that a function call in 'statusline' does this */
3415- && !getline_equal(getline, cookie, get_func_line)
3416+ && !getline_equal(fgetline, cookie, get_func_line)
3417 #endif
3418 )
3419 --quitmore;
3420@@ -1710,6 +1713,10 @@
3421 save_cmdmod = cmdmod;
3422 vim_memset(&cmdmod, 0, sizeof(cmdmod));
3423
3424+ /* "#!anything" is handled like a comment. */
3425+ if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!')
3426+ goto doend;
3427+
3428 /*
3429 * Repeat until no more command modifiers are found.
3430 */
3431@@ -1724,8 +1731,8 @@
3432
3433 /* in ex mode, an empty line works like :+ */
3434 if (*ea.cmd == NUL && exmode_active
3435- && (getline_equal(getline, cookie, getexmodeline)
3436- || getline_equal(getline, cookie, getexline))
3437+ && (getline_equal(fgetline, cookie, getexmodeline)
3438+ || getline_equal(fgetline, cookie, getexline))
3439 && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
3440 {
3441 ea.cmd = (char_u *)"+";
3442@@ -1914,9 +1921,9 @@
3443 /* Count this line for profiling if ea.skip is FALSE. */
3444 if (do_profiling == PROF_YES && !ea.skip)
3445 {
3446- if (getline_equal(getline, cookie, get_func_line))
3447- func_line_exec(getline_cookie(getline, cookie));
3448- else if (getline_equal(getline, cookie, getsourceline))
3449+ if (getline_equal(fgetline, cookie, get_func_line))
3450+ func_line_exec(getline_cookie(fgetline, cookie));
3451+ else if (getline_equal(fgetline, cookie, getsourceline))
3452 script_line_exec();
3453 }
3454 #endif
3455@@ -2585,7 +2592,7 @@
3456 * The "ea" structure holds the arguments that can be used.
3457 */
3458 ea.cmdlinep = cmdlinep;
3459- ea.getline = getline;
3460+ ea.getline = fgetline;
3461 ea.cookie = cookie;
3462 #ifdef FEAT_EVAL
3463 ea.cstack = cstack;
3464@@ -2623,9 +2630,9 @@
3465 do_throw(cstack);
3466 else if (check_cstack)
3467 {
3468- if (source_finished(getline, cookie))
3469+ if (source_finished(fgetline, cookie))
3470 do_finish(&ea, TRUE);
3471- else if (getline_equal(getline, cookie, get_func_line)
3472+ else if (getline_equal(fgetline, cookie, get_func_line)
3473 && current_func_returned())
3474 do_return(&ea, TRUE, FALSE, NULL);
3475 }
3476@@ -6289,7 +6296,6 @@
3477 exarg_T *eap;
3478 {
3479 tabpage_T *tp;
3480- int h = tabline_height();
3481
3482 # ifdef FEAT_CMDWIN
3483 if (cmdwin_type != 0)
3484@@ -6321,9 +6327,6 @@
3485 )
3486 tabpage_close(eap->forceit);
3487 }
3488-
3489- if (h != tabline_height())
3490- shell_new_rows();
3491 }
3492
3493 /*
3494@@ -6335,7 +6338,6 @@
3495 {
3496 tabpage_T *tp;
3497 int done;
3498- int h = tabline_height();
3499
3500 # ifdef FEAT_CMDWIN
3501 if (cmdwin_type != 0)
3502@@ -6364,9 +6366,6 @@
3503 break;
3504 }
3505 }
3506-
3507- if (h != tabline_height())
3508- shell_new_rows();
3509 }
3510
3511 /*
3512@@ -6390,6 +6389,8 @@
3513 /*
3514 * Close tab page "tp", which is not the current tab page.
3515 * Note that autocommands may make "tp" invalid.
3516+ * Also takes care of the tab pages line disappearing when closing the
3517+ * last-but-one tab page.
3518 */
3519 void
3520 tabpage_close_other(tp, forceit)
3521@@ -6398,6 +6399,7 @@
3522 {
3523 int done = 0;
3524 win_T *wp;
3525+ int h = tabline_height();
3526
3527 /* Limit to 1000 windows, autocommands may add a window while we close
3528 * one. OK, so I'm paranoid... */
3529@@ -6411,7 +6413,10 @@
3530 if (!valid_tabpage(tp) || tp->tp_firstwin == wp)
3531 break;
3532 }
3533+
3534 redraw_tabline = TRUE;
3535+ if (h != tabline_height())
3536+ shell_new_rows();
3537 }
3538
3539 /*
3540@@ -8417,6 +8422,15 @@
3541 else
3542 EMSG2(_(e_invarg2), eap->arg);
3543 }
3544+
3545+ /* Make sure redirection is not off. Can happen for cmdline completion
3546+ * that indirectly invokes a command to catch its output. */
3547+ if (redir_fd != NULL
3548+#ifdef FEAT_EVAL
3549+ || redir_reg || redir_vname
3550+#endif
3551+ )
3552+ redir_off = FALSE;
3553 }
3554
3555 /*
3556diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c
3557--- vim70.orig/src/ex_getln.c 2006-04-30 08:32:01.000000000 -0700
[9903b4e]3558+++ vim70/src/ex_getln.c 2006-09-18 08:55:55.000000000 -0700
[d28a23b]3559@@ -324,6 +324,9 @@
3560 */
3561 for (;;)
3562 {
3563+ redir_off = TRUE; /* Don't redirect the typed command.
3564+ Repeated, because a ":redir" inside
3565+ completion may switch it on. */
3566 #ifdef USE_ON_FLY_SCROLL
3567 dont_scroll = FALSE; /* allow scrolling here */
3568 #endif
[9903b4e]3569@@ -1753,6 +1756,11 @@
3570 end_pos = curwin->w_cursor; /* shutup gcc 4 */
3571
3572 validate_cursor();
3573+# ifdef FEAT_WINDOWS
3574+ /* May redraw the status line to show the cursor position. */
3575+ if (p_ru && curwin->w_status_height > 0)
3576+ curwin->w_redr_status = TRUE;
3577+# endif
3578
3579 save_cmdline(&save_ccline);
3580 update_screen(SOME_VALID);
3581@@ -2360,7 +2368,7 @@
3582 {
3583 if ((State & CMDLINE)
3584 && xic != NULL
3585- && im_get_status()
3586+ /* && im_get_status() doesn't work when using SCIM */
3587 && !p_imdisable
3588 && im_is_preediting())
3589 {
3590@@ -4521,7 +4529,9 @@
[d28a23b]3591 flags |= EW_FILE | EW_EXEC;
3592
3593 /* For an absolute name we don't use $PATH. */
3594- if ((pat[0] == '.' && (vim_ispathsep(pat[1])
3595+ if (mch_isFullName(pat))
3596+ path = (char_u *)" ";
3597+ else if ((pat[0] == '.' && (vim_ispathsep(pat[1])
3598 || (pat[1] == '.' && vim_ispathsep(pat[2])))))
3599 path = (char_u *)".";
3600 else
[9903b4e]3601@@ -4534,6 +4544,9 @@
[d28a23b]3602 ga_init2(&ga, (int)sizeof(char *), 10);
3603 for (s = path; *s != NUL; s = e)
3604 {
3605+ if (*s == ' ')
3606+ ++s; /* Skip space used for absolute path name. */
3607+
3608 #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
3609 e = vim_strchr(s, ';');
3610 #else
[9903b4e]3611@@ -5982,6 +5995,8 @@
[d28a23b]3612 typestr[0] = cmdwin_type;
3613 typestr[1] = NUL;
3614 apply_autocmds(EVENT_CMDWINENTER, typestr, typestr, FALSE, curbuf);
3615+ if (restart_edit != 0) /* autocmd with ":startinsert" */
3616+ stuffcharReadbuff(K_NOP);
3617 # endif
3618
3619 i = RedrawingDisabled;
3620diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c
3621--- vim70.orig/src/fileio.c 2006-04-30 08:28:57.000000000 -0700
[9903b4e]3622+++ vim70/src/fileio.c 2006-09-18 08:55:16.000000000 -0700
[d28a23b]3623@@ -316,6 +316,9 @@
3624 * display the line. */
3625 ex_no_reprint = TRUE;
3626
3627+ /* don't display the file info for another buffer now */
3628+ need_fileinfo = FALSE;
3629+
3630 /*
3631 * For Unix: Use the short file name whenever possible.
3632 * Avoids problems with networks and when directory names are changed.
3633@@ -6450,17 +6453,10 @@
3634 int old_ro = buf->b_p_ro;
3635 buf_T *savebuf;
3636 int saved = OK;
3637-#ifdef FEAT_AUTOCMD
3638 aco_save_T aco;
3639
3640 /* set curwin/curbuf for "buf" and save some things */
3641 aucmd_prepbuf(&aco, buf);
3642-#else
3643- buf_T *save_curbuf = curbuf;
3644-
3645- curbuf = buf;
3646- curwin->w_buffer = buf;
3647-#endif
3648
3649 /* We only want to read the text from the file, not reset the syntax
3650 * highlighting, clear marks, diff status, etc. Force the fileformat
3651@@ -6573,14 +6569,9 @@
3652 curbuf->b_p_ro |= old_ro;
3653 }
3654
3655-#ifdef FEAT_AUTOCMD
3656 /* restore curwin/curbuf and a few other things */
3657 aucmd_restbuf(&aco);
3658 /* Careful: autocommands may have made "buf" invalid! */
3659-#else
3660- curwin->w_buffer = save_curbuf;
3661- curbuf = save_curbuf;
3662-#endif
3663 }
3664
3665 /*ARGSUSED*/
3666@@ -6992,6 +6983,7 @@
3667 {"FocusLost", EVENT_FOCUSLOST},
3668 {"FuncUndefined", EVENT_FUNCUNDEFINED},
3669 {"GUIEnter", EVENT_GUIENTER},
3670+ {"GUIFailed", EVENT_GUIFAILED},
3671 {"InsertChange", EVENT_INSERTCHANGE},
3672 {"InsertEnter", EVENT_INSERTENTER},
3673 {"InsertLeave", EVENT_INSERTLEAVE},
3674@@ -8088,6 +8080,7 @@
3675 * Search a window for the current buffer. Save the cursor position and
3676 * screen offset.
3677 * Set "curbuf" and "curwin" to match "buf".
3678+ * When FEAT_AUTOCMD is not defined another version is used, see below.
3679 */
3680 void
3681 aucmd_prepbuf(aco, buf)
3682@@ -8151,6 +8144,7 @@
3683 /*
3684 * Cleanup after executing autocommands for a (hidden) buffer.
3685 * Restore the window as it was (if possible).
3686+ * When FEAT_AUTOCMD is not defined another version is used, see below.
3687 */
3688 void
3689 aucmd_restbuf(aco)
[9903b4e]3690@@ -8295,7 +8289,11 @@
3691 {
3692 int state;
3693
3694- if (!did_cursorhold && has_cursorhold() && !Recording)
3695+ if (!did_cursorhold && has_cursorhold() && !Recording
3696+#ifdef FEAT_INS_EXPAND
3697+ && !ins_compl_active()
3698+#endif
3699+ )
3700 {
3701 state = get_real_state();
3702 if (state == NORMAL_BUSY || (state & INSERT) != 0)
3703@@ -9063,8 +9061,38 @@
[d28a23b]3704 return retval;
3705 }
3706
3707+#else /* FEAT_AUTOCMD */
3708+
3709+/*
3710+ * Prepare for executing commands for (hidden) buffer "buf".
3711+ * This is the non-autocommand version, it simply saves "curbuf" and sets
3712+ * "curbuf" and "curwin" to match "buf".
3713+ */
3714+ void
3715+aucmd_prepbuf(aco, buf)
3716+ aco_save_T *aco; /* structure to save values in */
3717+ buf_T *buf; /* new curbuf */
3718+{
3719+ aco->save_buf = buf;
3720+ curbuf = buf;
3721+ curwin->w_buffer = buf;
3722+}
3723+
3724+/*
3725+ * Restore after executing commands for a (hidden) buffer.
3726+ * This is the non-autocommand version.
3727+ */
3728+ void
3729+aucmd_restbuf(aco)
3730+ aco_save_T *aco; /* structure holding saved values */
3731+{
3732+ curbuf = aco->save_buf;
3733+ curwin->w_buffer = curbuf;
3734+}
3735+
3736 #endif /* FEAT_AUTOCMD */
3737
3738+
3739 #if defined(FEAT_AUTOCMD) || defined(FEAT_WILDIGN) || defined(PROTO)
3740 /*
3741 * Try matching a filename with a "pattern" ("prog" is NULL), or use the
3742diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c
3743--- vim70.orig/src/getchar.c 2006-05-03 10:29:21.000000000 -0700
3744+++ vim70/src/getchar.c 2006-09-11 09:00:04.000000000 -0700
3745@@ -1451,7 +1451,8 @@
3746 {
3747 updatescript(0);
3748 #ifdef FEAT_EVAL
3749- garbage_collect();
3750+ if (may_garbage_collect)
3751+ garbage_collect();
3752 #endif
3753 }
3754
3755@@ -1502,6 +1503,13 @@
3756 int i;
3757 #endif
3758
3759+#ifdef FEAT_EVAL
3760+ /* Do garbage collection when garbagecollect() was called previously and
3761+ * we are now at the toplevel. */
3762+ if (may_garbage_collect && want_garbage_collect)
3763+ garbage_collect();
3764+#endif
3765+
3766 /*
3767 * If a character was put back with vungetc, it was already processed.
3768 * Return it directly.
3769@@ -1511,13 +1519,13 @@
3770 c = old_char;
3771 old_char = -1;
3772 mod_mask = old_mod_mask;
3773- return c;
3774 }
3775-
3776- mod_mask = 0x0;
3777- last_recorded_len = 0;
3778- for (;;) /* this is done twice if there are modifiers */
3779+ else
3780 {
3781+ mod_mask = 0x0;
3782+ last_recorded_len = 0;
3783+ for (;;) /* this is done twice if there are modifiers */
3784+ {
3785 if (mod_mask) /* no mapping after modifier has been read */
3786 {
3787 ++no_mapping;
3788@@ -1695,8 +1703,20 @@
3789 }
3790 #endif
3791
3792- return c;
3793+ break;
3794+ }
3795 }
3796+
3797+#ifdef FEAT_EVAL
3798+ /*
3799+ * In the main loop "may_garbage_collect" can be set to do garbage
3800+ * collection in the first next vgetc(). It's disabled after that to
3801+ * avoid internally used Lists and Dicts to be freed.
3802+ */
3803+ may_garbage_collect = FALSE;
3804+#endif
3805+
3806+ return c;
3807 }
3808
3809 /*
3810diff -Naur vim70.orig/src/globals.h vim70/src/globals.h
3811--- vim70.orig/src/globals.h 2006-04-30 06:16:23.000000000 -0700
3812+++ vim70/src/globals.h 2006-09-11 09:00:04.000000000 -0700
3813@@ -300,9 +300,16 @@
3814 #endif
3815
3816 #ifdef FEAT_EVAL
3817-EXTERN scid_T current_SID INIT(= 0); /* ID of script being sourced or
3818- was sourced to define the
3819- current function. */
3820+/* Garbage collection can only take place when we are sure there are no Lists
3821+ * or Dictionaries being used internally. This is flagged with
3822+ * "may_garbage_collect" when we are at the toplevel.
3823+ * "want_garbage_collect" is set by the garbagecollect() function, which means
3824+ * we do garbage collection before waiting for a char at the toplevel. */
3825+EXTERN int may_garbage_collect INIT(= FALSE);
3826+EXTERN int want_garbage_collect INIT(= FALSE);
3827+
3828+/* ID of script being sourced or was sourced to define the current function. */
3829+EXTERN scid_T current_SID INIT(= 0);
3830 #endif
3831
3832 #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL)
3833@@ -1441,7 +1448,7 @@
3834 EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to override)"));
3835 #ifdef FEAT_EVAL
3836 EXTERN char_u e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable \"%s\""));
3837-EXTERN char_u e_readonlysbx[] INIT(= N_("E46: Cannot set variable in the sandbox: \"%s\""));
3838+EXTERN char_u e_readonlysbx[] INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\""));
3839 #endif
3840 #ifdef FEAT_QUICKFIX
3841 EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
3842diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
3843--- vim70.orig/src/gui_at_fs.c 2005-07-09 04:30:17.000000000 -0700
3844+++ vim70/src/gui_at_fs.c 2006-07-14 08:51:21.000000000 -0700
3845@@ -1861,27 +1861,27 @@
3846 XtPointer pnew;
3847 {
3848 SFDir *dir;
3849- int nw;
3850+ int nw = (int)(long)pnew;
3851
3852 dir = &(SFdirs[SFdirPtr + (int)(long)n]);
3853
3854 #ifdef FEAT_GUI_NEXTAW
3855- if ((int)(long)pnew < 0)
3856+ if (nw < 0)
3857 {
3858- if ((int)(long)pnew > -SFvScrollHeight)
3859- (int)(long)pnew = -1;
3860+ if (nw > -SFvScrollHeight)
3861+ nw = -1;
3862 else
3863- (int)(long)pnew = -SFlistSize;
3864+ nw = -SFlistSize;
3865 }
3866- else if ((int)(long)pnew > 0)
3867+ else if (nw > 0)
3868 {
3869- if ((int)(long)pnew < SFvScrollHeight)
3870- (int)(long)pnew = 1;
3871+ if (nw < SFvScrollHeight)
3872+ nw = 1;
3873 else
3874- (int)(long)pnew = SFlistSize;
3875+ nw = SFlistSize;
3876 }
3877 #endif
3878- nw = dir->vOrigin + (int)(long)pnew;
3879+ nw += dir->vOrigin;
3880
3881 if (nw > dir->nEntries - SFlistSize)
3882 nw = dir->nEntries - SFlistSize;
3883@@ -1941,27 +1941,27 @@
3884 XtPointer pnew;
3885 {
3886 SFDir *dir;
3887- int nw;
3888+ int nw = (int)(long)pnew;
3889
3890 dir = &(SFdirs[SFdirPtr + (int)(long)n]);
3891
3892 #ifdef FEAT_GUI_NEXTAW
3893- if ((int)(long)pnew < 0)
3894+ if (nw < 0)
3895 {
3896- if ((int)(long)pnew > -SFhScrollWidth)
3897- (int)(long)pnew = -1;
3898+ if (nw > -SFhScrollWidth)
3899+ nw = -1;
3900 else
3901- (int)(long)pnew = -SFcharsPerEntry;
3902+ nw = -SFcharsPerEntry;
3903 }
3904- else if ((int)(long)pnew > 0)
3905+ else if (nw > 0)
3906 {
3907- if ((int)(long)pnew < SFhScrollWidth)
3908- (int)(long)pnew = 1;
3909+ if (nw < SFhScrollWidth)
3910+ nw = 1;
3911 else
3912- (int)(long)pnew = SFcharsPerEntry;
3913+ nw = SFcharsPerEntry;
3914 }
3915 #endif
3916- nw = dir->hOrigin + (int)(long)pnew;
3917+ nw += dir->hOrigin;
3918
3919 if (nw > dir->nChars - SFcharsPerEntry)
3920 nw = dir->nChars - SFcharsPerEntry;
3921@@ -2038,26 +2038,26 @@
3922 XtPointer client_data;
3923 XtPointer pnew;
3924 {
3925- int nw;
3926+ int nw = (int)(long)pnew;
3927 float f;
3928
3929 #ifdef FEAT_GUI_NEXTAW
3930- if ((int)(long)pnew < 0)
3931+ if (nw < 0)
3932 {
3933- if ((int)(long)pnew > -SFpathScrollWidth)
3934- (int)(long)pnew = -1;
3935+ if (nw > -SFpathScrollWidth)
3936+ nw = -1;
3937 else
3938- (int)(long)pnew = -3;
3939+ nw = -3;
3940 }
3941- else if ((int)(long)pnew > 0)
3942+ else if (nw > 0)
3943 {
3944- if ((int)(long)pnew < SFpathScrollWidth)
3945- (int)(long)pnew = 1;
3946+ if (nw < SFpathScrollWidth)
3947+ nw = 1;
3948 else
3949- (int)(long)pnew = 3;
3950+ nw = 3;
3951 }
3952 #endif
3953- nw = SFdirPtr + (int)(long)pnew;
3954+ nw += SFdirPtr;
3955
3956 if (nw > SFdirEnd - 3)
3957 nw = SFdirEnd - 3;
3958diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c
3959--- vim70.orig/src/gui_beval.c 2006-05-04 12:29:51.000000000 -0700
3960+++ vim70/src/gui_beval.c 2006-09-11 08:23:15.000000000 -0700
3961@@ -926,7 +926,7 @@
3962 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
3963 || (c) == DEL)
3964 static void
3965-set_printable_label_text(GtkLabel *label, char_u *msg)
3966+set_printable_label_text(GtkLabel *label, char_u *text)
3967 {
3968 char_u *convbuf = NULL;
3969 char_u *buf;
3970@@ -940,14 +940,14 @@
3971 /* Convert to UTF-8 if it isn't already */
3972 if (output_conv.vc_type != CONV_NONE)
3973 {
3974- convbuf = string_convert(&output_conv, msg, NULL);
3975+ convbuf = string_convert(&output_conv, text, NULL);
3976 if (convbuf != NULL)
3977- msg = convbuf;
3978+ text = convbuf;
3979 }
3980
3981 /* First let's see how much we need to allocate */
3982 len = 0;
3983- for (p = msg; *p != NUL; p += charlen)
3984+ for (p = text; *p != NUL; p += charlen)
3985 {
3986 if ((*p & 0x80) == 0) /* be quick for ASCII */
3987 {
3988@@ -992,7 +992,7 @@
3989 (unsigned long)pixel, &color);
3990
3991 pdest = buf;
3992- p = msg;
3993+ p = text;
3994 while (*p != NUL)
3995 {
3996 /* Be quick for ASCII */
3997diff -Naur vim70.orig/src/gui.c vim70/src/gui.c
3998--- vim70.orig/src/gui.c 2006-05-03 04:00:59.000000000 -0700
3999+++ vim70/src/gui.c 2006-09-11 09:28:13.000000000 -0700
4000@@ -187,9 +187,10 @@
4001 #endif
4002
4003 #ifdef FEAT_AUTOCMD
4004- /* If the GUI started successfully, trigger the GUIEnter event */
4005- if (gui.in_use)
4006- apply_autocmds(EVENT_GUIENTER, NULL, NULL, FALSE, curbuf);
4007+ /* If the GUI started successfully, trigger the GUIEnter event, otherwise
4008+ * the GUIFailed event. */
4009+ apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
4010+ NULL, NULL, FALSE, curbuf);
4011 #endif
4012
4013 --recursive;
4014@@ -3733,6 +3734,12 @@
4015 if (dont_scroll || input_available())
4016 return;
4017 #endif
4018+#ifdef FEAT_INS_EXPAND
4019+ /* Disallow scrolling the current window when the completion popup menu is
4020+ * visible. */
4021+ if ((sb->wp == NULL || sb->wp == curwin) && pum_visible())
4022+ return;
4023+#endif
4024
4025 #ifdef FEAT_RIGHTLEFT
4026 if (sb->wp == NULL && curwin->w_p_rl)
4027@@ -4207,6 +4214,12 @@
4028 updateWindow(wp); /* update window, status line, and cmdline */
4029 }
4030
4031+#ifdef FEAT_INS_EXPAND
4032+ /* May need to redraw the popup menu. */
4033+ if (pum_visible())
4034+ pum_redraw();
4035+#endif
4036+
4037 return (wp == curwin && !equalpos(curwin->w_cursor, old_cursor));
4038 }
4039
4040@@ -4515,7 +4528,7 @@
4041 int y;
4042 {
4043 win_T *wp;
4044- char_u st[6];
4045+ char_u st[8];
4046
4047 /* Ignore this while still starting up. */
4048 if (!gui.in_use || gui.starting)
4049@@ -4603,11 +4616,11 @@
4050 /* Don't move the mouse when it's left or right of the Vim window */
4051 if (x < 0 || x > Columns * gui.char_width)
4052 return;
4053+ if (y >= 0
4054 # ifdef FEAT_WINDOWS
4055- if (Y_2_ROW(y) >= tabline_height())
4056-# else
4057- if (y >= 0)
4058+ && Y_2_ROW(y) >= tabline_height()
4059 # endif
4060+ )
4061 wp = xy2win(x, y);
4062 if (wp != curwin && wp != NULL) /* If in other than current window */
4063 {
4064diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c
4065--- vim70.orig/src/gui_gtk.c 2006-05-05 04:52:52.000000000 -0700
4066+++ vim70/src/gui_gtk.c 2006-09-11 08:23:15.000000000 -0700
4067@@ -957,15 +957,15 @@
4068 get_menu_position(vimmenu_T *menu)
4069 {
4070 vimmenu_T *node;
4071- int index = 0;
4072+ int idx = 0;
4073
4074 for (node = menu->parent->children; node != menu; node = node->next)
4075 {
4076 g_return_val_if_fail(node != NULL, -1);
4077- ++index;
4078+ ++idx;
4079 }
4080
4081- return index;
4082+ return idx;
4083 }
4084 #endif /* FEAT_TOOLBAR && HAVE_GTK2 */
4085
4086@@ -2127,7 +2127,7 @@
4087 char **ync; /* "yes no cancel" */
4088 char **buttons;
4089 int n_buttons = 0;
4090- int index;
4091+ int idx;
4092
4093 button_string = vim_strsave(button_string); /* must be writable */
4094 if (button_string == NULL)
4095@@ -2161,12 +2161,12 @@
4096 * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the
4097 * other way around...
4098 */
4099- for (index = 1; index <= n_buttons; ++index)
4100+ for (idx = 1; idx <= n_buttons; ++idx)
4101 {
4102 char *label;
4103 char_u *label8;
4104
4105- label = buttons[index - 1];
4106+ label = buttons[idx - 1];
4107 /*
4108 * Perform some guesswork to find appropriate stock items for the
4109 * buttons. We have to compare with a sample of the translated
4110@@ -2188,7 +2188,7 @@
4111 else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL;
4112 }
4113 label8 = CONVERT_TO_UTF8((char_u *)label);
4114- gtk_dialog_add_button(dialog, (const gchar *)label8, index);
4115+ gtk_dialog_add_button(dialog, (const gchar *)label8, idx);
4116 CONVERT_TO_UTF8_FREE(label8);
4117 }
4118
4119diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c
4120--- vim70.orig/src/gui_gtk_x11.c 2006-05-04 23:58:59.000000000 -0700
4121+++ vim70/src/gui_gtk_x11.c 2006-09-11 08:23:16.000000000 -0700
4122@@ -3233,12 +3233,12 @@
4123 on_select_tab(
4124 GtkNotebook *notebook,
4125 GtkNotebookPage *page,
4126- gint index,
4127+ gint idx,
4128 gpointer data)
4129 {
4130 if (!ignore_tabline_evt)
4131 {
4132- if (send_tabline_event(index + 1) && gtk_main_level() > 0)
4133+ if (send_tabline_event(idx + 1) && gtk_main_level() > 0)
4134 gtk_main_quit();
4135 }
4136 }
4137@@ -5303,13 +5303,13 @@
4138 # ifdef HAVE_GTK2
4139 if (font != NOFONT)
4140 {
4141- char *name = pango_font_description_to_string(font);
4142+ char *pangoname = pango_font_description_to_string(font);
4143
4144- if (name != NULL)
4145+ if (pangoname != NULL)
4146 {
4147- char_u *s = vim_strsave((char_u *)name);
4148+ char_u *s = vim_strsave((char_u *)pangoname);
4149
4150- g_free(name);
4151+ g_free(pangoname);
4152 return s;
4153 }
4154 }
4155@@ -6241,24 +6241,20 @@
4156 {
4157 GdkGCValues values;
4158 GdkGC *invert_gc;
4159- GdkColor foreground;
4160- GdkColor background;
4161
4162 if (gui.drawarea->window == NULL)
4163 return;
4164
4165- foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
4166- background.pixel = gui.norm_pixel ^ gui.back_pixel;
4167-
4168- values.foreground = foreground;
4169- values.background = background;
4170+ values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
4171+ values.background.pixel = gui.norm_pixel ^ gui.back_pixel;
4172 values.function = GDK_XOR;
4173 invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
4174 &values,
4175 GDK_GC_FOREGROUND |
4176 GDK_GC_BACKGROUND |
4177 GDK_GC_FUNCTION);
4178- gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED);
4179+ gdk_gc_set_exposures(invert_gc, gui.visibility !=
4180+ GDK_VISIBILITY_UNOBSCURED);
4181 gdk_draw_rectangle(gui.drawarea->window, invert_gc,
4182 TRUE,
4183 FILL_X(c), FILL_Y(r),
4184diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
4185--- vim70.orig/src/gui_xmebw.c 2006-04-30 08:32:32.000000000 -0700
4186+++ vim70/src/gui_xmebw.c 2006-07-14 08:51:21.000000000 -0700
4187@@ -47,13 +47,13 @@
4188 #include "gui_xmebwp.h"
4189
4190 /* Provide some missing wrappers, which are missed from the LessTif
4191- * implementation.
4192+ * implementation. Also missing in Motif 1.2 and earlier.
4193 *
4194 * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the
4195 * pixmap will not appear in it's caches properly. We cache the interresting
4196 * values in XmEnhancedButtonPart instead ourself.
4197 */
4198-#ifdef LESSTIF_VERSION
4199+#if defined(LESSTIF_VERSION) || (XmVersion <= 1002)
4200 # ifndef Lab_IsMenupane
4201 # define Lab_IsMenupane(w) (Lab_MenuType(w) == (int)XmMENU_POPUP || \
4202 Lab_MenuType(w) == (int)XmMENU_PULLDOWN)
4203@@ -480,7 +480,7 @@
4204 || (eb->core.height <= 2 * eb->primitive.highlight_thickness))
4205 return;
4206
4207-#ifndef LESSTIF_VERSION
4208+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4209 {
4210 XmDisplay dpy;
4211
4212@@ -641,7 +641,7 @@
4213 GC tmp_gc = NULL;
4214 Boolean replaceGC = False;
4215 Boolean deadjusted = False;
4216-#ifndef LESSTIF_VERSION
4217+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4218 XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb));
4219 Boolean etched_in = dpy->display.enable_etched_in_menu;
4220 #else
4221@@ -726,7 +726,7 @@
4222 if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up)
4223 && _XmGetInDragMode((Widget) eb))
4224 {
4225-#ifndef LESSTIF_VERSION
4226+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4227 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid));
4228 Boolean etched_in = dpy->display.enable_etched_in_menu;
4229 #else
4230@@ -810,7 +810,7 @@
4231
4232 if (Lab_IsMenupane(eb))
4233 {
4234-#ifndef LESSTIF_VERSION
4235+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4236 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid));
4237 Boolean etched_in = dpy->display.enable_etched_in_menu;
4238 #else
4239@@ -1150,7 +1150,7 @@
4240 Redisplay(Widget w, XEvent *event, Region region)
4241 {
4242 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w;
4243-#ifndef LESSTIF_VERSION
4244+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4245 XmDisplay dpy;
4246 XtEnum default_button_emphasis;
4247 #endif
4248@@ -1162,7 +1162,7 @@
4249 if (!XtIsRealized((Widget)eb))
4250 return;
4251
4252-#ifndef LESSTIF_VERSION
4253+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4254 dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb));
4255 default_button_emphasis = dpy->display.default_button_emphasis;
4256 #endif
4257@@ -1241,7 +1241,7 @@
4258 {
4259 int adjust = 0;
4260
4261-#ifndef LESSTIF_VERSION
4262+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4263 /*
4264 * NOTE: PushButton has two types of shadows: primitive-shadow and
4265 * default-button-shadow. If pushbutton is in a menu only primitive
4266@@ -1289,7 +1289,7 @@
4267 adjust, adjust, rectwidth, rectheight, borderwidth);
4268 }
4269
4270-#ifndef LESSTIF_VERSION
4271+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4272 switch (default_button_emphasis)
4273 {
4274 case XmINTERNAL_HIGHLIGHT:
4275@@ -1365,7 +1365,7 @@
4276 default_button_shadow_thickness =
4277 eb->pushbutton.default_button_shadow_thickness;
4278
4279-#ifndef LESSTIF_VERSION
4280+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4281 /*
4282 * Compute location of bounding box to contain the
4283 * defaultButtonShadow.
4284diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c
4285--- vim70.orig/src/hardcopy.c 2006-05-04 03:09:58.000000000 -0700
4286+++ vim70/src/hardcopy.c 2006-09-11 08:23:16.000000000 -0700
4287@@ -1794,29 +1794,27 @@
4288 static int
4289 prt_resfile_next_line()
4290 {
4291- int index;
4292+ int idx;
4293
4294 /* Move to start of next line and then find end of line */
4295- index = prt_resfile.line_end + 1;
4296- while (index < prt_resfile.len)
4297+ idx = prt_resfile.line_end + 1;
4298+ while (idx < prt_resfile.len)
4299 {
4300- if (prt_resfile.buffer[index] != PSLF && prt_resfile.buffer[index]
4301- != PSCR)
4302+ if (prt_resfile.buffer[idx] != PSLF && prt_resfile.buffer[idx] != PSCR)
4303 break;
4304- index++;
4305+ idx++;
4306 }
4307- prt_resfile.line_start = index;
4308+ prt_resfile.line_start = idx;
4309
4310- while (index < prt_resfile.len)
4311+ while (idx < prt_resfile.len)
4312 {
4313- if (prt_resfile.buffer[index] == PSLF || prt_resfile.buffer[index]
4314- == PSCR)
4315+ if (prt_resfile.buffer[idx] == PSLF || prt_resfile.buffer[idx] == PSCR)
4316 break;
4317- index++;
4318+ idx++;
4319 }
4320- prt_resfile.line_end = index;
4321+ prt_resfile.line_end = idx;
4322
4323- return (index < prt_resfile.len);
4324+ return (idx < prt_resfile.len);
4325 }
4326
4327 static int
4328@@ -1837,14 +1835,14 @@
4329 prt_resfile_skip_nonws(offset)
4330 int offset;
4331 {
4332- int index;
4333+ int idx;
4334
4335- index = prt_resfile.line_start + offset;
4336- while (index < prt_resfile.line_end)
4337+ idx = prt_resfile.line_start + offset;
4338+ while (idx < prt_resfile.line_end)
4339 {
4340- if (isspace(prt_resfile.buffer[index]))
4341- return index - prt_resfile.line_start;
4342- index++;
4343+ if (isspace(prt_resfile.buffer[idx]))
4344+ return idx - prt_resfile.line_start;
4345+ idx++;
4346 }
4347 return -1;
4348 }
4349@@ -1853,14 +1851,14 @@
4350 prt_resfile_skip_ws(offset)
4351 int offset;
4352 {
4353- int index;
4354+ int idx;
4355
4356- index = prt_resfile.line_start + offset;
4357- while (index < prt_resfile.line_end)
4358+ idx = prt_resfile.line_start + offset;
4359+ while (idx < prt_resfile.line_end)
4360 {
4361- if (!isspace(prt_resfile.buffer[index]))
4362- return index - prt_resfile.line_start;
4363- index++;
4364+ if (!isspace(prt_resfile.buffer[idx]))
4365+ return idx - prt_resfile.line_start;
4366+ idx++;
4367 }
4368 return -1;
4369 }
4370@@ -2478,7 +2476,7 @@
4371 char_u *p_encoding;
4372 struct prt_ps_encoding_S *p_mbenc;
4373 struct prt_ps_encoding_S *p_mbenc_first;
4374- struct prt_ps_charset_S *p_mbchar;
4375+ struct prt_ps_charset_S *p_mbchar = NULL;
4376 #endif
4377
4378 #if 0
4379@@ -2516,7 +2514,6 @@
4380 if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE)))
4381 {
4382 p_mbenc_first = NULL;
4383- p_mbchar = NULL;
4384 for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
4385 if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
4386 &p_mbenc))
4387diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c
4388--- vim70.orig/src/if_cscope.c 2006-04-18 01:54:15.000000000 -0700
4389+++ vim70/src/if_cscope.c 2006-09-11 08:23:16.000000000 -0700
4390@@ -989,8 +989,7 @@
4391 {
4392 int i;
4393 char *cmd;
4394- char **matches, **contexts;
4395- int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches, matched;
4396+ int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches;
4397 #ifdef FEAT_QUICKFIX
4398 char cmdletter;
4399 char *qfpos;
4400@@ -1141,6 +1140,9 @@
4401 else
4402 #endif /* FEAT_QUICKFIX */
4403 {
4404+ char **matches = NULL, **contexts = NULL;
4405+ int matched = 0;
4406+
4407 /* read output */
4408 cs_fill_results((char *)pat, totmatches, nummatches, &matches,
4409 &contexts, &matched);
4410diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs
4411--- vim70.orig/src/if_perl.xs 2006-03-06 10:57:16.000000000 -0800
4412+++ vim70/src/if_perl.xs 2006-08-19 16:39:02.000000000 -0700
4413@@ -155,8 +155,8 @@
4414 static int (*perl_run)(PerlInterpreter*);
4415 static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
4416 static void* (*Perl_get_context)(void);
4417-static void (*Perl_croak)(pTHX_ const char*, ...) __attribute__((noreturn));
4418-static void (*Perl_croak_nocontext)(const char*, ...) __attribute__((noreturn));
4419+static void (*Perl_croak)(pTHX_ const char*, ...);
4420+static void (*Perl_croak_nocontext)(const char*, ...);
4421 static I32 (*Perl_dowantarray)(pTHX);
4422 static void (*Perl_free_tmps)(pTHX);
4423 static HV* (*Perl_gv_stashpv)(pTHX_ const char*, I32);
4424@@ -1056,7 +1056,6 @@
4425 int i;
4426 long lnum;
4427 char *line;
4428- buf_T *savebuf;
4429 PPCODE:
4430 if (buf_valid(vimbuf))
4431 {
4432@@ -1069,14 +1068,20 @@
4433 line = SvPV(ST(i),PL_na);
4434 if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL)
4435 {
4436- savebuf = curbuf;
4437- curbuf = vimbuf;
4438+ aco_save_T aco;
4439+
4440+ /* set curwin/curbuf for "vimbuf" and save some things */
4441+ aucmd_prepbuf(&aco, vimbuf);
4442+
4443 if (u_savesub(lnum) == OK)
4444 {
4445 ml_replace(lnum, (char_u *)line, TRUE);
4446 changed_bytes(lnum, 0);
4447 }
4448- curbuf = savebuf;
4449+
4450+ /* restore curwin/curbuf and a few other things */
4451+ aucmd_restbuf(&aco);
4452+ /* Careful: autocommands may have made "vimbuf" invalid! */
4453 }
4454 }
4455 }
4456@@ -1087,7 +1092,6 @@
4457
4458 PREINIT:
4459 long i, lnum = 0, count = 0;
4460- buf_T *savebuf;
4461 PPCODE:
4462 if (buf_valid(vimbuf))
4463 {
4464@@ -1114,16 +1118,23 @@
4465 {
4466 if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count)
4467 {
4468- savebuf = curbuf;
4469- curbuf = vimbuf;
4470+ aco_save_T aco;
4471+
4472+ /* set curwin/curbuf for "vimbuf" and save some things */
4473+ aucmd_prepbuf(&aco, vimbuf);
4474+
4475 if (u_savedel(lnum, 1) == OK)
4476 {
4477 ml_delete(lnum, 0);
4478 deleted_lines_mark(lnum, 1L);
4479- if (savebuf == curbuf)
4480+ if (aco.save_buf == curbuf)
4481 check_cursor();
4482 }
4483- curbuf = savebuf;
4484+
4485+ /* restore curwin/curbuf and a few other things */
4486+ aucmd_restbuf(&aco);
4487+ /* Careful: autocommands may have made "vimbuf" invalid! */
4488+
4489 update_curbuf(VALID);
4490 }
4491 }
4492@@ -1138,7 +1149,6 @@
4493 int i;
4494 long lnum;
4495 char *line;
4496- buf_T *savebuf;
4497 PPCODE:
4498 if (buf_valid(vimbuf))
4499 {
4500@@ -1151,14 +1161,21 @@
4501 line = SvPV(ST(i),PL_na);
4502 if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL)
4503 {
4504- savebuf = curbuf;
4505- curbuf = vimbuf;
4506+ aco_save_T aco;
4507+
4508+ /* set curwin/curbuf for "vimbuf" and save some things */
4509+ aucmd_prepbuf(&aco, vimbuf);
4510+
4511 if (u_inssub(lnum + 1) == OK)
4512 {
4513 ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE);
4514 appended_lines_mark(lnum, 1L);
4515 }
4516- curbuf = savebuf;
4517+
4518+ /* restore curwin/curbuf and a few other things */
4519+ aucmd_restbuf(&aco);
4520+ /* Careful: autocommands may have made "vimbuf" invalid! */
4521+
4522 update_curbuf(VALID);
4523 }
4524 }
4525diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c
4526--- vim70.orig/src/if_ruby.c 2006-04-30 08:37:52.000000000 -0700
4527+++ vim70/src/if_ruby.c 2006-08-19 16:39:01.000000000 -0700
4528@@ -643,11 +643,14 @@
4529
4530 static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str)
4531 {
4532- buf_T *savebuf = curbuf;
4533- char *line = STR2CSTR(str);
4534+ char *line = STR2CSTR(str);
4535+ aco_save_T aco;
4536+
4537+ if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL)
4538+ {
4539+ /* set curwin/curbuf for "buf" and save some things */
4540+ aucmd_prepbuf(&aco, buf);
4541
4542- if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) {
4543- curbuf = buf;
4544 if (u_savesub(n) == OK) {
4545 ml_replace(n, (char_u *)line, TRUE);
4546 changed();
4547@@ -655,10 +658,15 @@
4548 syn_changed(n); /* recompute syntax hl. for this line */
4549 #endif
4550 }
4551- curbuf = savebuf;
4552+
4553+ /* restore curwin/curbuf and a few other things */
4554+ aucmd_restbuf(&aco);
4555+ /* Careful: autocommands may have made "buf" invalid! */
4556+
4557 update_curbuf(NOT_VALID);
4558 }
4559- else {
4560+ else
4561+ {
4562 rb_raise(rb_eIndexError, "index %d out of buffer", n);
4563 return Qnil; /* For stop warning */
4564 }
4565@@ -676,12 +684,15 @@
4566
4567 static VALUE buffer_delete(VALUE self, VALUE num)
4568 {
4569- buf_T *buf = get_buf(self);
4570- buf_T *savebuf = curbuf;
4571- long n = NUM2LONG(num);
4572+ buf_T *buf = get_buf(self);
4573+ long n = NUM2LONG(num);
4574+ aco_save_T aco;
4575+
4576+ if (n > 0 && n <= buf->b_ml.ml_line_count)
4577+ {
4578+ /* set curwin/curbuf for "buf" and save some things */
4579+ aucmd_prepbuf(&aco, buf);
4580
4581- if (n > 0 && n <= buf->b_ml.ml_line_count) {
4582- curbuf = buf;
4583 if (u_savedel(n, 1) == OK) {
4584 ml_delete(n, 0);
4585
4586@@ -691,10 +702,15 @@
4587
4588 changed();
4589 }
4590- curbuf = savebuf;
4591+
4592+ /* restore curwin/curbuf and a few other things */
4593+ aucmd_restbuf(&aco);
4594+ /* Careful: autocommands may have made "buf" invalid! */
4595+
4596 update_curbuf(NOT_VALID);
4597 }
4598- else {
4599+ else
4600+ {
4601 rb_raise(rb_eIndexError, "index %d out of buffer", n);
4602 }
4603 return Qnil;
4604@@ -702,13 +718,16 @@
4605
4606 static VALUE buffer_append(VALUE self, VALUE num, VALUE str)
4607 {
4608- buf_T *buf = get_buf(self);
4609- buf_T *savebuf = curbuf;
4610- char *line = STR2CSTR(str);
4611- long n = NUM2LONG(num);
4612+ buf_T *buf = get_buf(self);
4613+ char *line = STR2CSTR(str);
4614+ long n = NUM2LONG(num);
4615+ aco_save_T aco;
4616+
4617+ if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL)
4618+ {
4619+ /* set curwin/curbuf for "buf" and save some things */
4620+ aucmd_prepbuf(&aco, buf);
4621
4622- if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) {
4623- curbuf = buf;
4624 if (u_inssub(n + 1) == OK) {
4625 ml_append(n, (char_u *) line, (colnr_T) 0, FALSE);
4626
4627@@ -718,7 +737,11 @@
4628
4629 changed();
4630 }
4631- curbuf = savebuf;
4632+
4633+ /* restore curwin/curbuf and a few other things */
4634+ aucmd_restbuf(&aco);
4635+ /* Careful: autocommands may have made "buf" invalid! */
4636+
4637 update_curbuf(NOT_VALID);
4638 }
4639 else {
4640diff -Naur vim70.orig/src/macros.h vim70/src/macros.h
4641--- vim70.orig/src/macros.h 2006-03-01 04:01:10.000000000 -0800
4642+++ vim70/src/macros.h 2006-09-11 09:01:59.000000000 -0700
4643@@ -276,3 +276,9 @@
4644 # define MB_CHARLEN(p) STRLEN(p)
4645 # define PTR2CHAR(p) ((int)*(p))
4646 #endif
4647+
4648+#ifdef FEAT_AUTOCHDIR
4649+# define DO_AUTOCHDIR if (p_acd) do_autochdir();
4650+#else
4651+# define DO_AUTOCHDIR
4652+#endif
4653diff -Naur vim70.orig/src/main.c vim70/src/main.c
4654--- vim70.orig/src/main.c 2006-05-03 10:36:44.000000000 -0700
4655+++ vim70/src/main.c 2006-09-11 09:00:04.000000000 -0700
4656@@ -564,7 +564,11 @@
4657 */
4658 if (p_lpl)
4659 {
4660+# ifdef VMS /* Somehow VMS doesn't handle the "**". */
4661+ source_runtime((char_u *)"plugin/*.vim", TRUE);
4662+# else
4663 source_runtime((char_u *)"plugin/**/*.vim", TRUE);
4664+# endif
4665 TIME_MSG("loading plugins");
4666 }
4667 #endif
4668@@ -1126,6 +1130,16 @@
4669 */
4670 update_curswant();
4671
4672+#ifdef FEAT_EVAL
4673+ /*
4674+ * May perform garbage collection when waiting for a character, but
4675+ * only at the very toplevel. Otherwise we may be using a List or
4676+ * Dict internally somewhere.
4677+ * "may_garbage_collect" is reset in vgetc() which is invoked through
4678+ * do_exmode() and normal_cmd().
4679+ */
4680+ may_garbage_collect = (!cmdwin && !noexmode);
4681+#endif
4682 /*
4683 * If we're invoked as ex, do a round of ex commands.
4684 * Otherwise, get and execute a normal mode command.
4685@@ -2281,7 +2295,7 @@
4686 mparm_T *parmp;
4687 {
4688 #ifdef FEAT_WINDOWS
4689- int rewind;
4690+ int dorewind;
4691 int done = 0;
4692
4693 /*
4694@@ -2338,10 +2352,10 @@
4695 ++autocmd_no_leave;
4696 #endif
4697 #ifdef FEAT_WINDOWS
4698- rewind = TRUE;
4699+ dorewind = TRUE;
4700 while (done++ < 1000)
4701 {
4702- if (rewind)
4703+ if (dorewind)
4704 {
4705 if (parmp->window_layout == WIN_TABS)
4706 goto_tabpage(1);
4707@@ -2360,7 +2374,7 @@
4708 break;
4709 curwin = curwin->w_next;
4710 }
4711- rewind = FALSE;
4712+ dorewind = FALSE;
4713 #endif
4714 curbuf = curwin->w_buffer;
4715 if (curbuf->b_ml.ml_mfp == NULL)
4716@@ -2381,7 +2395,7 @@
4717 check_swap_exists_action();
4718 #endif
4719 #ifdef FEAT_AUTOCMD
4720- rewind = TRUE; /* start again */
4721+ dorewind = TRUE; /* start again */
4722 #endif
4723 }
4724 #ifdef FEAT_WINDOWS
4725@@ -3208,10 +3222,15 @@
4726 * Register for remote command execution with :serversend and --remote
4727 * unless there was a -X or a --servername '' on the command line.
4728 * Only register nongui-vim's with an explicit --servername argument.
4729+ * When running as root --servername is also required.
4730 */
4731 if (X_DISPLAY != NULL && parmp->servername != NULL && (
4732 # ifdef FEAT_GUI
4733- gui.in_use ||
4734+ (gui.in_use
4735+# ifdef UNIX
4736+ && getuid() != 0
4737+# endif
4738+ ) ||
4739 # endif
4740 parmp->serverName_arg != NULL))
4741 {
4742diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
4743--- vim70.orig/src/Makefile 2006-05-07 06:25:27.000000000 -0700
4744+++ vim70/src/Makefile 2006-09-11 08:57:41.000000000 -0700
4745@@ -2177,6 +2177,7 @@
4746 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
4747 if test -d $(RSRC_DIR); then \
4748 cd $(SHADOWDIR); \
4749+ ln -s ../infplist.xml .; \
4750 ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \
4751 fi
4752 mkdir $(SHADOWDIR)/testdir
4753@@ -2260,7 +2261,7 @@
4754 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
4755 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh
4756
4757-QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
4758+QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
4759 auto/pathdef.c: Makefile auto/config.mk
4760 -@echo creating $@
4761 -@echo '/* pathdef.c */' > $@
4762diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c
4763--- vim70.orig/src/mbyte.c 2006-04-30 04:51:01.000000000 -0700
4764+++ vim70/src/mbyte.c 2006-09-11 08:23:16.000000000 -0700
4765@@ -311,7 +311,11 @@
4766
4767 #define IDX_MACROMAN 57
4768 {"macroman", ENC_8BIT + ENC_MACROMAN, 0}, /* Mac OS */
4769-#define IDX_COUNT 58
4770+#define IDX_DECMCS 58
4771+ {"dec-mcs", ENC_8BIT, 0}, /* DEC MCS */
4772+#define IDX_HPROMAN8 59
4773+ {"hp-roman8", ENC_8BIT, 0}, /* HP Roman8 */
4774+#define IDX_COUNT 60
4775 };
4776
4777 /*
4778@@ -359,6 +363,8 @@
4779 {"932", IDX_CP932},
4780 {"949", IDX_CP949},
4781 {"936", IDX_CP936},
4782+ {"gbk", IDX_CP936},
4783+ {"gb18030", IDX_CP936}, /* only 99% the same */
4784 {"950", IDX_CP950},
4785 {"eucjp", IDX_EUC_JP},
4786 {"unix-jis", IDX_EUC_JP},
4787@@ -386,6 +392,7 @@
4788 {"950", IDX_BIG5},
4789 #endif
4790 {"mac", IDX_MACROMAN},
4791+ {"mac-roman", IDX_MACROMAN},
4792 {NULL, 0}
4793 };
4794
4795@@ -3507,6 +3514,11 @@
4796 add_to_input_buf(delkey, (int)sizeof(delkey));
4797 }
4798
4799+/*
4800+ * Move the cursor left by "num_move_back" characters.
4801+ * Note that ins_left() checks im_is_preediting() to avoid breaking undo for
4802+ * these K_LEFT keys.
4803+ */
4804 static void
4805 im_correct_cursor(int num_move_back)
4806 {
4807@@ -3734,8 +3746,7 @@
4808 }
4809 else if (cursor_index == 0 && preedit_string[0] == '\0')
4810 {
4811- if (preedit_start_col == MAXCOL)
4812- xim_has_preediting = FALSE;
4813+ xim_has_preediting = FALSE;
4814
4815 /* If at the start position (after typing backspace)
4816 * preedit_start_col must be reset. */
4817@@ -3850,13 +3861,13 @@
4818
4819 if (preedit_string != NULL && attr_list != NULL)
4820 {
4821- int index;
4822+ int idx;
4823
4824 /* Get the byte index as used by PangoAttrIterator */
4825- for (index = 0; col > 0 && preedit_string[index] != '\0'; --col)
4826- index += utfc_ptr2len((char_u *)preedit_string + index);
4827+ for (idx = 0; col > 0 && preedit_string[idx] != '\0'; --col)
4828+ idx += utfc_ptr2len((char_u *)preedit_string + idx);
4829
4830- if (preedit_string[index] != '\0')
4831+ if (preedit_string[idx] != '\0')
4832 {
4833 PangoAttrIterator *iter;
4834 int start, end;
4835@@ -3869,7 +3880,7 @@
4836 {
4837 pango_attr_iterator_range(iter, &start, &end);
4838
4839- if (index >= start && index < end)
4840+ if (idx >= start && idx < end)
4841 char_attr |= translate_pango_attributes(iter);
4842 }
4843 while (pango_attr_iterator_next(iter));
4844diff -Naur vim70.orig/src/memline.c vim70/src/memline.c
4845--- vim70.orig/src/memline.c 2006-04-20 14:00:21.000000000 -0700
4846+++ vim70/src/memline.c 2006-09-11 08:23:16.000000000 -0700
4847@@ -215,7 +215,7 @@
4848 #define ML_FLUSH 0x02 /* flush locked block */
4849 #define ML_SIMPLE(x) (x & 0x10) /* DEL, INS or FIND */
4850
4851-static void ml_upd_block0 __ARGS((buf_T *buf, int setfname));
4852+static void ml_upd_block0 __ARGS((buf_T *buf, int set_fname));
4853 static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf));
4854 static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf));
4855 #ifdef FEAT_MBYTE
4856@@ -679,9 +679,9 @@
4857 * Update the timestamp or the B0_SAME_DIR flag of the .swp file.
4858 */
4859 static void
4860-ml_upd_block0(buf, setfname)
4861+ml_upd_block0(buf, set_fname)
4862 buf_T *buf;
4863- int setfname;
4864+ int set_fname;
4865 {
4866 memfile_T *mfp;
4867 bhdr_T *hp;
4868@@ -695,7 +695,7 @@
4869 EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
4870 else
4871 {
4872- if (setfname)
4873+ if (set_fname)
4874 set_b0_fname(b0p, buf);
4875 else
4876 set_b0_dir_flag(b0p, buf);
4877diff -Naur vim70.orig/src/menu.c vim70/src/menu.c
4878--- vim70.orig/src/menu.c 2006-05-03 10:30:48.000000000 -0700
4879+++ vim70/src/menu.c 2006-08-19 16:40:11.000000000 -0700
4880@@ -511,6 +511,14 @@
4881 * name (without mnemonic and accelerator text). */
4882 next_name = menu_name_skip(name);
4883 dname = menu_text(name, NULL, NULL);
4884+ if (dname == NULL)
4885+ goto erret;
4886+ if (*dname == NUL)
4887+ {
4888+ /* Only a mnemonic or accelerator is not valid. */
4889+ EMSG(_("E792: Empty menu name"));
4890+ goto erret;
4891+ }
4892
4893 /* See if it's already there */
4894 lower_pri = menup;
4895@@ -704,6 +712,7 @@
4896 parent = menu;
4897 name = next_name;
4898 vim_free(dname);
4899+ dname = NULL;
4900 if (pri_tab[pri_idx + 1] != -1)
4901 ++pri_idx;
4902 }
4903@@ -793,6 +802,22 @@
4904 erret:
4905 vim_free(path_name);
4906 vim_free(dname);
4907+
4908+ /* Delete any empty submenu we added before discovering the error. Repeat
4909+ * for higher levels. */
4910+ while (parent != NULL && parent->children == NULL)
4911+ {
4912+ if (parent->parent == NULL)
4913+ menup = &root_menu;
4914+ else
4915+ menup = &parent->parent->children;
4916+ for ( ; *menup != NULL && *menup != parent; menup = &((*menup)->next))
4917+ ;
4918+ if (*menup == NULL) /* safety check */
4919+ break;
4920+ parent = parent->parent;
4921+ free_menu(menup);
4922+ }
4923 return FAIL;
4924 }
4925
4926@@ -1753,6 +1778,27 @@
4927 }
4928
4929 /*
4930+ * Check that a pointer appears in the menu tree. Used to protect from using
4931+ * a menu that was deleted after it was selected but before the event was
4932+ * handled.
4933+ * Return OK or FAIL. Used recursively.
4934+ */
4935+ int
4936+check_menu_pointer(root, menu_to_check)
4937+ vimmenu_T *root;
4938+ vimmenu_T *menu_to_check;
4939+{
4940+ vimmenu_T *p;
4941+
4942+ for (p = root; p != NULL; p = p->next)
4943+ if (p == menu_to_check
4944+ || (p->children != NULL
4945+ && check_menu_pointer(p->children, menu_to_check) == OK))
4946+ return OK;
4947+ return FAIL;
4948+}
4949+
4950+/*
4951 * After we have started the GUI, then we can create any menus that have been
4952 * defined. This is done once here. add_menu_path() may have already been
4953 * called to define these menus, and may be called again. This function calls
4954diff -Naur vim70.orig/src/message.c vim70/src/message.c
4955--- vim70.orig/src/message.c 2006-05-06 13:07:37.000000000 -0700
4956+++ vim70/src/message.c 2006-09-11 08:59:06.000000000 -0700
4957@@ -1925,7 +1925,8 @@
4958 * If screen is completely filled and 'more' is set then wait
4959 * for a character.
4960 */
4961- if (p_more && --lines_left == 0 && State != HITRETURN
4962+ --lines_left;
4963+ if (p_more && lines_left == 0 && State != HITRETURN
4964 && !msg_no_more && !exmode_active)
4965 {
4966 #ifdef FEAT_CON_DIALOG
4967@@ -4175,15 +4176,16 @@
4968 str_arg_l = 0;
4969 else
4970 {
4971- /* memchr on HP does not like n > 2^31 !!! */
4972- char *q = memchr(str_arg, '\0',
4973+ /* Don't put the #if inside memchr(), it can be a
4974+ * macro. */
4975 #if SIZEOF_INT <= 2
4976- precision
4977+ char *q = memchr(str_arg, '\0', precision);
4978 #else
4979- precision <= (size_t)0x7fffffffL ? precision
4980- : (size_t)0x7fffffffL
4981+ /* memchr on HP does not like n > 2^31 !!! */
4982+ char *q = memchr(str_arg, '\0',
4983+ precision <= (size_t)0x7fffffffL ? precision
4984+ : (size_t)0x7fffffffL);
4985 #endif
4986- );
4987 str_arg_l = (q == NULL) ? precision : q - str_arg;
4988 }
4989 break;
4990diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c
4991--- vim70.orig/src/misc1.c 2006-04-30 08:30:02.000000000 -0700
[9903b4e]4992+++ vim70/src/misc1.c 2006-09-18 08:57:51.000000000 -0700
[d28a23b]4993@@ -3016,6 +3016,7 @@
4994 int len = 0;
4995 int n;
4996 int save_mapped_ctrl_c = mapped_ctrl_c;
4997+ int waited = 0;
4998
4999 mapped_ctrl_c = FALSE; /* mappings are not used here */
5000 for (;;)
5001@@ -3034,11 +3035,16 @@
5002 /* Replace zero and CSI by a special key code. */
5003 n = fix_input_buffer(buf + len, n, FALSE);
5004 len += n;
5005+ waited = 0;
5006 }
5007+ else if (len > 0)
5008+ ++waited; /* keep track of the waiting time */
5009
5010- /* incomplete termcode: get more characters */
5011- if ((n = check_termcode(1, buf, len)) < 0)
5012+ /* Incomplete termcode and not timed out yet: get more characters */
5013+ if ((n = check_termcode(1, buf, len)) < 0
5014+ && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm)))
5015 continue;
5016+
5017 /* found a termcode: adjust length */
5018 if (n > 0)
5019 len = n;
5020@@ -3196,14 +3202,12 @@
5021 else
5022 MSG_PUTS(_("Choice number (<Enter> cancels): "));
5023
5024- /* Set the state such that text can be selected/copied/pasted. */
5025+ /* Set the state such that text can be selected/copied/pasted and we still
5026+ * get mouse events. */
5027 save_cmdline_row = cmdline_row;
5028- cmdline_row = Rows - 1;
5029+ cmdline_row = 0;
5030 save_State = State;
5031- if (mouse_used == NULL)
5032- State = CMDLINE;
5033- else
5034- State = NORMAL;
5035+ State = CMDLINE;
5036
5037 i = get_number(TRUE, mouse_used);
5038 if (KeyTyped)
5039@@ -4492,7 +4496,7 @@
5040 int l = mb_ptr2len(s);
5041
5042 while (--l > 0)
5043- *d++ = *s++;
5044+ *d++ = *++s;
5045 }
5046 # endif
5047 }
[9903b4e]5048@@ -8070,9 +8074,20 @@
5049 }
5050 if (*that == '"' && *(that + 1) != NUL)
5051 {
5052- that++;
5053- while (*that && (*that != '"' || *(that - 1) == '\\'))
5054- ++that;
5055+ while (*++that && *that != '"')
5056+ {
5057+ /* skipping escaped characters in the string */
5058+ if (*that == '\\')
5059+ {
5060+ if (*++that == NUL)
5061+ break;
5062+ if (that[1] == NUL)
5063+ {
5064+ ++that;
5065+ break;
5066+ }
5067+ }
5068+ }
5069 }
5070 if (*that == '(' || *that == '[')
5071 ++parencount;
[d28a23b]5072diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c
5073--- vim70.orig/src/netbeans.c 2006-04-22 11:00:05.000000000 -0700
5074+++ vim70/src/netbeans.c 2006-09-11 08:23:16.000000000 -0700
5075@@ -103,7 +103,7 @@
5076 static int inputHandler = -1; /* simply ret.value of WSAAsyncSelect() */
5077 extern HWND s_hwnd; /* Gvim's Window handle */
5078 #endif
5079-static int cmdno; /* current command number for reply */
5080+static int r_cmdno; /* current command number for reply */
5081 static int haveConnection = FALSE; /* socket is connected and
5082 initialization is done */
5083 #ifdef FEAT_GUI_MOTIF
5084@@ -832,11 +832,11 @@
5085 return;
5086 }
5087
5088- cmdno = strtol(q, &q, 10);
5089+ r_cmdno = strtol(q, &q, 10);
5090
5091 q = (char *)skipwhite((char_u *)q);
5092
5093- if (nb_do_cmd(bufno, (char_u *)verb, isfunc, cmdno, (char_u *)q) == FAIL)
5094+ if (nb_do_cmd(bufno, (char_u *)verb, isfunc, r_cmdno, (char_u *)q) == FAIL)
5095 {
5096 #ifdef NBDEBUG
5097 /*
5098@@ -1008,11 +1008,11 @@
5099 if (netbeansForcedQuit)
5100 {
5101 /* mark as unmodified so NetBeans won't put up dialog on "killed" */
5102- sprintf(buf, "%d:unmodified=%d\n", i, cmdno);
5103+ sprintf(buf, "%d:unmodified=%d\n", i, r_cmdno);
5104 nbdebug(("EVT: %s", buf));
5105 nb_send(buf, "netbeans_end");
5106 }
5107- sprintf(buf, "%d:killed=%d\n", i, cmdno);
5108+ sprintf(buf, "%d:killed=%d\n", i, r_cmdno);
5109 nbdebug(("EVT: %s", buf));
5110 /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */
5111 if (sd >= 0)
5112@@ -1986,6 +1986,8 @@
5113 if (buf->bufp != NULL)
5114 do_buffer(DOBUF_WIPE, DOBUF_FIRST, FORWARD,
5115 buf->bufp->b_fnum, TRUE);
5116+ buf->bufp = NULL;
5117+ buf->initDone = FALSE;
5118 doupdate = 1;
5119 /* =====================================================================*/
5120 }
5121@@ -2561,7 +2563,7 @@
5122 if (p != NULL)
5123 {
5124 vim_snprintf(buf, sizeof(buf),
5125- "0:balloonText=%d \"%s\"\n", cmdno, p);
5126+ "0:balloonText=%d \"%s\"\n", r_cmdno, p);
5127 vim_free(p);
5128 }
5129 nbdebug(("EVT: %s", buf));
5130@@ -2615,7 +2617,7 @@
5131
5132 if (haveConnection)
5133 {
5134- sprintf(buf, "0:disconnect=%d\n", cmdno);
5135+ sprintf(buf, "0:disconnect=%d\n", r_cmdno);
5136 nbdebug(("EVT: %s", buf));
5137 nb_send(buf, "netbeans_disconnect");
5138 }
5139@@ -2634,7 +2636,7 @@
5140 return;
5141
5142 sprintf(buf, "0:geometry=%d %d %d %d %d\n",
5143- cmdno, (int)Columns, (int)Rows, new_x, new_y);
5144+ r_cmdno, (int)Columns, (int)Rows, new_x, new_y);
5145 /*nbdebug(("EVT: %s", buf)); happens too many times during a move */
5146 nb_send(buf, "netbeans_frame_moved");
5147 }
5148@@ -2743,7 +2745,7 @@
5149 if (bufno <= 0)
5150 return;
5151
5152- sprintf(buffer, "%d:killed=%d\n", bufno, cmdno);
5153+ sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno);
5154
5155 nbdebug(("EVT: %s", buffer));
5156
5157@@ -2817,7 +2819,8 @@
5158 if (p != NULL)
5159 {
5160 buf = alloc(128 + 2*newlen);
5161- sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", bufno, cmdno, off, p);
5162+ sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n",
5163+ bufno, r_cmdno, off, p);
5164 nbdebug(("EVT: %s", buf));
5165 nb_send((char *)buf, "netbeans_inserted");
5166 vim_free(p);
5167@@ -2859,7 +2862,7 @@
5168
5169 off = pos2off(bufp, &pos);
5170
5171- sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, cmdno, off, len);
5172+ sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, r_cmdno, off, len);
5173 nbdebug(("EVT: %s", buf));
5174 nb_send((char *)buf, "netbeans_removed");
5175 }
5176@@ -2884,7 +2887,7 @@
5177
5178 nbbuf->modified = 0;
5179
5180- sprintf((char *)buf, "%d:unmodified=%d\n", bufno, cmdno);
5181+ sprintf((char *)buf, "%d:unmodified=%d\n", bufno, r_cmdno);
5182 nbdebug(("EVT: %s", buf));
5183 nb_send((char *)buf, "netbeans_unmodified");
5184 #endif
5185@@ -2908,11 +2911,11 @@
5186 long off = pos2off(curbuf, &curwin->w_cursor);
5187
5188 /* sync the cursor position */
5189- sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
5190+ sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off);
5191 nbdebug(("EVT: %s", buf));
5192 nb_send(buf, "netbeans_button_release[newDotAndMark]");
5193
5194- sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, cmdno,
5195+ sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, r_cmdno,
5196 button, (long)curwin->w_cursor.lnum, col);
5197 nbdebug(("EVT: %s", buf));
5198 nb_send(buf, "netbeans_button_release");
5199@@ -2973,7 +2976,7 @@
5200
5201 /* sync the cursor position */
5202 off = pos2off(curbuf, &curwin->w_cursor);
5203- sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
5204+ sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off);
5205 nbdebug(("EVT: %s", buf));
5206 nb_send(buf, "netbeans_keycommand");
5207
5208@@ -2984,13 +2987,13 @@
5209
5210 /* now send keyCommand event */
5211 vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n",
5212- bufno, cmdno, keyName);
5213+ bufno, r_cmdno, keyName);
5214 nbdebug(("EVT: %s", buf));
5215 nb_send(buf, "netbeans_keycommand");
5216
5217 /* New: do both at once and include the lnum/col. */
5218 vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n",
5219- bufno, cmdno, keyName,
5220+ bufno, r_cmdno, keyName,
5221 off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col);
5222 nbdebug(("EVT: %s", buf));
5223 nb_send(buf, "netbeans_keycommand");
5224@@ -3013,7 +3016,7 @@
5225
5226 nbbuf->modified = 0;
5227
5228- sprintf((char *)buf, "%d:save=%d\n", bufno, cmdno);
5229+ sprintf((char *)buf, "%d:save=%d\n", bufno, r_cmdno);
5230 nbdebug(("EVT: %s", buf));
5231 nb_send((char *)buf, "netbeans_save_buffer");
5232 }
5233@@ -3037,7 +3040,7 @@
5234 if (nbbuf->insertDone)
5235 nbbuf->modified = 1;
5236
5237- sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, cmdno);
5238+ sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, r_cmdno);
5239 nbdebug(("EVT(suppressed): %s", buf));
5240 /* nb_send(buf, "netbeans_deleted_all_lines"); */
5241 }
5242diff -Naur vim70.orig/src/normal.c vim70/src/normal.c
5243--- vim70.orig/src/normal.c 2006-04-29 06:11:18.000000000 -0700
5244+++ vim70/src/normal.c 2006-09-11 08:23:16.000000000 -0700
5245@@ -2504,7 +2504,8 @@
5246 * NOTE: Ignore right button down and drag mouse events.
5247 * Windows only shows the popup menu on the button up event.
5248 */
5249-#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON)
5250+#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
5251+ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)
5252 if (!is_click)
5253 return FALSE;
5254 #endif
5255@@ -4126,7 +4127,7 @@
5256 int save_p_ws;
5257 int save_p_scs;
5258 int retval = OK;
5259- int incl;
5260+ int incll;
5261
5262 if ((pat = alloc(len + 7)) == NULL)
5263 return FAIL;
5264@@ -4146,7 +4147,7 @@
5265 * With "gd" Search back for the start of the current function, then go
5266 * back until a blank line. If this fails go to line 1.
5267 */
5268- if (!locally || !findpar(&incl, BACKWARD, 1L, '{', FALSE))
5269+ if (!locally || !findpar(&incll, BACKWARD, 1L, '{', FALSE))
5270 {
5271 setpcmark(); /* Set in findpar() otherwise */
5272 curwin->w_cursor.lnum = 1;
5273diff -Naur vim70.orig/src/ops.c vim70/src/ops.c
5274--- vim70.orig/src/ops.c 2006-04-30 08:13:44.000000000 -0700
5275+++ vim70/src/ops.c 2006-08-09 08:33:53.000000000 -0700
5276@@ -2413,6 +2413,7 @@
5277 else
5278 {
5279 curwin->w_cursor = oap->end;
5280+ check_cursor_col();
5281
5282 /* Works just like an 'i'nsert on the next character. */
5283 if (!lineempty(curwin->w_cursor.lnum)
5284@@ -3492,8 +3493,15 @@
5285 # endif
5286 if (flags & PUT_CURSEND)
5287 {
5288+ colnr_T len;
5289+
5290 curwin->w_cursor = curbuf->b_op_end;
5291 curwin->w_cursor.col++;
5292+
5293+ /* in Insert mode we might be after the NUL, correct for that */
5294+ len = (colnr_T)STRLEN(ml_get_curline());
5295+ if (curwin->w_cursor.col > len)
5296+ curwin->w_cursor.col = len;
5297 }
5298 else
5299 curwin->w_cursor.lnum = lnum;
5300diff -Naur vim70.orig/src/option.c vim70/src/option.c
5301--- vim70.orig/src/option.c 2006-05-03 10:32:28.000000000 -0700
5302+++ vim70/src/option.c 2006-09-11 09:01:59.000000000 -0700
5303@@ -2294,7 +2294,7 @@
5304 {(char_u *)0L, (char_u *)0L}
5305 #endif
5306 },
5307- {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
5308+ {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA,
5309 #ifdef FEAT_SPELL
5310 (char_u *)&p_sps, PV_NONE,
5311 {(char_u *)"best", (char_u *)0L}
5312@@ -5227,13 +5227,13 @@
5313 case PV_STL: return &curwin->w_p_stl_flags;
5314 #endif
5315 #ifdef FEAT_EVAL
5316+# ifdef FEAT_FOLDING
5317 case PV_FDE: return &curwin->w_p_fde_flags;
5318 case PV_FDT: return &curwin->w_p_fdt_flags;
5319+# endif
5320 # ifdef FEAT_BEVAL
5321 case PV_BEXPR: return &curbuf->b_p_bexpr_flags;
5322 # endif
5323-#endif
5324-#if defined(FEAT_EVAL)
5325 # if defined(FEAT_CINDENT)
5326 case PV_INDE: return &curbuf->b_p_inde_flags;
5327 # endif
5328@@ -5268,45 +5268,46 @@
5329 char_u *s;
5330 char_u **varp;
5331 int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
5332+ int idx = opt_idx;
5333
5334- if (opt_idx == -1) /* use name */
5335+ if (idx == -1) /* use name */
5336 {
5337- opt_idx = findoption(name);
5338- if (opt_idx < 0) /* not found (should not happen) */
5339+ idx = findoption(name);
5340+ if (idx < 0) /* not found (should not happen) */
5341 {
5342 EMSG2(_(e_intern2), "set_string_option_direct()");
5343 return;
5344 }
5345 }
5346
5347- if (options[opt_idx].var == NULL) /* can't set hidden option */
5348+ if (options[idx].var == NULL) /* can't set hidden option */
5349 return;
5350
5351 s = vim_strsave(val);
5352 if (s != NULL)
5353 {
5354- varp = (char_u **)get_varp_scope(&(options[opt_idx]),
5355+ varp = (char_u **)get_varp_scope(&(options[idx]),
5356 both ? OPT_LOCAL : opt_flags);
5357- if ((opt_flags & OPT_FREE) && (options[opt_idx].flags & P_ALLOCED))
5358+ if ((opt_flags & OPT_FREE) && (options[idx].flags & P_ALLOCED))
5359 free_string_option(*varp);
5360 *varp = s;
5361
5362 /* For buffer/window local option may also set the global value. */
5363 if (both)
5364- set_string_option_global(opt_idx, varp);
5365+ set_string_option_global(idx, varp);
5366
5367- options[opt_idx].flags |= P_ALLOCED;
5368+ options[idx].flags |= P_ALLOCED;
5369
5370 /* When setting both values of a global option with a local value,
5371 * make the local value empty, so that the global value is used. */
5372- if (((int)options[opt_idx].indir & PV_BOTH) && both)
5373+ if (((int)options[idx].indir & PV_BOTH) && both)
5374 {
5375 free_string_option(*varp);
5376 *varp = empty_option;
5377 }
5378 # ifdef FEAT_EVAL
5379 if (set_sid != SID_NONE)
5380- set_option_scriptID_idx(opt_idx, opt_flags,
5381+ set_option_scriptID_idx(idx, opt_flags,
5382 set_sid == 0 ? current_SID : set_sid);
5383 # endif
5384 }
5385@@ -6325,7 +6326,8 @@
5386 else
5387 errmsg = check_stl_option(p_ruf);
5388 }
5389- else
5390+ /* check 'statusline' only if it doesn't start with "%!" */
5391+ else if (varp != &p_stl || s[0] != '%' || s[1] != '!')
5392 errmsg = check_stl_option(s);
5393 if (varp == &p_ruf && errmsg == NULL)
5394 comp_col();
5395@@ -7324,9 +7326,8 @@
5396 #ifdef FEAT_AUTOCHDIR
5397 else if ((int *)varp == &p_acd)
5398 {
5399- if (p_acd && curbuf->b_ffname != NULL
5400- && vim_chdirfile(curbuf->b_ffname) == OK)
5401- shorten_fnames(TRUE);
5402+ /* Change directories when the 'acd' option is set now. */
5403+ DO_AUTOCHDIR
5404 }
5405 #endif
5406
5407diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c
5408--- vim70.orig/src/os_unix.c 2006-05-01 01:13:15.000000000 -0700
5409+++ vim70/src/os_unix.c 2006-09-11 08:23:16.000000000 -0700
5410@@ -3934,7 +3934,7 @@
5411 {
5412 linenr_T lnum = curbuf->b_op_start.lnum;
5413 int written = 0;
5414- char_u *p = ml_get(lnum);
5415+ char_u *lp = ml_get(lnum);
5416 char_u *s;
5417 size_t l;
5418
5419@@ -3942,17 +3942,17 @@
5420 close(fromshell_fd);
5421 for (;;)
5422 {
5423- l = STRLEN(p + written);
5424+ l = STRLEN(lp + written);
5425 if (l == 0)
5426 len = 0;
5427- else if (p[written] == NL)
5428+ else if (lp[written] == NL)
5429 /* NL -> NUL translation */
5430 len = write(toshell_fd, "", (size_t)1);
5431 else
5432 {
5433- s = vim_strchr(p + written, NL);
5434- len = write(toshell_fd, (char *)p + written,
5435- s == NULL ? l : s - (p + written));
5436+ s = vim_strchr(lp + written, NL);
5437+ len = write(toshell_fd, (char *)lp + written,
5438+ s == NULL ? l : s - (lp + written));
5439 }
5440 if (len == l)
5441 {
5442@@ -3973,7 +3973,7 @@
5443 toshell_fd = -1;
5444 break;
5445 }
5446- p = ml_get(lnum);
5447+ lp = ml_get(lnum);
5448 written = 0;
5449 }
5450 else if (len > 0)
5451@@ -4971,7 +4971,8 @@
5452 if (((*file)[*num_file] = alloc(len + 2)) != NULL)
5453 {
5454 STRCPY((*file)[*num_file], p);
5455- if (!after_pathsep((*file)[*num_file] + len))
5456+ if (!after_pathsep((*file)[*num_file],
5457+ (*file)[*num_file] + len))
5458 {
5459 (*file)[*num_file][len] = psepc;
5460 (*file)[*num_file][len + 1] = NUL;
5461@@ -5757,8 +5758,13 @@
5462 int retval_int = 0;
5463 int success = FALSE;
5464
5465- /* Get a handle to the DLL module. */
5466+ /*
5467+ * Get a handle to the DLL module.
5468+ */
5469 # if defined(USE_DLOPEN)
5470+ /* First clear any error, it's not cleared by the dlopen() call. */
5471+ (void)dlerror();
5472+
5473 hinstLib = dlopen((char *)libname, RTLD_LAZY
5474 # ifdef RTLD_LOCAL
5475 | RTLD_LOCAL
5476diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c
5477--- vim70.orig/src/popupmnu.c 2006-04-20 13:18:37.000000000 -0700
5478+++ vim70/src/popupmnu.c 2006-08-27 12:48:28.000000000 -0700
5479@@ -552,6 +552,9 @@
5480 {
5481 pum_array = NULL;
5482 redraw_all_later(SOME_VALID);
5483+#ifdef FEAT_WINDOWS
5484+ redraw_tabline = TRUE;
5485+#endif
5486 status_redraw_all();
5487 }
5488
5489diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro
5490--- vim70.orig/src/proto/buffer.pro 2006-05-07 06:08:29.000000000 -0700
5491+++ vim70/src/proto/buffer.pro 2006-09-11 09:01:59.000000000 -0700
5492@@ -10,6 +10,7 @@
5493 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit));
5494 extern void set_curbuf __ARGS((buf_T *buf, int action));
5495 extern void enter_buffer __ARGS((buf_T *buf));
5496+extern void do_autochdir __ARGS((void));
5497 extern buf_T *buflist_new __ARGS((char_u *ffname, char_u *sfname, linenr_T lnum, int flags));
5498 extern void free_buf_options __ARGS((buf_T *buf, int free_p_ff));
5499 extern int buflist_getfile __ARGS((int n, linenr_T lnum, int options, int forceit));
5500diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro
5501--- vim70.orig/src/proto/menu.pro 2006-05-07 06:08:51.000000000 -0700
5502+++ vim70/src/proto/menu.pro 2006-08-19 16:40:11.000000000 -0700
5503@@ -10,6 +10,7 @@
5504 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu));
5505 extern int menu_is_toolbar __ARGS((char_u *name));
5506 extern int menu_is_separator __ARGS((char_u *name));
5507+extern int check_menu_pointer __ARGS((vimmenu_T *root, vimmenu_T *menu_to_check));
5508 extern void gui_create_initial_menus __ARGS((vimmenu_T *menu));
5509 extern void gui_update_menus __ARGS((int modes));
5510 extern int gui_is_menu_shortcut __ARGS((int key));
5511diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro
5512--- vim70.orig/src/proto/undo.pro 2006-05-07 06:09:11.000000000 -0700
5513+++ vim70/src/proto/undo.pro 2006-07-14 10:51:11.000000000 -0700
5514@@ -4,6 +4,7 @@
5515 extern int u_savesub __ARGS((linenr_T lnum));
5516 extern int u_inssub __ARGS((linenr_T lnum));
5517 extern int u_savedel __ARGS((linenr_T lnum, long nlines));
5518+extern int undo_allowed __ARGS((void));
5519 extern void u_undo __ARGS((int count));
5520 extern void u_redo __ARGS((int count));
5521 extern void undo_time __ARGS((long step, int sec, int absolute));
5522diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c
5523--- vim70.orig/src/quickfix.c 2006-05-03 00:47:42.000000000 -0700
5524+++ vim70/src/quickfix.c 2006-09-11 09:00:46.000000000 -0700
5525@@ -500,8 +500,6 @@
5526 {
5527 if (tv != NULL)
5528 {
5529- int len;
5530-
5531 if (tv->v_type == VAR_STRING)
5532 {
5533 /* Get the next line from the supplied string */
5534@@ -602,13 +600,19 @@
5535 else
5536 type = 0;
5537 /*
5538- * Extract error message data from matched line
5539+ * Extract error message data from matched line.
5540+ * We check for an actual submatch, because "\[" and "\]" in
5541+ * the 'errorformat' may cause the wrong submatch to be used.
5542 */
5543 if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */
5544 {
5545- int c = *regmatch.endp[i];
5546+ int c;
5547+
5548+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
5549+ continue;
5550
5551 /* Expand ~/file and $HOME/file to full path. */
5552+ c = *regmatch.endp[i];
5553 *regmatch.endp[i] = NUL;
5554 expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
5555 *regmatch.endp[i] = c;
5556@@ -618,35 +622,63 @@
5557 continue;
5558 }
5559 if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */
5560+ {
5561+ if (regmatch.startp[i] == NULL)
5562+ continue;
5563 enr = (int)atol((char *)regmatch.startp[i]);
5564+ }
5565 if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */
5566+ {
5567+ if (regmatch.startp[i] == NULL)
5568+ continue;
5569 lnum = atol((char *)regmatch.startp[i]);
5570+ }
5571 if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */
5572+ {
5573+ if (regmatch.startp[i] == NULL)
5574+ continue;
5575 col = (int)atol((char *)regmatch.startp[i]);
5576+ }
5577 if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */
5578+ {
5579+ if (regmatch.startp[i] == NULL)
5580+ continue;
5581 type = *regmatch.startp[i];
5582+ }
5583 if (fmt_ptr->flags == '+' && !multiscan) /* %+ */
5584 STRCPY(errmsg, IObuff);
5585 else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */
5586 {
5587+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
5588+ continue;
5589 len = (int)(regmatch.endp[i] - regmatch.startp[i]);
5590 vim_strncpy(errmsg, regmatch.startp[i], len);
5591 }
5592 if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */
5593+ {
5594+ if (regmatch.startp[i] == NULL)
5595+ continue;
5596 tail = regmatch.startp[i];
5597+ }
5598 if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */
5599 {
5600+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
5601+ continue;
5602 col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1);
5603 if (*((char_u *)regmatch.startp[i]) != TAB)
5604 use_viscol = TRUE;
5605 }
5606 if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */
5607 {
5608+ if (regmatch.startp[i] == NULL)
5609+ continue;
5610 col = (int)atol((char *)regmatch.startp[i]);
5611 use_viscol = TRUE;
5612 }
5613 if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */
5614 {
5615+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
5616+ continue;
5617 len = (int)(regmatch.endp[i] - regmatch.startp[i]);
5618 if (len > CMDBUFFSIZE - 5)
5619 len = CMDBUFFSIZE - 5;
5620@@ -2429,32 +2461,19 @@
5621 qf_info_T *qi;
5622 {
5623 buf_T *buf;
5624-#ifdef FEAT_AUTOCMD
5625 aco_save_T aco;
5626-#else
5627- buf_T *save_curbuf;
5628-#endif
5629
5630 /* Check if a buffer for the quickfix list exists. Update it. */
5631 buf = qf_find_buf(qi);
5632 if (buf != NULL)
5633 {
5634-#ifdef FEAT_AUTOCMD
5635 /* set curwin/curbuf to buf and save a few things */
5636 aucmd_prepbuf(&aco, buf);
5637-#else
5638- save_curbuf = curbuf;
5639- curbuf = buf;
5640-#endif
5641
5642 qf_fill_buffer(qi);
5643
5644-#ifdef FEAT_AUTOCMD
5645 /* restore curwin/curbuf and a few other things */
5646 aucmd_restbuf(&aco);
5647-#else
5648- curbuf = save_curbuf;
5649-#endif
5650
5651 (void)qf_win_pos_update(qi, 0);
5652 }
5653@@ -2943,10 +2962,8 @@
5654 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
5655 char_u *save_ei = NULL;
5656 #endif
5657-#ifndef FEAT_AUTOCMD
5658- buf_T *save_curbuf;
5659-#else
5660 aco_save_T aco;
5661+#ifdef FEAT_AUTOCMD
5662 char_u *au_name = NULL;
5663 int flags = 0;
5664 colnr_T col;
5665@@ -3167,24 +3184,13 @@
5666 * need to be done now, in that buffer. And the modelines
5667 * need to be done (again). But not the window-local
5668 * options! */
5669-#if defined(FEAT_AUTOCMD)
5670 aucmd_prepbuf(&aco, buf);
5671-#else
5672- save_curbuf = curbuf;
5673- curbuf = buf;
5674- curwin->w_buffer = curbuf;
5675-#endif
5676 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
5677 apply_autocmds(EVENT_FILETYPE, buf->b_p_ft,
5678 buf->b_fname, TRUE, buf);
5679 #endif
5680 do_modelines(OPT_NOWIN);
5681-#if defined(FEAT_AUTOCMD)
5682 aucmd_restbuf(&aco);
5683-#else
5684- curbuf = save_curbuf;
5685- curwin->w_buffer = curbuf;
5686-#endif
5687 }
5688 }
5689 }
5690@@ -3285,11 +3291,7 @@
5691 {
5692 buf_T *newbuf;
5693 int failed = TRUE;
5694-#ifdef FEAT_AUTOCMD
5695 aco_save_T aco;
5696-#else
5697- buf_T *old_curbuf = curbuf;
5698-#endif
5699
5700 /* Allocate a buffer without putting it in the buffer list. */
5701 newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY);
5702@@ -3299,13 +3301,8 @@
5703 /* Init the options. */
5704 buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP);
5705
5706-#ifdef FEAT_AUTOCMD
5707 /* set curwin/curbuf to buf and save a few things */
5708 aucmd_prepbuf(&aco, newbuf);
5709-#else
5710- curbuf = newbuf;
5711- curwin->w_buffer = newbuf;
5712-#endif
5713
5714 /* Need to set the filename for autocommands. */
5715 (void)setfname(curbuf, fname, NULL, FALSE);
5716@@ -3336,13 +3333,8 @@
5717 }
5718 }
5719
5720-#ifdef FEAT_AUTOCMD
5721 /* restore curwin/curbuf and a few other things */
5722 aucmd_restbuf(&aco);
5723-#else
5724- curbuf = old_curbuf;
5725- curwin->w_buffer = old_curbuf;
5726-#endif
5727
5728 if (!buf_valid(newbuf))
5729 return NULL;
5730@@ -3434,8 +3426,10 @@
5731 || dict_add_nr_str(dict, "col", (long)qfp->qf_col, NULL) == FAIL
5732 || dict_add_nr_str(dict, "vcol", (long)qfp->qf_viscol, NULL) == FAIL
5733 || dict_add_nr_str(dict, "nr", (long)qfp->qf_nr, NULL) == FAIL
5734- || dict_add_nr_str(dict, "pattern", 0L, qfp->qf_pattern) == FAIL
5735- || dict_add_nr_str(dict, "text", 0L, qfp->qf_text) == FAIL
5736+ || dict_add_nr_str(dict, "pattern", 0L,
5737+ qfp->qf_pattern == NULL ? (char_u *)"" : qfp->qf_pattern) == FAIL
5738+ || dict_add_nr_str(dict, "text", 0L,
5739+ qfp->qf_text == NULL ? (char_u *)"" : qfp->qf_text) == FAIL
5740 || dict_add_nr_str(dict, "type", 0L, buf) == FAIL
5741 || dict_add_nr_str(dict, "valid", (long)qfp->qf_valid, NULL) == FAIL)
5742 return FAIL;
5743diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c
5744--- vim70.orig/src/regexp.c 2006-04-30 08:31:50.000000000 -0700
5745+++ vim70/src/regexp.c 2006-09-11 08:23:16.000000000 -0700
5746@@ -3912,7 +3912,7 @@
5747 {
5748 colnr_T start, end;
5749 colnr_T start2, end2;
5750- colnr_T col;
5751+ colnr_T cols;
5752
5753 getvvcol(wp, &top, &start, NULL, &end);
5754 getvvcol(wp, &bot, &start2, NULL, &end2);
5755@@ -3922,9 +3922,9 @@
5756 end = end2;
5757 if (top.col == MAXCOL || bot.col == MAXCOL)
5758 end = MAXCOL;
5759- col = win_linetabsize(wp,
5760+ cols = win_linetabsize(wp,
5761 regline, (colnr_T)(reginput - regline));
5762- if (col < start || col > end - (*p_sel == 'e'))
5763+ if (cols < start || cols > end - (*p_sel == 'e'))
5764 status = RA_NOMATCH;
5765 }
5766 }
5767@@ -4253,7 +4253,7 @@
5768 {
5769 int i, len;
5770 char_u *opnd;
5771- int opndc, inpc;
5772+ int opndc = 0, inpc;
5773
5774 opnd = OPERAND(scan);
5775 /* Safety check (just in case 'encoding' was changed since
5776diff -Naur vim70.orig/src/screen.c vim70/src/screen.c
5777--- vim70.orig/src/screen.c 2006-05-05 03:13:55.000000000 -0700
[9903b4e]5778+++ vim70/src/screen.c 2006-09-18 08:57:17.000000000 -0700
5779@@ -1228,7 +1228,14 @@
5780 {
5781 mid_end = wp->w_height;
5782 if (lastwin == firstwin)
5783+ {
5784 screenclear();
5785+#ifdef FEAT_WINDOWS
5786+ /* The screen was cleared, redraw the tab pages line. */
5787+ if (redraw_tabline)
5788+ draw_tabline();
5789+#endif
5790+ }
5791 }
5792 }
5793 else
5794@@ -2612,7 +2619,8 @@
[d28a23b]5795 #ifdef FEAT_LINEBREAK
5796 int need_showbreak = FALSE;
5797 #endif
5798-#if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS))
5799+#if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \
5800+ || defined(FEAT_SYN_HL) || defined(FEAT_DIFF)
5801 # define LINE_ATTR
5802 int line_attr = 0; /* atrribute for the whole line */
5803 #endif
[9903b4e]5804@@ -2626,7 +2634,7 @@
[d28a23b]5805 int prev_c = 0; /* previous Arabic character */
5806 int prev_c1 = 0; /* first composing char for prev_c */
5807 #endif
5808-#if defined(FEAT_DIFF) || defined(LINE_ATTR)
5809+#if defined(LINE_ATTR)
5810 int did_line_attr = 0;
5811 #endif
5812
[9903b4e]5813@@ -4116,17 +4124,12 @@
[d28a23b]5814 --ptr; /* put it back at the NUL */
5815 }
5816 #endif
5817-#if defined(FEAT_DIFF) || defined(LINE_ATTR)
5818+#if defined(LINE_ATTR)
5819 else if ((
5820 # ifdef FEAT_DIFF
5821- diff_hlf != (hlf_T)0
5822-# ifdef LINE_ATTR
5823- ||
5824-# endif
5825+ diff_hlf != (hlf_T)0 ||
5826 # endif
5827-# ifdef LINE_ATTR
5828 line_attr != 0
5829-# endif
5830 ) && (
5831 # ifdef FEAT_RIGHTLEFT
5832 wp->w_p_rl ? (col >= 0) :
[9903b4e]5833@@ -4237,7 +4240,7 @@
[d28a23b]5834 * At end of the text line or just after the last character.
5835 */
5836 if (c == NUL
5837-#if defined(FEAT_DIFF) || defined(LINE_ATTR)
5838+#if defined(LINE_ATTR)
5839 || did_line_attr == 1
5840 #endif
5841 )
[9903b4e]5842@@ -4258,7 +4261,7 @@
[d28a23b]5843 || prevcol == (long)match_hl[0].startcol
5844 || prevcol == (long)match_hl[1].startcol
5845 || prevcol == (long)match_hl[2].startcol)
5846-# if defined(FEAT_DIFF) || defined(LINE_ATTR)
5847+# if defined(LINE_ATTR)
5848 && did_line_attr <= 1
5849 # endif
5850 )
[9903b4e]5851@@ -7103,7 +7106,7 @@
[d28a23b]5852 tabpage_T *tp;
5853 #endif
5854 static int entered = FALSE; /* avoid recursiveness */
5855- static int did_outofmem_msg = FALSE; /* did outofmem message */
5856+ static int done_outofmem_msg = FALSE; /* did outofmem message */
5857
5858 /*
5859 * Allocation of the screen buffers is done only when the size changes and
[9903b4e]5860@@ -7133,6 +7136,12 @@
[d28a23b]5861 return;
5862 entered = TRUE;
5863
5864+ /*
5865+ * Note that the window sizes are updated before reallocating the arrays,
5866+ * thus we must not redraw here!
5867+ */
5868+ ++RedrawingDisabled;
5869+
5870 win_new_shellsize(); /* fit the windows in the new sized shell */
5871
5872 comp_col(); /* recompute columns for shown command and ruler */
[9903b4e]5873@@ -7205,14 +7214,14 @@
[d28a23b]5874 #endif
5875 || outofmem)
5876 {
5877- if (ScreenLines != NULL || !did_outofmem_msg)
5878+ if (ScreenLines != NULL || !done_outofmem_msg)
5879 {
5880 /* guess the size */
5881 do_outofmem_msg((long_u)((Rows + 1) * Columns));
5882
5883 /* Remember we did this to avoid getting outofmem messages over
5884 * and over again. */
5885- did_outofmem_msg = TRUE;
5886+ done_outofmem_msg = TRUE;
5887 }
5888 vim_free(new_ScreenLines);
5889 new_ScreenLines = NULL;
[9903b4e]5890@@ -7240,7 +7249,7 @@
[d28a23b]5891 }
5892 else
5893 {
5894- did_outofmem_msg = FALSE;
5895+ done_outofmem_msg = FALSE;
5896
5897 for (new_row = 0; new_row < Rows; ++new_row)
5898 {
[9903b4e]5899@@ -7367,6 +7376,7 @@
[d28a23b]5900 #endif
5901
5902 entered = FALSE;
5903+ --RedrawingDisabled;
5904
5905 #ifdef FEAT_AUTOCMD
5906 if (starting == 0)
5907diff -Naur vim70.orig/src/search.c vim70/src/search.c
5908--- vim70.orig/src/search.c 2006-05-05 05:12:13.000000000 -0700
5909+++ vim70/src/search.c 2006-09-11 08:23:39.000000000 -0700
5910@@ -1259,7 +1259,7 @@
5911 /*
5912 * Add character and/or line offset
5913 */
5914- if (!(options & SEARCH_NOOF) || *pat == ';')
5915+ if (!(options & SEARCH_NOOF) || (pat != NULL && *pat == ';'))
5916 {
5917 if (spats[0].off.line) /* Add the offset to the line number. */
5918 {
5919@@ -4826,15 +4826,20 @@
5920
5921 if ((compl_cont_status & CONT_ADDING) && i == compl_length)
5922 {
5923- /* get the next line */
5924 /* IOSIZE > compl_length, so the STRNCPY works */
5925 STRNCPY(IObuff, aux, i);
5926- if (!( depth < 0
5927- && lnum < end_lnum
5928- && (line = ml_get(++lnum)) != NULL)
5929- && !( depth >= 0
5930- && !vim_fgets(line = file_line,
5931- LSIZE, files[depth].fp)))
5932+
5933+ /* Get the next line: when "depth" < 0 from the current
5934+ * buffer, otherwise from the included file. Jump to
5935+ * exit_matched when past the last line. */
5936+ if (depth < 0)
5937+ {
5938+ if (lnum >= end_lnum)
5939+ goto exit_matched;
5940+ line = ml_get(++lnum);
5941+ }
5942+ else if (vim_fgets(line = file_line,
5943+ LSIZE, files[depth].fp))
5944 goto exit_matched;
5945
5946 /* we read a line, set "already" to check this "line" later
5947@@ -4871,7 +4876,7 @@
5948 goto exit_matched;
5949 }
5950
5951- add_r = ins_compl_add_infercase(aux, i, FALSE,
5952+ add_r = ins_compl_add_infercase(aux, i, p_ic,
5953 curr_fname == curbuf->b_fname ? NULL : curr_fname,
5954 dir, reuse);
5955 if (add_r == OK)
5956diff -Naur vim70.orig/src/spell.c vim70/src/spell.c
5957--- vim70.orig/src/spell.c 2006-05-05 00:49:58.000000000 -0700
[9903b4e]5958+++ vim70/src/spell.c 2006-09-18 08:54:02.000000000 -0700
5959@@ -1483,7 +1483,7 @@
5960 else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND
5961 || !word_ends))
5962 {
5963- /* If there is no flag or the word is shorter than
5964+ /* If there is no compound flag or the word is shorter than
5965 * COMPOUNDMIN reject it quickly.
5966 * Makes you wonder why someone puts a compound flag on a word
5967 * that's too short... Myspell compatibility requires this
[d28a23b]5968@@ -2043,8 +2043,8 @@
5969 int len;
5970 # ifdef FEAT_SYN_HL
5971 int has_syntax = syntax_present(wp->w_buffer);
5972- int col;
5973 # endif
5974+ int col;
5975 int can_spell;
5976 char_u *buf = NULL;
5977 int buflen = 0;
5978@@ -2093,9 +2093,8 @@
5979 capcol = (int)(skipwhite(line) - line);
5980 else if (curline && wp == curwin)
5981 {
5982- int col = (int)(skipwhite(line) - line);
5983-
5984 /* For spellbadword(): check if first word needs a capital. */
5985+ col = (int)(skipwhite(line) - line);
5986 if (check_need_cap(lnum, col))
5987 capcol = col;
5988
5989@@ -2108,7 +2107,8 @@
5990 * possible. */
5991 STRCPY(buf, line);
5992 if (lnum < wp->w_buffer->b_ml.ml_line_count)
5993- spell_cat_line(buf + STRLEN(buf), ml_get(lnum + 1), MAXWLEN);
5994+ spell_cat_line(buf + STRLEN(buf),
5995+ ml_get_buf(wp->w_buffer, lnum + 1, FALSE), MAXWLEN);
5996
5997 p = buf + skip;
5998 endp = buf + len;
5999@@ -5060,7 +5060,7 @@
6000 int do_rep;
6001 int do_repsal;
6002 int do_sal;
6003- int do_map;
6004+ int do_mapline;
6005 int found_map = FALSE;
6006 hashitem_T *hi;
6007 int l;
6008@@ -5098,7 +5098,7 @@
6009 do_sal = spin->si_sal.ga_len == 0;
6010
6011 /* Only do MAP lines when not done in another .aff file already. */
6012- do_map = spin->si_map.ga_len == 0;
6013+ do_mapline = spin->si_map.ga_len == 0;
6014
6015 /*
6016 * Allocate and init the afffile_T structure.
6017@@ -5780,7 +5780,7 @@
6018 smsg((char_u *)_("Expected MAP count in %s line %d"),
6019 fname, lnum);
6020 }
6021- else if (do_map)
6022+ else if (do_mapline)
6023 {
6024 int c;
6025
6026@@ -7507,7 +7507,7 @@
6027 {
6028 char_u *p = p_msm;
6029 long start = 0;
6030- long inc = 0;
6031+ long incr = 0;
6032 long added = 0;
6033
6034 if (!VIM_ISDIGIT(*p))
6035@@ -7519,7 +7519,7 @@
6036 ++p;
6037 if (!VIM_ISDIGIT(*p))
6038 return FAIL;
6039- inc = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
6040+ incr = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
6041 if (*p != ',')
6042 return FAIL;
6043 ++p;
6044@@ -7529,11 +7529,11 @@
6045 if (*p != NUL)
6046 return FAIL;
6047
6048- if (start == 0 || inc == 0 || added == 0 || inc > start)
6049+ if (start == 0 || incr == 0 || added == 0 || incr > start)
6050 return FAIL;
6051
6052 compress_start = start;
6053- compress_inc = inc;
6054+ compress_inc = incr;
6055 compress_added = added;
6056 return OK;
6057 }
6058@@ -8291,14 +8291,14 @@
6059 * Returns the number of nodes used.
6060 */
6061 static int
6062-put_node(fd, node, index, regionmask, prefixtree)
6063+put_node(fd, node, idx, regionmask, prefixtree)
6064 FILE *fd; /* NULL when only counting */
6065 wordnode_T *node;
6066- int index;
6067+ int idx;
6068 int regionmask;
6069 int prefixtree; /* TRUE for PREFIXTREE */
6070 {
6071- int newindex = index;
6072+ int newindex = idx;
6073 int siblingcount = 0;
6074 wordnode_T *np;
6075 int flags;
6076@@ -8308,7 +8308,7 @@
6077 return 0;
6078
6079 /* Store the index where this node is written. */
6080- node->wn_u1.index = index;
6081+ node->wn_u1.index = idx;
6082
6083 /* Count the number of siblings. */
6084 for (np = node; np != NULL; np = np->wn_sibling)
[9903b4e]6085@@ -9243,15 +9243,15 @@
[d28a23b]6086 * Add "word[len]" to 'spellfile' as a good or bad word.
6087 */
6088 void
6089-spell_add_word(word, len, bad, index, undo)
6090+spell_add_word(word, len, bad, idx, undo)
6091 char_u *word;
6092 int len;
6093 int bad;
6094- int index; /* "zG" and "zW": zero, otherwise index in
6095+ int idx; /* "zG" and "zW": zero, otherwise index in
6096 'spellfile' */
6097 int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */
6098 {
[9903b4e]6099- FILE *fd;
6100+ FILE *fd = NULL;
6101 buf_T *buf = NULL;
6102 int new_spf = FALSE;
6103 char_u *fname;
[d28a23b]6104@@ -9261,7 +9261,7 @@
6105 int i;
6106 char_u *spf;
6107
6108- if (index == 0) /* use internal wordlist */
6109+ if (idx == 0) /* use internal wordlist */
6110 {
6111 if (int_wordlist == NULL)
6112 {
6113@@ -9289,11 +9289,11 @@
6114 for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i)
6115 {
6116 copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
6117- if (i == index)
6118+ if (i == idx)
6119 break;
6120 if (*spf == NUL)
6121 {
6122- EMSGN(_("E765: 'spellfile' does not have %ld entries"), index);
6123+ EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx);
6124 return;
6125 }
6126 }
[9903b4e]6127@@ -9336,7 +9336,10 @@
6128 {
6129 fputc('#', fd);
6130 if (undo)
6131+ {
6132+ home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
6133 smsg((char_u *)_("Word removed from %s"), NameBuff);
6134+ }
6135 }
6136 fseek(fd, fpos_next, SEEK_SET);
6137 }
6138@@ -9344,20 +9347,27 @@
6139 fclose(fd);
6140 }
6141 }
6142- else
6143+
6144+ if (!undo)
6145 {
6146 fd = mch_fopen((char *)fname, "a");
6147 if (fd == NULL && new_spf)
6148 {
6149+ char_u *p;
6150+
6151 /* We just initialized the 'spellfile' option and can't open the
6152 * file. We may need to create the "spell" directory first. We
6153 * already checked the runtime directory is writable in
6154 * init_spellfile(). */
6155- if (!dir_of_file_exists(fname))
6156+ if (!dir_of_file_exists(fname) && (p = gettail_sep(fname)) != fname)
6157 {
6158+ int c = *p;
6159+
6160 /* The directory doesn't exist. Try creating it and opening
6161 * the file again. */
6162- vim_mkdir(NameBuff, 0755);
6163+ *p = NUL;
6164+ vim_mkdir(fname, 0755);
6165+ *p = c;
6166 fd = mch_fopen((char *)fname, "a");
6167 }
6168 }
6169@@ -10070,6 +10080,7 @@
[d28a23b]6170
6171 /* List the suggestions. */
6172 msg_start();
6173+ msg_row = Rows - 1; /* for when 'cmdheight' > 1 */
6174 lines_left = Rows; /* avoid more prompt */
6175 vim_snprintf((char *)IObuff, IOSIZE, _("Change \"%.*s\" to:"),
6176 sug.su_badlen, sug.su_badptr);
[9903b4e]6177@@ -13579,53 +13590,58 @@
[d28a23b]6178 * the first "the" to itself. */
6179 return;
6180
6181- /* Check if the word is already there. Also check the length that is
6182- * being replaced "thes," -> "these" is a different suggestion from
6183- * "thes" -> "these". */
6184- stp = &SUG(*gap, 0);
6185- for (i = gap->ga_len; --i >= 0; ++stp)
6186- if (stp->st_wordlen == goodlen
6187- && stp->st_orglen == badlen
6188- && STRNCMP(stp->st_word, goodword, goodlen) == 0)
6189- {
6190- /*
6191- * Found it. Remember the word with the lowest score.
6192- */
6193- if (stp->st_slang == NULL)
6194- stp->st_slang = slang;
6195+ if (gap->ga_len == 0)
6196+ i = -1;
6197+ else
6198+ {
6199+ /* Check if the word is already there. Also check the length that is
6200+ * being replaced "thes," -> "these" is a different suggestion from
6201+ * "thes" -> "these". */
6202+ stp = &SUG(*gap, 0);
6203+ for (i = gap->ga_len; --i >= 0; ++stp)
6204+ if (stp->st_wordlen == goodlen
6205+ && stp->st_orglen == badlen
6206+ && STRNCMP(stp->st_word, goodword, goodlen) == 0)
6207+ {
6208+ /*
6209+ * Found it. Remember the word with the lowest score.
6210+ */
6211+ if (stp->st_slang == NULL)
6212+ stp->st_slang = slang;
6213
6214- new_sug.st_score = score;
6215- new_sug.st_altscore = altscore;
6216- new_sug.st_had_bonus = had_bonus;
6217+ new_sug.st_score = score;
6218+ new_sug.st_altscore = altscore;
6219+ new_sug.st_had_bonus = had_bonus;
6220+
6221+ if (stp->st_had_bonus != had_bonus)
6222+ {
6223+ /* Only one of the two had the soundalike score computed.
6224+ * Need to do that for the other one now, otherwise the
6225+ * scores can't be compared. This happens because
6226+ * suggest_try_change() doesn't compute the soundalike
6227+ * word to keep it fast, while some special methods set
6228+ * the soundalike score to zero. */
6229+ if (had_bonus)
6230+ rescore_one(su, stp);
6231+ else
6232+ {
6233+ new_sug.st_word = stp->st_word;
6234+ new_sug.st_wordlen = stp->st_wordlen;
6235+ new_sug.st_slang = stp->st_slang;
6236+ new_sug.st_orglen = badlen;
6237+ rescore_one(su, &new_sug);
6238+ }
6239+ }
6240
6241- if (stp->st_had_bonus != had_bonus)
6242- {
6243- /* Only one of the two had the soundalike score computed.
6244- * Need to do that for the other one now, otherwise the
6245- * scores can't be compared. This happens because
6246- * suggest_try_change() doesn't compute the soundalike
6247- * word to keep it fast, while some special methods set
6248- * the soundalike score to zero. */
6249- if (had_bonus)
6250- rescore_one(su, stp);
6251- else
6252+ if (stp->st_score > new_sug.st_score)
6253 {
6254- new_sug.st_word = stp->st_word;
6255- new_sug.st_wordlen = stp->st_wordlen;
6256- new_sug.st_slang = stp->st_slang;
6257- new_sug.st_orglen = badlen;
6258- rescore_one(su, &new_sug);
6259+ stp->st_score = new_sug.st_score;
6260+ stp->st_altscore = new_sug.st_altscore;
6261+ stp->st_had_bonus = new_sug.st_had_bonus;
6262 }
6263+ break;
6264 }
6265-
6266- if (stp->st_score > new_sug.st_score)
6267- {
6268- stp->st_score = new_sug.st_score;
6269- stp->st_altscore = new_sug.st_altscore;
6270- stp->st_had_bonus = new_sug.st_had_bonus;
6271- }
6272- break;
6273- }
6274+ }
6275
6276 if (i < 0 && ga_grow(gap, 1) == OK)
6277 {
[9903b4e]6278@@ -15656,7 +15672,7 @@
[d28a23b]6279 ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0
6280 : STRNCMP(p, pat, STRLEN(pat)) == 0)
6281 && ins_compl_add_infercase(p, (int)STRLEN(p),
6282- FALSE, NULL, *dir, 0) == OK)
6283+ p_ic, NULL, *dir, 0) == OK)
6284 /* if dir was BACKWARD then honor it just once */
6285 *dir = FORWARD;
6286 }
6287diff -Naur vim70.orig/src/structs.h vim70/src/structs.h
6288--- vim70.orig/src/structs.h 2006-04-09 10:57:46.000000000 -0700
6289+++ vim70/src/structs.h 2006-08-19 16:39:02.000000000 -0700
6290@@ -2213,18 +2213,20 @@
6291
6292 /*
6293 * Struct to save values in before executing autocommands for a buffer that is
6294- * not the current buffer.
6295+ * not the current buffer. Without FEAT_AUTOCMD only "curbuf" is remembered.
6296 */
6297 typedef struct
6298 {
6299 buf_T *save_buf; /* saved curbuf */
6300+#ifdef FEAT_AUTOCMD
6301 buf_T *new_curbuf; /* buffer to be used */
6302 win_T *save_curwin; /* saved curwin, NULL if it didn't change */
6303 win_T *new_curwin; /* new curwin if save_curwin != NULL */
6304 pos_T save_cursor; /* saved cursor pos of save_curwin */
6305 linenr_T save_topline; /* saved topline of save_curwin */
6306-#ifdef FEAT_DIFF
6307+# ifdef FEAT_DIFF
6308 int save_topfill; /* saved topfill of save_curwin */
6309+# endif
6310 #endif
6311 } aco_save_T;
6312
6313diff -Naur vim70.orig/src/tag.c vim70/src/tag.c
6314--- vim70.orig/src/tag.c 2006-04-27 06:11:21.000000000 -0700
6315+++ vim70/src/tag.c 2006-09-11 09:26:46.000000000 -0700
6316@@ -3787,6 +3787,7 @@
6317 {
6318 int num_matches, i, ret;
6319 char_u **matches, *p;
6320+ char_u *full_fname;
6321 dict_T *dict;
6322 tagptrs_T tp;
6323 long is_static;
6324@@ -3809,9 +3810,10 @@
6325 if (list_append_dict(list, dict) == FAIL)
6326 ret = FAIL;
6327
6328+ full_fname = tag_full_fname(&tp);
6329 if (add_tag_field(dict, "name", tp.tagname, tp.tagname_end) == FAIL
6330- || add_tag_field(dict, "filename", tp.fname,
6331- tp.fname_end) == FAIL
6332+ || add_tag_field(dict, "filename", full_fname,
6333+ NULL) == FAIL
6334 || add_tag_field(dict, "cmd", tp.command,
6335 tp.command_end) == FAIL
6336 || add_tag_field(dict, "kind", tp.tagkind,
6337@@ -3819,6 +3821,8 @@
6338 || dict_add_nr_str(dict, "static", is_static, NULL) == FAIL)
6339 ret = FAIL;
6340
6341+ vim_free(full_fname);
6342+
6343 if (tp.command_end != NULL)
6344 {
6345 for (p = tp.command_end + 3;
6346diff -Naur vim70.orig/src/term.c vim70/src/term.c
6347--- vim70.orig/src/term.c 2006-05-03 10:34:57.000000000 -0700
6348+++ vim70/src/term.c 2006-08-19 16:40:11.000000000 -0700
6349@@ -4783,6 +4783,14 @@
6350 return -1;
6351 current_menu = (vimmenu_T *)val;
6352 slen += num_bytes;
6353+
6354+ /* The menu may have been deleted right after it was used, check
6355+ * for that. */
6356+ if (check_menu_pointer(root_menu, current_menu) == FAIL)
6357+ {
6358+ key_name[0] = KS_EXTRA;
6359+ key_name[1] = (int)KE_IGNORE;
6360+ }
6361 }
6362 # endif
6363 # ifdef FEAT_GUI_TABLINE
6364diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in
6365--- vim70.orig/src/testdir/test56.in 2005-05-18 08:37:37.000000000 -0700
6366+++ vim70/src/testdir/test56.in 2006-09-11 09:00:23.000000000 -0700
6367@@ -3,7 +3,7 @@
6368 STARTTEST
6369 :so small.vim
6370 :"
6371-:set nocp
6372+:set nocp viminfo+=nviminfo
6373 :/^start:/+1,/^end:/-1w! Xtest.vim
6374 :source Xtest.vim
6375 _x
6376diff -Naur vim70.orig/src/ui.c vim70/src/ui.c
6377--- vim70.orig/src/ui.c 2006-03-27 11:15:09.000000000 -0800
6378+++ vim70/src/ui.c 2006-09-11 08:23:16.000000000 -0700
6379@@ -1137,7 +1137,6 @@
6380 int len;
6381 #ifdef FEAT_MBYTE
6382 char_u *p;
6383- int i;
6384 #endif
6385 int row1 = clip_star.start.lnum;
6386 int col1 = clip_star.start.col;
6387@@ -1218,6 +1217,8 @@
6388 #ifdef FEAT_MBYTE
6389 if (enc_dbcs != 0)
6390 {
6391+ int i;
6392+
6393 p = ScreenLines + LineOffset[row];
6394 for (i = start_col; i < end_col; ++i)
6395 if (enc_dbcs == DBCS_JPNU && p[i] == 0x8e)
6396diff -Naur vim70.orig/src/undo.c vim70/src/undo.c
6397--- vim70.orig/src/undo.c 2006-04-21 02:30:59.000000000 -0700
6398+++ vim70/src/undo.c 2006-09-11 08:23:16.000000000 -0700
6399@@ -84,7 +84,6 @@
6400 static void u_unch_branch __ARGS((u_header_T *uhp));
6401 static u_entry_T *u_get_headentry __ARGS((void));
6402 static void u_getbot __ARGS((void));
6403-static int undo_allowed __ARGS((void));
6404 static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T));
6405 static void u_doit __ARGS((int count));
6406 static void u_undoredo __ARGS((int undo));
6407@@ -196,7 +195,7 @@
6408 * Return TRUE when undo is allowed. Otherwise give an error message and
6409 * return FALSE.
6410 */
6411- static int
6412+ int
6413 undo_allowed()
6414 {
6415 /* Don't allow changes when 'modifiable' is off. */
6416@@ -1188,7 +1187,7 @@
6417 int did_undo; /* just did an undo */
6418 int absolute; /* used ":undo N" */
6419 {
6420- char *msg;
6421+ char *msgstr;
6422 u_header_T *uhp;
6423 char_u msgbuf[80];
6424
6425@@ -1206,20 +1205,20 @@
6426
6427 u_oldcount -= u_newcount;
6428 if (u_oldcount == -1)
6429- msg = N_("more line");
6430+ msgstr = N_("more line");
6431 else if (u_oldcount < 0)
6432- msg = N_("more lines");
6433+ msgstr = N_("more lines");
6434 else if (u_oldcount == 1)
6435- msg = N_("line less");
6436+ msgstr = N_("line less");
6437 else if (u_oldcount > 1)
6438- msg = N_("fewer lines");
6439+ msgstr = N_("fewer lines");
6440 else
6441 {
6442 u_oldcount = u_newcount;
6443 if (u_newcount == 1)
6444- msg = N_("change");
6445+ msgstr = N_("change");
6446 else
6447- msg = N_("changes");
6448+ msgstr = N_("changes");
6449 }
6450
6451 if (curbuf->b_u_curhead != NULL)
6452@@ -1245,7 +1244,7 @@
6453
6454 smsg((char_u *)_("%ld %s; %s #%ld %s"),
6455 u_oldcount < 0 ? -u_oldcount : u_oldcount,
6456- _(msg),
6457+ _(msgstr),
6458 did_undo ? _("before") : _("after"),
6459 uhp == NULL ? 0L : uhp->uh_seq,
6460 msgbuf);
6461diff -Naur vim70.orig/src/version.c vim70/src/version.c
6462--- vim70.orig/src/version.c 2006-05-03 00:50:42.000000000 -0700
[9903b4e]6463+++ vim70/src/version.c 2006-09-18 08:57:51.000000000 -0700
6464@@ -667,6 +667,208 @@
[d28a23b]6465 static int included_patches[] =
6466 { /* Add new patch number below this line */
6467 /**/
[9903b4e]6468+ 109,
6469+/**/
6470+ 107,
6471+/**/
6472+ 106,
6473+/**/
6474+ 105,
6475+/**/
6476+ 104,
6477+/**/
6478+ 103,
6479+/**/
6480+ 102,
6481+/**/
6482+ 101,
6483+/**/
6484+ 100,
6485+/**/
[d28a23b]6486+ 99,
6487+/**/
6488+ 98,
6489+/**/
6490+ 97,
6491+/**/
6492+ 96,
6493+/**/
6494+ 95,
6495+/**/
6496+ 94,
6497+/**/
6498+ 93,
6499+/**/
6500+ 92,
6501+/**/
6502+ 91,
6503+/**/
6504+ 90,
6505+/**/
6506+ 89,
6507+/**/
6508+ 88,
6509+/**/
6510+ 87,
6511+/**/
6512+ 86,
6513+/**/
6514+ 85,
6515+/**/
6516+ 84,
6517+/**/
6518+ 83,
6519+/**/
6520+ 82,
6521+/**/
6522+ 81,
6523+/**/
6524+ 80,
6525+/**/
6526+ 79,
6527+/**/
6528+ 78,
6529+/**/
6530+ 77,
6531+/**/
6532+ 76,
6533+/**/
6534+ 75,
6535+/**/
6536+ 73,
6537+/**/
6538+ 72,
6539+/**/
6540+ 71,
6541+/**/
6542+ 70,
6543+/**/
6544+ 69,
6545+/**/
6546+ 68,
6547+/**/
6548+ 67,
6549+/**/
6550+ 66,
6551+/**/
6552+ 64,
6553+/**/
6554+ 63,
6555+/**/
6556+ 62,
6557+/**/
6558+ 61,
6559+/**/
6560+ 60,
6561+/**/
6562+ 59,
6563+/**/
6564+ 58,
6565+/**/
6566+ 56,
6567+/**/
6568+ 55,
6569+/**/
6570+ 54,
6571+/**/
6572+ 53,
6573+/**/
6574+ 52,
6575+/**/
6576+ 51,
6577+/**/
6578+ 50,
6579+/**/
6580+ 49,
6581+/**/
6582+ 48,
6583+/**/
6584+ 47,
6585+/**/
6586+ 46,
6587+/**/
6588+ 44,
6589+/**/
6590+ 43,
6591+/**/
6592+ 42,
6593+/**/
6594+ 41,
6595+/**/
6596+ 40,
6597+/**/
6598+ 39,
6599+/**/
6600+ 38,
6601+/**/
6602+ 37,
6603+/**/
6604+ 36,
6605+/**/
6606+ 35,
6607+/**/
6608+ 34,
6609+/**/
6610+ 33,
6611+/**/
6612+ 31,
6613+/**/
6614+ 30,
6615+/**/
6616+ 29,
6617+/**/
6618+ 28,
6619+/**/
6620+ 26,
6621+/**/
6622+ 25,
6623+/**/
6624+ 24,
6625+/**/
6626+ 23,
6627+/**/
6628+ 22,
6629+/**/
6630+ 21,
6631+/**/
6632+ 20,
6633+/**/
6634+ 19,
6635+/**/
6636+ 18,
6637+/**/
6638+ 17,
6639+/**/
6640+ 16,
6641+/**/
6642+ 15,
6643+/**/
6644+ 14,
6645+/**/
6646+ 13,
6647+/**/
6648+ 12,
6649+/**/
6650+ 11,
6651+/**/
6652+ 10,
6653+/**/
6654+ 9,
6655+/**/
6656+ 8,
6657+/**/
6658+ 7,
6659+/**/
6660+ 6,
6661+/**/
6662+ 4,
6663+/**/
6664+ 3,
6665+/**/
6666+ 2,
6667+/**/
6668+ 1,
6669+/**/
6670 0
6671 };
6672
6673diff -Naur vim70.orig/src/vim.h vim70/src/vim.h
6674--- vim70.orig/src/vim.h 2006-04-30 08:32:38.000000000 -0700
6675+++ vim70/src/vim.h 2006-09-11 08:24:09.000000000 -0700
6676@@ -585,7 +585,6 @@
6677 #define INSERT 0x10 /* Insert mode */
6678 #define LANGMAP 0x20 /* Language mapping, can be combined with
6679 INSERT and CMDLINE */
6680-#define MAP_ALL_MODES 0x3f /* all mode bits used for mapping */
6681
6682 #define REPLACE_FLAG 0x40 /* Replace mode flag */
6683 #define REPLACE (REPLACE_FLAG + INSERT)
6684@@ -605,6 +604,9 @@
6685 #define CONFIRM 0x800 /* ":confirm" prompt */
6686 #define SELECTMODE 0x1000 /* Select mode, only for mappings */
6687
6688+#define MAP_ALL_MODES (0x3f | SELECTMODE) /* all mode bits used for
6689+ * mapping */
6690+
6691 /* directions */
6692 #define FORWARD 1
6693 #define BACKWARD (-1)
6694@@ -1118,6 +1120,7 @@
6695 EVENT_FOCUSGAINED, /* got the focus */
6696 EVENT_FOCUSLOST, /* lost the focus to another app */
6697 EVENT_GUIENTER, /* after starting the GUI */
6698+ EVENT_GUIFAILED, /* after starting the GUI failed */
6699 EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */
6700 EVENT_INSERTENTER, /* when entering Insert mode */
6701 EVENT_INSERTLEAVE, /* when leaving Insert mode */
6702@@ -1983,7 +1986,7 @@
6703 /* values for vim_handle_signal() that are not a signal */
6704 #define SIGNAL_BLOCK -1
6705 #define SIGNAL_UNBLOCK -2
6706-#if !defined(UNIX) && !defined(VMS)
6707+#if !defined(UNIX) && !defined(VMS) && !defined(OS2)
6708 # define vim_handle_signal(x) 0
6709 #endif
6710
6711diff -Naur vim70.orig/src/window.c vim70/src/window.c
6712--- vim70.orig/src/window.c 2006-05-06 03:54:51.000000000 -0700
6713+++ vim70/src/window.c 2006-09-11 09:01:59.000000000 -0700
6714@@ -340,10 +340,10 @@
6715 {
6716 tabpage_T *oldtab = curtab;
6717 tabpage_T *newtab;
6718- win_T *wp = curwin;
6719
6720 /* First create a new tab with the window, then go back to
6721 * the old tab and close the window there. */
6722+ wp = curwin;
6723 if (win_new_tabpage((int)Prenum) == OK
6724 && valid_tabpage(oldtab))
6725 {
6726@@ -3954,13 +3954,8 @@
6727 setmouse(); /* in case jumped to/from help buffer */
6728 #endif
6729
6730-#ifdef FEAT_AUTOCHDIR
6731- /* Change directories when the 'acd' option is set on and after
6732- * switching windows. */
6733- if (p_acd && curbuf->b_ffname != NULL
6734- && vim_chdirfile(curbuf->b_ffname) == OK)
6735- shorten_fnames(TRUE);
6736-#endif
6737+ /* Change directories when the 'acd' option is set. */
6738+ DO_AUTOCHDIR
6739 }
6740
6741 #endif /* FEAT_WINDOWS */
6742
Note: See TracBrowser for help on using the repository browser.