source: patches/vim-7.0-fixes-12.patch@ 0c3999a

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

vim patch update

  • Property mode set to 100644
File size: 230.2 KB
RevLine 
[d28a23b]1Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
2Date: 2006-09-11
3Initial Package Version: 7.0
4Origin: Upstream
5Upstream Status: Applied
6Description: Contains Patch 001-004, 006-026, 028-031, 033-044, 036-056,
7 058-064, 066-073, and 075-099 from Upstream
8 005, 027, 032, 045, 057, 066, and 074 are for the extras, Mac, or
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
140diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
141--- vim70.orig/runtime/plugin/matchparen.vim 2006-04-27 06:31:26.000000000 -0700
142+++ vim70/runtime/plugin/matchparen.vim 2006-09-11 09:04:35.000000000 -0700
143@@ -1,6 +1,6 @@
144 " Vim plugin for showing matching parens
145 " Maintainer: Bram Moolenaar <Bram@vim.org>
146-" Last Change: 2006 Apr 27
147+" Last Change: 2006 Sep 09
148
149 " Exit quickly when:
150 " - this plugin was already loaded (or disabled)
151@@ -44,7 +44,7 @@
152 let before = 0
153
154 let c = getline(c_lnum)[c_col - 1]
155- let plist = split(&matchpairs, ':\|,')
156+ let plist = split(&matchpairs, '.\zs[:,]')
157 let i = index(plist, c)
158 if i < 0
159 " not found, in Insert mode try character before the cursor
160@@ -90,19 +90,19 @@
161 " Find the match. When it was just before the cursor move it there for a
162 " moment.
163 if before > 0
164- let save_cursor = getpos('.')
165+ let save_cursor = winsaveview()
166 call cursor(c_lnum, c_col - before)
167 endif
168
169 " When not in a string or comment ignore matches inside them.
170 let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
171- \ '=~? "string\\|comment"'
172+ \ '=~? "string\\|character\\|singlequote\\|comment"'
173 execute 'if' s_skip '| let s_skip = 0 | endif'
174
175 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
176
177 if before > 0
178- call setpos('.', save_cursor)
179+ call winrestview(save_cursor)
180 endif
181
182 " If a match is found setup match highlighting.
183diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim
184--- vim70.orig/runtime/scripts.vim 2006-03-28 11:30:49.000000000 -0800
185+++ vim70/runtime/scripts.vim 2006-08-09 08:38:04.000000000 -0700
186@@ -1,7 +1,7 @@
187 " Vim support file to detect file types in scripts
188 "
189 " Maintainer: Bram Moolenaar <Bram@vim.org>
190-" Last change: 2006 Mar 28
191+" Last change: 2006 Jul 08
192
193 " This file is called by an autocommand for every file that has just been
194 " loaded into a buffer. It checks if the type of file can be recognized by
195@@ -54,6 +54,12 @@
196 let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
197 endif
198
199+ " tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
200+ " third line. Suggested by Steven Atkinson.
201+ if getline(3) =~ '^exec wish'
202+ let s:name = 'wish'
203+ endif
204+
205 " Bourne-like shell scripts: bash bash2 ksh ksh93 sh
206 if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
207 call SetFileTypeSH(s:line1) " defined in filetype.vim
208diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile
209--- vim70.orig/runtime/tutor/Makefile 2004-06-07 07:32:39.000000000 -0700
210+++ vim70/runtime/tutor/Makefile 2006-09-11 09:26:16.000000000 -0700
211@@ -2,8 +2,13 @@
212 #
213 # The Japanese tutor exists in three encodings. Use the UTF-8 version as the
214 # original and create the others with conversion.
215+#
216+# Similarly for Russian and Korean
217
218-all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc
219+all: tutor.ja.sjis tutor.ja.euc \
220+ tutor.ko.euc \
221+ tutor.ru tutor.ru.cp1251 \
222+ tutor.gr tutor.gr.cp737
223
224 tutor.ja.sjis: tutor.ja.utf-8
225 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
226@@ -13,3 +18,15 @@
227
228 tutor.ko.euc: tutor.ko.utf-8
229 iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc
230+
231+tutor.ru: tutor.ru.utf-8
232+ iconv -f UTF-8 -t KOI8-R tutor.ru.utf-8 > tutor.ru
233+
234+tutor.ru.cp1251: tutor.ru.utf-8
235+ iconv -f UTF-8 -t cp1251 tutor.ru.utf-8 > tutor.ru.cp1251
236+
237+tutor.gr: tutor.gr.utf-8
238+ iconv -f UTF-8 -t ISO-8859-7 tutor.gr.utf-8 > tutor.gr
239+
240+tutor.gr.cp737: tutor.gr.utf-8
241+ iconv -f UTF-8 -t cp737 tutor.gr.utf-8 > tutor.gr.cp737
242diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8
243--- vim70.orig/runtime/tutor/tutor.gr.utf-8 1969-12-31 16:00:00.000000000 -0800
244+++ vim70/runtime/tutor/tutor.gr.utf-8 2006-09-11 09:26:16.000000000 -0700
245@@ -0,0 +1,815 @@
246+===============================================================================
247+= Î. αλ Ï. Ï. ή ρ Ξ α Ï. ε Ï. Ï. ο V I M T u t o r - Î.κΎοÏ.η 1.5 =
248+===============================================================================
249+
250+ Î. Vim είΜαι έΜαÏ. Ï.αΜίÏ.Ï.Ï.ροÏ. Ï.Ï.ÎœÏ.άκÏ.ηÏ. Ï.οÏ. έÏ.ει Ï.ολλέÏ. εΜÏ.ολέÏ., Ï.άρα
251+ Ï.ολλέÏ. για Μα εΟηγήÏ.οÏ.Όε Ï.ε Όία Ï.εριήγηÏ.η Ï.Ï.Ï.Ï. αÏ.Ï.ή. Î.Ï.Ï.ή η Ï.εριήγηÏ.η
252+ Ï.Ï.εΎιάÏ.Ï.ηκε για Μα Ï.εριγράÏ.ει ικαΜοÏ.οιηÏ.ικά Ï.ιÏ. εΜÏ.ολέÏ. Ï.οÏ. Ξα Ï.αÏ.
253+ κάΜοÏ.Îœ Μα Ï.ρηÏ.ιΌοÏ.οιείÏ.ε εύκολα Ï.οΜ Vim Ï.αΜ έΜαΜ γεΜικήÏ. Ï.ρήÏ.ηÏ. Ï.Ï.ÎœÏ.άκÏ.η.
254+
255+ Î. καÏ.ά Ï.ροÏ.έγγιÏ.η Ï.ρÏ.ΜοÏ. Ï.οÏ. αÏ.αιÏ.είÏ.αι για Μα ολοκληρÏ.Ï.εÏ.ε Ï.ηΜ Ï.εριήγηÏ.η
256+ είΜαι 25-30 λεÏ.Ï.ά, εΟαρÏ.Ï.ÎœÏ.αÏ. αÏ.Ï. Ï.ο Ï.Ï.Ï.ο Ï.ρÏ.Μο Ξα ΟοΎέÏ.εÏ.ε για
257+ Ï.ειραΌαÏ.ιÏ.ΌούÏ..
258+
259+ Î.ι εΜÏ.ολέÏ. Ï.Ï.α ΌαΞήΌαÏ.α Ξα Ï.ροÏ.οÏ.οιήÏ.οÏ.Îœ Ï.ο κείΌεΜο. Î.ηΌιοÏ.ργήÏ.Ï.ε έΜα
260+ αΜÏ.ίγραÏ.ο αÏ.Ï.ού Ï.οÏ. αρÏ.είοÏ. για Μα εΟαÏ.κηΞείÏ.ε (αΜ ΟεκιΜήÏ.αÏ.ε Ï.ο
261+ "Vimtutor" αÏ.Ï.Ï. είΜαι ήΎη έΜα αΜÏ.ίγραÏ.ο).
262+
263+ Î.ίΜαι Ï.ηΌαΜÏ.ικÏ. Μα ΞÏ.ΌάÏ.Ï.ε Ï.Ï.ι αÏ.Ï.ή η Ï.εριήγηÏ.η είΜαι οργαΜÏ.ΌέΜη έÏ.Ï.ι
264+ Ï.Ï.Ï.ε Μα ΎιΎάÏ.κει ΌέÏ.Ï. Ï.ηÏ. Ï.ρήÏ.ηÏ.. Î.Ï.Ï.Ï. Ï.ηΌαίΜει Ï.Ï.ι Ï.ρειάζεÏ.αι Μα
265+ εκÏ.ελείÏ.ε Ï.ιÏ. εΜÏ.ολέÏ. για Μα Ï.ιÏ. ΌάΞεÏ.ε Ï.Ï.Ï.Ï.ά. Î.Îœ ΎιαβάζεÏ.ε ÎŒÏ.Μο Ï.ο
266+ κείΌεΜο, Ξα Ï.ιÏ. ΟεÏ.άÏ.εÏ.ε!
267+
268+ ΀Ï.ρα, βεβαιÏ.ΞείÏ.ε Ï.Ï.ι Ï.ο Ï.λήκÏ.ρο Shift-Lock Î.Î.Ν είΜαι Ï.αÏ.ηΌέΜο και
269+ Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο j αρκεÏ.έÏ. Ï.ορέÏ. για Μα ΌεÏ.ακιΜήÏ.εÏ.ε Ï.οΜ ΎροΌέα έÏ.Ï.ι
270+ Ï.Ï.Ï.ε Ï.ο Î.άΞηΌα 1.1 Μα γεΌίÏ.ει Ï.λήρÏ.Ï. Ï.ηΜ οΞÏ.Μη.
271+
272+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
273+ Î.άΞηΌα 1.1: Î.Î.΀Î.Î.Î.ΝÎ.Ν΀Î.Σ ΀Î.Ν Î.ΡÎ.Î.Î.Î.
274+
275+ ** Î.ια Μα κιΜήÏ.εÏ.ε Ï.οΜ ΎροΌέα, Ï.αÏ.ήÏ.Ï.ε Ï.α Ï.λήκÏ.ρα h,j,k,l Ï.Ï.Ï.Ï. ΎείÏ.ΜεÏ.αι. **
276+ ^
277+ k Hint: ΀ο Ï.λήκÏ.ρο h είΜαι αριÏ.Ï.ερά και κιΜεί Ï.Ï.' αριÏ.Ï.ερά.
278+ < h l > ΀ο Ï.λήκÏ.ρο l είΜαι ΎεΟιά και κιΜεί Ï.Ï.α ΎεΟιά.
279+ j ΀ο Ï.λήκÏ.ρο j Όοιάζει Όε βελάκι Ï.ροÏ. Ï.α κάÏ.Ï..
280+ v
281+
282+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.ριγύρÏ. Ï.Ï.ηΜ οΞÏ.Μη ΌέÏ.ρι Μα ΜοιÏ.ΞεÏ.ε άΜεÏ.α.
283+
284+ 2. Î.ραÏ.ήÏ.Ï.ε Ï.αÏ.ηΌέΜο Ï.ο κάÏ.Ï. Ï.λήκÏ.ρο (j) ΌέÏ.ρι Μα εÏ.αΜαληÏ.Ξεί.
285+---> ΀Ï.ρα ΟέρεÏ.ε Ï.Ï.Ï. Μα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο εÏ.Ï.ΌεΜο ΌάΞηΌα.
286+
287+ 3. ΧρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ο κάÏ.Ï. Ï.λήκÏ.ρο, ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο Î.άΞηΌα 1.2.
288+
289+ΣηΌείÏ.Ï.η: Î.Îœ αΌÏ.ιβάλλεÏ.ε για κάÏ.ι Ï.οÏ. Ï.αÏ.ήÏ.αÏ.ε, Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα βρεΞείÏ.ε
290+ Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. Î.εÏ.ά Ï.αÏ.ήÏ.Ï.ε ΟαΜά Ï.ηΜ εΜÏ.ολή Ï.οÏ. ΞέλαÏ.ε.
291+
292+ΣηΌείÏ.Ï.η: ΀α Ï.λήκÏ.ρα Ï.οÏ. ΎροΌέα Ξα Ï.ρέÏ.ει εÏ.ίÏ.ηÏ. Μα ΎοÏ.λεύοÏ.Îœ. Î.λλά Όε Ï.α hjkl
293+ Ξα ÎŒÏ.ορείÏ.ε Μα κιΜηΞείÏ.ε Ï.ολύ γρηγορÏ.Ï.ερα, ÎŒÏ.λιÏ. Ï.α Ï.Ï.ΜηΞίÏ.εÏ.ε.
294+
295+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
296+ Î.άΞηΌα 1.2: Î.Î Î.Î.ΝÎ.Ν΀Î.Σ Î.Î.Î. Î.Î.Î.Î.ΝÎ.Ν΀Î.Σ Σ΀Î.Ν VIM
297+
298+ !! ΣÎ.Î.Î.Î.ΩΣÎ.: ΠριΜ εκÏ.ελέÏ.εÏ.ε κάÏ.οιο αÏ.Ï. Ï.α βήΌαÏ.α, ΎιαβάÏ.Ï.ε Ï.λο Ï.ο ΌάΞηΌα!!
299+
300+ 1. ΠαÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο <ESC> (για Μα είÏ.Ï.ε Ï.ίγοÏ.ρα Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η).
301+
302+ 2. ΠληκÏ.ρολογήÏ.Ï.ε: :q! <ENTER>.
303+
304+---> Î.Ï.Ï.Ï. εΟέρÏ.εÏ.αι αÏ.Ï. Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η ΧΩΡÎ.Σ Μα Ï.Ï.Ï.ει Ï.Ï.οιεÏ. αλλαγέÏ. έÏ.εÏ.ε κάΜει.
305+ Î.Îœ ΞέλεÏ.ε Μα Ï.Ï.Ï.εÏ.ε Ï.ιÏ. αλλαγέÏ. και Μα εΟέρΞεÏ.ε Ï.ληκÏ.ρολογήÏ.Ï.ε:
306+ :wq <ENTER>
307+
308+ 3. Î.Ï.αΜ ΎείÏ.ε Ï.ηΜ Ï.ροÏ.ροÏ.ή Ï.οÏ. Ï.λοιού, Ï.ληκÏ.ρολογήÏ.Ï.ε Ï.ηΜ εΜÏ.ολή Όε Ï.ηΜ οÏ.οία
309+ ÎŒÏ.ήκαÏ.ε Ï.ε αÏ.Ï.ήΜ Ï.ηΜ Ï.εριήγηÏ.η. Î.Ï.ορεί Μα είΜαι: vimtutor <ENTER>
310+ Î.αΜοΜικά Ξα Ï.ρηÏ.ιΌοÏ.οιούÏ.αÏ.ε: vim tutor <ENTER>
311+
312+---> 'vim' Ï.ηΌαίΜει ειÏ.αγÏ.γή Ï.Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η vim, 'tutor' είΜαι Ï.ο αρÏ.είο Ï.οÏ.
313+ ΞέλοÏ.Όε Μα ΎιορΞÏ.Ï.οÏ.Όε.
314+
315+ 4. Î.Îœ έÏ.εÏ.ε αÏ.οΌΜηΌοΜεύÏ.ει αÏ.Ï.ά Ï.α βήΌαÏ.α και έÏ.εÏ.ε αÏ.Ï.οÏ.εÏ.οίΞηÏ.η, εκÏ.ελέÏ.Ï.ε
316+ Ï.α βήΌαÏ.α 1 έÏ.Ï. 3 για Μα βγείÏ.ε και Μα ÎŒÏ.είÏ.ε ΟαΜά Ï.Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η. Î.εÏ.ά
317+ ΌεÏ.ακιΜήÏ.Ï.ε Ï.οΜ ΎροΌέα κάÏ.Ï. Ï.Ï.ο Î.άΞηΌα 1.3.
318+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
319+ Î.άΞηΌα 1.3: Î.Î.Î.ΡÎ.ΩΣÎ. Î.Î.Î.Î.Î.ΝÎ.Î¥ - Î.Î.Î.Î.ΡÎ.ΊÎ.
320+
321+ ** Î.Ï.ο είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε x για Μα ΎιαγράÏ.εÏ.ε Ï.οΜ
322+ Ï.αρακÏ.ήρα κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα. **
323+
324+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
325+
326+ 2. Î.ια Μα ΎιορΞÏ.Ï.εÏ.ε Ï.α λάΞη, κιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα ΌέÏ.ρι Μα είΜαι Ï.άΜÏ. αÏ.Ï.
327+ Ï.οΜ Ï.αρακÏ.ήρα Ï.οÏ. Ξα ΎιαγραÏ.εί.
328+
329+ 3. ΠαÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο x για Μα ΎιαγράÏ.εÏ.ε Ï.οΜ αΜεÏ.ιΞύΌηÏ.ο Ï.αρακÏ.ήρα.
330+
331+ 4. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 ΌέÏ.ρι 4 ΌέÏ.ρι η Ï.ρÏ.Ï.αÏ.η Μα είΜαι Ï.Ï.Ï.Ï.ή.
332+
333+---> The ccow jumpedd ovverr thhe mooon.
334+
335+ 5. ΀Ï.ρα Ï.οÏ. η γραΌΌή είΜαι Ï.Ï.Ï.Ï.ή, Ï.ηγαίΜÏ.ε Ï.Ï.ο Î.άΞηΌα 1.4.
336+
337+ΣÎ.Î.Î.Î.ΩΣÎ.: Î.αΞÏ.Ï. ΎιαÏ.ρέÏ.εÏ.ε αÏ.Ï.ήΜ Ï.ηΜ Ï.εριήγηÏ.η, Ï.ροÏ.Ï.αΞήÏ.Ï.ε Μα ΌηΜ
338+ αÏ.οΌΜηΌοΜεύεÏ.ε, ΌαΞαίΜεÏ.ε Όε Ï.η Ï.ρήÏ.η.
339+
340+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
341+ Î.άΞηΌα 1.4: Î.Î.Î.ΡÎ.ΩΣÎ. Î.Î.Î.Î.Î.ΝÎ.Î¥ - Î Î.ΡÎ.Î.Î.Î.Î.Î.
342+
343+ ** Î.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε i για Μα Ï.αρεΌβάλλεÏ.ε κείΌεΜο. **
344+
345+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
346+
347+ 2. Î.ια Μα κάΜεÏ.ε Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή ίΎια Όε Ï.ηΜ ΎεύÏ.ερη, ΌεÏ.ακιΜείÏ.Ï.ε Ï.οΜ
348+ ΎροΌέα Ï.άΜÏ. Ï.Ï.οΜ Ï.ρÏ.Ï.ο Ï.αρακÏ.ήρα Î.Î.΀Î. αÏ.Ï. Ï.Ï.οÏ. Ξα Ï.αρεΌβληΞεί Ï.ο κείΌεΜο.
349+
350+ 3. ΠαÏ.ήÏ.Ï.ε Ï.ο i και Ï.ληκÏ.ρολογήÏ.Ï.ε Ï.ιÏ. αÏ.αραίÏ.ηÏ.εÏ. Ï.ροÏ.ΞήκεÏ..
351+
352+ 4. Î.αΞÏ.Ï. ΎιορΞÏ.ΜεÏ.ε κάΞε λάΞοÏ. Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα εÏ.ιÏ.Ï.ρέÏ.εÏ.ε Ï.Ï.ηΜ
353+ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 ΌέÏ.ρι 4 για Μα ΎιορΞÏ.Ï.εÏ.ε
354+ Ï.ηΜ Ï.ρÏ.Ï.αÏ.η.
355+
356+---> There is text misng this .
357+---> There is some text missing from this line.
358+
359+ 5. Î.Ï.αΜ είÏ.Ï.ε άΜεÏ.οι Όε Ï.ηΜ Ï.αρεΌβολή κειΌέΜοÏ. ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ
360+ Ï.αρακάÏ.Ï. Ï.ερίληÏ.η.
361+
362+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
363+ Î.Î.Î.Î.Î.Î. 1 Î Î.ΡÎ.Î.Î.ΚÎ.
364+
365+
366+ 1. Î. ΎροΌέαÏ. κιΜείÏ.αι Ï.ρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. είÏ.ε Ï.α Ï.λήκÏ.ρα ΎροΌέα ή Ï.α hjkl.
367+ h (αριÏ.Ï.έρα) j (κάÏ.Ï.) k (Ï.άΜÏ.) l (ΎεΟιά)
368+
369+ 2. Î.ια Μα ÎŒÏ.είÏ.ε Ï.Ï.οΜ Vim (αÏ.Ï. Ï.ηΜ Ï.ροÏ.ροÏ.ή %) γράÏ.Ï.ε: vim Î.ΡΧÎ.Î.Î. <ENTER>
370+
371+ 3. Î.ια Μα βγείÏ.ε γράÏ.Ï.ε: <ESC> :q! <ENTER> για αÏ.Ï.ρριÏ.η Ï.Ï.Îœ αλλαγÏ.Îœ.
372+ Î. γράÏ.Ï.ε: <ESC> :wq <ENTER> για αÏ.οΞήκεÏ.Ï.η Ï.Ï.Îœ αλλαγÏ.Îœ.
373+
374+ 4. Î.ια Μα ΎιαγράÏ.εÏ.ε έΜαΜ Ï.αρακÏ.ήρα κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα Ï.ε
375+ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε: x
376+
377+ 5. Î.ια Μα ειÏ.άγεÏ.ε κείΌεΜο Ï.Ï.οΜ ΎροΌέα Ï.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η γράÏ.Ï.ε:
378+ i Ï.ληκÏ.ρολογήÏ.Ï.ε Ï.ο κείΌεΜο <ESC>
379+
380+ΣÎ.Î.Î.Î.ΩΣÎ.: ΠαÏ.Ï.ÎœÏ.αÏ. <ESC> Ξα Ï.οÏ.οΞεÏ.ηΞείÏ.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η ή Ξα
381+ ακÏ.ρÏ.Ï.εÏ.ε Όία αΜεÏ.ιΞύΌηÏ.η και ΌερικÏ.Ï. ολοκληρÏ.ΌέΜη εΜÏ.ολή.
382+
383+΀Ï.ρα Ï.Ï.ΜεÏ.ίÏ.Ï.ε Όε Ï.ο Î.άΞηΌα 2.
384+
385+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
386+ Î.άΞηΌα 2.1: Î.Ν΀Î.Î.Î.Σ Î.Î.Î.Î.ΡÎ.ΊÎ.Σ
387+
388+ ** Î.ράÏ.Ï.ε dw για Μα ΎιαγράÏ.εÏ.ε ΌέÏ.ρι Ï.ο Ï.έλοÏ. ΌίαÏ. λέΟηÏ.. **
389+
390+ 1. ΠαÏ.ήÏ.Ï.ε <ESC> για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η.
391+
392+ 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
393+
394+ 3. ΠηγαίΜεÏ.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ αρÏ.ή Ï.ηÏ. λέΟηÏ. Ï.οÏ. Ï.ρέÏ.ει Μα ΎιαγραÏ.εί.
395+
396+ 4. Î.ράÏ.Ï.ε dw για Μα κάΜεÏ.ε Ï.ηΜ λέΟη Μα εΟαÏ.αΜιÏ.Ï.εί.
397+
398+ΣÎ.Î.Î.Î.ΩΣÎ.: ΀α γράΌΌαÏ.α dw Ξα εΌÏ.αΜιÏ.Ï.ούΜ Ï.Ï.ηΜ Ï.ελεÏ.Ï.αία γραΌΌή Ï.ηÏ. οΞÏ.ΜηÏ. Ï.Ï.ο
399+ Ï.α Ï.ληκÏ.ρολογείÏ.ε. Î.Îœ γράÏ.αÏ.ε κάÏ.ι λάΞοÏ., Ï.αÏ.ήÏ.Ï.ε <ESC> και
400+ ΟεκιΜήÏ.Ï.ε αÏ.Ï. Ï.ηΜ αρÏ.ή.
401+
402+---> There are a some words fun that don't belong paper in this sentence.
403+
404+ 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 3 και 4 ΌέÏ.ρι η Ï.ρÏ.Ï.αÏ.η Μα είΜαι Ï.Ï.Ï.Ï.ή και
405+ Ï.ηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 2.2.
406+
407+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
408+ Î.άΞηΌα 2.2: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ.Σ Î.Ν΀Î.Î.Î.Σ Î.Î.Î.Î.ΡÎ.ΊÎ.Σ
409+
410+ ** ΠληκÏ.ρολογήÏ.Ï.ε d$ για Μα ΎιαγράÏ.εÏ.ε ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ.. **
411+
412+ 1. ΠαÏ.ήÏ.Ï.ε <ESC> για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η.
413+
414+ 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
415+
416+ 3. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.έλοÏ. Ï.ηÏ. Ï.Ï.Ï.Ï.ήÏ. γραΌΌήÏ. (Î.Î.΀Î. Ï.ηΜ Ï.ρÏ.Ï.η . ).
417+
418+ 4. ΠαÏ.ήÏ.Ï.ε d$ για Μα ΎιαγράÏ.εÏ.ε ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ..
419+
420+---> Somebody typed the end of this line twice. end of this line twice.
421+
422+ 5. ΠηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 2.3 για Μα καÏ.αλάβεÏ.ε Ï.ι Ï.Ï.ΌβαίΜει.
423+
424+
425+
426+
427+
428+
429+
430+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
431+ Î.άΞηΌα 2.3: Î Î.ΡÎ. Î.Ν΀Î.Î.ΩΝ Î.Î.Î. Î.Ν΀Î.Î.Î.Î.Î.Î.ΝΩΝ
432+
433+
434+Î. ΌορÏ.ή Ï.ηÏ. εΜÏ.ολήÏ. ΎιαγραÏ.ήÏ. d είΜαι Ï.Ï. εΟήÏ.:
435+
436+ [αριΞΌÏ.Ï.] d αΜÏ.ικείΌεΜο Î. d [αριΞΌÏ.Ï.] αΜÏ.ικείΌεΜο
437+ Î.Ï.οÏ.:
438+ αριΞΌÏ.Ï. - Ï.Ï.Ï.εÏ. Ï.ορέÏ. Ξα εκÏ.ελεÏ.Ï.εί η εΜÏ.ολή (Ï.ροαιρεÏ.ικÏ., εΟ' οριÏ.Όού=1).
439+ d - η εΜÏ.ολή Ï.ηÏ. ΎιαγραÏ.ήÏ..
440+ αΜÏ.ικείΌεΜο - Ï.άΜÏ. Ï.ε Ï.ι Ξα λειÏ.οÏ.ργήÏ.ει η εΜÏ.ολή (Ï.αρακάÏ.Ï. λίÏ.Ï.α).
441+
442+ Î.ία Όικρή λίÏ.Ï.α αÏ.Ï. αΜÏ.ικείΌεΜα:
443+ w - αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. λέΟηÏ., Ï.εριλαΌβάΜοΜÏ.αÏ. Ï.ο ΎιάÏ.Ï.ηΌα.
444+ e - αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. λέΟηÏ., ΧΩΡÎ.Σ Ï.ο ΎιάÏ.Ï.ηΌα.
445+ $ - αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ..
446+
447+ΣÎ.Î.Î.Î.ΩΣÎ.: Î.ια Ï.οÏ.Ï. Ï.ύÏ.οÏ.Ï. Ï.ηÏ. Ï.εριÏ.έÏ.ειαÏ., Ï.αÏ.Ï.ÎœÏ.αÏ. αÏ.λÏ.Ï. Ï.ο αΜÏ.ικείΌεΜο Ï.Ï.ο
448+ είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.Ï.ρίÏ. κάÏ.οια εΜÏ.ολή Ξα ΌεÏ.ακιΜήÏ.εÏ.ε
449+ Ï.οΜ ΎροΌέα Ï.Ï.Ï.Ï. καΞορίζεÏ.αι Ï.Ï.ηΜ λίÏ.Ï.α αΜÏ.ικειΌέΜÏ.Îœ.
450+
451+
452+
453+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
454+ Î.άΞηΌα 2.4: Î.Î.Î. Î.Î.Î.Î.ΡÎ.ΣÎ. Σ΀Î.Ν 'Î.Ν΀Î.Î.Î.-Î.Ν΀Î.Î.Î.Î.Î.Î.ΝÎ.'
455+
456+ ** ΠληκÏ.ρολογήÏ.Ï.ε dd για Μα ΎιαγράÏ.εÏ.ε Ï.λη Ï.η γραΌΌή. **
457+
458+ Î.ΟαιÏ.ίαÏ. Ï.ηÏ. Ï.Ï.Ï.ÎœÏ.Ï.ηÏ.αÏ. Ï.ηÏ. ΎιαγραÏ.ήÏ. ολÏ.κληρηÏ. γραΌΌήÏ., οι Ï.Ï.εΎιαÏ.Ï.έÏ.
459+ Ï.οÏ. Vim αÏ.οÏ.άÏ.ιÏ.αΜ Ï.Ï.ι Ξα ήÏ.αΜ εÏ.κολÏ.Ï.ερο Μα γράÏ.εÏ.ε αÏ.λÏ.Ï. Ύύο d Ï.Ï.η
460+ Ï.ειρά για Μα ΎιαγράÏ.εÏ.ε Όία γραΌΌή.
461+
462+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.η ΎεύÏ.ερη γραΌΌή Ï.ηÏ. Ï.αρακάÏ.Ï. Ï.ράÏ.ηÏ..
463+ 2. Î.ράÏ.Ï.ε dd για Μα ΎιαγράÏ.εÏ.ε Ï.η γραΌΌή.
464+ 3. ΀Ï.ρα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ Ï.έÏ.αρÏ.η γραΌΌή.
465+ 4. Î.ράÏ.Ï.ε 2dd (ΞÏ.ΌηΞείÏ.ε αριΞΌÏ.Ï.-εΜÏ.ολή-αΜÏ.ικείΌεΜο) για Μα
466+ ΎιαγράÏ.εÏ.ε Ύύο γραΌΌέÏ..
467+
468+ 1) Roses are red,
469+ 2) Mud is fun,
470+ 3) Violets are blue,
471+ 4) I have a car,
472+ 5) Clocks tell time,
473+ 6) Sugar is sweet
474+ 7) And so are you.
475+
476+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
477+ Î.άΞηΌα 2.5: Î. Î.Ν΀Î.Î.Î. Î.ΝÎ.Î.ΡÎ.ΣÎ.Σ
478+
479+ ** ΠαÏ.ήÏ.Ï.ε u για Μα αΜαιρέÏ.εÏ.ε Ï.ιÏ. Ï.ελεÏ.Ï.αίεÏ. εΜÏ.ολέÏ.,
480+ U για Μα ΎιορΞÏ.Ï.εÏ.ε Ï.λη Ï.η γραΌΌή. **
481+
482+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε ---> και
483+ Ï.οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ Ï.άΜÏ. Ï.Ï.ο Ï.ρÏ.Ï.ο λάΞοÏ..
484+ 2. ΠαÏ.ήÏ.Ï.ε x για Μα ΎιαγράÏ.εÏ.ε Ï.οΜ Ï.ρÏ.Ï.ο αΜεÏ.ιΞύΌηÏ.ο Ï.αρακÏ.ήρα.
485+ 3. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε u για Μα αΜαιρέÏ.εÏ.ε Ï.ηΜ Ï.ελεÏ.Ï.αία εκÏ.ελεÏ.ΌέΜη εΜÏ.ολή.
486+ 4. Î.Ï.Ï.ή Ï.η Ï.ορά ΎιορΞÏ.Ï.Ï.ε Ï.λα Ï.α λάΞη Ï.Ï.η γραΌΌή Ï.ρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ηΜ εΜÏ.ολή x.
487+ 5. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε έΜα κεÏ.αλαίο U για Μα εÏ.ιÏ.Ï.ρέÏ.εÏ.ε Ï.η γραΌΌή Ï.Ï.ηΜ αρÏ.ική
488+ Ï.ηÏ. καÏ.άÏ.Ï.αÏ.η.
489+ 6. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε u ΌερικέÏ. Ï.ορέÏ. για Μα αΜαιρέÏ.εÏ.ε Ï.ηΜ U και
490+ Ï.ροηγούΌεΜεÏ. εΜÏ.ολέÏ..
491+ 7. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε CTRL-R (κραÏ.Ï.ÎœÏ.αÏ. Ï.αÏ.ηΌέΜο Ï.ο Ï.λήκÏ.ρο CTRL καΞÏ.Ï. Ï.αÏ.άÏ.ε Ï.ο R)
492+ ΌερικέÏ. Ï.ορέÏ. για Μα εÏ.αΜαÏ.έρεÏ.ε Ï.ιÏ. εΜÏ.ολέÏ. (αΜαίρεÏ.η Ï.Ï.Îœ αΜαιρέÏ.εÏ.Îœ).
493+
494+---> Fiix the errors oon thhis line and reeplace them witth undo.
495+
496+ 8. Î.Ï.Ï.έÏ. είΜαι Ï.ολύ Ï.ρήÏ.ιΌεÏ. εΜÏ.ολέÏ.. ΀Ï.ρα Ï.ηγαίΜεÏ.ε Ï.Ï.ηΜ
497+ ΠερίληÏ.η Ï.οÏ. Î.αΞήΌαÏ.οÏ. 2.
498+
499+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
500+ Î.Î.Î.Î.Î.Î. 2 Î Î.ΡÎ.Î.Î.ΚÎ.
501+
502+
503+ 1. Î.ια Μα ΎιαγράÏ.εÏ.ε αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. λέΟηÏ. γράÏ.Ï.ε: dw
504+
505+ 2. Î.ια Μα ΎιαγράÏ.εÏ.ε αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. γραΌΌήÏ. γράÏ.Ï.ε: d$
506+
507+ 3. Î.ια Μα ΎιαγράÏ.εÏ.ε ολÏ.κληρη Ï.η γραΌΌή γράÏ.Ï.ε: dd
508+
509+ 4. Î. ΌορÏ.ή για Όία εΜÏ.ολή Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η είΜαι:
510+
511+ [αριΞΌÏ.Ï.] εΜÏ.ολή αΜÏ.ικείΌεΜο Î. εΜÏ.ολή [αριΞΌÏ.Ï.] αΜÏ.ικείΌεΜο
512+ Ï.Ï.οÏ.:
513+ αριΞΌÏ.Ï. - Ï.Ï.Ï.εÏ. Ï.ορέÏ. Μα εÏ.αΜαληÏ.Ξεί η εΜÏ.ολή
514+ εΜÏ.ολή - Ï.ι Μα γίΜει, Ï.Ï.Ï.Ï. η d για ΎιαγραÏ.ή
515+ αΜÏ.ικείΌεΜο - Ï.άΜÏ. Ï.ε Ï.ι Μα εΜεργήÏ.ει η εΜÏ.ολή, Ï.Ï.Ï.Ï. w (λέΟη),
516+ $ (Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ.), κÏ.λ.
517+
518+ 5. Î.ια Μα αΜαιρέÏ.εÏ.ε Ï.ροηγούΌεΜεÏ. εΜέργειεÏ., Ï.αÏ.ήÏ.Ï.ε: u (Ï.εζÏ. u)
519+ Î.ια Μα αΜαιρέÏ.εÏ.ε Ï.λεÏ. Ï.ιÏ. αλλαγέÏ. Ï.Ï.η γραΌΌή, Ï.αÏ.ήÏ.Ï.ε: U (κεÏ.αλαίο U)
520+ Î.ια Μα αΜαιρέÏ.εÏ.ε Ï.ιÏ. αΜαιρέÏ.ειÏ., Ï.αÏ.ήÏ.Ï.ε: CTRL-R
521+
522+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
523+ Î.άΞηΌα 3.1: Î. Î.Ν΀Î.Î.Î. ΀Î.Î Î.Î.Î.΀Î.ΣÎ.Σ
524+
525+
526+ ** ΠαÏ.ήÏ.Ï.ε p για Μα Ï.οÏ.οΞεÏ.ήÏ.εÏ.ε Ï.ηΜ Ï.ελεÏ.Ï.αία ΎιαγραÏ.ή ΌεÏ.ά Ï.οΜ ΎροΌέα. **
527+
528+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.ηÏ. Ï.αρακάÏ.Ï. οΌάΎαÏ..
529+
530+ 2. ΠαÏ.ήÏ.Ï.ε dd για Μα ΎιαγράÏ.εÏ.ε Ï.η γραΌΌή και Μα Ï.ηΜ αÏ.οΞηκεύÏ.εÏ.ε Ï.ε
531+ Ï.ροÏ.Ï.ριΜή ΌΜήΌη Ï.οÏ. Vim.
532+
533+ 3. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.η γραΌΌή Î Î.ΝΩ αÏ.Ï. εκεί Ï.οÏ. Ξα Ï.ρέÏ.ει Μα Ï.άει
534+ η ΎιαγραΌΌέΜη γραΌΌή.
535+
536+ 4. Î.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η, Ï.αÏ.ήÏ.Ï.ε p για Μα βάλεÏ.ε Ï.η γραΌΌή.
537+
538+ 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 έÏ.Ï. 4 για Μα βάλεÏ.ε Ï.λεÏ. Ï.ιÏ. γραΌΌέÏ. Ï.Ï.η
539+ Ï.Ï.Ï.Ï.ή Ï.ειρά.
540+
541+ d) Can you learn too?
542+ b) Violets are blue,
543+ c) Intelligence is learned,
544+ a) Roses are red,
545+
546+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
547+ Î.άΞηΌα 3.2: Î. Î.Ν΀Î.Î.Î. Î.Ν΀Î.Î.Î.΀Î.Σ΀Î.ΣÎ.Σ
548+
549+
550+ ** ΠαÏ.ήÏ.Ï.ε r και Ï.αρακÏ.ήρα για Μα αλλάΟεÏ.ε αÏ.Ï.Ï.Îœ Ï.οÏ. είΜαι
551+ κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα. **
552+
553+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
554+
555+ 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα έÏ.Ï.ι Ï.Ï.Ï.ε Μα είΜαι Ï.άΜÏ. Ï.Ï.ο Ï.ρÏ.Ï.ο λάΞοÏ..
556+
557+ 3. ΠαÏ.ήÏ.Ï.ε r και ΌεÏ.ά Ï.οΜ Ï.αρακÏ.ήρα ο οÏ.οίοÏ. ΎιορΞÏ.Μει Ï.ο λάΞοÏ..
558+
559+ 4. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 και 3 ΌέÏ.ρι Μα είΜαι Ï.Ï.Ï.Ï.ή η Ï.ρÏ.Ï.η γραΌΌή.
560+
561+---> Whan this lime was tuoed in, someone presswd some wrojg keys!
562+---> When this line was typed in, someone pressed some wrong keys!
563+
564+ 5. ΀Ï.ρα Ï.ηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 3.2.
565+
566+ΣÎ.Î.Î.Î.ΩΣÎ.: Να ΞÏ.ΌάÏ.Ï.ε Ï.Ï.ι Ï.ρέÏ.ει Μα ΌαΞαίΜεÏ.ε Όε Ï.η Ï.ρήÏ.η, και Ï.Ï.ι Όε
567+ Ï.ηΜ αÏ.οΌΜηΌÏ.ΜεÏ.Ï.η.
568+
569+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
570+ Î.άΞηΌα 3.3: Î. Î.Ν΀Î.Î.Î. Î.Î.Î.Î.Î.Î.Σ
571+
572+ ** Î.ια Μα αλλάΟεÏ.ε Ï.ΌήΌα ή Ï.λη Ï.η λέΟη, Ï.αÏ.ήÏ.Ï.ε cw . **
573+
574+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
575+
576+ 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.άΜÏ. Ï.Ï.ο u Ï.ηÏ. λέΟηÏ. lubw.
577+
578+ 3. ΠαÏ.ήÏ.Ï.ε cw και Ï.η Ï.Ï.Ï.Ï.ή λέΟη (Ï.Ï.ηΜ Ï.ερίÏ.Ï.Ï.Ï.η αÏ.Ï.ή, γράÏ.Ï.ε 'ine'.)
579+
580+ 4. ΠαÏ.ήÏ.Ï.ε <ESC> και Ï.ηγαίΜεÏ.ε Ï.Ï.ο εÏ.Ï.ΌεΜο λάΞοÏ. (Ï.Ï.οΜ Ï.ρÏ.Ï.ο
581+ Ï.αρακÏ.ήρα Ï.ροÏ. αλλαγή).
582+
583+ 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 3 και 4 ΌέÏ.ριÏ. Ï.Ï.οÏ. η Ï.ρÏ.Ï.η Ï.ρÏ.Ï.αÏ.η Μα είΜαι
584+ ίΎια Όε Ï.η ΎεύÏ.ερη.
585+
586+---> This lubw has a few wptfd that mrrf changing usf the change command.
587+---> This line has a few words that need changing using the change command.
588+
589+ΠαραÏ.ηρείÏ.Ï.ε Ï.Ï.ι η cw Ï.Ï.ι ÎŒÏ.Μο αΜÏ.ικαΞιÏ.Ï.άει Ï.η λέΟη, αλλά Ï.αÏ. ειÏ.άγει
590+εÏ.ίÏ.ηÏ. Ï.ε Ï.αρεΌβολή.
591+
592+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
593+ Î.άΞηΌα 3.4: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ.Σ Î.Î.Î.Î.Î.Î.Σ Î.Î. c
594+
595+
596+ ** Î. εΜÏ.ολή αλλαγήÏ. Ï.ρηÏ.ιΌοÏ.οιείÏ.αι Όε Ï.α ίΎια αΜÏ.ικείΌεΜα Ï.ηÏ. ΎιαγραÏ.ήÏ.. **
597+
598+
599+ 1. Î. εΜÏ.ολή αλλαγήÏ. ΎοÏ.λεύει Όε Ï.οΜ ίΎιο Ï.ρÏ.Ï.ο Ï.Ï.Ï.Ï. η ΎιαγραÏ.ή. Î. ΌορÏ.ή είΜαι:
600+
601+ [αριΞΌÏ.Ï.] c αΜÏ.ικείΌεΜο Î. c [αριΞΌÏ.Ï.] αΜÏ.ικείΌεΜο
602+
603+ 2. ΀α αΜÏ.ικείΌεΜα είΜαι Ï.άλι Ï.α ίΎια, Ï.Ï.Ï.Ï. w (λέΟη), $ (Ï.έλοÏ. γραΌΌήÏ.), κÏ.λ.
604+
605+ 3. Î.εÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
606+
607+ 4. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.ρÏ.Ï.ο λάΞοÏ..
608+
609+ 5. Î.ράÏ.Ï.ε c$ για Μα κάΜεÏ.ε Ï.ο Ï.Ï.Ï.λοιÏ.ο Ï.ηÏ. γραΌΌήÏ. ίΎιο Όε Ï.η ΎεύÏ.ερη
610+ και Ï.αÏ.ήÏ.Ï.ε <ESC>.
611+
612+---> The end of this line needs some help to make it like the second.
613+---> The end of this line needs to be corrected using the c$ command.
614+
615+
616+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
617+ Î.Î.Î.Î.Î.Î. 3 Î Î.ΡÎ.Î.Î.ΚÎ.
618+
619+
620+ 1. Î.ια Μα Ï.οÏ.οΞεÏ.ήÏ.εÏ.ε κείΌεΜο Ï.οÏ. ÎŒÏ.λιÏ. έÏ.ει ΎιαγραÏ.εί, Ï.αÏ.ήÏ.Ï.ε p .
621+ Î.Ï.Ï.Ï. Ï.οÏ.οΞεÏ.εί Ï.ο ΎιαγραΌΌέΜο κείΌεΜο Î.Î.΀Î. Ï.οΜ ΎροΌέα (αΜ ΎιαγράÏ.Ï.ηκε
622+ γραΌΌή Ξα Ï.άει ΌεÏ.ά Ï.Ï.η γραΌΌή κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα.
623+
624+ 2. Î.ια Μα αΜÏ.ικαÏ.αÏ.Ï.ήÏ.εÏ.ε Ï.οΜ Ï.αρακÏ.ήρα κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα, Ï.αÏ.ήÏ.Ï.ε r
625+ και ΌεÏ.ά Ï.οΜ Ï.αρακÏ.ήρα Ï.οÏ. Ξα αΜÏ.ικαÏ.αÏ.Ï.ήÏ.ει Ï.οΜ αρÏ.ικÏ..
626+
627+ 3. Î. εΜÏ.ολή αλλαγήÏ. Ï.αÏ. εÏ.ιÏ.ρέÏ.ει Μα αλλάΟεÏ.ε Ï.ο καΞοριÏ.ΌέΜο αΜÏ.ικείΌεΜο
628+ αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.οÏ. αΜÏ.ικείΌεΜο. Î .Ï.. γράÏ.Ï.ε cw για Μα
629+ αλλάΟεÏ.ε αÏ.Ï. Ï.οΜ ΎροΌέα ΌέÏ.ρι Ï.ο Ï.έλοÏ. Ï.ηÏ. λέΟηÏ., c$ για Μα αλλάΟεÏ.ε
630+ ΌέÏ.ρι Ï.ο Ï.έλοÏ. γραΌΌήÏ..
631+
632+ 4. Î. ΌορÏ.ή για Ï.ηΜ αλλαγή είΜαι:
633+
634+ [αριΞΌÏ.Ï.] c αΜÏ.ικείΌεΜο Î. c [αριΞΌÏ.Ï.] αΜÏ.ικείΌεΜο
635+
636+΀Ï.ρα Ï.Ï.ΜεÏ.ίÏ.Ï.ε Όε Ï.ο εÏ.Ï.ΌεΜο ΌάΞηΌα.
637+
638+
639+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
640+ Î.άΞηΌα 4.1: Î.Î.ΣÎ. Î.Î.Î. Î.Î.΀Î.Σ΀Î.ΣÎ. Î.ΡΧÎ.Î.Î.Î¥
641+
642+
643+ ** ΠαÏ.ήÏ.Ï.ε CTRL-g για Μα εΌÏ.αΜιÏ.Ï.εί η ΞέÏ.η Ï.αÏ. Ï.Ï.ο αρÏ.είο και η καÏ.άÏ.Ï.αÏ.ή Ï.οÏ..
644+ ΠαÏ.ήÏ.Ï.ε SHIFT-G για Μα Ï.άÏ.ε Ï.ε Όία γραΌΌή Ï.Ï.ο αρÏ.είο. **
645+
646+ ΣηΌείÏ.Ï.η: Î.ιαβάÏ.Ï.ε ολÏ.κληρο Ï.ο ΌάΞηΌα Ï.ριΜ εκÏ.ελέÏ.εÏ.ε κάÏ.οιο αÏ.Ï. Ï.α βήΌαÏ.α!!
647+
648+ 1. Î.ραÏ.ήÏ.Ï.ε Ï.αÏ.ηΌέΜο Ï.ο Ï.λήκÏ.ρο Ctrl και Ï.αÏ.ήÏ.Ï.ε g . Î.ία γραΌΌή καÏ.άÏ.Ï.αÏ.ηÏ.
649+ Ξα εΌÏ.αΜιÏ.Ï.εί Ï.Ï.ο κάÏ.Ï. ΌέροÏ. Ï.ηÏ. Ï.ελίΎαÏ. Όε Ï.ο Ï.ΜοΌα αρÏ.είοÏ. και Ï.η
650+ γραΌΌή Ï.οÏ. είÏ.Ï.ε. Î.Ï.ΌηΞείÏ.ε Ï.οΜ αριΞΌÏ. γραΌΌήÏ. για Ï.ο Î.ήΌα 3.
651+
652+ 2. ΠαÏ.ήÏ.Ï.ε shift-G για Μα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο Ï.έλοÏ. Ï.οÏ. αρÏ.είοÏ..
653+
654+ 3. ΠαÏ.ήÏ.Ï.ε Ï.οΜ αριΞΌÏ. Ï.ηÏ. γραΌΌήÏ. Ï.οÏ. ήÏ.αÏ.Ï.αΜ και ΌεÏ.ά shift-G. Î.Ï.Ï.Ï. Ξα
655+ Ï.αÏ. εÏ.ιÏ.Ï.ρέÏ.ει Ï.Ï.η γραΌΌή Ï.οÏ. ήÏ.αÏ.Ï.αΜ Ï.ριΜ Ï.αÏ.ήÏ.εÏ.ε για Ï.ρÏ.Ï.η Ï.ορά Ctrl-g.
656+ (Î.Ï.αΜ Ï.ληκÏ.ρολογείÏ.ε Ï.οÏ.Ï. αριΞΌούÏ., Î.Î.Ν Ξα εΌÏ.αΜίζοΜÏ.αι Ï.Ï.ηΜ οΞÏ.Μη).
657+
658+ 4. Î.Îœ ΜοιÏ.ΞεÏ.ε Ï.ίγοÏ.ροÏ. για αÏ.Ï.Ï., εκÏ.ελέÏ.Ï.ε Ï.α βήΌαÏ.α 1 έÏ.Ï. 3.
659+
660+
661+
662+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
663+ Î.άΞηΌα 4.2: Î. Î.Ν΀Î.Î.Î. Î.ΝÎ.Î.Î.΀Î.ΣÎ.Σ
664+
665+
666+ ** ΠαÏ.ήÏ.Ï.ε / ακολοÏ.ΞούΌεΜο αÏ.Ï. Ï.η Ï.ράÏ.η Ï.οÏ. Ï.άÏ.ΜεÏ.ε. **
667+
668+ 1. Σε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε Ï.οΜ Ï.αρακÏ.ήρα / . ΠαραÏ.ηρήÏ.Ï.ε Ï.Ï.ι αÏ.Ï.Ï.Ï. και
669+ ο ΎροΌέαÏ. εΌÏ.αΜίζοΜÏ.αι Ï.Ï.ο κάÏ.Ï. ΌέροÏ. Ï.ηÏ. οΞÏ.ΜηÏ. Ï.Ï.Ï.Ï. Όε Ï.ηΜ εΜÏ.ολή : .
670+
671+ 2. ΀Ï.ρα γράÏ.Ï.ε 'errroor' <ENTER>. Î.Ï.Ï.ή είΜαι η λέΟη Ï.οÏ. ΞέλεÏ.ε Μα Ï.άΟεÏ.ε.
672+
673+ 3. Î.ια Μα Ï.άΟεÏ.ε ΟαΜά για Ï.ηΜ ίΎια Ï.ράÏ.η, Ï.αÏ.ήÏ.Ï.ε αÏ.λÏ.Ï. n .
674+ Î.ια Μα Ï.άΟεÏ.ε Ï.ηΜ ίΎια Ï.ράÏ.η Ï.Ï.ηΜ αΜÏ.ίΞεÏ.η καÏ.εύΞÏ.ÎœÏ.η, Ï.αÏ.ήÏ.Ï.ε Shift-N .
675+
676+ 4. Î.Îœ ΞέλεÏ.ε Μα Ï.άΟεÏ.ε για Όία Ï.ράÏ.η Ï.ροÏ. Ï.α Ï.ίÏ.Ï., Ï.ρηÏ.ιΌοÏ.οιήÏ.Ï.ε Ï.ηΜ εΜÏ.ολή ? αΜÏ.ί Ï.ηÏ. / .
677+
678+---> Î.Ï.αΜ η αΜαζήÏ.ηÏ.η Ï.Ï.άÏ.ει Ï.Ï.ο Ï.έλοÏ. Ï.οÏ. αρÏ.είοÏ. Ξα Ï.Ï.ΜεÏ.ίÏ.ει αÏ.Ï. Ï.ηΜ αρÏ.ή.
679+
680+ "errroor" is not the way to spell error; errroor is an error.
681+
682+
683+
684+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
685+ Î.άΞηΌα 4.3: Î.ΥΡÎ.ΣÎ. ΀Î.Î.ΡÎ.Î.Σ΀ΩΝ Î Î.ΡÎ.ΝÎ.Î.ΣÎ.ΩΝ
686+
687+
688+ ** ΠαÏ.ήÏ.Ï.ε % για Μα βρείÏ.ε Ï.ηΜ αΜÏ.ίÏ.Ï.οιÏ.η ), ], ή } . **
689+
690+ 1. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.ε κάÏ.οια (, [, ή { Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή
691+ Ï.ηΌειÏ.ΌέΜη Όε --->.
692+
693+ 2. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε Ï.οΜ Ï.αρακÏ.ήρα % .
694+
695+ 3. Î. ΎροΌέαÏ. Ξα Ï.ρέÏ.ει Μα είΜαι Ï.Ï.ηΜ αΜÏ.ίÏ.Ï.οιÏ.η Ï.αρέΜΞεÏ.η ή αγκύλη.
696+
697+ 4. ΠαÏ.ήÏ.Ï.ε % για Μα ΌεÏ.ακιΜήÏ.εÏ.ε Ï.οΜ ΎροΌέα Ï.ίÏ.Ï. Ï.Ï.ηΜ Ï.ρÏ.Ï.η αγκύλη
698+ (Ï.οÏ. ζεÏ.γαριού).
699+
700+---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
701+
702+ΣÎ.Î.Î.Î.ΩΣÎ.: Î.Ï.Ï.Ï. είΜαι Ï.ολύ Ï.ρήÏ.ιΌο Ï.Ï.ηΜ αÏ.οÏ.Ï.αλΌάÏ.Ï.Ï.η εΜÏ.Ï. Ï.ρογράΌΌαÏ.οÏ.
703+ Όε Όη Ï.αιριαÏ.Ï.έÏ. Ï.αρεΜΞέÏ.ειÏ.!
704+
705+
706+
707+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
708+ Î.άΞηΌα 4.4: Î.ΝÎ.Σ ΀ΡÎ.Î Î.Σ Î.Î.Î. Î.Î.Î.Î.Î.Î. Î.Î.Î.ΩΝ
709+
710+
711+ ** Î.ράÏ.Ï.ε :s/old/new/g για Μα αλλάΟεÏ.ε Ï.ο 'new' Όε Ï.ο 'old'. **
712+
713+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
714+
715+ 2. Î.ράÏ.Ï.ε :s/thee/the <ENTER> . ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι αÏ.Ï.ή η εΜÏ.ολή αλλάζει ÎŒÏ.Μο
716+ Ï.ηΜ Ï.ρÏ.Ï.η εΌÏ.άΜιÏ.η Ï.Ï.η γραΌΌή.
717+
718+ 3. ΀Ï.ρα γράÏ.Ï.ε :s/thee/the/g εΜΜοÏ.ÎœÏ.αÏ. γεΜική αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.Ï.η
719+ γραΌΌή. Î.Ï.Ï.Ï. αλλάζει Ï.λεÏ. Ï.ιÏ. εΌÏ.αΜίÏ.ειÏ. εÏ.ί Ï.ηÏ. γραΌΌήÏ..
720+
721+---> thee best time to see thee flowers is in thee spring.
722+
723+ 4. Î.ια Μα αλλάΟεÏ.ε κάΞε εΌÏ.άΜιÏ.η ΌίαÏ. Ï.Ï.ΌβολοÏ.ειράÏ. ΌεÏ.αΟύ Ύύο γραΌΌÏ.Îœ,
724+ γράÏ.Ï.ε :#,#s/old/new/g Ï.Ï.οÏ. #,# οι αριΞΌοί Ï.Ï.Îœ Ύύο γραΌΌÏ.Îœ.
725+ Î.ράÏ.Ï.ε :%s/old/new/g για Μα αλλάΟεÏ.ε κάΞε εΌÏ.άΜιÏ.η Ï.ε Ï.λο Ï.ο αρÏ.είο.
726+
727+
728+
729+
730+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
731+ Î.Î.Î.Î.Î.Î. 4 Î Î.ΡÎ.Î.Î.ΚÎ.
732+
733+
734+ 1. ΀ο Ctrl-g εΌÏ.αΜίζει Ï.η ΞέÏ.η Ï.αÏ. Ï.Ï.ο αρÏ.είο και Ï.ηΜ καÏ.άÏ.Ï.αÏ.ή Ï.οÏ..
735+ ΀ο Shift-G Ï.ηγαίΜει Ï.Ï.ο Ï.έλοÏ. Ï.οÏ. αρÏ.είοÏ.. Î.ΜαÏ. αριΞΌÏ.Ï. γραΌΌήÏ.
736+ ακολοÏ.ΞούΌεΜοÏ. αÏ.Ï. Shift-G Ï.ηγαίΜει Ï.ε εκείΜη Ï.η γραΌΌή.
737+
738+ 2. Î.ράÏ.οΜÏ.αÏ. / ακολοÏ.ΞούΌεΜο αÏ.Ï. Όία Ï.ράÏ.η Ï.άÏ.Μει Ï.ροÏ. Ï.α Î.ΠΡÎ.Σ΀Î. για
739+ Ï.η Ï.ράÏ.η. Î.ράÏ.οΜÏ.αÏ. ? ακολοÏ.ΞούΌεΜο αÏ.Ï. Όία Ï.ράÏ.η Ï.άÏ.Μει Ï.ροÏ. Ï.α Î Î.ΣΩ
740+ για Ï.η Ï.ράÏ.η. Î.εÏ.ά αÏ.Ï. Όία αΜαζήÏ.ηÏ.η Ï.αÏ.ήÏ.Ï.ε n για Μα βρείÏ.ε Ï.ηΜ
741+ εÏ.Ï.ΌεΜη εΌÏ.άΜιÏ.η Ï.ροÏ. Ï.ηΜ ίΎια καÏ.εύΞÏ.ÎœÏ.η ή Shift-N για Μα Ï.άΟεÏ.ε
742+ Ï.ροÏ. Ï.ηΜ αΜÏ.ίΞεÏ.η καÏ.εύΞÏ.ÎœÏ.η.
743+
744+ 3. ΠαÏ.Ï.ÎœÏ.αÏ. % Ï.Ï.ο ο ΎροΌέαÏ. είΜαι Ï.άΜÏ. Ï.ε Όία (,),[,],{, ή } εΜÏ.οÏ.ίζει
745+ Ï.ο αΜÏ.ίÏ.Ï.οιÏ.ο Ï.αίρι Ï.οÏ. ζεÏ.γαριού.
746+
747+ 4. Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Όε new Ï.οÏ. Ï.ρÏ.Ï.οÏ. old Ï.Ï.η γραΌΌή γράÏ.Ï.ε :s/old/new
748+ Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Όε new Ï.λÏ.Îœ Ï.Ï.Îœ 'old' Ï.Ï.η γραΌΌή γράÏ.Ï.ε :s/old/new/g
749+ Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.ράÏ.εÏ.Îœ ΌεÏ.αΟύ Ύύο # γραΌΌÏ.Îœ γράÏ.Ï.ε :#,#s/old/new/g
750+ Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.λÏ.Îœ Ï.Ï.Îœ εΌÏ.αΜίÏ.εÏ.Îœ Ï.Ï.ο αρÏ.είο γράÏ.Ï.ε :%s/old/new/g
751+ Î.ια ερÏ.Ï.ηÏ.η εÏ.ιβεβαίÏ.Ï.ηÏ. κάΞε Ï.ορά Ï.ροÏ.ΞέÏ.Ï.ε έΜα 'c' "%s/old/new/gc
752+
753+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
754+ Î.άΞηΌα 5.1: ΠΩΣ Î.Î.΀Î.Î.Ω Î.Î.Î. Î.Î.Ω΀Î.ΡÎ.Î.Î. Î.Ν΀Î.Î.Î.
755+
756+
757+** Î.ράÏ.Ï.ε :! ακολοÏ.ΞούΌεΜο αÏ.Ï. Όία εΟÏ.Ï.ερική εΜÏ.ολή για Μα Ï.ηΜ εκÏ.ελέÏ.εÏ.ε. **
758+
759+ 1. ΠαÏ.ήÏ.Ï.ε Ï.ηΜ οικεία εΜÏ.ολή : για Μα ΞέÏ.εÏ.ε Ï.οΜ ΎροΌέα Ï.Ï.ο κάÏ.Ï. ΌέροÏ.
760+ Ï.ηÏ. οΞÏ.ΜηÏ.. Î.Ï.Ï.Ï. Ï.αÏ. εÏ.ιÏ.ρέÏ.ει Μα ÎŽÏ.Ï.εÏ.ε Όία εΜÏ.ολή.
761+
762+ 2. ΀Ï.ρα Ï.αÏ.ήÏ.Ï.ε Ï.ο ! (ΞαÏ.ΌαÏ.Ï.ικÏ.). Î.Ï.Ï.Ï. Ï.αÏ. εÏ.ιÏ.ρέÏ.ει Μα εκÏ.ελέÏ.εÏ.ε
763+ οÏ.οιαΎήÏ.οÏ.ε εΟÏ.Ï.ερική εΜÏ.ολή Ï.οÏ. Ï.λοιού.
764+
765+ 3. ΣαΜ Ï.αράΎειγΌα γράÏ.Ï.ε ls ΌεÏ.ά αÏ.Ï. Ï.ο ! και Ï.αÏ.ήÏ.Ï.ε <ENTER>. Î.Ï.Ï.Ï. Ξα
766+ Ï.αÏ. εΌÏ.αΜίÏ.ει Όία λίÏ.Ï.α Ï.οÏ. καÏ.αλÏ.γοÏ. Ï.αÏ., ακριβÏ.Ï. Ï.αΜ Μα ήÏ.αÏ.Ï.αΜ Ï.Ï.ηΜ
767+ Ï.ροÏ.ροÏ.ή Ï.οÏ. Ï.λοιού. Î. Ï.ρηÏ.ιΌοÏ.οιήÏ.Ï.ε :!dir αΜ Ï.ο ls ΎεΜ ΎοÏ.λεύει.
768+
769+---> ΣηΌείÏ.Ï.η: Î.ίΜαι ÎŽÏ.ΜαÏ.Ï.Îœ Μα εκÏ.ελέÏ.εÏ.ε οÏ.οιαΎήÏ.οÏ.ε εΟÏ.Ï.ερική εΜÏ.ολή
770+ Όε αÏ.Ï.Ï.Îœ Ï.οΜ Ï.ρÏ.Ï.ο.
771+
772+---> ΣηΌείÏ.Ï.η: Î.λεÏ. οι εΜÏ.ολέÏ. : Ï.ρέÏ.ει Μα Ï.ερΌαÏ.ίζοΜÏ.αι Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο <ENTER>.
773+
774+
775+
776+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
777+ Î.άΞηΌα 5.2: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ. Î Î.ΡÎ. Î.Î.Î.ΡÎ.ΊÎ.Σ Î.ΡΧÎ.Î.ΩΝ
778+
779+
780+ ** Î.ια Μα Ï.Ï.Ï.εÏ.ε Ï.ιÏ. αλλάγεÏ. Ï.οÏ. κάΜαÏ.ε Ï.Ï.ο αρÏ.είο, γράÏ.Ï.ε :w Î.ΡΧÎ.Î.Î.. **
781+
782+ 1. Î.ράÏ.Ï.ε :!dir ή :!ls για Μα Ï.άρεÏ.ε Όία λίÏ.Ï.α Ï.οÏ. καÏ.αλÏ.γοÏ. Ï.αÏ..
783+ Î.Ύη ΟέρεÏ.ε Ï.Ï.ι Ï.ρέÏ.ει Μα Ï.αÏ.ήÏ.εÏ.ε <ENTER> ΌεÏ.ά αÏ.Ï. αÏ.Ï.Ï..
784+
785+ 2. Î.ιαλέΟÏ.ε έΜα Ï.ΜοΌα αρÏ.είοÏ. Ï.οÏ. ΎεΜ Ï.Ï.άρÏ.ει ακÏ.Όα, Ï.Ï.Ï.Ï. Ï.ο TEST.
786+
787+ 3. ΀Ï.ρα γράÏ.Ï.ε: :w TEST (Ï.Ï.οÏ. TEST είΜαι Ï.ο Ï.ΜοΌα αρÏ.είοÏ. Ï.οÏ. ΎιαλέΟαÏ.ε).
788+
789+ 4. Î.Ï.Ï.Ï. Ï.Ï.ζει Ï.λο Ï.ο αρÏ.είο (vim Tutor) Όε Ï.ο Ï.ΜοΌα TEST. Î.ια Μα Ï.ο
790+ εÏ.αληΞεύÏ.εÏ.ε, γράÏ.Ï.ε ΟαΜά :!dir για Μα ΎείÏ.ε Ï.οΜ καÏ.άλογÏ. Ï.αÏ..
791+
792+---> ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι αΜ βγαίΜαÏ.ε αÏ.Ï. Ï.οΜ Vim και ÎŒÏ.αίΜαÏ.ε ΟαΜά Όε Ï.ο Ï.ΜοΌα
793+ αρÏ.είοÏ. TEST, Ï.ο αρÏ.είο Ξα ήÏ.αΜ ακριβέÏ. αΜÏ.ίγραÏ.ο Ï.οÏ. tutor Ï.Ï.αΜ Ï.ο Ï.Ï.Ï.αÏ.ε.
794+
795+ 5. ΀Ï.ρα ΎιαγράÏ.Ï.ε Ï.ο αρÏ.είο γράÏ.οΜÏ.αÏ. (MS-DOS): :!del TEST
796+
797+
798+
799+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
800+ Î.άΞηΌα 5.3: Î.Î Î.Î.Î.Î.΀Î.Î.Î. Î.Ν΀Î.Î.Î. Î.Î.Î.ΡÎ.ΊÎ.Σ
801+
802+
803+ ** Î.ια Μα Ï.Ï.Ï.εÏ.ε Ï.ΌήΌα Ï.οÏ. αρÏ.είοÏ., γράÏ.Ï.ε :#,# w Î.ΡΧÎ.Î.Î. **
804+
805+ 1. Î.λλη Όια Ï.ορά, γράÏ.Ï.ε :!dir ή :!ls για Μα Ï.άρεÏ.ε Όία λίÏ.Ï.α αÏ.Ï. Ï.οΜ
806+ καÏ.άλογÏ. Ï.αÏ. και ΎιαλέΟÏ.ε έΜα καÏ.άλληλο Ï.ΜοΌα αρÏ.είοÏ. Ï.Ï.Ï.Ï. Ï.ο TEST.
807+
808+ 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.άΜÏ. ΌέροÏ. αÏ.Ï.ήÏ. Ï.ηÏ. Ï.ελίΎαÏ. και Ï.αÏ.ήÏ.Ï.ε
809+ Ctrl-g για Μα βρείÏ.ε Ï.οΜ αριΞΌÏ. αÏ.Ï.ήÏ. Ï.ηÏ. γραΌΌήÏ..
810+ ΝÎ. Î.Î¥Î.Î.Σ΀Î. Î.Υ΀Î.Ν ΀Î.Ν Î.ΡÎ.Î.Î.Î.!
811+
812+ 3. ΀Ï.ρα Ï.ηγαίΜεÏ.ε Ï.Ï.ο κάÏ.Ï. ΌέροÏ. Ï.ηÏ. Ï.ελίΎαÏ. και Ï.αÏ.ήÏ.Ï.ε Ctrl-g ΟαΜά.
813+ ΝÎ. Î.Î¥Î.Î.Σ΀Î. Î.Î.Î. Î.Υ΀Î.Ν ΀Î.Ν Î.ΡÎ.Î.Î.Î.!
814+
815+ 4. Î.ια Μα Ï.Ï.Ï.εÏ.ε Î.Î.ΝÎ. έΜα Ï.ΌήΌα Ï.ε αρÏ.είο, γράÏ.Ï.ε :#,# w TEST
816+ Ï.Ï.οÏ. #,# οι Ύύο αριΞΌοί Ï.οÏ. αÏ.οΌΜηΌοΜεύÏ.αÏ.ε (Ï.άΜÏ.,κάÏ.Ï.) και TEST Ï.ο
817+ Ï.ΜοΌα Ï.οÏ. αρÏ.είοÏ. Ï.αÏ..
818+
819+ 5. Î.αΜά, ΎείÏ.ε Ï.Ï.ι Ï.ο αρÏ.είο είΜαι εκεί Όε Ï.ηΜ :!dir αλλά Î.Î.Ν Ï.ο ΎιαγράÏ.εÏ.ε.
820+
821+
822+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
823+ Î.άΞηΌα 5.4: Î.ΝÎ.Î.΀ΩΝ΀Î.Σ Î.Î.Î. Î.ΝΩΝÎ.Ν΀Î.Σ Î.ΡΧÎ.Î.Î.
824+
825+
826+ ** Î.ια Μα ειÏ.άγεÏ.ε Ï.α Ï.εριεÏ.Ï.ΌεΜα εΜÏ.Ï. αρÏ.είοÏ., γράÏ.Ï.ε :r Î.ΡΧÎ.Î.Î. **
827+
828+ 1. Î.ράÏ.Ï.ε :!dir για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι Ï.ο TEST Ï.Ï.άρÏ.ει αÏ.Ï. Ï.ριΜ.
829+
830+ 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.άΜÏ. ΌέροÏ. Ï.ηÏ. Ï.ελίΎαÏ..
831+
832+ΣÎ.Î.Î.Î.ΩΣÎ.: Î.Ï.Ï.Ï.οÏ. εκÏ.ελέÏ.εÏ.ε Ï.ο Î.ήΌα 3 Ξα ΎείÏ.ε Ï.ο Î.άΞηΌα 5.3.
833+ Î.εÏ.ά κιΜηΞείÏ.ε Î.Î.΀Ω ΟαΜά Ï.ροÏ. Ï.ο ΌάΞηΌα αÏ.Ï.Ï..
834+
835+ 3. ΀Ï.ρα αΜακÏ.ήÏ.Ï.ε Ï.ο αρÏ.είο Ï.αÏ. TEST Ï.ρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ηΜ εΜÏ.ολή :r TEST
836+ Ï.Ï.οÏ. TEST είΜαι Ï.ο Ï.ΜοΌα Ï.οÏ. αρÏ.είοÏ..
837+
838+ΣÎ.Î.Î.Î.ΩΣÎ.: ΀ο αρÏ.είο Ï.οÏ. αΜακÏ.άÏ.ε Ï.οÏ.οΞεÏ.είÏ.αι ΟεκιΜÏ.ÎœÏ.αÏ. εκεί Ï.οÏ. βρίÏ.κεÏ.αι
839+ ο ΎροΌέαÏ..
840+
841+ 4. Î.ια Μα εÏ.αληΞεύÏ.εÏ.ε Ï.Ï.ι Ï.ο αρÏ.είο αΜακÏ.ήΞηκε, Ï.ίÏ.Ï. Ï.οΜ ΎροΌέα και
842+ Ï.αραÏ.ηρήÏ.Ï.ε Ï.Ï.ι Ï.Ï.άρÏ.οÏ.Îœ Ï.Ï.ρα Ύύο αΜÏ.ίγραÏ.α Ï.οÏ. Î.αΞήΌαÏ.οÏ. 5.3, Ï.ο
843+ αρÏ.ικÏ. και η έκΎοÏ.η Ï.οÏ. αρÏ.είοÏ..
844+
845+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
846+ Î.Î.Î.Î.Î.Î. 5 Î Î.ΡÎ.Î.Î.ΚÎ.
847+
848+
849+ 1. :!εΜÏ.ολή εκÏ.ελεί Όία εΟÏ.Ï.ερική εΜÏ.ολή.
850+
851+ Î.ερικά Ï.ρήÏ.ιΌα Ï.αραΎείγΌαÏ.α είΜαι (MS-DOS):
852+ :!dir - εΌÏ.άΜιÏ.η λίÏ.Ï.αÏ. εΜÏ.Ï. καÏ.αλÏ.γοÏ..
853+ :!del Î.ΡΧÎ.Î.Î. - ΎιαγράÏ.ει Ï.ο Î.ΡΧÎ.Î.Î..
854+
855+ 2. :w Î.ΡΧÎ.Î.Î. γράÏ.ει Ï.ο Ï.ρέÏ.Ï.Îœ αρÏ.είο Ï.οÏ. Vim Ï.Ï.ο ΎίÏ.κο Όε Ï.ΜοΌα Î.ΡΧÎ.Î.Î..
856+
857+ 3. :#,#w Î.ΡΧÎ.Î.Î. Ï.Ï.ζει Ï.ιÏ. γραΌΌέÏ. αÏ.Ï. # ΌέÏ.ρι # Ï.Ï.ο Î.ΡΧÎ.Î.Î..
858+
859+ 4. :r Î.ΡΧÎ.Î.Î. αΜακÏ.εί Ï.ο αρÏ.είο ΎίÏ.κοÏ. Î.ΡΧÎ.Î.Î. και Ï.ο Ï.αρεΌβάλλει ΌέÏ.α
860+ Ï.Ï.ο Ï.ρέÏ.οΜ αρÏ.είο ΌεÏ.ά αÏ.Ï. Ï.η ΞέÏ.η Ï.οÏ. ΎροΌέα.
861+
862+
863+
864+
865+
866+
867+
868+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
869+ Î.άΞηΌα 6.1: Î. Î.Ν΀Î.Î.Î. Î.ΝÎ.Î.Î.Î.Î.΀Î.Σ
870+
871+
872+ ** ΠαÏ.ήÏ.Ï.ε o για Μα αΜοίΟεÏ.ε Όία γραΌΌή κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα και Μα
873+ βρεΞείÏ.ε Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ.. **
874+
875+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε --->.
876+
877+ 2. ΠαÏ.ήÏ.Ï.ε o (Ï.εζÏ.) για Μα αΜοίΟεÏ.ε Όία γραΌΌή Î.Î.΀Ω αÏ.Ï. Ï.οΜ ΎροΌέα και Μα
878+ βρεΞείÏ.ε Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ..
879+
880+ 3. ΀Ï.ρα αΜÏ.ιγράÏ.Ï.ε Ï.η Ï.ηΌειÏ.ΌέΜη Όε ---> γραΌΌή και Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα
881+ βγείÏ.ε αÏ.Ï. Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ..
882+
883+---> After typing o the cursor is placed on the open line in Insert mode.
884+
885+ 4. Î.ια Μα αΜοίΟεÏ.ε Όία γραΌΌή Î Î.ΝΩ αÏ.Ï. Ï.οΜ ΎροΌέα, Ï.αÏ.ήÏ.Ï.ε αÏ.λά έΜα κεÏ.αλαίο
886+ O, αΜÏ.ί για έΜα Ï.εζÏ. o. Î.οκιΌάÏ.Ï.ε Ï.ο Ï.Ï.ηΜ Ï.αρακάÏ.Ï. γραΌΌή.
887+Î.ΜοίγεÏ.ε γραΌΌή Ï.άΜÏ. αÏ.Ï. αÏ.Ï.ήΜ Ï.αÏ.Ï.ÎœÏ.αÏ. Shift-O Ï.Ï.ο ο ΎροΌέαÏ. είΜαι Ï.Ï.η γραΌΌή
888+
889+
890+
891+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
892+ Î.άΞηΌα 6.2: Î. Î.Ν΀Î.Î.Î. ΠΡÎ.ΣÎ.Î.Î.Î.Σ
893+
894+ ** ΠαÏ.ήÏ.Ï.ε a για Μα ειÏ.άγεÏ.ε κείΌεΜο Î.Î.΀Î. Ï.οΜ ΎροΌέα. **
895+
896+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ο Ï.έλοÏ. Ï.ηÏ. Ï.ρÏ.Ï.ηÏ. γραΌΌήÏ. Ï.αρακάÏ.Ï.
897+ Ï.ηΌειÏ.ΌέΜη Όε ---> Ï.αÏ.Ï.ÎœÏ.αÏ. $ Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η.
898+
899+ 2. ΠαÏ.ήÏ.Ï.ε έΜα a (Ï.εζÏ.) για Μα Ï.ροÏ.ΞέÏ.εÏ.ε κείΌεΜο Î.Î.΀Î. αÏ.Ï. Ï.οΜ Ï.αρακÏ.ήρα
900+ Ï.οÏ. είΜαι κάÏ.Ï. αÏ.Ï. Ï.οΜ ΎροΌέα. (΀ο κεÏ.αλαίο A Ï.ροÏ.ΞέÏ.ει Ï.Ï.ο Ï.έλοÏ.
901+ Ï.ηÏ. γραΌΌήÏ.).
902+
903+ΣηΌείÏ.Ï.η: Î.Ï.Ï.Ï. αÏ.οÏ.εύγει Ï.ο Ï.άÏ.ηΌα Ï.οÏ. i , Ï.οΜ Ï.ελεÏ.Ï.αίο Ï.αρακÏ.ήρα, Ï.ο
904+ κείΌεΜο Ï.ηÏ. ειÏ.αγÏ.γήÏ., <ESC>, ΎροΌέα-ΎεΟιά, και Ï.έλοÏ., x, ÎŒÏ.Μο και
905+ ÎŒÏ.Μο για Μα Ï.ροÏ.ΞέÏ.εÏ.ε Ï.Ï.ο Ï.έλοÏ. Ï.ηÏ. γραΌΌήÏ.!
906+
907+ 3. ΣÏ.ÎŒÏ.ληρÏ.Ï.Ï.ε Ï.Ï.ρα Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή. ΣηΌειÏ.Ï.Ï.ε εÏ.ίÏ.ηÏ. Ï.Ï.ι η Ï.ροÏ.Ξήκη είΜαι
908+ ακριβÏ.Ï. ίΎια Ï.Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ. Όε Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ιÏ.αγÏ.γήÏ., εκÏ.Ï.Ï.
909+ αÏ.Ï. Ï.η ΞέÏ.η Ï.οÏ. ειÏ.άγεÏ.αι Ï.ο κείΌεΜο.
910+
911+---> This line will allow you to practice
912+---> This line will allow you to practice appending text to the end of a line.
913+
914+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
915+ Î.άΞηΌα 6.3: Î.Î.Î.Î. Î.Î.Î.Î.ΣÎ. ΀Î.Σ Î.Ν΀Î.Î.Î.΀Î.Σ΀Î.ΣÎ.Σ
916+
917+
918+ ** ΠαÏ.ήÏ.Ï.ε κεÏ.αλαίο R για Μα αλλάΟεÏ.ε Ï.εριÏ.Ï.Ï.Ï.εροÏ.Ï. αÏ.Ï. έΜαΜ Ï.αρακÏ.ήρεÏ.. **
919+
920+ 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή Ï.αρακάÏ.Ï. Ï.ηΌειÏ.ΌέΜη Όε --->.
921+
922+ 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ΎροΌέα Ï.Ï.ηΜ αρÏ.ή Ï.ηÏ. Ï.ρÏ.Ï.ηÏ. λέΟηÏ. Ï.οÏ. είΜαι ΎιαÏ.ορεÏ.ική
923+ αÏ.Ï. Ï.η ΎεύÏ.ερη γραΌΌή Ï.ηΌειÏ.ΌέΜη Όε ---> (η λέΟη 'last').
924+
925+ 3. ΠαÏ.ήÏ.Ï.ε Ï.Ï.ρα R και αλλάΟÏ.ε Ï.ο Ï.Ï.Ï.λοιÏ.ο Ï.οÏ. κειΌέΜοÏ. Ï.Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή
926+ γράÏ.οΜÏ.αÏ. Ï.άΜÏ. αÏ.Ï. Ï.ο Ï.αλιÏ. κείΌεΜο Ï.Ï.Ï.ε Μα κάΜεÏ.ε Ï.ηΜ Ï.ρÏ.Ï.η γραΌΌή ίΎια
927+ Όε Ï.η ΎεύÏ.ερη.
928+
929+---> To make the first line the same as the last on this page use the keys.
930+---> To make the first line the same as the second, type R and the new text.
931+
932+ 4. ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι Ï.Ï.αΜ Ï.αÏ.άÏ.ε <ESC> για Μα βγείÏ.ε, Ï.αραΌέΜει οÏ.οιοΎήÏ.οÏ.ε
933+ αΜαλλοίÏ.Ï.ο κείΌεΜο.
934+
935+
936+
937+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
938+ Î.άΞηΌα 6.4: ΡΥÎ.Î.Î.ΣÎ. Î.Î Î.Î.Î.Î.Î.Σ
939+
940+
941+ ** ΡÏ.ΞΌίÏ.Ï.ε Όία εÏ.ιλογή έÏ.Ï.ι Ï.Ï.Ï.ε η αΜαζήÏ.ηÏ.η ή η αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Μα αγΜοεί
942+ Ï.η ΎιαÏ.ορά Ï.εζÏ.Îœ-κεÏ.αλαίÏ.Îœ **
943+
944+ 1. ΚάΟÏ.ε για 'ignore' ειÏ.άγοΜÏ.αÏ.:
945+ /ignore
946+ ΣÏ.ΜεÏ.ίÏ.Ï.ε αρκεÏ.έÏ. Ï.ορέÏ. Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο Ï.λήκÏ.ρο n.
947+
948+ 2. Î.έÏ.Ï.ε Ï.ηΜ εÏ.ιλογή 'ic' (Ignore case) γράÏ.οΜÏ.αÏ.:
949+ :set ic
950+
951+ 3. ΚάΟÏ.ε Ï.Ï.ρα ΟαΜά για 'ignore' Ï.αÏ.Ï.ÎœÏ.αÏ.: n
952+ ΣÏ.ΜεÏ.ίÏ.Ï.ε Ï.ηΜ αΜαζήÏ.ηÏ.η ΌερικέÏ. ακÏ.Όα Ï.ορέÏ. Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο Ï.λήκÏ.ρο n
953+
954+ 4. Î.έÏ.Ï.ε Ï.ιÏ. εÏ.ιλογέÏ. 'hlsearch' και 'incsearch':
955+ :set hls is
956+
957+ 5. Î.ιÏ.άγεÏ.ε Ï.Ï.ρα ΟαΜά Ï.ηΜ εΜÏ.ολή αΜαζήÏ.ηÏ.ηÏ., και ΎείÏ.ε Ï.ι Ï.Ï.ΌβαίΜει
958+ /ignore
959+
960+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
961+ Î.Î.Î.Î.Î.Î. 6 Î Î.ΡÎ.Î.Î.ΚÎ.
962+
963+
964+ 1. ΠαÏ.Ï.ÎœÏ.αÏ. o αΜοίγει Όία γραΌΌή Î.Î.΀Ω αÏ.Ï. Ï.οΜ ΎροΌέα και Ï.οÏ.οΞεÏ.εί Ï.οΜ
965+ ΎροΌέα Ï.Ï.ηΜ αΜοιÏ.Ï.ή γραΌΌή Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌέΜοÏ..
966+
967+ 2. ΠαÏ.ήÏ.Ï.ε a για Μα ειÏ.άγεÏ.ε κείΌεΜο Î.Î.΀Î. Ï.οΜ Ï.αρακÏ.ήρα Ï.Ï.οΜ οÏ.οίο είΜαι
968+ ο ΎροΌέαÏ.. ΠαÏ.Ï.ÎœÏ.αÏ. κεÏ.αλαίο A αÏ.Ï.Ï.ΌαÏ.α Ï.ροÏ.ΞέÏ.ει κείΌεΜο Ï.Ï.ο Ï.έλοÏ.
969+ Ï.ηÏ. γραΌΌήÏ..
970+
971+ 3. ΠαÏ.Ï.ÎœÏ.αÏ. κεÏ.αλαίο R ειÏ.έρÏ.εÏ.αι Ï.Ï.ηΜ Î.αÏ.άÏ.Ï.αη Î.ÎœÏ.ικαÏ.άÏ.Ï.αÏ.ηÏ. ΌέÏ.ρι Μα
972+ Ï.αÏ.ηΞεί Ï.ο <ESC> και Μα εΟέλΞει.
973+
974+ 4. Î.ράÏ.οΜÏ.αÏ. ":set xxx" ρÏ.ΞΌίζει Ï.ηΜ εÏ.ιλογή "xxx".
975+
976+
977+
978+
979+
980+
981+
982+
983+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
984+ Î.Î.Î.Î.Î.Î. 7: ON-LINE Î.Ν΀Î.Î.Î.Σ Î.Î.Î.Î.Î.Î.Î.Σ
985+
986+
987+ ** ΧρηÏ.ιΌοÏ.οιήÏ.Ï.ε Ï.ο on-line Ï.ύÏ.Ï.ηΌα βοήΞειαÏ. **
988+
989+ Î. Vim έÏ.ει έΜα Ï.εριεκÏ.ικÏ. on-line Ï.ύÏ.Ï.ηΌα βοήΞειαÏ.. Î.ια Μα ΟεκιΜήÏ.ει,
990+ ΎοκιΌάÏ.Ï.ε κάÏ.οιο αÏ.Ï. Ï.α Ï.ρία:
991+ - Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο <HELP> (αΜ έÏ.εÏ.ε κάÏ.οιο)
992+ - Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.ρο <F1> (αΜ έÏ.εÏ.ε κάÏ.οιο)
993+ - γράÏ.Ï.ε :help <ENTER>
994+
995+ Î.ράÏ.Ï.ε :q <ENTER> για Μα κλείÏ.εÏ.ε Ï.ο Ï.αράΞÏ.ρο Ï.ηÏ. βοήΞειαÏ..
996+
997+ Î.Ï.ορείÏ.ε Μα βρείÏ.ε βοήΞεια Ï.άΜÏ. Ï.ε κάΞε αΜÏ.ικείΌεΜο, ΎίΜοΜÏ.αÏ. Όία Ï.αράΌεÏ.ρο
998+ Ï.Ï.ηΜ εΜÏ.ολή ":help". Î.οκιΌάÏ.Ï.ε αÏ.Ï.ά (ΌηΜ ΟεÏ.ΜάÏ.ε Μα Ï.αÏ.άÏ.ε <ENTER>):
999+
1000+ :help w
1001+ :help c_<T
1002+ :help insert-index
1003+ :help user-manual
1004+
1005+
1006+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1007+ Î.Î.Î.Î.Î.Î. 8: Î.Î.Î.Î.Î.ΥΡÎ.Î.Σ΀Î. Î.ΝÎ. SCRIPT Î.Î.Î.Î.ΝÎ.ΣÎ.Σ
1008+
1009+ ** Î.ΜεργοÏ.οιήÏ.Ï.ε Ï.αρακÏ.ηριÏ.Ï.ικά Ï.οÏ. Vim **
1010+
1011+ Î. Vim έÏ.ει Ï.ολλά Ï.εριÏ.Ï.Ï.Ï.ερα Ï.αρακÏ.ηριÏ.Ï.ικά αÏ.' Ï.,Ï.ι ο Vi, αλλά Ï.α
1012+ Ï.εριÏ.Ï.Ï.Ï.ερα είΜαι αρÏ.ικά αÏ.εΜεργοÏ.οιηΌέΜα. Î.ια Μα αρÏ.ίÏ.εÏ.ε Μα Ï.ρηÏ.ιΌοÏ.οιείÏ.ε
1013+ Ï.εριÏ.Ï.Ï.Ï.ερα Ï.αρακÏ.ηριÏ.Ï.ικά Ï.ρέÏ.ει Μα Ï.Ï.ιάΟεÏ.ε έΜα αρÏ.είο "vimrc".
1014+
1015+ 1. Î.ρÏ.ίÏ.Ï.ε ΎιορΞÏ.ΜοΜÏ.αÏ. Ï.ο αρÏ.είο "vimrc", αÏ.Ï.Ï. εΟαρÏ.άÏ.αι αÏ.Ï. Ï.ο Ï.ύÏ.Ï.ηΌά Ï.αÏ.:
1016+ :edit ~/.vimrc για Unix
1017+ :edit $VIM/_vimrc για MS-Windows
1018+
1019+ 2. ΀Ï.ρα ειÏ.άγεÏ.ε Ï.ο κείΌεΜο Ï.αραΎείγΌαÏ.οÏ. για αρÏ.είο "vimrc":
1020+ :read $VIMRUNTIME/vimrc_example.vim
1021+
1022+ 3. Î.ράÏ.Ï.ε Ï.ο αρÏ.είο Όε Ï.ηΜ:
1023+ :write
1024+
1025+ ΀ηΜ εÏ.Ï.ΌεΜη Ï.ορά Ï.οÏ. Ξα ΟεκιΜήÏ.εÏ.ε Ï.οΜ Vim Ξα Ï.ρηÏ.ιΌοÏ.οιήÏ.ει Ï.Ï.Ï.ιÏ.ÎŒÏ.
1026+ Ï.ύΜÏ.αΟηÏ.. Î.Ï.ορείÏ.ε Μα Ï.ροÏ.ΞέÏ.εÏ.ε Ï.λεÏ. Ï.ιÏ. Ï.ροÏ.ιΌÏ.ΌεΜεÏ. εÏ.ιλογέÏ. Ï.' αÏ.Ï.Ï.
1027+ Ï.ο αρÏ.είο "vimrc".
1028+
1029+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1030+
1031+ Î.ÎŽÏ. ολοκληρÏ.ΜεÏ.αι Ï.ο Vim Tutor. ΣκοÏ.Ï.Ï. Ï.οÏ. ήÏ.αΜ Μα ÎŽÏ.Ï.ει Όία Ï.ύΜÏ.οΌη
1032+ Ï.ερίληÏ.η Ï.οÏ. Ï.Ï.ÎœÏ.άκÏ.η Vim, Ï.οÏ.λάÏ.ιÏ.Ï.οΜ Ï.Ï.Ï.η Ï.Ï.Ï.ε Μα Ï.αÏ. εÏ.ιÏ.ρέÏ.ει Μα
1033+ Ï.ρηÏ.ιΌοÏ.οιήÏ.εÏ.ε Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η αρκεÏ.ά εύκολα. Î.Ï.έÏ.ει Ï.ολύ αÏ.Ï. Όία
1034+ ολοκληρÏ.ΌέΜη Ï.αροÏ.Ï.ίαÏ.η καΞÏ.Ï. ο Vim έÏ.ει Ï.άρα Ï.ολλέÏ. εΜÏ.ολέÏ.. Î.ιαβάÏ.Ï.ε
1035+ καÏ.Ï.Ï.ιΜ Ï.ο εγÏ.ειρίΎιο Ï.ρήÏ.ηÏ.:
1036+ ":help user-manual".
1037+
1038+ Î.ια Ï.εραιÏ.έρÏ. ΎιάβαÏ.Όα και ΌελέÏ.η, Ï.Ï.Ï.Ï.ήΜεÏ.αι αÏ.Ï.Ï. Ï.ο βιβλίο:
1039+ Vim - Vi Improved - by Steve Oualline
1040+ Publisher: New Riders
1041+ ΀ο Ï.ρÏ.Ï.ο βιβλίο Ï.λήρÏ.Ï. αÏ.ιερÏ.ΌέΜο Ï.Ï.οΜ Vim.
1042+ Î.ΎιαίÏ.ερα Ï.ρήÏ.ιΌο για αρÏ.άριοÏ.Ï..
1043+ Î¥Ï.άρÏ.οÏ.Îœ Ï.ολλά Ï.αραΎείγΌαÏ.α και εικÏ.ΜεÏ..
1044+ Î.είÏ.ε Ï.ηΜ http://iccf-holland.org/click5.html
1045+
1046+ Î.Ï.Ï.Ï. Ï.ο βιβλίο είΜαι Ï.αλιÏ.Ï.ερο και Ï.εριÏ.Ï.Ï.Ï.ερο για Ï.οΜ Vi Ï.αρά για Ï.οΜ Vim,
1047+ αλλά εÏ.ίÏ.ηÏ. Ï.Ï.ΜιÏ.Ï.Ï.ΌεΜο:
1048+ Learning the Vi Editor - by Linda Lamb
1049+ Publisher: O'Reilly & Associates Inc.
1050+ Î.ίΜαι έΜα καλÏ. βιβλίο για Μα ΌάΞεÏ.ε Ï.Ï.εΎÏ.Îœ Ï.α Ï.άΜÏ.α Ï.οÏ. ΞέλεÏ.ε
1051+ Μα κάΜεÏ.ε Όε Ï.οΜ Vi.
1052+ Î. έκÏ.η έκΎοÏ.η Ï.εριέÏ.ει ακÏ.Όα Ï.ληροÏ.ορίεÏ. για Ï.οΜ Vim.
1053+
1054+ Î.Ï.Ï.ή η Ï.εριήγηÏ.η γράÏ.Ï.ηκε αÏ.Ï. Ï.οÏ.Ï. Michael C. Pierce και Robert K. Ware,
1055+ Colorado School of Mines Ï.ρηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. ιΎέεÏ. αÏ.Ï. Ï.οΜ Charles Smith,
1056+ Colorado State University. E-mail: bware@mines.colorado.edu.
1057+
1058+ ΠροÏ.αρΌογή για Ï.οΜ Vim αÏ.Ï. Ï.οΜ Bram Moolenaar.
1059+
1060+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1061diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8
1062--- vim70.orig/runtime/tutor/tutor.ru.utf-8 1969-12-31 16:00:00.000000000 -0800
1063+++ vim70/runtime/tutor/tutor.ru.utf-8 2006-09-11 08:57:09.000000000 -0700
1064@@ -0,0 +1,834 @@
1065+===============================================================================
1066+= Ð. П б Ñ. П п П ж а л П в а Ñ. Ñ. в Ñ. Ñ. е б Ðœ О к VIM - Ð.еÑ.сОя 1.5 =
1067+===============================================================================
1068+ Vim --- эÑ.П ПÑ.еМÑ. ЌПÑ.ÐœÑ.й Ñ.еЎакÑ.ПÑ., ОЌеÑ.Ñ.Ой ЌМПжесÑ.вП кПЌаМЎ, слОÑ.кПЌ
1069+ ЌМПгП Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. ОÑ. все ЌПжМП бÑ.лП ПпОсаÑ.Ñ. в Ñ.акПЌ Ñ.Ñ.ебМОке, как
1070+ эÑ.ПÑ.. ЭÑ.ПÑ. Ñ.Ñ.ебМОк пÑ.ОзваМ ПбÑ.ясМОÑ.Ñ. ЎПсÑ.аÑ.ПÑ.МПе Ñ.ОслП кПЌаМЎ Ўля Ñ.ПгП,
1071+ Ñ.Ñ.ПбÑ. Ð.Ñ. ЌПглО с легкПсÑ.Ñ.Ñ. ОспПлÑ.зПваÑ.Ñ. Vim в каÑ.есÑ.ве Ñ.еЎакÑ.ПÑ.а ПбÑ.егП
1072+ МазМаÑ.еМОя.
1073+
1074+ Ð.аЌ пПÑ.Ñ.ебÑ.еÑ.ся пÑ.ОблОзОÑ.елÑ.МП 25-30 ЌОМÑ.Ñ. Ма ПсвПеМОе ЎаММПгП Ñ.Ñ.ебМОка в
1075+ завОсОЌПсÑ.О ПÑ. Ñ.ПгП, скПлÑ.кП вÑ.еЌеМО Ð.Ñ. пПÑ.Ñ.аÑ.ОÑ.е Ма экспеÑ.ОЌеМÑ.Ñ..
1076+
1077+ Ð.ПЌаМЎÑ. в Ñ.Ñ.ПкаÑ. бÑ.ÐŽÑ.Ñ. ЌПЎОÑ.ОÑ.ОÑ.ПваÑ.Ñ. Ñ.ексÑ.. СПзЎайÑ.е кПпОÑ. эÑ.ПгП Ñ.айла,
1078+ Ñ.Ñ.ПбÑ. пПпÑ.акÑ.ОкПваÑ.Ñ.ся Ма Мей (еслО Ð.Ñ. запÑ.сÑ.ОлО "vimtutor", Ñ.П эÑ.П Ñ.же
1079+ кПпОя).
1080+
1081+ Ð.ажМП пПЌМОÑ.Ñ., Ñ.Ñ.П эÑ.ПÑ. Ñ.Ñ.ебМОк пÑ.еЎМазМаÑ.еМ Ўля ПбÑ.Ñ.еМОя в пÑ.ПÑ.ессе
1082+ ОспПлÑ.зПваМОя. ЭÑ.П ПзМаÑ.аеÑ., Ñ.Ñ.П Ð.Ñ. ЎПлжМÑ. запÑ.скаÑ.Ñ. кПЌаМЎÑ. Ўля Ñ.ПгП,
1083+ Ñ.Ñ.ПбÑ. как слеЎÑ.еÑ. ОÑ. ОзÑ.Ñ.ОÑ.Ñ.. Ð.слО Ð.Ñ. пÑ.ПсÑ.П пÑ.ПÑ.ОÑ.аеÑ.е Ñ.ексÑ., Ñ.П
1084+ забÑ.ЎеÑ.е кПЌаМЎÑ.!
1085+
1086+ ТепеÑ.Ñ. Ñ.беЎОÑ.есÑ. в Ñ.ПЌ, Ñ.Ñ.П клавОÑ.а CapsLock Ме вклÑ.Ñ.еМа О МажЌОÑ.е
1087+ клавОÑ.Ñ. j МескПлÑ.кП Ñ.аз, Ñ.ак, Ñ.Ñ.ПбÑ. УÑ.Пк 1.1 пПлМПсÑ.Ñ.Ñ. пПЌесÑ.Олся Ма
1088+ экÑ.аМе.
1089+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1090+ УÑ.Пк 1.1: Ð.Ð.Ð Ð.Ð.Ð.ЩÐ.НÐ.Ð. Ð.УРСÐ.РА
1091+
1092+** Ð.ля пеÑ.еЌеÑ.еМОя кÑ.Ñ.сПÑ.а МажЌОÑ.е клавОÑ.О h,j,k,l Ñ.ак, как пПказаМП МОже. **
1093+ ^
1094+ k СПвеÑ.Ñ.: Ð.лавОÑ.а h МаÑ.ПЎОÑ.ся слева О пеÑ.еЌеÑ.аеÑ. влевП.
1095+ < h l > Ð.лавОÑ.а l МаÑ.ПЎОÑ.ся спÑ.ава О пеÑ.еЌеÑ.аеÑ. впÑ.авП.
1096+ j Ð.лавОÑ.а j пПÑ.Пжа Ма сÑ.Ñ.елкÑ. `вМОз'.
1097+ v
1098+ 1. Ð.ПЎвОгайÑ.е кÑ.Ñ.сПÑ. пП экÑ.аМÑ., пПка Ме пПÑ.Ñ.всÑ.вÑ.еÑ.е себя Ñ.веÑ.еММП.
1099+
1100+ 2. НаЎавОÑ.е клавОÑ.Ñ. `вМОз' (j) пПка ПМа Ме МаÑ.МеÑ. пПвÑ.ПÑ.яÑ.Ñ.ся.
1101+---> ТепеÑ.Ñ. Ð.Ñ. зМаеÑ.е, как пеÑ.ейÑ.О к слеЎÑ.Ñ.Ñ.еЌÑ. Ñ.Ñ.ПкÑ..
1102+
1103+ 3. Ð.спПлÑ.зÑ.я клавОÑ.Ñ. `вМОз' пеÑ.ейЎОÑ.е к УÑ.ПкÑ. 1.2.
1104+
1105+Ð.аЌеÑ.аМОе: Ð.слО вÑ. пПка Ме Ñ.веÑ.еМÑ. в Ñ.ПЌ, Ñ.Ñ.П МабОÑ.аеÑ.е, МажЌОÑ.е <ESC> Ўля
1106+ пеÑ.еÑ.ПЎа в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ (Normal mode). Ð.Псле эÑ.ПгП пеÑ.еМабеÑ.ОÑ.е
1107+ Ñ.Ñ.ебÑ.еЌÑ.Ñ. кПЌаМЎÑ..
1108+
1109+Ð.аЌеÑ.аМОе: Ð.бÑ.Ñ.ÐœÑ.е клавОÑ.О Ñ.пÑ.авлеМОя кÑ.Ñ.сПÑ.ПЌ (сÑ.Ñ.елкО) Ñ.акже ЎПлжМÑ.
1110+ Ñ.абПÑ.аÑ.Ñ.. Ð.ЎМакП, клавОÑ.О hjkl пПзвПляÑ. Ð.аЌ пеÑ.еЌеÑ.аÑ.Ñ.ся
1111+ зМаÑ.ОÑ.елÑ.МП бÑ.сÑ.Ñ.ее, как Ñ.ПлÑ.кП Ð.Ñ. МаÑ.Ñ.ОÑ.есÑ. ОЌО пПлÑ.зПваÑ.Ñ.ся.
1112+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1113+ УÑ.Пк 1.2: Ð.АÐ.УСÐ. Ð. Ð.АÐ.Ð.РКÐ.НÐ.Ð. РАÐ.Ð.ТЫ С VIM
1114+
1115+!! Ð.НÐ.Ð.АНÐ.Ð.! Ð.Ñ.ежЎе, Ñ.еЌ вÑ.пПлМяÑ.Ñ. лÑ.бПй Оз ПпОсаММÑ.Ñ. МОже Ñ.агПв, пÑ.ПÑ.Ñ.ОÑ.е
1116+ Ñ.Ñ.Пк Ñ.елОкПЌ !!
1117+
1118+ 1. НажЌОÑ.е клавОÑ.Ñ. <ESC> (Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.ЎПсÑ.ПвеÑ.ОÑ.Ñ.ся, Ñ.Ñ.П Ð.Ñ. в ПбÑ.Ñ.МПЌ
1119+ Ñ.ежОЌе (Normal mode)).
1120+
1121+ 2. НабеÑ.ОÑ.е: :q! <ENTER>.
1122+
1123+---> ЭÑ.П пПзвПлОÑ. Ð.аЌ вÑ.йÑ.О Оз Ñ.еЎакÑ.ПÑ.а Ð.Ð.Ð. СÐ.ХРАНÐ.НÐ.Я лÑ.бÑ.Ñ. сЎелаММÑ.Ñ.
1124+ ОзЌеМеМОй. Ð.слО Ð.Ñ. Ñ.ПÑ.ОÑ.е сПÑ.Ñ.аМОÑ.Ñ. ОзЌеМеМОя О вÑ.йÑ.О:
1125+ :wq <ENTER>
1126+
1127+ 3. Ð.ПгЎа Ð.Ñ. Ñ.вОЎОÑ.е пÑ.ОглаÑ.еМОе кПЌаМЎМПй ПбПлПÑ.кО, МабеÑ.ОÑ.е кПЌаМЎÑ.,
1128+ кПÑ.ПÑ.ая пÑ.Овела Ð.ас в эÑ.ПÑ. Ñ.Ñ.ебМОк. ЭÑ.П ЌПжеÑ. бÑ.Ñ.Ñ.
1129+ vimtutor ru <ENTER>
1130+ Ð.бÑ.Ñ.МП ЌПжМП ОспПлÑ.зПваÑ.Ñ.: vim tutor.ru <ENTER>
1131+
1132+---> 'vim' пПзвПляеÑ. запÑ.сÑ.ОÑ.Ñ. Ñ.еЎакÑ.ПÑ. vim, 'tutor.ru' --- эÑ.П Ñ.айл, кПÑ.ПÑ.Ñ.й
1133+ Ð.Ñ. бÑ.ЎеÑ.е Ñ.еЎакÑ.ОÑ.ПваÑ.Ñ..
1134+
1135+ 4. Ð.слО Ð.Ñ. Ñ.веÑ.еМÑ. в Ñ.ПЌ, Ñ.Ñ.П запПЌМОлО эÑ.О Ñ.агО, вÑ.пПлМОÑ.е Ñ.агО ПÑ. 1 ЎП 3
1136+ Ñ.Ñ.ПбÑ. вÑ.йÑ.О сМПва запÑ.сÑ.ОÑ.Ñ. Ñ.еЎакÑ.ПÑ.. Ð.аÑ.еЌ пеÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз к
1137+ УÑ.ПкÑ. 1.3.
1138+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1139+ УÑ.Пк 1.3: Ð Ð.Ð.АÐ.ТÐ.Ð Ð.Ð.АНÐ.Ð. ТÐ.Ð.СТА - УÐ.АÐ.Ð.НÐ.Ð.
1140+
1141+
1142+** НаÑ.ПЎясÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе МажЌОÑ.е x, Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ. сОЌвПл пПЎ кÑ.Ñ.сПÑ.ПЌ. **
1143+
1144+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к сÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->.
1145+
1146+ 2. Ð.ля ОспÑ.авлеМОя ПÑ.ОбПк, пеÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ., пПка ПМ Ме ПкажеÑ.ся МаЎ
1147+ Ñ.ЎаляеЌÑ.ÐŒ сОЌвПлПЌ.
1148+
1149+ 3. НажЌОÑ.е клавОÑ.Ñ. x Ўля Ñ.ЎалеМОя Ñ.Ñ.ебÑ.еЌПгП сОЌвПла.
1150+
1151+ 4. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4 пПка сÑ.Ñ.Пка Ме бÑ.ЎеÑ. ОспÑ.авлеМа.
1152+
1153+---> Ð.Ñ. Ñ.Ñ.Ñ.ПпПÑ.а кПпÑ.Ñ.Ñ. пппÑ.лÑ. ппП пппПлÑ. леÑ.Ñ.ОÑ.Ñ..
1154+
1155+ 5. ТепеÑ.Ñ., кПгЎа сÑ.Ñ.Пка ПÑ.кПÑ.Ñ.екÑ.ОÑ.ПваМа, пеÑ.еÑ.ПЎОÑ.е к Ñ.Ñ.ПкÑ. 1.4.
1156+
1157+Ð.АÐ.Ð.ЧАНÐ.Ð.: Ð. Ñ.ПЎе ПсвПеМОя эÑ.ПгП Ñ.Ñ.ебМОка Ме пÑ.Ñ.айÑ.есÑ. запПЌОМаÑ.Ñ., Ñ.Ñ.ОÑ.е
1158+ в пÑ.ПÑ.ессе ОспПлÑ.зПваМОя.
1159+
1160+
1161+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1162+ УÑ.Пк 1.4: Ð Ð.Ð.АÐ.ТÐ.Ð Ð.Ð.АНÐ.Ð. ТÐ.Ð.СТА - Ð.СТАÐ.Ð.А
1163+
1164+
1165+ ** НаÑ.ПЎясÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode), МажЌОÑ.е i Ўля всÑ.авкО Ñ.ексÑ.а. **
1166+
1167+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к пеÑ.вПй сÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->.
1168+
1169+ 2. Ð.ля Ñ.ПгП, Ñ.Ñ.ПбÑ. сЎелаÑ.Ñ. пеÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ. ОЎеМÑ.ОÑ.МПй вÑ.ПÑ.Пй, пПЌесÑ.ОÑ.е
1170+ кÑ.Ñ.сПÑ. Ма сОЌвПл Ð.Ð.Ð Ð.Ð. кПÑ.ПÑ.Ñ.ÐŒ слеЎÑ.еÑ. всÑ.авОÑ.Ñ. Ñ.ексÑ..
1171+
1172+ 3. НажЌОÑ.е i О МабеÑ.ОÑ.е Ñ.Ñ.ебÑ.еЌÑ.е ЎПбавлеМОя.
1173+
1174+ 4. Ð.Псле ОспÑ.авлеМОя всеÑ. ПÑ.ОбПк МажЌОÑ.е <ESC> Ўля вПзвÑ.аÑ.а в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ.
1175+ Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4, пПка Ñ.Ñ.аза Ме бÑ.ЎеÑ. ОспÑ.авлеМа пПлМПсÑ.Ñ.Ñ..
1176+
1177+---> ЧасÑ.Ñ. Ñ.ексÑ.а в сÑ.Ñ.Пке беслеЎМП .
1178+---> ЧасÑ.Ñ. Ñ.ексÑ.а в эÑ.Пй сÑ.Ñ.Пке бесслеЎМП пÑ.Ппала.
1179+
1180+ 5. Ð.ПгЎа ПсвПОÑ.е всÑ.авкÑ. Ñ.ексÑ.а, пеÑ.еÑ.ПЎОÑ.е ЎалÑ.Ñ.е к РезÑ.Ќе.
1181+
1182+
1183+
1184+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1185+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 1
1186+
1187+ 1. Ð.Ñ.Ñ.сПÑ. пеÑ.еЌеÑ.аеÑ.ся лОбП клавОÑ.аЌО сП сÑ.Ñ.елкаЌО, лОбП клавОÑ.аЌО hjkl.
1188+ h (влевП) j (вМОз) k (ввеÑ.Ñ.) l (впÑ.авП)
1189+
1190+ 2. Ð.ля запÑ.ска Vim (Оз пÑ.ОглаÑ.еМОя % кПЌаМЎМПй ПбПлПÑ.кО) МабеÑ.ОÑ.е:
1191+ vim Ð.Ð.Я_ЀАÐ.Ð.А <ENTER>
1192+
1193+ 3. Ð.ля завеÑ.Ñ.еМОя Ñ.абПÑ.Ñ. с Vim МабеÑ.ОÑ.е:
1194+ <ESC> :q! <ENTER> Ñ.Ñ.ПбÑ. ПÑ.казаÑ.Ñ.ся ПÑ. сПÑ.Ñ.аМеМОя ОзЌеМеМОй.
1195+ Ð.лО МабеÑ.ОÑ.е:
1196+ <ESC> :wq <ENTER> Ñ.Ñ.ПбÑ. сПÑ.Ñ.аМОÑ.Ñ. ОзЌеМеМОя.
1197+
1198+ 4. Ð.ля Ñ.ЎалеМОя сОЌвПла пПЎ кÑ.Ñ.сПÑ.ПЌ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе, МабеÑ.ОÑ.е: x
1199+
1200+ 5. ЧÑ.ПбÑ. всÑ.авОÑ.Ñ. Ñ.ексÑ. пеÑ.еЎ кÑ.Ñ.сПÑ.ПЌ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе, МабеÑ.ОÑ.е:
1201+ i ввПЎОÑ.е Ñ.ексÑ. <ESC>
1202+
1203+Ð.АÐ.Ð.ЧАНÐ.Ð.: НажаÑ.Ое <ESC> пеÑ.еЌесÑ.ОÑ. Ð.ас в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ (Normal mode) лОбП
1204+ пÑ.еÑ.веÑ. МежелаÑ.елÑ.ÐœÑ.Ñ. О Ñ.асÑ.ОÑ.МП завеÑ.Ñ.еММÑ.Ñ. кПЌаМЎÑ..
1205+
1206+ТепеÑ.Ñ. пеÑ.еÑ.ПЎОЌ к УÑ.ПкÑ. 2.
1207+
1208+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1209+ УÑ.Пк 2.1: Ð.Ð.Ð.АНÐ.Ы УÐ.АÐ.Ð.НÐ.Я
1210+
1211+
1212+ ** НабеÑ.ОÑ.е dw Ўля Ñ.ЎалеМОя Ñ.Ñ.асÑ.ка Ñ.ексÑ.а ЎП кПМÑ.а слПва. **
1213+
1214+ 1. НажЌОÑ.е <ESC>, Ñ.Ñ.ПбÑ. пеÑ.ейÑ.О в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ.
1215+
1216+ 2. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1217+
1218+ 3. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. в МаÑ.алП слПва, кПÑ.ПÑ.Пе слеЎÑ.еÑ. Ñ.ЎалОÑ.Ñ..
1219+
1220+ 4. НабеÑ.ОÑ.е dw , Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ. эÑ.П слПвП.
1221+
1222+Ð.АÐ.Ð.ЧАНÐ.Ð.: Ð.П вÑ.еЌя МабПÑ.а бÑ.квÑ. dw пПявяÑ.ся в пПслеЎМей сÑ.Ñ.Пке экÑ.аМа. Ð.слО
1223+ Ð.Ñ. Ñ.Ñ.П-Ñ.П МабеÑ.еÑ.е МепÑ.авОлÑ.МП, МажЌОÑ.е <ESC> О МаÑ.МОÑ.е сМаÑ.ала.
1224+
1225+---> НескПлÑ.кП слПв Ñ.аÑ.ОМаЎ в эÑ.ПЌ пÑ.еЎлПжеМОО авÑ.ПкÑ.аМ ОзлОÑ.МО.
1226+
1227+ 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 3 О 4, пПка Ме ОспÑ.авОÑ.е все ПÑ.ОбкО О пеÑ.еÑ.ПЎОÑ.е к
1228+ УÑ.ПкÑ. 2.2.
1229+
1230+
1231+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1232+ УÑ.Пк 2.2: Ð.Ð.Ð.Ð.Ð.НÐ.ТÐ.Ð.ЬНЫÐ. Ð.Ð.Ð.АНÐ.Ы УÐ.АÐ.Ð.НÐ.Я
1233+
1234+
1235+ ** НабеÑ.ОÑ.е d$ Ўля Ñ.ЎалеМОя Ñ.ексÑ.а ЎП кПМÑ.а сÑ.Ñ.ПкО. **
1236+
1237+ 1. НажЌОÑ.е <ESC>, Ñ.Ñ.ПбÑ. пеÑ.ейÑ.О в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ.
1238+
1239+ 2. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1240+
1241+ 3. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к кПМÑ.Ñ. пÑ.авОлÑ.МПй сÑ.Ñ.ПкО (Ð.Ð.СÐ.Ð. пеÑ.вПй . ).
1242+
1243+ 4. ЧÑ.ПбÑ. Ñ.ЎалОÑ.Ñ. ПсÑ.аÑ.Пк сÑ.Ñ.ПкО, МабеÑ.ОÑ.е d$ .
1244+
1245+---> Ð.Ñ.П-Ñ.П МабÑ.ал ПкПМÑ.аМОе эÑ.Пй сÑ.Ñ.ПкО ЎважЎÑ.. ПкПМÑ.аМОе эÑ.Пй сÑ.Ñ.ПкО ЎважЎÑ..
1246+
1247+
1248+ 5.ЧÑ.ПбÑ. лÑ.Ñ.Ñ.е Ñ.азПбÑ.аÑ.Ñ.ся в эÑ.ПЌ, пеÑ.еÑ.ПЎОÑ.е к УÑ.ПкÑ. 2.3.
1249+
1250+
1251+
1252+
1253+
1254+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1255+ УÑ.Пк 2.3: Ð.Ð.Ð.АНÐ.Ы Ð. Ð.Ð.ЪÐ.Ð.ТЫ
1256+
1257+
1258+ ЀПÑ.ЌаÑ. кПЌаМЎÑ. `Ñ.ЎалеМОе' d Ñ.акПв:
1259+
1260+ [Ñ.ОслП] d ПбÑ.екÑ. Ð.Ð.Ð. d [Ñ.ОслП] ПбÑ.екÑ.
1261+ Ð.ЎесÑ.:
1262+ Ñ.ОслП - скПлÑ.кП Ñ.аз ОспПлМОÑ.Ñ. кПЌаМЎÑ. (МеПбязаÑ.елÑ.МП, пП Ñ.ЌПлÑ.аМОÑ.=1).
1263+ d - кПЌаМЎа Ñ.ЎалеМОя.
1264+ ПбÑ.екÑ. - с Ñ.еЌ кПЌаМЎа ЎПлжМа бÑ.Ñ.Ñ. вÑ.пПлМеМа (пеÑ.еÑ.ОслеМП МОже).
1265+
1266+ Ð.Ñ.аÑ.кОй спОсПк ПбÑ.екÑ.Пв:
1267+ w - ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а слПва, вклÑ.Ñ.ая завеÑ.Ñ.аÑ.Ñ.Ой пÑ.Пбел.
1268+ e - ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а слПва, НÐ. вклÑ.Ñ.ая завеÑ.Ñ.аÑ.Ñ.Ой пÑ.Пбел.
1269+ $ - ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а сÑ.Ñ.ПкО.
1270+ ^ - ПÑ. кÑ.Ñ.сПÑ.а ЎП МаÑ.ала сÑ.Ñ.ПкО.
1271+
1272+Ð.АÐ.Ð.ЧАНÐ.Ð.: Ð.Ñ.ПсÑ.Пе МажаÑ.Ое Ма сОЌвПл ПбÑ.екÑ.а в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode)
1273+ без ЎПпПлМОÑ.елÑ.ÐœÑ.Ñ. кПЌаМЎ пеÑ.еЎвОМеÑ. кÑ.Ñ.сПÑ. Ñ.ак, как Ñ.казаМП в
1274+ спОске ПбÑ.екÑ.Пв.
1275+
1276+
1277+
1278+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1279+ УÑ.Пк 2.4: Ð.СÐ.Ð.ЮЧÐ.НÐ.Ð. Ð.Ð. Ð.РАÐ.Ð.Ð.А `Ð.Ð.Ð.АНÐ.А-Ð.Ð.ЪÐ.Ð.Т'
1280+
1281+
1282+ ** НабеÑ.ОÑ.е dd Ўля Ñ.ЎалеМОя всей сÑ.Ñ.ПкО. **
1283+
1284+ Ð.слеЎсÑ.вОе Ñ.асÑ.ПгП пÑ.ОЌеМеМОя ПпеÑ.аÑ.ОО Ñ.ЎалеМОя всей сÑ.Ñ.ПкО, Ñ.азÑ.абПÑ.Ñ.ОкО
1285+ Vim Ñ.еÑ.ОлО, Ñ.Ñ.П Ўля эÑ.ПгП пÑ.ПÑ.е всегП пÑ.ПсÑ.П МабÑ.аÑ.Ñ. d ЎважЎÑ..
1286+
1287+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, кП вÑ.ПÑ.Пй сÑ.Ñ.Пке Ñ.Ñ.азÑ..
1288+ 2. НабеÑ.ОÑ.е dd Ўля Ñ.ЎалеМОя сÑ.Ñ.ПкО.
1289+ 3. ТепеÑ.Ñ. пеÑ.еЌесÑ.ОÑ.есÑ. к Ñ.еÑ.веÑ.Ñ.Пй сÑ.Ñ.Пке.
1290+ 4. НабеÑ.ОÑ.е 2dd (вспПЌМОÑ.е пÑ.авОлП `Ñ.ОслП-кПЌаМЎа-ПбÑ.екÑ.'), Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ.
1291+ Ўве сÑ.Ñ.ПкО.
1292+
1293+ 1) Ð.еÑ.ПЌ я Ñ.ПжÑ. Ма сÑ.аЎОПМ,
1294+ 2) Ð., как вМезапМП кПМÑ.Олся ЎОваМ!
1295+ 3) Я бПлеÑ. за ``Ð.еМОÑ.'', ``Ð.еМОÑ.'' --- Ñ.еЌпОПМ!
1296+ 4) Ð.еÑ.алÑ.МП я гляжÑ. Ма МаÑ.е пПкПлеМОе!
1297+ 5) Ð.гП гÑ.яЎÑ.Ñ.ее ОлÑ. пÑ.сÑ.П ОлÑ. Ñ.еЌМП...
1298+ 6) Я сОжÑ. Ма скаЌейке в лПже `Ð.'
1299+ 7) Ð. ОгÑ.аÑ. Ма бПлÑ.Ñ.Пй жесÑ.яМПй Ñ.Ñ.Ñ.бе.
1300+
1301+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1302+ УÑ.Пк 2.5: Ð.Ð.Ð.АНÐ.А `Ð.ТÐ.АТ'
1303+
1304+
1305+ ** НажЌОÑ.е u Ўля ПÑ.ЌеМÑ. Ñ.езÑ.лÑ.Ñ.аÑ.а Ñ.абПÑ.Ñ. пÑ.еЎÑ.ÐŽÑ.Ñ.ей кПЌаМЎÑ., U Ўля ПÑ.ЌеМÑ.
1306+ ОспÑ.авлеМОй вП всей сÑ.Ñ.Пке. **
1307+
1308+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй ---> О Ñ.сÑ.аМПвОÑ.е егП Ма
1309+ пеÑ.вÑ.Ñ. ПÑ.ОбкÑ..
1310+ 2. НажЌОÑ.е x Ўля Ñ.ЎалеМОя пеÑ.вПгП МепÑ.авОлÑ.МПгП сОЌвПла.
1311+ 3. ТепеÑ.Ñ. МажЌОÑ.е u Ўля ПÑ.ЌеМÑ. (ПÑ.каÑ.а) пПслеЎМей вÑ.пПлМеММПй кПЌаМЎÑ..
1312+ 4. Ð.спÑ.авÑ.Ñ.е все ПÑ.ОбкО в сÑ.Ñ.Пке, ОспПлÑ.зÑ.я кПЌаМЎÑ. x .
1313+ 5. ТепеÑ.Ñ. МажЌОÑ.е заглавМÑ.Ñ. U Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. веÑ.ÐœÑ.Ñ.Ñ. всÑ. сÑ.Ñ.ПкÑ. в ОсÑ.ПЎМПе
1314+ сПсÑ.ПяМОе.
1315+ 6. НажЌОÑ.е u МескПлÑ.кП Ñ.аз Ўля ПÑ.ЌеМÑ. кПЌаМЎÑ. U О пÑ.еЎÑ.ÐŽÑ.Ñ.ОÑ. кПЌаМЎ.
1316+ 7. НажЌОÑ.е Ñ.епеÑ.Ñ. CTRL-R (Ñ.ЎеÑ.жОвайÑ.е клавОÑ.Ñ. CTRL МажаÑ.Пй в ЌПЌеМÑ. МажаÑ.Оя
1317+ R) МескПлÑ.кП Ñ.аз Ўля вПзвÑ.аÑ.а кПЌаМЎ (ПÑ.каÑ. ПÑ.каÑ.а).
1318+
1319+---> Ð.спÑ.Ñ.авÑ.Ñ.е ППÑ.ОбкО в эÑ.Пйй сÑ.Ñ.Пке О веÑ.МОÑ.Ñ.е ОÑ. сс пПЌПÑ.Ñ.Ñ.Ñ. `ПÑ.каÑ.а'.
1320+
1321+ 8. ЭÑ.П бÑ.лО ПÑ.еМÑ. пПлезМÑ.е кПЌаМЎÑ.. Ð.алее пеÑ.еÑ.ПЎОÑ.е к РезÑ.Ќе УÑ.Пка 2.
1322+
1323+
1324+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1325+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 2
1326+
1327+
1328+ 1. Ð.ля Ñ.ЎалеМОя Ñ.ексÑ.а ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а слПва МабеÑ.ОÑ.е: dw
1329+
1330+ 2. Ð.ля Ñ.ЎалеМОя Ñ.ексÑ.а ПÑ. кÑ.Ñ.сПÑ.а ЎП кПМÑ.а сÑ.Ñ.ПкО МабеÑ.ОÑ.е: d$
1331+
1332+ 3. Ð.ля Ñ.ЎалеМОя всей сÑ.Ñ.ПкО МабеÑ.ОÑ.е: dd
1333+
1334+ 4. ЀПÑ.ЌаÑ. кПЌаМЎÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе ОЌееÑ. вОЎ:
1335+
1336+ [Ñ.ОслП] кПЌаМЎа ПбÑ.екÑ. Ð.Ð.Ð. кПЌаМЎа [Ñ.ОслП] ПбÑ.екÑ.
1337+ гЎе:
1338+ Ñ.ОслП - скПлÑ.кП Ñ.аз пПвÑ.ПÑ.ОÑ.Ñ. вÑ.пПлМеМОе кПЌаМЎÑ.
1339+ кПЌаМЎа - Ñ.Ñ.П вÑ.пПлМОÑ.Ñ., МапÑ.ОЌеÑ. d Ўля Ñ.ЎалеМОя
1340+ ПбÑ.екÑ. - Ма Ñ.Ñ.П ЎПлжМа вПзЎейсÑ.вПваÑ.Ñ. кПЌаМЎа, МапÑ.ОЌеÑ. w (слПвП),
1341+ $ (ЎП кПМÑ.а сÑ.Ñ.ПкО), О Ñ..ÐŽ.
1342+
1343+ 5. Ð.ля ПÑ.ЌеМÑ. (ПÑ.каÑ.а) пÑ.еЎÑ.есÑ.вÑ.Ñ.Ñ.ОÑ. ЎейсÑ.вОй МабеÑ.ОÑ.е: u (сÑ.Ñ.ПÑ.Мая u)
1344+ Ð.ля ПÑ.ЌеМÑ. (ПÑ.каÑ.а) всеÑ. ОзЌеМеМОй в сÑ.Ñ.Пке МабеÑ.ОÑ.е: U (пÑ.ПпОсМая U)
1345+ Ð.ля ПÑ.ЌеМÑ. ПÑ.каÑ.а МабеÑ.ОÑ.е: CTRL-R
1346+
1347+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1348+ УÑ.Пк 3.1: Ð.Ð.Ð.АНÐ.А Ð.СТАÐ.Ð.Ð.
1349+
1350+
1351+ ** НабеÑ.ОÑ.е p Ўля всÑ.авкО пПслеЎМегП Ñ.ЎалеММПгП Ñ.ексÑ.а пПсле кÑ.Ñ.сПÑ.а. **
1352+
1353+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз к пПслеЎМей сÑ.Ñ.Пке Оз МабПÑ.а.
1354+
1355+ 2. НабеÑ.ОÑ.е dd Ўля Ñ.ЎалеМОя сÑ.Ñ.ПкО О ее сПÑ.Ñ.аМеМОя в бÑ.Ñ.еÑ.е Vim'а.
1356+
1357+ 3. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к сÑ.Ñ.Пке НАÐ. Ñ.еЌ ЌесÑ.ПЌ, кÑ.Ўа слеЎÑ.еÑ. всÑ.авОÑ.Ñ.
1358+ Ñ.ЎалеММÑ.Ñ. сÑ.Ñ.ПкÑ..
1359+
1360+ 4. НаÑ.ПЎясÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе МабеÑ.ОÑ.е p Ўля заЌеМÑ. сÑ.Ñ.ПкО.
1361+
1362+ 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4, пПка Ме Ñ.ассÑ.авОÑ.е все сÑ.Ñ.ПкО в ÐœÑ.жМПЌ пПÑ.яЎке.
1363+
1364+ г) Ð. лÑ.Ñ.Ñ.е вÑ.ÐŽÑ.ЌаÑ.Ñ. Ме ЌПг.
1365+ б) Ð.ПгЎа Ме в Ñ.Ñ.Ñ.кÑ. заМеЌПг,
1366+ в) Ð.Ðœ Ñ.важаÑ.Ñ. себя засÑ.авОл
1367+ а) Ð.Пй ЎяЎя саЌÑ.Ñ. Ñ.есÑ.ÐœÑ.Ñ. пÑ.авОл
1368+
1369+
1370+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1371+ УÑ.Пк 3.2: Ð.Ð.Ð.АНÐ.А Ð.АÐ.Ð.НЫ
1372+
1373+
1374+ ** НабеÑ.ОÑ.е r О сОЌвПл, заЌеМяÑ.Ñ.Ой сОЌвПл пПЎ кÑ.Ñ.сПÑ.ПЌ. **
1375+
1376+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1377+
1378+ 2. УсÑ.аМПвОÑ.е кÑ.Ñ.сПÑ. Ñ.ак, Ñ.Ñ.ПбÑ. ПМ МаÑ.ПЎОлся МаЎ пеÑ.вПй ПÑ.ОбкПй.
1379+
1380+ 3. НабеÑ.ОÑ.е r О заÑ.еЌ сОЌвПл, ОспÑ.авляÑ.Ñ.Ой ПÑ.ОбкÑ..
1381+
1382+ 4. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2 О 3, пПка пеÑ.вая сÑ.Ñ.Пка Ме бÑ.ЎеÑ. ОспÑ.авлеМа.
1383+
1384+---> Ð. ЌПЌегÑ. МабÑ.Ñ.а эÑ.Пй Ñ.Ñ.Ñ.ПкО кПе0кÑ.П с Ñ.Ñ.Ñ.ЎПЌ пПпвЎал пП клваОÑ.аЌ!
1385+---> Ð. ЌПЌеМÑ. МабПÑ.а эÑ.Пй сÑ.Ñ.ПкО кПе-кÑ.П с Ñ.Ñ.Ñ.ЎПЌ пПпаЎал пП клавОÑ.аЌ!
1386+
1387+ 5. ТепеÑ.Ñ. пеÑ.еÑ.ПЎОÑ.е к УÑ.ПкÑ. 3.2.
1388+
1389+Ð.АÐ.Ð.ЧАНÐ.Ð.: Ð.ПЌМОÑ.е, Ñ.Ñ.П вÑ. ЎПлжМÑ. Ñ.Ñ.ОÑ.Ñ.ся в пÑ.ПÑ.ессе Ñ.абПÑ.Ñ., а Ме пÑ.ПсÑ.П
1390+ запПЌОМая.
1391+
1392+
1393+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1394+ УÑ.Пк 3.3: Ð.Ð.Ð.АНÐ.А Ð.Ð.Ð.Ð.НÐ.НÐ.Я
1395+
1396+
1397+ ** Ð.ля ОзЌеМеМОя Ñ.асÑ.О слПва МабеÑ.ОÑ.е cw . **
1398+
1399+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1400+
1401+ 2. РаспПлПжОÑ.е кÑ.Ñ.сПÑ. МаЎ бÑ.квПй `o' в слПве `сПла'.
1402+
1403+ 3. НабеÑ.ОÑ.е cw О ОспÑ.авÑ.Ñ.е слПвП (в ЎаММПЌ слÑ.Ñ.ае, МабеÑ.ОÑ.е `лПв'.)
1404+
1405+ 4. НажЌОÑ.е <ESC> О пеÑ.еÑ.ПЎОÑ.е к слеЎÑ.Ñ.Ñ.ей ПÑ.Обке (к пеÑ.вПЌÑ. сОЌвПлÑ., кПÑ.ПÑ.Ñ.й
1406+ МаЎП ОзЌеМОÑ.Ñ..)
1407+
1408+ 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 3--4 пПка пеÑ.вПе пÑ.еЎлПжеМОе Ме сÑ.аМеÑ. ОЎеМÑ.ОÑ.ÐœÑ.ÐŒ вÑ.ПÑ.ПЌÑ..
1409+
1410+---> НескПлÑ.кП сПла в эÑ.гÑ. сÑ.Ñ.Пке Ñ.пгÑ.Ñ.бÑ. Ñ.еЎалзкÑ.Ñ.ОесвÑ..
1411+---> НескПлÑ.кП слПв в эÑ.Пй сÑ.Ñ.Пке Ñ.Ñ.ебÑ.Ñ.Ñ. Ñ.еЎакÑ.ОÑ.ПваМОя.
1412+
1413+Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе, Ñ.Ñ.П cw Ме Ñ.ПлÑ.кП заЌеМяеÑ. слПвП, МП О пеÑ.евПЎОÑ. вас в Ñ.ежОЌ
1414+всÑ.авкО.
1415+
1416+
1417+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1418+ УÑ.Пк 3.4: Ð.Ð Ð.Ð.Ð.Ð.Ð.АÐ.Ð. Ð.Ð.Ð.Ð.НЯТЬ С Ð.Ð.Ð.АНÐ.Ð.Ð. c
1419+
1420+
1421+** Ð.ПЌаМЎа заЌеМÑ. ОспПлÑ.зÑ.еÑ.ся с Ñ.еЌО же ПбÑ.екÑ.аЌО, Ñ.Ñ.П О кПЌаМЎа Ñ.ЎалеМОя. **
1422+
1423+ 1. Ð.ПЌаМЎа ОзЌеМеМОя пÑ.ОЌеМяеÑ.ся Ñ.акОЌ же ПбÑ.азПЌ, как О кПЌаМЎа Ñ.ЎалеМОя.
1424+ Ð.е Ñ.ПÑ.ЌаÑ. Ñ.акПв:
1425+
1426+ [Ñ.ОслП] c ПбÑ.екÑ. Ð.Ð.Ð. c [Ñ.ОслП] ПбÑ.екÑ.
1427+
1428+ 2. Ð.бÑ.екÑ.Ñ. Ñ.акже сПвпаЎаÑ.Ñ.: w (слПвП), $ (кПМеÑ. сÑ.Ñ.ПкО) О Ñ..п.
1429+
1430+ 3. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1431+
1432+ 4. Ð.еÑ.ейЎОÑ.е к пеÑ.вПй ПÑ.Обке.
1433+
1434+ 5. НабеÑ.ОÑ.е c$ О ПÑ.Ñ.еЎакÑ.ОÑ.Ñ.йÑ.е пеÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ. Ñ.ак, Ñ.Ñ.ПбÑ. ПМа сПвпаЎала сП
1435+ вÑ.ПÑ.Пй, пПсле Ñ.егП МажЌОÑ.е <ESC>.
1436+
1437+---> Ð.ПМеÑ. эÑ.Пй сÑ.Ñ.ПкО ÐœÑ.жЎаеÑ.ся в пПЌПÑ.О, Ñ.Ñ.ПбÑ. сÑ.аÑ.Ñ. пПÑ.ПжОЌ Ма вÑ.ПÑ.Пй.
1438+---> Ð.ПМеÑ. эÑ.Пй сÑ.Ñ.ПкО ÐœÑ.жЎаеÑ.ся в пПЌПÑ.О кПЌаМЎÑ. c$ .
1439+
1440+
1441+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1442+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 3
1443+
1444+
1445+ 1. Ð.ля всÑ.авкО Ñ.ексÑ.а, кПÑ.ПÑ.Ñ.й Ñ.ПлÑ.кП Ñ.Ñ.П бÑ.л Ñ.ЎалеМ, МабеÑ.ОÑ.е p . ЭÑ.а
1446+ кПЌаМЎа всÑ.авОÑ. Ñ.ЎалеММÑ.й Ñ.ексÑ. Ð.Ð.СÐ.Ð. кÑ.Ñ.сПÑ.а (еслО бÑ.ла Ñ.ЎалеМа сÑ.Ñ.Пка,
1447+ Ñ.П ПМа бÑ.ЎеÑ. пПЌеÑ.еМа в сÑ.Ñ.Пке пПЎ кÑ.Ñ.сПÑ.ПЌ).
1448+
1449+ 2. Ð.ля заЌеМÑ. сОЌвПла пПЎ кÑ.Ñ.сПÑ.ПЌ МабеÑ.ОÑ.е r О заÑ.еЌ заЌеМяÑ.Ñ.Ой сОЌвПл.
1450+
1451+ 3. Ð.ПЌаМЎа ОзЌеМеМОя пПзвПляеÑ. Ð.аЌ ОзЌеМОÑ.Ñ. Ñ.казаММÑ.й ПбÑ.екÑ. ПÑ. кÑ.Ñ.сПÑ.а ЎП
1452+ кПМÑ.а эÑ.ПгП ПбÑ.екÑ.а. НапÑ.ОЌеÑ., МабеÑ.ОÑ.е cw Ўля заЌеМÑ. ПÑ. кÑ.Ñ.сПÑ.а ЎП
1453+ кПМÑ.а слПва, c$ Ўля ОзЌеМеМОя ЎП кПМÑ.а сÑ.Ñ.ПкО.
1454+
1455+ 4. ЀПÑ.ЌаÑ. кПЌаМЎÑ. ОзЌеМеМОя Ñ.акПв:
1456+
1457+ [Ñ.ОслП] c ПбÑ.екÑ. Ð.Ð.Ð. c [Ñ.ОслП] ПбÑ.екÑ.
1458+
1459+ТепеÑ.Ñ. ПÑ.пÑ.авляйÑ.есÑ. к слеЎÑ.Ñ.Ñ.еЌÑ. Ñ.Ñ.ПкÑ..
1460+
1461+
1462+
1463+
1464+
1465+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1466+ УÑ.Пк 4.1: Ð.НЀÐ.Ð Ð.АЊÐ.Я Ð. ЀАÐ.Ð.Ð. Ð. РАСÐ.Ð.Ð.Ð.Ð.Ð.НÐ.Ð. Ð. НÐ.Ð.
1467+
1468+
1469+ ** НабеÑ.ОÑ.е CTRL-g Ñ.Ñ.ПбÑ. Ñ.вОЎеÑ.Ñ. Ð.аÑ.е ЌесÑ.ПÑ.аспПлПжеМОе в Ñ.айле О ОМÑ.ПÑ.ЌаÑ.ОÑ.
1470+ П МеЌ.
1471+ НабеÑ.ОÑ.е SHIFT-G Ўля пеÑ.еЌеÑ.еМОя к заЎаММПй сÑ.Ñ.Пке в Ñ.айле. **
1472+
1473+ Ð.аЌеÑ.аМОе: Ð.Ñ.ПÑ.ОÑ.айÑ.е весÑ. Ñ.Ñ.Пк пÑ.ежЎе Ñ.еЌ вÑ.пПлМяÑ.Ñ. лÑ.бÑ.е кПЌаМЎÑ.!!
1474+
1475+ 1. УЎеÑ.жОвая клавОÑ.Ñ. Ctrl МажЌОÑ.е g . Ð.МОзÑ. экÑ.аМа пПявОÑ.ся сÑ.Ñ.Пка сÑ.аÑ.Ñ.са с
1476+ ОЌеМеЌ Ñ.айла О МПЌеÑ.ПЌ сÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй Ð.Ñ. МаÑ.ПЎОÑ.есÑ.. Ð.апПЌМОÑ.е МПЌеÑ.
1477+ сÑ.Ñ.ПкО, ПМ пПÑ.Ñ.ебÑ.еÑ.ся Ма Каге 3.
1478+
1479+ 2. НажЌОÑ.е shift-G Ўля пеÑ.еЌеÑ.еМОя к кПМÑ.Ñ. Ñ.айла.
1480+
1481+ 3. НабеÑ.ОÑ.е МПЌеÑ. сÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй вÑ. МаÑ.ПЎОлОсÑ. О заÑ.еЌ shift-G. ЭÑ.П
1482+ веÑ.МеÑ. Ð.ас к сÑ.Ñ.Пке, в кПÑ.ПÑ.Пй Ð.Ñ. бÑ.лО, кПгЎа в пеÑ.вÑ.й Ñ.аз МажалО Ctrl-g.
1483+ (Ð.ПгЎа Ð.Ñ. бÑ.ЎеÑ.е МабОÑ.аÑ.Ñ. Ñ.ОÑ.Ñ.Ñ., ПМО НÐ. ПÑ.ПбÑ.азяÑ.ся Ма экÑ.аМе.)
1484+
1485+ 4. Ð.слО Ð.Ñ. запПЌМОлО все вÑ.Ñ.есказаММПе, вÑ.пПлМОÑ.е Ñ.агО 1--3.
1486+
1487+
1488+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1489+ УÑ.Пк 4.2: Ð.Ð.Ð.АНÐ.А Ð.Ð.Ð.СÐ.А
1490+
1491+ ** НабеÑ.ОÑ.е / О заÑ.еЌ ввеЎОÑ.е ОскПЌÑ.Ñ. Ñ.Ñ.азÑ.. **
1492+
1493+ 1. Ð. ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode) МабеÑ.ОÑ.е сОЌвПл / . Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе,
1494+ Ñ.Ñ.П ПМ вЌесÑ.е с кÑ.Ñ.сПÑ.ПЌ пПявОÑ.ся вМОзÑ. экÑ.аМа, как эÑ.П пÑ.ПОсÑ.ПЎОÑ. с
1495+ кПЌаМЎПй : .
1496+
1497+ 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е 'ПÑ.Ñ.Ñ.Обка' <ENTER>. ЭÑ.П Ñ.П слПвП, кПÑ.ПÑ.Пе Ð.Ñ. бÑ.ЎеÑ.е
1498+ ОскаÑ.Ñ..
1499+
1500+ 3. Ð.ля Ñ.ПгП, Ñ.Ñ.ПбÑ. пПвÑ.ПÑ.ОÑ.Ñ. пПОск, пÑ.ПсÑ.П МажЌОÑ.е n .
1501+ Ð.ля пПОска эÑ.Пй Ñ.Ñ.азÑ. в ПбÑ.аÑ.МПЌ МапÑ.авлеМОО, МажЌОÑ.е Shift-N .
1502+
1503+ 4. Ð.слО Ð.Ñ. желаеÑ.е сÑ.азÑ. ОскаÑ.Ñ. в ПбÑ.аÑ.МПЌ МапÑ.авлеМОО, ОспПлÑ.зÑ.йÑ.е
1504+ кПЌаМЎÑ. ? вЌесÑ.П / .
1505+
1506+---> Ð.ПгЎа Ð.Ñ. пÑ.О пПОске ЎПсÑ.ОгМеÑ.е кПМÑ.а Ñ.айла, пПОск бÑ.ЎеÑ. пÑ.ПЎПлжеМ с
1507+ МаÑ.ала.
1508+
1509+ "ПÑ.Ñ.Ñ.Обка" эÑ.П Ме спПсПб пÑ.ПОзМесеМОя слПва `ПÑ.Обка'; ПÑ.Ñ.Ñ.Обка эÑ.П ПÑ.Обка.
1510+
1511+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1512+ УÑ.Пк 4.3: Ð.Ð.Ð.СÐ. Ð.АРНЫХ СÐ.Ð.Ð.Ð.Ð.
1513+
1514+
1515+ ** НабеÑ.ОÑ.е % Ўля пПОска паÑ.ÐœÑ.Ñ. ),] ОлО } . **
1516+
1517+ 1. Ð.ПЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. МаЎ лÑ.бПй Оз (, [ ОлО { в сÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->.
1518+
1519+ 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е сОЌвПл % .
1520+
1521+ 3. Ð.Ñ.Ñ.сПÑ. ЎПлжеМ пеÑ.ескПÑ.ОÑ.Ñ. Ма паÑ.ÐœÑ.Ñ. скПбкÑ..
1522+
1523+ 4. НабеÑ.ОÑ.е % Ўля вПзвÑ.аÑ.а кÑ.Ñ.сПÑ.а МазаЎ к пеÑ.вПй скПбке.
1524+
1525+---> ЭÑ.П ( сÑ.Ñ.Пка, сПЎеÑ.жаÑ.ая Ñ.акОе (, Ñ.акОе [ ] О Ñ.акОе { } скПбкО. ))
1526+
1527+Ð.аЌеÑ.аМОе: ЭÑ.П ПÑ.еМÑ. Ñ.ЎПбМП пÑ.О ПÑ.лаЎке пÑ.ПгÑ.аЌЌ с пÑ.ПпÑ.Ñ.еММÑ.ЌО скПбкаЌО!
1528+
1529+
1530+
1531+
1532+
1533+
1534+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1535+ УÑ.Пк 4.4: СÐ.Ð.СÐ.Ð. Ð.СÐ.РАÐ.Ð.Ð.НÐ.Я Ð.КÐ.Ð.Ð.Ð.
1536+
1537+
1538+ ** НабеÑ.ОÑ.е :s/бÑ.лП/сÑ.алП/g Ўля заЌеМÑ. 'бÑ.лП' Ма 'сÑ.алП'. **
1539+
1540+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1541+
1542+ 2. НабеÑ.ОÑ.е :s/Ñ.вПЎÑ./Ñ.вПжÑ. <ENTER> . Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе Ма Ñ.П, Ñ.Ñ.П эÑ.а кПЌаМЎа
1543+ заЌеМОÑ. Ñ.ПлÑ.кП пеÑ.вПе МайЎеММПе вÑ.ПжЎеМОе в сÑ.Ñ.Пке.
1544+
1545+ 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е :s/Ñ.вПЎÑ./Ñ.вПжÑ./g , ПзМаÑ.аÑ.Ñ.ее пПЎсÑ.аМПвкÑ. глПбалÑ.МП вП
1546+ всей сÑ.Ñ.Пке. ЭÑ.П заЌеМОÑ. все МайЎеММÑ.е в сÑ.Ñ.Пке вÑ.ПжЎеМОя.
1547+
1548+---> Я Ñ.вПЎÑ. к ПÑ.веÑ.жеММÑ.ÐŒ селеМÑ.яЌ, я Ñ.вПЎÑ. сквПзÑ. векПвеÑ.ÐœÑ.й сÑ.ПМ, я Ñ.вПЎÑ. к
1549+ забÑ.Ñ.Ñ.ÐŒ пПкПлеМÑ.яЌ.
1550+
1551+ 4. Ð.ля заЌеМÑ. всеÑ. вÑ.ПжЎеМОй пПслеЎПваÑ.елÑ.МПсÑ.О сОЌвПлПв ЌежЎÑ. ЎвÑ.Ќя
1552+ сÑ.Ñ.ПкаЌО,
1553+ МабеÑ.ОÑ.е :#,#s/бÑ.лП/сÑ.алП/g гЎе #,# --- МПЌеÑ.а эÑ.ОÑ. сÑ.Ñ.Пк.
1554+ НабеÑ.ОÑ.е :%s/бÑ.лП/сÑ.алП/g Ўля заЌеМÑ. всеÑ. вÑ.ПжЎеМОй вП всеЌ Ñ.айле.
1555+
1556+
1557+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1558+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 4
1559+ 1. Ctrl-g пПказÑ.ваеÑ. ваÑ.е пПлПжеМОе в Ñ.айле О ОМÑ.ПÑ.ЌаÑ.ОÑ. П МеЌ.
1560+ Shift-G пеÑ.еЌеÑ.аеÑ. Ð.ас в кПМеÑ. Ñ.айла. НПЌеÑ., за кПÑ.ПÑ.Ñ.ÐŒ слеЎÑ.еÑ. Shift-G
1561+ пПзвПляеÑ. пеÑ.ейÑ.О к сÑ.Ñ.Пке с эÑ.ОЌ МПЌеÑ.ПЌ.
1562+
1563+ 2. НажаÑ.Ое / О заÑ.еЌ ввПЎ сÑ.Ñ.ПкО пПзвПляеÑ. пÑ.ПОзвесÑ.О пПОск эÑ.Пй сÑ.Ñ.ПкО
1564+ Ð.Ð.Ð.Ð Ð.Ð. пП Ñ.ексÑ.Ñ..
1565+ НажаÑ.Ое ? О заÑ.еЌ ввПЎ сÑ.Ñ.ПкО пПзвПляеÑ. пÑ.ПОзвесÑ.О пПОск эÑ.Пй сÑ.Ñ.ПкО
1566+ НАÐ.АÐ. пП Ñ.ексÑ.Ñ..
1567+ Ð.Псле пПОска МабеÑ.ОÑ.е n Ўля пеÑ.еÑ.ПЎа к слеЎÑ.Ñ.Ñ.еЌÑ. вÑ.ПжЎеМОÑ. ОскПЌПй
1568+ сÑ.Ñ.ПкО в Ñ.ПЌ же МапÑ.авлеМОО ОлО Shift-N Ўля пеÑ.еÑ.ПЎа в пÑ.ПÑ.ОвПпПлПжМПЌ
1569+ МапÑ.авлеМОО.
1570+
1571+ 3. НажаÑ.Ое % , кПгЎа кÑ.Ñ.сПÑ. МаÑ.ПЎОÑ.ся Ма (,),[,],{, ОлО } пПзвПляеÑ. МайÑ.О
1572+ паÑ.ÐœÑ.Ñ. скПбкÑ..
1573+
1574+ 4. Ð.ля пПЎсÑ.аМПвкО `сÑ.алП' вЌесÑ.П пеÑ.вПгП `бÑ.лП' в сÑ.Ñ.Пке, МабеÑ.ОÑ.е
1575+ :s/old/new
1576+ Ð.ля пПЎсÑ.аМПвкО `сÑ.алП' вЌесÑ.П всеÑ. `бÑ.лП' в сÑ.Ñ.Пке, МабеÑ.ОÑ.е
1577+ :s/old/new/g
1578+ Ð.ля заЌеМÑ. в ОМÑ.еÑ.вале ЌежЎÑ. ЎвÑ.Ќя сÑ.Ñ.ПкаЌО, МабеÑ.ОÑ.е
1579+ :#,#s/old/new/g
1580+ Ð.ля заЌеМÑ. всеÑ. вÑ.ПжЎеМОй `бÑ.лП' Ма `сÑ.алП' в Ñ.айле, МабеÑ.ОÑ.е
1581+ :%s/old/new/g
1582+ ЧÑ.ПбÑ. Ñ.еЎакÑ.ПÑ. кажЎÑ.й Ñ.аз запÑ.аÑ.Овал пПЎÑ.веÑ.жЎеМОе, ЎПбавÑ.Ñ.е 'c'
1583+ :%s/old/new/gc
1584+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1585+ УÑ.Пк 5.1: Ð.АÐ. Ð.ЫÐ.Ð.Ð.НÐ.ТЬ Ð.НÐ.КНЮЮ Ð.Ð.Ð.АНÐ.У
1586+
1587+
1588+ ** НабеÑ.ОÑ.е :! О заÑ.еЌ вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ., кПÑ.ПÑ.Ñ.Ñ. слеЎÑ.еÑ. вÑ.пПлМОÑ.Ñ.. **
1589+
1590+ 1. НабеÑ.ОÑ.е Ñ.же зМакПЌÑ.Ñ. Ð.аЌ кПЌаМЎÑ. : Ўля Ñ.сÑ.аМПвкО кÑ.Ñ.сПÑ.а в кПЌаМЎМÑ.Ñ.
1591+ сÑ.Ñ.ПкÑ. Ñ.еЎакÑ.ПÑ.а. ЭÑ.П пПзвПлОÑ. Ð.аЌ ввесÑ.О кПЌаМЎÑ..
1592+
1593+ 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е сОЌвПл ! (вПсклОÑ.аÑ.елÑ.ÐœÑ.й зМак). ТепеÑ.Ñ. ЌПжМП ОспПлМОÑ.Ñ.
1594+ вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ., ОспПлÑ.зÑ.я кПЌаМЎМÑ.Ñ. ПбПлПÑ.кÑ..
1595+
1596+ 3. Ð.ля пÑ.ОЌеÑ.а МабеÑ.ОÑ.е ls пПсле ! О МажЌОÑ.е <ENTER>. ЭÑ.а кПЌаМЎа вÑ.веЎеÑ.
1597+ спОсПк Ñ.айлПв в Ñ.екÑ.Ñ.еЌ каÑ.алПге, Ñ.ПÑ.МП Ñ.акже, как еслО бÑ. Ð.Ñ. ввелО эÑ.Ñ.
1598+ кПЌаМЎÑ. в пÑ.ОглаÑ.еМОО ПбПлПÑ.кО. Ð.лО пПпÑ.ПбÑ.йÑ.е :!dir , еслО пÑ.еЎÑ.ÐŽÑ.Ñ.ая
1599+ кПЌаМЎа Ме сÑ.абПÑ.ала.
1600+
1601+---> Ð.аЌеÑ.аМОе: ТакОЌ спПсПбПЌ ЌПжМП вÑ.пПлМОÑ.Ñ. лÑ.бÑ.Ñ. вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ..
1602+
1603+---> Ð.аЌеÑ.аМОе: Ð.се кПЌаМЎÑ., МаÑ.ОМаÑ.Ñ.Оеся с : , ЎПлжМÑ. завеÑ.Ñ.аÑ.Ñ.ся МажаÑ.ОеЌ
1604+ <ENTER>.
1605+
1606+
1607+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1608+ УÑ.Пк 5.2: Ð.АÐ. Ð.АÐ.Ð.САТЬ ЀАÐ.Ð.
1609+
1610+
1611+** Ð.ля сПÑ.Ñ.аМеМОя ОзЌеМеМОй, пÑ.ПОзвеЎеММÑ.Ñ. в Ñ.айле, МабеÑ.ОÑ.е :w Ð.Ð.Я_ЀАÐ.Ð.А. **
1612+
1613+ 1. НабеÑ.ОÑ.е :!dir ОлО :!ls Ўля пПлÑ.Ñ.еМОя спОска Ñ.айлПв в Ñ.екÑ.Ñ.еЌ каÑ.алПге.
1614+ Ð.ак Ð.аЌ Ñ.же ОзвесÑ.МП, Ð.Ñ. ЎПлжМÑ. МажаÑ.Ñ. <ENTER> пПсле ввПЎа эÑ.ОÑ. кПЌаМЎ.
1615+
1616+ 2. Ð.Ñ.ОЎÑ.ЌайÑ.е МазваМОе Ўля Ñ.айла, кПÑ.ПÑ.Пе еÑ.е Ме сÑ.Ñ.есÑ.вÑ.еÑ., МапÑ.ОЌеÑ. TEST.
1617+
1618+ 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е :w TEST (гЎе TEST --- эÑ.П ОЌя Ñ.айла, пÑ.ОЎÑ.ЌаММПе Ð.аЌО.)
1619+
1620+ 4. ЭÑ.а кПЌаМЎа сПÑ.Ñ.аМОÑ. весÑ. Ñ.айл (УÑ.ебМОк пП Vim) пПЎ ОЌеМеЌ TEST. ЧÑ.ПбÑ.
1621+ Ñ.ЎПсÑ.ПвеÑ.ОÑ.Ñ.ся в эÑ.ПЌ, сМПва МабеÑ.ОÑ.е :!dir О пÑ.ПсЌПÑ.Ñ.ОÑ.е каÑ.алПг.
1622+
1623+---> Ð.аЌеÑ.Ñ.Ñ.е, Ñ.Ñ.П еслО Ð.Ñ. вÑ.йЎеÑ.е Оз Vim О заÑ.еЌ запÑ.сÑ.ОÑ.е егП сМПва с
1624+ Ñ.айлПЌ TEST, эÑ.ПÑ. Ñ.айл бÑ.ЎеÑ. Ñ.ПÑ.МПй кПпОей Ñ.Ñ.ебМОка в Ñ.ПÑ. ЌПЌеМÑ., кПгЎа
1625+ Ð.Ñ. егП сПÑ.Ñ.аМОлО.
1626+
1627+ 5. ТепеÑ.Ñ. Ñ.ЎалОÑ.е эÑ.ПÑ. Ñ.айл, МабÑ.ав :!del TEST
1628+
1629+
1630+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1631+ УÑ.Пк 5.3: Ð.ЫÐ.Ð.Ð Ð.ЧНÐ.Ð. СÐ.ХРАНÐ.НÐ.Ð.
1632+
1633+
1634+ ** Ð.ля сПÑ.Ñ.аМеМОя Ñ.асÑ.О Ñ.айла, МабеÑ.ОÑ.е :#,# w Ð.Ð.Я_ЀАÐ.Ð.А **
1635+
1636+ 1. Ð.Ñ.е Ñ.аз МабеÑ.ОÑ.е :!dir ОлО :!ls Ўля пПлÑ.Ñ.еМОя спОска Ñ.айлПв в Ñ.екÑ.Ñ.еЌ
1637+ каÑ.алПге О вÑ.беÑ.ОÑ.е пПЎÑ.ПЎяÑ.ее ОЌя, МапÑ.ОЌеÑ. TEST.
1638+
1639+ 2. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. к МаÑ.алÑ. эÑ.Пй сÑ.Ñ.аМОÑ.Ñ. О МажЌОÑ.е Ctrl-g Ўля МаÑ.ПжЎеМОя
1640+ МПЌеÑ.а сÑ.Ñ.ПкОto. Ð.АÐ.Ð.Ð.НÐ.ТÐ. ЭТÐ.Т НÐ.Ð.Ð.Ð !
1641+
1642+ 3. ТепеÑ.Ñ. пеÑ.еЌесÑ.ОÑ.есÑ. в кПМеÑ. сÑ.Ñ.аМОÑ.Ñ. О вМПвÑ. МабеÑ.ОÑ.е Ctrl-g. Ð.АÐ.Ð.Ð.НÐ.ТÐ.
1643+ Ð. ЭТÐ.Т НÐ.Ð.Ð.РТÐ.Ð.Ð.!
1644+
1645+ 4. Ð.ля сПÑ.Ñ.аМеМОя ТÐ.Ð.ЬÐ.Ð. ЧАСТÐ. Ñ.айла МабеÑ.ОÑ.е :#,# w TEST , гЎе #,# --- эÑ.П
1646+ МПЌеÑ.а, кПÑ.ПÑ.Ñ.е Ð.Ñ. запПЌМОлО (МаÑ.алП, кПМеÑ.), а TEST --- ОЌя ваÑ.егП Ñ.айла.
1647+
1648+ 5. Ð.ак О пÑ.ежЎе, Ñ.беЎОÑ.есÑ. в МалОÑ.ОО эÑ.ПгП Ñ.айла кПЌаМЎПй :!dir , МП НÐ.
1649+ УÐ.АÐ.ЯÐ.ТÐ. егП.
1650+
1651+
1652+
1653+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1654+ УÑ.Пк 5.4: ЧТÐ.НÐ.Ð. Ð. Ð.Ð.ЪÐ.Ð.Ð.НÐ.НÐ.Ð. ЀАÐ.Ð.Ð.Ð.
1655+
1656+ ** Ð.ля всÑ.авкО сПЎеÑ.жОЌПгП Ñ.айла, МабеÑ.ОÑ.е :r FILENAME **
1657+
1658+ 1. НабеÑ.ОÑ.е :!dir Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.беЎОÑ.Ñ.ся в Ñ.ПЌ, Ñ.Ñ.П Ñ.айл TEST все еÑ.е
1659+ сÑ.Ñ.есÑ.вÑ.еÑ..
1660+
1661+ 2. УсÑ.аМПвОÑ.е кÑ.Ñ.сПÑ. в веÑ.Ñ.Мей Ñ.асÑ.О эÑ.Пй сÑ.Ñ.аМОÑ.Ñ..
1662+
1663+Ð.аЌеÑ.аМОе: Ð.Псле вÑ.пПлМеМОя Ñ.ага 3 Ð.Ñ. Ñ.вОЎОÑ.е УÑ.Пк 5.3. Ð.Псле эÑ.ПгП
1664+ пеÑ.еЌеÑ.айÑ.есÑ. Ð.НÐ.Ð., сМПва к эÑ.ПЌÑ. Ñ.Ñ.ПкÑ..
1665+
1666+ 3. ТепеÑ.Ñ. пÑ.ПÑ.ОÑ.айÑ.е Ð.аÑ. Ñ.айл TEST, ОспПлÑ.зÑ.я кПЌаМЎÑ. :r TEST , гЎе
1667+ TEST --- эÑ.П ОЌя Ñ.айла.
1668+
1669+Ð.аЌеÑ.аМОе: Ð.Ñ.ПÑ.ОÑ.аММÑ.й Ð.аЌО Ñ.айл бÑ.ЎеÑ. всÑ.авлеМ в Ñ.ПЌ ЌесÑ.е, гЎе МаÑ.ПЎОÑ.ся
1670+ кÑ.Ñ.сПÑ..
1671+
1672+ 4. ЧÑ.ПбÑ. Ñ.беЎОÑ.Ñ.ся в Ñ.ПЌ, Ñ.Ñ.П Ñ.айл пÑ.ПÑ.ОÑ.аМ, пеÑ.еЌесÑ.ОÑ.есÑ. МеЌМПгП МазаЎ пП
1673+ Ñ.ексÑ.Ñ. О заЌеÑ.Ñ.Ñ.е, Ñ.Ñ.П Ñ.епеÑ.Ñ. сÑ.Ñ.есÑ.вÑ.Ñ.Ñ. Ўве кПпОО УÑ.Пка 5.3, ОсÑ.ПЎМая
1674+ О пПлÑ.Ñ.еММая Оз Ñ.айла.
1675+
1676+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1677+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 5
1678+
1679+
1680+ 1. :!кПЌаМЎа ОспПлМяеÑ. вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ..
1681+
1682+ НекПÑ.ПÑ.Ñ.е пПлезМÑ.е пÑ.ОЌеÑ.Ñ.:
1683+ :!dir --- вÑ.вПЎОÑ. спОсПк Ñ.айлПв в каÑ.алПге.
1684+ :!del FILENAME --- Ñ.ЎаляеÑ. Ñ.айл FILENAME.
1685+
1686+ 2. :w FILENAME запОсÑ.ваеÑ. Ñ.екÑ.Ñ.Ой Ñ.еЎакÑ.ОÑ.Ñ.еЌÑ.й Ñ.айл Ма ЎОск
1687+ пПЎ ОЌеМеЌ FILENAME.
1688+
1689+ 3. :#,#w FILENAME сПÑ.Ñ.аМяеÑ. сÑ.Ñ.ПкО ПÑ. # ЎП # в Ñ.айл FILENAME.
1690+
1691+ 4. :r FILENAME сÑ.ОÑ.Ñ.ваеÑ. с ЎОска Ñ.айл FILENAME О пПЌеÑ.аеÑ. егП в Ñ.екÑ.Ñ.Ой
1692+ Ñ.айл слеЎПЌ за пПзОÑ.Оей кÑ.Ñ.сПÑ.а.
1693+
1694+
1695+
1696+
1697+
1698+
1699+
1700+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1701+ УÑ.Пк 6.1: Ð.Ð.Ð.АНÐ.А СÐ.Ð.Ð.АНÐ.Я
1702+
1703+
1704+ ** НабеÑ.ОÑ.е o Ñ.Ñ.ПбÑ. сПзЎаÑ.Ñ. пÑ.сÑ.Ñ.Ñ. сÑ.Ñ.ПкÑ. пПЎ кÑ.Ñ.сПÑ.ПЌ О пеÑ.ейÑ.О в Ñ.ежОЌ
1705+ всÑ.авкО (Insert mode) **
1706+
1707+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1708+
1709+ 2. НабеÑ.ОÑ.е o (в МОжМеЌ Ñ.егОсÑ.Ñ.е) Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. сПзЎаÑ.Ñ. пÑ.сÑ.Ñ.Ñ. сÑ.Ñ.ПкÑ.
1710+ НÐ.Ð.Ð. кÑ.Ñ.сПÑ.а О пеÑ.ейÑ.О в Ñ.ежОЌ всÑ.авкО (Insert mode).
1711+
1712+ 3. ТепеÑ.Ñ. скПпОÑ.Ñ.йÑ.е пПЌеÑ.еММÑ.Ñ. ---> сÑ.Ñ.ПкÑ. О МажЌОÑ.е <ESC> Ўля вÑ.Ñ.ПЎа Оз
1713+ Ñ.ежОЌа всÑ.авкО.
1714+
1715+---> Ð.Псле МажаÑ.Оя o кÑ.Ñ.сПÑ. пеÑ.ейЎеÑ. Ма МПвÑ.Ñ. пÑ.сÑ.Ñ.Ñ. сÑ.Ñ.ПкÑ. в Ñ.ежОЌе всÑ.авкО.
1716+
1717+ 4. Ð.ля сПзЎаМОя сÑ.Ñ.ПкО Ð.ЫКÐ. кÑ.Ñ.сПÑ.а, пÑ.ПсÑ.П МабеÑ.ОÑ.е заглавМÑ.Ñ. O, вЌесÑ.П
1718+ сÑ.Ñ.ПÑ.МПй o. Ð.ПпÑ.ПбÑ.йÑ.е пÑ.ПЎелаÑ.Ñ. эÑ.П с МОжеслеЎÑ.Ñ.Ñ.ей сÑ.Ñ.ПкПй.
1719+СПзЎайÑ.е МПвÑ.Ñ. сÑ.Ñ.ПкÑ. МаЎ эÑ.Пй, Мажав Shift-O, пПЌесÑ.Ов кÑ.Ñ.сПÑ. Ма эÑ.Ñ. сÑ.Ñ.ПкÑ..
1720+
1721+
1722+
1723+
1724+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1725+ УÑ.Пк 6.2: Ð.Ð.Ð.АНÐ.А Ð.Ð.Ð.АÐ.Ð.Ð.НÐ.Я
1726+
1727+ ** НабеÑ.ОÑ.е a , Ñ.Ñ.ПбÑ. всÑ.авОÑ.Ñ. Ñ.ексÑ. Ð.Ð.СÐ.Ð. кÑ.Ñ.сПÑ.а. **
1728+
1729+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, в кПМеÑ. пеÑ.вПй сÑ.Ñ.ПкО, пПЌеÑ.еММПй ---> ,
1730+ МабÑ.ав $ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode).
1731+
1732+ 2. НабеÑ.ОÑ.е a (в МОжМеЌ Ñ.егОсÑ.Ñ.е) Ўля ЎПбавлеМОя Ñ.ексÑ.а Ð.Ð.СÐ.Ð. сОЌвПла,
1733+ МаÑ.ПЎяÑ.егПся пПЎ кÑ.Ñ.сПÑ.ПЌ. (Ð.аглавМая A пПзвПляеÑ. ЎПбавОÑ.Ñ. в кПМеÑ.
1734+ сÑ.Ñ.ПкО.)
1735+
1736+Ð.аЌеÑ.аМОе: ЭÑ.П пПзвПляеÑ. ОзбежаÑ.Ñ. МажаÑ.Оя i , пПслеЎМегП сОЌвПла, Ñ.ексÑ.а Ўля
1737+ всÑ.авкО, <ESC>, кÑ.Ñ.сПÑ.-впÑ.авП, О, МакПМеÑ., x , пÑ.ПсÑ.П Ўля Ñ.ПгП,
1738+ Ñ.Ñ.ПбÑ. ЎПбавОÑ.Ñ. Ñ.есÑ. в кПМеÑ. сÑ.Ñ.ПкО!
1739+
1740+ 3. ТепеÑ.Ñ. завеÑ.Ñ.ОÑ.е пеÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ.. Ð.аЌеÑ.Ñ.Ñ.е Ñ.акже, Ñ.Ñ.П ЎПбавлеМОе эÑ.П в
1741+ Ñ.ПÑ.МПсÑ.О Ñ.П же саЌПе, Ñ.Ñ.П О Ñ.ежОЌ всÑ.авкО, за ОсклÑ.Ñ.еМОеЌ пПзОÑ.ОО, в
1742+ кПÑ.ПÑ.Ñ.Ñ. бÑ.ЎеÑ. всÑ.авлеМ Ñ.ексÑ..
1743+
1744+---> ЭÑ.а сÑ.Ñ.ПÑ.ка пПзвПлОÑ. Ð.аЌ пПпÑ.акÑ.ОкПваÑ.Ñ.ся
1745+---> ЭÑ.а сÑ.Ñ.ПÑ.ка пПзвПлОÑ. Ð.аЌ пПпÑ.акÑ.ОкПваÑ.Ñ.ся в ЎПбавлеМОО Ñ.ексÑ.а в кПМеÑ.
1746+ сÑ.Ñ.ПкО.
1747+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1748+ УÑ.Пк 6.3: Ð.ЩÐ. Ð.Ð.Ð.Н СÐ.Ð.СÐ.Ð. Ð.АÐ.Ð.НЫ
1749+
1750+
1751+ ** НабеÑ.ОÑ.е заглавМÑ.Ñ. R Ўля заЌеМÑ. бПлее, Ñ.еЌ ПЎМПгП сОЌвПла. **
1752+
1753+ 1. Ð.еÑ.еЌесÑ.ОÑ.е кÑ.Ñ.сПÑ. вМОз, к сÑ.Ñ.Пке, пПЌеÑ.еММПй --->.
1754+
1755+ 2. РаспПлПжОÑ.е кÑ.Ñ.сПÑ. в МаÑ.але пеÑ.вПгП слПва, ПÑ.лОÑ.аÑ.Ñ.егПся ПÑ.
1756+ сППÑ.веÑ.сÑ.вÑ.Ñ.Ñ.егП в слеЎÑ.Ñ.Ñ.ей сÑ.Ñ.Пке, пПЌеÑ.еММПй ---> (слПвП 'пПслеЎМей').
1757+
1758+ 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е R О заЌеМОÑ.е ПсÑ.аÑ.Пк Ñ.ексÑ.а в пеÑ.вПй сÑ.Ñ.Пке, МабÑ.ав
1759+ пПвеÑ.Ñ. сÑ.аÑ.ПгП Ñ.ексÑ.а Ñ.ак, Ñ.Ñ.ПбÑ. Пбе сÑ.Ñ.ПкО сÑ.алО ПЎОМакПвÑ.ЌО.
1760+
1761+---> Ð.еÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ. ЌПжМП сÑ.авМяÑ.Ñ. с пПслеЎМей, ОспПлÑ.зÑ.я клавОÑ.О.
1762+---> Ð.еÑ.вÑ.Ñ. сÑ.Ñ.ПкÑ. ЌПжМП сÑ.авМяÑ.Ñ. с вÑ.ПÑ.Пй, ОспПлÑ.зÑ.я R О МабÑ.ав МПвÑ.й Ñ.ексÑ..
1763+
1764+ 4. Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе, Ñ.Ñ.П пÑ.О МажаÑ.ОО <ESC> Ўля завеÑ.Ñ.еМОя, лÑ.бПй
1765+ Ме ОзЌеМеММÑ.й Ñ.ексÑ. сПÑ.Ñ.аМОÑ.ся.
1766+
1767+
1768+
1769+
1770+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1771+ УÑ.Пк 6.4: УСТАНÐ.Ð.Ð.А Ð.АРАÐ.Ð.ТРÐ.Ð.
1772+
1773+
1774+** УсÑ.аМПвОЌ паÑ.аЌеÑ.Ñ.Ñ. Ñ.ак, Ñ.Ñ.ПбÑ. ОгМПÑ.ОÑ.ПваÑ.Ñ. Ñ.егОсÑ.Ñ. пÑ.О пПОске ОлО заЌеМе **
1775+
1776+
1777+ 1. Ð.ПОÑ.ОÑ.е слПвП 'ОгМПÑ.ОÑ.ПваÑ.Ñ.', МабÑ.ав:
1778+ /ОгМПÑ.ОÑ.ПваÑ.Ñ.
1779+ Ð.ПвÑ.ПÑ.ОÑ.е пПОск МескПлÑ.кП Ñ.аз, МажОЌая клавОÑ.Ñ. n
1780+
1781+ 2. Ð.клÑ.Ñ.ОÑ.е паÑ.аЌеÑ.Ñ. 'ic' (Ð.гМПÑ.ОÑ.ПваÑ.Ñ. Ñ.егОсÑ.Ñ.), МабÑ.ав:
1782+ :set ic
1783+
1784+ 3. ТепеÑ.Ñ. сМПва сЎелайÑ.е пПОск слПва 'ОгМПÑ.ОÑ.ПваÑ.Ñ.', Мажав: n
1785+ Ð.ПвÑ.ПÑ.ОÑ.е пПОск МескПлÑ.кП Ñ.аз, МажОЌая клавОÑ.Ñ. n
1786+
1787+ 4. Ð.клÑ.Ñ.ОÑ.е паÑ.аЌеÑ.Ñ.Ñ. 'hlsearch' О 'incsearch':
1788+ :set hls is
1789+
1790+ 5. ТепеÑ.Ñ. ПпяÑ.Ñ. ввеЎОÑ.е кПЌаМЎÑ. пПОска О пПсЌПÑ.Ñ.ОÑ.е, Ñ.Ñ.П пПлÑ.Ñ.ОÑ.ся:
1791+ /ОгМПÑ.ОÑ.ПваÑ.Ñ.
1792+
1793+
1794+
1795+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1796+ Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.А 6
1797+
1798+
1799+ 1. НажаÑ.Ое o сПзЎаеÑ. сÑ.Ñ.ПкÑ. НÐ.Ð.Ð. кÑ.Ñ.сПÑ.а О пеÑ.еЌеÑ.аеÑ. кÑ.Ñ.сПÑ. в Мее в Ñ.ежОЌе
1800+ всÑ.авкО.
1801+ НажаÑ.Ое заглавМПй O сПзЎаеÑ. сÑ.Ñ.ПкÑ. Ð.ЫКÐ. сÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй МаÑ.ПЎОÑ.ся
1802+ кÑ.Ñ.сПÑ..
1803+
1804+ 2. НабеÑ.ОÑ.е a Ўля всÑ.авкО Ñ.ексÑ.а Ð.Ð.СÐ.Ð. сОЌвПла, Ма кПÑ.ПÑ.ПЌ МаÑ.ПЎОÑ.ся кÑ.Ñ.сПÑ..
1805+ НажаÑ.Ое заглавМПй A авÑ.ПЌаÑ.ОÑ.ескО пеÑ.еЌеÑ.аеÑ. Ð.ас Ўля ЎПбавлеМОя Ñ.ексÑ.а
1806+ в кПМеÑ. сÑ.Ñ.ПкО.
1807+
1808+ 3. НажаÑ.Ое заглавМПй R пеÑ.евПЎОÑ. Ð.ас в Ñ.ежОЌ заЌеМÑ. ЎП Ñ.еÑ. пПÑ., пПка Ме
1809+ бÑ.ЎеÑ. МажаÑ.а клавОÑ.а <ESC> Ўля завеÑ.Ñ.еМОя.
1810+
1811+ 4. НабÑ.ав ":set xxx" вÑ. сЌПжеÑ.е вклÑ.Ñ.ОÑ.Ñ. паÑ.аЌеÑ.Ñ. "xxx"
1812+
1813+
1814+
1815+
1816+
1817+
1818+
1819+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1820+ УÑ.Пк 7: Ð.Ð.Ð.АНÐ.Ы Ð.Ð.Ð.УЧÐ.НÐ.Я Ð.СТРÐ.Ð.ННÐ.Ð. СÐ.РАÐ.Ð.Ð.
1821+
1822+ ** Ð.спПлÑ.зÑ.йÑ.е всÑ.Ñ.ПеММÑ.Ñ. спÑ.авПÑ.ÐœÑ.Ñ. сОсÑ.еЌÑ. **
1823+
1824+ Vim ПблаЎаеÑ. ЌПÑ.МПй всÑ.Ñ.ПеММПй спÑ.авПÑ.МПй сОсÑ.еЌПй. Ð.ля МаÑ.ала пПпÑ.ПбÑ.йÑ.е
1825+ ПЎОМ Оз Ñ.Ñ.еÑ. ваÑ.ОаМÑ.Пв:
1826+ - МажЌОÑ.е клавОÑ.Ñ. <HELP> (еслО Ñ.акПвая ОЌееÑ.ся Ма клавОаÑ.Ñ.Ñ.е)
1827+ - МажЌОÑ.е клавОÑ.Ñ. <F1> (еслО Ñ.акПвая ОЌееÑ.ся Ма клавОаÑ.Ñ.Ñ.е)
1828+ - МабеÑ.ОÑ.е :help <ENTER>
1829+
1830+ НабеÑ.ОÑ.е :q <ENTER> Ñ.Ñ.ПбÑ. закÑ.Ñ.Ñ.Ñ. ПкМП спÑ.авкО.
1831+
1832+ Ð.Ñ. ЌПжеÑ.е МайÑ.О спÑ.авкÑ. Ўля лÑ.бПгП пПМяÑ.Оя ОлО кПЌаМЎÑ., пÑ.ПсÑ.П заЎав
1833+ сППÑ.веÑ.сÑ.вÑ.Ñ.Ñ.Ой аÑ.гÑ.ЌеМÑ. кПЌаМЎе ":help". Ð.ПпÑ.ПбÑ.йÑ.е слеЎÑ.Ñ.Ñ.ее (Ме забÑ.ÐŽÑ.Ñ.е
1834+ МажаÑ.Ñ. <ENTER>):
1835+
1836+ :help w
1837+ :help c_<T
1838+ :help insert-index
1839+
1840+
1841+
1842+
1843+
1844+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1845+ УÑ.Пк 8: СÐ.Ð.Ð.АНÐ.Ð. СТАРТÐ.Ð.Ð.Ð.Ð. СÐ.Ð Ð.Ð.ТА
1846+
1847+ ** Ð.клÑ.Ñ.ОЌ вПзЌПжМПсÑ.О Vim **
1848+
1849+ Vim ОЌееÑ. МаЌМПгП бПлÑ.Ñ.е вПзЌПжМПсÑ.ей, Ñ.еЌ Vi, ПЎМакП бПлÑ.Ñ.ОМсÑ.ваП Оз МОÑ.
1850+ вÑ.клÑ.Ñ.еМÑ. пП Ñ.ЌПлÑ.аМОÑ.. Ð.ля Ñ.ПгП, Ñ.Ñ.ПбÑ. МаÑ.аÑ.Ñ. ОспПлÑ.зПваÑ.Ñ. МПвÑ.е
1851+ вПзЌПжМПсÑ.О Ð.аЌ слеЎÑ.еÑ. сПзЎаÑ.Ñ. Ñ.айл "vimrc".
1852+
1853+ 1. Ð.Ñ.Ñ.еЎакÑ.ОÑ.Ñ.йÑ.е Ñ.айл "vimrc", егП Ñ.аспПлПжеМОе завОсОÑ. ПÑ. ОспПлÑ.зÑ.еЌПй
1854+ сОсÑ.еЌÑ.:
1855+
1856+ :edit ~/.vimrc Ўля Unix
1857+ :edit $VIM/_vimrc Ўля MS-Windows
1858+
1859+ 2. ТепеÑ.Ñ. пÑ.ПÑ.ОÑ.айÑ.е пÑ.ОЌеÑ. Ñ.айла "vimrc":
1860+
1861+ :read $VIMRUNTIME/vimrc_example.vim
1862+
1863+ 3. Ð.апОÑ.ОÑ.е Ñ.айл:
1864+
1865+ :write
1866+
1867+ ТепеÑ.Ñ. пÑ.О слеЎÑ.Ñ.Ñ.еЌ запÑ.ске Vim бÑ.ЎеÑ. вклÑ.Ñ.еМа пПЎсвеÑ.ка сОМÑ.аксОса. Ð.се
1868+ МасÑ.Ñ.ПйкО, пÑ.еЎпПÑ.ОÑ.аеЌÑ.е Ð.аЌО, ЌПгÑ.Ñ. бÑ.Ñ.Ñ. ЎПбавлеМÑ. в Ñ.айл "vimrc".
1869+
1870+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1871+ На эÑ.ПЌ завеÑ.Ñ.аеÑ.ся УÑ.ебМОк Vim. Ð.Ðœ бÑ.л пÑ.еЎМазМаÑ.еМ Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. ЎаÑ.Ñ.
1872+ ПбÑ.ее пÑ.еЎсÑ.авлеМОе П Ñ.еЎакÑ.ПÑ.е Vim, ЎПсÑ.аÑ.ПÑ.МПе Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. с легкПсÑ.Ñ.Ñ.
1873+ ОспПлÑ.зПваÑ.Ñ. егП. УÑ.ебМОк Ўалек ПÑ. пПлМПÑ.Ñ., пПскПлÑ.кÑ. Vim ОЌееÑ. ПÑ.еМÑ. ЌМПгП
1874+ кПЌаМЎ. Ð.Ñ.ПÑ.ОÑ.айÑ.е Ñ.епеÑ.Ñ. Ñ.Ñ.кПвПЎсÑ.вП пПлÑ.зПваÑ.еля: ":help user-manual".
1875+
1876+ Ð.ля ЎалÑ.МейÑ.егП Ñ.Ñ.еМОя Ñ.екПЌеМЎÑ.еÑ.ся кМОга:
1877+ Vim - Vi Improved - АвÑ.ПÑ.: Steve Oualline
1878+ Ð.зЎаÑ.елÑ.: New Riders
1879+ ЭÑ.а кМОга пПлМПсÑ.Ñ.Ñ. пПсвяÑ.еМа Vim. Ð.сПбеММП пПлезМа МПвОÑ.каЌ. СПЎеÑ.жОÑ.
1880+ ЌМПжесÑ.вП пÑ.ОЌеÑ.Пв О ОллÑ.сÑ.Ñ.аÑ.Ой.
1881+ Ð.згляМОÑ.е Ма See http://iccf-holland.org/click5.html
1882+
1883+ СлеЎÑ.Ñ.Ñ.ая кМОга бПлее пПÑ.Ñ.еММПгП вПзÑ.асÑ.а О пПсвяÑ.еМа бПлÑ.Ñ.е Vi, Ñ.еЌ Vim,
1884+ ПЎМакП Ñ.акже Ñ.екПЌеМЎÑ.еÑ.ся:
1885+ Learning the Vi Editor - АвÑ.ПÑ.: Linda Lamb
1886+ Ð.зЎаÑ.елÑ.: O'Reilly & Associates Inc.
1887+ ЭÑ.П Ñ.ПÑ.ПÑ.ая кМОга Ўля Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.зМаÑ.Ñ. все, Ñ.Ñ.П Ñ.ПлÑ.кП ЌПжМП пÑ.ПЎелÑ.ваÑ.Ñ. с
1888+ Vi. КесÑ.Пе ОзЎаМОе Ñ.акже вклÑ.Ñ.аеÑ. ОМÑ.ПÑ.ЌаÑ.ОÑ. П Vim.
1889+
1890+ ЭÑ.ПÑ. Ñ.Ñ.ебМОк бÑ.л МапОсаМ Michael C. Pierce О Robert K. Ware, Colorado School
1891+ of Mines с ОспПлÑ.зПваМОеЌ ОЎей, пÑ.еЎлПжеММÑ.Ñ. Charles Smith, Colorado State
1892+ University. E-mail: bware@mines.colorado.edu.
1893+
1894+ Ð.ПÑ.абПÑ.аМП Ўля Vim Bram Moolenaar.
1895+
1896+ Ð.еÑ.евПЎ: АМЎÑ.ей Ð.Оселев <a_kissel@eudoramail.com>, 2002.
1897+ Translator: Andrey Kiselev <a_kissel@eudoramail.com>, 2002.
1898+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1899diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim
1900--- vim70.orig/runtime/tutor/tutor.vim 2006-03-18 12:20:36.000000000 -0800
1901+++ vim70/runtime/tutor/tutor.vim 2006-09-11 09:26:16.000000000 -0700
1902@@ -1,6 +1,6 @@
1903 " Vim tutor support file
1904 " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
1905-" Last Change: 2006 Mar 18
1906+" Last Change: 2006 Sep 09
1907
1908 " This small source file is used for detecting if a translation of the
1909 " tutor file exist, i.e., a tutor.xx file, where xx is the language.
1910@@ -93,9 +93,16 @@
1911 endif
1912 endif
1913
1914-" The Greek tutor is available in two encodings, guess which one to use
1915-if s:ext =~? '\.gr' && &enc =~ 737
1916- let s:ext = ".gr.cp737"
1917+" The Greek tutor is available in three encodings, guess what to use.
1918+" We used ".gr" (Greece) instead of ".el" (Greek); accept both.
1919+if s:ext =~? '\.gr\|\.el'
1920+ if &enc == "iso-8859-7"
1921+ let s:ext = ".gr"
1922+ elseif &enc == "utf-8"
1923+ let s:ext = ".gr.utf-8"
1924+ elseif &enc =~ 737
1925+ let s:ext = ".gr.cp737"
1926+ endif
1927 endif
1928
1929 " The Slovak tutor is available in two encodings, guess which one to use
1930@@ -103,11 +110,15 @@
1931 let s:ext = ".sk.cp1250"
1932 endif
1933
1934-" The Russian tutor is available in two encodings, guess which one to use.
1935-" This segment is from the above lines and modified by
1936-" Alexey I. Froloff <raorn@altlinux.org> for Russian vim tutorial
1937-if s:ext =~? '\.ru' && &enc =~ 1251
1938- let s:ext = ".ru.cp1251"
1939+" The Russian tutor is available in three encodings, guess which one to use.
1940+if s:ext =~? '\.ru'
1941+ if &enc == 'utf-8'
1942+ let s:ext = '.ru.utf-8'
1943+ elseif &enc =~ '1251'
1944+ let s:ext = '.ru.cp1251'
1945+ elseif &enc =~ 'koi8'
1946+ let s:ext = '.ru'
1947+ endif
1948 endif
1949
1950 " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch).
1951diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure
1952--- vim70.orig/src/auto/configure 2006-05-04 03:46:19.000000000 -0700
1953+++ vim70/src/auto/configure 2006-09-11 09:02:36.000000000 -0700
1954@@ -4014,7 +4014,7 @@
1955 LDFLAGS=$ldflags_save
1956 if test $perl_ok = yes; then
1957 if test "X$perlcppflags" != "X"; then
1958- PERL_CFLAGS="$perlcppflags"
1959+ PERL_CFLAGS=`echo "$perlcppflags" | sed 's/-pipe //'`
1960 fi
1961 if test "X$perlldflags" != "X"; then
1962 LDFLAGS="$perlldflags $LDFLAGS"
1963diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c
1964--- vim70.orig/src/buffer.c 2006-04-26 14:37:23.000000000 -0700
1965+++ vim70/src/buffer.c 2006-09-11 09:04:57.000000000 -0700
1966@@ -434,12 +434,8 @@
1967 if (usingNetbeans)
1968 netbeans_file_closed(buf);
1969 #endif
1970-#ifdef FEAT_AUTOCHDIR
1971- /* Change directories when the acd option is set on. */
1972- if (p_acd && curbuf->b_ffname != NULL
1973- && vim_chdirfile(curbuf->b_ffname) == OK)
1974- shorten_fnames(TRUE);
1975-#endif
1976+ /* Change directories when the 'acd' option is set. */
1977+ DO_AUTOCHDIR
1978
1979 /*
1980 * Remove the buffer from the list.
1981@@ -1390,7 +1386,8 @@
1982 }
1983 else
1984 {
1985- need_fileinfo = TRUE; /* display file info after redraw */
1986+ if (!msg_silent)
1987+ need_fileinfo = TRUE; /* display file info after redraw */
1988 (void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */
1989 #ifdef FEAT_AUTOCMD
1990 curwin->w_topline = 1;
1991@@ -1422,12 +1419,8 @@
1992 netbeans_file_activated(curbuf);
1993 #endif
1994
1995-#ifdef FEAT_AUTOCHDIR
1996- /* Change directories when the acd option is set on. */
1997- if (p_acd && curbuf->b_ffname != NULL
1998- && vim_chdirfile(curbuf->b_ffname) == OK)
1999- shorten_fnames(TRUE);
2000-#endif
2001+ /* Change directories when the 'acd' option is set. */
2002+ DO_AUTOCHDIR
2003
2004 #ifdef FEAT_KEYMAP
2005 if (curbuf->b_kmap_state & KEYMAP_INIT)
2006@@ -1436,6 +1429,18 @@
2007 redraw_later(NOT_VALID);
2008 }
2009
2010+#if defined(FEAT_AUTOCHDIR) || defined(PROTO)
2011+/*
2012+ * Change to the directory of the current buffer.
2013+ */
2014+ void
2015+do_autochdir()
2016+{
2017+ if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK)
2018+ shorten_fnames(TRUE);
2019+}
2020+#endif
2021+
2022 /*
2023 * functions for dealing with the buffer list
2024 */
2025@@ -3324,7 +3329,7 @@
2026 {
2027 usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox);
2028 if (usefmt == NULL)
2029- usefmt = (char_u *)"";
2030+ usefmt = fmt;
2031 }
2032 #endif
2033
2034@@ -5420,11 +5425,7 @@
2035 buf_T *newbuf;
2036 int differ = TRUE;
2037 linenr_T lnum;
2038-#ifdef FEAT_AUTOCMD
2039 aco_save_T aco;
2040-#else
2041- buf_T *old_curbuf = curbuf;
2042-#endif
2043 exarg_T ea;
2044
2045 /* Allocate a buffer without putting it in the buffer list. */
2046@@ -5439,13 +5440,8 @@
2047 return TRUE;
2048 }
2049
2050-#ifdef FEAT_AUTOCMD
2051 /* set curwin/curbuf to buf and save a few things */
2052 aucmd_prepbuf(&aco, newbuf);
2053-#else
2054- curbuf = newbuf;
2055- curwin->w_buffer = newbuf;
2056-#endif
2057
2058 if (ml_open(curbuf) == OK
2059 && readfile(buf->b_ffname, buf->b_fname,
2060@@ -5466,13 +5462,8 @@
2061 }
2062 vim_free(ea.cmd);
2063
2064-#ifdef FEAT_AUTOCMD
2065 /* restore curwin/curbuf and a few other things */
2066 aucmd_restbuf(&aco);
2067-#else
2068- curbuf = old_curbuf;
2069- curwin->w_buffer = old_curbuf;
2070-#endif
2071
2072 if (curbuf != newbuf) /* safety check */
2073 wipe_buffer(newbuf, FALSE);
2074diff -Naur vim70.orig/src/configure vim70/src/configure
2075--- vim70.orig/src/configure 2006-05-07 07:17:49.000000000 -0700
2076+++ vim70/src/configure 2006-08-09 08:37:06.000000000 -0700
2077@@ -2,5 +2,9 @@
2078 # run the automatically generated configure script
2079 CONFIG_STATUS=auto/config.status \
2080 auto/configure "$@" --srcdir="${srcdir:-.}" --cache-file=auto/config.cache
2081+result=$?
2082+
2083 # Stupid autoconf 2.5x causes this file to be left behind.
2084 if test -f configure.lineno; then rm -f configure.lineno; fi
2085+
2086+exit $result
2087diff -Naur vim70.orig/src/configure.in vim70/src/configure.in
2088--- vim70.orig/src/configure.in 2006-05-04 03:46:11.000000000 -0700
2089+++ vim70/src/configure.in 2006-09-11 09:02:36.000000000 -0700
2090@@ -508,7 +508,8 @@
2091 LDFLAGS=$ldflags_save
2092 if test $perl_ok = yes; then
2093 if test "X$perlcppflags" != "X"; then
2094- PERL_CFLAGS="$perlcppflags"
2095+ dnl remove -pipe, it confuses cproto
2096+ PERL_CFLAGS=`echo "$perlcppflags" | sed 's/-pipe //'`
2097 fi
2098 if test "X$perlldflags" != "X"; then
2099 LDFLAGS="$perlldflags $LDFLAGS"
2100diff -Naur vim70.orig/src/edit.c vim70/src/edit.c
2101--- vim70.orig/src/edit.c 2006-05-07 04:48:51.000000000 -0700
2102+++ vim70/src/edit.c 2006-09-11 08:30:17.000000000 -0700
2103@@ -129,7 +129,7 @@
2104
2105 static void ins_ctrl_x __ARGS((void));
2106 static int has_compl_option __ARGS((int dict_opt));
2107-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));
2108+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));
2109 static int ins_compl_equal __ARGS((compl_T *match, char_u *str, int len));
2110 static void ins_compl_longest_match __ARGS((compl_T *match));
2111 static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase));
2112@@ -719,9 +719,14 @@
2113 #ifdef FEAT_INS_EXPAND
2114 /*
2115 * Special handling of keys while the popup menu is visible or wanted
2116- * and the cursor is still in the completed word.
2117+ * and the cursor is still in the completed word. Only when there is
2118+ * a match, skip this when no matches were found.
2119 */
2120- if (compl_started && pum_wanted() && curwin->w_cursor.col >= compl_col)
2121+ if (compl_started
2122+ && pum_wanted()
2123+ && curwin->w_cursor.col >= compl_col
2124+ && (compl_shown_match == NULL
2125+ || compl_shown_match != compl_shown_match->cp_next))
2126 {
2127 /* BS: Delete one character from "compl_leader". */
2128 if ((c == K_BS || c == Ctrl_H)
2129@@ -751,7 +756,7 @@
2130 continue;
2131 }
2132
2133- /* Pressing CTRL-Y selects the current match. Shen
2134+ /* Pressing CTRL-Y selects the current match. When
2135 * compl_enter_selects is set the Enter key does the same. */
2136 if (c == Ctrl_Y || (compl_enter_selects
2137 && (c == CAR || c == K_KENTER || c == NL)))
2138@@ -877,6 +882,7 @@
2139 /* Close the cmdline window. */
2140 cmdwin_result = K_IGNORE;
2141 got_int = FALSE; /* don't stop executing autocommands et al. */
2142+ nomove = TRUE;
2143 goto doESCkey;
2144 }
2145 #endif
2146@@ -2112,7 +2118,7 @@
2147 * maybe because alloc() returns NULL, then FAIL is returned.
2148 */
2149 static int
2150-ins_compl_add(str, len, icase, fname, cptext, cdir, flags, dup)
2151+ins_compl_add(str, len, icase, fname, cptext, cdir, flags, adup)
2152 char_u *str;
2153 int len;
2154 int icase;
2155@@ -2120,7 +2126,7 @@
2156 char_u **cptext; /* extra text for popup menu or NULL */
2157 int cdir;
2158 int flags;
2159- int dup; /* accept duplicate match */
2160+ int adup; /* accept duplicate match */
2161 {
2162 compl_T *match;
2163 int dir = (cdir == 0 ? compl_direction : cdir);
2164@@ -2134,7 +2140,7 @@
2165 /*
2166 * If the same match is already present, don't add it.
2167 */
2168- if (compl_first_match != NULL && !dup)
2169+ if (compl_first_match != NULL && !adup)
2170 {
2171 match = compl_first_match;
2172 do
2173@@ -2399,7 +2405,7 @@
2174 /* compl_pattern doesn't need to be set */
2175 compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
2176 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
2177- -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
2178+ -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
2179 return;
2180
2181 /* Handle like dictionary completion. */
2182@@ -2409,6 +2415,7 @@
2183 compl_matches = ins_compl_make_cyclic();
2184 compl_started = TRUE;
2185 compl_used_match = TRUE;
2186+ compl_cont_status = 0;
2187
2188 compl_curr_match = compl_first_match;
2189 ins_complete(Ctrl_N);
2190@@ -2753,6 +2760,7 @@
2191 }
2192 else
2193 # endif
2194+ if (count > 0) /* avoid warning for using "files" uninit */
2195 {
2196 ins_compl_files(count, files, thesaurus, flags,
2197 &regmatch, buf, &dir);
2198@@ -2813,7 +2821,7 @@
2199 ptr = find_word_end(ptr);
2200 add_r = ins_compl_add_infercase(regmatch->startp[0],
2201 (int)(ptr - regmatch->startp[0]),
2202- FALSE, files[i], *dir, 0);
2203+ p_ic, files[i], *dir, 0);
2204 if (thesaurus)
2205 {
2206 char_u *wstart;
2207@@ -2849,7 +2857,7 @@
2208 ptr = find_word_end(ptr);
2209 add_r = ins_compl_add_infercase(wstart,
2210 (int)(ptr - wstart),
2211- FALSE, files[i], *dir, 0);
2212+ p_ic, files[i], *dir, 0);
2213 }
2214 }
2215 if (add_r == OK)
2216@@ -3015,9 +3023,6 @@
2217 if ((int)(p - line) - (int)compl_col <= 0)
2218 return K_BS;
2219
2220- /* For redo we need to repeat this backspace. */
2221- AppendCharToRedobuff(K_BS);
2222-
2223 /* Deleted more than what was used to find matches or didn't finish
2224 * finding all matches: need to look for matches all over again. */
2225 if (curwin->w_cursor.col <= compl_col + compl_length
2226@@ -3046,7 +3051,6 @@
2227 ins_compl_delete();
2228 ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
2229 compl_used_match = FALSE;
2230- compl_enter_selects = FALSE;
2231
2232 if (compl_started)
2233 ins_compl_set_original_text(compl_leader);
2234@@ -3076,6 +3080,7 @@
2235 compl_restarting = FALSE;
2236 }
2237
2238+#if 0 /* disabled, made CTRL-L, BS and typing char jump to original text. */
2239 if (!compl_used_match)
2240 {
2241 /* Go to the original text, since none of the matches is inserted. */
2242@@ -3087,9 +3092,15 @@
2243 compl_curr_match = compl_shown_match;
2244 compl_shows_dir = compl_direction;
2245 }
2246+#endif
2247+ compl_enter_selects = !compl_used_match;
2248
2249 /* Show the popup menu with a different set of matches. */
2250 ins_compl_show_pum();
2251+
2252+ /* Don't let Enter select the original text when there is no popup menu. */
2253+ if (compl_match_array == NULL)
2254+ compl_enter_selects = FALSE;
2255 }
2256
2257 /*
2258@@ -3115,10 +3126,6 @@
2259 #endif
2260 ins_char(c);
2261
2262- /* For redo we need to count this character so that the number of
2263- * backspaces is correct. */
2264- AppendCharToRedobuff(c);
2265-
2266 /* If we didn't complete finding matches we must search again. */
2267 if (compl_was_interrupted)
2268 ins_compl_restart();
2269@@ -3175,10 +3182,32 @@
2270 char_u *p;
2271 int len = curwin->w_cursor.col - compl_col;
2272 int c;
2273+ compl_T *cp;
2274
2275 p = compl_shown_match->cp_str;
2276 if ((int)STRLEN(p) <= len) /* the match is too short */
2277- return;
2278+ {
2279+ /* When still at the original match use the first entry that matches
2280+ * the leader. */
2281+ if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
2282+ {
2283+ p = NULL;
2284+ for (cp = compl_shown_match->cp_next; cp != NULL
2285+ && cp != compl_first_match; cp = cp->cp_next)
2286+ {
2287+ if (ins_compl_equal(cp, compl_leader,
2288+ (int)STRLEN(compl_leader)))
2289+ {
2290+ p = cp->cp_str;
2291+ break;
2292+ }
2293+ }
2294+ if (p == NULL || (int)STRLEN(p) <= len)
2295+ return;
2296+ }
2297+ else
2298+ return;
2299+ }
2300 p += len;
2301 #ifdef FEAT_MBYTE
2302 c = mb_ptr2char(p);
2303@@ -3198,7 +3227,6 @@
2304 int c;
2305 {
2306 char_u *ptr;
2307- int temp;
2308 int want_cindent;
2309 int retval = FALSE;
2310
2311@@ -3354,6 +3382,7 @@
2312 if (compl_curr_match != NULL || compl_leader != NULL || c == Ctrl_E)
2313 {
2314 char_u *p;
2315+ int temp = 0;
2316
2317 /*
2318 * If any of the original typed text has been changed, eg when
2319@@ -3369,16 +3398,21 @@
2320 ptr = compl_leader;
2321 else
2322 ptr = compl_orig_text;
2323- p = compl_orig_text;
2324- for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp]; ++temp)
2325- ;
2326+ if (compl_orig_text != NULL)
2327+ {
2328+ p = compl_orig_text;
2329+ for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp];
2330+ ++temp)
2331+ ;
2332 #ifdef FEAT_MBYTE
2333- if (temp > 0)
2334- temp -= (*mb_head_off)(compl_orig_text, p + temp);
2335+ if (temp > 0)
2336+ temp -= (*mb_head_off)(compl_orig_text, p + temp);
2337 #endif
2338- for (p += temp; *p != NUL; mb_ptr_adv(p))
2339- AppendCharToRedobuff(K_BS);
2340- AppendToRedobuffLit(ptr + temp, -1);
2341+ for (p += temp; *p != NUL; mb_ptr_adv(p))
2342+ AppendCharToRedobuff(K_BS);
2343+ }
2344+ if (ptr != NULL)
2345+ AppendToRedobuffLit(ptr + temp, -1);
2346 }
2347
2348 #ifdef FEAT_CINDENT
2349@@ -3578,7 +3612,7 @@
2350 {
2351 char_u *word;
2352 int icase = FALSE;
2353- int dup = FALSE;
2354+ int adup = FALSE;
2355 char_u *(cptext[CPT_COUNT]);
2356
2357 if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
2358@@ -3595,7 +3629,7 @@
2359 if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
2360 icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
2361 if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
2362- dup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
2363+ adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
2364 }
2365 else
2366 {
2367@@ -3604,7 +3638,7 @@
2368 }
2369 if (word == NULL || *word == NUL)
2370 return FAIL;
2371- return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, dup);
2372+ return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup);
2373 }
2374 #endif
2375
2376@@ -3796,7 +3830,7 @@
2377 TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
2378 TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
2379 {
2380- ins_compl_add_matches(num_matches, matches, FALSE);
2381+ ins_compl_add_matches(num_matches, matches, p_ic);
2382 }
2383 p_ic = save_p_ic;
2384 break;
2385@@ -3837,7 +3871,7 @@
2386 num_matches = expand_spelling(first_match_pos.lnum,
2387 first_match_pos.col, compl_pattern, &matches);
2388 if (num_matches > 0)
2389- ins_compl_add_matches(num_matches, matches, FALSE);
2390+ ins_compl_add_matches(num_matches, matches, p_ic);
2391 #endif
2392 break;
2393
2394@@ -3971,7 +4005,7 @@
2395 continue;
2396 }
2397 }
2398- if (ins_compl_add_infercase(ptr, len, FALSE,
2399+ if (ins_compl_add_infercase(ptr, len, p_ic,
2400 ins_buf == curbuf ? NULL : ins_buf->b_sfname,
2401 0, flags) != NOTDONE)
2402 {
2403@@ -4100,6 +4134,21 @@
2404 && compl_shown_match->cp_next != NULL
2405 && compl_shown_match->cp_next != compl_first_match)
2406 compl_shown_match = compl_shown_match->cp_next;
2407+
2408+ /* If we didn't find it searching forward, and compl_shows_dir is
2409+ * backward, find the last match. */
2410+ if (compl_shows_dir == BACKWARD
2411+ && !ins_compl_equal(compl_shown_match,
2412+ compl_leader, (int)STRLEN(compl_leader))
2413+ && (compl_shown_match->cp_next == NULL
2414+ || compl_shown_match->cp_next == compl_first_match))
2415+ {
2416+ while (!ins_compl_equal(compl_shown_match,
2417+ compl_leader, (int)STRLEN(compl_leader))
2418+ && compl_shown_match->cp_prev != NULL
2419+ && compl_shown_match->cp_prev != compl_first_match)
2420+ compl_shown_match = compl_shown_match->cp_prev;
2421+ }
2422 }
2423
2424 if (allow_get_expansion && insert_match
2425@@ -4124,8 +4173,6 @@
2426 {
2427 if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL)
2428 {
2429- if (compl_pending != 0)
2430- --compl_pending;
2431 compl_shown_match = compl_shown_match->cp_next;
2432 found_end = (compl_first_match != NULL
2433 && (compl_shown_match->cp_next == compl_first_match
2434@@ -4134,14 +4181,24 @@
2435 else if (compl_shows_dir == BACKWARD
2436 && compl_shown_match->cp_prev != NULL)
2437 {
2438- if (compl_pending != 0)
2439- ++compl_pending;
2440 found_end = (compl_shown_match == compl_first_match);
2441 compl_shown_match = compl_shown_match->cp_prev;
2442 found_end |= (compl_shown_match == compl_first_match);
2443 }
2444 else
2445 {
2446+ if (!allow_get_expansion)
2447+ {
2448+ if (advance)
2449+ {
2450+ if (compl_shows_dir == BACKWARD)
2451+ compl_pending -= todo + 1;
2452+ else
2453+ compl_pending += todo + 1;
2454+ }
2455+ return -1;
2456+ }
2457+
2458 if (advance)
2459 {
2460 if (compl_shows_dir == BACKWARD)
2461@@ -4149,14 +4206,27 @@
2462 else
2463 ++compl_pending;
2464 }
2465- if (!allow_get_expansion)
2466- return -1;
2467
2468 /* Find matches. */
2469 num_matches = ins_compl_get_exp(&compl_startpos);
2470- if (compl_pending != 0 && compl_direction == compl_shows_dir
2471+
2472+ /* handle any pending completions */
2473+ while (compl_pending != 0 && compl_direction == compl_shows_dir
2474 && advance)
2475- compl_shown_match = compl_curr_match;
2476+ {
2477+ if (compl_pending > 0 && compl_shown_match->cp_next != NULL)
2478+ {
2479+ compl_shown_match = compl_shown_match->cp_next;
2480+ --compl_pending;
2481+ }
2482+ if (compl_pending < 0 && compl_shown_match->cp_prev != NULL)
2483+ {
2484+ compl_shown_match = compl_shown_match->cp_prev;
2485+ ++compl_pending;
2486+ }
2487+ else
2488+ break;
2489+ }
2490 found_end = FALSE;
2491 }
2492 if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
2493@@ -4265,9 +4335,9 @@
2494 return;
2495 count = 0;
2496
2497- ++no_mapping;
2498+ /* Check for a typed key. Do use mappings, otherwise vim_is_ctrl_x_key()
2499+ * can't do its work correctly. */
2500 c = vpeekc_any();
2501- --no_mapping;
2502 if (c != NUL)
2503 {
2504 if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R)
2505@@ -4277,12 +4347,27 @@
2506 (void)ins_compl_next(FALSE, ins_compl_key2count(c),
2507 c != K_UP && c != K_DOWN);
2508 }
2509- else if (c != Ctrl_R)
2510- compl_interrupted = TRUE;
2511+ else
2512+ {
2513+ /* Need to get the character to have KeyTyped set. We'll put it
2514+ * back with vungetc() below. */
2515+ c = safe_vgetc();
2516+
2517+ /* Don't interrupt completion when the character wasn't typed,
2518+ * e.g., when doing @q to replay keys. */
2519+ if (c != Ctrl_R && KeyTyped)
2520+ compl_interrupted = TRUE;
2521+
2522+ vungetc(c);
2523+ }
2524 }
2525 if (compl_pending != 0 && !got_int)
2526- (void)ins_compl_next(FALSE, compl_pending > 0
2527- ? compl_pending : -compl_pending, TRUE);
2528+ {
2529+ int todo = compl_pending > 0 ? compl_pending : -compl_pending;
2530+
2531+ compl_pending = 0;
2532+ (void)ins_compl_next(FALSE, todo, TRUE);
2533+ }
2534 }
2535
2536 /*
2537@@ -4611,10 +4696,12 @@
2538 (int)STRLEN(compl_pattern), curs_col);
2539 if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL
2540 || compl_xp.xp_context == EXPAND_NOTHING)
2541- return FAIL;
2542- startcol = (int)(compl_xp.xp_pattern - compl_pattern);
2543- compl_col = startcol;
2544- compl_length = curs_col - startcol;
2545+ /* No completion possible, use an empty pattern to get a
2546+ * "pattern not found" message. */
2547+ compl_col = curs_col;
2548+ else
2549+ compl_col = (int)(compl_xp.xp_pattern - compl_pattern);
2550+ compl_length = curs_col - compl_col;
2551 }
2552 else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
2553 {
2554@@ -4668,11 +4755,17 @@
2555 else
2556 compl_col = spell_word_start(startcol);
2557 if (compl_col >= (colnr_T)startcol)
2558- return FAIL;
2559- spell_expand_check_cap(compl_col);
2560+ {
2561+ compl_length = 0;
2562+ compl_col = curs_col;
2563+ }
2564+ else
2565+ {
2566+ spell_expand_check_cap(compl_col);
2567+ compl_length = (int)curs_col - compl_col;
2568+ }
2569 /* Need to obtain "line" again, it may have become invalid. */
2570 line = ml_get(curwin->w_cursor.lnum);
2571- compl_length = (int)curs_col - compl_col;
2572 compl_pattern = vim_strnsave(line + compl_col, compl_length);
2573 if (compl_pattern == NULL)
2574 #endif
2575@@ -4720,7 +4813,7 @@
2576 vim_free(compl_orig_text);
2577 compl_orig_text = vim_strnsave(line + compl_col, compl_length);
2578 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
2579- -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
2580+ -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
2581 {
2582 vim_free(compl_pattern);
2583 compl_pattern = NULL;
2584@@ -8508,7 +8601,12 @@
2585 tpos = curwin->w_cursor;
2586 if (oneleft() == OK)
2587 {
2588- start_arrow(&tpos);
2589+#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
2590+ /* Only call start_arrow() when not busy with preediting, it will
2591+ * break undo. K_LEFT is inserted in im_correct_cursor(). */
2592+ if (!im_is_preediting())
2593+#endif
2594+ start_arrow(&tpos);
2595 #ifdef FEAT_RIGHTLEFT
2596 /* If exit reversed string, position is fixed */
2597 if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol)
2598diff -Naur vim70.orig/src/eval.c vim70/src/eval.c
2599--- vim70.orig/src/eval.c 2006-05-05 10:15:26.000000000 -0700
2600+++ vim70/src/eval.c 2006-09-11 09:04:12.000000000 -0700
2601@@ -454,7 +454,7 @@
2602 static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
2603 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));
2604 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));
2605-static void emsg_funcname __ARGS((char *msg, char_u *name));
2606+static void emsg_funcname __ARGS((char *ermsg, char_u *name));
2607
2608 static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
2609 static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
2610@@ -701,6 +701,7 @@
2611 static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string));
2612 static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
2613 static int var_check_ro __ARGS((int flags, char_u *name));
2614+static int var_check_fixed __ARGS((int flags, char_u *name));
2615 static int tv_check_lock __ARGS((int lock, char_u *name));
2616 static void copy_tv __ARGS((typval_T *from, typval_T *to));
2617 static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID));
2618@@ -2260,7 +2261,7 @@
2619 EMSG(_(e_letunexp));
2620 else
2621 {
2622- char_u *tofree = NULL;
2623+ char_u *ptofree = NULL;
2624 char_u *s;
2625
2626 p = get_tv_string_chk(tv);
2627@@ -2269,7 +2270,7 @@
2628 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
2629 if (s != NULL)
2630 {
2631- p = tofree = concat_str(s, p);
2632+ p = ptofree = concat_str(s, p);
2633 vim_free(s);
2634 }
2635 }
2636@@ -2278,7 +2279,7 @@
2637 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
2638 arg_end = arg + 1;
2639 }
2640- vim_free(tofree);
2641+ vim_free(ptofree);
2642 }
2643 }
2644
2645@@ -3364,6 +3365,8 @@
2646 hi = hash_find(ht, varname);
2647 if (!HASHITEM_EMPTY(hi))
2648 {
2649+ if (var_check_fixed(HI2DI(hi)->di_flags, name))
2650+ return FAIL;
2651 if (var_check_ro(HI2DI(hi)->di_flags, name))
2652 return FAIL;
2653 delete_var(ht, hi);
2654@@ -6059,6 +6062,10 @@
2655 tabpage_T *tp;
2656 #endif
2657
2658+ /* Only do this once. */
2659+ want_garbage_collect = FALSE;
2660+ may_garbage_collect = FALSE;
2661+
2662 /*
2663 * 1. Go through all accessible variables and mark all lists and dicts
2664 * with copyID.
2665@@ -7595,8 +7602,8 @@
2666 * Give an error message with a function name. Handle <SNR> things.
2667 */
2668 static void
2669-emsg_funcname(msg, name)
2670- char *msg;
2671+emsg_funcname(ermsg, name)
2672+ char *ermsg;
2673 char_u *name;
2674 {
2675 char_u *p;
2676@@ -7605,7 +7612,7 @@
2677 p = concat_str((char_u *)"<SNR>", name + 3);
2678 else
2679 p = name;
2680- EMSG2(_(msg), p);
2681+ EMSG2(_(ermsg), p);
2682 if (p != name)
2683 vim_free(p);
2684 }
2685@@ -8252,6 +8259,12 @@
2686 EMSG(_("E785: complete() can only be used in Insert mode"));
2687 return;
2688 }
2689+
2690+ /* Check for undo allowed here, because if something was already inserted
2691+ * the line was already saved for undo and this check isn't done. */
2692+ if (!undo_allowed())
2693+ return;
2694+
2695 if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL)
2696 {
2697 EMSG(_(e_invarg));
2698@@ -9173,25 +9186,25 @@
2699 typval_T save_key;
2700 int rem;
2701 int todo;
2702- char_u *msg = map ? (char_u *)"map()" : (char_u *)"filter()";
2703+ char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()";
2704 int save_did_emsg;
2705
2706 rettv->vval.v_number = 0;
2707 if (argvars[0].v_type == VAR_LIST)
2708 {
2709 if ((l = argvars[0].vval.v_list) == NULL
2710- || (map && tv_check_lock(l->lv_lock, msg)))
2711+ || (map && tv_check_lock(l->lv_lock, ermsg)))
2712 return;
2713 }
2714 else if (argvars[0].v_type == VAR_DICT)
2715 {
2716 if ((d = argvars[0].vval.v_dict) == NULL
2717- || (map && tv_check_lock(d->dv_lock, msg)))
2718+ || (map && tv_check_lock(d->dv_lock, ermsg)))
2719 return;
2720 }
2721 else
2722 {
2723- EMSG2(_(e_listdictarg), msg);
2724+ EMSG2(_(e_listdictarg), ermsg);
2725 return;
2726 }
2727
2728@@ -9223,7 +9236,7 @@
2729 {
2730 --todo;
2731 di = HI2DI(hi);
2732- if (tv_check_lock(di->di_tv.v_lock, msg))
2733+ if (tv_check_lock(di->di_tv.v_lock, ermsg))
2734 break;
2735 vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
2736 if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
2737@@ -9242,7 +9255,7 @@
2738 {
2739 for (li = l->lv_first; li != NULL; li = nli)
2740 {
2741- if (tv_check_lock(li->li_tv.v_lock, msg))
2742+ if (tv_check_lock(li->li_tv.v_lock, ermsg))
2743 break;
2744 nli = li->li_next;
2745 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
2746@@ -9598,7 +9611,9 @@
2747 typval_T *argvars;
2748 typval_T *rettv;
2749 {
2750- garbage_collect();
2751+ /* This is postponed until we are back at the toplevel, because we may be
2752+ * using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". */
2753+ want_garbage_collect = TRUE;
2754 }
2755
2756 /*
2757@@ -9792,6 +9807,9 @@
2758 varnumber_T n;
2759 int error = FALSE;
2760
2761+ /* Position the cursor. Needed after a message that ends in a space. */
2762+ windgoto(msg_row, msg_col);
2763+
2764 ++no_mapping;
2765 ++allow_keys;
2766 if (argvars[0].v_type == VAR_UNKNOWN)
2767@@ -11312,14 +11330,19 @@
2768
2769 static int inputsecret_flag = 0;
2770
2771+static void get_user_input __ARGS((typval_T *argvars, typval_T *rettv, int inputdialog));
2772+
2773 /*
2774- * "input()" function
2775- * Also handles inputsecret() when inputsecret is set.
2776+ * This function is used by f_input() and f_inputdialog() functions. The third
2777+ * argument to f_input() specifies the type of completion to use at the
2778+ * prompt. The third argument to f_inputdialog() specifies the value to return
2779+ * when the user cancels the prompt.
2780 */
2781 static void
2782-f_input(argvars, rettv)
2783+get_user_input(argvars, rettv, inputdialog)
2784 typval_T *argvars;
2785 typval_T *rettv;
2786+ int inputdialog;
2787 {
2788 char_u *prompt = get_tv_string_chk(&argvars[0]);
2789 char_u *p = NULL;
2790@@ -11369,10 +11392,10 @@
2791 if (defstr != NULL)
2792 stuffReadbuffSpec(defstr);
2793
2794- if (argvars[2].v_type != VAR_UNKNOWN)
2795+ if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN)
2796 {
2797 char_u *xp_name;
2798- int xp_namelen;
2799+ int xp_namelen;
2800 long argt;
2801
2802 rettv->vval.v_string = NULL;
2803@@ -11404,6 +11427,18 @@
2804 }
2805
2806 /*
2807+ * "input()" function
2808+ * Also handles inputsecret() when inputsecret is set.
2809+ */
2810+ static void
2811+f_input(argvars, rettv)
2812+ typval_T *argvars;
2813+ typval_T *rettv;
2814+{
2815+ get_user_input(argvars, rettv, FALSE);
2816+}
2817+
2818+/*
2819 * "inputdialog()" function
2820 */
2821 static void
2822@@ -11443,7 +11478,7 @@
2823 }
2824 else
2825 #endif
2826- f_input(argvars, rettv);
2827+ get_user_input(argvars, rettv, TRUE);
2828 }
2829
2830 /*
2831@@ -11471,6 +11506,7 @@
2832 }
2833
2834 msg_start();
2835+ msg_row = Rows - 1; /* for when 'cmdheight' > 1 */
2836 lines_left = Rows; /* avoid more prompt */
2837 msg_scroll = TRUE;
2838 msg_clr_eos();
2839@@ -13250,7 +13286,7 @@
2840 if (argvars[2].v_type != VAR_UNKNOWN)
2841 EMSG2(_(e_toomanyarg), "remove()");
2842 else if ((d = argvars[0].vval.v_dict) != NULL
2843- && !tv_check_lock(d->dv_lock, (char_u *)"remove()"))
2844+ && !tv_check_lock(d->dv_lock, (char_u *)"remove() argument"))
2845 {
2846 key = get_tv_string_chk(&argvars[1]);
2847 if (key != NULL)
2848@@ -13270,7 +13306,7 @@
2849 else if (argvars[0].v_type != VAR_LIST)
2850 EMSG2(_(e_listdictarg), "remove()");
2851 else if ((l = argvars[0].vval.v_list) != NULL
2852- && !tv_check_lock(l->lv_lock, (char_u *)"remove()"))
2853+ && !tv_check_lock(l->lv_lock, (char_u *)"remove() argument"))
2854 {
2855 int error = FALSE;
2856
2857@@ -14157,11 +14193,7 @@
2858 typval_T *rettv;
2859 {
2860 buf_T *buf;
2861-#ifdef FEAT_AUTOCMD
2862 aco_save_T aco;
2863-#else
2864- buf_T *save_curbuf;
2865-#endif
2866 char_u *varname, *bufvarname;
2867 typval_T *varp;
2868 char_u nbuf[NUMBUFLEN];
2869@@ -14178,12 +14210,7 @@
2870 if (buf != NULL && varname != NULL && varp != NULL)
2871 {
2872 /* set curbuf to be our buf, temporarily */
2873-#ifdef FEAT_AUTOCMD
2874 aucmd_prepbuf(&aco, buf);
2875-#else
2876- save_curbuf = curbuf;
2877- curbuf = buf;
2878-#endif
2879
2880 if (*varname == '&')
2881 {
2882@@ -14210,11 +14237,7 @@
2883 }
2884
2885 /* reset notion of buffer */
2886-#ifdef FEAT_AUTOCMD
2887 aucmd_restbuf(&aco);
2888-#else
2889- curbuf = save_curbuf;
2890-#endif
2891 }
2892 }
2893
2894@@ -16173,7 +16196,7 @@
2895 curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
2896 curwin->w_set_curswant = FALSE;
2897
2898- curwin->w_topline = get_dict_number(dict, (char_u *)"topline");
2899+ set_topline(curwin, get_dict_number(dict, (char_u *)"topline"));
2900 #ifdef FEAT_DIFF
2901 curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill");
2902 #endif
2903@@ -16218,6 +16241,7 @@
2904 #ifdef FEAT_VIRTUALEDIT
2905 dict_add_nr_str(dict, "coladd", (long)curwin->w_cursor.coladd, NULL);
2906 #endif
2907+ update_curswant();
2908 dict_add_nr_str(dict, "curswant", (long)curwin->w_curswant, NULL);
2909
2910 dict_add_nr_str(dict, "topline", (long)curwin->w_topline, NULL);
2911@@ -16438,9 +16462,12 @@
2912 long i = 0;
2913 long n;
2914
2915- /* List must be: [fnum, lnum, col, coladd] */
2916- if (arg->v_type != VAR_LIST || l == NULL
2917- || l->lv_len != (fnump == NULL ? 3 : 4))
2918+ /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there
2919+ * when "fnump" isn't NULL and "coladd" is optional. */
2920+ if (arg->v_type != VAR_LIST
2921+ || l == NULL
2922+ || l->lv_len < (fnump == NULL ? 2 : 3)
2923+ || l->lv_len > (fnump == NULL ? 3 : 4))
2924 return FAIL;
2925
2926 if (fnump != NULL)
2927@@ -16466,8 +16493,9 @@
2928 #ifdef FEAT_VIRTUALEDIT
2929 n = list_find_nr(l, i, NULL);
2930 if (n < 0)
2931- return FAIL;
2932- posp->coladd = n;
2933+ posp->coladd = 0;
2934+ else
2935+ posp->coladd = n;
2936 #endif
2937
2938 return OK;
2939@@ -17759,6 +17787,13 @@
2940 }
2941 else /* add a new variable */
2942 {
2943+ /* Can't add "v:" variable. */
2944+ if (ht == &vimvarht)
2945+ {
2946+ EMSG2(_(e_illvar), name);
2947+ return;
2948+ }
2949+
2950 /* Make sure the variable name is valid. */
2951 for (p = varname; *p != NUL; ++p)
2952 if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
2953@@ -17792,7 +17827,7 @@
2954 }
2955
2956 /*
2957- * Return TRUE if di_flags "flags" indicate read-only variable "name".
2958+ * Return TRUE if di_flags "flags" indicates variable "name" is read-only.
2959 * Also give an error message.
2960 */
2961 static int
2962@@ -17814,6 +17849,23 @@
2963 }
2964
2965 /*
2966+ * Return TRUE if di_flags "flags" indicates variable "name" is fixed.
2967+ * Also give an error message.
2968+ */
2969+ static int
2970+var_check_fixed(flags, name)
2971+ int flags;
2972+ char_u *name;
2973+{
2974+ if (flags & DI_FLAGS_FIX)
2975+ {
2976+ EMSG2(_("E795: Cannot delete variable %s"), name);
2977+ return TRUE;
2978+ }
2979+ return FALSE;
2980+}
2981+
2982+/*
2983 * Return TRUE if typeval "tv" is set to be locked (immutable).
2984 * Also give an error message, using "name".
2985 */
2986@@ -18786,6 +18838,7 @@
2987 if (dict_add(fudi.fd_dict, fudi.fd_di) == FAIL)
2988 {
2989 vim_free(fudi.fd_di);
2990+ vim_free(fp);
2991 goto erret;
2992 }
2993 }
2994@@ -18963,7 +19016,8 @@
2995 else if (lead > 0)
2996 {
2997 lead = 3;
2998- if (eval_fname_sid(lv.ll_exp_name != NULL ? lv.ll_exp_name : *pp))
2999+ if ((lv.ll_exp_name != NULL && eval_fname_sid(lv.ll_exp_name))
3000+ || eval_fname_sid(*pp))
3001 {
3002 /* It's "s:" or "<SID>" */
3003 if (current_SID <= 0)
3004@@ -19685,6 +19739,7 @@
3005 v->di_tv.vval.v_list = &fc.l_varlist;
3006 vim_memset(&fc.l_varlist, 0, sizeof(list_T));
3007 fc.l_varlist.lv_refcount = 99999;
3008+ fc.l_varlist.lv_lock = VAR_FIXED;
3009
3010 /*
3011 * Set a:firstline to "firstline" and a:lastline to "lastline".
3012@@ -19761,7 +19816,7 @@
3013 if (p_verbose >= 14)
3014 {
3015 char_u buf[MSG_BUF_LEN];
3016- char_u numbuf[NUMBUFLEN];
3017+ char_u numbuf2[NUMBUFLEN];
3018 char_u *tofree;
3019
3020 msg_puts((char_u *)"(");
3021@@ -19773,8 +19828,8 @@
3022 msg_outnum((long)argvars[i].vval.v_number);
3023 else
3024 {
3025- trunc_string(tv2string(&argvars[i], &tofree, numbuf, 0),
3026- buf, MSG_BUF_CLEN);
3027+ trunc_string(tv2string(&argvars[i], &tofree,
3028+ numbuf2, 0), buf, MSG_BUF_CLEN);
3029 msg_puts(buf);
3030 vim_free(tofree);
3031 }
3032@@ -19852,13 +19907,13 @@
3033 else
3034 {
3035 char_u buf[MSG_BUF_LEN];
3036- char_u numbuf[NUMBUFLEN];
3037+ char_u numbuf2[NUMBUFLEN];
3038 char_u *tofree;
3039
3040 /* The value may be very long. Skip the middle part, so that we
3041 * have some idea how it starts and ends. smsg() would always
3042 * truncate it at the end. */
3043- trunc_string(tv2string(fc.rettv, &tofree, numbuf, 0),
3044+ trunc_string(tv2string(fc.rettv, &tofree, numbuf2, 0),
3045 buf, MSG_BUF_CLEN);
3046 smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
3047 vim_free(tofree);
3048diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c
3049--- vim70.orig/src/ex_cmds2.c 2006-04-17 03:19:07.000000000 -0700
3050+++ vim70/src/ex_cmds2.c 2006-09-11 08:23:15.000000000 -0700
3051@@ -3648,13 +3648,13 @@
3052 * Return FALSE when not sourcing a file.
3053 */
3054 int
3055-source_finished(getline, cookie)
3056- char_u *(*getline) __ARGS((int, void *, int));
3057+source_finished(fgetline, cookie)
3058+ char_u *(*fgetline) __ARGS((int, void *, int));
3059 void *cookie;
3060 {
3061- return (getline_equal(getline, cookie, getsourceline)
3062+ return (getline_equal(fgetline, cookie, getsourceline)
3063 && ((struct source_cookie *)getline_cookie(
3064- getline, cookie))->finished);
3065+ fgetline, cookie))->finished);
3066 }
3067 #endif
3068
3069diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c
3070--- vim70.orig/src/ex_cmds.c 2006-04-22 11:56:56.000000000 -0700
3071+++ vim70/src/ex_cmds.c 2006-09-11 09:03:01.000000000 -0700
3072@@ -95,7 +95,10 @@
3073 _("<%s>%s%s %d, Hex %02x, Octal %03o"),
3074 transchar(c), buf1, buf2, c, c, c);
3075 #ifdef FEAT_MBYTE
3076- c = cc[ci++];
3077+ if (enc_utf8)
3078+ c = cc[ci++];
3079+ else
3080+ c = 0;
3081 #endif
3082 }
3083
3084@@ -108,7 +111,7 @@
3085 if (len > 0)
3086 IObuff[len++] = ' ';
3087 IObuff[len++] = '<';
3088- if (utf_iscomposing(c)
3089+ if (enc_utf8 && utf_iscomposing(c)
3090 # ifdef USE_GUI
3091 && !gui.in_use
3092 # endif
3093@@ -120,7 +123,10 @@
3094 : _("> %d, Hex %08x, Octal %o"), c, c, c);
3095 if (ci == MAX_MCO)
3096 break;
3097- c = cc[ci++];
3098+ if (enc_utf8)
3099+ c = cc[ci++];
3100+ else
3101+ c = 0;
3102 }
3103 #endif
3104
3105@@ -185,6 +191,7 @@
3106 new_indent = indent;
3107 else
3108 {
3109+ has_tab = FALSE; /* avoid uninit warnings */
3110 len = linelen(eap->cmdidx == CMD_right ? &has_tab
3111 : NULL) - get_indent();
3112
3113@@ -1772,10 +1779,9 @@
3114 ? (st_old.st_mode & 0020)
3115 : (st_old.st_mode & 0002))))
3116 {
3117- int tt;
3118+ int tt = msg_didany;
3119
3120 /* avoid a wait_return for this message, it's annoying */
3121- tt = msg_didany;
3122 EMSG2(_("E137: Viminfo file is not writable: %s"), fname);
3123 msg_didany = tt;
3124 fclose(fp_in);
3125@@ -2458,6 +2464,8 @@
3126 #ifdef FEAT_AUTOCMD
3127 apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
3128 #endif
3129+ /* Change directories when the 'acd' option is set. */
3130+ DO_AUTOCHDIR
3131 }
3132 /* print full file name if :cd used */
3133 fileinfo(FALSE, FALSE, eap->forceit);
3134@@ -2675,8 +2683,13 @@
3135 eap, eap->append, eap->forceit, TRUE, FALSE);
3136
3137 /* After ":saveas fname" reset 'readonly'. */
3138- if (eap->cmdidx == CMD_saveas && retval == OK)
3139- curbuf->b_p_ro = FALSE;
3140+ if (eap->cmdidx == CMD_saveas)
3141+ {
3142+ if (retval == OK)
3143+ curbuf->b_p_ro = FALSE;
3144+ /* Change directories when the 'acd' option is set. */
3145+ DO_AUTOCHDIR
3146+ }
3147 }
3148
3149 theend:
3150@@ -3547,11 +3560,9 @@
3151 foldUpdateAll(curwin);
3152 #endif
3153
3154-#ifdef FEAT_AUTOCHDIR
3155- if (p_acd && curbuf->b_ffname != NULL
3156- && vim_chdirfile(curbuf->b_ffname) == OK)
3157- shorten_fnames(TRUE);
3158-#endif
3159+ /* Change directories when the 'acd' option is set. */
3160+ DO_AUTOCHDIR
3161+
3162 /*
3163 * Careful: open_buffer() and apply_autocmds() may change the current
3164 * buffer and window.
3165@@ -3718,12 +3729,8 @@
3166 if (p_im)
3167 need_start_insertmode = TRUE;
3168
3169-#ifdef FEAT_AUTOCHDIR
3170- /* Change directories when the acd option is set on. */
3171- if (p_acd && curbuf->b_ffname != NULL
3172- && vim_chdirfile(curbuf->b_ffname) == OK)
3173- shorten_fnames(TRUE);
3174-#endif
3175+ /* Change directories when the 'acd' option is set. */
3176+ DO_AUTOCHDIR
3177
3178 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
3179 if (gui.in_use && curbuf->b_ffname != NULL)
3180diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h
3181--- vim70.orig/src/ex_cmds.h 2006-04-07 02:44:46.000000000 -0700
3182+++ vim70/src/ex_cmds.h 2006-07-14 08:51:21.000000000 -0700
3183@@ -262,7 +262,7 @@
3184 EX(CMD_comclear, "comclear", ex_comclear,
3185 TRLBAR|CMDWIN),
3186 EX(CMD_compiler, "compiler", ex_compiler,
3187- BANG|TRLBAR|WORD1),
3188+ BANG|TRLBAR|WORD1|CMDWIN),
3189 EX(CMD_continue, "continue", ex_continue,
3190 TRLBAR|SBOXOK|CMDWIN),
3191 EX(CMD_confirm, "confirm", ex_wrongmodifier,
3192diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c
3193--- vim70.orig/src/ex_docmd.c 2006-05-05 09:33:19.000000000 -0700
3194+++ vim70/src/ex_docmd.c 2006-09-11 09:27:48.000000000 -0700
3195@@ -58,9 +58,9 @@
3196 #endif
3197
3198 #ifdef FEAT_EVAL
3199-static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*getline)(int, void *, int), void *cookie));
3200+static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie));
3201 #else
3202-static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*getline)(int, void *, int), void *cookie));
3203+static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie));
3204 static int if_level = 0; /* depth in :if */
3205 #endif
3206 static char_u *find_command __ARGS((exarg_T *eap, int *full));
3207@@ -831,10 +831,13 @@
3208
3209 /*
3210 * If requested, store and reset the global values controlling the
3211- * exception handling (used when debugging).
3212+ * exception handling (used when debugging). Otherwise clear it to avoid
3213+ * a bogus compiler warning when the optimizer uses inline functions...
3214 */
3215- else if (flags & DOCMD_EXCRESET)
3216+ if (flags & DOCMD_EXCRESET)
3217 save_dbg_stuff(&debug_saved);
3218+ else
3219+ memset(&debug_saved, 0, 1);
3220
3221 initial_trylevel = trylevel;
3222
3223@@ -1574,24 +1577,24 @@
3224 #endif
3225
3226 /*
3227- * If "getline" is get_loop_line(), return TRUE if the getline it uses equals
3228- * "func". * Otherwise return TRUE when "getline" equals "func".
3229+ * If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals
3230+ * "func". * Otherwise return TRUE when "fgetline" equals "func".
3231 */
3232 /*ARGSUSED*/
3233 int
3234-getline_equal(getline, cookie, func)
3235- char_u *(*getline) __ARGS((int, void *, int));
3236- void *cookie; /* argument for getline() */
3237+getline_equal(fgetline, cookie, func)
3238+ char_u *(*fgetline) __ARGS((int, void *, int));
3239+ void *cookie; /* argument for fgetline() */
3240 char_u *(*func) __ARGS((int, void *, int));
3241 {
3242 #ifdef FEAT_EVAL
3243 char_u *(*gp) __ARGS((int, void *, int));
3244 struct loop_cookie *cp;
3245
3246- /* When "getline" is "get_loop_line()" use the "cookie" to find the
3247+ /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
3248 * function that's orignally used to obtain the lines. This may be nested
3249 * several levels. */
3250- gp = getline;
3251+ gp = fgetline;
3252 cp = (struct loop_cookie *)cookie;
3253 while (gp == get_loop_line)
3254 {
3255@@ -1600,29 +1603,29 @@
3256 }
3257 return gp == func;
3258 #else
3259- return getline == func;
3260+ return fgetline == func;
3261 #endif
3262 }
3263
3264 #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO)
3265 /*
3266- * If "getline" is get_loop_line(), return the cookie used by the original
3267+ * If "fgetline" is get_loop_line(), return the cookie used by the original
3268 * getline function. Otherwise return "cookie".
3269 */
3270 /*ARGSUSED*/
3271 void *
3272-getline_cookie(getline, cookie)
3273- char_u *(*getline) __ARGS((int, void *, int));
3274- void *cookie; /* argument for getline() */
3275+getline_cookie(fgetline, cookie)
3276+ char_u *(*fgetline) __ARGS((int, void *, int));
3277+ void *cookie; /* argument for fgetline() */
3278 {
3279 # ifdef FEAT_EVAL
3280 char_u *(*gp) __ARGS((int, void *, int));
3281 struct loop_cookie *cp;
3282
3283- /* When "getline" is "get_loop_line()" use the "cookie" to find the
3284+ /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
3285 * cookie that's orignally used to obtain the lines. This may be nested
3286 * several levels. */
3287- gp = getline;
3288+ gp = fgetline;
3289 cp = (struct loop_cookie *)cookie;
3290 while (gp == get_loop_line)
3291 {
3292@@ -1648,7 +1651,7 @@
3293 * 5. parse arguments
3294 * 6. switch on command name
3295 *
3296- * Note: "getline" can be NULL.
3297+ * Note: "fgetline" can be NULL.
3298 *
3299 * This function may be called recursively!
3300 */
3301@@ -1663,14 +1666,14 @@
3302 #ifdef FEAT_EVAL
3303 cstack,
3304 #endif
3305- getline, cookie)
3306+ fgetline, cookie)
3307 char_u **cmdlinep;
3308 int sourcing;
3309 #ifdef FEAT_EVAL
3310 struct condstack *cstack;
3311 #endif
3312- char_u *(*getline) __ARGS((int, void *, int));
3313- void *cookie; /* argument for getline() */
3314+ char_u *(*fgetline) __ARGS((int, void *, int));
3315+ void *cookie; /* argument for fgetline() */
3316 {
3317 char_u *p;
3318 linenr_T lnum;
3319@@ -1698,7 +1701,7 @@
3320 if (quitmore
3321 #ifdef FEAT_EVAL
3322 /* avoid that a function call in 'statusline' does this */
3323- && !getline_equal(getline, cookie, get_func_line)
3324+ && !getline_equal(fgetline, cookie, get_func_line)
3325 #endif
3326 )
3327 --quitmore;
3328@@ -1710,6 +1713,10 @@
3329 save_cmdmod = cmdmod;
3330 vim_memset(&cmdmod, 0, sizeof(cmdmod));
3331
3332+ /* "#!anything" is handled like a comment. */
3333+ if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!')
3334+ goto doend;
3335+
3336 /*
3337 * Repeat until no more command modifiers are found.
3338 */
3339@@ -1724,8 +1731,8 @@
3340
3341 /* in ex mode, an empty line works like :+ */
3342 if (*ea.cmd == NUL && exmode_active
3343- && (getline_equal(getline, cookie, getexmodeline)
3344- || getline_equal(getline, cookie, getexline))
3345+ && (getline_equal(fgetline, cookie, getexmodeline)
3346+ || getline_equal(fgetline, cookie, getexline))
3347 && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
3348 {
3349 ea.cmd = (char_u *)"+";
3350@@ -1914,9 +1921,9 @@
3351 /* Count this line for profiling if ea.skip is FALSE. */
3352 if (do_profiling == PROF_YES && !ea.skip)
3353 {
3354- if (getline_equal(getline, cookie, get_func_line))
3355- func_line_exec(getline_cookie(getline, cookie));
3356- else if (getline_equal(getline, cookie, getsourceline))
3357+ if (getline_equal(fgetline, cookie, get_func_line))
3358+ func_line_exec(getline_cookie(fgetline, cookie));
3359+ else if (getline_equal(fgetline, cookie, getsourceline))
3360 script_line_exec();
3361 }
3362 #endif
3363@@ -2585,7 +2592,7 @@
3364 * The "ea" structure holds the arguments that can be used.
3365 */
3366 ea.cmdlinep = cmdlinep;
3367- ea.getline = getline;
3368+ ea.getline = fgetline;
3369 ea.cookie = cookie;
3370 #ifdef FEAT_EVAL
3371 ea.cstack = cstack;
3372@@ -2623,9 +2630,9 @@
3373 do_throw(cstack);
3374 else if (check_cstack)
3375 {
3376- if (source_finished(getline, cookie))
3377+ if (source_finished(fgetline, cookie))
3378 do_finish(&ea, TRUE);
3379- else if (getline_equal(getline, cookie, get_func_line)
3380+ else if (getline_equal(fgetline, cookie, get_func_line)
3381 && current_func_returned())
3382 do_return(&ea, TRUE, FALSE, NULL);
3383 }
3384@@ -6289,7 +6296,6 @@
3385 exarg_T *eap;
3386 {
3387 tabpage_T *tp;
3388- int h = tabline_height();
3389
3390 # ifdef FEAT_CMDWIN
3391 if (cmdwin_type != 0)
3392@@ -6321,9 +6327,6 @@
3393 )
3394 tabpage_close(eap->forceit);
3395 }
3396-
3397- if (h != tabline_height())
3398- shell_new_rows();
3399 }
3400
3401 /*
3402@@ -6335,7 +6338,6 @@
3403 {
3404 tabpage_T *tp;
3405 int done;
3406- int h = tabline_height();
3407
3408 # ifdef FEAT_CMDWIN
3409 if (cmdwin_type != 0)
3410@@ -6364,9 +6366,6 @@
3411 break;
3412 }
3413 }
3414-
3415- if (h != tabline_height())
3416- shell_new_rows();
3417 }
3418
3419 /*
3420@@ -6390,6 +6389,8 @@
3421 /*
3422 * Close tab page "tp", which is not the current tab page.
3423 * Note that autocommands may make "tp" invalid.
3424+ * Also takes care of the tab pages line disappearing when closing the
3425+ * last-but-one tab page.
3426 */
3427 void
3428 tabpage_close_other(tp, forceit)
3429@@ -6398,6 +6399,7 @@
3430 {
3431 int done = 0;
3432 win_T *wp;
3433+ int h = tabline_height();
3434
3435 /* Limit to 1000 windows, autocommands may add a window while we close
3436 * one. OK, so I'm paranoid... */
3437@@ -6411,7 +6413,10 @@
3438 if (!valid_tabpage(tp) || tp->tp_firstwin == wp)
3439 break;
3440 }
3441+
3442 redraw_tabline = TRUE;
3443+ if (h != tabline_height())
3444+ shell_new_rows();
3445 }
3446
3447 /*
3448@@ -8417,6 +8422,15 @@
3449 else
3450 EMSG2(_(e_invarg2), eap->arg);
3451 }
3452+
3453+ /* Make sure redirection is not off. Can happen for cmdline completion
3454+ * that indirectly invokes a command to catch its output. */
3455+ if (redir_fd != NULL
3456+#ifdef FEAT_EVAL
3457+ || redir_reg || redir_vname
3458+#endif
3459+ )
3460+ redir_off = FALSE;
3461 }
3462
3463 /*
3464diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c
3465--- vim70.orig/src/ex_getln.c 2006-04-30 08:32:01.000000000 -0700
3466+++ vim70/src/ex_getln.c 2006-09-11 09:27:49.000000000 -0700
3467@@ -324,6 +324,9 @@
3468 */
3469 for (;;)
3470 {
3471+ redir_off = TRUE; /* Don't redirect the typed command.
3472+ Repeated, because a ":redir" inside
3473+ completion may switch it on. */
3474 #ifdef USE_ON_FLY_SCROLL
3475 dont_scroll = FALSE; /* allow scrolling here */
3476 #endif
3477@@ -4521,7 +4524,9 @@
3478 flags |= EW_FILE | EW_EXEC;
3479
3480 /* For an absolute name we don't use $PATH. */
3481- if ((pat[0] == '.' && (vim_ispathsep(pat[1])
3482+ if (mch_isFullName(pat))
3483+ path = (char_u *)" ";
3484+ else if ((pat[0] == '.' && (vim_ispathsep(pat[1])
3485 || (pat[1] == '.' && vim_ispathsep(pat[2])))))
3486 path = (char_u *)".";
3487 else
3488@@ -4534,6 +4539,9 @@
3489 ga_init2(&ga, (int)sizeof(char *), 10);
3490 for (s = path; *s != NUL; s = e)
3491 {
3492+ if (*s == ' ')
3493+ ++s; /* Skip space used for absolute path name. */
3494+
3495 #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
3496 e = vim_strchr(s, ';');
3497 #else
3498@@ -5982,6 +5990,8 @@
3499 typestr[0] = cmdwin_type;
3500 typestr[1] = NUL;
3501 apply_autocmds(EVENT_CMDWINENTER, typestr, typestr, FALSE, curbuf);
3502+ if (restart_edit != 0) /* autocmd with ":startinsert" */
3503+ stuffcharReadbuff(K_NOP);
3504 # endif
3505
3506 i = RedrawingDisabled;
3507diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c
3508--- vim70.orig/src/fileio.c 2006-04-30 08:28:57.000000000 -0700
3509+++ vim70/src/fileio.c 2006-09-11 09:04:57.000000000 -0700
3510@@ -316,6 +316,9 @@
3511 * display the line. */
3512 ex_no_reprint = TRUE;
3513
3514+ /* don't display the file info for another buffer now */
3515+ need_fileinfo = FALSE;
3516+
3517 /*
3518 * For Unix: Use the short file name whenever possible.
3519 * Avoids problems with networks and when directory names are changed.
3520@@ -6450,17 +6453,10 @@
3521 int old_ro = buf->b_p_ro;
3522 buf_T *savebuf;
3523 int saved = OK;
3524-#ifdef FEAT_AUTOCMD
3525 aco_save_T aco;
3526
3527 /* set curwin/curbuf for "buf" and save some things */
3528 aucmd_prepbuf(&aco, buf);
3529-#else
3530- buf_T *save_curbuf = curbuf;
3531-
3532- curbuf = buf;
3533- curwin->w_buffer = buf;
3534-#endif
3535
3536 /* We only want to read the text from the file, not reset the syntax
3537 * highlighting, clear marks, diff status, etc. Force the fileformat
3538@@ -6573,14 +6569,9 @@
3539 curbuf->b_p_ro |= old_ro;
3540 }
3541
3542-#ifdef FEAT_AUTOCMD
3543 /* restore curwin/curbuf and a few other things */
3544 aucmd_restbuf(&aco);
3545 /* Careful: autocommands may have made "buf" invalid! */
3546-#else
3547- curwin->w_buffer = save_curbuf;
3548- curbuf = save_curbuf;
3549-#endif
3550 }
3551
3552 /*ARGSUSED*/
3553@@ -6992,6 +6983,7 @@
3554 {"FocusLost", EVENT_FOCUSLOST},
3555 {"FuncUndefined", EVENT_FUNCUNDEFINED},
3556 {"GUIEnter", EVENT_GUIENTER},
3557+ {"GUIFailed", EVENT_GUIFAILED},
3558 {"InsertChange", EVENT_INSERTCHANGE},
3559 {"InsertEnter", EVENT_INSERTENTER},
3560 {"InsertLeave", EVENT_INSERTLEAVE},
3561@@ -8088,6 +8080,7 @@
3562 * Search a window for the current buffer. Save the cursor position and
3563 * screen offset.
3564 * Set "curbuf" and "curwin" to match "buf".
3565+ * When FEAT_AUTOCMD is not defined another version is used, see below.
3566 */
3567 void
3568 aucmd_prepbuf(aco, buf)
3569@@ -8151,6 +8144,7 @@
3570 /*
3571 * Cleanup after executing autocommands for a (hidden) buffer.
3572 * Restore the window as it was (if possible).
3573+ * When FEAT_AUTOCMD is not defined another version is used, see below.
3574 */
3575 void
3576 aucmd_restbuf(aco)
3577@@ -9063,8 +9057,38 @@
3578 return retval;
3579 }
3580
3581+#else /* FEAT_AUTOCMD */
3582+
3583+/*
3584+ * Prepare for executing commands for (hidden) buffer "buf".
3585+ * This is the non-autocommand version, it simply saves "curbuf" and sets
3586+ * "curbuf" and "curwin" to match "buf".
3587+ */
3588+ void
3589+aucmd_prepbuf(aco, buf)
3590+ aco_save_T *aco; /* structure to save values in */
3591+ buf_T *buf; /* new curbuf */
3592+{
3593+ aco->save_buf = buf;
3594+ curbuf = buf;
3595+ curwin->w_buffer = buf;
3596+}
3597+
3598+/*
3599+ * Restore after executing commands for a (hidden) buffer.
3600+ * This is the non-autocommand version.
3601+ */
3602+ void
3603+aucmd_restbuf(aco)
3604+ aco_save_T *aco; /* structure holding saved values */
3605+{
3606+ curbuf = aco->save_buf;
3607+ curwin->w_buffer = curbuf;
3608+}
3609+
3610 #endif /* FEAT_AUTOCMD */
3611
3612+
3613 #if defined(FEAT_AUTOCMD) || defined(FEAT_WILDIGN) || defined(PROTO)
3614 /*
3615 * Try matching a filename with a "pattern" ("prog" is NULL), or use the
3616diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c
3617--- vim70.orig/src/getchar.c 2006-05-03 10:29:21.000000000 -0700
3618+++ vim70/src/getchar.c 2006-09-11 09:00:04.000000000 -0700
3619@@ -1451,7 +1451,8 @@
3620 {
3621 updatescript(0);
3622 #ifdef FEAT_EVAL
3623- garbage_collect();
3624+ if (may_garbage_collect)
3625+ garbage_collect();
3626 #endif
3627 }
3628
3629@@ -1502,6 +1503,13 @@
3630 int i;
3631 #endif
3632
3633+#ifdef FEAT_EVAL
3634+ /* Do garbage collection when garbagecollect() was called previously and
3635+ * we are now at the toplevel. */
3636+ if (may_garbage_collect && want_garbage_collect)
3637+ garbage_collect();
3638+#endif
3639+
3640 /*
3641 * If a character was put back with vungetc, it was already processed.
3642 * Return it directly.
3643@@ -1511,13 +1519,13 @@
3644 c = old_char;
3645 old_char = -1;
3646 mod_mask = old_mod_mask;
3647- return c;
3648 }
3649-
3650- mod_mask = 0x0;
3651- last_recorded_len = 0;
3652- for (;;) /* this is done twice if there are modifiers */
3653+ else
3654 {
3655+ mod_mask = 0x0;
3656+ last_recorded_len = 0;
3657+ for (;;) /* this is done twice if there are modifiers */
3658+ {
3659 if (mod_mask) /* no mapping after modifier has been read */
3660 {
3661 ++no_mapping;
3662@@ -1695,8 +1703,20 @@
3663 }
3664 #endif
3665
3666- return c;
3667+ break;
3668+ }
3669 }
3670+
3671+#ifdef FEAT_EVAL
3672+ /*
3673+ * In the main loop "may_garbage_collect" can be set to do garbage
3674+ * collection in the first next vgetc(). It's disabled after that to
3675+ * avoid internally used Lists and Dicts to be freed.
3676+ */
3677+ may_garbage_collect = FALSE;
3678+#endif
3679+
3680+ return c;
3681 }
3682
3683 /*
3684diff -Naur vim70.orig/src/globals.h vim70/src/globals.h
3685--- vim70.orig/src/globals.h 2006-04-30 06:16:23.000000000 -0700
3686+++ vim70/src/globals.h 2006-09-11 09:00:04.000000000 -0700
3687@@ -300,9 +300,16 @@
3688 #endif
3689
3690 #ifdef FEAT_EVAL
3691-EXTERN scid_T current_SID INIT(= 0); /* ID of script being sourced or
3692- was sourced to define the
3693- current function. */
3694+/* Garbage collection can only take place when we are sure there are no Lists
3695+ * or Dictionaries being used internally. This is flagged with
3696+ * "may_garbage_collect" when we are at the toplevel.
3697+ * "want_garbage_collect" is set by the garbagecollect() function, which means
3698+ * we do garbage collection before waiting for a char at the toplevel. */
3699+EXTERN int may_garbage_collect INIT(= FALSE);
3700+EXTERN int want_garbage_collect INIT(= FALSE);
3701+
3702+/* ID of script being sourced or was sourced to define the current function. */
3703+EXTERN scid_T current_SID INIT(= 0);
3704 #endif
3705
3706 #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL)
3707@@ -1441,7 +1448,7 @@
3708 EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to override)"));
3709 #ifdef FEAT_EVAL
3710 EXTERN char_u e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable \"%s\""));
3711-EXTERN char_u e_readonlysbx[] INIT(= N_("E46: Cannot set variable in the sandbox: \"%s\""));
3712+EXTERN char_u e_readonlysbx[] INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\""));
3713 #endif
3714 #ifdef FEAT_QUICKFIX
3715 EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
3716diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
3717--- vim70.orig/src/gui_at_fs.c 2005-07-09 04:30:17.000000000 -0700
3718+++ vim70/src/gui_at_fs.c 2006-07-14 08:51:21.000000000 -0700
3719@@ -1861,27 +1861,27 @@
3720 XtPointer pnew;
3721 {
3722 SFDir *dir;
3723- int nw;
3724+ int nw = (int)(long)pnew;
3725
3726 dir = &(SFdirs[SFdirPtr + (int)(long)n]);
3727
3728 #ifdef FEAT_GUI_NEXTAW
3729- if ((int)(long)pnew < 0)
3730+ if (nw < 0)
3731 {
3732- if ((int)(long)pnew > -SFvScrollHeight)
3733- (int)(long)pnew = -1;
3734+ if (nw > -SFvScrollHeight)
3735+ nw = -1;
3736 else
3737- (int)(long)pnew = -SFlistSize;
3738+ nw = -SFlistSize;
3739 }
3740- else if ((int)(long)pnew > 0)
3741+ else if (nw > 0)
3742 {
3743- if ((int)(long)pnew < SFvScrollHeight)
3744- (int)(long)pnew = 1;
3745+ if (nw < SFvScrollHeight)
3746+ nw = 1;
3747 else
3748- (int)(long)pnew = SFlistSize;
3749+ nw = SFlistSize;
3750 }
3751 #endif
3752- nw = dir->vOrigin + (int)(long)pnew;
3753+ nw += dir->vOrigin;
3754
3755 if (nw > dir->nEntries - SFlistSize)
3756 nw = dir->nEntries - SFlistSize;
3757@@ -1941,27 +1941,27 @@
3758 XtPointer pnew;
3759 {
3760 SFDir *dir;
3761- int nw;
3762+ int nw = (int)(long)pnew;
3763
3764 dir = &(SFdirs[SFdirPtr + (int)(long)n]);
3765
3766 #ifdef FEAT_GUI_NEXTAW
3767- if ((int)(long)pnew < 0)
3768+ if (nw < 0)
3769 {
3770- if ((int)(long)pnew > -SFhScrollWidth)
3771- (int)(long)pnew = -1;
3772+ if (nw > -SFhScrollWidth)
3773+ nw = -1;
3774 else
3775- (int)(long)pnew = -SFcharsPerEntry;
3776+ nw = -SFcharsPerEntry;
3777 }
3778- else if ((int)(long)pnew > 0)
3779+ else if (nw > 0)
3780 {
3781- if ((int)(long)pnew < SFhScrollWidth)
3782- (int)(long)pnew = 1;
3783+ if (nw < SFhScrollWidth)
3784+ nw = 1;
3785 else
3786- (int)(long)pnew = SFcharsPerEntry;
3787+ nw = SFcharsPerEntry;
3788 }
3789 #endif
3790- nw = dir->hOrigin + (int)(long)pnew;
3791+ nw += dir->hOrigin;
3792
3793 if (nw > dir->nChars - SFcharsPerEntry)
3794 nw = dir->nChars - SFcharsPerEntry;
3795@@ -2038,26 +2038,26 @@
3796 XtPointer client_data;
3797 XtPointer pnew;
3798 {
3799- int nw;
3800+ int nw = (int)(long)pnew;
3801 float f;
3802
3803 #ifdef FEAT_GUI_NEXTAW
3804- if ((int)(long)pnew < 0)
3805+ if (nw < 0)
3806 {
3807- if ((int)(long)pnew > -SFpathScrollWidth)
3808- (int)(long)pnew = -1;
3809+ if (nw > -SFpathScrollWidth)
3810+ nw = -1;
3811 else
3812- (int)(long)pnew = -3;
3813+ nw = -3;
3814 }
3815- else if ((int)(long)pnew > 0)
3816+ else if (nw > 0)
3817 {
3818- if ((int)(long)pnew < SFpathScrollWidth)
3819- (int)(long)pnew = 1;
3820+ if (nw < SFpathScrollWidth)
3821+ nw = 1;
3822 else
3823- (int)(long)pnew = 3;
3824+ nw = 3;
3825 }
3826 #endif
3827- nw = SFdirPtr + (int)(long)pnew;
3828+ nw += SFdirPtr;
3829
3830 if (nw > SFdirEnd - 3)
3831 nw = SFdirEnd - 3;
3832diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c
3833--- vim70.orig/src/gui_beval.c 2006-05-04 12:29:51.000000000 -0700
3834+++ vim70/src/gui_beval.c 2006-09-11 08:23:15.000000000 -0700
3835@@ -926,7 +926,7 @@
3836 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
3837 || (c) == DEL)
3838 static void
3839-set_printable_label_text(GtkLabel *label, char_u *msg)
3840+set_printable_label_text(GtkLabel *label, char_u *text)
3841 {
3842 char_u *convbuf = NULL;
3843 char_u *buf;
3844@@ -940,14 +940,14 @@
3845 /* Convert to UTF-8 if it isn't already */
3846 if (output_conv.vc_type != CONV_NONE)
3847 {
3848- convbuf = string_convert(&output_conv, msg, NULL);
3849+ convbuf = string_convert(&output_conv, text, NULL);
3850 if (convbuf != NULL)
3851- msg = convbuf;
3852+ text = convbuf;
3853 }
3854
3855 /* First let's see how much we need to allocate */
3856 len = 0;
3857- for (p = msg; *p != NUL; p += charlen)
3858+ for (p = text; *p != NUL; p += charlen)
3859 {
3860 if ((*p & 0x80) == 0) /* be quick for ASCII */
3861 {
3862@@ -992,7 +992,7 @@
3863 (unsigned long)pixel, &color);
3864
3865 pdest = buf;
3866- p = msg;
3867+ p = text;
3868 while (*p != NUL)
3869 {
3870 /* Be quick for ASCII */
3871diff -Naur vim70.orig/src/gui.c vim70/src/gui.c
3872--- vim70.orig/src/gui.c 2006-05-03 04:00:59.000000000 -0700
3873+++ vim70/src/gui.c 2006-09-11 09:28:13.000000000 -0700
3874@@ -187,9 +187,10 @@
3875 #endif
3876
3877 #ifdef FEAT_AUTOCMD
3878- /* If the GUI started successfully, trigger the GUIEnter event */
3879- if (gui.in_use)
3880- apply_autocmds(EVENT_GUIENTER, NULL, NULL, FALSE, curbuf);
3881+ /* If the GUI started successfully, trigger the GUIEnter event, otherwise
3882+ * the GUIFailed event. */
3883+ apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
3884+ NULL, NULL, FALSE, curbuf);
3885 #endif
3886
3887 --recursive;
3888@@ -3733,6 +3734,12 @@
3889 if (dont_scroll || input_available())
3890 return;
3891 #endif
3892+#ifdef FEAT_INS_EXPAND
3893+ /* Disallow scrolling the current window when the completion popup menu is
3894+ * visible. */
3895+ if ((sb->wp == NULL || sb->wp == curwin) && pum_visible())
3896+ return;
3897+#endif
3898
3899 #ifdef FEAT_RIGHTLEFT
3900 if (sb->wp == NULL && curwin->w_p_rl)
3901@@ -4207,6 +4214,12 @@
3902 updateWindow(wp); /* update window, status line, and cmdline */
3903 }
3904
3905+#ifdef FEAT_INS_EXPAND
3906+ /* May need to redraw the popup menu. */
3907+ if (pum_visible())
3908+ pum_redraw();
3909+#endif
3910+
3911 return (wp == curwin && !equalpos(curwin->w_cursor, old_cursor));
3912 }
3913
3914@@ -4515,7 +4528,7 @@
3915 int y;
3916 {
3917 win_T *wp;
3918- char_u st[6];
3919+ char_u st[8];
3920
3921 /* Ignore this while still starting up. */
3922 if (!gui.in_use || gui.starting)
3923@@ -4603,11 +4616,11 @@
3924 /* Don't move the mouse when it's left or right of the Vim window */
3925 if (x < 0 || x > Columns * gui.char_width)
3926 return;
3927+ if (y >= 0
3928 # ifdef FEAT_WINDOWS
3929- if (Y_2_ROW(y) >= tabline_height())
3930-# else
3931- if (y >= 0)
3932+ && Y_2_ROW(y) >= tabline_height()
3933 # endif
3934+ )
3935 wp = xy2win(x, y);
3936 if (wp != curwin && wp != NULL) /* If in other than current window */
3937 {
3938diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c
3939--- vim70.orig/src/gui_gtk.c 2006-05-05 04:52:52.000000000 -0700
3940+++ vim70/src/gui_gtk.c 2006-09-11 08:23:15.000000000 -0700
3941@@ -957,15 +957,15 @@
3942 get_menu_position(vimmenu_T *menu)
3943 {
3944 vimmenu_T *node;
3945- int index = 0;
3946+ int idx = 0;
3947
3948 for (node = menu->parent->children; node != menu; node = node->next)
3949 {
3950 g_return_val_if_fail(node != NULL, -1);
3951- ++index;
3952+ ++idx;
3953 }
3954
3955- return index;
3956+ return idx;
3957 }
3958 #endif /* FEAT_TOOLBAR && HAVE_GTK2 */
3959
3960@@ -2127,7 +2127,7 @@
3961 char **ync; /* "yes no cancel" */
3962 char **buttons;
3963 int n_buttons = 0;
3964- int index;
3965+ int idx;
3966
3967 button_string = vim_strsave(button_string); /* must be writable */
3968 if (button_string == NULL)
3969@@ -2161,12 +2161,12 @@
3970 * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the
3971 * other way around...
3972 */
3973- for (index = 1; index <= n_buttons; ++index)
3974+ for (idx = 1; idx <= n_buttons; ++idx)
3975 {
3976 char *label;
3977 char_u *label8;
3978
3979- label = buttons[index - 1];
3980+ label = buttons[idx - 1];
3981 /*
3982 * Perform some guesswork to find appropriate stock items for the
3983 * buttons. We have to compare with a sample of the translated
3984@@ -2188,7 +2188,7 @@
3985 else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL;
3986 }
3987 label8 = CONVERT_TO_UTF8((char_u *)label);
3988- gtk_dialog_add_button(dialog, (const gchar *)label8, index);
3989+ gtk_dialog_add_button(dialog, (const gchar *)label8, idx);
3990 CONVERT_TO_UTF8_FREE(label8);
3991 }
3992
3993diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c
3994--- vim70.orig/src/gui_gtk_x11.c 2006-05-04 23:58:59.000000000 -0700
3995+++ vim70/src/gui_gtk_x11.c 2006-09-11 08:23:16.000000000 -0700
3996@@ -3233,12 +3233,12 @@
3997 on_select_tab(
3998 GtkNotebook *notebook,
3999 GtkNotebookPage *page,
4000- gint index,
4001+ gint idx,
4002 gpointer data)
4003 {
4004 if (!ignore_tabline_evt)
4005 {
4006- if (send_tabline_event(index + 1) && gtk_main_level() > 0)
4007+ if (send_tabline_event(idx + 1) && gtk_main_level() > 0)
4008 gtk_main_quit();
4009 }
4010 }
4011@@ -5303,13 +5303,13 @@
4012 # ifdef HAVE_GTK2
4013 if (font != NOFONT)
4014 {
4015- char *name = pango_font_description_to_string(font);
4016+ char *pangoname = pango_font_description_to_string(font);
4017
4018- if (name != NULL)
4019+ if (pangoname != NULL)
4020 {
4021- char_u *s = vim_strsave((char_u *)name);
4022+ char_u *s = vim_strsave((char_u *)pangoname);
4023
4024- g_free(name);
4025+ g_free(pangoname);
4026 return s;
4027 }
4028 }
4029@@ -6241,24 +6241,20 @@
4030 {
4031 GdkGCValues values;
4032 GdkGC *invert_gc;
4033- GdkColor foreground;
4034- GdkColor background;
4035
4036 if (gui.drawarea->window == NULL)
4037 return;
4038
4039- foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
4040- background.pixel = gui.norm_pixel ^ gui.back_pixel;
4041-
4042- values.foreground = foreground;
4043- values.background = background;
4044+ values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
4045+ values.background.pixel = gui.norm_pixel ^ gui.back_pixel;
4046 values.function = GDK_XOR;
4047 invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
4048 &values,
4049 GDK_GC_FOREGROUND |
4050 GDK_GC_BACKGROUND |
4051 GDK_GC_FUNCTION);
4052- gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED);
4053+ gdk_gc_set_exposures(invert_gc, gui.visibility !=
4054+ GDK_VISIBILITY_UNOBSCURED);
4055 gdk_draw_rectangle(gui.drawarea->window, invert_gc,
4056 TRUE,
4057 FILL_X(c), FILL_Y(r),
4058diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
4059--- vim70.orig/src/gui_xmebw.c 2006-04-30 08:32:32.000000000 -0700
4060+++ vim70/src/gui_xmebw.c 2006-07-14 08:51:21.000000000 -0700
4061@@ -47,13 +47,13 @@
4062 #include "gui_xmebwp.h"
4063
4064 /* Provide some missing wrappers, which are missed from the LessTif
4065- * implementation.
4066+ * implementation. Also missing in Motif 1.2 and earlier.
4067 *
4068 * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the
4069 * pixmap will not appear in it's caches properly. We cache the interresting
4070 * values in XmEnhancedButtonPart instead ourself.
4071 */
4072-#ifdef LESSTIF_VERSION
4073+#if defined(LESSTIF_VERSION) || (XmVersion <= 1002)
4074 # ifndef Lab_IsMenupane
4075 # define Lab_IsMenupane(w) (Lab_MenuType(w) == (int)XmMENU_POPUP || \
4076 Lab_MenuType(w) == (int)XmMENU_PULLDOWN)
4077@@ -480,7 +480,7 @@
4078 || (eb->core.height <= 2 * eb->primitive.highlight_thickness))
4079 return;
4080
4081-#ifndef LESSTIF_VERSION
4082+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4083 {
4084 XmDisplay dpy;
4085
4086@@ -641,7 +641,7 @@
4087 GC tmp_gc = NULL;
4088 Boolean replaceGC = False;
4089 Boolean deadjusted = False;
4090-#ifndef LESSTIF_VERSION
4091+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4092 XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb));
4093 Boolean etched_in = dpy->display.enable_etched_in_menu;
4094 #else
4095@@ -726,7 +726,7 @@
4096 if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up)
4097 && _XmGetInDragMode((Widget) eb))
4098 {
4099-#ifndef LESSTIF_VERSION
4100+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4101 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid));
4102 Boolean etched_in = dpy->display.enable_etched_in_menu;
4103 #else
4104@@ -810,7 +810,7 @@
4105
4106 if (Lab_IsMenupane(eb))
4107 {
4108-#ifndef LESSTIF_VERSION
4109+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4110 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid));
4111 Boolean etched_in = dpy->display.enable_etched_in_menu;
4112 #else
4113@@ -1150,7 +1150,7 @@
4114 Redisplay(Widget w, XEvent *event, Region region)
4115 {
4116 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w;
4117-#ifndef LESSTIF_VERSION
4118+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4119 XmDisplay dpy;
4120 XtEnum default_button_emphasis;
4121 #endif
4122@@ -1162,7 +1162,7 @@
4123 if (!XtIsRealized((Widget)eb))
4124 return;
4125
4126-#ifndef LESSTIF_VERSION
4127+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4128 dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb));
4129 default_button_emphasis = dpy->display.default_button_emphasis;
4130 #endif
4131@@ -1241,7 +1241,7 @@
4132 {
4133 int adjust = 0;
4134
4135-#ifndef LESSTIF_VERSION
4136+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4137 /*
4138 * NOTE: PushButton has two types of shadows: primitive-shadow and
4139 * default-button-shadow. If pushbutton is in a menu only primitive
4140@@ -1289,7 +1289,7 @@
4141 adjust, adjust, rectwidth, rectheight, borderwidth);
4142 }
4143
4144-#ifndef LESSTIF_VERSION
4145+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4146 switch (default_button_emphasis)
4147 {
4148 case XmINTERNAL_HIGHLIGHT:
4149@@ -1365,7 +1365,7 @@
4150 default_button_shadow_thickness =
4151 eb->pushbutton.default_button_shadow_thickness;
4152
4153-#ifndef LESSTIF_VERSION
4154+#if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
4155 /*
4156 * Compute location of bounding box to contain the
4157 * defaultButtonShadow.
4158diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c
4159--- vim70.orig/src/hardcopy.c 2006-05-04 03:09:58.000000000 -0700
4160+++ vim70/src/hardcopy.c 2006-09-11 08:23:16.000000000 -0700
4161@@ -1794,29 +1794,27 @@
4162 static int
4163 prt_resfile_next_line()
4164 {
4165- int index;
4166+ int idx;
4167
4168 /* Move to start of next line and then find end of line */
4169- index = prt_resfile.line_end + 1;
4170- while (index < prt_resfile.len)
4171+ idx = prt_resfile.line_end + 1;
4172+ while (idx < prt_resfile.len)
4173 {
4174- if (prt_resfile.buffer[index] != PSLF && prt_resfile.buffer[index]
4175- != PSCR)
4176+ if (prt_resfile.buffer[idx] != PSLF && prt_resfile.buffer[idx] != PSCR)
4177 break;
4178- index++;
4179+ idx++;
4180 }
4181- prt_resfile.line_start = index;
4182+ prt_resfile.line_start = idx;
4183
4184- while (index < prt_resfile.len)
4185+ while (idx < prt_resfile.len)
4186 {
4187- if (prt_resfile.buffer[index] == PSLF || prt_resfile.buffer[index]
4188- == PSCR)
4189+ if (prt_resfile.buffer[idx] == PSLF || prt_resfile.buffer[idx] == PSCR)
4190 break;
4191- index++;
4192+ idx++;
4193 }
4194- prt_resfile.line_end = index;
4195+ prt_resfile.line_end = idx;
4196
4197- return (index < prt_resfile.len);
4198+ return (idx < prt_resfile.len);
4199 }
4200
4201 static int
4202@@ -1837,14 +1835,14 @@
4203 prt_resfile_skip_nonws(offset)
4204 int offset;
4205 {
4206- int index;
4207+ int idx;
4208
4209- index = prt_resfile.line_start + offset;
4210- while (index < prt_resfile.line_end)
4211+ idx = prt_resfile.line_start + offset;
4212+ while (idx < prt_resfile.line_end)
4213 {
4214- if (isspace(prt_resfile.buffer[index]))
4215- return index - prt_resfile.line_start;
4216- index++;
4217+ if (isspace(prt_resfile.buffer[idx]))
4218+ return idx - prt_resfile.line_start;
4219+ idx++;
4220 }
4221 return -1;
4222 }
4223@@ -1853,14 +1851,14 @@
4224 prt_resfile_skip_ws(offset)
4225 int offset;
4226 {
4227- int index;
4228+ int idx;
4229
4230- index = prt_resfile.line_start + offset;
4231- while (index < prt_resfile.line_end)
4232+ idx = prt_resfile.line_start + offset;
4233+ while (idx < prt_resfile.line_end)
4234 {
4235- if (!isspace(prt_resfile.buffer[index]))
4236- return index - prt_resfile.line_start;
4237- index++;
4238+ if (!isspace(prt_resfile.buffer[idx]))
4239+ return idx - prt_resfile.line_start;
4240+ idx++;
4241 }
4242 return -1;
4243 }
4244@@ -2478,7 +2476,7 @@
4245 char_u *p_encoding;
4246 struct prt_ps_encoding_S *p_mbenc;
4247 struct prt_ps_encoding_S *p_mbenc_first;
4248- struct prt_ps_charset_S *p_mbchar;
4249+ struct prt_ps_charset_S *p_mbchar = NULL;
4250 #endif
4251
4252 #if 0
4253@@ -2516,7 +2514,6 @@
4254 if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE)))
4255 {
4256 p_mbenc_first = NULL;
4257- p_mbchar = NULL;
4258 for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++)
4259 if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap],
4260 &p_mbenc))
4261diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c
4262--- vim70.orig/src/if_cscope.c 2006-04-18 01:54:15.000000000 -0700
4263+++ vim70/src/if_cscope.c 2006-09-11 08:23:16.000000000 -0700
4264@@ -989,8 +989,7 @@
4265 {
4266 int i;
4267 char *cmd;
4268- char **matches, **contexts;
4269- int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches, matched;
4270+ int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches;
4271 #ifdef FEAT_QUICKFIX
4272 char cmdletter;
4273 char *qfpos;
4274@@ -1141,6 +1140,9 @@
4275 else
4276 #endif /* FEAT_QUICKFIX */
4277 {
4278+ char **matches = NULL, **contexts = NULL;
4279+ int matched = 0;
4280+
4281 /* read output */
4282 cs_fill_results((char *)pat, totmatches, nummatches, &matches,
4283 &contexts, &matched);
4284diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs
4285--- vim70.orig/src/if_perl.xs 2006-03-06 10:57:16.000000000 -0800
4286+++ vim70/src/if_perl.xs 2006-08-19 16:39:02.000000000 -0700
4287@@ -155,8 +155,8 @@
4288 static int (*perl_run)(PerlInterpreter*);
4289 static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
4290 static void* (*Perl_get_context)(void);
4291-static void (*Perl_croak)(pTHX_ const char*, ...) __attribute__((noreturn));
4292-static void (*Perl_croak_nocontext)(const char*, ...) __attribute__((noreturn));
4293+static void (*Perl_croak)(pTHX_ const char*, ...);
4294+static void (*Perl_croak_nocontext)(const char*, ...);
4295 static I32 (*Perl_dowantarray)(pTHX);
4296 static void (*Perl_free_tmps)(pTHX);
4297 static HV* (*Perl_gv_stashpv)(pTHX_ const char*, I32);
4298@@ -1056,7 +1056,6 @@
4299 int i;
4300 long lnum;
4301 char *line;
4302- buf_T *savebuf;
4303 PPCODE:
4304 if (buf_valid(vimbuf))
4305 {
4306@@ -1069,14 +1068,20 @@
4307 line = SvPV(ST(i),PL_na);
4308 if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL)
4309 {
4310- savebuf = curbuf;
4311- curbuf = vimbuf;
4312+ aco_save_T aco;
4313+
4314+ /* set curwin/curbuf for "vimbuf" and save some things */
4315+ aucmd_prepbuf(&aco, vimbuf);
4316+
4317 if (u_savesub(lnum) == OK)
4318 {
4319 ml_replace(lnum, (char_u *)line, TRUE);
4320 changed_bytes(lnum, 0);
4321 }
4322- curbuf = savebuf;
4323+
4324+ /* restore curwin/curbuf and a few other things */
4325+ aucmd_restbuf(&aco);
4326+ /* Careful: autocommands may have made "vimbuf" invalid! */
4327 }
4328 }
4329 }
4330@@ -1087,7 +1092,6 @@
4331
4332 PREINIT:
4333 long i, lnum = 0, count = 0;
4334- buf_T *savebuf;
4335 PPCODE:
4336 if (buf_valid(vimbuf))
4337 {
4338@@ -1114,16 +1118,23 @@
4339 {
4340 if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count)
4341 {
4342- savebuf = curbuf;
4343- curbuf = vimbuf;
4344+ aco_save_T aco;
4345+
4346+ /* set curwin/curbuf for "vimbuf" and save some things */
4347+ aucmd_prepbuf(&aco, vimbuf);
4348+
4349 if (u_savedel(lnum, 1) == OK)
4350 {
4351 ml_delete(lnum, 0);
4352 deleted_lines_mark(lnum, 1L);
4353- if (savebuf == curbuf)
4354+ if (aco.save_buf == curbuf)
4355 check_cursor();
4356 }
4357- curbuf = savebuf;
4358+
4359+ /* restore curwin/curbuf and a few other things */
4360+ aucmd_restbuf(&aco);
4361+ /* Careful: autocommands may have made "vimbuf" invalid! */
4362+
4363 update_curbuf(VALID);
4364 }
4365 }
4366@@ -1138,7 +1149,6 @@
4367 int i;
4368 long lnum;
4369 char *line;
4370- buf_T *savebuf;
4371 PPCODE:
4372 if (buf_valid(vimbuf))
4373 {
4374@@ -1151,14 +1161,21 @@
4375 line = SvPV(ST(i),PL_na);
4376 if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL)
4377 {
4378- savebuf = curbuf;
4379- curbuf = vimbuf;
4380+ aco_save_T aco;
4381+
4382+ /* set curwin/curbuf for "vimbuf" and save some things */
4383+ aucmd_prepbuf(&aco, vimbuf);
4384+
4385 if (u_inssub(lnum + 1) == OK)
4386 {
4387 ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE);
4388 appended_lines_mark(lnum, 1L);
4389 }
4390- curbuf = savebuf;
4391+
4392+ /* restore curwin/curbuf and a few other things */
4393+ aucmd_restbuf(&aco);
4394+ /* Careful: autocommands may have made "vimbuf" invalid! */
4395+
4396 update_curbuf(VALID);
4397 }
4398 }
4399diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c
4400--- vim70.orig/src/if_ruby.c 2006-04-30 08:37:52.000000000 -0700
4401+++ vim70/src/if_ruby.c 2006-08-19 16:39:01.000000000 -0700
4402@@ -643,11 +643,14 @@
4403
4404 static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str)
4405 {
4406- buf_T *savebuf = curbuf;
4407- char *line = STR2CSTR(str);
4408+ char *line = STR2CSTR(str);
4409+ aco_save_T aco;
4410+
4411+ if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL)
4412+ {
4413+ /* set curwin/curbuf for "buf" and save some things */
4414+ aucmd_prepbuf(&aco, buf);
4415
4416- if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) {
4417- curbuf = buf;
4418 if (u_savesub(n) == OK) {
4419 ml_replace(n, (char_u *)line, TRUE);
4420 changed();
4421@@ -655,10 +658,15 @@
4422 syn_changed(n); /* recompute syntax hl. for this line */
4423 #endif
4424 }
4425- curbuf = savebuf;
4426+
4427+ /* restore curwin/curbuf and a few other things */
4428+ aucmd_restbuf(&aco);
4429+ /* Careful: autocommands may have made "buf" invalid! */
4430+
4431 update_curbuf(NOT_VALID);
4432 }
4433- else {
4434+ else
4435+ {
4436 rb_raise(rb_eIndexError, "index %d out of buffer", n);
4437 return Qnil; /* For stop warning */
4438 }
4439@@ -676,12 +684,15 @@
4440
4441 static VALUE buffer_delete(VALUE self, VALUE num)
4442 {
4443- buf_T *buf = get_buf(self);
4444- buf_T *savebuf = curbuf;
4445- long n = NUM2LONG(num);
4446+ buf_T *buf = get_buf(self);
4447+ long n = NUM2LONG(num);
4448+ aco_save_T aco;
4449+
4450+ if (n > 0 && n <= buf->b_ml.ml_line_count)
4451+ {
4452+ /* set curwin/curbuf for "buf" and save some things */
4453+ aucmd_prepbuf(&aco, buf);
4454
4455- if (n > 0 && n <= buf->b_ml.ml_line_count) {
4456- curbuf = buf;
4457 if (u_savedel(n, 1) == OK) {
4458 ml_delete(n, 0);
4459
4460@@ -691,10 +702,15 @@
4461
4462 changed();
4463 }
4464- curbuf = savebuf;
4465+
4466+ /* restore curwin/curbuf and a few other things */
4467+ aucmd_restbuf(&aco);
4468+ /* Careful: autocommands may have made "buf" invalid! */
4469+
4470 update_curbuf(NOT_VALID);
4471 }
4472- else {
4473+ else
4474+ {
4475 rb_raise(rb_eIndexError, "index %d out of buffer", n);
4476 }
4477 return Qnil;
4478@@ -702,13 +718,16 @@
4479
4480 static VALUE buffer_append(VALUE self, VALUE num, VALUE str)
4481 {
4482- buf_T *buf = get_buf(self);
4483- buf_T *savebuf = curbuf;
4484- char *line = STR2CSTR(str);
4485- long n = NUM2LONG(num);
4486+ buf_T *buf = get_buf(self);
4487+ char *line = STR2CSTR(str);
4488+ long n = NUM2LONG(num);
4489+ aco_save_T aco;
4490+
4491+ if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL)
4492+ {
4493+ /* set curwin/curbuf for "buf" and save some things */
4494+ aucmd_prepbuf(&aco, buf);
4495
4496- if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) {
4497- curbuf = buf;
4498 if (u_inssub(n + 1) == OK) {
4499 ml_append(n, (char_u *) line, (colnr_T) 0, FALSE);
4500
4501@@ -718,7 +737,11 @@
4502
4503 changed();
4504 }
4505- curbuf = savebuf;
4506+
4507+ /* restore curwin/curbuf and a few other things */
4508+ aucmd_restbuf(&aco);
4509+ /* Careful: autocommands may have made "buf" invalid! */
4510+
4511 update_curbuf(NOT_VALID);
4512 }
4513 else {
4514diff -Naur vim70.orig/src/macros.h vim70/src/macros.h
4515--- vim70.orig/src/macros.h 2006-03-01 04:01:10.000000000 -0800
4516+++ vim70/src/macros.h 2006-09-11 09:01:59.000000000 -0700
4517@@ -276,3 +276,9 @@
4518 # define MB_CHARLEN(p) STRLEN(p)
4519 # define PTR2CHAR(p) ((int)*(p))
4520 #endif
4521+
4522+#ifdef FEAT_AUTOCHDIR
4523+# define DO_AUTOCHDIR if (p_acd) do_autochdir();
4524+#else
4525+# define DO_AUTOCHDIR
4526+#endif
4527diff -Naur vim70.orig/src/main.c vim70/src/main.c
4528--- vim70.orig/src/main.c 2006-05-03 10:36:44.000000000 -0700
4529+++ vim70/src/main.c 2006-09-11 09:00:04.000000000 -0700
4530@@ -564,7 +564,11 @@
4531 */
4532 if (p_lpl)
4533 {
4534+# ifdef VMS /* Somehow VMS doesn't handle the "**". */
4535+ source_runtime((char_u *)"plugin/*.vim", TRUE);
4536+# else
4537 source_runtime((char_u *)"plugin/**/*.vim", TRUE);
4538+# endif
4539 TIME_MSG("loading plugins");
4540 }
4541 #endif
4542@@ -1126,6 +1130,16 @@
4543 */
4544 update_curswant();
4545
4546+#ifdef FEAT_EVAL
4547+ /*
4548+ * May perform garbage collection when waiting for a character, but
4549+ * only at the very toplevel. Otherwise we may be using a List or
4550+ * Dict internally somewhere.
4551+ * "may_garbage_collect" is reset in vgetc() which is invoked through
4552+ * do_exmode() and normal_cmd().
4553+ */
4554+ may_garbage_collect = (!cmdwin && !noexmode);
4555+#endif
4556 /*
4557 * If we're invoked as ex, do a round of ex commands.
4558 * Otherwise, get and execute a normal mode command.
4559@@ -2281,7 +2295,7 @@
4560 mparm_T *parmp;
4561 {
4562 #ifdef FEAT_WINDOWS
4563- int rewind;
4564+ int dorewind;
4565 int done = 0;
4566
4567 /*
4568@@ -2338,10 +2352,10 @@
4569 ++autocmd_no_leave;
4570 #endif
4571 #ifdef FEAT_WINDOWS
4572- rewind = TRUE;
4573+ dorewind = TRUE;
4574 while (done++ < 1000)
4575 {
4576- if (rewind)
4577+ if (dorewind)
4578 {
4579 if (parmp->window_layout == WIN_TABS)
4580 goto_tabpage(1);
4581@@ -2360,7 +2374,7 @@
4582 break;
4583 curwin = curwin->w_next;
4584 }
4585- rewind = FALSE;
4586+ dorewind = FALSE;
4587 #endif
4588 curbuf = curwin->w_buffer;
4589 if (curbuf->b_ml.ml_mfp == NULL)
4590@@ -2381,7 +2395,7 @@
4591 check_swap_exists_action();
4592 #endif
4593 #ifdef FEAT_AUTOCMD
4594- rewind = TRUE; /* start again */
4595+ dorewind = TRUE; /* start again */
4596 #endif
4597 }
4598 #ifdef FEAT_WINDOWS
4599@@ -3208,10 +3222,15 @@
4600 * Register for remote command execution with :serversend and --remote
4601 * unless there was a -X or a --servername '' on the command line.
4602 * Only register nongui-vim's with an explicit --servername argument.
4603+ * When running as root --servername is also required.
4604 */
4605 if (X_DISPLAY != NULL && parmp->servername != NULL && (
4606 # ifdef FEAT_GUI
4607- gui.in_use ||
4608+ (gui.in_use
4609+# ifdef UNIX
4610+ && getuid() != 0
4611+# endif
4612+ ) ||
4613 # endif
4614 parmp->serverName_arg != NULL))
4615 {
4616diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
4617--- vim70.orig/src/Makefile 2006-05-07 06:25:27.000000000 -0700
4618+++ vim70/src/Makefile 2006-09-11 08:57:41.000000000 -0700
4619@@ -2177,6 +2177,7 @@
4620 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
4621 if test -d $(RSRC_DIR); then \
4622 cd $(SHADOWDIR); \
4623+ ln -s ../infplist.xml .; \
4624 ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \
4625 fi
4626 mkdir $(SHADOWDIR)/testdir
4627@@ -2260,7 +2261,7 @@
4628 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
4629 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh
4630
4631-QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
4632+QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
4633 auto/pathdef.c: Makefile auto/config.mk
4634 -@echo creating $@
4635 -@echo '/* pathdef.c */' > $@
4636diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c
4637--- vim70.orig/src/mbyte.c 2006-04-30 04:51:01.000000000 -0700
4638+++ vim70/src/mbyte.c 2006-09-11 08:23:16.000000000 -0700
4639@@ -311,7 +311,11 @@
4640
4641 #define IDX_MACROMAN 57
4642 {"macroman", ENC_8BIT + ENC_MACROMAN, 0}, /* Mac OS */
4643-#define IDX_COUNT 58
4644+#define IDX_DECMCS 58
4645+ {"dec-mcs", ENC_8BIT, 0}, /* DEC MCS */
4646+#define IDX_HPROMAN8 59
4647+ {"hp-roman8", ENC_8BIT, 0}, /* HP Roman8 */
4648+#define IDX_COUNT 60
4649 };
4650
4651 /*
4652@@ -359,6 +363,8 @@
4653 {"932", IDX_CP932},
4654 {"949", IDX_CP949},
4655 {"936", IDX_CP936},
4656+ {"gbk", IDX_CP936},
4657+ {"gb18030", IDX_CP936}, /* only 99% the same */
4658 {"950", IDX_CP950},
4659 {"eucjp", IDX_EUC_JP},
4660 {"unix-jis", IDX_EUC_JP},
4661@@ -386,6 +392,7 @@
4662 {"950", IDX_BIG5},
4663 #endif
4664 {"mac", IDX_MACROMAN},
4665+ {"mac-roman", IDX_MACROMAN},
4666 {NULL, 0}
4667 };
4668
4669@@ -3507,6 +3514,11 @@
4670 add_to_input_buf(delkey, (int)sizeof(delkey));
4671 }
4672
4673+/*
4674+ * Move the cursor left by "num_move_back" characters.
4675+ * Note that ins_left() checks im_is_preediting() to avoid breaking undo for
4676+ * these K_LEFT keys.
4677+ */
4678 static void
4679 im_correct_cursor(int num_move_back)
4680 {
4681@@ -3734,8 +3746,7 @@
4682 }
4683 else if (cursor_index == 0 && preedit_string[0] == '\0')
4684 {
4685- if (preedit_start_col == MAXCOL)
4686- xim_has_preediting = FALSE;
4687+ xim_has_preediting = FALSE;
4688
4689 /* If at the start position (after typing backspace)
4690 * preedit_start_col must be reset. */
4691@@ -3850,13 +3861,13 @@
4692
4693 if (preedit_string != NULL && attr_list != NULL)
4694 {
4695- int index;
4696+ int idx;
4697
4698 /* Get the byte index as used by PangoAttrIterator */
4699- for (index = 0; col > 0 && preedit_string[index] != '\0'; --col)
4700- index += utfc_ptr2len((char_u *)preedit_string + index);
4701+ for (idx = 0; col > 0 && preedit_string[idx] != '\0'; --col)
4702+ idx += utfc_ptr2len((char_u *)preedit_string + idx);
4703
4704- if (preedit_string[index] != '\0')
4705+ if (preedit_string[idx] != '\0')
4706 {
4707 PangoAttrIterator *iter;
4708 int start, end;
4709@@ -3869,7 +3880,7 @@
4710 {
4711 pango_attr_iterator_range(iter, &start, &end);
4712
4713- if (index >= start && index < end)
4714+ if (idx >= start && idx < end)
4715 char_attr |= translate_pango_attributes(iter);
4716 }
4717 while (pango_attr_iterator_next(iter));
4718diff -Naur vim70.orig/src/memline.c vim70/src/memline.c
4719--- vim70.orig/src/memline.c 2006-04-20 14:00:21.000000000 -0700
4720+++ vim70/src/memline.c 2006-09-11 08:23:16.000000000 -0700
4721@@ -215,7 +215,7 @@
4722 #define ML_FLUSH 0x02 /* flush locked block */
4723 #define ML_SIMPLE(x) (x & 0x10) /* DEL, INS or FIND */
4724
4725-static void ml_upd_block0 __ARGS((buf_T *buf, int setfname));
4726+static void ml_upd_block0 __ARGS((buf_T *buf, int set_fname));
4727 static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf));
4728 static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf));
4729 #ifdef FEAT_MBYTE
4730@@ -679,9 +679,9 @@
4731 * Update the timestamp or the B0_SAME_DIR flag of the .swp file.
4732 */
4733 static void
4734-ml_upd_block0(buf, setfname)
4735+ml_upd_block0(buf, set_fname)
4736 buf_T *buf;
4737- int setfname;
4738+ int set_fname;
4739 {
4740 memfile_T *mfp;
4741 bhdr_T *hp;
4742@@ -695,7 +695,7 @@
4743 EMSG(_("E304: ml_upd_block0(): Didn't get block 0??"));
4744 else
4745 {
4746- if (setfname)
4747+ if (set_fname)
4748 set_b0_fname(b0p, buf);
4749 else
4750 set_b0_dir_flag(b0p, buf);
4751diff -Naur vim70.orig/src/menu.c vim70/src/menu.c
4752--- vim70.orig/src/menu.c 2006-05-03 10:30:48.000000000 -0700
4753+++ vim70/src/menu.c 2006-08-19 16:40:11.000000000 -0700
4754@@ -511,6 +511,14 @@
4755 * name (without mnemonic and accelerator text). */
4756 next_name = menu_name_skip(name);
4757 dname = menu_text(name, NULL, NULL);
4758+ if (dname == NULL)
4759+ goto erret;
4760+ if (*dname == NUL)
4761+ {
4762+ /* Only a mnemonic or accelerator is not valid. */
4763+ EMSG(_("E792: Empty menu name"));
4764+ goto erret;
4765+ }
4766
4767 /* See if it's already there */
4768 lower_pri = menup;
4769@@ -704,6 +712,7 @@
4770 parent = menu;
4771 name = next_name;
4772 vim_free(dname);
4773+ dname = NULL;
4774 if (pri_tab[pri_idx + 1] != -1)
4775 ++pri_idx;
4776 }
4777@@ -793,6 +802,22 @@
4778 erret:
4779 vim_free(path_name);
4780 vim_free(dname);
4781+
4782+ /* Delete any empty submenu we added before discovering the error. Repeat
4783+ * for higher levels. */
4784+ while (parent != NULL && parent->children == NULL)
4785+ {
4786+ if (parent->parent == NULL)
4787+ menup = &root_menu;
4788+ else
4789+ menup = &parent->parent->children;
4790+ for ( ; *menup != NULL && *menup != parent; menup = &((*menup)->next))
4791+ ;
4792+ if (*menup == NULL) /* safety check */
4793+ break;
4794+ parent = parent->parent;
4795+ free_menu(menup);
4796+ }
4797 return FAIL;
4798 }
4799
4800@@ -1753,6 +1778,27 @@
4801 }
4802
4803 /*
4804+ * Check that a pointer appears in the menu tree. Used to protect from using
4805+ * a menu that was deleted after it was selected but before the event was
4806+ * handled.
4807+ * Return OK or FAIL. Used recursively.
4808+ */
4809+ int
4810+check_menu_pointer(root, menu_to_check)
4811+ vimmenu_T *root;
4812+ vimmenu_T *menu_to_check;
4813+{
4814+ vimmenu_T *p;
4815+
4816+ for (p = root; p != NULL; p = p->next)
4817+ if (p == menu_to_check
4818+ || (p->children != NULL
4819+ && check_menu_pointer(p->children, menu_to_check) == OK))
4820+ return OK;
4821+ return FAIL;
4822+}
4823+
4824+/*
4825 * After we have started the GUI, then we can create any menus that have been
4826 * defined. This is done once here. add_menu_path() may have already been
4827 * called to define these menus, and may be called again. This function calls
4828diff -Naur vim70.orig/src/message.c vim70/src/message.c
4829--- vim70.orig/src/message.c 2006-05-06 13:07:37.000000000 -0700
4830+++ vim70/src/message.c 2006-09-11 08:59:06.000000000 -0700
4831@@ -1925,7 +1925,8 @@
4832 * If screen is completely filled and 'more' is set then wait
4833 * for a character.
4834 */
4835- if (p_more && --lines_left == 0 && State != HITRETURN
4836+ --lines_left;
4837+ if (p_more && lines_left == 0 && State != HITRETURN
4838 && !msg_no_more && !exmode_active)
4839 {
4840 #ifdef FEAT_CON_DIALOG
4841@@ -4175,15 +4176,16 @@
4842 str_arg_l = 0;
4843 else
4844 {
4845- /* memchr on HP does not like n > 2^31 !!! */
4846- char *q = memchr(str_arg, '\0',
4847+ /* Don't put the #if inside memchr(), it can be a
4848+ * macro. */
4849 #if SIZEOF_INT <= 2
4850- precision
4851+ char *q = memchr(str_arg, '\0', precision);
4852 #else
4853- precision <= (size_t)0x7fffffffL ? precision
4854- : (size_t)0x7fffffffL
4855+ /* memchr on HP does not like n > 2^31 !!! */
4856+ char *q = memchr(str_arg, '\0',
4857+ precision <= (size_t)0x7fffffffL ? precision
4858+ : (size_t)0x7fffffffL);
4859 #endif
4860- );
4861 str_arg_l = (q == NULL) ? precision : q - str_arg;
4862 }
4863 break;
4864diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c
4865--- vim70.orig/src/misc1.c 2006-04-30 08:30:02.000000000 -0700
4866+++ vim70/src/misc1.c 2006-09-11 09:03:25.000000000 -0700
4867@@ -3016,6 +3016,7 @@
4868 int len = 0;
4869 int n;
4870 int save_mapped_ctrl_c = mapped_ctrl_c;
4871+ int waited = 0;
4872
4873 mapped_ctrl_c = FALSE; /* mappings are not used here */
4874 for (;;)
4875@@ -3034,11 +3035,16 @@
4876 /* Replace zero and CSI by a special key code. */
4877 n = fix_input_buffer(buf + len, n, FALSE);
4878 len += n;
4879+ waited = 0;
4880 }
4881+ else if (len > 0)
4882+ ++waited; /* keep track of the waiting time */
4883
4884- /* incomplete termcode: get more characters */
4885- if ((n = check_termcode(1, buf, len)) < 0)
4886+ /* Incomplete termcode and not timed out yet: get more characters */
4887+ if ((n = check_termcode(1, buf, len)) < 0
4888+ && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm)))
4889 continue;
4890+
4891 /* found a termcode: adjust length */
4892 if (n > 0)
4893 len = n;
4894@@ -3196,14 +3202,12 @@
4895 else
4896 MSG_PUTS(_("Choice number (<Enter> cancels): "));
4897
4898- /* Set the state such that text can be selected/copied/pasted. */
4899+ /* Set the state such that text can be selected/copied/pasted and we still
4900+ * get mouse events. */
4901 save_cmdline_row = cmdline_row;
4902- cmdline_row = Rows - 1;
4903+ cmdline_row = 0;
4904 save_State = State;
4905- if (mouse_used == NULL)
4906- State = CMDLINE;
4907- else
4908- State = NORMAL;
4909+ State = CMDLINE;
4910
4911 i = get_number(TRUE, mouse_used);
4912 if (KeyTyped)
4913@@ -4492,7 +4496,7 @@
4914 int l = mb_ptr2len(s);
4915
4916 while (--l > 0)
4917- *d++ = *s++;
4918+ *d++ = *++s;
4919 }
4920 # endif
4921 }
4922diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c
4923--- vim70.orig/src/netbeans.c 2006-04-22 11:00:05.000000000 -0700
4924+++ vim70/src/netbeans.c 2006-09-11 08:23:16.000000000 -0700
4925@@ -103,7 +103,7 @@
4926 static int inputHandler = -1; /* simply ret.value of WSAAsyncSelect() */
4927 extern HWND s_hwnd; /* Gvim's Window handle */
4928 #endif
4929-static int cmdno; /* current command number for reply */
4930+static int r_cmdno; /* current command number for reply */
4931 static int haveConnection = FALSE; /* socket is connected and
4932 initialization is done */
4933 #ifdef FEAT_GUI_MOTIF
4934@@ -832,11 +832,11 @@
4935 return;
4936 }
4937
4938- cmdno = strtol(q, &q, 10);
4939+ r_cmdno = strtol(q, &q, 10);
4940
4941 q = (char *)skipwhite((char_u *)q);
4942
4943- if (nb_do_cmd(bufno, (char_u *)verb, isfunc, cmdno, (char_u *)q) == FAIL)
4944+ if (nb_do_cmd(bufno, (char_u *)verb, isfunc, r_cmdno, (char_u *)q) == FAIL)
4945 {
4946 #ifdef NBDEBUG
4947 /*
4948@@ -1008,11 +1008,11 @@
4949 if (netbeansForcedQuit)
4950 {
4951 /* mark as unmodified so NetBeans won't put up dialog on "killed" */
4952- sprintf(buf, "%d:unmodified=%d\n", i, cmdno);
4953+ sprintf(buf, "%d:unmodified=%d\n", i, r_cmdno);
4954 nbdebug(("EVT: %s", buf));
4955 nb_send(buf, "netbeans_end");
4956 }
4957- sprintf(buf, "%d:killed=%d\n", i, cmdno);
4958+ sprintf(buf, "%d:killed=%d\n", i, r_cmdno);
4959 nbdebug(("EVT: %s", buf));
4960 /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */
4961 if (sd >= 0)
4962@@ -1986,6 +1986,8 @@
4963 if (buf->bufp != NULL)
4964 do_buffer(DOBUF_WIPE, DOBUF_FIRST, FORWARD,
4965 buf->bufp->b_fnum, TRUE);
4966+ buf->bufp = NULL;
4967+ buf->initDone = FALSE;
4968 doupdate = 1;
4969 /* =====================================================================*/
4970 }
4971@@ -2561,7 +2563,7 @@
4972 if (p != NULL)
4973 {
4974 vim_snprintf(buf, sizeof(buf),
4975- "0:balloonText=%d \"%s\"\n", cmdno, p);
4976+ "0:balloonText=%d \"%s\"\n", r_cmdno, p);
4977 vim_free(p);
4978 }
4979 nbdebug(("EVT: %s", buf));
4980@@ -2615,7 +2617,7 @@
4981
4982 if (haveConnection)
4983 {
4984- sprintf(buf, "0:disconnect=%d\n", cmdno);
4985+ sprintf(buf, "0:disconnect=%d\n", r_cmdno);
4986 nbdebug(("EVT: %s", buf));
4987 nb_send(buf, "netbeans_disconnect");
4988 }
4989@@ -2634,7 +2636,7 @@
4990 return;
4991
4992 sprintf(buf, "0:geometry=%d %d %d %d %d\n",
4993- cmdno, (int)Columns, (int)Rows, new_x, new_y);
4994+ r_cmdno, (int)Columns, (int)Rows, new_x, new_y);
4995 /*nbdebug(("EVT: %s", buf)); happens too many times during a move */
4996 nb_send(buf, "netbeans_frame_moved");
4997 }
4998@@ -2743,7 +2745,7 @@
4999 if (bufno <= 0)
5000 return;
5001
5002- sprintf(buffer, "%d:killed=%d\n", bufno, cmdno);
5003+ sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno);
5004
5005 nbdebug(("EVT: %s", buffer));
5006
5007@@ -2817,7 +2819,8 @@
5008 if (p != NULL)
5009 {
5010 buf = alloc(128 + 2*newlen);
5011- sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", bufno, cmdno, off, p);
5012+ sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n",
5013+ bufno, r_cmdno, off, p);
5014 nbdebug(("EVT: %s", buf));
5015 nb_send((char *)buf, "netbeans_inserted");
5016 vim_free(p);
5017@@ -2859,7 +2862,7 @@
5018
5019 off = pos2off(bufp, &pos);
5020
5021- sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, cmdno, off, len);
5022+ sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, r_cmdno, off, len);
5023 nbdebug(("EVT: %s", buf));
5024 nb_send((char *)buf, "netbeans_removed");
5025 }
5026@@ -2884,7 +2887,7 @@
5027
5028 nbbuf->modified = 0;
5029
5030- sprintf((char *)buf, "%d:unmodified=%d\n", bufno, cmdno);
5031+ sprintf((char *)buf, "%d:unmodified=%d\n", bufno, r_cmdno);
5032 nbdebug(("EVT: %s", buf));
5033 nb_send((char *)buf, "netbeans_unmodified");
5034 #endif
5035@@ -2908,11 +2911,11 @@
5036 long off = pos2off(curbuf, &curwin->w_cursor);
5037
5038 /* sync the cursor position */
5039- sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
5040+ sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off);
5041 nbdebug(("EVT: %s", buf));
5042 nb_send(buf, "netbeans_button_release[newDotAndMark]");
5043
5044- sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, cmdno,
5045+ sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, r_cmdno,
5046 button, (long)curwin->w_cursor.lnum, col);
5047 nbdebug(("EVT: %s", buf));
5048 nb_send(buf, "netbeans_button_release");
5049@@ -2973,7 +2976,7 @@
5050
5051 /* sync the cursor position */
5052 off = pos2off(curbuf, &curwin->w_cursor);
5053- sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
5054+ sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off);
5055 nbdebug(("EVT: %s", buf));
5056 nb_send(buf, "netbeans_keycommand");
5057
5058@@ -2984,13 +2987,13 @@
5059
5060 /* now send keyCommand event */
5061 vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n",
5062- bufno, cmdno, keyName);
5063+ bufno, r_cmdno, keyName);
5064 nbdebug(("EVT: %s", buf));
5065 nb_send(buf, "netbeans_keycommand");
5066
5067 /* New: do both at once and include the lnum/col. */
5068 vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n",
5069- bufno, cmdno, keyName,
5070+ bufno, r_cmdno, keyName,
5071 off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col);
5072 nbdebug(("EVT: %s", buf));
5073 nb_send(buf, "netbeans_keycommand");
5074@@ -3013,7 +3016,7 @@
5075
5076 nbbuf->modified = 0;
5077
5078- sprintf((char *)buf, "%d:save=%d\n", bufno, cmdno);
5079+ sprintf((char *)buf, "%d:save=%d\n", bufno, r_cmdno);
5080 nbdebug(("EVT: %s", buf));
5081 nb_send((char *)buf, "netbeans_save_buffer");
5082 }
5083@@ -3037,7 +3040,7 @@
5084 if (nbbuf->insertDone)
5085 nbbuf->modified = 1;
5086
5087- sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, cmdno);
5088+ sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, r_cmdno);
5089 nbdebug(("EVT(suppressed): %s", buf));
5090 /* nb_send(buf, "netbeans_deleted_all_lines"); */
5091 }
5092diff -Naur vim70.orig/src/normal.c vim70/src/normal.c
5093--- vim70.orig/src/normal.c 2006-04-29 06:11:18.000000000 -0700
5094+++ vim70/src/normal.c 2006-09-11 08:23:16.000000000 -0700
5095@@ -2504,7 +2504,8 @@
5096 * NOTE: Ignore right button down and drag mouse events.
5097 * Windows only shows the popup menu on the button up event.
5098 */
5099-#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON)
5100+#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
5101+ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)
5102 if (!is_click)
5103 return FALSE;
5104 #endif
5105@@ -4126,7 +4127,7 @@
5106 int save_p_ws;
5107 int save_p_scs;
5108 int retval = OK;
5109- int incl;
5110+ int incll;
5111
5112 if ((pat = alloc(len + 7)) == NULL)
5113 return FAIL;
5114@@ -4146,7 +4147,7 @@
5115 * With "gd" Search back for the start of the current function, then go
5116 * back until a blank line. If this fails go to line 1.
5117 */
5118- if (!locally || !findpar(&incl, BACKWARD, 1L, '{', FALSE))
5119+ if (!locally || !findpar(&incll, BACKWARD, 1L, '{', FALSE))
5120 {
5121 setpcmark(); /* Set in findpar() otherwise */
5122 curwin->w_cursor.lnum = 1;
5123diff -Naur vim70.orig/src/ops.c vim70/src/ops.c
5124--- vim70.orig/src/ops.c 2006-04-30 08:13:44.000000000 -0700
5125+++ vim70/src/ops.c 2006-08-09 08:33:53.000000000 -0700
5126@@ -2413,6 +2413,7 @@
5127 else
5128 {
5129 curwin->w_cursor = oap->end;
5130+ check_cursor_col();
5131
5132 /* Works just like an 'i'nsert on the next character. */
5133 if (!lineempty(curwin->w_cursor.lnum)
5134@@ -3492,8 +3493,15 @@
5135 # endif
5136 if (flags & PUT_CURSEND)
5137 {
5138+ colnr_T len;
5139+
5140 curwin->w_cursor = curbuf->b_op_end;
5141 curwin->w_cursor.col++;
5142+
5143+ /* in Insert mode we might be after the NUL, correct for that */
5144+ len = (colnr_T)STRLEN(ml_get_curline());
5145+ if (curwin->w_cursor.col > len)
5146+ curwin->w_cursor.col = len;
5147 }
5148 else
5149 curwin->w_cursor.lnum = lnum;
5150diff -Naur vim70.orig/src/option.c vim70/src/option.c
5151--- vim70.orig/src/option.c 2006-05-03 10:32:28.000000000 -0700
5152+++ vim70/src/option.c 2006-09-11 09:01:59.000000000 -0700
5153@@ -2294,7 +2294,7 @@
5154 {(char_u *)0L, (char_u *)0L}
5155 #endif
5156 },
5157- {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
5158+ {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA,
5159 #ifdef FEAT_SPELL
5160 (char_u *)&p_sps, PV_NONE,
5161 {(char_u *)"best", (char_u *)0L}
5162@@ -5227,13 +5227,13 @@
5163 case PV_STL: return &curwin->w_p_stl_flags;
5164 #endif
5165 #ifdef FEAT_EVAL
5166+# ifdef FEAT_FOLDING
5167 case PV_FDE: return &curwin->w_p_fde_flags;
5168 case PV_FDT: return &curwin->w_p_fdt_flags;
5169+# endif
5170 # ifdef FEAT_BEVAL
5171 case PV_BEXPR: return &curbuf->b_p_bexpr_flags;
5172 # endif
5173-#endif
5174-#if defined(FEAT_EVAL)
5175 # if defined(FEAT_CINDENT)
5176 case PV_INDE: return &curbuf->b_p_inde_flags;
5177 # endif
5178@@ -5268,45 +5268,46 @@
5179 char_u *s;
5180 char_u **varp;
5181 int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0;
5182+ int idx = opt_idx;
5183
5184- if (opt_idx == -1) /* use name */
5185+ if (idx == -1) /* use name */
5186 {
5187- opt_idx = findoption(name);
5188- if (opt_idx < 0) /* not found (should not happen) */
5189+ idx = findoption(name);
5190+ if (idx < 0) /* not found (should not happen) */
5191 {
5192 EMSG2(_(e_intern2), "set_string_option_direct()");
5193 return;
5194 }
5195 }
5196
5197- if (options[opt_idx].var == NULL) /* can't set hidden option */
5198+ if (options[idx].var == NULL) /* can't set hidden option */
5199 return;
5200
5201 s = vim_strsave(val);
5202 if (s != NULL)
5203 {
5204- varp = (char_u **)get_varp_scope(&(options[opt_idx]),
5205+ varp = (char_u **)get_varp_scope(&(options[idx]),
5206 both ? OPT_LOCAL : opt_flags);
5207- if ((opt_flags & OPT_FREE) && (options[opt_idx].flags & P_ALLOCED))
5208+ if ((opt_flags & OPT_FREE) && (options[idx].flags & P_ALLOCED))
5209 free_string_option(*varp);
5210 *varp = s;
5211
5212 /* For buffer/window local option may also set the global value. */
5213 if (both)
5214- set_string_option_global(opt_idx, varp);
5215+ set_string_option_global(idx, varp);
5216
5217- options[opt_idx].flags |= P_ALLOCED;
5218+ options[idx].flags |= P_ALLOCED;
5219
5220 /* When setting both values of a global option with a local value,
5221 * make the local value empty, so that the global value is used. */
5222- if (((int)options[opt_idx].indir & PV_BOTH) && both)
5223+ if (((int)options[idx].indir & PV_BOTH) && both)
5224 {
5225 free_string_option(*varp);
5226 *varp = empty_option;
5227 }
5228 # ifdef FEAT_EVAL
5229 if (set_sid != SID_NONE)
5230- set_option_scriptID_idx(opt_idx, opt_flags,
5231+ set_option_scriptID_idx(idx, opt_flags,
5232 set_sid == 0 ? current_SID : set_sid);
5233 # endif
5234 }
5235@@ -6325,7 +6326,8 @@
5236 else
5237 errmsg = check_stl_option(p_ruf);
5238 }
5239- else
5240+ /* check 'statusline' only if it doesn't start with "%!" */
5241+ else if (varp != &p_stl || s[0] != '%' || s[1] != '!')
5242 errmsg = check_stl_option(s);
5243 if (varp == &p_ruf && errmsg == NULL)
5244 comp_col();
5245@@ -7324,9 +7326,8 @@
5246 #ifdef FEAT_AUTOCHDIR
5247 else if ((int *)varp == &p_acd)
5248 {
5249- if (p_acd && curbuf->b_ffname != NULL
5250- && vim_chdirfile(curbuf->b_ffname) == OK)
5251- shorten_fnames(TRUE);
5252+ /* Change directories when the 'acd' option is set now. */
5253+ DO_AUTOCHDIR
5254 }
5255 #endif
5256
5257diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c
5258--- vim70.orig/src/os_unix.c 2006-05-01 01:13:15.000000000 -0700
5259+++ vim70/src/os_unix.c 2006-09-11 08:23:16.000000000 -0700
5260@@ -3934,7 +3934,7 @@
5261 {
5262 linenr_T lnum = curbuf->b_op_start.lnum;
5263 int written = 0;
5264- char_u *p = ml_get(lnum);
5265+ char_u *lp = ml_get(lnum);
5266 char_u *s;
5267 size_t l;
5268
5269@@ -3942,17 +3942,17 @@
5270 close(fromshell_fd);
5271 for (;;)
5272 {
5273- l = STRLEN(p + written);
5274+ l = STRLEN(lp + written);
5275 if (l == 0)
5276 len = 0;
5277- else if (p[written] == NL)
5278+ else if (lp[written] == NL)
5279 /* NL -> NUL translation */
5280 len = write(toshell_fd, "", (size_t)1);
5281 else
5282 {
5283- s = vim_strchr(p + written, NL);
5284- len = write(toshell_fd, (char *)p + written,
5285- s == NULL ? l : s - (p + written));
5286+ s = vim_strchr(lp + written, NL);
5287+ len = write(toshell_fd, (char *)lp + written,
5288+ s == NULL ? l : s - (lp + written));
5289 }
5290 if (len == l)
5291 {
5292@@ -3973,7 +3973,7 @@
5293 toshell_fd = -1;
5294 break;
5295 }
5296- p = ml_get(lnum);
5297+ lp = ml_get(lnum);
5298 written = 0;
5299 }
5300 else if (len > 0)
5301@@ -4971,7 +4971,8 @@
5302 if (((*file)[*num_file] = alloc(len + 2)) != NULL)
5303 {
5304 STRCPY((*file)[*num_file], p);
5305- if (!after_pathsep((*file)[*num_file] + len))
5306+ if (!after_pathsep((*file)[*num_file],
5307+ (*file)[*num_file] + len))
5308 {
5309 (*file)[*num_file][len] = psepc;
5310 (*file)[*num_file][len + 1] = NUL;
5311@@ -5757,8 +5758,13 @@
5312 int retval_int = 0;
5313 int success = FALSE;
5314
5315- /* Get a handle to the DLL module. */
5316+ /*
5317+ * Get a handle to the DLL module.
5318+ */
5319 # if defined(USE_DLOPEN)
5320+ /* First clear any error, it's not cleared by the dlopen() call. */
5321+ (void)dlerror();
5322+
5323 hinstLib = dlopen((char *)libname, RTLD_LAZY
5324 # ifdef RTLD_LOCAL
5325 | RTLD_LOCAL
5326diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c
5327--- vim70.orig/src/popupmnu.c 2006-04-20 13:18:37.000000000 -0700
5328+++ vim70/src/popupmnu.c 2006-08-27 12:48:28.000000000 -0700
5329@@ -552,6 +552,9 @@
5330 {
5331 pum_array = NULL;
5332 redraw_all_later(SOME_VALID);
5333+#ifdef FEAT_WINDOWS
5334+ redraw_tabline = TRUE;
5335+#endif
5336 status_redraw_all();
5337 }
5338
5339diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro
5340--- vim70.orig/src/proto/buffer.pro 2006-05-07 06:08:29.000000000 -0700
5341+++ vim70/src/proto/buffer.pro 2006-09-11 09:01:59.000000000 -0700
5342@@ -10,6 +10,7 @@
5343 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit));
5344 extern void set_curbuf __ARGS((buf_T *buf, int action));
5345 extern void enter_buffer __ARGS((buf_T *buf));
5346+extern void do_autochdir __ARGS((void));
5347 extern buf_T *buflist_new __ARGS((char_u *ffname, char_u *sfname, linenr_T lnum, int flags));
5348 extern void free_buf_options __ARGS((buf_T *buf, int free_p_ff));
5349 extern int buflist_getfile __ARGS((int n, linenr_T lnum, int options, int forceit));
5350diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro
5351--- vim70.orig/src/proto/menu.pro 2006-05-07 06:08:51.000000000 -0700
5352+++ vim70/src/proto/menu.pro 2006-08-19 16:40:11.000000000 -0700
5353@@ -10,6 +10,7 @@
5354 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu));
5355 extern int menu_is_toolbar __ARGS((char_u *name));
5356 extern int menu_is_separator __ARGS((char_u *name));
5357+extern int check_menu_pointer __ARGS((vimmenu_T *root, vimmenu_T *menu_to_check));
5358 extern void gui_create_initial_menus __ARGS((vimmenu_T *menu));
5359 extern void gui_update_menus __ARGS((int modes));
5360 extern int gui_is_menu_shortcut __ARGS((int key));
5361diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro
5362--- vim70.orig/src/proto/undo.pro 2006-05-07 06:09:11.000000000 -0700
5363+++ vim70/src/proto/undo.pro 2006-07-14 10:51:11.000000000 -0700
5364@@ -4,6 +4,7 @@
5365 extern int u_savesub __ARGS((linenr_T lnum));
5366 extern int u_inssub __ARGS((linenr_T lnum));
5367 extern int u_savedel __ARGS((linenr_T lnum, long nlines));
5368+extern int undo_allowed __ARGS((void));
5369 extern void u_undo __ARGS((int count));
5370 extern void u_redo __ARGS((int count));
5371 extern void undo_time __ARGS((long step, int sec, int absolute));
5372diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c
5373--- vim70.orig/src/quickfix.c 2006-05-03 00:47:42.000000000 -0700
5374+++ vim70/src/quickfix.c 2006-09-11 09:00:46.000000000 -0700
5375@@ -500,8 +500,6 @@
5376 {
5377 if (tv != NULL)
5378 {
5379- int len;
5380-
5381 if (tv->v_type == VAR_STRING)
5382 {
5383 /* Get the next line from the supplied string */
5384@@ -602,13 +600,19 @@
5385 else
5386 type = 0;
5387 /*
5388- * Extract error message data from matched line
5389+ * Extract error message data from matched line.
5390+ * We check for an actual submatch, because "\[" and "\]" in
5391+ * the 'errorformat' may cause the wrong submatch to be used.
5392 */
5393 if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */
5394 {
5395- int c = *regmatch.endp[i];
5396+ int c;
5397+
5398+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
5399+ continue;
5400
5401 /* Expand ~/file and $HOME/file to full path. */
5402+ c = *regmatch.endp[i];
5403 *regmatch.endp[i] = NUL;
5404 expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
5405 *regmatch.endp[i] = c;
5406@@ -618,35 +622,63 @@
5407 continue;
5408 }
5409 if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */
5410+ {
5411+ if (regmatch.startp[i] == NULL)
5412+ continue;
5413 enr = (int)atol((char *)regmatch.startp[i]);
5414+ }
5415 if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */
5416+ {
5417+ if (regmatch.startp[i] == NULL)
5418+ continue;
5419 lnum = atol((char *)regmatch.startp[i]);
5420+ }
5421 if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */
5422+ {
5423+ if (regmatch.startp[i] == NULL)
5424+ continue;
5425 col = (int)atol((char *)regmatch.startp[i]);
5426+ }
5427 if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */
5428+ {
5429+ if (regmatch.startp[i] == NULL)
5430+ continue;
5431 type = *regmatch.startp[i];
5432+ }
5433 if (fmt_ptr->flags == '+' && !multiscan) /* %+ */
5434 STRCPY(errmsg, IObuff);
5435 else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */
5436 {
5437+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
5438+ continue;
5439 len = (int)(regmatch.endp[i] - regmatch.startp[i]);
5440 vim_strncpy(errmsg, regmatch.startp[i], len);
5441 }
5442 if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */
5443+ {
5444+ if (regmatch.startp[i] == NULL)
5445+ continue;
5446 tail = regmatch.startp[i];
5447+ }
5448 if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */
5449 {
5450+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
5451+ continue;
5452 col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1);
5453 if (*((char_u *)regmatch.startp[i]) != TAB)
5454 use_viscol = TRUE;
5455 }
5456 if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */
5457 {
5458+ if (regmatch.startp[i] == NULL)
5459+ continue;
5460 col = (int)atol((char *)regmatch.startp[i]);
5461 use_viscol = TRUE;
5462 }
5463 if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */
5464 {
5465+ if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
5466+ continue;
5467 len = (int)(regmatch.endp[i] - regmatch.startp[i]);
5468 if (len > CMDBUFFSIZE - 5)
5469 len = CMDBUFFSIZE - 5;
5470@@ -2429,32 +2461,19 @@
5471 qf_info_T *qi;
5472 {
5473 buf_T *buf;
5474-#ifdef FEAT_AUTOCMD
5475 aco_save_T aco;
5476-#else
5477- buf_T *save_curbuf;
5478-#endif
5479
5480 /* Check if a buffer for the quickfix list exists. Update it. */
5481 buf = qf_find_buf(qi);
5482 if (buf != NULL)
5483 {
5484-#ifdef FEAT_AUTOCMD
5485 /* set curwin/curbuf to buf and save a few things */
5486 aucmd_prepbuf(&aco, buf);
5487-#else
5488- save_curbuf = curbuf;
5489- curbuf = buf;
5490-#endif
5491
5492 qf_fill_buffer(qi);
5493
5494-#ifdef FEAT_AUTOCMD
5495 /* restore curwin/curbuf and a few other things */
5496 aucmd_restbuf(&aco);
5497-#else
5498- curbuf = save_curbuf;
5499-#endif
5500
5501 (void)qf_win_pos_update(qi, 0);
5502 }
5503@@ -2943,10 +2962,8 @@
5504 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
5505 char_u *save_ei = NULL;
5506 #endif
5507-#ifndef FEAT_AUTOCMD
5508- buf_T *save_curbuf;
5509-#else
5510 aco_save_T aco;
5511+#ifdef FEAT_AUTOCMD
5512 char_u *au_name = NULL;
5513 int flags = 0;
5514 colnr_T col;
5515@@ -3167,24 +3184,13 @@
5516 * need to be done now, in that buffer. And the modelines
5517 * need to be done (again). But not the window-local
5518 * options! */
5519-#if defined(FEAT_AUTOCMD)
5520 aucmd_prepbuf(&aco, buf);
5521-#else
5522- save_curbuf = curbuf;
5523- curbuf = buf;
5524- curwin->w_buffer = curbuf;
5525-#endif
5526 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
5527 apply_autocmds(EVENT_FILETYPE, buf->b_p_ft,
5528 buf->b_fname, TRUE, buf);
5529 #endif
5530 do_modelines(OPT_NOWIN);
5531-#if defined(FEAT_AUTOCMD)
5532 aucmd_restbuf(&aco);
5533-#else
5534- curbuf = save_curbuf;
5535- curwin->w_buffer = curbuf;
5536-#endif
5537 }
5538 }
5539 }
5540@@ -3285,11 +3291,7 @@
5541 {
5542 buf_T *newbuf;
5543 int failed = TRUE;
5544-#ifdef FEAT_AUTOCMD
5545 aco_save_T aco;
5546-#else
5547- buf_T *old_curbuf = curbuf;
5548-#endif
5549
5550 /* Allocate a buffer without putting it in the buffer list. */
5551 newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY);
5552@@ -3299,13 +3301,8 @@
5553 /* Init the options. */
5554 buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP);
5555
5556-#ifdef FEAT_AUTOCMD
5557 /* set curwin/curbuf to buf and save a few things */
5558 aucmd_prepbuf(&aco, newbuf);
5559-#else
5560- curbuf = newbuf;
5561- curwin->w_buffer = newbuf;
5562-#endif
5563
5564 /* Need to set the filename for autocommands. */
5565 (void)setfname(curbuf, fname, NULL, FALSE);
5566@@ -3336,13 +3333,8 @@
5567 }
5568 }
5569
5570-#ifdef FEAT_AUTOCMD
5571 /* restore curwin/curbuf and a few other things */
5572 aucmd_restbuf(&aco);
5573-#else
5574- curbuf = old_curbuf;
5575- curwin->w_buffer = old_curbuf;
5576-#endif
5577
5578 if (!buf_valid(newbuf))
5579 return NULL;
5580@@ -3434,8 +3426,10 @@
5581 || dict_add_nr_str(dict, "col", (long)qfp->qf_col, NULL) == FAIL
5582 || dict_add_nr_str(dict, "vcol", (long)qfp->qf_viscol, NULL) == FAIL
5583 || dict_add_nr_str(dict, "nr", (long)qfp->qf_nr, NULL) == FAIL
5584- || dict_add_nr_str(dict, "pattern", 0L, qfp->qf_pattern) == FAIL
5585- || dict_add_nr_str(dict, "text", 0L, qfp->qf_text) == FAIL
5586+ || dict_add_nr_str(dict, "pattern", 0L,
5587+ qfp->qf_pattern == NULL ? (char_u *)"" : qfp->qf_pattern) == FAIL
5588+ || dict_add_nr_str(dict, "text", 0L,
5589+ qfp->qf_text == NULL ? (char_u *)"" : qfp->qf_text) == FAIL
5590 || dict_add_nr_str(dict, "type", 0L, buf) == FAIL
5591 || dict_add_nr_str(dict, "valid", (long)qfp->qf_valid, NULL) == FAIL)
5592 return FAIL;
5593diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c
5594--- vim70.orig/src/regexp.c 2006-04-30 08:31:50.000000000 -0700
5595+++ vim70/src/regexp.c 2006-09-11 08:23:16.000000000 -0700
5596@@ -3912,7 +3912,7 @@
5597 {
5598 colnr_T start, end;
5599 colnr_T start2, end2;
5600- colnr_T col;
5601+ colnr_T cols;
5602
5603 getvvcol(wp, &top, &start, NULL, &end);
5604 getvvcol(wp, &bot, &start2, NULL, &end2);
5605@@ -3922,9 +3922,9 @@
5606 end = end2;
5607 if (top.col == MAXCOL || bot.col == MAXCOL)
5608 end = MAXCOL;
5609- col = win_linetabsize(wp,
5610+ cols = win_linetabsize(wp,
5611 regline, (colnr_T)(reginput - regline));
5612- if (col < start || col > end - (*p_sel == 'e'))
5613+ if (cols < start || cols > end - (*p_sel == 'e'))
5614 status = RA_NOMATCH;
5615 }
5616 }
5617@@ -4253,7 +4253,7 @@
5618 {
5619 int i, len;
5620 char_u *opnd;
5621- int opndc, inpc;
5622+ int opndc = 0, inpc;
5623
5624 opnd = OPERAND(scan);
5625 /* Safety check (just in case 'encoding' was changed since
5626diff -Naur vim70.orig/src/screen.c vim70/src/screen.c
5627--- vim70.orig/src/screen.c 2006-05-05 03:13:55.000000000 -0700
5628+++ vim70/src/screen.c 2006-09-11 08:23:16.000000000 -0700
5629@@ -2612,7 +2612,8 @@
5630 #ifdef FEAT_LINEBREAK
5631 int need_showbreak = FALSE;
5632 #endif
5633-#if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS))
5634+#if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \
5635+ || defined(FEAT_SYN_HL) || defined(FEAT_DIFF)
5636 # define LINE_ATTR
5637 int line_attr = 0; /* atrribute for the whole line */
5638 #endif
5639@@ -2626,7 +2627,7 @@
5640 int prev_c = 0; /* previous Arabic character */
5641 int prev_c1 = 0; /* first composing char for prev_c */
5642 #endif
5643-#if defined(FEAT_DIFF) || defined(LINE_ATTR)
5644+#if defined(LINE_ATTR)
5645 int did_line_attr = 0;
5646 #endif
5647
5648@@ -4116,17 +4117,12 @@
5649 --ptr; /* put it back at the NUL */
5650 }
5651 #endif
5652-#if defined(FEAT_DIFF) || defined(LINE_ATTR)
5653+#if defined(LINE_ATTR)
5654 else if ((
5655 # ifdef FEAT_DIFF
5656- diff_hlf != (hlf_T)0
5657-# ifdef LINE_ATTR
5658- ||
5659-# endif
5660+ diff_hlf != (hlf_T)0 ||
5661 # endif
5662-# ifdef LINE_ATTR
5663 line_attr != 0
5664-# endif
5665 ) && (
5666 # ifdef FEAT_RIGHTLEFT
5667 wp->w_p_rl ? (col >= 0) :
5668@@ -4237,7 +4233,7 @@
5669 * At end of the text line or just after the last character.
5670 */
5671 if (c == NUL
5672-#if defined(FEAT_DIFF) || defined(LINE_ATTR)
5673+#if defined(LINE_ATTR)
5674 || did_line_attr == 1
5675 #endif
5676 )
5677@@ -4258,7 +4254,7 @@
5678 || prevcol == (long)match_hl[0].startcol
5679 || prevcol == (long)match_hl[1].startcol
5680 || prevcol == (long)match_hl[2].startcol)
5681-# if defined(FEAT_DIFF) || defined(LINE_ATTR)
5682+# if defined(LINE_ATTR)
5683 && did_line_attr <= 1
5684 # endif
5685 )
5686@@ -7103,7 +7099,7 @@
5687 tabpage_T *tp;
5688 #endif
5689 static int entered = FALSE; /* avoid recursiveness */
5690- static int did_outofmem_msg = FALSE; /* did outofmem message */
5691+ static int done_outofmem_msg = FALSE; /* did outofmem message */
5692
5693 /*
5694 * Allocation of the screen buffers is done only when the size changes and
5695@@ -7133,6 +7129,12 @@
5696 return;
5697 entered = TRUE;
5698
5699+ /*
5700+ * Note that the window sizes are updated before reallocating the arrays,
5701+ * thus we must not redraw here!
5702+ */
5703+ ++RedrawingDisabled;
5704+
5705 win_new_shellsize(); /* fit the windows in the new sized shell */
5706
5707 comp_col(); /* recompute columns for shown command and ruler */
5708@@ -7205,14 +7207,14 @@
5709 #endif
5710 || outofmem)
5711 {
5712- if (ScreenLines != NULL || !did_outofmem_msg)
5713+ if (ScreenLines != NULL || !done_outofmem_msg)
5714 {
5715 /* guess the size */
5716 do_outofmem_msg((long_u)((Rows + 1) * Columns));
5717
5718 /* Remember we did this to avoid getting outofmem messages over
5719 * and over again. */
5720- did_outofmem_msg = TRUE;
5721+ done_outofmem_msg = TRUE;
5722 }
5723 vim_free(new_ScreenLines);
5724 new_ScreenLines = NULL;
5725@@ -7240,7 +7242,7 @@
5726 }
5727 else
5728 {
5729- did_outofmem_msg = FALSE;
5730+ done_outofmem_msg = FALSE;
5731
5732 for (new_row = 0; new_row < Rows; ++new_row)
5733 {
5734@@ -7367,6 +7369,7 @@
5735 #endif
5736
5737 entered = FALSE;
5738+ --RedrawingDisabled;
5739
5740 #ifdef FEAT_AUTOCMD
5741 if (starting == 0)
5742diff -Naur vim70.orig/src/search.c vim70/src/search.c
5743--- vim70.orig/src/search.c 2006-05-05 05:12:13.000000000 -0700
5744+++ vim70/src/search.c 2006-09-11 08:23:39.000000000 -0700
5745@@ -1259,7 +1259,7 @@
5746 /*
5747 * Add character and/or line offset
5748 */
5749- if (!(options & SEARCH_NOOF) || *pat == ';')
5750+ if (!(options & SEARCH_NOOF) || (pat != NULL && *pat == ';'))
5751 {
5752 if (spats[0].off.line) /* Add the offset to the line number. */
5753 {
5754@@ -4826,15 +4826,20 @@
5755
5756 if ((compl_cont_status & CONT_ADDING) && i == compl_length)
5757 {
5758- /* get the next line */
5759 /* IOSIZE > compl_length, so the STRNCPY works */
5760 STRNCPY(IObuff, aux, i);
5761- if (!( depth < 0
5762- && lnum < end_lnum
5763- && (line = ml_get(++lnum)) != NULL)
5764- && !( depth >= 0
5765- && !vim_fgets(line = file_line,
5766- LSIZE, files[depth].fp)))
5767+
5768+ /* Get the next line: when "depth" < 0 from the current
5769+ * buffer, otherwise from the included file. Jump to
5770+ * exit_matched when past the last line. */
5771+ if (depth < 0)
5772+ {
5773+ if (lnum >= end_lnum)
5774+ goto exit_matched;
5775+ line = ml_get(++lnum);
5776+ }
5777+ else if (vim_fgets(line = file_line,
5778+ LSIZE, files[depth].fp))
5779 goto exit_matched;
5780
5781 /* we read a line, set "already" to check this "line" later
5782@@ -4871,7 +4876,7 @@
5783 goto exit_matched;
5784 }
5785
5786- add_r = ins_compl_add_infercase(aux, i, FALSE,
5787+ add_r = ins_compl_add_infercase(aux, i, p_ic,
5788 curr_fname == curbuf->b_fname ? NULL : curr_fname,
5789 dir, reuse);
5790 if (add_r == OK)
5791diff -Naur vim70.orig/src/spell.c vim70/src/spell.c
5792--- vim70.orig/src/spell.c 2006-05-05 00:49:58.000000000 -0700
5793+++ vim70/src/spell.c 2006-09-11 08:23:16.000000000 -0700
5794@@ -2043,8 +2043,8 @@
5795 int len;
5796 # ifdef FEAT_SYN_HL
5797 int has_syntax = syntax_present(wp->w_buffer);
5798- int col;
5799 # endif
5800+ int col;
5801 int can_spell;
5802 char_u *buf = NULL;
5803 int buflen = 0;
5804@@ -2093,9 +2093,8 @@
5805 capcol = (int)(skipwhite(line) - line);
5806 else if (curline && wp == curwin)
5807 {
5808- int col = (int)(skipwhite(line) - line);
5809-
5810 /* For spellbadword(): check if first word needs a capital. */
5811+ col = (int)(skipwhite(line) - line);
5812 if (check_need_cap(lnum, col))
5813 capcol = col;
5814
5815@@ -2108,7 +2107,8 @@
5816 * possible. */
5817 STRCPY(buf, line);
5818 if (lnum < wp->w_buffer->b_ml.ml_line_count)
5819- spell_cat_line(buf + STRLEN(buf), ml_get(lnum + 1), MAXWLEN);
5820+ spell_cat_line(buf + STRLEN(buf),
5821+ ml_get_buf(wp->w_buffer, lnum + 1, FALSE), MAXWLEN);
5822
5823 p = buf + skip;
5824 endp = buf + len;
5825@@ -5060,7 +5060,7 @@
5826 int do_rep;
5827 int do_repsal;
5828 int do_sal;
5829- int do_map;
5830+ int do_mapline;
5831 int found_map = FALSE;
5832 hashitem_T *hi;
5833 int l;
5834@@ -5098,7 +5098,7 @@
5835 do_sal = spin->si_sal.ga_len == 0;
5836
5837 /* Only do MAP lines when not done in another .aff file already. */
5838- do_map = spin->si_map.ga_len == 0;
5839+ do_mapline = spin->si_map.ga_len == 0;
5840
5841 /*
5842 * Allocate and init the afffile_T structure.
5843@@ -5780,7 +5780,7 @@
5844 smsg((char_u *)_("Expected MAP count in %s line %d"),
5845 fname, lnum);
5846 }
5847- else if (do_map)
5848+ else if (do_mapline)
5849 {
5850 int c;
5851
5852@@ -7507,7 +7507,7 @@
5853 {
5854 char_u *p = p_msm;
5855 long start = 0;
5856- long inc = 0;
5857+ long incr = 0;
5858 long added = 0;
5859
5860 if (!VIM_ISDIGIT(*p))
5861@@ -7519,7 +7519,7 @@
5862 ++p;
5863 if (!VIM_ISDIGIT(*p))
5864 return FAIL;
5865- inc = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
5866+ incr = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);
5867 if (*p != ',')
5868 return FAIL;
5869 ++p;
5870@@ -7529,11 +7529,11 @@
5871 if (*p != NUL)
5872 return FAIL;
5873
5874- if (start == 0 || inc == 0 || added == 0 || inc > start)
5875+ if (start == 0 || incr == 0 || added == 0 || incr > start)
5876 return FAIL;
5877
5878 compress_start = start;
5879- compress_inc = inc;
5880+ compress_inc = incr;
5881 compress_added = added;
5882 return OK;
5883 }
5884@@ -8291,14 +8291,14 @@
5885 * Returns the number of nodes used.
5886 */
5887 static int
5888-put_node(fd, node, index, regionmask, prefixtree)
5889+put_node(fd, node, idx, regionmask, prefixtree)
5890 FILE *fd; /* NULL when only counting */
5891 wordnode_T *node;
5892- int index;
5893+ int idx;
5894 int regionmask;
5895 int prefixtree; /* TRUE for PREFIXTREE */
5896 {
5897- int newindex = index;
5898+ int newindex = idx;
5899 int siblingcount = 0;
5900 wordnode_T *np;
5901 int flags;
5902@@ -8308,7 +8308,7 @@
5903 return 0;
5904
5905 /* Store the index where this node is written. */
5906- node->wn_u1.index = index;
5907+ node->wn_u1.index = idx;
5908
5909 /* Count the number of siblings. */
5910 for (np = node; np != NULL; np = np->wn_sibling)
5911@@ -9243,11 +9243,11 @@
5912 * Add "word[len]" to 'spellfile' as a good or bad word.
5913 */
5914 void
5915-spell_add_word(word, len, bad, index, undo)
5916+spell_add_word(word, len, bad, idx, undo)
5917 char_u *word;
5918 int len;
5919 int bad;
5920- int index; /* "zG" and "zW": zero, otherwise index in
5921+ int idx; /* "zG" and "zW": zero, otherwise index in
5922 'spellfile' */
5923 int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */
5924 {
5925@@ -9261,7 +9261,7 @@
5926 int i;
5927 char_u *spf;
5928
5929- if (index == 0) /* use internal wordlist */
5930+ if (idx == 0) /* use internal wordlist */
5931 {
5932 if (int_wordlist == NULL)
5933 {
5934@@ -9289,11 +9289,11 @@
5935 for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i)
5936 {
5937 copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
5938- if (i == index)
5939+ if (i == idx)
5940 break;
5941 if (*spf == NUL)
5942 {
5943- EMSGN(_("E765: 'spellfile' does not have %ld entries"), index);
5944+ EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx);
5945 return;
5946 }
5947 }
5948@@ -10070,6 +10070,7 @@
5949
5950 /* List the suggestions. */
5951 msg_start();
5952+ msg_row = Rows - 1; /* for when 'cmdheight' > 1 */
5953 lines_left = Rows; /* avoid more prompt */
5954 vim_snprintf((char *)IObuff, IOSIZE, _("Change \"%.*s\" to:"),
5955 sug.su_badlen, sug.su_badptr);
5956@@ -13579,53 +13580,58 @@
5957 * the first "the" to itself. */
5958 return;
5959
5960- /* Check if the word is already there. Also check the length that is
5961- * being replaced "thes," -> "these" is a different suggestion from
5962- * "thes" -> "these". */
5963- stp = &SUG(*gap, 0);
5964- for (i = gap->ga_len; --i >= 0; ++stp)
5965- if (stp->st_wordlen == goodlen
5966- && stp->st_orglen == badlen
5967- && STRNCMP(stp->st_word, goodword, goodlen) == 0)
5968- {
5969- /*
5970- * Found it. Remember the word with the lowest score.
5971- */
5972- if (stp->st_slang == NULL)
5973- stp->st_slang = slang;
5974+ if (gap->ga_len == 0)
5975+ i = -1;
5976+ else
5977+ {
5978+ /* Check if the word is already there. Also check the length that is
5979+ * being replaced "thes," -> "these" is a different suggestion from
5980+ * "thes" -> "these". */
5981+ stp = &SUG(*gap, 0);
5982+ for (i = gap->ga_len; --i >= 0; ++stp)
5983+ if (stp->st_wordlen == goodlen
5984+ && stp->st_orglen == badlen
5985+ && STRNCMP(stp->st_word, goodword, goodlen) == 0)
5986+ {
5987+ /*
5988+ * Found it. Remember the word with the lowest score.
5989+ */
5990+ if (stp->st_slang == NULL)
5991+ stp->st_slang = slang;
5992
5993- new_sug.st_score = score;
5994- new_sug.st_altscore = altscore;
5995- new_sug.st_had_bonus = had_bonus;
5996+ new_sug.st_score = score;
5997+ new_sug.st_altscore = altscore;
5998+ new_sug.st_had_bonus = had_bonus;
5999+
6000+ if (stp->st_had_bonus != had_bonus)
6001+ {
6002+ /* Only one of the two had the soundalike score computed.
6003+ * Need to do that for the other one now, otherwise the
6004+ * scores can't be compared. This happens because
6005+ * suggest_try_change() doesn't compute the soundalike
6006+ * word to keep it fast, while some special methods set
6007+ * the soundalike score to zero. */
6008+ if (had_bonus)
6009+ rescore_one(su, stp);
6010+ else
6011+ {
6012+ new_sug.st_word = stp->st_word;
6013+ new_sug.st_wordlen = stp->st_wordlen;
6014+ new_sug.st_slang = stp->st_slang;
6015+ new_sug.st_orglen = badlen;
6016+ rescore_one(su, &new_sug);
6017+ }
6018+ }
6019
6020- if (stp->st_had_bonus != had_bonus)
6021- {
6022- /* Only one of the two had the soundalike score computed.
6023- * Need to do that for the other one now, otherwise the
6024- * scores can't be compared. This happens because
6025- * suggest_try_change() doesn't compute the soundalike
6026- * word to keep it fast, while some special methods set
6027- * the soundalike score to zero. */
6028- if (had_bonus)
6029- rescore_one(su, stp);
6030- else
6031+ if (stp->st_score > new_sug.st_score)
6032 {
6033- new_sug.st_word = stp->st_word;
6034- new_sug.st_wordlen = stp->st_wordlen;
6035- new_sug.st_slang = stp->st_slang;
6036- new_sug.st_orglen = badlen;
6037- rescore_one(su, &new_sug);
6038+ stp->st_score = new_sug.st_score;
6039+ stp->st_altscore = new_sug.st_altscore;
6040+ stp->st_had_bonus = new_sug.st_had_bonus;
6041 }
6042+ break;
6043 }
6044-
6045- if (stp->st_score > new_sug.st_score)
6046- {
6047- stp->st_score = new_sug.st_score;
6048- stp->st_altscore = new_sug.st_altscore;
6049- stp->st_had_bonus = new_sug.st_had_bonus;
6050- }
6051- break;
6052- }
6053+ }
6054
6055 if (i < 0 && ga_grow(gap, 1) == OK)
6056 {
6057@@ -15656,7 +15662,7 @@
6058 ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0
6059 : STRNCMP(p, pat, STRLEN(pat)) == 0)
6060 && ins_compl_add_infercase(p, (int)STRLEN(p),
6061- FALSE, NULL, *dir, 0) == OK)
6062+ p_ic, NULL, *dir, 0) == OK)
6063 /* if dir was BACKWARD then honor it just once */
6064 *dir = FORWARD;
6065 }
6066diff -Naur vim70.orig/src/structs.h vim70/src/structs.h
6067--- vim70.orig/src/structs.h 2006-04-09 10:57:46.000000000 -0700
6068+++ vim70/src/structs.h 2006-08-19 16:39:02.000000000 -0700
6069@@ -2213,18 +2213,20 @@
6070
6071 /*
6072 * Struct to save values in before executing autocommands for a buffer that is
6073- * not the current buffer.
6074+ * not the current buffer. Without FEAT_AUTOCMD only "curbuf" is remembered.
6075 */
6076 typedef struct
6077 {
6078 buf_T *save_buf; /* saved curbuf */
6079+#ifdef FEAT_AUTOCMD
6080 buf_T *new_curbuf; /* buffer to be used */
6081 win_T *save_curwin; /* saved curwin, NULL if it didn't change */
6082 win_T *new_curwin; /* new curwin if save_curwin != NULL */
6083 pos_T save_cursor; /* saved cursor pos of save_curwin */
6084 linenr_T save_topline; /* saved topline of save_curwin */
6085-#ifdef FEAT_DIFF
6086+# ifdef FEAT_DIFF
6087 int save_topfill; /* saved topfill of save_curwin */
6088+# endif
6089 #endif
6090 } aco_save_T;
6091
6092diff -Naur vim70.orig/src/tag.c vim70/src/tag.c
6093--- vim70.orig/src/tag.c 2006-04-27 06:11:21.000000000 -0700
6094+++ vim70/src/tag.c 2006-09-11 09:26:46.000000000 -0700
6095@@ -3787,6 +3787,7 @@
6096 {
6097 int num_matches, i, ret;
6098 char_u **matches, *p;
6099+ char_u *full_fname;
6100 dict_T *dict;
6101 tagptrs_T tp;
6102 long is_static;
6103@@ -3809,9 +3810,10 @@
6104 if (list_append_dict(list, dict) == FAIL)
6105 ret = FAIL;
6106
6107+ full_fname = tag_full_fname(&tp);
6108 if (add_tag_field(dict, "name", tp.tagname, tp.tagname_end) == FAIL
6109- || add_tag_field(dict, "filename", tp.fname,
6110- tp.fname_end) == FAIL
6111+ || add_tag_field(dict, "filename", full_fname,
6112+ NULL) == FAIL
6113 || add_tag_field(dict, "cmd", tp.command,
6114 tp.command_end) == FAIL
6115 || add_tag_field(dict, "kind", tp.tagkind,
6116@@ -3819,6 +3821,8 @@
6117 || dict_add_nr_str(dict, "static", is_static, NULL) == FAIL)
6118 ret = FAIL;
6119
6120+ vim_free(full_fname);
6121+
6122 if (tp.command_end != NULL)
6123 {
6124 for (p = tp.command_end + 3;
6125diff -Naur vim70.orig/src/term.c vim70/src/term.c
6126--- vim70.orig/src/term.c 2006-05-03 10:34:57.000000000 -0700
6127+++ vim70/src/term.c 2006-08-19 16:40:11.000000000 -0700
6128@@ -4783,6 +4783,14 @@
6129 return -1;
6130 current_menu = (vimmenu_T *)val;
6131 slen += num_bytes;
6132+
6133+ /* The menu may have been deleted right after it was used, check
6134+ * for that. */
6135+ if (check_menu_pointer(root_menu, current_menu) == FAIL)
6136+ {
6137+ key_name[0] = KS_EXTRA;
6138+ key_name[1] = (int)KE_IGNORE;
6139+ }
6140 }
6141 # endif
6142 # ifdef FEAT_GUI_TABLINE
6143diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in
6144--- vim70.orig/src/testdir/test56.in 2005-05-18 08:37:37.000000000 -0700
6145+++ vim70/src/testdir/test56.in 2006-09-11 09:00:23.000000000 -0700
6146@@ -3,7 +3,7 @@
6147 STARTTEST
6148 :so small.vim
6149 :"
6150-:set nocp
6151+:set nocp viminfo+=nviminfo
6152 :/^start:/+1,/^end:/-1w! Xtest.vim
6153 :source Xtest.vim
6154 _x
6155diff -Naur vim70.orig/src/ui.c vim70/src/ui.c
6156--- vim70.orig/src/ui.c 2006-03-27 11:15:09.000000000 -0800
6157+++ vim70/src/ui.c 2006-09-11 08:23:16.000000000 -0700
6158@@ -1137,7 +1137,6 @@
6159 int len;
6160 #ifdef FEAT_MBYTE
6161 char_u *p;
6162- int i;
6163 #endif
6164 int row1 = clip_star.start.lnum;
6165 int col1 = clip_star.start.col;
6166@@ -1218,6 +1217,8 @@
6167 #ifdef FEAT_MBYTE
6168 if (enc_dbcs != 0)
6169 {
6170+ int i;
6171+
6172 p = ScreenLines + LineOffset[row];
6173 for (i = start_col; i < end_col; ++i)
6174 if (enc_dbcs == DBCS_JPNU && p[i] == 0x8e)
6175diff -Naur vim70.orig/src/undo.c vim70/src/undo.c
6176--- vim70.orig/src/undo.c 2006-04-21 02:30:59.000000000 -0700
6177+++ vim70/src/undo.c 2006-09-11 08:23:16.000000000 -0700
6178@@ -84,7 +84,6 @@
6179 static void u_unch_branch __ARGS((u_header_T *uhp));
6180 static u_entry_T *u_get_headentry __ARGS((void));
6181 static void u_getbot __ARGS((void));
6182-static int undo_allowed __ARGS((void));
6183 static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T));
6184 static void u_doit __ARGS((int count));
6185 static void u_undoredo __ARGS((int undo));
6186@@ -196,7 +195,7 @@
6187 * Return TRUE when undo is allowed. Otherwise give an error message and
6188 * return FALSE.
6189 */
6190- static int
6191+ int
6192 undo_allowed()
6193 {
6194 /* Don't allow changes when 'modifiable' is off. */
6195@@ -1188,7 +1187,7 @@
6196 int did_undo; /* just did an undo */
6197 int absolute; /* used ":undo N" */
6198 {
6199- char *msg;
6200+ char *msgstr;
6201 u_header_T *uhp;
6202 char_u msgbuf[80];
6203
6204@@ -1206,20 +1205,20 @@
6205
6206 u_oldcount -= u_newcount;
6207 if (u_oldcount == -1)
6208- msg = N_("more line");
6209+ msgstr = N_("more line");
6210 else if (u_oldcount < 0)
6211- msg = N_("more lines");
6212+ msgstr = N_("more lines");
6213 else if (u_oldcount == 1)
6214- msg = N_("line less");
6215+ msgstr = N_("line less");
6216 else if (u_oldcount > 1)
6217- msg = N_("fewer lines");
6218+ msgstr = N_("fewer lines");
6219 else
6220 {
6221 u_oldcount = u_newcount;
6222 if (u_newcount == 1)
6223- msg = N_("change");
6224+ msgstr = N_("change");
6225 else
6226- msg = N_("changes");
6227+ msgstr = N_("changes");
6228 }
6229
6230 if (curbuf->b_u_curhead != NULL)
6231@@ -1245,7 +1244,7 @@
6232
6233 smsg((char_u *)_("%ld %s; %s #%ld %s"),
6234 u_oldcount < 0 ? -u_oldcount : u_oldcount,
6235- _(msg),
6236+ _(msgstr),
6237 did_undo ? _("before") : _("after"),
6238 uhp == NULL ? 0L : uhp->uh_seq,
6239 msgbuf);
6240diff -Naur vim70.orig/src/version.c vim70/src/version.c
6241--- vim70.orig/src/version.c 2006-05-03 00:50:42.000000000 -0700
6242+++ vim70/src/version.c 2006-09-11 09:28:13.000000000 -0700
6243@@ -667,6 +667,190 @@
6244 static int included_patches[] =
6245 { /* Add new patch number below this line */
6246 /**/
6247+ 99,
6248+/**/
6249+ 98,
6250+/**/
6251+ 97,
6252+/**/
6253+ 96,
6254+/**/
6255+ 95,
6256+/**/
6257+ 94,
6258+/**/
6259+ 93,
6260+/**/
6261+ 92,
6262+/**/
6263+ 91,
6264+/**/
6265+ 90,
6266+/**/
6267+ 89,
6268+/**/
6269+ 88,
6270+/**/
6271+ 87,
6272+/**/
6273+ 86,
6274+/**/
6275+ 85,
6276+/**/
6277+ 84,
6278+/**/
6279+ 83,
6280+/**/
6281+ 82,
6282+/**/
6283+ 81,
6284+/**/
6285+ 80,
6286+/**/
6287+ 79,
6288+/**/
6289+ 78,
6290+/**/
6291+ 77,
6292+/**/
6293+ 76,
6294+/**/
6295+ 75,
6296+/**/
6297+ 73,
6298+/**/
6299+ 72,
6300+/**/
6301+ 71,
6302+/**/
6303+ 70,
6304+/**/
6305+ 69,
6306+/**/
6307+ 68,
6308+/**/
6309+ 67,
6310+/**/
6311+ 66,
6312+/**/
6313+ 64,
6314+/**/
6315+ 63,
6316+/**/
6317+ 62,
6318+/**/
6319+ 61,
6320+/**/
6321+ 60,
6322+/**/
6323+ 59,
6324+/**/
6325+ 58,
6326+/**/
6327+ 56,
6328+/**/
6329+ 55,
6330+/**/
6331+ 54,
6332+/**/
6333+ 53,
6334+/**/
6335+ 52,
6336+/**/
6337+ 51,
6338+/**/
6339+ 50,
6340+/**/
6341+ 49,
6342+/**/
6343+ 48,
6344+/**/
6345+ 47,
6346+/**/
6347+ 46,
6348+/**/
6349+ 44,
6350+/**/
6351+ 43,
6352+/**/
6353+ 42,
6354+/**/
6355+ 41,
6356+/**/
6357+ 40,
6358+/**/
6359+ 39,
6360+/**/
6361+ 38,
6362+/**/
6363+ 37,
6364+/**/
6365+ 36,
6366+/**/
6367+ 35,
6368+/**/
6369+ 34,
6370+/**/
6371+ 33,
6372+/**/
6373+ 31,
6374+/**/
6375+ 30,
6376+/**/
6377+ 29,
6378+/**/
6379+ 28,
6380+/**/
6381+ 26,
6382+/**/
6383+ 25,
6384+/**/
6385+ 24,
6386+/**/
6387+ 23,
6388+/**/
6389+ 22,
6390+/**/
6391+ 21,
6392+/**/
6393+ 20,
6394+/**/
6395+ 19,
6396+/**/
6397+ 18,
6398+/**/
6399+ 17,
6400+/**/
6401+ 16,
6402+/**/
6403+ 15,
6404+/**/
6405+ 14,
6406+/**/
6407+ 13,
6408+/**/
6409+ 12,
6410+/**/
6411+ 11,
6412+/**/
6413+ 10,
6414+/**/
6415+ 9,
6416+/**/
6417+ 8,
6418+/**/
6419+ 7,
6420+/**/
6421+ 6,
6422+/**/
6423+ 4,
6424+/**/
6425+ 3,
6426+/**/
6427+ 2,
6428+/**/
6429+ 1,
6430+/**/
6431 0
6432 };
6433
6434diff -Naur vim70.orig/src/vim.h vim70/src/vim.h
6435--- vim70.orig/src/vim.h 2006-04-30 08:32:38.000000000 -0700
6436+++ vim70/src/vim.h 2006-09-11 08:24:09.000000000 -0700
6437@@ -585,7 +585,6 @@
6438 #define INSERT 0x10 /* Insert mode */
6439 #define LANGMAP 0x20 /* Language mapping, can be combined with
6440 INSERT and CMDLINE */
6441-#define MAP_ALL_MODES 0x3f /* all mode bits used for mapping */
6442
6443 #define REPLACE_FLAG 0x40 /* Replace mode flag */
6444 #define REPLACE (REPLACE_FLAG + INSERT)
6445@@ -605,6 +604,9 @@
6446 #define CONFIRM 0x800 /* ":confirm" prompt */
6447 #define SELECTMODE 0x1000 /* Select mode, only for mappings */
6448
6449+#define MAP_ALL_MODES (0x3f | SELECTMODE) /* all mode bits used for
6450+ * mapping */
6451+
6452 /* directions */
6453 #define FORWARD 1
6454 #define BACKWARD (-1)
6455@@ -1118,6 +1120,7 @@
6456 EVENT_FOCUSGAINED, /* got the focus */
6457 EVENT_FOCUSLOST, /* lost the focus to another app */
6458 EVENT_GUIENTER, /* after starting the GUI */
6459+ EVENT_GUIFAILED, /* after starting the GUI failed */
6460 EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */
6461 EVENT_INSERTENTER, /* when entering Insert mode */
6462 EVENT_INSERTLEAVE, /* when leaving Insert mode */
6463@@ -1983,7 +1986,7 @@
6464 /* values for vim_handle_signal() that are not a signal */
6465 #define SIGNAL_BLOCK -1
6466 #define SIGNAL_UNBLOCK -2
6467-#if !defined(UNIX) && !defined(VMS)
6468+#if !defined(UNIX) && !defined(VMS) && !defined(OS2)
6469 # define vim_handle_signal(x) 0
6470 #endif
6471
6472diff -Naur vim70.orig/src/window.c vim70/src/window.c
6473--- vim70.orig/src/window.c 2006-05-06 03:54:51.000000000 -0700
6474+++ vim70/src/window.c 2006-09-11 09:01:59.000000000 -0700
6475@@ -340,10 +340,10 @@
6476 {
6477 tabpage_T *oldtab = curtab;
6478 tabpage_T *newtab;
6479- win_T *wp = curwin;
6480
6481 /* First create a new tab with the window, then go back to
6482 * the old tab and close the window there. */
6483+ wp = curwin;
6484 if (win_new_tabpage((int)Prenum) == OK
6485 && valid_tabpage(oldtab))
6486 {
6487@@ -3954,13 +3954,8 @@
6488 setmouse(); /* in case jumped to/from help buffer */
6489 #endif
6490
6491-#ifdef FEAT_AUTOCHDIR
6492- /* Change directories when the 'acd' option is set on and after
6493- * switching windows. */
6494- if (p_acd && curbuf->b_ffname != NULL
6495- && vim_chdirfile(curbuf->b_ffname) == OK)
6496- shorten_fnames(TRUE);
6497-#endif
6498+ /* Change directories when the 'acd' option is set. */
6499+ DO_AUTOCHDIR
6500 }
6501
6502 #endif /* FEAT_WINDOWS */
6503
Note: See TracBrowser for help on using the repository browser.