source:
patches/vim-7.0-fixes-13.patch@
5921622
Last change on this file since 5921622 was 9903b4e, checked in by , 18 years ago | |
---|---|
|
|
File size: 236.4 KB |
-
configure
Submitted By: Jim Gifford (jim at linuxfromscratch dot org) Date: 2006-09-18 Initial Package Version: 7.0 Origin: Upstream Upstream Status: Applied Description: Contains Patch 001-004, 006-026, 028-031, 033-044, 036-056, 058-064, 066-073, 075-107, and 109 from Upstream 005, 027, 032, 045, 057, 066, 074, 108 are for the extras, Mac, or Windows 32 only diff -Naur vim70.orig/configure vim70/configure
old new 3 3 # This is just a stub for the Unix configure script, to provide support for 4 4 # doing "./configure" in the top Vim directory. 5 5 6 cd src && ./configure "$@"6 cd src && exec ./configure "$@" -
runtime/autoload/ccomplete.vim
diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim
old new 1 1 " Vim completion script 2 2 " Language: C 3 3 " Maintainer: Bram Moolenaar <Bram@vim.org> 4 " Last Change: 2006 May 0 34 " Last Change: 2006 May 08 5 5 6 6 7 7 " This function is used for the 'omnifunc' option. … … 458 458 " member. 459 459 function! s:StructMembers(typename, items, all) 460 460 " Todo: What about local structures? 461 let fnames = join(map(tagfiles(), 'escape(v:val, " \\ ")'))461 let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) 462 462 if fnames == '' 463 463 return [] 464 464 endif -
runtime/autoload/gzip.vim
diff -Naur vim70.orig/runtime/autoload/gzip.vim vim70/runtime/autoload/gzip.vim
old new 1 1 " Vim autoload file for editing compressed files. 2 2 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Last Change: 2006 Mar 313 " Last Change: 2006 Jul 19 4 4 5 5 " These functions are used by the gzip plugin. 6 6 … … 127 127 let nmt = s:tempname(nm) 128 128 if rename(nm, nmt) == 0 129 129 if exists("b:gzip_comp_arg") 130 call system(a:cmd . " " . b:gzip_comp_arg . " " . nmt)130 call system(a:cmd . " " . b:gzip_comp_arg . " '" . nmt . "'") 131 131 else 132 call system(a:cmd . " " . nmt)132 call system(a:cmd . " '" . nmt . "'") 133 133 endif 134 134 call rename(nmt . "." . expand("<afile>:e"), nm) 135 135 endif -
runtime/autoload/paste.vim
diff -Naur vim70.orig/runtime/autoload/paste.vim vim70/runtime/autoload/paste.vim
old new 1 1 " Vim support file to help with paste mappings and menus 2 2 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Last Change: 2006 Apr 213 " Last Change: 2006 Jun 23 4 4 5 5 " Define the string to use for items that are present both in Edit, Popup and 6 6 " Toolbar menu. Also used in mswin.vim and macmap.vim. … … 12 12 if has("virtualedit") 13 13 let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"} 14 14 let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n'] 15 let paste#paste_cmd['i'] = ' <Esc>' . paste#paste_cmd['n'] . 'gi'15 let paste#paste_cmd['i'] = 'x<BS><Esc>' . paste#paste_cmd['n'] . 'gi' 16 16 17 17 func! paste#Paste() 18 18 let ove = &ve -
runtime/autoload/spellfile.vim
diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
old new 1 1 " Vim script to download a missing spell file 2 2 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Last Change: 2006 Feb 013 " Last Change: 2006 Aug 29 4 4 5 5 if !exists('g:spellfile_URL') 6 let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/ unstable/runtime/spell'6 let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell' 7 7 endif 8 8 let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset. 9 9 … … 61 61 new 62 62 setlocal bin 63 63 echo 'Downloading ' . fname . '...' 64 exe 'Nread ' g:spellfile_URL . '/' . fname64 call spellfile#Nread(fname) 65 65 if getline(2) !~ 'VIMspell' 66 66 " Didn't work, perhaps there is an ASCII one. 67 67 g/^/d 68 68 let fname = a:lang . '.ascii.spl' 69 69 echo 'Could not find it, trying ' . fname . '...' 70 exe 'Nread ' g:spellfile_URL . '/' . fname70 call spellfile#Nread(fname) 71 71 if getline(2) !~ 'VIMspell' 72 72 echo 'Sorry, downloading failed' 73 73 bwipe! … … 95 95 g/^/d 96 96 let fname = substitute(fname, '\.spl$', '.sug', '') 97 97 echo 'Downloading ' . fname . '...' 98 exe 'Nread ' g:spellfile_URL . '/' . fname98 call spellfile#Nread(fname) 99 99 if getline(2) !~ 'VIMsug' 100 100 echo 'Sorry, downloading failed' 101 101 else … … 109 109 bwipe 110 110 endif 111 111 endfunc 112 113 " Read "fname" from the server. 114 function! spellfile#Nread(fname) 115 if g:spellfile_URL =~ '^ftp://' 116 " for an ftp server use a default login and password to avoid a prompt 117 let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '') 118 let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '') 119 exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"' 120 else 121 exe 'Nread ' g:spellfile_URL . '/' . a:fname 122 endif 123 endfunc -
runtime/menu.vim
diff -Naur vim70.orig/runtime/menu.vim vim70/runtime/menu.vim
old new 2 2 " You can also use this as a start for your own set of menus. 3 3 " 4 4 " Maintainer: Bram Moolenaar <Bram@vim.org> 5 " Last Change: 2006 Apr 175 " Last Change: 2006 Sep 14 6 6 7 7 " Note that ":an" (short for ":anoremenu") is often used to make a menu work 8 8 " in all modes and avoid side effects from mappings defined by the user. … … 885 885 if exists("s:changeitem") && s:changeitem != '' 886 886 call <SID>SpellDel() 887 887 endif 888 889 " Return quickly if spell checking is not enabled. 888 890 if !&spell || &spelllang == '' 889 891 return 890 892 endif … … 908 910 let s:fromword = w 909 911 let pri = 1 910 912 for sug in s:suglist 911 exe 'a menu 1.5.' . pri . ' PopUp.' . s:changeitem . '.' . escape(sug, ' .')913 exe 'anoremenu 1.5.' . pri . ' PopUp.' . s:changeitem . '.' . escape(sug, ' .') 912 914 \ . ' :call <SID>SpellReplace(' . pri . ')<CR>' 913 915 let pri += 1 914 916 endfor 915 917 916 918 let s:additem = 'add\ "' . escape(w, ' .') . '"\ to\ word\ list' 917 exe 'a menu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>'919 exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>' 918 920 919 921 let s:ignoreitem = 'ignore\ "' . escape(w, ' .') . '"' 920 exe 'a menu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>'922 exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>' 921 923 922 a menu 1.8 PopUp.-SpellSep- :924 anoremenu 1.8 PopUp.-SpellSep- : 923 925 endif 924 926 endif 925 927 endfunc … … 938 940 let s:changeitem = '' 939 941 endfun 940 942 941 au! MenuPopup * call <SID>SpellPopup() 943 augroup SpellPopupMenu 944 au! MenuPopup * call <SID>SpellPopup() 945 augroup END 942 946 endif 943 947 944 948 " The GUI toolbar (for MS-Windows and GTK) … … 1013 1017 tmenu ToolBar.FindPrev Find Previous 1014 1018 tmenu ToolBar.Replace Find / Replace... 1015 1019 endif 1016 tmenu ToolBar.LoadSesn Cho se a session to load1020 tmenu ToolBar.LoadSesn Choose a session to load 1017 1021 tmenu ToolBar.SaveSesn Save current session 1018 tmenu ToolBar.RunScript Cho se a Vim Script to run1022 tmenu ToolBar.RunScript Choose a Vim Script to run 1019 1023 tmenu ToolBar.Make Make current project (:make) 1020 1024 tmenu ToolBar.RunCtags Build tags in current directory tree (!ctags -R .) 1021 1025 tmenu ToolBar.TagJump Jump to tag under cursor -
runtime/plugin/matchparen.vim
diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
old new 1 1 " Vim plugin for showing matching parens 2 2 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Last Change: 2006 Apr 273 " Last Change: 2006 Sep 09 4 4 5 5 " Exit quickly when: 6 6 " - this plugin was already loaded (or disabled) … … 44 44 let before = 0 45 45 46 46 let c = getline(c_lnum)[c_col - 1] 47 let plist = split(&matchpairs, ' :\|,')47 let plist = split(&matchpairs, '.\zs[:,]') 48 48 let i = index(plist, c) 49 49 if i < 0 50 50 " not found, in Insert mode try character before the cursor … … 90 90 " Find the match. When it was just before the cursor move it there for a 91 91 " moment. 92 92 if before > 0 93 let save_cursor = getpos('.')93 let save_cursor = winsaveview() 94 94 call cursor(c_lnum, c_col - before) 95 95 endif 96 96 97 97 " When not in a string or comment ignore matches inside them. 98 98 let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . 99 \ '=~? "string\\|c omment"'99 \ '=~? "string\\|character\\|singlequote\\|comment"' 100 100 execute 'if' s_skip '| let s_skip = 0 | endif' 101 101 102 102 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) 103 103 104 104 if before > 0 105 call setpos('.',save_cursor)105 call winrestview(save_cursor) 106 106 endif 107 107 108 108 " If a match is found setup match highlighting. -
runtime/scripts.vim
diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim
old new 1 1 " Vim support file to detect file types in scripts 2 2 " 3 3 " Maintainer: Bram Moolenaar <Bram@vim.org> 4 " Last change: 2006 Mar 284 " Last change: 2006 Jul 08 5 5 6 6 " This file is called by an autocommand for every file that has just been 7 7 " loaded into a buffer. It checks if the type of file can be recognized by … … 54 54 let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '') 55 55 endif 56 56 57 " tcl scripts may have #!/bin/sh in the first line and "exec wish" in the 58 " third line. Suggested by Steven Atkinson. 59 if getline(3) =~ '^exec wish' 60 let s:name = 'wish' 61 endif 62 57 63 " Bourne-like shell scripts: bash bash2 ksh ksh93 sh 58 64 if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>' 59 65 call SetFileTypeSH(s:line1) " defined in filetype.vim -
runtime/tutor/Makefile
diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile
old new 2 2 # 3 3 # The Japanese tutor exists in three encodings. Use the UTF-8 version as the 4 4 # original and create the others with conversion. 5 # 6 # Similarly for Russian and Korean 5 7 6 all: tutor.ja.sjis tutor.ja.euc tutor.ko.euc 8 all: tutor.ja.sjis tutor.ja.euc \ 9 tutor.ko.euc \ 10 tutor.ru tutor.ru.cp1251 \ 11 tutor.gr tutor.gr.cp737 7 12 8 13 tutor.ja.sjis: tutor.ja.utf-8 9 14 nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis … … 13 18 14 19 tutor.ko.euc: tutor.ko.utf-8 15 20 iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc 21 22 tutor.ru: tutor.ru.utf-8 23 iconv -f UTF-8 -t KOI8-R tutor.ru.utf-8 > tutor.ru 24 25 tutor.ru.cp1251: tutor.ru.utf-8 26 iconv -f UTF-8 -t cp1251 tutor.ru.utf-8 > tutor.ru.cp1251 27 28 tutor.gr: tutor.gr.utf-8 29 iconv -f UTF-8 -t ISO-8859-7 tutor.gr.utf-8 > tutor.gr 30 31 tutor.gr.cp737: tutor.gr.utf-8 32 iconv -f UTF-8 -t cp737 tutor.gr.utf-8 > tutor.gr.cp737 -
runtime/tutor/tutor.gr.utf-8
diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8
old new 1 =============================================================================== 2 = Î. αλ Ï. Ï. ή Ï Îž α Ï. ε Ï. Ï. ο V I M T u t o r - Î.κΎοÏ.η 1.5 = 3 =============================================================================== 4 5 Î. Vim είΜαι ÎΜαÏ. Ï.αΜίÏ.Ï.Ï.ÏοÏ. Ï.Ï.ÎœÏ.άκÏ.ηÏ. Ï.οÏ. ÎÏ.ει Ï.ολλÎÏ. εΜÏ.ολÎÏ., Ï.άÏα 6 Ï.ολλÎÏ. για Μα εΟηγήÏ.οÏ.Όε Ï.ε Όία Ï.εÏιήγηÏ.η Ï.Ï.Ï.Ï. αÏ.Ï.ή. Î.Ï.Ï.ή η Ï.εÏιήγηÏ.η 7 Ï.Ï.εΎιάÏ.Ï.ηκε για Μα Ï.εÏιγÏάÏ.ει ικαΜοÏ.οιηÏ.ικά Ï.ιÏ. εΜÏ.ολÎÏ. Ï.οÏ. Ξα Ï.αÏ. 8 κάΜοÏ.Îœ Μα Ï.ÏηÏ.ιΌοÏ.οιείÏ.ε εÏκολα Ï.οΜ Vim Ï.αΜ ÎΜαΜ γεΜικήÏ. Ï.ÏήÏ.ηÏ. Ï.Ï.ÎœÏ.άκÏ.η. 9 10 Î. καÏ.ά Ï.ÏοÏ.ÎγγιÏ.η Ï.ÏÏ.ΜοÏ. Ï.οÏ. αÏ.αιÏ.είÏ.αι για Μα ολοκληÏÏ.Ï.εÏ.ε Ï.ηΜ Ï.εÏιήγηÏ.η 11 είΜαι 25-30 λεÏ.Ï.ά, εΟαÏÏ.Ï.ÎœÏ.αÏ. αÏ.Ï. Ï.ο Ï.Ï.Ï.ο Ï.ÏÏ.Μο Ξα ΟοΎÎÏ.εÏ.ε για 12 Ï.ειÏαΌαÏ.ιÏ.ΌοÏÏ.. 13 14 Î.ι εΜÏ.ολÎÏ. Ï.Ï.α ΌαΞήΌαÏ.α Ξα Ï.ÏοÏ.οÏ.οιήÏ.οÏ.Îœ Ï.ο κείΌεΜο. Î.ηΌιοÏ.ÏγήÏ.Ï.ε ÎΜα 15 αΜÏ.ίγÏαÏ.ο αÏ.Ï.Î¿Ï Ï.οÏ. αÏÏ.είοÏ. για Μα εΟαÏ.κηΞείÏ.ε (αΜ ΟεκιΜήÏ.αÏ.ε Ï.ο 16 "Vimtutor" αÏ.Ï.Ï. είΜαι ήΎη ÎΜα αΜÏ.ίγÏαÏ.ο). 17 18 Î.ίΜαι Ï.ηΌαΜÏ.ικÏ. Μα ΞÏ.ΌάÏ.Ï.ε Ï.Ï.ι αÏ.Ï.ή η Ï.εÏιήγηÏ.η είΜαι οÏγαΜÏ.ÎŒÎΜη ÎÏ.Ï.ι 19 Ï.Ï.Ï.ε Μα ΎιΎάÏ.κει ÎŒÎÏ.Ï. Ï.ηÏ. Ï.ÏήÏ.ηÏ.. Î.Ï.Ï.Ï. Ï.ηΌαίΜει Ï.Ï.ι Ï.ÏειάζεÏ.αι Μα 20 εκÏ.ελείÏ.ε Ï.ιÏ. εΜÏ.ολÎÏ. για Μα Ï.ιÏ. ΌάΞεÏ.ε Ï.Ï.Ï.Ï.ά. Î.Îœ ΎιαβάζεÏ.ε ÎŒÏ.Μο Ï.ο 21 κείΌεΜο, Ξα Ï.ιÏ. ΟεÏ.άÏ.εÏ.ε! 22 23 ΀Ï.Ïα, βεβαιÏ.ΞείÏ.ε Ï.Ï.ι Ï.ο Ï.λήκÏ.Ïο Shift-Lock Î.Î.ΠείΜαι Ï.αÏ.ηΌÎΜο και 24 Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.Ïο j αÏκεÏ.ÎÏ. Ï.οÏÎÏ. για Μα ΌεÏ.ακιΜήÏ.εÏ.ε Ï.οΜ ÎŽÏοΌÎα ÎÏ.Ï.ι 25 Ï.Ï.Ï.ε Ï.ο Î.άΞηΌα 1.1 Μα γεΌίÏ.ει Ï.λήÏÏ.Ï. Ï.ηΜ οΞÏ.Μη. 26 27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 Î.άΞηΌα 1.1: Î.Î.΀Î.Î.Î.ÎÎ.Î΀Î.Σ ΀Î.Î Î.ΡÎ.Î.Î.Î. 29 30 ** Î.ια Μα κιΜήÏ.εÏ.ε Ï.οΜ ÎŽÏοΌÎα, Ï.αÏ.ήÏ.Ï.ε Ï.α Ï.λήκÏ.Ïα h,j,k,l Ï.Ï.Ï.Ï. ΎείÏ.ΜεÏ.αι. ** 31 ^ 32 k Hint: ΀ο Ï.λήκÏ.Ïο h είΜαι αÏιÏ.Ï.εÏά και κιΜεί Ï.Ï.' αÏιÏ.Ï.εÏά. 33 < h l > ΀ο Ï.λήκÏ.Ïο l είΜαι ΎεΟιά και κιΜεί Ï.Ï.α ΎεΟιά. 34 j ΀ο Ï.λήκÏ.Ïο j Όοιάζει Όε βελάκι Ï.ÏοÏ. Ï.α κάÏ.Ï.. 35 v 36 37 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.ÏιγÏÏÏ. Ï.Ï.ηΜ οΞÏ.Μη ÎŒÎÏ.Ïι Μα ΜοιÏ.ΞεÏ.ε άΜεÏ.α. 38 39 2. Î.ÏαÏ.ήÏ.Ï.ε Ï.αÏ.ηΌÎΜο Ï.ο κάÏ.Ï. Ï.λήκÏ.Ïο (j) ÎŒÎÏ.Ïι Μα εÏ.αΜαληÏ.Ξεί. 40 ---> ΀Ï.Ïα ΟÎÏεÏ.ε Ï.Ï.Ï. Μα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο εÏ.Ï.ΌεΜο ΌάΞηΌα. 41 42 3. ΧÏηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ο κάÏ.Ï. Ï.λήκÏ.Ïο, ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο Î.άΞηΌα 1.2. 43 44 ΣηΌείÏ.Ï.η: Î.Îœ αΌÏ.ιβάλλεÏ.ε για κάÏ.ι Ï.οÏ. Ï.αÏ.ήÏ.αÏ.ε, Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα βÏεΞείÏ.ε 45 Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. Î.εÏ.ά Ï.αÏ.ήÏ.Ï.ε ΟαΜά Ï.ηΜ εΜÏ.ολή Ï.οÏ. ΞÎλαÏ.ε. 46 47 ΣηΌείÏ.Ï.η: ΀α Ï.λήκÏ.Ïα Ï.οÏ. ÎŽÏοΌÎα Ξα Ï.ÏÎÏ.ει εÏ.ίÏ.ηÏ. Μα ΎοÏ.λεÏοÏ.Îœ. Î.λλά Όε Ï.α hjkl 48 Ξα ÎŒÏ.οÏείÏ.ε Μα κιΜηΞείÏ.ε Ï.Î¿Î»Ï Î³ÏηγοÏÏ.Ï.εÏα, ÎŒÏ.λιÏ. Ï.α Ï.Ï.ΜηΞίÏ.εÏ.ε. 49 50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 51 Î.άΞηΌα 1.2: Î.Î Î.Î.ÎÎ.Î΀Î.Σ Î.Î.Î. Î.Î.Î.Î.ÎÎ.Î΀Î.Σ Σ΀Î.Î VIM 52 53 !! ΣÎ.Î.Î.Î.ΩΣÎ.: Î ÏιΜ εκÏ.ελÎÏ.εÏ.ε κάÏ.οιο αÏ.Ï. Ï.α βήΌαÏ.α, ΎιαβάÏ.Ï.ε Ï.λο Ï.ο ΌάΞηΌα!! 54 55 1. ΠαÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.Ïο <ESC> (για Μα είÏ.Ï.ε Ï.ίγοÏ.Ïα Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η). 56 57 2. ΠληκÏ.ÏολογήÏ.Ï.ε: :q! <ENTER>. 58 59 ---> Î.Ï.Ï.Ï. εΟÎÏÏ.εÏ.αι αÏ.Ï. Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η ΧΩΡÎ.Σ Μα Ï.Ï.Ï.ει Ï.Ï.οιεÏ. αλλαγÎÏ. ÎÏ.εÏ.ε κάΜει. 60 Î.Îœ ΞÎλεÏ.ε Μα Ï.Ï.Ï.εÏ.ε Ï.ιÏ. αλλαγÎÏ. και Μα εΟÎÏΞεÏ.ε Ï.ληκÏ.ÏολογήÏ.Ï.ε: 61 :wq <ENTER> 62 63 3. Î.Ï.αΜ ΎείÏ.ε Ï.ηΜ Ï.ÏοÏ.ÏοÏ.ή Ï.οÏ. Ï.λοιοÏ, Ï.ληκÏ.ÏολογήÏ.Ï.ε Ï.ηΜ εΜÏ.ολή Όε Ï.ηΜ οÏ.οία 64 ÎŒÏ.ήκαÏ.ε Ï.ε αÏ.Ï.ήΜ Ï.ηΜ Ï.εÏιήγηÏ.η. Î.Ï.οÏεί Μα είΜαι: vimtutor <ENTER> 65 Î.αΜοΜικά Ξα Ï.ÏηÏ.ιΌοÏ.οιοÏÏ.αÏ.ε: vim tutor <ENTER> 66 67 ---> 'vim' Ï.ηΌαίΜει ειÏ.αγÏ.γή Ï.Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η vim, 'tutor' είΜαι Ï.ο αÏÏ.είο Ï.οÏ. 68 ΞÎλοÏ.Όε Μα ΎιοÏΞÏ.Ï.οÏ.Όε. 69 70 4. Î.Îœ ÎÏ.εÏ.ε αÏ.οΌΜηΌοΜεÏÏ.ει αÏ.Ï.ά Ï.α βήΌαÏ.α και ÎÏ.εÏ.ε αÏ.Ï.οÏ.εÏ.οίΞηÏ.η, εκÏ.ελÎÏ.Ï.ε 71 Ï.α βήΌαÏ.α 1 ÎÏ.Ï. 3 για Μα βγείÏ.ε και Μα ÎŒÏ.είÏ.ε ΟαΜά Ï.Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η. Î.εÏ.ά 72 ΌεÏ.ακιΜήÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα κάÏ.Ï. Ï.Ï.ο Î.άΞηΌα 1.3. 73 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 74 Î.άΞηΌα 1.3: Î.Î.Î.ΡÎ.ΩΣÎ. Î.Î.Î.Î.Î.ÎÎ.Î¥ - Î.Î.Î.Î.ΡÎ.ΊÎ. 75 76 ** Î.Ï.ο είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε x για Μα ΎιαγÏάÏ.εÏ.ε Ï.οΜ 77 Ï.αÏακÏ.ήÏα κάÏ.Ï. αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα. ** 78 79 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.αÏακάÏ.Ï. γÏαΌΌή Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 80 81 2. Î.ια Μα ΎιοÏΞÏ.Ï.εÏ.ε Ï.α λάΞη, κιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Μα είΜαι Ï.άΜÏ. αÏ.Ï. 82 Ï.οΜ Ï.αÏακÏ.ήÏα Ï.οÏ. Ξα ΎιαγÏαÏ.εί. 83 84 3. ΠαÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.Ïο x για Μα ΎιαγÏάÏ.εÏ.ε Ï.οΜ αΜεÏ.ιΞÏΌηÏ.ο Ï.αÏακÏ.ήÏα. 85 86 4. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 ÎŒÎÏ.Ïι 4 ÎŒÎÏ.Ïι η Ï.ÏÏ.Ï.αÏ.η Μα είΜαι Ï.Ï.Ï.Ï.ή. 87 88 ---> The ccow jumpedd ovverr thhe mooon. 89 90 5. ΀Ï.Ïα Ï.οÏ. η γÏαΌΌή είΜαι Ï.Ï.Ï.Ï.ή, Ï.ηγαίΜÏ.ε Ï.Ï.ο Î.άΞηΌα 1.4. 91 92 ΣÎ.Î.Î.Î.ΩΣÎ.: Î.αΞÏ.Ï. ΎιαÏ.ÏÎÏ.εÏ.ε αÏ.Ï.ήΜ Ï.ηΜ Ï.εÏιήγηÏ.η, Ï.ÏοÏ.Ï.αΞήÏ.Ï.ε Μα ΌηΜ 93 αÏ.οΌΜηΌοΜεÏεÏ.ε, ΌαΞαίΜεÏ.ε Όε Ï.η Ï.ÏήÏ.η. 94 95 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 Î.άΞηΌα 1.4: Î.Î.Î.ΡÎ.ΩΣÎ. Î.Î.Î.Î.Î.ÎÎ.Î¥ - Î Î.ΡÎ.Î.Î.Î.Î.Î. 97 98 ** Î.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε i για Μα Ï.αÏεΌβάλλεÏ.ε κείΌεΜο. ** 99 100 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή Ï.αÏακάÏ.Ï. Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 101 102 2. Î.ια Μα κάΜεÏ.ε Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή ίΎια Όε Ï.ηΜ ΎεÏÏ.εÏη, ΌεÏ.ακιΜείÏ.Ï.ε Ï.οΜ 103 ÎŽÏοΌÎα Ï.άΜÏ. Ï.Ï.οΜ Ï.ÏÏ.Ï.ο Ï.αÏακÏ.ήÏα Î.Î.΀Î. αÏ.Ï. Ï.Ï.οÏ. Ξα Ï.αÏεΌβληΞεί Ï.ο κείΌεΜο. 104 105 3. ΠαÏ.ήÏ.Ï.ε Ï.ο i και Ï.ληκÏ.ÏολογήÏ.Ï.ε Ï.ιÏ. αÏ.αÏαίÏ.ηÏ.εÏ. Ï.ÏοÏ.ΞήκεÏ.. 106 107 4. Î.αΞÏ.Ï. ΎιοÏΞÏ.ΜεÏ.ε κάΞε λάΞοÏ. Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα εÏ.ιÏ.Ï.ÏÎÏ.εÏ.ε Ï.Ï.ηΜ 108 Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 ÎŒÎÏ.Ïι 4 για Μα ΎιοÏΞÏ.Ï.εÏ.ε 109 Ï.ηΜ Ï.ÏÏ.Ï.αÏ.η. 110 111 ---> There is text misng this . 112 ---> There is some text missing from this line. 113 114 5. Î.Ï.αΜ είÏ.Ï.ε άΜεÏ.οι Όε Ï.ηΜ Ï.αÏεΌβολή κειΌÎΜοÏ. ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ 115 Ï.αÏακάÏ.Ï. Ï.εÏίληÏ.η. 116 117 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 118 Î.Î.Î.Î.Î.Î. 1 Î Î.ΡÎ.Î.Î.ΚÎ. 119 120 121 1. Î. ÎŽÏοΌÎαÏ. κιΜείÏ.αι Ï.ÏηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. είÏ.ε Ï.α Ï.λήκÏ.Ïα ÎŽÏοΌÎα ή Ï.α hjkl. 122 h (αÏιÏ.Ï.ÎÏα) j (κάÏ.Ï.) k (Ï.άΜÏ.) l (ΎεΟιά) 123 124 2. Î.ια Μα ÎŒÏ.είÏ.ε Ï.Ï.οΜ Vim (αÏ.Ï. Ï.ηΜ Ï.ÏοÏ.ÏοÏ.ή %) γÏάÏ.Ï.ε: vim Î.ΡΧÎ.Î.Î. <ENTER> 125 126 3. Î.ια Μα βγείÏ.ε γÏάÏ.Ï.ε: <ESC> :q! <ENTER> για αÏ.Ï.ÏÏιÏ.η Ï.Ï.Îœ αλλαγÏ.Îœ. 127 Î. γÏάÏ.Ï.ε: <ESC> :wq <ENTER> για αÏ.οΞήκεÏ.Ï.η Ï.Ï.Îœ αλλαγÏ.Îœ. 128 129 4. Î.ια Μα ΎιαγÏάÏ.εÏ.ε ÎΜαΜ Ï.αÏακÏ.ήÏα κάÏ.Ï. αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα Ï.ε 130 Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε: x 131 132 5. Î.ια Μα ειÏ.άγεÏ.ε κείΌεΜο Ï.Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η γÏάÏ.Ï.ε: 133 i Ï.ληκÏ.ÏολογήÏ.Ï.ε Ï.ο κείΌεΜο <ESC> 134 135 ΣÎ.Î.Î.Î.ΩΣÎ.: ΠαÏ.Ï.ÎœÏ.αÏ. <ESC> Ξα Ï.οÏ.οΞεÏ.ηΞείÏ.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η ή Ξα 136 ακÏ.ÏÏ.Ï.εÏ.ε Όία αΜεÏ.ιΞÏΌηÏ.η και ΌεÏικÏ.Ï. ολοκληÏÏ.ÎŒÎΜη εΜÏ.ολή. 137 138 ΀Ï.Ïα Ï.Ï.ΜεÏ.ίÏ.Ï.ε Όε Ï.ο Î.άΞηΌα 2. 139 140 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 141 Î.άΞηΌα 2.1: Î.Î΀Î.Î.Î.Σ Î.Î.Î.Î.ΡÎ.ΊÎ.Σ 142 143 ** Î.ÏάÏ.Ï.ε dw για Μα ΎιαγÏάÏ.εÏ.ε ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. ΌίαÏ. λÎΟηÏ.. ** 144 145 1. ΠαÏ.ήÏ.Ï.ε <ESC> για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. 146 147 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.αÏακάÏ.Ï. γÏαΌΌή Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 148 149 3. ΠηγαίΜεÏ.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ αÏÏ.ή Ï.ηÏ. λÎΟηÏ. Ï.οÏ. Ï.ÏÎÏ.ει Μα ΎιαγÏαÏ.εί. 150 151 4. Î.ÏάÏ.Ï.ε dw για Μα κάΜεÏ.ε Ï.ηΜ λÎΟη Μα εΟαÏ.αΜιÏ.Ï.εί. 152 153 ΣÎ.Î.Î.Î.ΩΣÎ.: ΀α γÏάΌΌαÏ.α dw Ξα εΌÏ.αΜιÏ.Ï.οÏÎœ Ï.Ï.ηΜ Ï.ελεÏ.Ï.αία γÏαΌΌή Ï.ηÏ. οΞÏ.ΜηÏ. Ï.Ï.ο 154 Ï.α Ï.ληκÏ.ÏολογείÏ.ε. Î.Îœ γÏάÏ.αÏ.ε κάÏ.ι λάΞοÏ., Ï.αÏ.ήÏ.Ï.ε <ESC> και 155 ΟεκιΜήÏ.Ï.ε αÏ.Ï. Ï.ηΜ αÏÏ.ή. 156 157 ---> There are a some words fun that don't belong paper in this sentence. 158 159 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 3 και 4 ÎŒÎÏ.Ïι η Ï.ÏÏ.Ï.αÏ.η Μα είΜαι Ï.Ï.Ï.Ï.ή και 160 Ï.ηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 2.2. 161 162 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 163 Î.άΞηΌα 2.2: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ.Σ Î.Î΀Î.Î.Î.Σ Î.Î.Î.Î.ΡÎ.ΊÎ.Σ 164 165 ** ΠληκÏ.ÏολογήÏ.Ï.ε d$ για Μα ΎιαγÏάÏ.εÏ.ε ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. Ï.ηÏ. γÏαΌΌήÏ.. ** 166 167 1. ΠαÏ.ήÏ.Ï.ε <ESC> για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. 168 169 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.αÏακάÏ.Ï. γÏαΌΌή Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 170 171 3. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ο Ï.ÎλοÏ. Ï.ηÏ. Ï.Ï.Ï.Ï.ήÏ. γÏαΌΌήÏ. (Î.Î.΀Î. Ï.ηΜ Ï.ÏÏ.Ï.η . ). 172 173 4. ΠαÏ.ήÏ.Ï.ε d$ για Μα ΎιαγÏάÏ.εÏ.ε ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. Ï.ηÏ. γÏαΌΌήÏ.. 174 175 ---> Somebody typed the end of this line twice. end of this line twice. 176 177 5. ΠηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 2.3 για Μα καÏ.αλάβεÏ.ε Ï.ι Ï.Ï.ΌβαίΜει. 178 179 180 181 182 183 184 185 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 186 Î.άΞηΌα 2.3: Î Î.ΡÎ. Î.Î΀Î.Î.ΩΠÎ.Î.Î. Î.Î΀Î.Î.Î.Î.Î.Î.ÎΩΠ187 188 189 Î. ΌοÏÏ.ή Ï.ηÏ. εΜÏ.ολήÏ. ΎιαγÏαÏ.ήÏ. d είΜαι Ï.Ï. εΟήÏ.: 190 191 [αÏιΞΌÏ.Ï.] d αΜÏ.ικείΌεΜο Î. d [αÏιΞΌÏ.Ï.] αΜÏ.ικείΌεΜο 192 Î.Ï.οÏ.: 193 αÏιΞΌÏ.Ï. - Ï.Ï.Ï.εÏ. Ï.οÏÎÏ. Ξα εκÏ.ελεÏ.Ï.εί η εΜÏ.ολή (Ï.ÏοαιÏεÏ.ικÏ., εΟ' οÏιÏ.ΌοÏ=1). 194 d - η εΜÏ.ολή Ï.ηÏ. ΎιαγÏαÏ.ήÏ.. 195 αΜÏ.ικείΌεΜο - Ï.άΜÏ. Ï.ε Ï.ι Ξα λειÏ.οÏ.ÏγήÏ.ει η εΜÏ.ολή (Ï.αÏακάÏ.Ï. λίÏ.Ï.α). 196 197 Î.ία ΌικÏή λίÏ.Ï.α αÏ.Ï. αΜÏ.ικείΌεΜα: 198 w - αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. Ï.ηÏ. λÎΟηÏ., Ï.εÏιλαΌβάΜοΜÏ.αÏ. Ï.ο ΎιάÏ.Ï.ηΌα. 199 e - αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. Ï.ηÏ. λÎΟηÏ., ΧΩΡÎ.Σ Ï.ο ΎιάÏ.Ï.ηΌα. 200 $ - αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. Ï.ηÏ. γÏαΌΌήÏ.. 201 202 ΣÎ.Î.Î.Î.ΩΣÎ.: Î.ια Ï.οÏ.Ï. Ï.ÏÏ.οÏ.Ï. Ï.ηÏ. Ï.εÏιÏ.ÎÏ.ειαÏ., Ï.αÏ.Ï.ÎœÏ.αÏ. αÏ.λÏ.Ï. Ï.ο αΜÏ.ικείΌεΜο Ï.Ï.ο 203 είÏ.Ï.ε Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.Ï.ÏίÏ. κάÏ.οια εΜÏ.ολή Ξα ΌεÏ.ακιΜήÏ.εÏ.ε 204 Ï.οΜ ÎŽÏοΌÎα Ï.Ï.Ï.Ï. καΞοÏίζεÏ.αι Ï.Ï.ηΜ λίÏ.Ï.α αΜÏ.ικειΌÎÎœÏ.Îœ. 205 206 207 208 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 209 Î.άΞηΌα 2.4: Î.Î.Î. Î.Î.Î.Î.ΡÎ.ΣÎ. Σ΀Î.Î 'Î.Î΀Î.Î.Î.-Î.Î΀Î.Î.Î.Î.Î.Î.ÎÎ.' 210 211 ** ΠληκÏ.ÏολογήÏ.Ï.ε dd για Μα ΎιαγÏάÏ.εÏ.ε Ï.λη Ï.η γÏαΌΌή. ** 212 213 Î.ΟαιÏ.ίαÏ. Ï.ηÏ. Ï.Ï.Ï.ÎœÏ.Ï.ηÏ.αÏ. Ï.ηÏ. ΎιαγÏαÏ.ήÏ. ολÏ.κληÏηÏ. γÏαΌΌήÏ., οι Ï.Ï.εΎιαÏ.Ï.ÎÏ. 214 Ï.οÏ. Vim αÏ.οÏ.άÏ.ιÏ.αΜ Ï.Ï.ι Ξα ήÏ.αΜ εÏ.κολÏ.Ï.εÏο Μα γÏάÏ.εÏ.ε αÏ.λÏ.Ï. ÎŽÏο d Ï.Ï.η 215 Ï.ειÏά για Μα ΎιαγÏάÏ.εÏ.ε Όία γÏαΌΌή. 216 217 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.η ΎεÏÏ.εÏη γÏαΌΌή Ï.ηÏ. Ï.αÏακάÏ.Ï. Ï.ÏάÏ.ηÏ.. 218 2. Î.ÏάÏ.Ï.ε dd για Μα ΎιαγÏάÏ.εÏ.ε Ï.η γÏαΌΌή. 219 3. ΀Ï.Ïα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ Ï.ÎÏ.αÏÏ.η γÏαΌΌή. 220 4. Î.ÏάÏ.Ï.ε 2dd (ΞÏ.ΌηΞείÏ.ε αÏιΞΌÏ.Ï.-εΜÏ.ολή-αΜÏ.ικείΌεΜο) για Μα 221 ΎιαγÏάÏ.εÏ.ε ÎŽÏο γÏαΌΌÎÏ.. 222 223 1) Roses are red, 224 2) Mud is fun, 225 3) Violets are blue, 226 4) I have a car, 227 5) Clocks tell time, 228 6) Sugar is sweet 229 7) And so are you. 230 231 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 232 Î.άΞηΌα 2.5: Î. Î.Î΀Î.Î.Î. Î.ÎÎ.Î.ΡÎ.ΣÎ.Σ 233 234 ** ΠαÏ.ήÏ.Ï.ε u για Μα αΜαιÏÎÏ.εÏ.ε Ï.ιÏ. Ï.ελεÏ.Ï.αίεÏ. εΜÏ.ολÎÏ., 235 U για Μα ΎιοÏΞÏ.Ï.εÏ.ε Ï.λη Ï.η γÏαΌΌή. ** 236 237 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.αÏακάÏ.Ï. γÏαΌΌή Ï.ηΌειÏ.ÎŒÎΜη Όε ---> και 238 Ï.οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ Ï.άΜÏ. Ï.Ï.ο Ï.ÏÏ.Ï.ο λάΞοÏ.. 239 2. ΠαÏ.ήÏ.Ï.ε x για Μα ΎιαγÏάÏ.εÏ.ε Ï.οΜ Ï.ÏÏ.Ï.ο αΜεÏ.ιΞÏΌηÏ.ο Ï.αÏακÏ.ήÏα. 240 3. ΀Ï.Ïα Ï.αÏ.ήÏ.Ï.ε u για Μα αΜαιÏÎÏ.εÏ.ε Ï.ηΜ Ï.ελεÏ.Ï.αία εκÏ.ελεÏ.ÎŒÎΜη εΜÏ.ολή. 241 4. Î.Ï.Ï.ή Ï.η Ï.οÏά ΎιοÏΞÏ.Ï.Ï.ε Ï.λα Ï.α λάΞη Ï.Ï.η γÏαΌΌή Ï.ÏηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ηΜ εΜÏ.ολή x. 242 5. ΀Ï.Ïα Ï.αÏ.ήÏ.Ï.ε ÎΜα κεÏ.αλαίο U για Μα εÏ.ιÏ.Ï.ÏÎÏ.εÏ.ε Ï.η γÏαΌΌή Ï.Ï.ηΜ αÏÏ.ική 243 Ï.ηÏ. καÏ.άÏ.Ï.αÏ.η. 244 6. ΀Ï.Ïα Ï.αÏ.ήÏ.Ï.ε u ΌεÏικÎÏ. Ï.οÏÎÏ. για Μα αΜαιÏÎÏ.εÏ.ε Ï.ηΜ U και 245 Ï.ÏοηγοÏΌεΜεÏ. εΜÏ.ολÎÏ.. 246 7. ΀Ï.Ïα Ï.αÏ.ήÏ.Ï.ε CTRL-R (κÏαÏ.Ï.ÎœÏ.αÏ. Ï.αÏ.ηΌÎΜο Ï.ο Ï.λήκÏ.Ïο CTRL καΞÏ.Ï. Ï.αÏ.άÏ.ε Ï.ο R) 247 ΌεÏικÎÏ. Ï.οÏÎÏ. για Μα εÏ.αΜαÏ.ÎÏεÏ.ε Ï.ιÏ. εΜÏ.ολÎÏ. (αΜαίÏεÏ.η Ï.Ï.Îœ αΜαιÏÎÏ.εÏ.Îœ). 248 249 ---> Fiix the errors oon thhis line and reeplace them witth undo. 250 251 8. Î.Ï.Ï.ÎÏ. είΜαι Ï.Î¿Î»Ï Ï.ÏήÏ.ιΌεÏ. εΜÏ.ολÎÏ.. ΀Ï.Ïα Ï.ηγαίΜεÏ.ε Ï.Ï.ηΜ 252 ΠεÏίληÏ.η Ï.οÏ. Î.αΞήΌαÏ.οÏ. 2. 253 254 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 255 Î.Î.Î.Î.Î.Î. 2 Î Î.ΡÎ.Î.Î.ΚÎ. 256 257 258 1. Î.ια Μα ΎιαγÏάÏ.εÏ.ε αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. λÎΟηÏ. γÏάÏ.Ï.ε: dw 259 260 2. Î.ια Μα ΎιαγÏάÏ.εÏ.ε αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. γÏαΌΌήÏ. γÏάÏ.Ï.ε: d$ 261 262 3. Î.ια Μα ΎιαγÏάÏ.εÏ.ε ολÏ.κληÏη Ï.η γÏαΌΌή γÏάÏ.Ï.ε: dd 263 264 4. Î. ΌοÏÏ.ή για Όία εΜÏ.ολή Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η είΜαι: 265 266 [αÏιΞΌÏ.Ï.] εΜÏ.ολή αΜÏ.ικείΌεΜο Î. εΜÏ.ολή [αÏιΞΌÏ.Ï.] αΜÏ.ικείΌεΜο 267 Ï.Ï.οÏ.: 268 αÏιΞΌÏ.Ï. - Ï.Ï.Ï.εÏ. Ï.οÏÎÏ. Μα εÏ.αΜαληÏ.Ξεί η εΜÏ.ολή 269 εΜÏ.ολή - Ï.ι Μα γίΜει, Ï.Ï.Ï.Ï. η d για ΎιαγÏαÏ.ή 270 αΜÏ.ικείΌεΜο - Ï.άΜÏ. Ï.ε Ï.ι Μα εΜεÏγήÏ.ει η εΜÏ.ολή, Ï.Ï.Ï.Ï. w (λÎΟη), 271 $ (Ï.ÎλοÏ. Ï.ηÏ. γÏαΌΌήÏ.), κÏ.λ. 272 273 5. Î.ια Μα αΜαιÏÎÏ.εÏ.ε Ï.ÏοηγοÏΌεΜεÏ. εΜÎÏγειεÏ., Ï.αÏ.ήÏ.Ï.ε: u (Ï.εζÏ. u) 274 Î.ια Μα αΜαιÏÎÏ.εÏ.ε Ï.λεÏ. Ï.ιÏ. αλλαγÎÏ. Ï.Ï.η γÏαΌΌή, Ï.αÏ.ήÏ.Ï.ε: U (κεÏ.αλαίο U) 275 Î.ια Μα αΜαιÏÎÏ.εÏ.ε Ï.ιÏ. αΜαιÏÎÏ.ειÏ., Ï.αÏ.ήÏ.Ï.ε: CTRL-R 276 277 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 278 Î.άΞηΌα 3.1: Î. Î.Î΀Î.Î.Î. ΀Î.Î Î.Î.Î.΀Î.ΣÎ.Σ 279 280 281 ** ΠαÏ.ήÏ.Ï.ε p για Μα Ï.οÏ.οΞεÏ.ήÏ.εÏ.ε Ï.ηΜ Ï.ελεÏ.Ï.αία ΎιαγÏαÏ.ή ΌεÏ.ά Ï.οΜ ÎŽÏοΌÎα. ** 282 283 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή Ï.ηÏ. Ï.αÏακάÏ.Ï. οΌάΎαÏ.. 284 285 2. ΠαÏ.ήÏ.Ï.ε dd για Μα ΎιαγÏάÏ.εÏ.ε Ï.η γÏαΌΌή και Μα Ï.ηΜ αÏ.οΞηκεÏÏ.εÏ.ε Ï.ε 286 Ï.ÏοÏ.Ï.ÏιΜή ΌΜήΌη Ï.οÏ. Vim. 287 288 3. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.η γÏαΌΌή Î Î.ÎΩ αÏ.Ï. εκεί Ï.οÏ. Ξα Ï.ÏÎÏ.ει Μα Ï.άει 289 η ΎιαγÏαΌΌÎΜη γÏαΌΌή. 290 291 4. Î.Ï.ο είÏ.Ï.ε Ï.ε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η, Ï.αÏ.ήÏ.Ï.ε p για Μα βάλεÏ.ε Ï.η γÏαΌΌή. 292 293 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 ÎÏ.Ï. 4 για Μα βάλεÏ.ε Ï.λεÏ. Ï.ιÏ. γÏαΌΌÎÏ. Ï.Ï.η 294 Ï.Ï.Ï.Ï.ή Ï.ειÏά. 295 296 d) Can you learn too? 297 b) Violets are blue, 298 c) Intelligence is learned, 299 a) Roses are red, 300 301 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 302 Î.άΞηΌα 3.2: Î. Î.Î΀Î.Î.Î. Î.Î΀Î.Î.Î.΀Î.Σ΀Î.ΣÎ.Σ 303 304 305 ** ΠαÏ.ήÏ.Ï.ε r και Ï.αÏακÏ.ήÏα για Μα αλλάΟεÏ.ε αÏ.Ï.Ï.Îœ Ï.οÏ. είΜαι 306 κάÏ.Ï. αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα. ** 307 308 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή Ï.αÏακάÏ.Ï. Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 309 310 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα ÎÏ.Ï.ι Ï.Ï.Ï.ε Μα είΜαι Ï.άΜÏ. Ï.Ï.ο Ï.ÏÏ.Ï.ο λάΞοÏ.. 311 312 3. ΠαÏ.ήÏ.Ï.ε r και ΌεÏ.ά Ï.οΜ Ï.αÏακÏ.ήÏα ο οÏ.οίοÏ. ΎιοÏΞÏ.Μει Ï.ο λάΞοÏ.. 313 314 4. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 2 και 3 ÎŒÎÏ.Ïι Μα είΜαι Ï.Ï.Ï.Ï.ή η Ï.ÏÏ.Ï.η γÏαΌΌή. 315 316 ---> Whan this lime was tuoed in, someone presswd some wrojg keys! 317 ---> When this line was typed in, someone pressed some wrong keys! 318 319 5. ΀Ï.Ïα Ï.ηγαίΜεÏ.ε Ï.Ï.ο Î.άΞηΌα 3.2. 320 321 ΣÎ.Î.Î.Î.ΩΣÎ.: Îα ΞÏ.ΌάÏ.Ï.ε Ï.Ï.ι Ï.ÏÎÏ.ει Μα ΌαΞαίΜεÏ.ε Όε Ï.η Ï.ÏήÏ.η, και Ï.Ï.ι Όε 322 Ï.ηΜ αÏ.οΌΜηΌÏ.ΜεÏ.Ï.η. 323 324 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 325 Î.άΞηΌα 3.3: Î. Î.Î΀Î.Î.Î. Î.Î.Î.Î.Î.Î.Σ 326 327 ** Î.ια Μα αλλάΟεÏ.ε Ï.ΌήΌα ή Ï.λη Ï.η λÎΟη, Ï.αÏ.ήÏ.Ï.ε cw . ** 328 329 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή Ï.αÏακάÏ.Ï. Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 330 331 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.άΜÏ. Ï.Ï.ο u Ï.ηÏ. λÎΟηÏ. lubw. 332 333 3. ΠαÏ.ήÏ.Ï.ε cw και Ï.η Ï.Ï.Ï.Ï.ή λÎΟη (Ï.Ï.ηΜ Ï.εÏίÏ.Ï.Ï.Ï.η αÏ.Ï.ή, γÏάÏ.Ï.ε 'ine'.) 334 335 4. ΠαÏ.ήÏ.Ï.ε <ESC> και Ï.ηγαίΜεÏ.ε Ï.Ï.ο εÏ.Ï.ΌεΜο λάΞοÏ. (Ï.Ï.οΜ Ï.ÏÏ.Ï.ο 336 Ï.αÏακÏ.ήÏα Ï.ÏοÏ. αλλαγή). 337 338 5. Î.Ï.αΜαλάβεÏ.ε Ï.α βήΌαÏ.α 3 και 4 ÎŒÎÏ.ÏιÏ. Ï.Ï.οÏ. η Ï.ÏÏ.Ï.η Ï.ÏÏ.Ï.αÏ.η Μα είΜαι 339 ίΎια Όε Ï.η ΎεÏÏ.εÏη. 340 341 ---> This lubw has a few wptfd that mrrf changing usf the change command. 342 ---> This line has a few words that need changing using the change command. 343 344 ΠαÏαÏ.ηÏείÏ.Ï.ε Ï.Ï.ι η cw Ï.Ï.ι ÎŒÏ.Μο αΜÏ.ικαΞιÏ.Ï.άει Ï.η λÎΟη, αλλά Ï.αÏ. ειÏ.άγει 345 εÏ.ίÏ.ηÏ. Ï.ε Ï.αÏεΌβολή. 346 347 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 348 Î.άΞηΌα 3.4: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ.Σ Î.Î.Î.Î.Î.Î.Σ Î.Î. c 349 350 351 ** Î. εΜÏ.ολή αλλαγήÏ. Ï.ÏηÏ.ιΌοÏ.οιείÏ.αι Όε Ï.α ίΎια αΜÏ.ικείΌεΜα Ï.ηÏ. ΎιαγÏαÏ.ήÏ.. ** 352 353 354 1. Î. εΜÏ.ολή αλλαγήÏ. ΎοÏ.λεÏει Όε Ï.οΜ ίΎιο Ï.ÏÏ.Ï.ο Ï.Ï.Ï.Ï. η ΎιαγÏαÏ.ή. Î. ΌοÏÏ.ή είΜαι: 355 356 [αÏιΞΌÏ.Ï.] c αΜÏ.ικείΌεΜο Î. c [αÏιΞΌÏ.Ï.] αΜÏ.ικείΌεΜο 357 358 2. ΀α αΜÏ.ικείΌεΜα είΜαι Ï.άλι Ï.α ίΎια, Ï.Ï.Ï.Ï. w (λÎΟη), $ (Ï.ÎλοÏ. γÏαΌΌήÏ.), κÏ.λ. 359 360 3. Î.εÏ.ακιΜηΞείÏ.ε Ï.Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή Ï.αÏακάÏ.Ï. Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 361 362 4. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ο Ï.ÏÏ.Ï.ο λάΞοÏ.. 363 364 5. Î.ÏάÏ.Ï.ε c$ για Μα κάΜεÏ.ε Ï.ο Ï.Ï.Ï.λοιÏ.ο Ï.ηÏ. γÏαΌΌήÏ. ίΎιο Όε Ï.η ΎεÏÏ.εÏη 365 και Ï.αÏ.ήÏ.Ï.ε <ESC>. 366 367 ---> The end of this line needs some help to make it like the second. 368 ---> The end of this line needs to be corrected using the c$ command. 369 370 371 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 372 Î.Î.Î.Î.Î.Î. 3 Î Î.ΡÎ.Î.Î.ΚÎ. 373 374 375 1. Î.ια Μα Ï.οÏ.οΞεÏ.ήÏ.εÏ.ε κείΌεΜο Ï.οÏ. ÎŒÏ.λιÏ. ÎÏ.ει ΎιαγÏαÏ.εί, Ï.αÏ.ήÏ.Ï.ε p . 376 Î.Ï.Ï.Ï. Ï.οÏ.οΞεÏ.εί Ï.ο ΎιαγÏαΌΌÎΜο κείΌεΜο Î.Î.΀Î. Ï.οΜ ÎŽÏοΌÎα (αΜ ΎιαγÏάÏ.Ï.ηκε 377 γÏαΌΌή Ξα Ï.άει ΌεÏ.ά Ï.Ï.η γÏαΌΌή κάÏ.Ï. αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα. 378 379 2. Î.ια Μα αΜÏ.ικαÏ.αÏ.Ï.ήÏ.εÏ.ε Ï.οΜ Ï.αÏακÏ.ήÏα κάÏ.Ï. αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα, Ï.αÏ.ήÏ.Ï.ε r 380 και ΌεÏ.ά Ï.οΜ Ï.αÏακÏ.ήÏα Ï.οÏ. Ξα αΜÏ.ικαÏ.αÏ.Ï.ήÏ.ει Ï.οΜ αÏÏ.ικÏ.. 381 382 3. Î. εΜÏ.ολή αλλαγήÏ. Ï.αÏ. εÏ.ιÏ.ÏÎÏ.ει Μα αλλάΟεÏ.ε Ï.ο καΞοÏιÏ.ÎŒÎΜο αΜÏ.ικείΌεΜο 383 αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. Ï.οÏ. αΜÏ.ικείΌεΜο. Î .Ï.. γÏάÏ.Ï.ε cw για Μα 384 αλλάΟεÏ.ε αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. Ï.ηÏ. λÎΟηÏ., c$ για Μα αλλάΟεÏ.ε 385 ÎŒÎÏ.Ïι Ï.ο Ï.ÎλοÏ. γÏαΌΌήÏ.. 386 387 4. Î. ΌοÏÏ.ή για Ï.ηΜ αλλαγή είΜαι: 388 389 [αÏιΞΌÏ.Ï.] c αΜÏ.ικείΌεΜο Î. c [αÏιΞΌÏ.Ï.] αΜÏ.ικείΌεΜο 390 391 ΀Ï.Ïα Ï.Ï.ΜεÏ.ίÏ.Ï.ε Όε Ï.ο εÏ.Ï.ΌεΜο ΌάΞηΌα. 392 393 394 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 395 Î.άΞηΌα 4.1: Î.Î.ΣÎ. Î.Î.Î. Î.Î.΀Î.Σ΀Î.ΣÎ. Î.ΡΧÎ.Î.Î.Î¥ 396 397 398 ** ΠαÏ.ήÏ.Ï.ε CTRL-g για Μα εΌÏ.αΜιÏ.Ï.εί η ΞÎÏ.η Ï.αÏ. Ï.Ï.ο αÏÏ.είο και η καÏ.άÏ.Ï.αÏ.ή Ï.οÏ.. 399 ΠαÏ.ήÏ.Ï.ε SHIFT-G για Μα Ï.άÏ.ε Ï.ε Όία γÏαΌΌή Ï.Ï.ο αÏÏ.είο. ** 400 401 ΣηΌείÏ.Ï.η: Î.ιαβάÏ.Ï.ε ολÏ.κληÏο Ï.ο ΌάΞηΌα Ï.ÏιΜ εκÏ.ελÎÏ.εÏ.ε κάÏ.οιο αÏ.Ï. Ï.α βήΌαÏ.α!! 402 403 1. Î.ÏαÏ.ήÏ.Ï.ε Ï.αÏ.ηΌÎΜο Ï.ο Ï.λήκÏ.Ïο Ctrl και Ï.αÏ.ήÏ.Ï.ε g . Î.ία γÏαΌΌή καÏ.άÏ.Ï.αÏ.ηÏ. 404 Ξα εΌÏ.αΜιÏ.Ï.εί Ï.Ï.ο κάÏ.Ï. ÎŒÎÏοÏ. Ï.ηÏ. Ï.ελίΎαÏ. Όε Ï.ο Ï.ΜοΌα αÏÏ.είοÏ. και Ï.η 405 γÏαΌΌή Ï.οÏ. είÏ.Ï.ε. Î.Ï.ΌηΞείÏ.ε Ï.οΜ αÏιΞΌÏ. γÏαΌΌήÏ. για Ï.ο Î.ήΌα 3. 406 407 2. ΠαÏ.ήÏ.Ï.ε shift-G για Μα ΌεÏ.ακιΜηΞείÏ.ε Ï.Ï.ο Ï.ÎλοÏ. Ï.οÏ. αÏÏ.είοÏ.. 408 409 3. ΠαÏ.ήÏ.Ï.ε Ï.οΜ αÏιΞΌÏ. Ï.ηÏ. γÏαΌΌήÏ. Ï.οÏ. ήÏ.αÏ.Ï.αΜ και ΌεÏ.ά shift-G. Î.Ï.Ï.Ï. Ξα 410 Ï.αÏ. εÏ.ιÏ.Ï.ÏÎÏ.ει Ï.Ï.η γÏαΌΌή Ï.οÏ. ήÏ.αÏ.Ï.αΜ Ï.ÏιΜ Ï.αÏ.ήÏ.εÏ.ε για Ï.ÏÏ.Ï.η Ï.οÏά Ctrl-g. 411 (Î.Ï.αΜ Ï.ληκÏ.ÏολογείÏ.ε Ï.οÏ.Ï. αÏιΞΌοÏÏ., Î.Î.ΠΞα εΌÏ.αΜίζοΜÏ.αι Ï.Ï.ηΜ οΞÏ.Μη). 412 413 4. Î.Îœ ΜοιÏ.ΞεÏ.ε Ï.ίγοÏ.ÏοÏ. για αÏ.Ï.Ï., εκÏ.ελÎÏ.Ï.ε Ï.α βήΌαÏ.α 1 ÎÏ.Ï. 3. 414 415 416 417 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 418 Î.άΞηΌα 4.2: Î. Î.Î΀Î.Î.Î. Î.ÎÎ.Î.Î.΀Î.ΣÎ.Σ 419 420 421 ** ΠαÏ.ήÏ.Ï.ε / ακολοÏ.ΞοÏΌεΜο αÏ.Ï. Ï.η Ï.ÏάÏ.η Ï.οÏ. Ï.άÏ.ΜεÏ.ε. ** 422 423 1. Σε Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η Ï.αÏ.ήÏ.Ï.ε Ï.οΜ Ï.αÏακÏ.ήÏα / . ΠαÏαÏ.ηÏήÏ.Ï.ε Ï.Ï.ι αÏ.Ï.Ï.Ï. και 424 ο ÎŽÏοΌÎαÏ. εΌÏ.αΜίζοΜÏ.αι Ï.Ï.ο κάÏ.Ï. ÎŒÎÏοÏ. Ï.ηÏ. οΞÏ.ΜηÏ. Ï.Ï.Ï.Ï. Όε Ï.ηΜ εΜÏ.ολή : . 425 426 2. ΀Ï.Ïα γÏάÏ.Ï.ε 'errroor' <ENTER>. Î.Ï.Ï.ή είΜαι η λÎΟη Ï.οÏ. ΞÎλεÏ.ε Μα Ï.άΟεÏ.ε. 427 428 3. Î.ια Μα Ï.άΟεÏ.ε ΟαΜά για Ï.ηΜ ίΎια Ï.ÏάÏ.η, Ï.αÏ.ήÏ.Ï.ε αÏ.λÏ.Ï. n . 429 Î.ια Μα Ï.άΟεÏ.ε Ï.ηΜ ίΎια Ï.ÏάÏ.η Ï.Ï.ηΜ αΜÏ.ίΞεÏ.η καÏ.εÏΞÏ.ÎœÏ.η, Ï.αÏ.ήÏ.Ï.ε Shift-N . 430 431 4. Î.Îœ ΞÎλεÏ.ε Μα Ï.άΟεÏ.ε για Όία Ï.ÏάÏ.η Ï.ÏοÏ. Ï.α Ï.ίÏ.Ï., Ï.ÏηÏ.ιΌοÏ.οιήÏ.Ï.ε Ï.ηΜ εΜÏ.ολή ? αΜÏ.ί Ï.ηÏ. / . 432 433 ---> Î.Ï.αΜ η αΜαζήÏ.ηÏ.η Ï.Ï.άÏ.ει Ï.Ï.ο Ï.ÎλοÏ. Ï.οÏ. αÏÏ.είοÏ. Ξα Ï.Ï.ΜεÏ.ίÏ.ει αÏ.Ï. Ï.ηΜ αÏÏ.ή. 434 435 "errroor" is not the way to spell error; errroor is an error. 436 437 438 439 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 440 Î.άΞηΌα 4.3: Î.ΥΡÎ.ΣÎ. ΀Î.Î.ΡÎ.Î.Σ΀ΩΠΠÎ.ΡÎ.ÎÎ.Î.ΣÎ.ΩΠ441 442 443 ** ΠαÏ.ήÏ.Ï.ε % για Μα βÏείÏ.ε Ï.ηΜ αΜÏ.ίÏ.Ï.οιÏ.η ), ], ή } . ** 444 445 1. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.ε κάÏ.οια (, [, ή { Ï.Ï.ηΜ Ï.αÏακάÏ.Ï. γÏαΌΌή 446 Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 447 448 2. ΀Ï.Ïα Ï.αÏ.ήÏ.Ï.ε Ï.οΜ Ï.αÏακÏ.ήÏα % . 449 450 3. Î. ÎŽÏοΌÎαÏ. Ξα Ï.ÏÎÏ.ει Μα είΜαι Ï.Ï.ηΜ αΜÏ.ίÏ.Ï.οιÏ.η Ï.αÏÎΜΞεÏ.η ή αγκÏλη. 451 452 4. ΠαÏ.ήÏ.Ï.ε % για Μα ΌεÏ.ακιΜήÏ.εÏ.ε Ï.οΜ ÎŽÏοΌÎα Ï.ίÏ.Ï. Ï.Ï.ηΜ Ï.ÏÏ.Ï.η αγκÏλη 453 (Ï.οÏ. ζεÏ.γαÏιοÏ). 454 455 ---> This ( is a test line with ('s, ['s ] and {'s } in it. )) 456 457 ΣÎ.Î.Î.Î.ΩΣÎ.: Î.Ï.Ï.Ï. είΜαι Ï.Î¿Î»Ï Ï.ÏήÏ.ιΌο Ï.Ï.ηΜ αÏ.οÏ.Ï.αλΌάÏ.Ï.Ï.η εΜÏ.Ï. Ï.ÏογÏάΌΌαÏ.οÏ. 458 Όε Όη Ï.αιÏιαÏ.Ï.ÎÏ. Ï.αÏεΜΞÎÏ.ειÏ.! 459 460 461 462 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 463 Î.άΞηΌα 4.4: Î.ÎÎ.Σ ΀ΡÎ.Î Î.Σ Î.Î.Î. Î.Î.Î.Î.Î.Î. Î.Î.Î.ΩΠ464 465 466 ** Î.ÏάÏ.Ï.ε :s/old/new/g για Μα αλλάΟεÏ.ε Ï.ο 'new' Όε Ï.ο 'old'. ** 467 468 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.αÏακάÏ.Ï. γÏαΌΌή Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 469 470 2. Î.ÏάÏ.Ï.ε :s/thee/the <ENTER> . ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι αÏ.Ï.ή η εΜÏ.ολή αλλάζει ÎŒÏ.Μο 471 Ï.ηΜ Ï.ÏÏ.Ï.η εΌÏ.άΜιÏ.η Ï.Ï.η γÏαΌΌή. 472 473 3. ΀Ï.Ïα γÏάÏ.Ï.ε :s/thee/the/g εΜΜοÏ.ÎœÏ.αÏ. γεΜική αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.Ï.η 474 γÏαΌΌή. Î.Ï.Ï.Ï. αλλάζει Ï.λεÏ. Ï.ιÏ. εΌÏ.αΜίÏ.ειÏ. εÏ.ί Ï.ηÏ. γÏαΌΌήÏ.. 475 476 ---> thee best time to see thee flowers is in thee spring. 477 478 4. Î.ια Μα αλλάΟεÏ.ε κάΞε εΌÏ.άΜιÏ.η ΌίαÏ. Ï.Ï.ΌβολοÏ.ειÏάÏ. ΌεÏ.Î±ÎŸÏ ÎŽÏο γÏαΌΌÏ.Îœ, 479 γÏάÏ.Ï.ε :#,#s/old/new/g Ï.Ï.οÏ. #,# οι αÏιΞΌοί Ï.Ï.Îœ ÎŽÏο γÏαΌΌÏ.Îœ. 480 Î.ÏάÏ.Ï.ε :%s/old/new/g για Μα αλλάΟεÏ.ε κάΞε εΌÏ.άΜιÏ.η Ï.ε Ï.λο Ï.ο αÏÏ.είο. 481 482 483 484 485 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 486 Î.Î.Î.Î.Î.Î. 4 Î Î.ΡÎ.Î.Î.ΚÎ. 487 488 489 1. ΀ο Ctrl-g εΌÏ.αΜίζει Ï.η ΞÎÏ.η Ï.αÏ. Ï.Ï.ο αÏÏ.είο και Ï.ηΜ καÏ.άÏ.Ï.αÏ.ή Ï.οÏ.. 490 ΀ο Shift-G Ï.ηγαίΜει Ï.Ï.ο Ï.ÎλοÏ. Ï.οÏ. αÏÏ.είοÏ.. Î.ΜαÏ. αÏιΞΌÏ.Ï. γÏαΌΌήÏ. 491 ακολοÏ.ΞοÏΌεΜοÏ. αÏ.Ï. Shift-G Ï.ηγαίΜει Ï.ε εκείΜη Ï.η γÏαΌΌή. 492 493 2. Î.ÏάÏ.οΜÏ.αÏ. / ακολοÏ.ΞοÏΌεΜο αÏ.Ï. Όία Ï.ÏάÏ.η Ï.άÏ.Μει Ï.ÏοÏ. Ï.α Î.ΠΡÎ.Σ΀Î. για 494 Ï.η Ï.ÏάÏ.η. Î.ÏάÏ.οΜÏ.αÏ. ? ακολοÏ.ΞοÏΌεΜο αÏ.Ï. Όία Ï.ÏάÏ.η Ï.άÏ.Μει Ï.ÏοÏ. Ï.α Î Î.ΣΩ 495 για Ï.η Ï.ÏάÏ.η. Î.εÏ.ά αÏ.Ï. Όία αΜαζήÏ.ηÏ.η Ï.αÏ.ήÏ.Ï.ε n για Μα βÏείÏ.ε Ï.ηΜ 496 εÏ.Ï.ΌεΜη εΌÏ.άΜιÏ.η Ï.ÏοÏ. Ï.ηΜ ίΎια καÏ.εÏΞÏ.ÎœÏ.η ή Shift-N για Μα Ï.άΟεÏ.ε 497 Ï.ÏοÏ. Ï.ηΜ αΜÏ.ίΞεÏ.η καÏ.εÏΞÏ.ÎœÏ.η. 498 499 3. ΠαÏ.Ï.ÎœÏ.αÏ. % Ï.Ï.ο ο ÎŽÏοΌÎαÏ. είΜαι Ï.άΜÏ. Ï.ε Όία (,),[,],{, ή } εΜÏ.οÏ.ίζει 500 Ï.ο αΜÏ.ίÏ.Ï.οιÏ.ο Ï.αίÏι Ï.οÏ. ζεÏ.γαÏιοÏ. 501 502 4. Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Όε new Ï.οÏ. Ï.ÏÏ.Ï.οÏ. old Ï.Ï.η γÏαΌΌή γÏάÏ.Ï.ε :s/old/new 503 Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Όε new Ï.λÏ.Îœ Ï.Ï.Îœ 'old' Ï.Ï.η γÏαΌΌή γÏάÏ.Ï.ε :s/old/new/g 504 Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.ÏάÏ.εÏ.Îœ ΌεÏ.Î±ÎŸÏ ÎŽÏο # γÏαΌΌÏ.Îœ γÏάÏ.Ï.ε :#,#s/old/new/g 505 Î.ια αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Ï.λÏ.Îœ Ï.Ï.Îœ εΌÏ.αΜίÏ.εÏ.Îœ Ï.Ï.ο αÏÏ.είο γÏάÏ.Ï.ε :%s/old/new/g 506 Î.ια εÏÏ.Ï.ηÏ.η εÏ.ιβεβαίÏ.Ï.ηÏ. κάΞε Ï.οÏά Ï.ÏοÏ.ΞÎÏ.Ï.ε ÎΜα 'c' "%s/old/new/gc 507 508 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 509 Î.άΞηΌα 5.1: ΠΩΣ Î.Î.΀Î.Î.Ω Î.Î.Î. Î.Î.Ω΀Î.ΡÎ.Î.Î. Î.Î΀Î.Î.Î. 510 511 512 ** Î.ÏάÏ.Ï.ε :! ακολοÏ.ΞοÏΌεΜο αÏ.Ï. Όία εΟÏ.Ï.εÏική εΜÏ.ολή για Μα Ï.ηΜ εκÏ.ελÎÏ.εÏ.ε. ** 513 514 1. ΠαÏ.ήÏ.Ï.ε Ï.ηΜ οικεία εΜÏ.ολή : για Μα ΞÎÏ.εÏ.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ο κάÏ.Ï. ÎŒÎÏοÏ. 515 Ï.ηÏ. οΞÏ.ΜηÏ.. Î.Ï.Ï.Ï. Ï.αÏ. εÏ.ιÏ.ÏÎÏ.ει Μα ÎŽÏ.Ï.εÏ.ε Όία εΜÏ.ολή. 516 517 2. ΀Ï.Ïα Ï.αÏ.ήÏ.Ï.ε Ï.ο ! (ΞαÏ.ΌαÏ.Ï.ικÏ.). Î.Ï.Ï.Ï. Ï.αÏ. εÏ.ιÏ.ÏÎÏ.ει Μα εκÏ.ελÎÏ.εÏ.ε 518 οÏ.οιαΎήÏ.οÏ.ε εΟÏ.Ï.εÏική εΜÏ.ολή Ï.οÏ. Ï.λοιοÏ. 519 520 3. ΣαΜ Ï.αÏάΎειγΌα γÏάÏ.Ï.ε ls ΌεÏ.ά αÏ.Ï. Ï.ο ! και Ï.αÏ.ήÏ.Ï.ε <ENTER>. Î.Ï.Ï.Ï. Ξα 521 Ï.αÏ. εΌÏ.αΜίÏ.ει Όία λίÏ.Ï.α Ï.οÏ. καÏ.αλÏ.γοÏ. Ï.αÏ., ακÏιβÏ.Ï. Ï.αΜ Μα ήÏ.αÏ.Ï.αΜ Ï.Ï.ηΜ 522 Ï.ÏοÏ.ÏοÏ.ή Ï.οÏ. Ï.λοιοÏ. Î. Ï.ÏηÏ.ιΌοÏ.οιήÏ.Ï.ε :!dir αΜ Ï.ο ls ΎεΜ ΎοÏ.λεÏει. 523 524 ---> ΣηΌείÏ.Ï.η: Î.ίΜαι ÎŽÏ.ΜαÏ.Ï.Îœ Μα εκÏ.ελÎÏ.εÏ.ε οÏ.οιαΎήÏ.οÏ.ε εΟÏ.Ï.εÏική εΜÏ.ολή 525 Όε αÏ.Ï.Ï.Îœ Ï.οΜ Ï.ÏÏ.Ï.ο. 526 527 ---> ΣηΌείÏ.Ï.η: Î.λεÏ. οι εΜÏ.ολÎÏ. : Ï.ÏÎÏ.ει Μα Ï.εÏΌαÏ.ίζοΜÏ.αι Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο <ENTER>. 528 529 530 531 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 532 Î.άΞηΌα 5.2: Î Î.ΡÎ.ΣΣÎ.΀Î.ΡÎ. Î Î.ΡÎ. Î.Î.Î.ΡÎ.ΊÎ.Σ Î.ΡΧÎ.Î.ΩΠ533 534 535 ** Î.ια Μα Ï.Ï.Ï.εÏ.ε Ï.ιÏ. αλλάγεÏ. Ï.οÏ. κάΜαÏ.ε Ï.Ï.ο αÏÏ.είο, γÏάÏ.Ï.ε :w Î.ΡΧÎ.Î.Î.. ** 536 537 1. Î.ÏάÏ.Ï.ε :!dir ή :!ls για Μα Ï.άÏεÏ.ε Όία λίÏ.Ï.α Ï.οÏ. καÏ.αλÏ.γοÏ. Ï.αÏ.. 538 Î.Ύη ΟÎÏεÏ.ε Ï.Ï.ι Ï.ÏÎÏ.ει Μα Ï.αÏ.ήÏ.εÏ.ε <ENTER> ΌεÏ.ά αÏ.Ï. αÏ.Ï.Ï.. 539 540 2. Î.ιαλÎΟÏ.ε ÎΜα Ï.ΜοΌα αÏÏ.είοÏ. Ï.οÏ. ΎεΜ Ï.Ï.άÏÏ.ει ακÏ.Όα, Ï.Ï.Ï.Ï. Ï.ο TEST. 541 542 3. ΀Ï.Ïα γÏάÏ.Ï.ε: :w TEST (Ï.Ï.οÏ. TEST είΜαι Ï.ο Ï.ΜοΌα αÏÏ.είοÏ. Ï.οÏ. ΎιαλÎΟαÏ.ε). 543 544 4. Î.Ï.Ï.Ï. Ï.Ï.ζει Ï.λο Ï.ο αÏÏ.είο (vim Tutor) Όε Ï.ο Ï.ΜοΌα TEST. Î.ια Μα Ï.ο 545 εÏ.αληΞεÏÏ.εÏ.ε, γÏάÏ.Ï.ε ΟαΜά :!dir για Μα ΎείÏ.ε Ï.οΜ καÏ.άλογÏ. Ï.αÏ.. 546 547 ---> ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι αΜ βγαίΜαÏ.ε αÏ.Ï. Ï.οΜ Vim και ÎŒÏ.αίΜαÏ.ε ΟαΜά Όε Ï.ο Ï.ΜοΌα 548 αÏÏ.είοÏ. TEST, Ï.ο αÏÏ.είο Ξα ήÏ.αΜ ακÏιβÎÏ. αΜÏ.ίγÏαÏ.ο Ï.οÏ. tutor Ï.Ï.αΜ Ï.ο Ï.Ï.Ï.αÏ.ε. 549 550 5. ΀Ï.Ïα ΎιαγÏάÏ.Ï.ε Ï.ο αÏÏ.είο γÏάÏ.οΜÏ.αÏ. (MS-DOS): :!del TEST 551 552 553 554 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 555 Î.άΞηΌα 5.3: Î.Î Î.Î.Î.Î.΀Î.Î.Î. Î.Î΀Î.Î.Î. Î.Î.Î.ΡÎ.ΊÎ.Σ 556 557 558 ** Î.ια Μα Ï.Ï.Ï.εÏ.ε Ï.ΌήΌα Ï.οÏ. αÏÏ.είοÏ., γÏάÏ.Ï.ε :#,# w Î.ΡΧÎ.Î.Î. ** 559 560 1. Î.λλη Όια Ï.οÏά, γÏάÏ.Ï.ε :!dir ή :!ls για Μα Ï.άÏεÏ.ε Όία λίÏ.Ï.α αÏ.Ï. Ï.οΜ 561 καÏ.άλογÏ. Ï.αÏ. και ΎιαλÎΟÏ.ε ÎΜα καÏ.άλληλο Ï.ΜοΌα αÏÏ.είοÏ. Ï.Ï.Ï.Ï. Ï.ο TEST. 562 563 2. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ο Ï.άΜÏ. ÎŒÎÏοÏ. αÏ.Ï.ήÏ. Ï.ηÏ. Ï.ελίΎαÏ. και Ï.αÏ.ήÏ.Ï.ε 564 Ctrl-g για Μα βÏείÏ.ε Ï.οΜ αÏιΞΌÏ. αÏ.Ï.ήÏ. Ï.ηÏ. γÏαΌΌήÏ.. 565 ÎÎ. Î.Î¥Î.Î.Σ΀Î. Î.Υ΀Î.Π΀Î.Î Î.ΡÎ.Î.Î.Î.! 566 567 3. ΀Ï.Ïα Ï.ηγαίΜεÏ.ε Ï.Ï.ο κάÏ.Ï. ÎŒÎÏοÏ. Ï.ηÏ. Ï.ελίΎαÏ. και Ï.αÏ.ήÏ.Ï.ε Ctrl-g ΟαΜά. 568 ÎÎ. Î.Î¥Î.Î.Σ΀Î. Î.Î.Î. Î.Υ΀Î.Π΀Î.Î Î.ΡÎ.Î.Î.Î.! 569 570 4. Î.ια Μα Ï.Ï.Ï.εÏ.ε Î.Î.ÎÎ. ÎΜα Ï.ΌήΌα Ï.ε αÏÏ.είο, γÏάÏ.Ï.ε :#,# w TEST 571 Ï.Ï.οÏ. #,# οι ÎŽÏο αÏιΞΌοί Ï.οÏ. αÏ.οΌΜηΌοΜεÏÏ.αÏ.ε (Ï.άΜÏ.,κάÏ.Ï.) και TEST Ï.ο 572 Ï.ΜοΌα Ï.οÏ. αÏÏ.είοÏ. Ï.αÏ.. 573 574 5. Î.αΜά, ΎείÏ.ε Ï.Ï.ι Ï.ο αÏÏ.είο είΜαι εκεί Όε Ï.ηΜ :!dir αλλά Î.Î.Î Ï.ο ΎιαγÏάÏ.εÏ.ε. 575 576 577 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 578 Î.άΞηΌα 5.4: Î.ÎÎ.Î.΀ΩÎ΀Î.Σ Î.Î.Î. Î.ÎΩÎÎ.Î΀Î.Σ Î.ΡΧÎ.Î.Î. 579 580 581 ** Î.ια Μα ειÏ.άγεÏ.ε Ï.α Ï.εÏιεÏ.Ï.ΌεΜα εΜÏ.Ï. αÏÏ.είοÏ., γÏάÏ.Ï.ε :r Î.ΡΧÎ.Î.Î. ** 582 583 1. Î.ÏάÏ.Ï.ε :!dir για Μα βεβαιÏ.ΞείÏ.ε Ï.Ï.ι Ï.ο TEST Ï.Ï.άÏÏ.ει αÏ.Ï. Ï.ÏιΜ. 584 585 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ο Ï.άΜÏ. ÎŒÎÏοÏ. Ï.ηÏ. Ï.ελίΎαÏ.. 586 587 ΣÎ.Î.Î.Î.ΩΣÎ.: Î.Ï.Ï.Ï.οÏ. εκÏ.ελÎÏ.εÏ.ε Ï.ο Î.ήΌα 3 Ξα ΎείÏ.ε Ï.ο Î.άΞηΌα 5.3. 588 Î.εÏ.ά κιΜηΞείÏ.ε Î.Î.΀Ω ΟαΜά Ï.ÏοÏ. Ï.ο ΌάΞηΌα αÏ.Ï.Ï.. 589 590 3. ΀Ï.Ïα αΜακÏ.ήÏ.Ï.ε Ï.ο αÏÏ.είο Ï.αÏ. TEST Ï.ÏηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. Ï.ηΜ εΜÏ.ολή :r TEST 591 Ï.Ï.οÏ. TEST είΜαι Ï.ο Ï.ΜοΌα Ï.οÏ. αÏÏ.είοÏ.. 592 593 ΣÎ.Î.Î.Î.ΩΣÎ.: ΀ο αÏÏ.είο Ï.οÏ. αΜακÏ.άÏ.ε Ï.οÏ.οΞεÏ.είÏ.αι ΟεκιΜÏ.ÎœÏ.αÏ. εκεί Ï.οÏ. βÏίÏ.κεÏ.αι 594 ο ÎŽÏοΌÎαÏ.. 595 596 4. Î.ια Μα εÏ.αληΞεÏÏ.εÏ.ε Ï.Ï.ι Ï.ο αÏÏ.είο αΜακÏ.ήΞηκε, Ï.ίÏ.Ï. Ï.οΜ ÎŽÏοΌÎα και 597 Ï.αÏαÏ.ηÏήÏ.Ï.ε Ï.Ï.ι Ï.Ï.άÏÏ.οÏ.Îœ Ï.Ï.Ïα ÎŽÏο αΜÏ.ίγÏαÏ.α Ï.οÏ. Î.αΞήΌαÏ.οÏ. 5.3, Ï.ο 598 αÏÏ.ικÏ. και η ÎκΎοÏ.η Ï.οÏ. αÏÏ.είοÏ.. 599 600 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 601 Î.Î.Î.Î.Î.Î. 5 Î Î.ΡÎ.Î.Î.ΚÎ. 602 603 604 1. :!εΜÏ.ολή εκÏ.ελεί Όία εΟÏ.Ï.εÏική εΜÏ.ολή. 605 606 Î.εÏικά Ï.ÏήÏ.ιΌα Ï.αÏαΎείγΌαÏ.α είΜαι (MS-DOS): 607 :!dir - εΌÏ.άΜιÏ.η λίÏ.Ï.αÏ. εΜÏ.Ï. καÏ.αλÏ.γοÏ.. 608 :!del Î.ΡΧÎ.Î.Î. - ΎιαγÏάÏ.ει Ï.ο Î.ΡΧÎ.Î.Î.. 609 610 2. :w Î.ΡΧÎ.Î.Î. γÏάÏ.ει Ï.ο Ï.ÏÎÏ.Ï.Îœ αÏÏ.είο Ï.οÏ. Vim Ï.Ï.ο ΎίÏ.κο Όε Ï.ΜοΌα Î.ΡΧÎ.Î.Î.. 611 612 3. :#,#w Î.ΡΧÎ.Î.Î. Ï.Ï.ζει Ï.ιÏ. γÏαΌΌÎÏ. αÏ.Ï. # ÎŒÎÏ.Ïι # Ï.Ï.ο Î.ΡΧÎ.Î.Î.. 613 614 4. :r Î.ΡΧÎ.Î.Î. αΜακÏ.εί Ï.ο αÏÏ.είο ΎίÏ.κοÏ. Î.ΡΧÎ.Î.Î. και Ï.ο Ï.αÏεΌβάλλει ÎŒÎÏ.α 615 Ï.Ï.ο Ï.ÏÎÏ.οΜ αÏÏ.είο ΌεÏ.ά αÏ.Ï. Ï.η ΞÎÏ.η Ï.οÏ. ÎŽÏοΌÎα. 616 617 618 619 620 621 622 623 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 624 Î.άΞηΌα 6.1: Î. Î.Î΀Î.Î.Î. Î.ÎÎ.Î.Î.Î.Î.΀Î.Σ 625 626 627 ** ΠαÏ.ήÏ.Ï.ε o για Μα αΜοίΟεÏ.ε Όία γÏαΌΌή κάÏ.Ï. αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα και Μα 628 βÏεΞείÏ.ε Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌÎΜοÏ.. ** 629 630 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.αÏακάÏ.Ï. γÏαΌΌή Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 631 632 2. ΠαÏ.ήÏ.Ï.ε o (Ï.εζÏ.) για Μα αΜοίΟεÏ.ε Όία γÏαΌΌή Î.Î.΀Ω αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα και Μα 633 βÏεΞείÏ.ε Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌÎΜοÏ.. 634 635 3. ΀Ï.Ïα αΜÏ.ιγÏάÏ.Ï.ε Ï.η Ï.ηΌειÏ.ÎŒÎΜη Όε ---> γÏαΌΌή και Ï.αÏ.ήÏ.Ï.ε <ESC> για Μα 636 βγείÏ.ε αÏ.Ï. Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌÎΜοÏ.. 637 638 ---> After typing o the cursor is placed on the open line in Insert mode. 639 640 4. Î.ια Μα αΜοίΟεÏ.ε Όία γÏαΌΌή Î Î.ÎΩ αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα, Ï.αÏ.ήÏ.Ï.ε αÏ.λά ÎΜα κεÏ.αλαίο 641 O, αΜÏ.ί για ÎΜα Ï.εζÏ. o. Î.οκιΌάÏ.Ï.ε Ï.ο Ï.Ï.ηΜ Ï.αÏακάÏ.Ï. γÏαΌΌή. 642 Î.ΜοίγεÏ.ε γÏαΌΌή Ï.άΜÏ. αÏ.Ï. αÏ.Ï.ήΜ Ï.αÏ.Ï.ÎœÏ.αÏ. Shift-O Ï.Ï.ο ο ÎŽÏοΌÎαÏ. είΜαι Ï.Ï.η γÏαΌΌή 643 644 645 646 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 647 Î.άΞηΌα 6.2: Î. Î.Î΀Î.Î.Î. ΠΡÎ.ΣÎ.Î.Î.Î.Σ 648 649 ** ΠαÏ.ήÏ.Ï.ε a για Μα ειÏ.άγεÏ.ε κείΌεΜο Î.Î.΀Î. Ï.οΜ ÎŽÏοΌÎα. ** 650 651 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ο Ï.ÎλοÏ. Ï.ηÏ. Ï.ÏÏ.Ï.ηÏ. γÏαΌΌήÏ. Ï.αÏακάÏ.Ï. 652 Ï.ηΌειÏ.ÎŒÎΜη Όε ---> Ï.αÏ.Ï.ÎœÏ.αÏ. $ Ï.Ï.ηΜ Î.αΜοΜική Î.αÏ.άÏ.Ï.αÏ.η. 653 654 2. ΠαÏ.ήÏ.Ï.ε ÎΜα a (Ï.εζÏ.) για Μα Ï.ÏοÏ.ΞÎÏ.εÏ.ε κείΌεΜο Î.Î.΀Î. αÏ.Ï. Ï.οΜ Ï.αÏακÏ.ήÏα 655 Ï.οÏ. είΜαι κάÏ.Ï. αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα. (΀ο κεÏ.αλαίο A Ï.ÏοÏ.ΞÎÏ.ει Ï.Ï.ο Ï.ÎλοÏ. 656 Ï.ηÏ. γÏαΌΌήÏ.). 657 658 ΣηΌείÏ.Ï.η: Î.Ï.Ï.Ï. αÏ.οÏ.εÏγει Ï.ο Ï.άÏ.ηΌα Ï.οÏ. i , Ï.οΜ Ï.ελεÏ.Ï.αίο Ï.αÏακÏ.ήÏα, Ï.ο 659 κείΌεΜο Ï.ηÏ. ειÏ.αγÏ.γήÏ., <ESC>, ÎŽÏοΌÎα-ΎεΟιά, και Ï.ÎλοÏ., x, ÎŒÏ.Μο και 660 ÎŒÏ.Μο για Μα Ï.ÏοÏ.ΞÎÏ.εÏ.ε Ï.Ï.ο Ï.ÎλοÏ. Ï.ηÏ. γÏαΌΌήÏ.! 661 662 3. ΣÏ.ÎŒÏ.ληÏÏ.Ï.Ï.ε Ï.Ï.Ïα Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή. ΣηΌειÏ.Ï.Ï.ε εÏ.ίÏ.ηÏ. Ï.Ï.ι η Ï.ÏοÏ.Ξήκη είΜαι 663 ακÏιβÏ.Ï. ίΎια Ï.Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌÎΜοÏ. Όε Ï.ηΜ Î.αÏ.άÏ.Ï.αÏ.η Î.ιÏ.αγÏ.γήÏ., εκÏ.Ï.Ï. 664 αÏ.Ï. Ï.η ΞÎÏ.η Ï.οÏ. ειÏ.άγεÏ.αι Ï.ο κείΌεΜο. 665 666 ---> This line will allow you to practice 667 ---> This line will allow you to practice appending text to the end of a line. 668 669 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 670 Î.άΞηΌα 6.3: Î.Î.Î.Î. Î.Î.Î.Î.ΣÎ. ΀Î.Σ Î.Î΀Î.Î.Î.΀Î.Σ΀Î.ΣÎ.Σ 671 672 673 ** ΠαÏ.ήÏ.Ï.ε κεÏ.αλαίο R για Μα αλλάΟεÏ.ε Ï.εÏιÏ.Ï.Ï.Ï.εÏοÏ.Ï. αÏ.Ï. ÎΜαΜ Ï.αÏακÏ.ήÏεÏ.. ** 674 675 1. Î.εÏ.ακιΜείÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή Ï.αÏακάÏ.Ï. Ï.ηΌειÏ.ÎŒÎΜη Όε --->. 676 677 2. ΀οÏ.οΞεÏ.ήÏ.Ï.ε Ï.οΜ ÎŽÏοΌÎα Ï.Ï.ηΜ αÏÏ.ή Ï.ηÏ. Ï.ÏÏ.Ï.ηÏ. λÎΟηÏ. Ï.οÏ. είΜαι ΎιαÏ.οÏεÏ.ική 678 αÏ.Ï. Ï.η ΎεÏÏ.εÏη γÏαΌΌή Ï.ηΌειÏ.ÎŒÎΜη Όε ---> (η λÎΟη 'last'). 679 680 3. ΠαÏ.ήÏ.Ï.ε Ï.Ï.Ïα R και αλλάΟÏ.ε Ï.ο Ï.Ï.Ï.λοιÏ.ο Ï.οÏ. κειΌÎΜοÏ. Ï.Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή 681 γÏάÏ.οΜÏ.αÏ. Ï.άΜÏ. αÏ.Ï. Ï.ο Ï.αλιÏ. κείΌεΜο Ï.Ï.Ï.ε Μα κάΜεÏ.ε Ï.ηΜ Ï.ÏÏ.Ï.η γÏαΌΌή ίΎια 682 Όε Ï.η ΎεÏÏ.εÏη. 683 684 ---> To make the first line the same as the last on this page use the keys. 685 ---> To make the first line the same as the second, type R and the new text. 686 687 4. ΣηΌειÏ.Ï.Ï.ε Ï.Ï.ι Ï.Ï.αΜ Ï.αÏ.άÏ.ε <ESC> για Μα βγείÏ.ε, Ï.αÏαΌÎΜει οÏ.οιοΎήÏ.οÏ.ε 688 αΜαλλοίÏ.Ï.ο κείΌεΜο. 689 690 691 692 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 693 Î.άΞηΌα 6.4: ΡΥÎ.Î.Î.ΣÎ. Î.Î Î.Î.Î.Î.Î.Σ 694 695 696 ** ΡÏ.ΞΌίÏ.Ï.ε Όία εÏ.ιλογή ÎÏ.Ï.ι Ï.Ï.Ï.ε η αΜαζήÏ.ηÏ.η ή η αΜÏ.ικαÏ.άÏ.Ï.αÏ.η Μα αγΜοεί 697 Ï.η ΎιαÏ.οÏά Ï.εζÏ.Îœ-κεÏ.αλαίÏ.Îœ ** 698 699 1. ΚάΟÏ.ε για 'ignore' ειÏ.άγοΜÏ.αÏ.: 700 /ignore 701 ΣÏ.ΜεÏ.ίÏ.Ï.ε αÏκεÏ.ÎÏ. Ï.οÏÎÏ. Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο Ï.λήκÏ.Ïο n. 702 703 2. Î.ÎÏ.Ï.ε Ï.ηΜ εÏ.ιλογή 'ic' (Ignore case) γÏάÏ.οΜÏ.αÏ.: 704 :set ic 705 706 3. ΚάΟÏ.ε Ï.Ï.Ïα ΟαΜά για 'ignore' Ï.αÏ.Ï.ÎœÏ.αÏ.: n 707 ΣÏ.ΜεÏ.ίÏ.Ï.ε Ï.ηΜ αΜαζήÏ.ηÏ.η ΌεÏικÎÏ. ακÏ.Όα Ï.οÏÎÏ. Ï.αÏ.Ï.ÎœÏ.αÏ. Ï.ο Ï.λήκÏ.Ïο n 708 709 4. Î.ÎÏ.Ï.ε Ï.ιÏ. εÏ.ιλογÎÏ. 'hlsearch' και 'incsearch': 710 :set hls is 711 712 5. Î.ιÏ.άγεÏ.ε Ï.Ï.Ïα ΟαΜά Ï.ηΜ εΜÏ.ολή αΜαζήÏ.ηÏ.ηÏ., και ΎείÏ.ε Ï.ι Ï.Ï.ΌβαίΜει 713 /ignore 714 715 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 716 Î.Î.Î.Î.Î.Î. 6 Î Î.ΡÎ.Î.Î.ΚÎ. 717 718 719 1. ΠαÏ.Ï.ÎœÏ.αÏ. o αΜοίγει Όία γÏαΌΌή Î.Î.΀Ω αÏ.Ï. Ï.οΜ ÎŽÏοΌÎα και Ï.οÏ.οΞεÏ.εί Ï.οΜ 720 ÎŽÏοΌÎα Ï.Ï.ηΜ αΜοιÏ.Ï.ή γÏαΌΌή Ï.ε Î.αÏ.άÏ.Ï.αÏ.η Î.ειΌÎΜοÏ.. 721 722 2. ΠαÏ.ήÏ.Ï.ε a για Μα ειÏ.άγεÏ.ε κείΌεΜο Î.Î.΀Î. Ï.οΜ Ï.αÏακÏ.ήÏα Ï.Ï.οΜ οÏ.οίο είΜαι 723 ο ÎŽÏοΌÎαÏ.. ΠαÏ.Ï.ÎœÏ.αÏ. κεÏ.αλαίο A αÏ.Ï.Ï.ΌαÏ.α Ï.ÏοÏ.ΞÎÏ.ει κείΌεΜο Ï.Ï.ο Ï.ÎλοÏ. 724 Ï.ηÏ. γÏαΌΌήÏ.. 725 726 3. ΠαÏ.Ï.ÎœÏ.αÏ. κεÏ.αλαίο R ειÏ.ÎÏÏ.εÏ.αι Ï.Ï.ηΜ Î.αÏ.άÏ.Ï.αη Î.ÎœÏ.ικαÏ.άÏ.Ï.αÏ.ηÏ. ÎŒÎÏ.Ïι Μα 727 Ï.αÏ.ηΞεί Ï.ο <ESC> και Μα εΟÎλΞει. 728 729 4. Î.ÏάÏ.οΜÏ.αÏ. ":set xxx" ÏÏ.ΞΌίζει Ï.ηΜ εÏ.ιλογή "xxx". 730 731 732 733 734 735 736 737 738 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 739 Î.Î.Î.Î.Î.Î. 7: ON-LINE Î.Î΀Î.Î.Î.Σ Î.Î.Î.Î.Î.Î.Î.Σ 740 741 742 ** ΧÏηÏ.ιΌοÏ.οιήÏ.Ï.ε Ï.ο on-line Ï.ÏÏ.Ï.ηΌα βοήΞειαÏ. ** 743 744 Î. Vim ÎÏ.ει ÎΜα Ï.εÏιεκÏ.ικÏ. on-line Ï.ÏÏ.Ï.ηΌα βοήΞειαÏ.. Î.ια Μα ΟεκιΜήÏ.ει, 745 ΎοκιΌάÏ.Ï.ε κάÏ.οιο αÏ.Ï. Ï.α Ï.Ïία: 746 - Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.Ïο <HELP> (αΜ ÎÏ.εÏ.ε κάÏ.οιο) 747 - Ï.αÏ.ήÏ.Ï.ε Ï.ο Ï.λήκÏ.Ïο <F1> (αΜ ÎÏ.εÏ.ε κάÏ.οιο) 748 - γÏάÏ.Ï.ε :help <ENTER> 749 750 Î.ÏάÏ.Ï.ε :q <ENTER> για Μα κλείÏ.εÏ.ε Ï.ο Ï.αÏάΞÏ.Ïο Ï.ηÏ. βοήΞειαÏ.. 751 752 Î.Ï.οÏείÏ.ε Μα βÏείÏ.ε βοήΞεια Ï.άΜÏ. Ï.ε κάΞε αΜÏ.ικείΌεΜο, ΎίΜοΜÏ.αÏ. Όία Ï.αÏάΌεÏ.Ïο 753 Ï.Ï.ηΜ εΜÏ.ολή ":help". Î.οκιΌάÏ.Ï.ε αÏ.Ï.ά (ΌηΜ ΟεÏ.ΜάÏ.ε Μα Ï.αÏ.άÏ.ε <ENTER>): 754 755 :help w 756 :help c_<T 757 :help insert-index 758 :help user-manual 759 760 761 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 762 Î.Î.Î.Î.Î.Î. 8: Î.Î.Î.Î.Î.ΥΡÎ.Î.Σ΀Î. Î.ÎÎ. SCRIPT Î.Î.Î.Î.ÎÎ.ΣÎ.Σ 763 764 ** Î.ΜεÏγοÏ.οιήÏ.Ï.ε Ï.αÏακÏ.ηÏιÏ.Ï.ικά Ï.οÏ. Vim ** 765 766 Î. Vim ÎÏ.ει Ï.ολλά Ï.εÏιÏ.Ï.Ï.Ï.εÏα Ï.αÏακÏ.ηÏιÏ.Ï.ικά αÏ.' Ï.,Ï.ι ο Vi, αλλά Ï.α 767 Ï.εÏιÏ.Ï.Ï.Ï.εÏα είΜαι αÏÏ.ικά αÏ.εΜεÏγοÏ.οιηΌÎΜα. Î.ια Μα αÏÏ.ίÏ.εÏ.ε Μα Ï.ÏηÏ.ιΌοÏ.οιείÏ.ε 768 Ï.εÏιÏ.Ï.Ï.Ï.εÏα Ï.αÏακÏ.ηÏιÏ.Ï.ικά Ï.ÏÎÏ.ει Μα Ï.Ï.ιάΟεÏ.ε ÎΜα αÏÏ.είο "vimrc". 769 770 1. Î.ÏÏ.ίÏ.Ï.ε ΎιοÏΞÏ.ΜοΜÏ.αÏ. Ï.ο αÏÏ.είο "vimrc", αÏ.Ï.Ï. εΟαÏÏ.άÏ.αι αÏ.Ï. Ï.ο Ï.ÏÏ.Ï.ηΌά Ï.αÏ.: 771 :edit ~/.vimrc για Unix 772 :edit $VIM/_vimrc για MS-Windows 773 774 2. ΀Ï.Ïα ειÏ.άγεÏ.ε Ï.ο κείΌεΜο Ï.αÏαΎείγΌαÏ.οÏ. για αÏÏ.είο "vimrc": 775 :read $VIMRUNTIME/vimrc_example.vim 776 777 3. Î.ÏάÏ.Ï.ε Ï.ο αÏÏ.είο Όε Ï.ηΜ: 778 :write 779 780 ΀ηΜ εÏ.Ï.ΌεΜη Ï.οÏά Ï.οÏ. Ξα ΟεκιΜήÏ.εÏ.ε Ï.οΜ Vim Ξα Ï.ÏηÏ.ιΌοÏ.οιήÏ.ει Ï.Ï.Ï.ιÏ.ÎŒÏ. 781 Ï.ÏÎœÏ.αΟηÏ.. Î.Ï.οÏείÏ.ε Μα Ï.ÏοÏ.ΞÎÏ.εÏ.ε Ï.λεÏ. Ï.ιÏ. Ï.ÏοÏ.ιΌÏ.ΌεΜεÏ. εÏ.ιλογÎÏ. Ï.' αÏ.Ï.Ï. 782 Ï.ο αÏÏ.είο "vimrc". 783 784 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 785 786 Î.ÎŽÏ. ολοκληÏÏ.ΜεÏ.αι Ï.ο Vim Tutor. ΣκοÏ.Ï.Ï. Ï.οÏ. ήÏ.αΜ Μα ÎŽÏ.Ï.ει Όία Ï.ÏÎœÏ.οΌη 787 Ï.εÏίληÏ.η Ï.οÏ. Ï.Ï.ÎœÏ.άκÏ.η Vim, Ï.οÏ.λάÏ.ιÏ.Ï.οΜ Ï.Ï.Ï.η Ï.Ï.Ï.ε Μα Ï.αÏ. εÏ.ιÏ.ÏÎÏ.ει Μα 788 Ï.ÏηÏ.ιΌοÏ.οιήÏ.εÏ.ε Ï.οΜ Ï.Ï.ÎœÏ.άκÏ.η αÏκεÏ.ά εÏκολα. Î.Ï.ÎÏ.ει Ï.Î¿Î»Ï Î±Ï.Ï. Όία 789 ολοκληÏÏ.ÎŒÎΜη Ï.αÏοÏ.Ï.ίαÏ.η καΞÏ.Ï. ο Vim ÎÏ.ει Ï.άÏα Ï.ολλÎÏ. εΜÏ.ολÎÏ.. Î.ιαβάÏ.Ï.ε 790 καÏ.Ï.Ï.ιΜ Ï.ο εγÏ.ειÏίΎιο Ï.ÏήÏ.ηÏ.: 791 ":help user-manual". 792 793 Î.ια Ï.εÏαιÏ.ÎÏÏ. ΎιάβαÏ.Όα και ΌελÎÏ.η, Ï.Ï.Ï.Ï.ήΜεÏ.αι αÏ.Ï.Ï. Ï.ο βιβλίο: 794 Vim - Vi Improved - by Steve Oualline 795 Publisher: New Riders 796 ΀ο Ï.ÏÏ.Ï.ο βιβλίο Ï.λήÏÏ.Ï. αÏ.ιεÏÏ.ÎŒÎΜο Ï.Ï.οΜ Vim. 797 Î.ΎιαίÏ.εÏα Ï.ÏήÏ.ιΌο για αÏÏ.άÏιοÏ.Ï.. 798 Î¥Ï.άÏÏ.οÏ.Îœ Ï.ολλά Ï.αÏαΎείγΌαÏ.α και εικÏ.ΜεÏ.. 799 Î.είÏ.ε Ï.ηΜ http://iccf-holland.org/click5.html 800 801 Î.Ï.Ï.Ï. Ï.ο βιβλίο είΜαι Ï.αλιÏ.Ï.εÏο και Ï.εÏιÏ.Ï.Ï.Ï.εÏο για Ï.οΜ Vi Ï.αÏά για Ï.οΜ Vim, 802 αλλά εÏ.ίÏ.ηÏ. Ï.Ï.ΜιÏ.Ï.Ï.ΌεΜο: 803 Learning the Vi Editor - by Linda Lamb 804 Publisher: O'Reilly & Associates Inc. 805 Î.ίΜαι ÎΜα καλÏ. βιβλίο για Μα ΌάΞεÏ.ε Ï.Ï.εΎÏ.Îœ Ï.α Ï.άΜÏ.α Ï.οÏ. ΞÎλεÏ.ε 806 Μα κάΜεÏ.ε Όε Ï.οΜ Vi. 807 Î. ÎκÏ.η ÎκΎοÏ.η Ï.εÏιÎÏ.ει ακÏ.Όα Ï.ληÏοÏ.οÏίεÏ. για Ï.οΜ Vim. 808 809 Î.Ï.Ï.ή η Ï.εÏιήγηÏ.η γÏάÏ.Ï.ηκε αÏ.Ï. Ï.οÏ.Ï. Michael C. Pierce και Robert K. Ware, 810 Colorado School of Mines Ï.ÏηÏ.ιΌοÏ.οιÏ.ÎœÏ.αÏ. ιΎÎεÏ. αÏ.Ï. Ï.οΜ Charles Smith, 811 Colorado State University. E-mail: bware@mines.colorado.edu. 812 813 Î ÏοÏ.αÏΌογή για Ï.οΜ Vim αÏ.Ï. Ï.οΜ Bram Moolenaar. 814 815 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
runtime/tutor/tutor.ru.utf-8
diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8
old new 1 =============================================================================== 2 = Ð. П б Ñ. П п П ж а л П в а Ñ. Ñ. в Ñ. Ñ. е б Ðœ О к VIM - Ð.еÑ.ÑÐžÑ 1.5 = 3 =============================================================================== 4 Vim --- ÑÑ.П ПÑ.еМÑ. ЌПÑ.ÐœÑ.й Ñ.еЎакÑ.ПÑ., ОЌеÑ.Ñ.Ой ЌМПжеÑÑ.вП кПЌаМЎ, ÑлОÑ.кПЌ 5 ЌМПгП ÐŽÐ»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. ОÑ. вÑе ЌПжМП бÑ.лП ПпОÑаÑ.Ñ. в Ñ.акПЌ Ñ.Ñ.ебМОке, как 6 ÑÑ.ПÑ.. ÐÑ.ПÑ. Ñ.Ñ.ебМОк пÑ.ОзваМ ПбÑ.ÑÑМОÑ.Ñ. ЎПÑÑ.аÑ.ПÑ.МПе Ñ.ОÑлП кПЌаМЎ ÐŽÐ»Ñ Ñ.ПгП, 7 Ñ.Ñ.ПбÑ. Ð.Ñ. ЌПглО Ñ Ð»ÐµÐ³ÐºÐŸÑÑ.Ñ.Ñ. ОÑпПлÑ.зПваÑ.Ñ. Vim в каÑ.еÑÑ.ве Ñ.еЎакÑ.ПÑ.а ПбÑ.егП 8 МазМаÑ.еМОÑ. 9 10 Ð.аЌ пПÑ.Ñ.ебÑ.еÑ.ÑÑ Ð¿Ñ.ОблОзОÑ.елÑ.МП 25-30 ЌОМÑ.Ñ. Ма ПÑвПеМОе ЎаММПгП Ñ.Ñ.ебМОка в 11 завОÑОЌПÑÑ.О ПÑ. Ñ.ПгП, ÑкПлÑ.кП вÑ.еЌеМО Ð.Ñ. пПÑ.Ñ.аÑ.ОÑ.е Ма ÑкÑпеÑ.ОЌеМÑ.Ñ.. 12 13 Ð.ПЌаМЎÑ. в Ñ.Ñ.ПкаÑ. бÑ.ÐŽÑ.Ñ. ЌПЎОÑ.ОÑ.ОÑ.ПваÑ.Ñ. Ñ.екÑÑ.. СПзЎайÑ.е кПпОÑ. ÑÑ.ПгП Ñ.айла, 14 Ñ.Ñ.ПбÑ. пПпÑ.акÑ.ОкПваÑ.Ñ.ÑÑ ÐœÐ° Мей (еÑлО Ð.Ñ. запÑ.ÑÑ.ОлО "vimtutor", Ñ.П ÑÑ.П Ñ.же 15 кПпОÑ). 16 17 Ð.ажМП пПЌМОÑ.Ñ., Ñ.Ñ.П ÑÑ.ПÑ. Ñ.Ñ.ебМОк пÑ.еЎМазМаÑ.еМ ÐŽÐ»Ñ ÐŸÐ±Ñ.Ñ.ÐµÐœÐžÑ Ð² пÑ.ПÑ.еÑÑе 18 ОÑпПлÑ.зПваМОÑ. ÐÑ.П ПзМаÑ.аеÑ., Ñ.Ñ.П Ð.Ñ. ЎПлжМÑ. запÑ.ÑкаÑ.Ñ. кПЌаМЎÑ. ÐŽÐ»Ñ Ñ.ПгП, 19 Ñ.Ñ.ПбÑ. как ÑлеЎÑ.еÑ. ОÑ. ОзÑ.Ñ.ОÑ.Ñ.. Ð.ÑлО Ð.Ñ. пÑ.ПÑÑ.П пÑ.ПÑ.ОÑ.аеÑ.е Ñ.екÑÑ., Ñ.П 20 забÑ.ЎеÑ.е кПЌаМЎÑ.! 21 22 ТепеÑ.Ñ. Ñ.беЎОÑ.еÑÑ. в Ñ.ПЌ, Ñ.Ñ.П клавОÑ.а CapsLock Ме вклÑ.Ñ.еМа О МажЌОÑ.е 23 клавОÑ.Ñ. j МеÑкПлÑ.кП Ñ.аз, Ñ.ак, Ñ.Ñ.ПбÑ. УÑ.Пк 1.1 пПлМПÑÑ.Ñ.Ñ. пПЌеÑÑ.ОлÑÑ ÐœÐ° 24 ÑкÑ.аМе. 25 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 УÑ.Пк 1.1: Ð.Ð.Ð Ð.Ð.Ð.ЩÐ.ÐÐ.Ð. Ð.УРСÐ.Ð Ð 27 28 ** Ð.Ð»Ñ Ð¿ÐµÑ.еЌеÑ.ÐµÐœÐžÑ ÐºÑ.Ñ.ÑПÑ.а МажЌОÑ.е клавОÑ.О h,j,k,l Ñ.ак, как пПказаМП МОже. ** 29 ^ 30 k СПвеÑ.Ñ.: Ð.лавОÑ.а h МаÑ.ПЎОÑ.ÑÑ Ñлева О пеÑ.еЌеÑ.аеÑ. влевП. 31 < h l > Ð.лавОÑ.а l МаÑ.ПЎОÑ.ÑÑ ÑпÑ.ава О пеÑ.еЌеÑ.аеÑ. впÑ.авП. 32 j Ð.лавОÑ.а j пПÑ.Пжа Ма ÑÑ.Ñ.елкÑ. `вМОз'. 33 v 34 1. Ð.ПЎвОгайÑ.е кÑ.Ñ.ÑПÑ. пП ÑкÑ.аМÑ., пПка Ме пПÑ.Ñ.вÑÑ.вÑ.еÑ.е ÑÐµÐ±Ñ Ñ.веÑ.еММП. 35 36 2. ÐаЎавОÑ.е клавОÑ.Ñ. `вМОз' (j) пПка ПМа Ме МаÑ.МеÑ. пПвÑ.ПÑ.ÑÑ.Ñ.ÑÑ. 37 ---> ТепеÑ.Ñ. Ð.Ñ. зМаеÑ.е, как пеÑ.ейÑ.О к ÑлеЎÑ.Ñ.Ñ.еЌÑ. Ñ.Ñ.ПкÑ.. 38 39 3. Ð.ÑпПлÑ.зÑ.Ñ ÐºÐ»Ð°Ð²ÐžÑ.Ñ. `вМОз' пеÑ.ейЎОÑ.е к УÑ.ПкÑ. 1.2. 40 41 Ð.аЌеÑ.аМОе: Ð.ÑлО вÑ. пПка Ме Ñ.веÑ.еМÑ. в Ñ.ПЌ, Ñ.Ñ.П МабОÑ.аеÑ.е, МажЌОÑ.е <ESC> ÐŽÐ»Ñ 42 пеÑ.еÑ.ПЎа в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ (Normal mode). Ð.ПÑле ÑÑ.ПгП пеÑ.еМабеÑ.ОÑ.е 43 Ñ.Ñ.ебÑ.еЌÑ.Ñ. кПЌаМЎÑ.. 44 45 Ð.аЌеÑ.аМОе: Ð.бÑ.Ñ.ÐœÑ.е клавОÑ.О Ñ.пÑ.Ð°Ð²Ð»ÐµÐœÐžÑ ÐºÑ.Ñ.ÑПÑ.ПЌ (ÑÑ.Ñ.елкО) Ñ.акже ЎПлжМÑ. 46 Ñ.абПÑ.аÑ.Ñ.. Ð.ЎМакП, клавОÑ.О hjkl пПзвПлÑÑ. Ð.аЌ пеÑ.еЌеÑ.аÑ.Ñ.ÑÑ 47 зМаÑ.ОÑ.елÑ.МП бÑ.ÑÑ.Ñ.ее, как Ñ.ПлÑ.кП Ð.Ñ. МаÑ.Ñ.ОÑ.еÑÑ. ОЌО пПлÑ.зПваÑ.Ñ.ÑÑ. 48 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49 УÑ.Пк 1.2: Ð.ÐÐ.УСÐ. Ð. Ð.ÐÐ.Ð.РКÐ.ÐÐ.Ð. Ð ÐÐ.Ð.ТЫ С VIM 50 51 !! Ð.ÐÐ.Ð.ÐÐÐ.Ð.! Ð.Ñ.ежЎе, Ñ.еЌ вÑ.пПлМÑÑ.Ñ. лÑ.бПй Оз ПпОÑаММÑ.Ñ. МОже Ñ.агПв, пÑ.ПÑ.Ñ.ОÑ.е 52 Ñ.Ñ.Пк Ñ.елОкПЌ !! 53 54 1. ÐажЌОÑ.е клавОÑ.Ñ. <ESC> (ÐŽÐ»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.ЎПÑÑ.ПвеÑ.ОÑ.Ñ.ÑÑ, Ñ.Ñ.П Ð.Ñ. в ПбÑ.Ñ.МПЌ 55 Ñ.ежОЌе (Normal mode)). 56 57 2. ÐабеÑ.ОÑ.е: :q! <ENTER>. 58 59 ---> ÐÑ.П пПзвПлОÑ. Ð.аЌ вÑ.йÑ.О Оз Ñ.еЎакÑ.ПÑ.а Ð.Ð.Ð. СÐ.ХРÐÐÐ.ÐÐ.Я лÑ.бÑ.Ñ. ÑЎелаММÑ.Ñ. 60 ОзЌеМеМОй. Ð.ÑлО Ð.Ñ. Ñ.ПÑ.ОÑ.е ÑПÑ.Ñ.аМОÑ.Ñ. ÐžÐ·ÐŒÐµÐœÐµÐœÐžÑ Ðž вÑ.йÑ.О: 61 :wq <ENTER> 62 63 3. Ð.ПгЎа Ð.Ñ. Ñ.вОЎОÑ.е пÑ.ОглаÑ.еМОе кПЌаМЎМПй ПбПлПÑ.кО, МабеÑ.ОÑ.е кПЌаМЎÑ., 64 кПÑ.ПÑ.Ð°Ñ Ð¿Ñ.Овела Ð.Ð°Ñ Ð² ÑÑ.ПÑ. Ñ.Ñ.ебМОк. ÐÑ.П ЌПжеÑ. бÑ.Ñ.Ñ. 65 vimtutor ru <ENTER> 66 Ð.бÑ.Ñ.МП ЌПжМП ОÑпПлÑ.зПваÑ.Ñ.: vim tutor.ru <ENTER> 67 68 ---> 'vim' пПзвПлÑеÑ. запÑ.ÑÑ.ОÑ.Ñ. Ñ.еЎакÑ.ПÑ. vim, 'tutor.ru' --- ÑÑ.П Ñ.айл, кПÑ.ПÑ.Ñ.й 69 Ð.Ñ. бÑ.ЎеÑ.е Ñ.еЎакÑ.ОÑ.ПваÑ.Ñ.. 70 71 4. Ð.ÑлО Ð.Ñ. Ñ.веÑ.еМÑ. в Ñ.ПЌ, Ñ.Ñ.П запПЌМОлО ÑÑ.О Ñ.агО, вÑ.пПлМОÑ.е Ñ.агО ПÑ. 1 ЎП 3 72 Ñ.Ñ.ПбÑ. вÑ.йÑ.О ÑМПва запÑ.ÑÑ.ОÑ.Ñ. Ñ.еЎакÑ.ПÑ.. Ð.аÑ.еЌ пеÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз к 73 УÑ.ПкÑ. 1.3. 74 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 75 УÑ.Пк 1.3: Ð Ð.Ð.ÐÐ.ТÐ.Ð Ð.Ð.ÐÐÐ.Ð. ТÐ.Ð.СТР- УÐ.ÐÐ.Ð.ÐÐ.Ð. 76 77 78 ** ÐаÑ.ПЎÑÑÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе МажЌОÑ.е x, Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ. ÑОЌвПл пПЎ кÑ.Ñ.ÑПÑ.ПЌ. ** 79 80 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. к ÑÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->. 81 82 2. Ð.Ð»Ñ ÐžÑпÑ.Ð°Ð²Ð»ÐµÐœÐžÑ ÐŸÑ.ОбПк, пеÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ., пПка ПМ Ме ПкажеÑ.ÑÑ ÐœÐ°ÐŽ 83 Ñ.ЎалÑеЌÑ.ÐŒ ÑОЌвПлПЌ. 84 85 3. ÐажЌОÑ.е клавОÑ.Ñ. x ÐŽÐ»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ñ.Ñ.ебÑ.еЌПгП ÑОЌвПла. 86 87 4. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4 пПка ÑÑ.Ñ.Пка Ме бÑ.ЎеÑ. ОÑпÑ.авлеМа. 88 89 ---> Ð.Ñ. Ñ.Ñ.Ñ.ПпПÑ.а кПпÑ.Ñ.Ñ. пппÑ.лÑ. ппП пппПлÑ. леÑ.Ñ.ОÑ.Ñ.. 90 91 5. ТепеÑ.Ñ., кПгЎа ÑÑ.Ñ.Пка ПÑ.кПÑ.Ñ.екÑ.ОÑ.ПваМа, пеÑ.еÑ.ПЎОÑ.е к Ñ.Ñ.ПкÑ. 1.4. 92 93 Ð.ÐÐ.Ð.ЧÐÐÐ.Ð.: Ð. Ñ.ПЎе ПÑÐ²ÐŸÐµÐœÐžÑ ÑÑ.ПгП Ñ.Ñ.ебМОка Ме пÑ.Ñ.айÑ.еÑÑ. запПЌОМаÑ.Ñ., Ñ.Ñ.ОÑ.е 94 в пÑ.ПÑ.еÑÑе ОÑпПлÑ.зПваМОÑ. 95 96 97 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 98 УÑ.Пк 1.4: Ð Ð.Ð.ÐÐ.ТÐ.Ð Ð.Ð.ÐÐÐ.Ð. ТÐ.Ð.СТР- Ð.СТÐÐ.Ð.Ð 99 100 101 ** ÐаÑ.ПЎÑÑÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode), МажЌОÑ.е i ÐŽÐ»Ñ Ð²ÑÑ.авкО Ñ.екÑÑ.а. ** 102 103 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. к пеÑ.вПй ÑÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->. 104 105 2. Ð.Ð»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. ÑЎелаÑ.Ñ. пеÑ.вÑ.Ñ. ÑÑ.Ñ.ПкÑ. ОЎеМÑ.ОÑ.МПй вÑ.ПÑ.Пй, пПЌеÑÑ.ОÑ.е 106 кÑ.Ñ.ÑПÑ. Ма ÑОЌвПл Ð.Ð.Ð Ð.Ð. кПÑ.ПÑ.Ñ.ÐŒ ÑлеЎÑ.еÑ. вÑÑ.авОÑ.Ñ. Ñ.екÑÑ.. 107 108 3. ÐажЌОÑ.е i О МабеÑ.ОÑ.е Ñ.Ñ.ебÑ.еЌÑ.е ЎПбавлеМОÑ. 109 110 4. Ð.ПÑле ОÑпÑ.Ð°Ð²Ð»ÐµÐœÐžÑ Ð²ÑеÑ. ПÑ.ОбПк МажЌОÑ.е <ESC> ÐŽÐ»Ñ Ð²ÐŸÐ·Ð²Ñ.аÑ.а в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ. 111 Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4, пПка Ñ.Ñ.аза Ме бÑ.ЎеÑ. ОÑпÑ.авлеМа пПлМПÑÑ.Ñ.Ñ.. 112 113 ---> ЧаÑÑ.Ñ. Ñ.екÑÑ.а в ÑÑ.Ñ.Пке беÑлеЎМП . 114 ---> ЧаÑÑ.Ñ. Ñ.екÑÑ.а в ÑÑ.Пй ÑÑ.Ñ.Пке беÑÑлеЎМП пÑ.Ппала. 115 116 5. Ð.ПгЎа ПÑвПОÑ.е вÑÑ.авкÑ. Ñ.екÑÑ.а, пеÑ.еÑ.ПЎОÑ.е ЎалÑ.Ñ.е к РезÑ.Ќе. 117 118 119 120 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 121 Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.Ð 1 122 123 1. Ð.Ñ.Ñ.ÑПÑ. пеÑ.еЌеÑ.аеÑ.ÑÑ Ð»ÐžÐ±ÐŸ клавОÑ.аЌО ÑП ÑÑ.Ñ.елкаЌО, лОбП клавОÑ.аЌО hjkl. 124 h (влевП) j (вМОз) k (ввеÑ.Ñ.) l (впÑ.авП) 125 126 2. Ð.Ð»Ñ Ð·Ð°Ð¿Ñ.Ñка Vim (Оз пÑ.ОглаÑ.ÐµÐœÐžÑ % кПЌаМЎМПй ПбПлПÑ.кО) МабеÑ.ОÑ.е: 127 vim Ð.Ð.Я_ЀÐÐ.Ð.Ð <ENTER> 128 129 3. Ð.Ð»Ñ Ð·Ð°Ð²ÐµÑ.Ñ.ÐµÐœÐžÑ Ñ.абПÑ.Ñ. Ñ Vim МабеÑ.ОÑ.е: 130 <ESC> :q! <ENTER> Ñ.Ñ.ПбÑ. ПÑ.казаÑ.Ñ.ÑÑ ÐŸÑ. ÑПÑ.Ñ.Ð°ÐœÐµÐœÐžÑ ÐžÐ·ÐŒÐµÐœÐµÐœÐžÐ¹. 131 Ð.лО МабеÑ.ОÑ.е: 132 <ESC> :wq <ENTER> Ñ.Ñ.ПбÑ. ÑПÑ.Ñ.аМОÑ.Ñ. ОзЌеМеМОÑ. 133 134 4. Ð.Ð»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ ÑОЌвПла пПЎ кÑ.Ñ.ÑПÑ.ПЌ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе, МабеÑ.ОÑ.е: x 135 136 5. ЧÑ.ПбÑ. вÑÑ.авОÑ.Ñ. Ñ.екÑÑ. пеÑ.еЎ кÑ.Ñ.ÑПÑ.ПЌ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе, МабеÑ.ОÑ.е: 137 i ввПЎОÑ.е Ñ.екÑÑ. <ESC> 138 139 Ð.ÐÐ.Ð.ЧÐÐÐ.Ð.: ÐажаÑ.Ое <ESC> пеÑ.еЌеÑÑ.ОÑ. Ð.Ð°Ñ Ð² ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ (Normal mode) лОбП 140 пÑ.еÑ.веÑ. МежелаÑ.елÑ.ÐœÑ.Ñ. О Ñ.аÑÑ.ОÑ.МП завеÑ.Ñ.еММÑ.Ñ. кПЌаМЎÑ.. 141 142 ТепеÑ.Ñ. пеÑ.еÑ.ПЎОЌ к УÑ.ПкÑ. 2. 143 144 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 145 УÑ.Пк 2.1: Ð.Ð.Ð.ÐÐÐ.Ы УÐ.ÐÐ.Ð.ÐÐ.Я 146 147 148 ** ÐабеÑ.ОÑ.е dw ÐŽÐ»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ñ.Ñ.аÑÑ.ка Ñ.екÑÑ.а ЎП кПМÑ.а ÑлПва. ** 149 150 1. ÐажЌОÑ.е <ESC>, Ñ.Ñ.ПбÑ. пеÑ.ейÑ.О в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ. 151 152 2. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй --->. 153 154 3. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. в МаÑ.алП ÑлПва, кПÑ.ПÑ.Пе ÑлеЎÑ.еÑ. Ñ.ЎалОÑ.Ñ.. 155 156 4. ÐабеÑ.ОÑ.е dw , Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ. ÑÑ.П ÑлПвП. 157 158 Ð.ÐÐ.Ð.ЧÐÐÐ.Ð.: Ð.П вÑ.ÐµÐŒÑ ÐœÐ°Ð±ÐŸÑ.а бÑ.квÑ. dw пПÑвÑÑ.ÑÑ Ð² пПÑлеЎМей ÑÑ.Ñ.Пке ÑкÑ.аМа. Ð.ÑлО 159 Ð.Ñ. Ñ.Ñ.П-Ñ.П МабеÑ.еÑ.е МепÑ.авОлÑ.МП, МажЌОÑ.е <ESC> О МаÑ.МОÑ.е ÑМаÑ.ала. 160 161 ---> ÐеÑкПлÑ.кП ÑлПв Ñ.аÑ.ОМаЎ в ÑÑ.ПЌ пÑ.еЎлПжеМОО авÑ.ПкÑ.аМ ОзлОÑ.МО. 162 163 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 3 О 4, пПка Ме ОÑпÑ.авОÑ.е вÑе ПÑ.ОбкО О пеÑ.еÑ.ПЎОÑ.е к 164 УÑ.ПкÑ. 2.2. 165 166 167 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 168 УÑ.Пк 2.2: Ð.Ð.Ð.Ð.Ð.ÐÐ.ТÐ.Ð.ЬÐЫÐ. Ð.Ð.Ð.ÐÐÐ.Ы УÐ.ÐÐ.Ð.ÐÐ.Я 169 170 171 ** ÐабеÑ.ОÑ.е d$ ÐŽÐ»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ñ.екÑÑ.а ЎП кПМÑ.а ÑÑ.Ñ.ПкО. ** 172 173 1. ÐажЌОÑ.е <ESC>, Ñ.Ñ.ПбÑ. пеÑ.ейÑ.О в ПбÑ.Ñ.ÐœÑ.й Ñ.ежОЌ. 174 175 2. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй --->. 176 177 3. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. к кПМÑ.Ñ. пÑ.авОлÑ.МПй ÑÑ.Ñ.ПкО (Ð.Ð.СÐ.Ð. пеÑ.вПй . ). 178 179 4. ЧÑ.ПбÑ. Ñ.ЎалОÑ.Ñ. ПÑÑ.аÑ.Пк ÑÑ.Ñ.ПкО, МабеÑ.ОÑ.е d$ . 180 181 ---> Ð.Ñ.П-Ñ.П МабÑ.ал ПкПМÑ.аМОе ÑÑ.Пй ÑÑ.Ñ.ПкО ЎважЎÑ.. ПкПМÑ.аМОе ÑÑ.Пй ÑÑ.Ñ.ПкО ЎважЎÑ.. 182 183 184 5.ЧÑ.ПбÑ. лÑ.Ñ.Ñ.е Ñ.азПбÑ.аÑ.Ñ.ÑÑ Ð² ÑÑ.ПЌ, пеÑ.еÑ.ПЎОÑ.е к УÑ.ПкÑ. 2.3. 185 186 187 188 189 190 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 191 УÑ.Пк 2.3: Ð.Ð.Ð.ÐÐÐ.Ы Ð. Ð.Ð.ЪÐ.Ð.ТЫ 192 193 194 ЀПÑ.ЌаÑ. кПЌаМЎÑ. `Ñ.ЎалеМОе' d Ñ.акПв: 195 196 [Ñ.ОÑлП] d ПбÑ.екÑ. Ð.Ð.Ð. d [Ñ.ОÑлП] ПбÑ.екÑ. 197 Ð.ЎеÑÑ.: 198 Ñ.ОÑлП - ÑкПлÑ.кП Ñ.аз ОÑпПлМОÑ.Ñ. кПЌаМЎÑ. (МеПбÑзаÑ.елÑ.МП, пП Ñ.ЌПлÑ.аМОÑ.=1). 199 d - кПЌаМЎа Ñ.ЎалеМОÑ. 200 ПбÑ.екÑ. - Ñ Ñ.еЌ кПЌаМЎа ЎПлжМа бÑ.Ñ.Ñ. вÑ.пПлМеМа (пеÑ.еÑ.ОÑлеМП МОже). 201 202 Ð.Ñ.аÑ.кОй ÑпОÑПк ПбÑ.екÑ.Пв: 203 w - ПÑ. кÑ.Ñ.ÑПÑ.а ЎП кПМÑ.а ÑлПва, вклÑ.Ñ.Ð°Ñ Ð·Ð°Ð²ÐµÑ.Ñ.аÑ.Ñ.Ой пÑ.Пбел. 204 e - ПÑ. кÑ.Ñ.ÑПÑ.а ЎП кПМÑ.а ÑлПва, ÐÐ. вклÑ.Ñ.Ð°Ñ Ð·Ð°Ð²ÐµÑ.Ñ.аÑ.Ñ.Ой пÑ.Пбел. 205 $ - ПÑ. кÑ.Ñ.ÑПÑ.а ЎП кПМÑ.а ÑÑ.Ñ.ПкО. 206 ^ - ПÑ. кÑ.Ñ.ÑПÑ.а ЎП МаÑ.ала ÑÑ.Ñ.ПкО. 207 208 Ð.ÐÐ.Ð.ЧÐÐÐ.Ð.: Ð.Ñ.ПÑÑ.Пе МажаÑ.Ое Ма ÑОЌвПл ПбÑ.екÑ.а в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode) 209 без ЎПпПлМОÑ.елÑ.ÐœÑ.Ñ. кПЌаМЎ пеÑ.еЎвОМеÑ. кÑ.Ñ.ÑПÑ. Ñ.ак, как Ñ.казаМП в 210 ÑпОÑке ПбÑ.екÑ.Пв. 211 212 213 214 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 215 УÑ.Пк 2.4: Ð.СÐ.Ð.ЮЧÐ.ÐÐ.Ð. Ð.Ð. Ð.Ð ÐÐ.Ð.Ð.Ð `Ð.Ð.Ð.ÐÐÐ.Ð-Ð.Ð.ЪÐ.Ð.Т' 216 217 218 ** ÐабеÑ.ОÑ.е dd ÐŽÐ»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ð²Ñей ÑÑ.Ñ.ПкО. ** 219 220 Ð.ÑлеЎÑÑ.вОе Ñ.аÑÑ.ПгП пÑ.ÐžÐŒÐµÐœÐµÐœÐžÑ ÐŸÐ¿ÐµÑ.аÑ.ОО Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ð²Ñей ÑÑ.Ñ.ПкО, Ñ.азÑ.абПÑ.Ñ.ОкО 221 Vim Ñ.еÑ.ОлО, Ñ.Ñ.П ÐŽÐ»Ñ ÑÑ.ПгП пÑ.ПÑ.е вÑегП пÑ.ПÑÑ.П МабÑ.аÑ.Ñ. d ЎважЎÑ.. 222 223 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, кП вÑ.ПÑ.Пй ÑÑ.Ñ.Пке Ñ.Ñ.азÑ.. 224 2. ÐабеÑ.ОÑ.е dd ÐŽÐ»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ ÑÑ.Ñ.ПкО. 225 3. ТепеÑ.Ñ. пеÑ.еЌеÑÑ.ОÑ.еÑÑ. к Ñ.еÑ.веÑ.Ñ.Пй ÑÑ.Ñ.Пке. 226 4. ÐабеÑ.ОÑ.е 2dd (вÑпПЌМОÑ.е пÑ.авОлП `Ñ.ОÑлП-кПЌаМЎа-ПбÑ.екÑ.'), Ñ.Ñ.ПбÑ. Ñ.ЎалОÑ.Ñ. 227 Ўве ÑÑ.Ñ.ПкО. 228 229 1) Ð.еÑ.ПЌ Ñ Ñ.ПжÑ. Ма ÑÑ.аЎОПМ, 230 2) Ð., как вМезапМП кПМÑ.ОлÑÑ ÐŽÐžÐ²Ð°Ðœ! 231 3) Я бПлеÑ. за ``Ð.еМОÑ.'', ``Ð.еМОÑ.'' --- Ñ.еЌпОПМ! 232 4) Ð.еÑ.алÑ.МП Ñ Ð³Ð»ÑжÑ. Ма МаÑ.е пПкПлеМОе! 233 5) Ð.гП гÑ.ÑÐŽÑ.Ñ.ее ОлÑ. пÑ.ÑÑ.П ОлÑ. Ñ.еЌМП... 234 6) Я ÑОжÑ. Ма ÑкаЌейке в лПже `Ð.' 235 7) Ð. ОгÑ.аÑ. Ма бПлÑ.Ñ.Пй жеÑÑ.ÑМПй Ñ.Ñ.Ñ.бе. 236 237 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 238 УÑ.Пк 2.5: Ð.Ð.Ð.ÐÐÐ.Ð `Ð.ТÐ.ÐТ' 239 240 241 ** ÐажЌОÑ.е u ÐŽÐ»Ñ ÐŸÑ.ЌеМÑ. Ñ.езÑ.лÑ.Ñ.аÑ.а Ñ.абПÑ.Ñ. пÑ.еЎÑ.ÐŽÑ.Ñ.ей кПЌаМЎÑ., U ÐŽÐ»Ñ ÐŸÑ.ЌеМÑ. 242 ОÑпÑ.авлеМОй вП вÑей ÑÑ.Ñ.Пке. ** 243 244 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй ---> О Ñ.ÑÑ.аМПвОÑ.е егП Ма 245 пеÑ.вÑ.Ñ. ПÑ.ОбкÑ.. 246 2. ÐажЌОÑ.е x ÐŽÐ»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ð¿ÐµÑ.вПгП МепÑ.авОлÑ.МПгП ÑОЌвПла. 247 3. ТепеÑ.Ñ. МажЌОÑ.е u ÐŽÐ»Ñ ÐŸÑ.ЌеМÑ. (ПÑ.каÑ.а) пПÑлеЎМей вÑ.пПлМеММПй кПЌаМЎÑ.. 248 4. Ð.ÑпÑ.авÑ.Ñ.е вÑе ПÑ.ОбкО в ÑÑ.Ñ.Пке, ОÑпПлÑ.зÑ.Ñ ÐºÐŸÐŒÐ°ÐœÐŽÑ. x . 249 5. ТепеÑ.Ñ. МажЌОÑ.е заглавМÑ.Ñ. U ÐŽÐ»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. веÑ.ÐœÑ.Ñ.Ñ. вÑÑ. ÑÑ.Ñ.ПкÑ. в ОÑÑ.ПЎМПе 250 ÑПÑÑ.ПÑМОе. 251 6. ÐажЌОÑ.е u МеÑкПлÑ.кП Ñ.аз ÐŽÐ»Ñ ÐŸÑ.ЌеМÑ. кПЌаМЎÑ. U О пÑ.еЎÑ.ÐŽÑ.Ñ.ОÑ. кПЌаМЎ. 252 7. ÐажЌОÑ.е Ñ.епеÑ.Ñ. CTRL-R (Ñ.ЎеÑ.жОвайÑ.е клавОÑ.Ñ. CTRL МажаÑ.Пй в ЌПЌеМÑ. МажаÑ.ÐžÑ 253 R) МеÑкПлÑ.кП Ñ.аз ÐŽÐ»Ñ Ð²ÐŸÐ·Ð²Ñ.аÑ.а кПЌаМЎ (ПÑ.каÑ. ПÑ.каÑ.а). 254 255 ---> Ð.ÑпÑ.Ñ.авÑ.Ñ.е ППÑ.ОбкО в ÑÑ.Пйй ÑÑ.Ñ.Пке О веÑ.МОÑ.Ñ.е ОÑ. ÑÑ Ð¿ÐŸÐŒÐŸÑ.Ñ.Ñ.Ñ. `ПÑ.каÑ.а'. 256 257 8. ÐÑ.П бÑ.лО ПÑ.еМÑ. пПлезМÑ.е кПЌаМЎÑ.. Ð.алее пеÑ.еÑ.ПЎОÑ.е к РезÑ.Ќе УÑ.Пка 2. 258 259 260 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 261 Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.Ð 2 262 263 264 1. Ð.Ð»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ñ.екÑÑ.а ПÑ. кÑ.Ñ.ÑПÑ.а ЎП кПМÑ.а ÑлПва МабеÑ.ОÑ.е: dw 265 266 2. Ð.Ð»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ñ.екÑÑ.а ПÑ. кÑ.Ñ.ÑПÑ.а ЎП кПМÑ.а ÑÑ.Ñ.ПкО МабеÑ.ОÑ.е: d$ 267 268 3. Ð.Ð»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ Ð²Ñей ÑÑ.Ñ.ПкО МабеÑ.ОÑ.е: dd 269 270 4. ЀПÑ.ЌаÑ. кПЌаМЎÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе ОЌееÑ. вОЎ: 271 272 [Ñ.ОÑлП] кПЌаМЎа ПбÑ.екÑ. Ð.Ð.Ð. кПЌаМЎа [Ñ.ОÑлП] ПбÑ.екÑ. 273 гЎе: 274 Ñ.ОÑлП - ÑкПлÑ.кП Ñ.аз пПвÑ.ПÑ.ОÑ.Ñ. вÑ.пПлМеМОе кПЌаМЎÑ. 275 кПЌаМЎа - Ñ.Ñ.П вÑ.пПлМОÑ.Ñ., МапÑ.ОЌеÑ. d ÐŽÐ»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ 276 ПбÑ.екÑ. - Ма Ñ.Ñ.П ЎПлжМа вПзЎейÑÑ.вПваÑ.Ñ. кПЌаМЎа, МапÑ.ОЌеÑ. w (ÑлПвП), 277 $ (ЎП кПМÑ.а ÑÑ.Ñ.ПкО), О Ñ..ÐŽ. 278 279 5. Ð.Ð»Ñ ÐŸÑ.ЌеМÑ. (ПÑ.каÑ.а) пÑ.еЎÑ.еÑÑ.вÑ.Ñ.Ñ.ОÑ. ЎейÑÑ.вОй МабеÑ.ОÑ.е: u (ÑÑ.Ñ.ПÑ.ÐœÐ°Ñ u) 280 Ð.Ð»Ñ ÐŸÑ.ЌеМÑ. (ПÑ.каÑ.а) вÑеÑ. ОзЌеМеМОй в ÑÑ.Ñ.Пке МабеÑ.ОÑ.е: U (пÑ.ПпОÑÐœÐ°Ñ U) 281 Ð.Ð»Ñ ÐŸÑ.ЌеМÑ. ПÑ.каÑ.а МабеÑ.ОÑ.е: CTRL-R 282 283 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 284 УÑ.Пк 3.1: Ð.Ð.Ð.ÐÐÐ.Ð Ð.СТÐÐ.Ð.Ð. 285 286 287 ** ÐабеÑ.ОÑ.е p ÐŽÐ»Ñ Ð²ÑÑ.авкО пПÑлеЎМегП Ñ.ЎалеММПгП Ñ.екÑÑ.а пПÑле кÑ.Ñ.ÑПÑ.а. ** 288 289 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз к пПÑлеЎМей ÑÑ.Ñ.Пке Оз МабПÑ.а. 290 291 2. ÐабеÑ.ОÑ.е dd ÐŽÐ»Ñ Ñ.ÐŽÐ°Ð»ÐµÐœÐžÑ ÑÑ.Ñ.ПкО О ее ÑПÑ.Ñ.Ð°ÐœÐµÐœÐžÑ Ð² бÑ.Ñ.еÑ.е Vim'а. 292 293 3. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. к ÑÑ.Ñ.Пке ÐÐÐ. Ñ.еЌ ЌеÑÑ.ПЌ, кÑ.Ўа ÑлеЎÑ.еÑ. вÑÑ.авОÑ.Ñ. 294 Ñ.ЎалеММÑ.Ñ. ÑÑ.Ñ.ПкÑ.. 295 296 4. ÐаÑ.ПЎÑÑÑ. в ПбÑ.Ñ.МПЌ Ñ.ежОЌе МабеÑ.ОÑ.е p ÐŽÐ»Ñ Ð·Ð°ÐŒÐµÐœÑ. ÑÑ.Ñ.ПкО. 297 298 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2--4, пПка Ме Ñ.аÑÑÑ.авОÑ.е вÑе ÑÑ.Ñ.ПкО в ÐœÑ.жМПЌ пПÑ.ÑЎке. 299 300 г) Ð. лÑ.Ñ.Ñ.е вÑ.ÐŽÑ.ЌаÑ.Ñ. Ме ЌПг. 301 б) Ð.ПгЎа Ме в Ñ.Ñ.Ñ.кÑ. заМеЌПг, 302 в) Ð.Ðœ Ñ.важаÑ.Ñ. ÑÐµÐ±Ñ Ð·Ð°ÑÑ.авОл 303 а) Ð.Пй ÐŽÑÐŽÑ ÑаЌÑ.Ñ. Ñ.еÑÑ.ÐœÑ.Ñ. пÑ.авОл 304 305 306 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 307 УÑ.Пк 3.2: Ð.Ð.Ð.ÐÐÐ.Ð Ð.ÐÐ.Ð.ÐЫ 308 309 310 ** ÐабеÑ.ОÑ.е r О ÑОЌвПл, заЌеМÑÑ.Ñ.Ой ÑОЌвПл пПЎ кÑ.Ñ.ÑПÑ.ПЌ. ** 311 312 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй --->. 313 314 2. УÑÑ.аМПвОÑ.е кÑ.Ñ.ÑПÑ. Ñ.ак, Ñ.Ñ.ПбÑ. ПМ МаÑ.ПЎОлÑÑ ÐœÐ°ÐŽ пеÑ.вПй ПÑ.ОбкПй. 315 316 3. ÐабеÑ.ОÑ.е r О заÑ.еЌ ÑОЌвПл, ОÑпÑ.авлÑÑ.Ñ.Ой ПÑ.ОбкÑ.. 317 318 4. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 2 О 3, пПка пеÑ.Ð²Ð°Ñ ÑÑ.Ñ.Пка Ме бÑ.ЎеÑ. ОÑпÑ.авлеМа. 319 320 ---> Ð. ЌПЌегÑ. МабÑ.Ñ.а ÑÑ.Пй Ñ.Ñ.Ñ.ПкО кПе0кÑ.П Ñ Ñ.Ñ.Ñ.ЎПЌ пПпвЎал пП клваОÑ.аЌ! 321 ---> Ð. ЌПЌеМÑ. МабПÑ.а ÑÑ.Пй ÑÑ.Ñ.ПкО кПе-кÑ.П Ñ Ñ.Ñ.Ñ.ЎПЌ пПпаЎал пП клавОÑ.аЌ! 322 323 5. ТепеÑ.Ñ. пеÑ.еÑ.ПЎОÑ.е к УÑ.ПкÑ. 3.2. 324 325 Ð.ÐÐ.Ð.ЧÐÐÐ.Ð.: Ð.ПЌМОÑ.е, Ñ.Ñ.П вÑ. ЎПлжМÑ. Ñ.Ñ.ОÑ.Ñ.ÑÑ Ð² пÑ.ПÑ.еÑÑе Ñ.абПÑ.Ñ., а Ме пÑ.ПÑÑ.П 326 запПЌОМаÑ. 327 328 329 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 330 УÑ.Пк 3.3: Ð.Ð.Ð.ÐÐÐ.Ð Ð.Ð.Ð.Ð.ÐÐ.ÐÐ.Я 331 332 333 ** Ð.Ð»Ñ ÐžÐ·ÐŒÐµÐœÐµÐœÐžÑ Ñ.аÑÑ.О ÑлПва МабеÑ.ОÑ.е cw . ** 334 335 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй --->. 336 337 2. РаÑпПлПжОÑ.е кÑ.Ñ.ÑПÑ. МаЎ бÑ.квПй `o' в ÑлПве `ÑПла'. 338 339 3. ÐабеÑ.ОÑ.е cw О ОÑпÑ.авÑ.Ñ.е ÑлПвП (в ЎаММПЌ ÑлÑ.Ñ.ае, МабеÑ.ОÑ.е `лПв'.) 340 341 4. ÐажЌОÑ.е <ESC> О пеÑ.еÑ.ПЎОÑ.е к ÑлеЎÑ.Ñ.Ñ.ей ПÑ.Обке (к пеÑ.вПЌÑ. ÑОЌвПлÑ., кПÑ.ПÑ.Ñ.й 342 МаЎП ОзЌеМОÑ.Ñ..) 343 344 5. Ð.ПвÑ.ПÑ.ОÑ.е Ñ.агО 3--4 пПка пеÑ.вПе пÑ.еЎлПжеМОе Ме ÑÑ.аМеÑ. ОЎеМÑ.ОÑ.ÐœÑ.ÐŒ вÑ.ПÑ.ПЌÑ.. 345 346 ---> ÐеÑкПлÑ.кП ÑПла в ÑÑ.гÑ. ÑÑ.Ñ.Пке Ñ.пгÑ.Ñ.бÑ. Ñ.еЎалзкÑ.Ñ.ОеÑвÑ.. 347 ---> ÐеÑкПлÑ.кП ÑлПв в ÑÑ.Пй ÑÑ.Ñ.Пке Ñ.Ñ.ебÑ.Ñ.Ñ. Ñ.еЎакÑ.ОÑ.ПваМОÑ. 348 349 Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе, Ñ.Ñ.П cw Ме Ñ.ПлÑ.кП заЌеМÑеÑ. ÑлПвП, МП О пеÑ.евПЎОÑ. Ð²Ð°Ñ Ð² Ñ.ежОЌ 350 вÑÑ.авкО. 351 352 353 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 354 УÑ.Пк 3.4: Ð.Ð Ð.Ð.Ð.Ð.Ð.ÐÐ.Ð. Ð.Ð.Ð.Ð.ÐЯТЬ С Ð.Ð.Ð.ÐÐÐ.Ð.Ð. c 355 356 357 ** Ð.ПЌаМЎа заЌеМÑ. ОÑпПлÑ.зÑ.еÑ.ÑÑ Ñ Ñ.еЌО же ПбÑ.екÑ.аЌО, Ñ.Ñ.П О кПЌаМЎа Ñ.ЎалеМОÑ. ** 358 359 1. Ð.ПЌаМЎа ÐžÐ·ÐŒÐµÐœÐµÐœÐžÑ Ð¿Ñ.ОЌеМÑеÑ.ÑÑ Ñ.акОЌ же ПбÑ.азПЌ, как О кПЌаМЎа Ñ.ЎалеМОÑ. 360 Ð.е Ñ.ПÑ.ЌаÑ. Ñ.акПв: 361 362 [Ñ.ОÑлП] c ПбÑ.екÑ. Ð.Ð.Ð. c [Ñ.ОÑлП] ПбÑ.екÑ. 363 364 2. Ð.бÑ.екÑ.Ñ. Ñ.акже ÑПвпаЎаÑ.Ñ.: w (ÑлПвП), $ (кПМеÑ. ÑÑ.Ñ.ПкО) О Ñ..п. 365 366 3. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй --->. 367 368 4. Ð.еÑ.ейЎОÑ.е к пеÑ.вПй ПÑ.Обке. 369 370 5. ÐабеÑ.ОÑ.е c$ О ПÑ.Ñ.еЎакÑ.ОÑ.Ñ.йÑ.е пеÑ.вÑ.Ñ. ÑÑ.Ñ.ПкÑ. Ñ.ак, Ñ.Ñ.ПбÑ. ПМа ÑПвпаЎала ÑП 371 вÑ.ПÑ.Пй, пПÑле Ñ.егП МажЌОÑ.е <ESC>. 372 373 ---> Ð.ПМеÑ. ÑÑ.Пй ÑÑ.Ñ.ПкО ÐœÑ.жЎаеÑ.ÑÑ Ð² пПЌПÑ.О, Ñ.Ñ.ПбÑ. ÑÑ.аÑ.Ñ. пПÑ.ПжОЌ Ма вÑ.ПÑ.Пй. 374 ---> Ð.ПМеÑ. ÑÑ.Пй ÑÑ.Ñ.ПкО ÐœÑ.жЎаеÑ.ÑÑ Ð² пПЌПÑ.О кПЌаМЎÑ. c$ . 375 376 377 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 378 Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.Ð 3 379 380 381 1. Ð.Ð»Ñ Ð²ÑÑ.авкО Ñ.екÑÑ.а, кПÑ.ПÑ.Ñ.й Ñ.ПлÑ.кП Ñ.Ñ.П бÑ.л Ñ.ЎалеМ, МабеÑ.ОÑ.е p . ÐÑ.а 382 кПЌаМЎа вÑÑ.авОÑ. Ñ.ЎалеММÑ.й Ñ.екÑÑ. Ð.Ð.СÐ.Ð. кÑ.Ñ.ÑПÑ.а (еÑлО бÑ.ла Ñ.ЎалеМа ÑÑ.Ñ.Пка, 383 Ñ.П ПМа бÑ.ЎеÑ. пПЌеÑ.еМа в ÑÑ.Ñ.Пке пПЎ кÑ.Ñ.ÑПÑ.ПЌ). 384 385 2. Ð.Ð»Ñ Ð·Ð°ÐŒÐµÐœÑ. ÑОЌвПла пПЎ кÑ.Ñ.ÑПÑ.ПЌ МабеÑ.ОÑ.е r О заÑ.еЌ заЌеМÑÑ.Ñ.Ой ÑОЌвПл. 386 387 3. Ð.ПЌаМЎа ÐžÐ·ÐŒÐµÐœÐµÐœÐžÑ Ð¿ÐŸÐ·Ð²ÐŸÐ»ÑеÑ. Ð.аЌ ОзЌеМОÑ.Ñ. Ñ.казаММÑ.й ПбÑ.екÑ. ПÑ. кÑ.Ñ.ÑПÑ.а ЎП 388 кПМÑ.а ÑÑ.ПгП ПбÑ.екÑ.а. ÐапÑ.ОЌеÑ., МабеÑ.ОÑ.е cw ÐŽÐ»Ñ Ð·Ð°ÐŒÐµÐœÑ. ПÑ. кÑ.Ñ.ÑПÑ.а ЎП 389 кПМÑ.а ÑлПва, c$ ÐŽÐ»Ñ ÐžÐ·ÐŒÐµÐœÐµÐœÐžÑ ÐŽÐŸ кПМÑ.а ÑÑ.Ñ.ПкО. 390 391 4. ЀПÑ.ЌаÑ. кПЌаМЎÑ. ÐžÐ·ÐŒÐµÐœÐµÐœÐžÑ Ñ.акПв: 392 393 [Ñ.ОÑлП] c ПбÑ.екÑ. Ð.Ð.Ð. c [Ñ.ОÑлП] ПбÑ.екÑ. 394 395 ТепеÑ.Ñ. ПÑ.пÑ.авлÑйÑ.еÑÑ. к ÑлеЎÑ.Ñ.Ñ.еЌÑ. Ñ.Ñ.ПкÑ.. 396 397 398 399 400 401 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 402 УÑ.Пк 4.1: Ð.ÐЀÐ.Ð Ð.ÐЊÐ.Я Ð. ЀÐÐ.Ð.Ð. Ð. Ð ÐСÐ.Ð.Ð.Ð.Ð.Ð.ÐÐ.Ð. Ð. ÐÐ.Ð. 403 404 405 ** ÐабеÑ.ОÑ.е CTRL-g Ñ.Ñ.ПбÑ. Ñ.вОЎеÑ.Ñ. Ð.аÑ.е ЌеÑÑ.ПÑ.аÑпПлПжеМОе в Ñ.айле О ОМÑ.ПÑ.ЌаÑ.ОÑ. 406 П МеЌ. 407 ÐабеÑ.ОÑ.е SHIFT-G ÐŽÐ»Ñ Ð¿ÐµÑ.еЌеÑ.ÐµÐœÐžÑ Ðº заЎаММПй ÑÑ.Ñ.Пке в Ñ.айле. ** 408 409 Ð.аЌеÑ.аМОе: Ð.Ñ.ПÑ.ОÑ.айÑ.е веÑÑ. Ñ.Ñ.Пк пÑ.ежЎе Ñ.еЌ вÑ.пПлМÑÑ.Ñ. лÑ.бÑ.е кПЌаМЎÑ.!! 410 411 1. УЎеÑ.Ð¶ÐžÐ²Ð°Ñ ÐºÐ»Ð°Ð²ÐžÑ.Ñ. Ctrl МажЌОÑ.е g . Ð.МОзÑ. ÑкÑ.аМа пПÑвОÑ.ÑÑ ÑÑ.Ñ.Пка ÑÑ.аÑ.Ñ.Ñа Ñ 412 ОЌеМеЌ Ñ.айла О МПЌеÑ.ПЌ ÑÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй Ð.Ñ. МаÑ.ПЎОÑ.еÑÑ.. Ð.апПЌМОÑ.е МПЌеÑ. 413 ÑÑ.Ñ.ПкО, ПМ пПÑ.Ñ.ебÑ.еÑ.ÑÑ ÐœÐ° Каге 3. 414 415 2. ÐажЌОÑ.е shift-G ÐŽÐ»Ñ Ð¿ÐµÑ.еЌеÑ.ÐµÐœÐžÑ Ðº кПМÑ.Ñ. Ñ.айла. 416 417 3. ÐабеÑ.ОÑ.е МПЌеÑ. ÑÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй вÑ. МаÑ.ПЎОлОÑÑ. О заÑ.еЌ shift-G. ÐÑ.П 418 веÑ.МеÑ. Ð.Ð°Ñ Ðº ÑÑ.Ñ.Пке, в кПÑ.ПÑ.Пй Ð.Ñ. бÑ.лО, кПгЎа в пеÑ.вÑ.й Ñ.аз МажалО Ctrl-g. 419 (Ð.ПгЎа Ð.Ñ. бÑ.ЎеÑ.е МабОÑ.аÑ.Ñ. Ñ.ОÑ.Ñ.Ñ., ПМО ÐÐ. ПÑ.ПбÑ.азÑÑ.ÑÑ ÐœÐ° ÑкÑ.аМе.) 420 421 4. Ð.ÑлО Ð.Ñ. запПЌМОлО вÑе вÑ.Ñ.еÑказаММПе, вÑ.пПлМОÑ.е Ñ.агО 1--3. 422 423 424 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 425 УÑ.Пк 4.2: Ð.Ð.Ð.ÐÐÐ.Ð Ð.Ð.Ð.СÐ.Ð 426 427 ** ÐабеÑ.ОÑ.е / О заÑ.еЌ ввеЎОÑ.е ОÑкПЌÑ.Ñ. Ñ.Ñ.азÑ.. ** 428 429 1. Ð. ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode) МабеÑ.ОÑ.е ÑОЌвПл / . Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе, 430 Ñ.Ñ.П ПМ вЌеÑÑ.е Ñ ÐºÑ.Ñ.ÑПÑ.ПЌ пПÑвОÑ.ÑÑ Ð²ÐœÐžÐ·Ñ. ÑкÑ.аМа, как ÑÑ.П пÑ.ПОÑÑ.ПЎОÑ. Ñ 431 кПЌаМЎПй : . 432 433 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е 'ПÑ.Ñ.Ñ.Обка' <ENTER>. ÐÑ.П Ñ.П ÑлПвП, кПÑ.ПÑ.Пе Ð.Ñ. бÑ.ЎеÑ.е 434 ОÑкаÑ.Ñ.. 435 436 3. Ð.Ð»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. пПвÑ.ПÑ.ОÑ.Ñ. пПОÑк, пÑ.ПÑÑ.П МажЌОÑ.е n . 437 Ð.Ð»Ñ Ð¿ÐŸÐžÑка ÑÑ.Пй Ñ.Ñ.азÑ. в ПбÑ.аÑ.МПЌ МапÑ.авлеМОО, МажЌОÑ.е Shift-N . 438 439 4. Ð.ÑлО Ð.Ñ. желаеÑ.е ÑÑ.азÑ. ОÑкаÑ.Ñ. в ПбÑ.аÑ.МПЌ МапÑ.авлеМОО, ОÑпПлÑ.зÑ.йÑ.е 440 кПЌаМЎÑ. ? вЌеÑÑ.П / . 441 442 ---> Ð.ПгЎа Ð.Ñ. пÑ.О пПОÑке ЎПÑÑ.ОгМеÑ.е кПМÑ.а Ñ.айла, пПОÑк бÑ.ЎеÑ. пÑ.ПЎПлжеМ Ñ 443 МаÑ.ала. 444 445 "ПÑ.Ñ.Ñ.Обка" ÑÑ.П Ме ÑпПÑПб пÑ.ПОзМеÑÐµÐœÐžÑ ÑлПва `ПÑ.Обка'; ПÑ.Ñ.Ñ.Обка ÑÑ.П ПÑ.Обка. 446 447 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 448 УÑ.Пк 4.3: Ð.Ð.Ð.СÐ. Ð.ÐÐ ÐЫХ СÐ.Ð.Ð.Ð.Ð. 449 450 451 ** ÐабеÑ.ОÑ.е % ÐŽÐ»Ñ Ð¿ÐŸÐžÑка паÑ.ÐœÑ.Ñ. ),] ОлО } . ** 452 453 1. Ð.ПЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. МаЎ лÑ.бПй Оз (, [ ОлО { в ÑÑ.Ñ.Пке вМОзÑ., пПЌеÑ.еММПй --->. 454 455 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е ÑОЌвПл % . 456 457 3. Ð.Ñ.Ñ.ÑПÑ. ЎПлжеМ пеÑ.еÑкПÑ.ОÑ.Ñ. Ма паÑ.ÐœÑ.Ñ. ÑкПбкÑ.. 458 459 4. ÐабеÑ.ОÑ.е % ÐŽÐ»Ñ Ð²ÐŸÐ·Ð²Ñ.аÑ.а кÑ.Ñ.ÑПÑ.а МазаЎ к пеÑ.вПй ÑкПбке. 460 461 ---> ÐÑ.П ( ÑÑ.Ñ.Пка, ÑПЎеÑ.жаÑ.Ð°Ñ Ñ.акОе (, Ñ.акОе [ ] О Ñ.акОе { } ÑкПбкО. )) 462 463 Ð.аЌеÑ.аМОе: ÐÑ.П ПÑ.еМÑ. Ñ.ЎПбМП пÑ.О ПÑ.лаЎке пÑ.ПгÑ.аЌЌ Ñ Ð¿Ñ.ПпÑ.Ñ.еММÑ.ЌО ÑкПбкаЌО! 464 465 466 467 468 469 470 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 471 УÑ.Пк 4.4: СÐ.Ð.СÐ.Ð. Ð.СÐ.Ð ÐÐ.Ð.Ð.ÐÐ.Я Ð.КÐ.Ð.Ð.Ð. 472 473 474 ** ÐабеÑ.ОÑ.е :s/бÑ.лП/ÑÑ.алП/g ÐŽÐ»Ñ Ð·Ð°ÐŒÐµÐœÑ. 'бÑ.лП' Ма 'ÑÑ.алП'. ** 475 476 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй --->. 477 478 2. ÐабеÑ.ОÑ.е :s/Ñ.вПЎÑ./Ñ.вПжÑ. <ENTER> . Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе Ма Ñ.П, Ñ.Ñ.П ÑÑ.а кПЌаМЎа 479 заЌеМОÑ. Ñ.ПлÑ.кП пеÑ.вПе МайЎеММПе вÑ.ПжЎеМОе в ÑÑ.Ñ.Пке. 480 481 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е :s/Ñ.вПЎÑ./Ñ.вПжÑ./g , ПзМаÑ.аÑ.Ñ.ее пПЎÑÑ.аМПвкÑ. глПбалÑ.МП вП 482 вÑей ÑÑ.Ñ.Пке. ÐÑ.П заЌеМОÑ. вÑе МайЎеММÑ.е в ÑÑ.Ñ.Пке вÑ.ПжЎеМОÑ. 483 484 ---> Я Ñ.вПЎÑ. к ПÑ.веÑ.жеММÑ.ÐŒ ÑелеМÑ.ÑÐŒ, Ñ Ñ.вПЎÑ. ÑквПзÑ. векПвеÑ.ÐœÑ.й ÑÑ.ПМ, Ñ Ñ.вПЎÑ. к 485 забÑ.Ñ.Ñ.ÐŒ пПкПлеМÑ.ÑÐŒ. 486 487 4. Ð.Ð»Ñ Ð·Ð°ÐŒÐµÐœÑ. вÑеÑ. вÑ.ПжЎеМОй пПÑлеЎПваÑ.елÑ.МПÑÑ.О ÑОЌвПлПв ЌежЎÑ. ЎвÑ.ÐŒÑ 488 ÑÑ.Ñ.ПкаЌО, 489 МабеÑ.ОÑ.е :#,#s/бÑ.лП/ÑÑ.алП/g гЎе #,# --- МПЌеÑ.а ÑÑ.ОÑ. ÑÑ.Ñ.Пк. 490 ÐабеÑ.ОÑ.е :%s/бÑ.лП/ÑÑ.алП/g ÐŽÐ»Ñ Ð·Ð°ÐŒÐµÐœÑ. вÑеÑ. вÑ.ПжЎеМОй вП вÑеЌ Ñ.айле. 491 492 493 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 494 Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.Ð 4 495 1. Ctrl-g пПказÑ.ваеÑ. ваÑ.е пПлПжеМОе в Ñ.айле О ОМÑ.ПÑ.ЌаÑ.ОÑ. П МеЌ. 496 Shift-G пеÑ.еЌеÑ.аеÑ. Ð.Ð°Ñ Ð² кПМеÑ. Ñ.айла. ÐПЌеÑ., за кПÑ.ПÑ.Ñ.ÐŒ ÑлеЎÑ.еÑ. Shift-G 497 пПзвПлÑеÑ. пеÑ.ейÑ.О к ÑÑ.Ñ.Пке Ñ ÑÑ.ОЌ МПЌеÑ.ПЌ. 498 499 2. ÐажаÑ.Ое / О заÑ.еЌ ввПЎ ÑÑ.Ñ.ПкО пПзвПлÑеÑ. пÑ.ПОзвеÑÑ.О пПОÑк ÑÑ.Пй ÑÑ.Ñ.ПкО 500 Ð.Ð.Ð.Ð Ð.Ð. пП Ñ.екÑÑ.Ñ.. 501 ÐажаÑ.Ое ? О заÑ.еЌ ввПЎ ÑÑ.Ñ.ПкО пПзвПлÑеÑ. пÑ.ПОзвеÑÑ.О пПОÑк ÑÑ.Пй ÑÑ.Ñ.ПкО 502 ÐÐÐ.ÐÐ. пП Ñ.екÑÑ.Ñ.. 503 Ð.ПÑле пПОÑка МабеÑ.ОÑ.е n ÐŽÐ»Ñ Ð¿ÐµÑ.еÑ.ПЎа к ÑлеЎÑ.Ñ.Ñ.еЌÑ. вÑ.ПжЎеМОÑ. ОÑкПЌПй 504 ÑÑ.Ñ.ПкО в Ñ.ПЌ же МапÑ.авлеМОО ОлО Shift-N ÐŽÐ»Ñ Ð¿ÐµÑ.еÑ.ПЎа в пÑ.ПÑ.ОвПпПлПжМПЌ 505 МапÑ.авлеМОО. 506 507 3. ÐажаÑ.Ое % , кПгЎа кÑ.Ñ.ÑПÑ. МаÑ.ПЎОÑ.ÑÑ ÐœÐ° (,),[,],{, ОлО } пПзвПлÑеÑ. МайÑ.О 508 паÑ.ÐœÑ.Ñ. ÑкПбкÑ.. 509 510 4. Ð.Ð»Ñ Ð¿ÐŸÐŽÑÑ.аМПвкО `ÑÑ.алП' вЌеÑÑ.П пеÑ.вПгП `бÑ.лП' в ÑÑ.Ñ.Пке, МабеÑ.ОÑ.е 511 :s/old/new 512 Ð.Ð»Ñ Ð¿ÐŸÐŽÑÑ.аМПвкО `ÑÑ.алП' вЌеÑÑ.П вÑеÑ. `бÑ.лП' в ÑÑ.Ñ.Пке, МабеÑ.ОÑ.е 513 :s/old/new/g 514 Ð.Ð»Ñ Ð·Ð°ÐŒÐµÐœÑ. в ОМÑ.еÑ.вале ЌежЎÑ. ЎвÑ.ÐŒÑ ÑÑ.Ñ.ПкаЌО, МабеÑ.ОÑ.е 515 :#,#s/old/new/g 516 Ð.Ð»Ñ Ð·Ð°ÐŒÐµÐœÑ. вÑеÑ. вÑ.ПжЎеМОй `бÑ.лП' Ма `ÑÑ.алП' в Ñ.айле, МабеÑ.ОÑ.е 517 :%s/old/new/g 518 ЧÑ.ПбÑ. Ñ.еЎакÑ.ПÑ. кажЎÑ.й Ñ.аз запÑ.аÑ.Овал пПЎÑ.веÑ.жЎеМОе, ЎПбавÑ.Ñ.е 'c' 519 :%s/old/new/gc 520 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 УÑ.Пк 5.1: Ð.ÐÐ. Ð.ЫÐ.Ð.Ð.ÐÐ.ТЬ Ð.ÐÐ.КÐЮЮ Ð.Ð.Ð.ÐÐÐ.У 522 523 524 ** ÐабеÑ.ОÑ.е :! О заÑ.еЌ вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ., кПÑ.ПÑ.Ñ.Ñ. ÑлеЎÑ.еÑ. вÑ.пПлМОÑ.Ñ.. ** 525 526 1. ÐабеÑ.ОÑ.е Ñ.же зМакПЌÑ.Ñ. Ð.аЌ кПЌаМЎÑ. : ÐŽÐ»Ñ Ñ.ÑÑ.аМПвкО кÑ.Ñ.ÑПÑ.а в кПЌаМЎМÑ.Ñ. 527 ÑÑ.Ñ.ПкÑ. Ñ.еЎакÑ.ПÑ.а. ÐÑ.П пПзвПлОÑ. Ð.аЌ ввеÑÑ.О кПЌаМЎÑ.. 528 529 2. ТепеÑ.Ñ. МабеÑ.ОÑ.е ÑОЌвПл ! (вПÑклОÑ.аÑ.елÑ.ÐœÑ.й зМак). ТепеÑ.Ñ. ЌПжМП ОÑпПлМОÑ.Ñ. 530 вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ., ОÑпПлÑ.зÑ.Ñ ÐºÐŸÐŒÐ°ÐœÐŽÐœÑ.Ñ. ПбПлПÑ.кÑ.. 531 532 3. Ð.Ð»Ñ Ð¿Ñ.ОЌеÑ.а МабеÑ.ОÑ.е ls пПÑле ! О МажЌОÑ.е <ENTER>. ÐÑ.а кПЌаМЎа вÑ.веЎеÑ. 533 ÑпОÑПк Ñ.айлПв в Ñ.екÑ.Ñ.еЌ каÑ.алПге, Ñ.ПÑ.МП Ñ.акже, как еÑлО бÑ. Ð.Ñ. ввелО ÑÑ.Ñ. 534 кПЌаМЎÑ. в пÑ.ОглаÑ.еМОО ПбПлПÑ.кО. Ð.лО пПпÑ.ПбÑ.йÑ.е :!dir , еÑлО пÑ.еЎÑ.ÐŽÑ.Ñ.Ð°Ñ 535 кПЌаМЎа Ме ÑÑ.абПÑ.ала. 536 537 ---> Ð.аЌеÑ.аМОе: ТакОЌ ÑпПÑПбПЌ ЌПжМП вÑ.пПлМОÑ.Ñ. лÑ.бÑ.Ñ. вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ.. 538 539 ---> Ð.аЌеÑ.аМОе: Ð.Ñе кПЌаМЎÑ., МаÑ.ОМаÑ.Ñ.ОеÑÑ Ñ : , ЎПлжМÑ. завеÑ.Ñ.аÑ.Ñ.ÑÑ ÐœÐ°Ð¶Ð°Ñ.ОеЌ 540 <ENTER>. 541 542 543 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 544 УÑ.Пк 5.2: Ð.ÐÐ. Ð.ÐÐ.Ð.СÐТЬ ЀÐÐ.Ð. 545 546 547 ** Ð.Ð»Ñ ÑПÑ.Ñ.Ð°ÐœÐµÐœÐžÑ ÐžÐ·ÐŒÐµÐœÐµÐœÐžÐ¹, пÑ.ПОзвеЎеММÑ.Ñ. в Ñ.айле, МабеÑ.ОÑ.е :w Ð.Ð.Я_ЀÐÐ.Ð.Ð. ** 548 549 1. ÐабеÑ.ОÑ.е :!dir ОлО :!ls ÐŽÐ»Ñ Ð¿ÐŸÐ»Ñ.Ñ.ÐµÐœÐžÑ ÑпОÑка Ñ.айлПв в Ñ.екÑ.Ñ.еЌ каÑ.алПге. 550 Ð.ак Ð.аЌ Ñ.же ОзвеÑÑ.МП, Ð.Ñ. ЎПлжМÑ. МажаÑ.Ñ. <ENTER> пПÑле ввПЎа ÑÑ.ОÑ. кПЌаМЎ. 551 552 2. Ð.Ñ.ОЎÑ.ЌайÑ.е МазваМОе ÐŽÐ»Ñ Ñ.айла, кПÑ.ПÑ.Пе еÑ.е Ме ÑÑ.Ñ.еÑÑ.вÑ.еÑ., МапÑ.ОЌеÑ. TEST. 553 554 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е :w TEST (гЎе TEST --- ÑÑ.П ÐžÐŒÑ Ñ.айла, пÑ.ОЎÑ.ЌаММПе Ð.аЌО.) 555 556 4. ÐÑ.а кПЌаМЎа ÑПÑ.Ñ.аМОÑ. веÑÑ. Ñ.айл (УÑ.ебМОк пП Vim) пПЎ ОЌеМеЌ TEST. ЧÑ.ПбÑ. 557 Ñ.ЎПÑÑ.ПвеÑ.ОÑ.Ñ.ÑÑ Ð² ÑÑ.ПЌ, ÑМПва МабеÑ.ОÑ.е :!dir О пÑ.ПÑЌПÑ.Ñ.ОÑ.е каÑ.алПг. 558 559 ---> Ð.аЌеÑ.Ñ.Ñ.е, Ñ.Ñ.П еÑлО Ð.Ñ. вÑ.йЎеÑ.е Оз Vim О заÑ.еЌ запÑ.ÑÑ.ОÑ.е егП ÑМПва Ñ 560 Ñ.айлПЌ TEST, ÑÑ.ПÑ. Ñ.айл бÑ.ЎеÑ. Ñ.ПÑ.МПй кПпОей Ñ.Ñ.ебМОка в Ñ.ПÑ. ЌПЌеМÑ., кПгЎа 561 Ð.Ñ. егП ÑПÑ.Ñ.аМОлО. 562 563 5. ТепеÑ.Ñ. Ñ.ЎалОÑ.е ÑÑ.ПÑ. Ñ.айл, МабÑ.ав :!del TEST 564 565 566 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 567 УÑ.Пк 5.3: Ð.ЫÐ.Ð.Ð Ð.ЧÐÐ.Ð. СÐ.ХРÐÐÐ.ÐÐ.Ð. 568 569 570 ** Ð.Ð»Ñ ÑПÑ.Ñ.Ð°ÐœÐµÐœÐžÑ Ñ.аÑÑ.О Ñ.айла, МабеÑ.ОÑ.е :#,# w Ð.Ð.Я_ЀÐÐ.Ð.Ð ** 571 572 1. Ð.Ñ.е Ñ.аз МабеÑ.ОÑ.е :!dir ОлО :!ls ÐŽÐ»Ñ Ð¿ÐŸÐ»Ñ.Ñ.ÐµÐœÐžÑ ÑпОÑка Ñ.айлПв в Ñ.екÑ.Ñ.еЌ 573 каÑ.алПге О вÑ.беÑ.ОÑ.е пПЎÑ.ПЎÑÑ.ее ОЌÑ, МапÑ.ОЌеÑ. TEST. 574 575 2. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. к МаÑ.алÑ. ÑÑ.Пй ÑÑ.Ñ.аМОÑ.Ñ. О МажЌОÑ.е Ctrl-g ÐŽÐ»Ñ ÐœÐ°Ñ.ÐŸÐ¶ÐŽÐµÐœÐžÑ 576 МПЌеÑ.а ÑÑ.Ñ.ПкОto. Ð.ÐÐ.Ð.Ð.ÐÐ.ТÐ. ÐТÐ.Т ÐÐ.Ð.Ð.Ð ! 577 578 3. ТепеÑ.Ñ. пеÑ.еЌеÑÑ.ОÑ.еÑÑ. в кПМеÑ. ÑÑ.Ñ.аМОÑ.Ñ. О вМПвÑ. МабеÑ.ОÑ.е Ctrl-g. Ð.ÐÐ.Ð.Ð.ÐÐ.ТÐ. 579 Ð. ÐТÐ.Т ÐÐ.Ð.Ð.РТÐ.Ð.Ð.! 580 581 4. Ð.Ð»Ñ ÑПÑ.Ñ.Ð°ÐœÐµÐœÐžÑ Ð¢Ð.Ð.ЬÐ.Ð. ЧÐСТÐ. Ñ.айла МабеÑ.ОÑ.е :#,# w TEST , гЎе #,# --- ÑÑ.П 582 МПЌеÑ.а, кПÑ.ПÑ.Ñ.е Ð.Ñ. запПЌМОлО (МаÑ.алП, кПМеÑ.), а TEST --- ÐžÐŒÑ Ð²Ð°Ñ.егП Ñ.айла. 583 584 5. Ð.ак О пÑ.ежЎе, Ñ.беЎОÑ.еÑÑ. в МалОÑ.ОО ÑÑ.ПгП Ñ.айла кПЌаМЎПй :!dir , МП ÐÐ. 585 УÐ.ÐÐ.ЯÐ.ТÐ. егП. 586 587 588 589 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 590 УÑ.Пк 5.4: ЧТÐ.ÐÐ.Ð. Ð. Ð.Ð.ЪÐ.Ð.Ð.ÐÐ.ÐÐ.Ð. ЀÐÐ.Ð.Ð.Ð. 591 592 ** Ð.Ð»Ñ Ð²ÑÑ.авкО ÑПЎеÑ.жОЌПгП Ñ.айла, МабеÑ.ОÑ.е :r FILENAME ** 593 594 1. ÐабеÑ.ОÑ.е :!dir ÐŽÐ»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.беЎОÑ.Ñ.ÑÑ Ð² Ñ.ПЌ, Ñ.Ñ.П Ñ.айл TEST вÑе еÑ.е 595 ÑÑ.Ñ.еÑÑ.вÑ.еÑ.. 596 597 2. УÑÑ.аМПвОÑ.е кÑ.Ñ.ÑПÑ. в веÑ.Ñ.Мей Ñ.аÑÑ.О ÑÑ.Пй ÑÑ.Ñ.аМОÑ.Ñ.. 598 599 Ð.аЌеÑ.аМОе: Ð.ПÑле вÑ.Ð¿ÐŸÐ»ÐœÐµÐœÐžÑ Ñ.ага 3 Ð.Ñ. Ñ.вОЎОÑ.е УÑ.Пк 5.3. Ð.ПÑле ÑÑ.ПгП 600 пеÑ.еЌеÑ.айÑ.еÑÑ. Ð.ÐÐ.Ð., ÑМПва к ÑÑ.ПЌÑ. Ñ.Ñ.ПкÑ.. 601 602 3. ТепеÑ.Ñ. пÑ.ПÑ.ОÑ.айÑ.е Ð.аÑ. Ñ.айл TEST, ОÑпПлÑ.зÑ.Ñ ÐºÐŸÐŒÐ°ÐœÐŽÑ. :r TEST , гЎе 603 TEST --- ÑÑ.П ÐžÐŒÑ Ñ.айла. 604 605 Ð.аЌеÑ.аМОе: Ð.Ñ.ПÑ.ОÑ.аММÑ.й Ð.аЌО Ñ.айл бÑ.ЎеÑ. вÑÑ.авлеМ в Ñ.ПЌ ЌеÑÑ.е, гЎе МаÑ.ПЎОÑ.ÑÑ 606 кÑ.Ñ.ÑПÑ.. 607 608 4. ЧÑ.ПбÑ. Ñ.беЎОÑ.Ñ.ÑÑ Ð² Ñ.ПЌ, Ñ.Ñ.П Ñ.айл пÑ.ПÑ.ОÑ.аМ, пеÑ.еЌеÑÑ.ОÑ.еÑÑ. МеЌМПгП МазаЎ пП 609 Ñ.екÑÑ.Ñ. О заЌеÑ.Ñ.Ñ.е, Ñ.Ñ.П Ñ.епеÑ.Ñ. ÑÑ.Ñ.еÑÑ.вÑ.Ñ.Ñ. Ўве кПпОО УÑ.Пка 5.3, ОÑÑ.ÐŸÐŽÐœÐ°Ñ 610 О пПлÑ.Ñ.ÐµÐœÐœÐ°Ñ ÐžÐ· Ñ.айла. 611 612 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 613 Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.Ð 5 614 615 616 1. :!кПЌаМЎа ОÑпПлМÑеÑ. вМеÑ.ÐœÑ.Ñ. кПЌаМЎÑ.. 617 618 ÐекПÑ.ПÑ.Ñ.е пПлезМÑ.е пÑ.ОЌеÑ.Ñ.: 619 :!dir --- вÑ.вПЎОÑ. ÑпОÑПк Ñ.айлПв в каÑ.алПге. 620 :!del FILENAME --- Ñ.ЎалÑеÑ. Ñ.айл FILENAME. 621 622 2. :w FILENAME запОÑÑ.ваеÑ. Ñ.екÑ.Ñ.Ой Ñ.еЎакÑ.ОÑ.Ñ.еЌÑ.й Ñ.айл Ма ЎОÑк 623 пПЎ ОЌеМеЌ FILENAME. 624 625 3. :#,#w FILENAME ÑПÑ.Ñ.аМÑеÑ. ÑÑ.Ñ.ПкО ПÑ. # ЎП # в Ñ.айл FILENAME. 626 627 4. :r FILENAME ÑÑ.ОÑ.Ñ.ваеÑ. Ñ ÐŽÐžÑка Ñ.айл FILENAME О пПЌеÑ.аеÑ. егП в Ñ.екÑ.Ñ.Ой 628 Ñ.айл ÑлеЎПЌ за пПзОÑ.Оей кÑ.Ñ.ÑПÑ.а. 629 630 631 632 633 634 635 636 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 637 УÑ.Пк 6.1: Ð.Ð.Ð.ÐÐÐ.РСÐ.Ð.Ð.ÐÐÐ.Я 638 639 640 ** ÐабеÑ.ОÑ.е o Ñ.Ñ.ПбÑ. ÑПзЎаÑ.Ñ. пÑ.ÑÑ.Ñ.Ñ. ÑÑ.Ñ.ПкÑ. пПЎ кÑ.Ñ.ÑПÑ.ПЌ О пеÑ.ейÑ.О в Ñ.ежОЌ 641 вÑÑ.авкО (Insert mode) ** 642 643 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй --->. 644 645 2. ÐабеÑ.ОÑ.е o (в МОжМеЌ Ñ.егОÑÑ.Ñ.е) ÐŽÐ»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. ÑПзЎаÑ.Ñ. пÑ.ÑÑ.Ñ.Ñ. ÑÑ.Ñ.ПкÑ. 646 ÐÐ.Ð.Ð. кÑ.Ñ.ÑПÑ.а О пеÑ.ейÑ.О в Ñ.ежОЌ вÑÑ.авкО (Insert mode). 647 648 3. ТепеÑ.Ñ. ÑкПпОÑ.Ñ.йÑ.е пПЌеÑ.еММÑ.Ñ. ---> ÑÑ.Ñ.ПкÑ. О МажЌОÑ.е <ESC> ÐŽÐ»Ñ Ð²Ñ.Ñ.ПЎа Оз 649 Ñ.ежОЌа вÑÑ.авкО. 650 651 ---> Ð.ПÑле МажаÑ.ÐžÑ o кÑ.Ñ.ÑПÑ. пеÑ.ейЎеÑ. Ма МПвÑ.Ñ. пÑ.ÑÑ.Ñ.Ñ. ÑÑ.Ñ.ПкÑ. в Ñ.ежОЌе вÑÑ.авкО. 652 653 4. Ð.Ð»Ñ ÑÐŸÐ·ÐŽÐ°ÐœÐžÑ ÑÑ.Ñ.ПкО Ð.ЫКÐ. кÑ.Ñ.ÑПÑ.а, пÑ.ПÑÑ.П МабеÑ.ОÑ.е заглавМÑ.Ñ. O, вЌеÑÑ.П 654 ÑÑ.Ñ.ПÑ.МПй o. Ð.ПпÑ.ПбÑ.йÑ.е пÑ.ПЎелаÑ.Ñ. ÑÑ.П Ñ ÐœÐžÐ¶ÐµÑлеЎÑ.Ñ.Ñ.ей ÑÑ.Ñ.ПкПй. 655 СПзЎайÑ.е МПвÑ.Ñ. ÑÑ.Ñ.ПкÑ. МаЎ ÑÑ.Пй, Мажав Shift-O, пПЌеÑÑ.Ов кÑ.Ñ.ÑПÑ. Ма ÑÑ.Ñ. ÑÑ.Ñ.ПкÑ.. 656 657 658 659 660 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 661 УÑ.Пк 6.2: Ð.Ð.Ð.ÐÐÐ.Ð Ð.Ð.Ð.ÐÐ.Ð.Ð.ÐÐ.Я 662 663 ** ÐабеÑ.ОÑ.е a , Ñ.Ñ.ПбÑ. вÑÑ.авОÑ.Ñ. Ñ.екÑÑ. Ð.Ð.СÐ.Ð. кÑ.Ñ.ÑПÑ.а. ** 664 665 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, в кПМеÑ. пеÑ.вПй ÑÑ.Ñ.ПкО, пПЌеÑ.еММПй ---> , 666 МабÑ.ав $ в ПбÑ.Ñ.МПЌ Ñ.ежОЌе (Normal mode). 667 668 2. ÐабеÑ.ОÑ.е a (в МОжМеЌ Ñ.егОÑÑ.Ñ.е) ÐŽÐ»Ñ ÐŽÐŸÐ±Ð°Ð²Ð»ÐµÐœÐžÑ Ñ.екÑÑ.а Ð.Ð.СÐ.Ð. ÑОЌвПла, 669 МаÑ.ПЎÑÑ.егПÑÑ Ð¿ÐŸÐŽ кÑ.Ñ.ÑПÑ.ПЌ. (Ð.Ð°Ð³Ð»Ð°Ð²ÐœÐ°Ñ A пПзвПлÑеÑ. ЎПбавОÑ.Ñ. в кПМеÑ. 670 ÑÑ.Ñ.ПкО.) 671 672 Ð.аЌеÑ.аМОе: ÐÑ.П пПзвПлÑеÑ. ОзбежаÑ.Ñ. МажаÑ.ÐžÑ i , пПÑлеЎМегП ÑОЌвПла, Ñ.екÑÑ.а ÐŽÐ»Ñ 673 вÑÑ.авкО, <ESC>, кÑ.Ñ.ÑПÑ.-впÑ.авП, О, МакПМеÑ., x , пÑ.ПÑÑ.П ÐŽÐ»Ñ Ñ.ПгП, 674 Ñ.Ñ.ПбÑ. ЎПбавОÑ.Ñ. Ñ.еÑÑ. в кПМеÑ. ÑÑ.Ñ.ПкО! 675 676 3. ТепеÑ.Ñ. завеÑ.Ñ.ОÑ.е пеÑ.вÑ.Ñ. ÑÑ.Ñ.ПкÑ.. Ð.аЌеÑ.Ñ.Ñ.е Ñ.акже, Ñ.Ñ.П ЎПбавлеМОе ÑÑ.П в 677 Ñ.ПÑ.МПÑÑ.О Ñ.П же ÑаЌПе, Ñ.Ñ.П О Ñ.ежОЌ вÑÑ.авкО, за ОÑклÑ.Ñ.еМОеЌ пПзОÑ.ОО, в 678 кПÑ.ПÑ.Ñ.Ñ. бÑ.ЎеÑ. вÑÑ.авлеМ Ñ.екÑÑ.. 679 680 ---> ÐÑ.а ÑÑ.Ñ.ПÑ.ка пПзвПлОÑ. Ð.аЌ пПпÑ.акÑ.ОкПваÑ.Ñ.ÑÑ 681 ---> ÐÑ.а ÑÑ.Ñ.ПÑ.ка пПзвПлОÑ. Ð.аЌ пПпÑ.акÑ.ОкПваÑ.Ñ.ÑÑ Ð² ЎПбавлеМОО Ñ.екÑÑ.а в кПМеÑ. 682 ÑÑ.Ñ.ПкО. 683 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 684 УÑ.Пк 6.3: Ð.ЩÐ. Ð.Ð.Ð.РСÐ.Ð.СÐ.Ð. Ð.ÐÐ.Ð.ÐЫ 685 686 687 ** ÐабеÑ.ОÑ.е заглавМÑ.Ñ. R ÐŽÐ»Ñ Ð·Ð°ÐŒÐµÐœÑ. бПлее, Ñ.еЌ ПЎМПгП ÑОЌвПла. ** 688 689 1. Ð.еÑ.еЌеÑÑ.ОÑ.е кÑ.Ñ.ÑПÑ. вМОз, к ÑÑ.Ñ.Пке, пПЌеÑ.еММПй --->. 690 691 2. РаÑпПлПжОÑ.е кÑ.Ñ.ÑПÑ. в МаÑ.але пеÑ.вПгП ÑлПва, ПÑ.лОÑ.аÑ.Ñ.егПÑÑ ÐŸÑ. 692 ÑППÑ.веÑ.ÑÑ.вÑ.Ñ.Ñ.егП в ÑлеЎÑ.Ñ.Ñ.ей ÑÑ.Ñ.Пке, пПЌеÑ.еММПй ---> (ÑлПвП 'пПÑлеЎМей'). 693 694 3. ТепеÑ.Ñ. МабеÑ.ОÑ.е R О заЌеМОÑ.е ПÑÑ.аÑ.Пк Ñ.екÑÑ.а в пеÑ.вПй ÑÑ.Ñ.Пке, МабÑ.ав 695 пПвеÑ.Ñ. ÑÑ.аÑ.ПгП Ñ.екÑÑ.а Ñ.ак, Ñ.Ñ.ПбÑ. Пбе ÑÑ.Ñ.ПкО ÑÑ.алО ПЎОМакПвÑ.ЌО. 696 697 ---> Ð.еÑ.вÑ.Ñ. ÑÑ.Ñ.ПкÑ. ЌПжМП ÑÑ.авМÑÑ.Ñ. Ñ Ð¿ÐŸÑлеЎМей, ОÑпПлÑ.зÑ.Ñ ÐºÐ»Ð°Ð²ÐžÑ.О. 698 ---> Ð.еÑ.вÑ.Ñ. ÑÑ.Ñ.ПкÑ. ЌПжМП ÑÑ.авМÑÑ.Ñ. Ñ Ð²Ñ.ПÑ.Пй, ОÑпПлÑ.зÑ.Ñ R О МабÑ.ав МПвÑ.й Ñ.екÑÑ.. 699 700 4. Ð.бÑ.аÑ.ОÑ.е вМОЌаМОе, Ñ.Ñ.П пÑ.О МажаÑ.ОО <ESC> ÐŽÐ»Ñ Ð·Ð°Ð²ÐµÑ.Ñ.еМОÑ, лÑ.бПй 701 Ме ОзЌеМеММÑ.й Ñ.екÑÑ. ÑПÑ.Ñ.аМОÑ.ÑÑ. 702 703 704 705 706 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 707 УÑ.Пк 6.4: УСТÐÐÐ.Ð.Ð.Ð Ð.ÐÐ ÐÐ.Ð.ТРÐ.Ð. 708 709 710 ** УÑÑ.аМПвОЌ паÑ.аЌеÑ.Ñ.Ñ. Ñ.ак, Ñ.Ñ.ПбÑ. ОгМПÑ.ОÑ.ПваÑ.Ñ. Ñ.егОÑÑ.Ñ. пÑ.О пПОÑке ОлО заЌеМе ** 711 712 713 1. Ð.ПОÑ.ОÑ.е ÑлПвП 'ОгМПÑ.ОÑ.ПваÑ.Ñ.', МабÑ.ав: 714 /ОгМПÑ.ОÑ.ПваÑ.Ñ. 715 Ð.ПвÑ.ПÑ.ОÑ.е пПОÑк МеÑкПлÑ.кП Ñ.аз, ÐœÐ°Ð¶ÐžÐŒÐ°Ñ ÐºÐ»Ð°Ð²ÐžÑ.Ñ. n 716 717 2. Ð.клÑ.Ñ.ОÑ.е паÑ.аЌеÑ.Ñ. 'ic' (Ð.гМПÑ.ОÑ.ПваÑ.Ñ. Ñ.егОÑÑ.Ñ.), МабÑ.ав: 718 :set ic 719 720 3. ТепеÑ.Ñ. ÑМПва ÑЎелайÑ.е пПОÑк ÑлПва 'ОгМПÑ.ОÑ.ПваÑ.Ñ.', Мажав: n 721 Ð.ПвÑ.ПÑ.ОÑ.е пПОÑк МеÑкПлÑ.кП Ñ.аз, ÐœÐ°Ð¶ÐžÐŒÐ°Ñ ÐºÐ»Ð°Ð²ÐžÑ.Ñ. n 722 723 4. Ð.клÑ.Ñ.ОÑ.е паÑ.аЌеÑ.Ñ.Ñ. 'hlsearch' О 'incsearch': 724 :set hls is 725 726 5. ТепеÑ.Ñ. ПпÑÑ.Ñ. ввеЎОÑ.е кПЌаМЎÑ. пПОÑка О пПÑЌПÑ.Ñ.ОÑ.е, Ñ.Ñ.П пПлÑ.Ñ.ОÑ.ÑÑ: 727 /ОгМПÑ.ОÑ.ПваÑ.Ñ. 728 729 730 731 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 732 Ð Ð.Ð.ЮÐ.Ð. УРÐ.Ð.Ð 6 733 734 735 1. ÐажаÑ.Ое o ÑПзЎаеÑ. ÑÑ.Ñ.ПкÑ. ÐÐ.Ð.Ð. кÑ.Ñ.ÑПÑ.а О пеÑ.еЌеÑ.аеÑ. кÑ.Ñ.ÑПÑ. в Мее в Ñ.ежОЌе 736 вÑÑ.авкО. 737 ÐажаÑ.Ое заглавМПй O ÑПзЎаеÑ. ÑÑ.Ñ.ПкÑ. Ð.ЫКÐ. ÑÑ.Ñ.ПкО, в кПÑ.ПÑ.Пй МаÑ.ПЎОÑ.ÑÑ 738 кÑ.Ñ.ÑПÑ.. 739 740 2. ÐабеÑ.ОÑ.е a ÐŽÐ»Ñ Ð²ÑÑ.авкО Ñ.екÑÑ.а Ð.Ð.СÐ.Ð. ÑОЌвПла, Ма кПÑ.ПÑ.ПЌ МаÑ.ПЎОÑ.ÑÑ ÐºÑ.Ñ.ÑПÑ.. 741 ÐажаÑ.Ое заглавМПй A авÑ.ПЌаÑ.ОÑ.еÑкО пеÑ.еЌеÑ.аеÑ. Ð.Ð°Ñ ÐŽÐ»Ñ ÐŽÐŸÐ±Ð°Ð²Ð»ÐµÐœÐžÑ Ñ.екÑÑ.а 742 в кПМеÑ. ÑÑ.Ñ.ПкО. 743 744 3. ÐажаÑ.Ое заглавМПй R пеÑ.евПЎОÑ. Ð.Ð°Ñ Ð² Ñ.ежОЌ заЌеМÑ. ЎП Ñ.еÑ. пПÑ., пПка Ме 745 бÑ.ЎеÑ. МажаÑ.а клавОÑ.а <ESC> ÐŽÐ»Ñ Ð·Ð°Ð²ÐµÑ.Ñ.еМОÑ. 746 747 4. ÐабÑ.ав ":set xxx" вÑ. ÑЌПжеÑ.е вклÑ.Ñ.ОÑ.Ñ. паÑ.аЌеÑ.Ñ. "xxx" 748 749 750 751 752 753 754 755 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 756 УÑ.Пк 7: Ð.Ð.Ð.ÐÐÐ.Ы Ð.Ð.Ð.УЧÐ.ÐÐ.Я Ð.СТРÐ.Ð.ÐÐÐ.Ð. СÐ.Ð ÐÐ.Ð.Ð. 757 758 ** Ð.ÑпПлÑ.зÑ.йÑ.е вÑÑ.Ñ.ПеММÑ.Ñ. ÑпÑ.авПÑ.ÐœÑ.Ñ. ÑОÑÑ.еЌÑ. ** 759 760 Vim ПблаЎаеÑ. ЌПÑ.МПй вÑÑ.Ñ.ПеММПй ÑпÑ.авПÑ.МПй ÑОÑÑ.еЌПй. Ð.Ð»Ñ ÐœÐ°Ñ.ала пПпÑ.ПбÑ.йÑ.е 761 ПЎОМ Оз Ñ.Ñ.еÑ. ваÑ.ОаМÑ.Пв: 762 - МажЌОÑ.е клавОÑ.Ñ. <HELP> (еÑлО Ñ.Ð°ÐºÐŸÐ²Ð°Ñ ÐžÐŒÐµÐµÑ.ÑÑ ÐœÐ° клавОаÑ.Ñ.Ñ.е) 763 - МажЌОÑ.е клавОÑ.Ñ. <F1> (еÑлО Ñ.Ð°ÐºÐŸÐ²Ð°Ñ ÐžÐŒÐµÐµÑ.ÑÑ ÐœÐ° клавОаÑ.Ñ.Ñ.е) 764 - МабеÑ.ОÑ.е :help <ENTER> 765 766 ÐабеÑ.ОÑ.е :q <ENTER> Ñ.Ñ.ПбÑ. закÑ.Ñ.Ñ.Ñ. ПкМП ÑпÑ.авкО. 767 768 Ð.Ñ. ЌПжеÑ.е МайÑ.О ÑпÑ.авкÑ. ÐŽÐ»Ñ Ð»Ñ.бПгП пПМÑÑ.ÐžÑ ÐžÐ»Ðž кПЌаМЎÑ., пÑ.ПÑÑ.П заЎав 769 ÑППÑ.веÑ.ÑÑ.вÑ.Ñ.Ñ.Ой аÑ.гÑ.ЌеМÑ. кПЌаМЎе ":help". Ð.ПпÑ.ПбÑ.йÑ.е ÑлеЎÑ.Ñ.Ñ.ее (Ме забÑ.ÐŽÑ.Ñ.е 770 МажаÑ.Ñ. <ENTER>): 771 772 :help w 773 :help c_<T 774 :help insert-index 775 776 777 778 779 780 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 781 УÑ.Пк 8: СÐ.Ð.Ð.ÐÐÐ.Ð. СТÐРТÐ.Ð.Ð.Ð.Ð. СÐ.Ð Ð.Ð.ТР782 783 ** Ð.клÑ.Ñ.ОЌ вПзЌПжМПÑÑ.О Vim ** 784 785 Vim ОЌееÑ. МаЌМПгП бПлÑ.Ñ.е вПзЌПжМПÑÑ.ей, Ñ.еЌ Vi, ПЎМакП бПлÑ.Ñ.ОМÑÑ.ваП Оз МОÑ. 786 вÑ.клÑ.Ñ.еМÑ. пП Ñ.ЌПлÑ.аМОÑ.. Ð.Ð»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. МаÑ.аÑ.Ñ. ОÑпПлÑ.зПваÑ.Ñ. МПвÑ.е 787 вПзЌПжМПÑÑ.О Ð.аЌ ÑлеЎÑ.еÑ. ÑПзЎаÑ.Ñ. Ñ.айл "vimrc". 788 789 1. Ð.Ñ.Ñ.еЎакÑ.ОÑ.Ñ.йÑ.е Ñ.айл "vimrc", егП Ñ.аÑпПлПжеМОе завОÑОÑ. ПÑ. ОÑпПлÑ.зÑ.еЌПй 790 ÑОÑÑ.еЌÑ.: 791 792 :edit ~/.vimrc ÐŽÐ»Ñ Unix 793 :edit $VIM/_vimrc ÐŽÐ»Ñ MS-Windows 794 795 2. ТепеÑ.Ñ. пÑ.ПÑ.ОÑ.айÑ.е пÑ.ОЌеÑ. Ñ.айла "vimrc": 796 797 :read $VIMRUNTIME/vimrc_example.vim 798 799 3. Ð.апОÑ.ОÑ.е Ñ.айл: 800 801 :write 802 803 ТепеÑ.Ñ. пÑ.О ÑлеЎÑ.Ñ.Ñ.еЌ запÑ.Ñке Vim бÑ.ЎеÑ. вклÑ.Ñ.еМа пПЎÑвеÑ.ка ÑОМÑ.акÑОÑа. Ð.Ñе 804 МаÑÑ.Ñ.ПйкО, пÑ.еЎпПÑ.ОÑ.аеЌÑ.е Ð.аЌО, ЌПгÑ.Ñ. бÑ.Ñ.Ñ. ЎПбавлеМÑ. в Ñ.айл "vimrc". 805 806 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 807 Ðа ÑÑ.ПЌ завеÑ.Ñ.аеÑ.ÑÑ Ð£Ñ.ебМОк Vim. Ð.Ðœ бÑ.л пÑ.еЎМазМаÑ.еМ ÐŽÐ»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. ЎаÑ.Ñ. 808 ПбÑ.ее пÑ.еЎÑÑ.авлеМОе П Ñ.еЎакÑ.ПÑ.е Vim, ЎПÑÑ.аÑ.ПÑ.МПе ÐŽÐ»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ Ð»ÐµÐ³ÐºÐŸÑÑ.Ñ.Ñ. 809 ОÑпПлÑ.зПваÑ.Ñ. егП. УÑ.ебМОк Ўалек ПÑ. пПлМПÑ.Ñ., пПÑкПлÑ.кÑ. Vim ОЌееÑ. ПÑ.еМÑ. ЌМПгП 810 кПЌаМЎ. Ð.Ñ.ПÑ.ОÑ.айÑ.е Ñ.епеÑ.Ñ. Ñ.Ñ.кПвПЎÑÑ.вП пПлÑ.зПваÑ.елÑ: ":help user-manual". 811 812 Ð.Ð»Ñ ÐŽÐ°Ð»Ñ.МейÑ.егП Ñ.Ñ.ÐµÐœÐžÑ Ñ.екПЌеМЎÑ.еÑ.ÑÑ ÐºÐœÐžÐ³Ð°: 813 Vim - Vi Improved - ÐвÑ.ПÑ.: Steve Oualline 814 Ð.зЎаÑ.елÑ.: New Riders 815 ÐÑ.а кМОга пПлМПÑÑ.Ñ.Ñ. пПÑвÑÑ.еМа Vim. Ð.ÑПбеММП пПлезМа МПвОÑ.каЌ. СПЎеÑ.жОÑ. 816 ЌМПжеÑÑ.вП пÑ.ОЌеÑ.Пв О ОллÑ.ÑÑ.Ñ.аÑ.Ой. 817 Ð.зглÑМОÑ.е Ма See http://iccf-holland.org/click5.html 818 819 СлеЎÑ.Ñ.Ñ.Ð°Ñ ÐºÐœÐžÐ³Ð° бПлее пПÑ.Ñ.еММПгП вПзÑ.аÑÑ.а О пПÑвÑÑ.еМа бПлÑ.Ñ.е Vi, Ñ.еЌ Vim, 820 ПЎМакП Ñ.акже Ñ.екПЌеМЎÑ.еÑ.ÑÑ: 821 Learning the Vi Editor - ÐвÑ.ПÑ.: Linda Lamb 822 Ð.зЎаÑ.елÑ.: O'Reilly & Associates Inc. 823 ÐÑ.П Ñ.ПÑ.ПÑ.Ð°Ñ ÐºÐœÐžÐ³Ð° ÐŽÐ»Ñ Ñ.ПгП, Ñ.Ñ.ПбÑ. Ñ.зМаÑ.Ñ. вÑе, Ñ.Ñ.П Ñ.ПлÑ.кП ЌПжМП пÑ.ПЎелÑ.ваÑ.Ñ. Ñ 824 Vi. КеÑÑ.Пе ОзЎаМОе Ñ.акже вклÑ.Ñ.аеÑ. ОМÑ.ПÑ.ЌаÑ.ОÑ. П Vim. 825 826 ÐÑ.ПÑ. Ñ.Ñ.ебМОк бÑ.л МапОÑаМ Michael C. Pierce О Robert K. Ware, Colorado School 827 of Mines Ñ ÐžÑпПлÑ.зПваМОеЌ ОЎей, пÑ.еЎлПжеММÑ.Ñ. Charles Smith, Colorado State 828 University. E-mail: bware@mines.colorado.edu. 829 830 Ð.ПÑ.абПÑ.аМП ÐŽÐ»Ñ Vim Bram Moolenaar. 831 832 Ð.еÑ.евПЎ: ÐМЎÑ.ей Ð.ОÑелев <a_kissel@eudoramail.com>, 2002. 833 Translator: Andrey Kiselev <a_kissel@eudoramail.com>, 2002. 834 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
runtime/tutor/tutor.vim
diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim
old new 1 1 " Vim tutor support file 2 2 " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es> 3 " Last Change: 2006 Mar 183 " Last Change: 2006 Sep 09 4 4 5 5 " This small source file is used for detecting if a translation of the 6 6 " tutor file exist, i.e., a tutor.xx file, where xx is the language. … … 93 93 endif 94 94 endif 95 95 96 " The Greek tutor is available in two encodings, guess which one to use 97 if s:ext =~? '\.gr' && &enc =~ 737 98 let s:ext = ".gr.cp737" 96 " The Greek tutor is available in three encodings, guess what to use. 97 " We used ".gr" (Greece) instead of ".el" (Greek); accept both. 98 if s:ext =~? '\.gr\|\.el' 99 if &enc == "iso-8859-7" 100 let s:ext = ".gr" 101 elseif &enc == "utf-8" 102 let s:ext = ".gr.utf-8" 103 elseif &enc =~ 737 104 let s:ext = ".gr.cp737" 105 endif 99 106 endif 100 107 101 108 " The Slovak tutor is available in two encodings, guess which one to use … … 103 110 let s:ext = ".sk.cp1250" 104 111 endif 105 112 106 " The Russian tutor is available in two encodings, guess which one to use. 107 " This segment is from the above lines and modified by 108 " Alexey I. Froloff <raorn@altlinux.org> for Russian vim tutorial 109 if s:ext =~? '\.ru' && &enc =~ 1251 110 let s:ext = ".ru.cp1251" 113 " The Russian tutor is available in three encodings, guess which one to use. 114 if s:ext =~? '\.ru' 115 if &enc == 'utf-8' 116 let s:ext = '.ru.utf-8' 117 elseif &enc =~ '1251' 118 let s:ext = '.ru.cp1251' 119 elseif &enc =~ 'koi8' 120 let s:ext = '.ru' 121 endif 111 122 endif 112 123 113 124 " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch). -
src/auto/configure
diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure
old new 4014 4014 LDFLAGS=$ldflags_save 4015 4015 if test $perl_ok = yes; then 4016 4016 if test "X$perlcppflags" != "X"; then 4017 PERL_CFLAGS="$perlcppflags"4017 PERL_CFLAGS=`echo "$perlcppflags" | sed 's/-pipe //'` 4018 4018 fi 4019 4019 if test "X$perlldflags" != "X"; then 4020 4020 LDFLAGS="$perlldflags $LDFLAGS" -
src/buffer.c
diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c
old new 434 434 if (usingNetbeans) 435 435 netbeans_file_closed(buf); 436 436 #endif 437 #ifdef FEAT_AUTOCHDIR 438 /* Change directories when the acd option is set on. */ 439 if (p_acd && curbuf->b_ffname != NULL 440 && vim_chdirfile(curbuf->b_ffname) == OK) 441 shorten_fnames(TRUE); 442 #endif 437 /* Change directories when the 'acd' option is set. */ 438 DO_AUTOCHDIR 443 439 444 440 /* 445 441 * Remove the buffer from the list. … … 1390 1386 } 1391 1387 else 1392 1388 { 1393 need_fileinfo = TRUE; /* display file info after redraw */ 1389 if (!msg_silent) 1390 need_fileinfo = TRUE; /* display file info after redraw */ 1394 1391 (void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */ 1395 1392 #ifdef FEAT_AUTOCMD 1396 1393 curwin->w_topline = 1; … … 1422 1419 netbeans_file_activated(curbuf); 1423 1420 #endif 1424 1421 1425 #ifdef FEAT_AUTOCHDIR 1426 /* Change directories when the acd option is set on. */ 1427 if (p_acd && curbuf->b_ffname != NULL 1428 && vim_chdirfile(curbuf->b_ffname) == OK) 1429 shorten_fnames(TRUE); 1430 #endif 1422 /* Change directories when the 'acd' option is set. */ 1423 DO_AUTOCHDIR 1431 1424 1432 1425 #ifdef FEAT_KEYMAP 1433 1426 if (curbuf->b_kmap_state & KEYMAP_INIT) … … 1436 1429 redraw_later(NOT_VALID); 1437 1430 } 1438 1431 1432 #if defined(FEAT_AUTOCHDIR) || defined(PROTO) 1433 /* 1434 * Change to the directory of the current buffer. 1435 */ 1436 void 1437 do_autochdir() 1438 { 1439 if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK) 1440 shorten_fnames(TRUE); 1441 } 1442 #endif 1443 1439 1444 /* 1440 1445 * functions for dealing with the buffer list 1441 1446 */ … … 3324 3329 { 3325 3330 usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox); 3326 3331 if (usefmt == NULL) 3327 usefmt = (char_u *)"";3332 usefmt = fmt; 3328 3333 } 3329 3334 #endif 3330 3335 … … 5420 5425 buf_T *newbuf; 5421 5426 int differ = TRUE; 5422 5427 linenr_T lnum; 5423 #ifdef FEAT_AUTOCMD5424 5428 aco_save_T aco; 5425 #else5426 buf_T *old_curbuf = curbuf;5427 #endif5428 5429 exarg_T ea; 5429 5430 5430 5431 /* Allocate a buffer without putting it in the buffer list. */ … … 5439 5440 return TRUE; 5440 5441 } 5441 5442 5442 #ifdef FEAT_AUTOCMD5443 5443 /* set curwin/curbuf to buf and save a few things */ 5444 5444 aucmd_prepbuf(&aco, newbuf); 5445 #else5446 curbuf = newbuf;5447 curwin->w_buffer = newbuf;5448 #endif5449 5445 5450 5446 if (ml_open(curbuf) == OK 5451 5447 && readfile(buf->b_ffname, buf->b_fname, … … 5466 5462 } 5467 5463 vim_free(ea.cmd); 5468 5464 5469 #ifdef FEAT_AUTOCMD5470 5465 /* restore curwin/curbuf and a few other things */ 5471 5466 aucmd_restbuf(&aco); 5472 #else5473 curbuf = old_curbuf;5474 curwin->w_buffer = old_curbuf;5475 #endif5476 5467 5477 5468 if (curbuf != newbuf) /* safety check */ 5478 5469 wipe_buffer(newbuf, FALSE); -
src/configure
diff -Naur vim70.orig/src/configure vim70/src/configure
old new 2 2 # run the automatically generated configure script 3 3 CONFIG_STATUS=auto/config.status \ 4 4 auto/configure "$@" --srcdir="${srcdir:-.}" --cache-file=auto/config.cache 5 result=$? 6 5 7 # Stupid autoconf 2.5x causes this file to be left behind. 6 8 if test -f configure.lineno; then rm -f configure.lineno; fi 9 10 exit $result -
src/configure.in
diff -Naur vim70.orig/src/configure.in vim70/src/configure.in
old new 508 508 LDFLAGS=$ldflags_save 509 509 if test $perl_ok = yes; then 510 510 if test "X$perlcppflags" != "X"; then 511 PERL_CFLAGS="$perlcppflags" 511 dnl remove -pipe, it confuses cproto 512 PERL_CFLAGS=`echo "$perlcppflags" | sed 's/-pipe //'` 512 513 fi 513 514 if test "X$perlldflags" != "X"; then 514 515 LDFLAGS="$perlldflags $LDFLAGS" -
src/edit.c
diff -Naur vim70.orig/src/edit.c vim70/src/edit.c
old new 129 129 130 130 static void ins_ctrl_x __ARGS((void)); 131 131 static int has_compl_option __ARGS((int dict_opt)); 132 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));132 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)); 133 133 static int ins_compl_equal __ARGS((compl_T *match, char_u *str, int len)); 134 134 static void ins_compl_longest_match __ARGS((compl_T *match)); 135 135 static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase)); … … 707 707 lastc = c; /* remember previous char for CTRL-D */ 708 708 c = safe_vgetc(); 709 709 710 #ifdef FEAT_AUTOCMD 711 /* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */ 712 did_cursorhold = TRUE; 713 #endif 714 710 715 #ifdef FEAT_RIGHTLEFT 711 716 if (p_hkmap && KeyTyped) 712 717 c = hkmap(c); /* Hebrew mode mapping */ … … 719 724 #ifdef FEAT_INS_EXPAND 720 725 /* 721 726 * Special handling of keys while the popup menu is visible or wanted 722 * and the cursor is still in the completed word. 727 * and the cursor is still in the completed word. Only when there is 728 * a match, skip this when no matches were found. 723 729 */ 724 if (compl_started && pum_wanted() && curwin->w_cursor.col >= compl_col) 730 if (compl_started 731 && pum_wanted() 732 && curwin->w_cursor.col >= compl_col 733 && (compl_shown_match == NULL 734 || compl_shown_match != compl_shown_match->cp_next)) 725 735 { 726 736 /* BS: Delete one character from "compl_leader". */ 727 737 if ((c == K_BS || c == Ctrl_H) … … 751 761 continue; 752 762 } 753 763 754 /* Pressing CTRL-Y selects the current match. Shen764 /* Pressing CTRL-Y selects the current match. When 755 765 * compl_enter_selects is set the Enter key does the same. */ 756 766 if (c == Ctrl_Y || (compl_enter_selects 757 767 && (c == CAR || c == K_KENTER || c == NL))) … … 877 887 /* Close the cmdline window. */ 878 888 cmdwin_result = K_IGNORE; 879 889 got_int = FALSE; /* don't stop executing autocommands et al. */ 890 nomove = TRUE; 880 891 goto doESCkey; 881 892 } 882 893 #endif … … 1383 1394 break; 1384 1395 } /* end of switch (c) */ 1385 1396 1397 #ifdef FEAT_AUTOCMD 1398 /* If typed something may trigger CursorHoldI again. */ 1399 if (c != K_CURSORHOLD) 1400 did_cursorhold = FALSE; 1401 #endif 1402 1386 1403 /* If the cursor was moved we didn't just insert a space */ 1387 1404 if (arrow_used) 1388 1405 inserted_space = FALSE; … … 2112 2129 * maybe because alloc() returns NULL, then FAIL is returned. 2113 2130 */ 2114 2131 static int 2115 ins_compl_add(str, len, icase, fname, cptext, cdir, flags, dup)2132 ins_compl_add(str, len, icase, fname, cptext, cdir, flags, adup) 2116 2133 char_u *str; 2117 2134 int len; 2118 2135 int icase; … … 2120 2137 char_u **cptext; /* extra text for popup menu or NULL */ 2121 2138 int cdir; 2122 2139 int flags; 2123 int dup; /* accept duplicate match */2140 int adup; /* accept duplicate match */ 2124 2141 { 2125 2142 compl_T *match; 2126 2143 int dir = (cdir == 0 ? compl_direction : cdir); … … 2134 2151 /* 2135 2152 * If the same match is already present, don't add it. 2136 2153 */ 2137 if (compl_first_match != NULL && ! dup)2154 if (compl_first_match != NULL && !adup) 2138 2155 { 2139 2156 match = compl_first_match; 2140 2157 do … … 2399 2416 /* compl_pattern doesn't need to be set */ 2400 2417 compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length); 2401 2418 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, 2402 -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)2419 -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) 2403 2420 return; 2404 2421 2405 2422 /* Handle like dictionary completion. */ … … 2409 2426 compl_matches = ins_compl_make_cyclic(); 2410 2427 compl_started = TRUE; 2411 2428 compl_used_match = TRUE; 2429 compl_cont_status = 0; 2412 2430 2413 2431 compl_curr_match = compl_first_match; 2414 2432 ins_complete(Ctrl_N); … … 2753 2771 } 2754 2772 else 2755 2773 # endif 2774 if (count > 0) /* avoid warning for using "files" uninit */ 2756 2775 { 2757 2776 ins_compl_files(count, files, thesaurus, flags, 2758 2777 ®match, buf, &dir); … … 2813 2832 ptr = find_word_end(ptr); 2814 2833 add_r = ins_compl_add_infercase(regmatch->startp[0], 2815 2834 (int)(ptr - regmatch->startp[0]), 2816 FALSE, files[i], *dir, 0);2835 p_ic, files[i], *dir, 0); 2817 2836 if (thesaurus) 2818 2837 { 2819 2838 char_u *wstart; … … 2849 2868 ptr = find_word_end(ptr); 2850 2869 add_r = ins_compl_add_infercase(wstart, 2851 2870 (int)(ptr - wstart), 2852 FALSE, files[i], *dir, 0);2871 p_ic, files[i], *dir, 0); 2853 2872 } 2854 2873 } 2855 2874 if (add_r == OK) … … 3015 3034 if ((int)(p - line) - (int)compl_col <= 0) 3016 3035 return K_BS; 3017 3036 3018 /* For redo we need to repeat this backspace. */3019 AppendCharToRedobuff(K_BS);3020 3021 3037 /* Deleted more than what was used to find matches or didn't finish 3022 3038 * finding all matches: need to look for matches all over again. */ 3023 3039 if (curwin->w_cursor.col <= compl_col + compl_length … … 3046 3062 ins_compl_delete(); 3047 3063 ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); 3048 3064 compl_used_match = FALSE; 3049 compl_enter_selects = FALSE;3050 3065 3051 3066 if (compl_started) 3052 3067 ins_compl_set_original_text(compl_leader); … … 3076 3091 compl_restarting = FALSE; 3077 3092 } 3078 3093 3094 #if 0 /* disabled, made CTRL-L, BS and typing char jump to original text. */ 3079 3095 if (!compl_used_match) 3080 3096 { 3081 3097 /* Go to the original text, since none of the matches is inserted. */ … … 3087 3103 compl_curr_match = compl_shown_match; 3088 3104 compl_shows_dir = compl_direction; 3089 3105 } 3106 #endif 3107 compl_enter_selects = !compl_used_match; 3090 3108 3091 3109 /* Show the popup menu with a different set of matches. */ 3092 3110 ins_compl_show_pum(); 3111 3112 /* Don't let Enter select the original text when there is no popup menu. */ 3113 if (compl_match_array == NULL) 3114 compl_enter_selects = FALSE; 3093 3115 } 3094 3116 3095 3117 /* … … 3115 3137 #endif 3116 3138 ins_char(c); 3117 3139 3118 /* For redo we need to count this character so that the number of3119 * backspaces is correct. */3120 AppendCharToRedobuff(c);3121 3122 3140 /* If we didn't complete finding matches we must search again. */ 3123 3141 if (compl_was_interrupted) 3124 3142 ins_compl_restart(); … … 3175 3193 char_u *p; 3176 3194 int len = curwin->w_cursor.col - compl_col; 3177 3195 int c; 3196 compl_T *cp; 3178 3197 3179 3198 p = compl_shown_match->cp_str; 3180 3199 if ((int)STRLEN(p) <= len) /* the match is too short */ 3181 return; 3200 { 3201 /* When still at the original match use the first entry that matches 3202 * the leader. */ 3203 if (compl_shown_match->cp_flags & ORIGINAL_TEXT) 3204 { 3205 p = NULL; 3206 for (cp = compl_shown_match->cp_next; cp != NULL 3207 && cp != compl_first_match; cp = cp->cp_next) 3208 { 3209 if (ins_compl_equal(cp, compl_leader, 3210 (int)STRLEN(compl_leader))) 3211 { 3212 p = cp->cp_str; 3213 break; 3214 } 3215 } 3216 if (p == NULL || (int)STRLEN(p) <= len) 3217 return; 3218 } 3219 else 3220 return; 3221 } 3182 3222 p += len; 3183 3223 #ifdef FEAT_MBYTE 3184 3224 c = mb_ptr2char(p); … … 3198 3238 int c; 3199 3239 { 3200 3240 char_u *ptr; 3201 int temp;3202 3241 int want_cindent; 3203 3242 int retval = FALSE; 3204 3243 … … 3354 3393 if (compl_curr_match != NULL || compl_leader != NULL || c == Ctrl_E) 3355 3394 { 3356 3395 char_u *p; 3396 int temp = 0; 3357 3397 3358 3398 /* 3359 3399 * If any of the original typed text has been changed, eg when … … 3369 3409 ptr = compl_leader; 3370 3410 else 3371 3411 ptr = compl_orig_text; 3372 p = compl_orig_text; 3373 for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp]; ++temp) 3374 ; 3412 if (compl_orig_text != NULL) 3413 { 3414 p = compl_orig_text; 3415 for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp]; 3416 ++temp) 3417 ; 3375 3418 #ifdef FEAT_MBYTE 3376 if (temp > 0)3377 3419 if (temp > 0) 3420 temp -= (*mb_head_off)(compl_orig_text, p + temp); 3378 3421 #endif 3379 for (p += temp; *p != NUL; mb_ptr_adv(p)) 3380 AppendCharToRedobuff(K_BS); 3381 AppendToRedobuffLit(ptr + temp, -1); 3422 for (p += temp; *p != NUL; mb_ptr_adv(p)) 3423 AppendCharToRedobuff(K_BS); 3424 } 3425 if (ptr != NULL) 3426 AppendToRedobuffLit(ptr + temp, -1); 3382 3427 } 3383 3428 3384 3429 #ifdef FEAT_CINDENT … … 3578 3623 { 3579 3624 char_u *word; 3580 3625 int icase = FALSE; 3581 int dup = FALSE;3626 int adup = FALSE; 3582 3627 char_u *(cptext[CPT_COUNT]); 3583 3628 3584 3629 if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) … … 3595 3640 if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL) 3596 3641 icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase"); 3597 3642 if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL) 3598 dup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");3643 adup = get_dict_number(tv->vval.v_dict, (char_u *)"dup"); 3599 3644 } 3600 3645 else 3601 3646 { … … 3604 3649 } 3605 3650 if (word == NULL || *word == NUL) 3606 3651 return FAIL; 3607 return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, dup);3652 return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, adup); 3608 3653 } 3609 3654 #endif 3610 3655 … … 3796 3841 TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0), 3797 3842 TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0) 3798 3843 { 3799 ins_compl_add_matches(num_matches, matches, FALSE);3844 ins_compl_add_matches(num_matches, matches, p_ic); 3800 3845 } 3801 3846 p_ic = save_p_ic; 3802 3847 break; … … 3837 3882 num_matches = expand_spelling(first_match_pos.lnum, 3838 3883 first_match_pos.col, compl_pattern, &matches); 3839 3884 if (num_matches > 0) 3840 ins_compl_add_matches(num_matches, matches, FALSE);3885 ins_compl_add_matches(num_matches, matches, p_ic); 3841 3886 #endif 3842 3887 break; 3843 3888 … … 3971 4016 continue; 3972 4017 } 3973 4018 } 3974 if (ins_compl_add_infercase(ptr, len, FALSE,4019 if (ins_compl_add_infercase(ptr, len, p_ic, 3975 4020 ins_buf == curbuf ? NULL : ins_buf->b_sfname, 3976 4021 0, flags) != NOTDONE) 3977 4022 { … … 4100 4145 && compl_shown_match->cp_next != NULL 4101 4146 && compl_shown_match->cp_next != compl_first_match) 4102 4147 compl_shown_match = compl_shown_match->cp_next; 4148 4149 /* If we didn't find it searching forward, and compl_shows_dir is 4150 * backward, find the last match. */ 4151 if (compl_shows_dir == BACKWARD 4152 && !ins_compl_equal(compl_shown_match, 4153 compl_leader, (int)STRLEN(compl_leader)) 4154 && (compl_shown_match->cp_next == NULL 4155 || compl_shown_match->cp_next == compl_first_match)) 4156 { 4157 while (!ins_compl_equal(compl_shown_match, 4158 compl_leader, (int)STRLEN(compl_leader)) 4159 && compl_shown_match->cp_prev != NULL 4160 && compl_shown_match->cp_prev != compl_first_match) 4161 compl_shown_match = compl_shown_match->cp_prev; 4162 } 4103 4163 } 4104 4164 4105 4165 if (allow_get_expansion && insert_match … … 4124 4184 { 4125 4185 if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL) 4126 4186 { 4127 if (compl_pending != 0)4128 --compl_pending;4129 4187 compl_shown_match = compl_shown_match->cp_next; 4130 4188 found_end = (compl_first_match != NULL 4131 4189 && (compl_shown_match->cp_next == compl_first_match … … 4134 4192 else if (compl_shows_dir == BACKWARD 4135 4193 && compl_shown_match->cp_prev != NULL) 4136 4194 { 4137 if (compl_pending != 0)4138 ++compl_pending;4139 4195 found_end = (compl_shown_match == compl_first_match); 4140 4196 compl_shown_match = compl_shown_match->cp_prev; 4141 4197 found_end |= (compl_shown_match == compl_first_match); 4142 4198 } 4143 4199 else 4144 4200 { 4201 if (!allow_get_expansion) 4202 { 4203 if (advance) 4204 { 4205 if (compl_shows_dir == BACKWARD) 4206 compl_pending -= todo + 1; 4207 else 4208 compl_pending += todo + 1; 4209 } 4210 return -1; 4211 } 4212 4145 4213 if (advance) 4146 4214 { 4147 4215 if (compl_shows_dir == BACKWARD) … … 4149 4217 else 4150 4218 ++compl_pending; 4151 4219 } 4152 if (!allow_get_expansion)4153 return -1;4154 4220 4155 4221 /* Find matches. */ 4156 4222 num_matches = ins_compl_get_exp(&compl_startpos); 4157 if (compl_pending != 0 && compl_direction == compl_shows_dir 4223 4224 /* handle any pending completions */ 4225 while (compl_pending != 0 && compl_direction == compl_shows_dir 4158 4226 && advance) 4159 compl_shown_match = compl_curr_match; 4227 { 4228 if (compl_pending > 0 && compl_shown_match->cp_next != NULL) 4229 { 4230 compl_shown_match = compl_shown_match->cp_next; 4231 --compl_pending; 4232 } 4233 if (compl_pending < 0 && compl_shown_match->cp_prev != NULL) 4234 { 4235 compl_shown_match = compl_shown_match->cp_prev; 4236 ++compl_pending; 4237 } 4238 else 4239 break; 4240 } 4160 4241 found_end = FALSE; 4161 4242 } 4162 4243 if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0 … … 4265 4346 return; 4266 4347 count = 0; 4267 4348 4268 ++no_mapping; 4349 /* Check for a typed key. Do use mappings, otherwise vim_is_ctrl_x_key() 4350 * can't do its work correctly. */ 4269 4351 c = vpeekc_any(); 4270 --no_mapping;4271 4352 if (c != NUL) 4272 4353 { 4273 4354 if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R) … … 4277 4358 (void)ins_compl_next(FALSE, ins_compl_key2count(c), 4278 4359 c != K_UP && c != K_DOWN); 4279 4360 } 4280 else if (c != Ctrl_R) 4281 compl_interrupted = TRUE; 4361 else 4362 { 4363 /* Need to get the character to have KeyTyped set. We'll put it 4364 * back with vungetc() below. */ 4365 c = safe_vgetc(); 4366 4367 /* Don't interrupt completion when the character wasn't typed, 4368 * e.g., when doing @q to replay keys. */ 4369 if (c != Ctrl_R && KeyTyped) 4370 compl_interrupted = TRUE; 4371 4372 vungetc(c); 4373 } 4282 4374 } 4283 4375 if (compl_pending != 0 && !got_int) 4284 (void)ins_compl_next(FALSE, compl_pending > 0 4285 ? compl_pending : -compl_pending, TRUE); 4376 { 4377 int todo = compl_pending > 0 ? compl_pending : -compl_pending; 4378 4379 compl_pending = 0; 4380 (void)ins_compl_next(FALSE, todo, TRUE); 4381 } 4286 4382 } 4287 4383 4288 4384 /* … … 4611 4707 (int)STRLEN(compl_pattern), curs_col); 4612 4708 if (compl_xp.xp_context == EXPAND_UNSUCCESSFUL 4613 4709 || compl_xp.xp_context == EXPAND_NOTHING) 4614 return FAIL; 4615 startcol = (int)(compl_xp.xp_pattern - compl_pattern); 4616 compl_col = startcol; 4617 compl_length = curs_col - startcol; 4710 /* No completion possible, use an empty pattern to get a 4711 * "pattern not found" message. */ 4712 compl_col = curs_col; 4713 else 4714 compl_col = (int)(compl_xp.xp_pattern - compl_pattern); 4715 compl_length = curs_col - compl_col; 4618 4716 } 4619 4717 else if (ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI) 4620 4718 { … … 4668 4766 else 4669 4767 compl_col = spell_word_start(startcol); 4670 4768 if (compl_col >= (colnr_T)startcol) 4671 return FAIL; 4672 spell_expand_check_cap(compl_col); 4769 { 4770 compl_length = 0; 4771 compl_col = curs_col; 4772 } 4773 else 4774 { 4775 spell_expand_check_cap(compl_col); 4776 compl_length = (int)curs_col - compl_col; 4777 } 4673 4778 /* Need to obtain "line" again, it may have become invalid. */ 4674 4779 line = ml_get(curwin->w_cursor.lnum); 4675 compl_length = (int)curs_col - compl_col;4676 4780 compl_pattern = vim_strnsave(line + compl_col, compl_length); 4677 4781 if (compl_pattern == NULL) 4678 4782 #endif … … 4720 4824 vim_free(compl_orig_text); 4721 4825 compl_orig_text = vim_strnsave(line + compl_col, compl_length); 4722 4826 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, 4723 -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)4827 -1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK) 4724 4828 { 4725 4829 vim_free(compl_pattern); 4726 4830 compl_pattern = NULL; … … 8508 8612 tpos = curwin->w_cursor; 8509 8613 if (oneleft() == OK) 8510 8614 { 8511 start_arrow(&tpos); 8615 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) 8616 /* Only call start_arrow() when not busy with preediting, it will 8617 * break undo. K_LEFT is inserted in im_correct_cursor(). */ 8618 if (!im_is_preediting()) 8619 #endif 8620 start_arrow(&tpos); 8512 8621 #ifdef FEAT_RIGHTLEFT 8513 8622 /* If exit reversed string, position is fixed */ 8514 8623 if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol) -
src/eval.c
diff -Naur vim70.orig/src/eval.c vim70/src/eval.c
old new 454 454 static char_u *deref_func_name __ARGS((char_u *name, int *lenp)); 455 455 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)); 456 456 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)); 457 static void emsg_funcname __ARGS((char * msg, char_u *name));457 static void emsg_funcname __ARGS((char *ermsg, char_u *name)); 458 458 459 459 static void f_add __ARGS((typval_T *argvars, typval_T *rettv)); 460 460 static void f_append __ARGS((typval_T *argvars, typval_T *rettv)); … … 701 701 static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string)); 702 702 static void set_var __ARGS((char_u *name, typval_T *varp, int copy)); 703 703 static int var_check_ro __ARGS((int flags, char_u *name)); 704 static int var_check_fixed __ARGS((int flags, char_u *name)); 704 705 static int tv_check_lock __ARGS((int lock, char_u *name)); 705 706 static void copy_tv __ARGS((typval_T *from, typval_T *to)); 706 707 static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID)); … … 2260 2261 EMSG(_(e_letunexp)); 2261 2262 else 2262 2263 { 2263 char_u * tofree = NULL;2264 char_u *ptofree = NULL; 2264 2265 char_u *s; 2265 2266 2266 2267 p = get_tv_string_chk(tv); … … 2269 2270 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE); 2270 2271 if (s != NULL) 2271 2272 { 2272 p = tofree = concat_str(s, p);2273 p = ptofree = concat_str(s, p); 2273 2274 vim_free(s); 2274 2275 } 2275 2276 } … … 2278 2279 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE); 2279 2280 arg_end = arg + 1; 2280 2281 } 2281 vim_free( tofree);2282 vim_free(ptofree); 2282 2283 } 2283 2284 } 2284 2285 … … 3364 3365 hi = hash_find(ht, varname); 3365 3366 if (!HASHITEM_EMPTY(hi)) 3366 3367 { 3368 if (var_check_fixed(HI2DI(hi)->di_flags, name)) 3369 return FAIL; 3367 3370 if (var_check_ro(HI2DI(hi)->di_flags, name)) 3368 3371 return FAIL; 3369 3372 delete_var(ht, hi); … … 6059 6062 tabpage_T *tp; 6060 6063 #endif 6061 6064 6065 /* Only do this once. */ 6066 want_garbage_collect = FALSE; 6067 may_garbage_collect = FALSE; 6068 6062 6069 /* 6063 6070 * 1. Go through all accessible variables and mark all lists and dicts 6064 6071 * with copyID. … … 7595 7602 * Give an error message with a function name. Handle <SNR> things. 7596 7603 */ 7597 7604 static void 7598 emsg_funcname( msg, name)7599 char * msg;7605 emsg_funcname(ermsg, name) 7606 char *ermsg; 7600 7607 char_u *name; 7601 7608 { 7602 7609 char_u *p; … … 7605 7612 p = concat_str((char_u *)"<SNR>", name + 3); 7606 7613 else 7607 7614 p = name; 7608 EMSG2(_( msg), p);7615 EMSG2(_(ermsg), p); 7609 7616 if (p != name) 7610 7617 vim_free(p); 7611 7618 } … … 8252 8259 EMSG(_("E785: complete() can only be used in Insert mode")); 8253 8260 return; 8254 8261 } 8262 8263 /* Check for undo allowed here, because if something was already inserted 8264 * the line was already saved for undo and this check isn't done. */ 8265 if (!undo_allowed()) 8266 return; 8267 8255 8268 if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL) 8256 8269 { 8257 8270 EMSG(_(e_invarg)); … … 9173 9186 typval_T save_key; 9174 9187 int rem; 9175 9188 int todo; 9176 char_u * msg = map ? (char_u *)"map()" : (char_u *)"filter()";9189 char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()"; 9177 9190 int save_did_emsg; 9178 9191 9179 9192 rettv->vval.v_number = 0; 9180 9193 if (argvars[0].v_type == VAR_LIST) 9181 9194 { 9182 9195 if ((l = argvars[0].vval.v_list) == NULL 9183 || (map && tv_check_lock(l->lv_lock, msg)))9196 || (map && tv_check_lock(l->lv_lock, ermsg))) 9184 9197 return; 9185 9198 } 9186 9199 else if (argvars[0].v_type == VAR_DICT) 9187 9200 { 9188 9201 if ((d = argvars[0].vval.v_dict) == NULL 9189 || (map && tv_check_lock(d->dv_lock, msg)))9202 || (map && tv_check_lock(d->dv_lock, ermsg))) 9190 9203 return; 9191 9204 } 9192 9205 else 9193 9206 { 9194 EMSG2(_(e_listdictarg), msg);9207 EMSG2(_(e_listdictarg), ermsg); 9195 9208 return; 9196 9209 } 9197 9210 … … 9223 9236 { 9224 9237 --todo; 9225 9238 di = HI2DI(hi); 9226 if (tv_check_lock(di->di_tv.v_lock, msg))9239 if (tv_check_lock(di->di_tv.v_lock, ermsg)) 9227 9240 break; 9228 9241 vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); 9229 9242 if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL … … 9242 9255 { 9243 9256 for (li = l->lv_first; li != NULL; li = nli) 9244 9257 { 9245 if (tv_check_lock(li->li_tv.v_lock, msg))9258 if (tv_check_lock(li->li_tv.v_lock, ermsg)) 9246 9259 break; 9247 9260 nli = li->li_next; 9248 9261 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL … … 9598 9611 typval_T *argvars; 9599 9612 typval_T *rettv; 9600 9613 { 9601 garbage_collect(); 9614 /* This is postponed until we are back at the toplevel, because we may be 9615 * using Lists and Dicts internally. E.g.: ":echo [garbagecollect()]". */ 9616 want_garbage_collect = TRUE; 9602 9617 } 9603 9618 9604 9619 /* … … 9792 9807 varnumber_T n; 9793 9808 int error = FALSE; 9794 9809 9810 /* Position the cursor. Needed after a message that ends in a space. */ 9811 windgoto(msg_row, msg_col); 9812 9795 9813 ++no_mapping; 9796 9814 ++allow_keys; 9797 9815 if (argvars[0].v_type == VAR_UNKNOWN) … … 11312 11330 11313 11331 static int inputsecret_flag = 0; 11314 11332 11333 static void get_user_input __ARGS((typval_T *argvars, typval_T *rettv, int inputdialog)); 11334 11315 11335 /* 11316 * "input()" function 11317 * Also handles inputsecret() when inputsecret is set. 11336 * This function is used by f_input() and f_inputdialog() functions. The third 11337 * argument to f_input() specifies the type of completion to use at the 11338 * prompt. The third argument to f_inputdialog() specifies the value to return 11339 * when the user cancels the prompt. 11318 11340 */ 11319 11341 static void 11320 f_input(argvars, rettv)11342 get_user_input(argvars, rettv, inputdialog) 11321 11343 typval_T *argvars; 11322 11344 typval_T *rettv; 11345 int inputdialog; 11323 11346 { 11324 11347 char_u *prompt = get_tv_string_chk(&argvars[0]); 11325 11348 char_u *p = NULL; … … 11369 11392 if (defstr != NULL) 11370 11393 stuffReadbuffSpec(defstr); 11371 11394 11372 if ( argvars[2].v_type != VAR_UNKNOWN)11395 if (!inputdialog && argvars[2].v_type != VAR_UNKNOWN) 11373 11396 { 11374 11397 char_u *xp_name; 11375 int 11398 int xp_namelen; 11376 11399 long argt; 11377 11400 11378 11401 rettv->vval.v_string = NULL; … … 11404 11427 } 11405 11428 11406 11429 /* 11430 * "input()" function 11431 * Also handles inputsecret() when inputsecret is set. 11432 */ 11433 static void 11434 f_input(argvars, rettv) 11435 typval_T *argvars; 11436 typval_T *rettv; 11437 { 11438 get_user_input(argvars, rettv, FALSE); 11439 } 11440 11441 /* 11407 11442 * "inputdialog()" function 11408 11443 */ 11409 11444 static void … … 11443 11478 } 11444 11479 else 11445 11480 #endif 11446 f_input(argvars, rettv);11481 get_user_input(argvars, rettv, TRUE); 11447 11482 } 11448 11483 11449 11484 /* … … 11471 11506 } 11472 11507 11473 11508 msg_start(); 11509 msg_row = Rows - 1; /* for when 'cmdheight' > 1 */ 11474 11510 lines_left = Rows; /* avoid more prompt */ 11475 11511 msg_scroll = TRUE; 11476 11512 msg_clr_eos(); … … 13250 13286 if (argvars[2].v_type != VAR_UNKNOWN) 13251 13287 EMSG2(_(e_toomanyarg), "remove()"); 13252 13288 else if ((d = argvars[0].vval.v_dict) != NULL 13253 && !tv_check_lock(d->dv_lock, (char_u *)"remove() "))13289 && !tv_check_lock(d->dv_lock, (char_u *)"remove() argument")) 13254 13290 { 13255 13291 key = get_tv_string_chk(&argvars[1]); 13256 13292 if (key != NULL) … … 13270 13306 else if (argvars[0].v_type != VAR_LIST) 13271 13307 EMSG2(_(e_listdictarg), "remove()"); 13272 13308 else if ((l = argvars[0].vval.v_list) != NULL 13273 && !tv_check_lock(l->lv_lock, (char_u *)"remove() "))13309 && !tv_check_lock(l->lv_lock, (char_u *)"remove() argument")) 13274 13310 { 13275 13311 int error = FALSE; 13276 13312 … … 14157 14193 typval_T *rettv; 14158 14194 { 14159 14195 buf_T *buf; 14160 #ifdef FEAT_AUTOCMD14161 14196 aco_save_T aco; 14162 #else14163 buf_T *save_curbuf;14164 #endif14165 14197 char_u *varname, *bufvarname; 14166 14198 typval_T *varp; 14167 14199 char_u nbuf[NUMBUFLEN]; … … 14178 14210 if (buf != NULL && varname != NULL && varp != NULL) 14179 14211 { 14180 14212 /* set curbuf to be our buf, temporarily */ 14181 #ifdef FEAT_AUTOCMD14182 14213 aucmd_prepbuf(&aco, buf); 14183 #else14184 save_curbuf = curbuf;14185 curbuf = buf;14186 #endif14187 14214 14188 14215 if (*varname == '&') 14189 14216 { … … 14210 14237 } 14211 14238 14212 14239 /* reset notion of buffer */ 14213 #ifdef FEAT_AUTOCMD14214 14240 aucmd_restbuf(&aco); 14215 #else14216 curbuf = save_curbuf;14217 #endif14218 14241 } 14219 14242 } 14220 14243 … … 16173 16196 curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); 16174 16197 curwin->w_set_curswant = FALSE; 16175 16198 16176 curwin->w_topline = get_dict_number(dict, (char_u *)"topline");16199 set_topline(curwin, get_dict_number(dict, (char_u *)"topline")); 16177 16200 #ifdef FEAT_DIFF 16178 16201 curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); 16179 16202 #endif … … 16218 16241 #ifdef FEAT_VIRTUALEDIT 16219 16242 dict_add_nr_str(dict, "coladd", (long)curwin->w_cursor.coladd, NULL); 16220 16243 #endif 16244 update_curswant(); 16221 16245 dict_add_nr_str(dict, "curswant", (long)curwin->w_curswant, NULL); 16222 16246 16223 16247 dict_add_nr_str(dict, "topline", (long)curwin->w_topline, NULL); … … 16438 16462 long i = 0; 16439 16463 long n; 16440 16464 16441 /* List must be: [fnum, lnum, col, coladd] */ 16442 if (arg->v_type != VAR_LIST || l == NULL 16443 || l->lv_len != (fnump == NULL ? 3 : 4)) 16465 /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there 16466 * when "fnump" isn't NULL and "coladd" is optional. */ 16467 if (arg->v_type != VAR_LIST 16468 || l == NULL 16469 || l->lv_len < (fnump == NULL ? 2 : 3) 16470 || l->lv_len > (fnump == NULL ? 3 : 4)) 16444 16471 return FAIL; 16445 16472 16446 16473 if (fnump != NULL) … … 16466 16493 #ifdef FEAT_VIRTUALEDIT 16467 16494 n = list_find_nr(l, i, NULL); 16468 16495 if (n < 0) 16469 return FAIL; 16470 posp->coladd = n; 16496 posp->coladd = 0; 16497 else 16498 posp->coladd = n; 16471 16499 #endif 16472 16500 16473 16501 return OK; … … 17759 17787 } 17760 17788 else /* add a new variable */ 17761 17789 { 17790 /* Can't add "v:" variable. */ 17791 if (ht == &vimvarht) 17792 { 17793 EMSG2(_(e_illvar), name); 17794 return; 17795 } 17796 17762 17797 /* Make sure the variable name is valid. */ 17763 17798 for (p = varname; *p != NUL; ++p) 17764 17799 if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) … … 17792 17827 } 17793 17828 17794 17829 /* 17795 * Return TRUE if di_flags "flags" indicate read-only variable "name".17830 * Return TRUE if di_flags "flags" indicates variable "name" is read-only. 17796 17831 * Also give an error message. 17797 17832 */ 17798 17833 static int … … 17814 17849 } 17815 17850 17816 17851 /* 17852 * Return TRUE if di_flags "flags" indicates variable "name" is fixed. 17853 * Also give an error message. 17854 */ 17855 static int 17856 var_check_fixed(flags, name) 17857 int flags; 17858 char_u *name; 17859 { 17860 if (flags & DI_FLAGS_FIX) 17861 { 17862 EMSG2(_("E795: Cannot delete variable %s"), name); 17863 return TRUE; 17864 } 17865 return FALSE; 17866 } 17867 17868 /* 17817 17869 * Return TRUE if typeval "tv" is set to be locked (immutable). 17818 17870 * Also give an error message, using "name". 17819 17871 */ … … 18786 18838 if (dict_add(fudi.fd_dict, fudi.fd_di) == FAIL) 18787 18839 { 18788 18840 vim_free(fudi.fd_di); 18841 vim_free(fp); 18789 18842 goto erret; 18790 18843 } 18791 18844 } … … 18963 19016 else if (lead > 0) 18964 19017 { 18965 19018 lead = 3; 18966 if (eval_fname_sid(lv.ll_exp_name != NULL ? lv.ll_exp_name : *pp)) 19019 if ((lv.ll_exp_name != NULL && eval_fname_sid(lv.ll_exp_name)) 19020 || eval_fname_sid(*pp)) 18967 19021 { 18968 19022 /* It's "s:" or "<SID>" */ 18969 19023 if (current_SID <= 0) … … 19685 19739 v->di_tv.vval.v_list = &fc.l_varlist; 19686 19740 vim_memset(&fc.l_varlist, 0, sizeof(list_T)); 19687 19741 fc.l_varlist.lv_refcount = 99999; 19742 fc.l_varlist.lv_lock = VAR_FIXED; 19688 19743 19689 19744 /* 19690 19745 * Set a:firstline to "firstline" and a:lastline to "lastline". … … 19761 19816 if (p_verbose >= 14) 19762 19817 { 19763 19818 char_u buf[MSG_BUF_LEN]; 19764 char_u numbuf [NUMBUFLEN];19819 char_u numbuf2[NUMBUFLEN]; 19765 19820 char_u *tofree; 19766 19821 19767 19822 msg_puts((char_u *)"("); … … 19773 19828 msg_outnum((long)argvars[i].vval.v_number); 19774 19829 else 19775 19830 { 19776 trunc_string(tv2string(&argvars[i], &tofree, numbuf, 0),19777 19831 trunc_string(tv2string(&argvars[i], &tofree, 19832 numbuf2, 0), buf, MSG_BUF_CLEN); 19778 19833 msg_puts(buf); 19779 19834 vim_free(tofree); 19780 19835 } … … 19852 19907 else 19853 19908 { 19854 19909 char_u buf[MSG_BUF_LEN]; 19855 char_u numbuf [NUMBUFLEN];19910 char_u numbuf2[NUMBUFLEN]; 19856 19911 char_u *tofree; 19857 19912 19858 19913 /* The value may be very long. Skip the middle part, so that we 19859 19914 * have some idea how it starts and ends. smsg() would always 19860 19915 * truncate it at the end. */ 19861 trunc_string(tv2string(fc.rettv, &tofree, numbuf , 0),19916 trunc_string(tv2string(fc.rettv, &tofree, numbuf2, 0), 19862 19917 buf, MSG_BUF_CLEN); 19863 19918 smsg((char_u *)_("%s returning %s"), sourcing_name, buf); 19864 19919 vim_free(tofree); -
src/ex_cmds2.c
diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c
old new 3648 3648 * Return FALSE when not sourcing a file. 3649 3649 */ 3650 3650 int 3651 source_finished( getline, cookie)3652 char_u *(* getline) __ARGS((int, void *, int));3651 source_finished(fgetline, cookie) 3652 char_u *(*fgetline) __ARGS((int, void *, int)); 3653 3653 void *cookie; 3654 3654 { 3655 return (getline_equal( getline, cookie, getsourceline)3655 return (getline_equal(fgetline, cookie, getsourceline) 3656 3656 && ((struct source_cookie *)getline_cookie( 3657 3657 fgetline, cookie))->finished); 3658 3658 } 3659 3659 #endif 3660 3660 -
src/ex_cmds.c
diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c
old new 95 95 _("<%s>%s%s %d, Hex %02x, Octal %03o"), 96 96 transchar(c), buf1, buf2, c, c, c); 97 97 #ifdef FEAT_MBYTE 98 c = cc[ci++]; 98 if (enc_utf8) 99 c = cc[ci++]; 100 else 101 c = 0; 99 102 #endif 100 103 } 101 104 … … 108 111 if (len > 0) 109 112 IObuff[len++] = ' '; 110 113 IObuff[len++] = '<'; 111 if ( utf_iscomposing(c)114 if (enc_utf8 && utf_iscomposing(c) 112 115 # ifdef USE_GUI 113 116 && !gui.in_use 114 117 # endif … … 120 123 : _("> %d, Hex %08x, Octal %o"), c, c, c); 121 124 if (ci == MAX_MCO) 122 125 break; 123 c = cc[ci++]; 126 if (enc_utf8) 127 c = cc[ci++]; 128 else 129 c = 0; 124 130 } 125 131 #endif 126 132 … … 185 191 new_indent = indent; 186 192 else 187 193 { 194 has_tab = FALSE; /* avoid uninit warnings */ 188 195 len = linelen(eap->cmdidx == CMD_right ? &has_tab 189 196 : NULL) - get_indent(); 190 197 … … 1772 1779 ? (st_old.st_mode & 0020) 1773 1780 : (st_old.st_mode & 0002)))) 1774 1781 { 1775 int tt ;1782 int tt = msg_didany; 1776 1783 1777 1784 /* avoid a wait_return for this message, it's annoying */ 1778 tt = msg_didany;1779 1785 EMSG2(_("E137: Viminfo file is not writable: %s"), fname); 1780 1786 msg_didany = tt; 1781 1787 fclose(fp_in); … … 2458 2464 #ifdef FEAT_AUTOCMD 2459 2465 apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf); 2460 2466 #endif 2467 /* Change directories when the 'acd' option is set. */ 2468 DO_AUTOCHDIR 2461 2469 } 2462 2470 /* print full file name if :cd used */ 2463 2471 fileinfo(FALSE, FALSE, eap->forceit); … … 2675 2683 eap, eap->append, eap->forceit, TRUE, FALSE); 2676 2684 2677 2685 /* After ":saveas fname" reset 'readonly'. */ 2678 if (eap->cmdidx == CMD_saveas && retval == OK) 2679 curbuf->b_p_ro = FALSE; 2686 if (eap->cmdidx == CMD_saveas) 2687 { 2688 if (retval == OK) 2689 curbuf->b_p_ro = FALSE; 2690 /* Change directories when the 'acd' option is set. */ 2691 DO_AUTOCHDIR 2692 } 2680 2693 } 2681 2694 2682 2695 theend: … … 3547 3560 foldUpdateAll(curwin); 3548 3561 #endif 3549 3562 3550 #ifdef FEAT_AUTOCHDIR 3551 if (p_acd && curbuf->b_ffname != NULL 3552 && vim_chdirfile(curbuf->b_ffname) == OK) 3553 shorten_fnames(TRUE); 3554 #endif 3563 /* Change directories when the 'acd' option is set. */ 3564 DO_AUTOCHDIR 3565 3555 3566 /* 3556 3567 * Careful: open_buffer() and apply_autocmds() may change the current 3557 3568 * buffer and window. … … 3718 3729 if (p_im) 3719 3730 need_start_insertmode = TRUE; 3720 3731 3721 #ifdef FEAT_AUTOCHDIR 3722 /* Change directories when the acd option is set on. */ 3723 if (p_acd && curbuf->b_ffname != NULL 3724 && vim_chdirfile(curbuf->b_ffname) == OK) 3725 shorten_fnames(TRUE); 3726 #endif 3732 /* Change directories when the 'acd' option is set. */ 3733 DO_AUTOCHDIR 3727 3734 3728 3735 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) 3729 3736 if (gui.in_use && curbuf->b_ffname != NULL) -
src/ex_cmds.h
diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h
old new 262 262 EX(CMD_comclear, "comclear", ex_comclear, 263 263 TRLBAR|CMDWIN), 264 264 EX(CMD_compiler, "compiler", ex_compiler, 265 BANG|TRLBAR|WORD1 ),265 BANG|TRLBAR|WORD1|CMDWIN), 266 266 EX(CMD_continue, "continue", ex_continue, 267 267 TRLBAR|SBOXOK|CMDWIN), 268 268 EX(CMD_confirm, "confirm", ex_wrongmodifier, -
src/ex_docmd.c
diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c
old new 58 58 #endif 59 59 60 60 #ifdef FEAT_EVAL 61 static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(* getline)(int, void *, int), void *cookie));61 static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int), void *cookie)); 62 62 #else 63 static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(* getline)(int, void *, int), void *cookie));63 static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie)); 64 64 static int if_level = 0; /* depth in :if */ 65 65 #endif 66 66 static char_u *find_command __ARGS((exarg_T *eap, int *full)); … … 831 831 832 832 /* 833 833 * If requested, store and reset the global values controlling the 834 * exception handling (used when debugging). 834 * exception handling (used when debugging). Otherwise clear it to avoid 835 * a bogus compiler warning when the optimizer uses inline functions... 835 836 */ 836 elseif (flags & DOCMD_EXCRESET)837 if (flags & DOCMD_EXCRESET) 837 838 save_dbg_stuff(&debug_saved); 839 else 840 memset(&debug_saved, 0, 1); 838 841 839 842 initial_trylevel = trylevel; 840 843 … … 1574 1577 #endif 1575 1578 1576 1579 /* 1577 * If " getline" is get_loop_line(), return TRUE if the getline it uses equals1578 * "func". * Otherwise return TRUE when " getline" equals "func".1580 * If "fgetline" is get_loop_line(), return TRUE if the getline it uses equals 1581 * "func". * Otherwise return TRUE when "fgetline" equals "func". 1579 1582 */ 1580 1583 /*ARGSUSED*/ 1581 1584 int 1582 getline_equal( getline, cookie, func)1583 char_u *(* getline) __ARGS((int, void *, int));1584 void *cookie; /* argument for getline() */1585 getline_equal(fgetline, cookie, func) 1586 char_u *(*fgetline) __ARGS((int, void *, int)); 1587 void *cookie; /* argument for fgetline() */ 1585 1588 char_u *(*func) __ARGS((int, void *, int)); 1586 1589 { 1587 1590 #ifdef FEAT_EVAL 1588 1591 char_u *(*gp) __ARGS((int, void *, int)); 1589 1592 struct loop_cookie *cp; 1590 1593 1591 /* When " getline" is "get_loop_line()" use the "cookie" to find the1594 /* When "fgetline" is "get_loop_line()" use the "cookie" to find the 1592 1595 * function that's orignally used to obtain the lines. This may be nested 1593 1596 * several levels. */ 1594 gp = getline;1597 gp = fgetline; 1595 1598 cp = (struct loop_cookie *)cookie; 1596 1599 while (gp == get_loop_line) 1597 1600 { … … 1600 1603 } 1601 1604 return gp == func; 1602 1605 #else 1603 return getline == func;1606 return fgetline == func; 1604 1607 #endif 1605 1608 } 1606 1609 1607 1610 #if defined(FEAT_EVAL) || defined(FEAT_MBYTE) || defined(PROTO) 1608 1611 /* 1609 * If " getline" is get_loop_line(), return the cookie used by the original1612 * If "fgetline" is get_loop_line(), return the cookie used by the original 1610 1613 * getline function. Otherwise return "cookie". 1611 1614 */ 1612 1615 /*ARGSUSED*/ 1613 1616 void * 1614 getline_cookie( getline, cookie)1615 char_u *(* getline) __ARGS((int, void *, int));1616 void *cookie; /* argument for getline() */1617 getline_cookie(fgetline, cookie) 1618 char_u *(*fgetline) __ARGS((int, void *, int)); 1619 void *cookie; /* argument for fgetline() */ 1617 1620 { 1618 1621 # ifdef FEAT_EVAL 1619 1622 char_u *(*gp) __ARGS((int, void *, int)); 1620 1623 struct loop_cookie *cp; 1621 1624 1622 /* When " getline" is "get_loop_line()" use the "cookie" to find the1625 /* When "fgetline" is "get_loop_line()" use the "cookie" to find the 1623 1626 * cookie that's orignally used to obtain the lines. This may be nested 1624 1627 * several levels. */ 1625 gp = getline;1628 gp = fgetline; 1626 1629 cp = (struct loop_cookie *)cookie; 1627 1630 while (gp == get_loop_line) 1628 1631 { … … 1648 1651 * 5. parse arguments 1649 1652 * 6. switch on command name 1650 1653 * 1651 * Note: " getline" can be NULL.1654 * Note: "fgetline" can be NULL. 1652 1655 * 1653 1656 * This function may be called recursively! 1654 1657 */ … … 1663 1666 #ifdef FEAT_EVAL 1664 1667 cstack, 1665 1668 #endif 1666 getline, cookie)1669 fgetline, cookie) 1667 1670 char_u **cmdlinep; 1668 1671 int sourcing; 1669 1672 #ifdef FEAT_EVAL 1670 1673 struct condstack *cstack; 1671 1674 #endif 1672 char_u *(* getline) __ARGS((int, void *, int));1673 void *cookie; /* argument for getline() */1675 char_u *(*fgetline) __ARGS((int, void *, int)); 1676 void *cookie; /* argument for fgetline() */ 1674 1677 { 1675 1678 char_u *p; 1676 1679 linenr_T lnum; … … 1698 1701 if (quitmore 1699 1702 #ifdef FEAT_EVAL 1700 1703 /* avoid that a function call in 'statusline' does this */ 1701 && !getline_equal( getline, cookie, get_func_line)1704 && !getline_equal(fgetline, cookie, get_func_line) 1702 1705 #endif 1703 1706 ) 1704 1707 --quitmore; … … 1710 1713 save_cmdmod = cmdmod; 1711 1714 vim_memset(&cmdmod, 0, sizeof(cmdmod)); 1712 1715 1716 /* "#!anything" is handled like a comment. */ 1717 if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!') 1718 goto doend; 1719 1713 1720 /* 1714 1721 * Repeat until no more command modifiers are found. 1715 1722 */ … … 1724 1731 1725 1732 /* in ex mode, an empty line works like :+ */ 1726 1733 if (*ea.cmd == NUL && exmode_active 1727 && (getline_equal( getline, cookie, getexmodeline)1728 || getline_equal( getline, cookie, getexline))1734 && (getline_equal(fgetline, cookie, getexmodeline) 1735 || getline_equal(fgetline, cookie, getexline)) 1729 1736 && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) 1730 1737 { 1731 1738 ea.cmd = (char_u *)"+"; … … 1914 1921 /* Count this line for profiling if ea.skip is FALSE. */ 1915 1922 if (do_profiling == PROF_YES && !ea.skip) 1916 1923 { 1917 if (getline_equal( getline, cookie, get_func_line))1918 func_line_exec(getline_cookie( getline, cookie));1919 else if (getline_equal( getline, cookie, getsourceline))1924 if (getline_equal(fgetline, cookie, get_func_line)) 1925 func_line_exec(getline_cookie(fgetline, cookie)); 1926 else if (getline_equal(fgetline, cookie, getsourceline)) 1920 1927 script_line_exec(); 1921 1928 } 1922 1929 #endif … … 2585 2592 * The "ea" structure holds the arguments that can be used. 2586 2593 */ 2587 2594 ea.cmdlinep = cmdlinep; 2588 ea.getline = getline;2595 ea.getline = fgetline; 2589 2596 ea.cookie = cookie; 2590 2597 #ifdef FEAT_EVAL 2591 2598 ea.cstack = cstack; … … 2623 2630 do_throw(cstack); 2624 2631 else if (check_cstack) 2625 2632 { 2626 if (source_finished( getline, cookie))2633 if (source_finished(fgetline, cookie)) 2627 2634 do_finish(&ea, TRUE); 2628 else if (getline_equal( getline, cookie, get_func_line)2635 else if (getline_equal(fgetline, cookie, get_func_line) 2629 2636 && current_func_returned()) 2630 2637 do_return(&ea, TRUE, FALSE, NULL); 2631 2638 } … … 6289 6296 exarg_T *eap; 6290 6297 { 6291 6298 tabpage_T *tp; 6292 int h = tabline_height();6293 6299 6294 6300 # ifdef FEAT_CMDWIN 6295 6301 if (cmdwin_type != 0) … … 6321 6327 ) 6322 6328 tabpage_close(eap->forceit); 6323 6329 } 6324 6325 if (h != tabline_height())6326 shell_new_rows();6327 6330 } 6328 6331 6329 6332 /* … … 6335 6338 { 6336 6339 tabpage_T *tp; 6337 6340 int done; 6338 int h = tabline_height();6339 6341 6340 6342 # ifdef FEAT_CMDWIN 6341 6343 if (cmdwin_type != 0) … … 6364 6366 break; 6365 6367 } 6366 6368 } 6367 6368 if (h != tabline_height())6369 shell_new_rows();6370 6369 } 6371 6370 6372 6371 /* … … 6390 6389 /* 6391 6390 * Close tab page "tp", which is not the current tab page. 6392 6391 * Note that autocommands may make "tp" invalid. 6392 * Also takes care of the tab pages line disappearing when closing the 6393 * last-but-one tab page. 6393 6394 */ 6394 6395 void 6395 6396 tabpage_close_other(tp, forceit) … … 6398 6399 { 6399 6400 int done = 0; 6400 6401 win_T *wp; 6402 int h = tabline_height(); 6401 6403 6402 6404 /* Limit to 1000 windows, autocommands may add a window while we close 6403 6405 * one. OK, so I'm paranoid... */ … … 6411 6413 if (!valid_tabpage(tp) || tp->tp_firstwin == wp) 6412 6414 break; 6413 6415 } 6416 6414 6417 redraw_tabline = TRUE; 6418 if (h != tabline_height()) 6419 shell_new_rows(); 6415 6420 } 6416 6421 6417 6422 /* … … 8417 8422 else 8418 8423 EMSG2(_(e_invarg2), eap->arg); 8419 8424 } 8425 8426 /* Make sure redirection is not off. Can happen for cmdline completion 8427 * that indirectly invokes a command to catch its output. */ 8428 if (redir_fd != NULL 8429 #ifdef FEAT_EVAL 8430 || redir_reg || redir_vname 8431 #endif 8432 ) 8433 redir_off = FALSE; 8420 8434 } 8421 8435 8422 8436 /* -
src/ex_getln.c
diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c
old new 324 324 */ 325 325 for (;;) 326 326 { 327 redir_off = TRUE; /* Don't redirect the typed command. 328 Repeated, because a ":redir" inside 329 completion may switch it on. */ 327 330 #ifdef USE_ON_FLY_SCROLL 328 331 dont_scroll = FALSE; /* allow scrolling here */ 329 332 #endif … … 1753 1756 end_pos = curwin->w_cursor; /* shutup gcc 4 */ 1754 1757 1755 1758 validate_cursor(); 1759 # ifdef FEAT_WINDOWS 1760 /* May redraw the status line to show the cursor position. */ 1761 if (p_ru && curwin->w_status_height > 0) 1762 curwin->w_redr_status = TRUE; 1763 # endif 1756 1764 1757 1765 save_cmdline(&save_ccline); 1758 1766 update_screen(SOME_VALID); … … 2360 2368 { 2361 2369 if ((State & CMDLINE) 2362 2370 && xic != NULL 2363 && im_get_status()2371 /* && im_get_status() doesn't work when using SCIM */ 2364 2372 && !p_imdisable 2365 2373 && im_is_preediting()) 2366 2374 { … … 4521 4529 flags |= EW_FILE | EW_EXEC; 4522 4530 4523 4531 /* For an absolute name we don't use $PATH. */ 4524 if ((pat[0] == '.' && (vim_ispathsep(pat[1]) 4532 if (mch_isFullName(pat)) 4533 path = (char_u *)" "; 4534 else if ((pat[0] == '.' && (vim_ispathsep(pat[1]) 4525 4535 || (pat[1] == '.' && vim_ispathsep(pat[2]))))) 4526 4536 path = (char_u *)"."; 4527 4537 else … … 4534 4544 ga_init2(&ga, (int)sizeof(char *), 10); 4535 4545 for (s = path; *s != NUL; s = e) 4536 4546 { 4547 if (*s == ' ') 4548 ++s; /* Skip space used for absolute path name. */ 4549 4537 4550 #if defined(MSDOS) || defined(MSWIN) || defined(OS2) 4538 4551 e = vim_strchr(s, ';'); 4539 4552 #else … … 5982 5995 typestr[0] = cmdwin_type; 5983 5996 typestr[1] = NUL; 5984 5997 apply_autocmds(EVENT_CMDWINENTER, typestr, typestr, FALSE, curbuf); 5998 if (restart_edit != 0) /* autocmd with ":startinsert" */ 5999 stuffcharReadbuff(K_NOP); 5985 6000 # endif 5986 6001 5987 6002 i = RedrawingDisabled; -
src/fileio.c
diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c
old new 316 316 * display the line. */ 317 317 ex_no_reprint = TRUE; 318 318 319 /* don't display the file info for another buffer now */ 320 need_fileinfo = FALSE; 321 319 322 /* 320 323 * For Unix: Use the short file name whenever possible. 321 324 * Avoids problems with networks and when directory names are changed. … … 6450 6453 int old_ro = buf->b_p_ro; 6451 6454 buf_T *savebuf; 6452 6455 int saved = OK; 6453 #ifdef FEAT_AUTOCMD6454 6456 aco_save_T aco; 6455 6457 6456 6458 /* set curwin/curbuf for "buf" and save some things */ 6457 6459 aucmd_prepbuf(&aco, buf); 6458 #else6459 buf_T *save_curbuf = curbuf;6460 6461 curbuf = buf;6462 curwin->w_buffer = buf;6463 #endif6464 6460 6465 6461 /* We only want to read the text from the file, not reset the syntax 6466 6462 * highlighting, clear marks, diff status, etc. Force the fileformat … … 6573 6569 curbuf->b_p_ro |= old_ro; 6574 6570 } 6575 6571 6576 #ifdef FEAT_AUTOCMD6577 6572 /* restore curwin/curbuf and a few other things */ 6578 6573 aucmd_restbuf(&aco); 6579 6574 /* Careful: autocommands may have made "buf" invalid! */ 6580 #else6581 curwin->w_buffer = save_curbuf;6582 curbuf = save_curbuf;6583 #endif6584 6575 } 6585 6576 6586 6577 /*ARGSUSED*/ … … 6992 6983 {"FocusLost", EVENT_FOCUSLOST}, 6993 6984 {"FuncUndefined", EVENT_FUNCUNDEFINED}, 6994 6985 {"GUIEnter", EVENT_GUIENTER}, 6986 {"GUIFailed", EVENT_GUIFAILED}, 6995 6987 {"InsertChange", EVENT_INSERTCHANGE}, 6996 6988 {"InsertEnter", EVENT_INSERTENTER}, 6997 6989 {"InsertLeave", EVENT_INSERTLEAVE}, … … 8088 8080 * Search a window for the current buffer. Save the cursor position and 8089 8081 * screen offset. 8090 8082 * Set "curbuf" and "curwin" to match "buf". 8083 * When FEAT_AUTOCMD is not defined another version is used, see below. 8091 8084 */ 8092 8085 void 8093 8086 aucmd_prepbuf(aco, buf) … … 8151 8144 /* 8152 8145 * Cleanup after executing autocommands for a (hidden) buffer. 8153 8146 * Restore the window as it was (if possible). 8147 * When FEAT_AUTOCMD is not defined another version is used, see below. 8154 8148 */ 8155 8149 void 8156 8150 aucmd_restbuf(aco) … … 8295 8289 { 8296 8290 int state; 8297 8291 8298 if (!did_cursorhold && has_cursorhold() && !Recording) 8292 if (!did_cursorhold && has_cursorhold() && !Recording 8293 #ifdef FEAT_INS_EXPAND 8294 && !ins_compl_active() 8295 #endif 8296 ) 8299 8297 { 8300 8298 state = get_real_state(); 8301 8299 if (state == NORMAL_BUSY || (state & INSERT) != 0) … … 9063 9061 return retval; 9064 9062 } 9065 9063 9064 #else /* FEAT_AUTOCMD */ 9065 9066 /* 9067 * Prepare for executing commands for (hidden) buffer "buf". 9068 * This is the non-autocommand version, it simply saves "curbuf" and sets 9069 * "curbuf" and "curwin" to match "buf". 9070 */ 9071 void 9072 aucmd_prepbuf(aco, buf) 9073 aco_save_T *aco; /* structure to save values in */ 9074 buf_T *buf; /* new curbuf */ 9075 { 9076 aco->save_buf = buf; 9077 curbuf = buf; 9078 curwin->w_buffer = buf; 9079 } 9080 9081 /* 9082 * Restore after executing commands for a (hidden) buffer. 9083 * This is the non-autocommand version. 9084 */ 9085 void 9086 aucmd_restbuf(aco) 9087 aco_save_T *aco; /* structure holding saved values */ 9088 { 9089 curbuf = aco->save_buf; 9090 curwin->w_buffer = curbuf; 9091 } 9092 9066 9093 #endif /* FEAT_AUTOCMD */ 9067 9094 9095 9068 9096 #if defined(FEAT_AUTOCMD) || defined(FEAT_WILDIGN) || defined(PROTO) 9069 9097 /* 9070 9098 * Try matching a filename with a "pattern" ("prog" is NULL), or use the -
src/getchar.c
diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c
old new 1451 1451 { 1452 1452 updatescript(0); 1453 1453 #ifdef FEAT_EVAL 1454 garbage_collect(); 1454 if (may_garbage_collect) 1455 garbage_collect(); 1455 1456 #endif 1456 1457 } 1457 1458 … … 1502 1503 int i; 1503 1504 #endif 1504 1505 1506 #ifdef FEAT_EVAL 1507 /* Do garbage collection when garbagecollect() was called previously and 1508 * we are now at the toplevel. */ 1509 if (may_garbage_collect && want_garbage_collect) 1510 garbage_collect(); 1511 #endif 1512 1505 1513 /* 1506 1514 * If a character was put back with vungetc, it was already processed. 1507 1515 * Return it directly. … … 1511 1519 c = old_char; 1512 1520 old_char = -1; 1513 1521 mod_mask = old_mod_mask; 1514 return c;1515 1522 } 1516 1517 mod_mask = 0x0; 1518 last_recorded_len = 0; 1519 for (;;) /* this is done twice if there are modifiers */ 1523 else 1520 1524 { 1525 mod_mask = 0x0; 1526 last_recorded_len = 0; 1527 for (;;) /* this is done twice if there are modifiers */ 1528 { 1521 1529 if (mod_mask) /* no mapping after modifier has been read */ 1522 1530 { 1523 1531 ++no_mapping; … … 1695 1703 } 1696 1704 #endif 1697 1705 1698 return c; 1706 break; 1707 } 1699 1708 } 1709 1710 #ifdef FEAT_EVAL 1711 /* 1712 * In the main loop "may_garbage_collect" can be set to do garbage 1713 * collection in the first next vgetc(). It's disabled after that to 1714 * avoid internally used Lists and Dicts to be freed. 1715 */ 1716 may_garbage_collect = FALSE; 1717 #endif 1718 1719 return c; 1700 1720 } 1701 1721 1702 1722 /* -
src/globals.h
diff -Naur vim70.orig/src/globals.h vim70/src/globals.h
old new 300 300 #endif 301 301 302 302 #ifdef FEAT_EVAL 303 EXTERN scid_T current_SID INIT(= 0); /* ID of script being sourced or 304 was sourced to define the 305 current function. */ 303 /* Garbage collection can only take place when we are sure there are no Lists 304 * or Dictionaries being used internally. This is flagged with 305 * "may_garbage_collect" when we are at the toplevel. 306 * "want_garbage_collect" is set by the garbagecollect() function, which means 307 * we do garbage collection before waiting for a char at the toplevel. */ 308 EXTERN int may_garbage_collect INIT(= FALSE); 309 EXTERN int want_garbage_collect INIT(= FALSE); 310 311 /* ID of script being sourced or was sourced to define the current function. */ 312 EXTERN scid_T current_SID INIT(= 0); 306 313 #endif 307 314 308 315 #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) … … 1441 1448 EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to override)")); 1442 1449 #ifdef FEAT_EVAL 1443 1450 EXTERN char_u e_readonlyvar[] INIT(= N_("E46: Cannot change read-only variable \"%s\"")); 1444 EXTERN char_u e_readonlysbx[] INIT(= N_("E 46: Cannot set variable in the sandbox: \"%s\""));1451 EXTERN char_u e_readonlysbx[] INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\"")); 1445 1452 #endif 1446 1453 #ifdef FEAT_QUICKFIX 1447 1454 EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile")); -
src/gui_at_fs.c
diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
old new 1861 1861 XtPointer pnew; 1862 1862 { 1863 1863 SFDir *dir; 1864 int nw ;1864 int nw = (int)(long)pnew; 1865 1865 1866 1866 dir = &(SFdirs[SFdirPtr + (int)(long)n]); 1867 1867 1868 1868 #ifdef FEAT_GUI_NEXTAW 1869 if ( (int)(long)pnew < 0)1869 if (nw < 0) 1870 1870 { 1871 if ( (int)(long)pnew > -SFvScrollHeight)1872 (int)(long)pnew = -1;1871 if (nw > -SFvScrollHeight) 1872 nw = -1; 1873 1873 else 1874 (int)(long)pnew = -SFlistSize;1874 nw = -SFlistSize; 1875 1875 } 1876 else if ( (int)(long)pnew > 0)1876 else if (nw > 0) 1877 1877 { 1878 if ( (int)(long)pnew < SFvScrollHeight)1879 (int)(long)pnew = 1;1878 if (nw < SFvScrollHeight) 1879 nw = 1; 1880 1880 else 1881 (int)(long)pnew = SFlistSize;1881 nw = SFlistSize; 1882 1882 } 1883 1883 #endif 1884 nw = dir->vOrigin + (int)(long)pnew;1884 nw += dir->vOrigin; 1885 1885 1886 1886 if (nw > dir->nEntries - SFlistSize) 1887 1887 nw = dir->nEntries - SFlistSize; … … 1941 1941 XtPointer pnew; 1942 1942 { 1943 1943 SFDir *dir; 1944 int nw ;1944 int nw = (int)(long)pnew; 1945 1945 1946 1946 dir = &(SFdirs[SFdirPtr + (int)(long)n]); 1947 1947 1948 1948 #ifdef FEAT_GUI_NEXTAW 1949 if ( (int)(long)pnew < 0)1949 if (nw < 0) 1950 1950 { 1951 if ( (int)(long)pnew > -SFhScrollWidth)1952 (int)(long)pnew = -1;1951 if (nw > -SFhScrollWidth) 1952 nw = -1; 1953 1953 else 1954 (int)(long)pnew = -SFcharsPerEntry;1954 nw = -SFcharsPerEntry; 1955 1955 } 1956 else if ( (int)(long)pnew > 0)1956 else if (nw > 0) 1957 1957 { 1958 if ( (int)(long)pnew < SFhScrollWidth)1959 (int)(long)pnew = 1;1958 if (nw < SFhScrollWidth) 1959 nw = 1; 1960 1960 else 1961 (int)(long)pnew = SFcharsPerEntry;1961 nw = SFcharsPerEntry; 1962 1962 } 1963 1963 #endif 1964 nw = dir->hOrigin + (int)(long)pnew;1964 nw += dir->hOrigin; 1965 1965 1966 1966 if (nw > dir->nChars - SFcharsPerEntry) 1967 1967 nw = dir->nChars - SFcharsPerEntry; … … 2038 2038 XtPointer client_data; 2039 2039 XtPointer pnew; 2040 2040 { 2041 int nw ;2041 int nw = (int)(long)pnew; 2042 2042 float f; 2043 2043 2044 2044 #ifdef FEAT_GUI_NEXTAW 2045 if ( (int)(long)pnew < 0)2045 if (nw < 0) 2046 2046 { 2047 if ( (int)(long)pnew > -SFpathScrollWidth)2048 (int)(long)pnew = -1;2047 if (nw > -SFpathScrollWidth) 2048 nw = -1; 2049 2049 else 2050 (int)(long)pnew = -3;2050 nw = -3; 2051 2051 } 2052 else if ( (int)(long)pnew > 0)2052 else if (nw > 0) 2053 2053 { 2054 if ( (int)(long)pnew < SFpathScrollWidth)2055 (int)(long)pnew = 1;2054 if (nw < SFpathScrollWidth) 2055 nw = 1; 2056 2056 else 2057 (int)(long)pnew = 3;2057 nw = 3; 2058 2058 } 2059 2059 #endif 2060 nw = SFdirPtr + (int)(long)pnew;2060 nw += SFdirPtr; 2061 2061 2062 2062 if (nw > SFdirEnd - 3) 2063 2063 nw = SFdirEnd - 3; -
src/gui_beval.c
diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c
old new 926 926 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \ 927 927 || (c) == DEL) 928 928 static void 929 set_printable_label_text(GtkLabel *label, char_u * msg)929 set_printable_label_text(GtkLabel *label, char_u *text) 930 930 { 931 931 char_u *convbuf = NULL; 932 932 char_u *buf; … … 940 940 /* Convert to UTF-8 if it isn't already */ 941 941 if (output_conv.vc_type != CONV_NONE) 942 942 { 943 convbuf = string_convert(&output_conv, msg, NULL);943 convbuf = string_convert(&output_conv, text, NULL); 944 944 if (convbuf != NULL) 945 msg= convbuf;945 text = convbuf; 946 946 } 947 947 948 948 /* First let's see how much we need to allocate */ 949 949 len = 0; 950 for (p = msg; *p != NUL; p += charlen)950 for (p = text; *p != NUL; p += charlen) 951 951 { 952 952 if ((*p & 0x80) == 0) /* be quick for ASCII */ 953 953 { … … 992 992 (unsigned long)pixel, &color); 993 993 994 994 pdest = buf; 995 p = msg;995 p = text; 996 996 while (*p != NUL) 997 997 { 998 998 /* Be quick for ASCII */ -
src/gui.c
diff -Naur vim70.orig/src/gui.c vim70/src/gui.c
old new 187 187 #endif 188 188 189 189 #ifdef FEAT_AUTOCMD 190 /* If the GUI started successfully, trigger the GUIEnter event */ 191 if (gui.in_use) 192 apply_autocmds(EVENT_GUIENTER, NULL, NULL, FALSE, curbuf); 190 /* If the GUI started successfully, trigger the GUIEnter event, otherwise 191 * the GUIFailed event. */ 192 apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED, 193 NULL, NULL, FALSE, curbuf); 193 194 #endif 194 195 195 196 --recursive; … … 3733 3734 if (dont_scroll || input_available()) 3734 3735 return; 3735 3736 #endif 3737 #ifdef FEAT_INS_EXPAND 3738 /* Disallow scrolling the current window when the completion popup menu is 3739 * visible. */ 3740 if ((sb->wp == NULL || sb->wp == curwin) && pum_visible()) 3741 return; 3742 #endif 3736 3743 3737 3744 #ifdef FEAT_RIGHTLEFT 3738 3745 if (sb->wp == NULL && curwin->w_p_rl) … … 4207 4214 updateWindow(wp); /* update window, status line, and cmdline */ 4208 4215 } 4209 4216 4217 #ifdef FEAT_INS_EXPAND 4218 /* May need to redraw the popup menu. */ 4219 if (pum_visible()) 4220 pum_redraw(); 4221 #endif 4222 4210 4223 return (wp == curwin && !equalpos(curwin->w_cursor, old_cursor)); 4211 4224 } 4212 4225 … … 4515 4528 int y; 4516 4529 { 4517 4530 win_T *wp; 4518 char_u st[ 6];4531 char_u st[8]; 4519 4532 4520 4533 /* Ignore this while still starting up. */ 4521 4534 if (!gui.in_use || gui.starting) … … 4603 4616 /* Don't move the mouse when it's left or right of the Vim window */ 4604 4617 if (x < 0 || x > Columns * gui.char_width) 4605 4618 return; 4619 if (y >= 0 4606 4620 # ifdef FEAT_WINDOWS 4607 if (Y_2_ROW(y) >= tabline_height()) 4608 # else 4609 if (y >= 0) 4621 && Y_2_ROW(y) >= tabline_height() 4610 4622 # endif 4623 ) 4611 4624 wp = xy2win(x, y); 4612 4625 if (wp != curwin && wp != NULL) /* If in other than current window */ 4613 4626 { -
src/gui_gtk.c
diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c
old new 957 957 get_menu_position(vimmenu_T *menu) 958 958 { 959 959 vimmenu_T *node; 960 int i ndex = 0;960 int idx = 0; 961 961 962 962 for (node = menu->parent->children; node != menu; node = node->next) 963 963 { 964 964 g_return_val_if_fail(node != NULL, -1); 965 ++i ndex;965 ++idx; 966 966 } 967 967 968 return i ndex;968 return idx; 969 969 } 970 970 #endif /* FEAT_TOOLBAR && HAVE_GTK2 */ 971 971 … … 2127 2127 char **ync; /* "yes no cancel" */ 2128 2128 char **buttons; 2129 2129 int n_buttons = 0; 2130 int i ndex;2130 int idx; 2131 2131 2132 2132 button_string = vim_strsave(button_string); /* must be writable */ 2133 2133 if (button_string == NULL) … … 2161 2161 * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the 2162 2162 * other way around... 2163 2163 */ 2164 for (i ndex = 1; index <= n_buttons; ++index)2164 for (idx = 1; idx <= n_buttons; ++idx) 2165 2165 { 2166 2166 char *label; 2167 2167 char_u *label8; 2168 2168 2169 label = buttons[i ndex - 1];2169 label = buttons[idx - 1]; 2170 2170 /* 2171 2171 * Perform some guesswork to find appropriate stock items for the 2172 2172 * buttons. We have to compare with a sample of the translated … … 2188 2188 else if (button_equal(label, "Cancel")) label = GTK_STOCK_CANCEL; 2189 2189 } 2190 2190 label8 = CONVERT_TO_UTF8((char_u *)label); 2191 gtk_dialog_add_button(dialog, (const gchar *)label8, i ndex);2191 gtk_dialog_add_button(dialog, (const gchar *)label8, idx); 2192 2192 CONVERT_TO_UTF8_FREE(label8); 2193 2193 } 2194 2194 -
src/gui_gtk_x11.c
diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c
old new 3233 3233 on_select_tab( 3234 3234 GtkNotebook *notebook, 3235 3235 GtkNotebookPage *page, 3236 gint i ndex,3236 gint idx, 3237 3237 gpointer data) 3238 3238 { 3239 3239 if (!ignore_tabline_evt) 3240 3240 { 3241 if (send_tabline_event(i ndex + 1) && gtk_main_level() > 0)3241 if (send_tabline_event(idx + 1) && gtk_main_level() > 0) 3242 3242 gtk_main_quit(); 3243 3243 } 3244 3244 } … … 5303 5303 # ifdef HAVE_GTK2 5304 5304 if (font != NOFONT) 5305 5305 { 5306 char * name = pango_font_description_to_string(font);5306 char *pangoname = pango_font_description_to_string(font); 5307 5307 5308 if ( name != NULL)5308 if (pangoname != NULL) 5309 5309 { 5310 char_u *s = vim_strsave((char_u *) name);5310 char_u *s = vim_strsave((char_u *)pangoname); 5311 5311 5312 g_free( name);5312 g_free(pangoname); 5313 5313 return s; 5314 5314 } 5315 5315 } … … 6241 6241 { 6242 6242 GdkGCValues values; 6243 6243 GdkGC *invert_gc; 6244 GdkColor foreground;6245 GdkColor background;6246 6244 6247 6245 if (gui.drawarea->window == NULL) 6248 6246 return; 6249 6247 6250 foreground.pixel = gui.norm_pixel ^ gui.back_pixel; 6251 background.pixel = gui.norm_pixel ^ gui.back_pixel; 6252 6253 values.foreground = foreground; 6254 values.background = background; 6248 values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel; 6249 values.background.pixel = gui.norm_pixel ^ gui.back_pixel; 6255 6250 values.function = GDK_XOR; 6256 6251 invert_gc = gdk_gc_new_with_values(gui.drawarea->window, 6257 6252 &values, 6258 6253 GDK_GC_FOREGROUND | 6259 6254 GDK_GC_BACKGROUND | 6260 6255 GDK_GC_FUNCTION); 6261 gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED); 6256 gdk_gc_set_exposures(invert_gc, gui.visibility != 6257 GDK_VISIBILITY_UNOBSCURED); 6262 6258 gdk_draw_rectangle(gui.drawarea->window, invert_gc, 6263 6259 TRUE, 6264 6260 FILL_X(c), FILL_Y(r), -
src/gui_xmebw.c
diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
old new 47 47 #include "gui_xmebwp.h" 48 48 49 49 /* Provide some missing wrappers, which are missed from the LessTif 50 * implementation. 50 * implementation. Also missing in Motif 1.2 and earlier. 51 51 * 52 52 * We neither use XmeGetPixmapData or _XmGetPixmapData, since with LessTif the 53 53 * pixmap will not appear in it's caches properly. We cache the interresting 54 54 * values in XmEnhancedButtonPart instead ourself. 55 55 */ 56 #if def LESSTIF_VERSION56 #if defined(LESSTIF_VERSION) || (XmVersion <= 1002) 57 57 # ifndef Lab_IsMenupane 58 58 # define Lab_IsMenupane(w) (Lab_MenuType(w) == (int)XmMENU_POPUP || \ 59 59 Lab_MenuType(w) == (int)XmMENU_PULLDOWN) … … 480 480 || (eb->core.height <= 2 * eb->primitive.highlight_thickness)) 481 481 return; 482 482 483 #if ndef LESSTIF_VERSION483 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 484 484 { 485 485 XmDisplay dpy; 486 486 … … 641 641 GC tmp_gc = NULL; 642 642 Boolean replaceGC = False; 643 643 Boolean deadjusted = False; 644 #if ndef LESSTIF_VERSION644 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 645 645 XmDisplay dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); 646 646 Boolean etched_in = dpy->display.enable_etched_in_menu; 647 647 #else … … 726 726 if ((((ShellWidget) XtParent(XtParent(eb)))->shell.popped_up) 727 727 && _XmGetInDragMode((Widget) eb)) 728 728 { 729 #if ndef LESSTIF_VERSION729 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 730 730 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); 731 731 Boolean etched_in = dpy->display.enable_etched_in_menu; 732 732 #else … … 810 810 811 811 if (Lab_IsMenupane(eb)) 812 812 { 813 #if ndef LESSTIF_VERSION813 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 814 814 XmDisplay dpy = (XmDisplay) XmGetXmDisplay(XtDisplay(wid)); 815 815 Boolean etched_in = dpy->display.enable_etched_in_menu; 816 816 #else … … 1150 1150 Redisplay(Widget w, XEvent *event, Region region) 1151 1151 { 1152 1152 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) w; 1153 #if ndef LESSTIF_VERSION1153 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1154 1154 XmDisplay dpy; 1155 1155 XtEnum default_button_emphasis; 1156 1156 #endif … … 1162 1162 if (!XtIsRealized((Widget)eb)) 1163 1163 return; 1164 1164 1165 #if ndef LESSTIF_VERSION1165 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1166 1166 dpy = (XmDisplay)XmGetXmDisplay(XtDisplay(eb)); 1167 1167 default_button_emphasis = dpy->display.default_button_emphasis; 1168 1168 #endif … … 1241 1241 { 1242 1242 int adjust = 0; 1243 1243 1244 #if ndef LESSTIF_VERSION1244 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1245 1245 /* 1246 1246 * NOTE: PushButton has two types of shadows: primitive-shadow and 1247 1247 * default-button-shadow. If pushbutton is in a menu only primitive … … 1289 1289 adjust, adjust, rectwidth, rectheight, borderwidth); 1290 1290 } 1291 1291 1292 #if ndef LESSTIF_VERSION1292 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1293 1293 switch (default_button_emphasis) 1294 1294 { 1295 1295 case XmINTERNAL_HIGHLIGHT: … … 1365 1365 default_button_shadow_thickness = 1366 1366 eb->pushbutton.default_button_shadow_thickness; 1367 1367 1368 #if ndef LESSTIF_VERSION1368 #if !defined(LESSTIF_VERSION) && (XmVersion > 1002) 1369 1369 /* 1370 1370 * Compute location of bounding box to contain the 1371 1371 * defaultButtonShadow. -
src/hardcopy.c
diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c
old new 1794 1794 static int 1795 1795 prt_resfile_next_line() 1796 1796 { 1797 int i ndex;1797 int idx; 1798 1798 1799 1799 /* Move to start of next line and then find end of line */ 1800 i ndex = prt_resfile.line_end + 1;1801 while (i ndex < prt_resfile.len)1800 idx = prt_resfile.line_end + 1; 1801 while (idx < prt_resfile.len) 1802 1802 { 1803 if (prt_resfile.buffer[index] != PSLF && prt_resfile.buffer[index] 1804 != PSCR) 1803 if (prt_resfile.buffer[idx] != PSLF && prt_resfile.buffer[idx] != PSCR) 1805 1804 break; 1806 i ndex++;1805 idx++; 1807 1806 } 1808 prt_resfile.line_start = i ndex;1807 prt_resfile.line_start = idx; 1809 1808 1810 while (i ndex < prt_resfile.len)1809 while (idx < prt_resfile.len) 1811 1810 { 1812 if (prt_resfile.buffer[index] == PSLF || prt_resfile.buffer[index] 1813 == PSCR) 1811 if (prt_resfile.buffer[idx] == PSLF || prt_resfile.buffer[idx] == PSCR) 1814 1812 break; 1815 i ndex++;1813 idx++; 1816 1814 } 1817 prt_resfile.line_end = i ndex;1815 prt_resfile.line_end = idx; 1818 1816 1819 return (i ndex < prt_resfile.len);1817 return (idx < prt_resfile.len); 1820 1818 } 1821 1819 1822 1820 static int … … 1837 1835 prt_resfile_skip_nonws(offset) 1838 1836 int offset; 1839 1837 { 1840 int i ndex;1838 int idx; 1841 1839 1842 i ndex = prt_resfile.line_start + offset;1843 while (i ndex < prt_resfile.line_end)1840 idx = prt_resfile.line_start + offset; 1841 while (idx < prt_resfile.line_end) 1844 1842 { 1845 if (isspace(prt_resfile.buffer[i ndex]))1846 return i ndex - prt_resfile.line_start;1847 i ndex++;1843 if (isspace(prt_resfile.buffer[idx])) 1844 return idx - prt_resfile.line_start; 1845 idx++; 1848 1846 } 1849 1847 return -1; 1850 1848 } … … 1853 1851 prt_resfile_skip_ws(offset) 1854 1852 int offset; 1855 1853 { 1856 int i ndex;1854 int idx; 1857 1855 1858 i ndex = prt_resfile.line_start + offset;1859 while (i ndex < prt_resfile.line_end)1856 idx = prt_resfile.line_start + offset; 1857 while (idx < prt_resfile.line_end) 1860 1858 { 1861 if (!isspace(prt_resfile.buffer[i ndex]))1862 return i ndex - prt_resfile.line_start;1863 i ndex++;1859 if (!isspace(prt_resfile.buffer[idx])) 1860 return idx - prt_resfile.line_start; 1861 idx++; 1864 1862 } 1865 1863 return -1; 1866 1864 } … … 2478 2476 char_u *p_encoding; 2479 2477 struct prt_ps_encoding_S *p_mbenc; 2480 2478 struct prt_ps_encoding_S *p_mbenc_first; 2481 struct prt_ps_charset_S *p_mbchar ;2479 struct prt_ps_charset_S *p_mbchar = NULL; 2482 2480 #endif 2483 2481 2484 2482 #if 0 … … 2516 2514 if (!(props & ENC_8BIT) && ((*p_pmcs != NUL) || !(props & ENC_UNICODE))) 2517 2515 { 2518 2516 p_mbenc_first = NULL; 2519 p_mbchar = NULL;2520 2517 for (cmap = 0; cmap < NUM_ELEMENTS(prt_ps_mbfonts); cmap++) 2521 2518 if (prt_match_encoding((char *)p_encoding, &prt_ps_mbfonts[cmap], 2522 2519 &p_mbenc)) -
src/if_cscope.c
diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c
old new 989 989 { 990 990 int i; 991 991 char *cmd; 992 char **matches, **contexts; 993 int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches, matched; 992 int nummatches[CSCOPE_MAX_CONNECTIONS], totmatches; 994 993 #ifdef FEAT_QUICKFIX 995 994 char cmdletter; 996 995 char *qfpos; … … 1141 1140 else 1142 1141 #endif /* FEAT_QUICKFIX */ 1143 1142 { 1143 char **matches = NULL, **contexts = NULL; 1144 int matched = 0; 1145 1144 1146 /* read output */ 1145 1147 cs_fill_results((char *)pat, totmatches, nummatches, &matches, 1146 1148 &contexts, &matched); -
src/if_perl.xs
diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs
old new 155 155 static int (*perl_run)(PerlInterpreter*); 156 156 static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); 157 157 static void* (*Perl_get_context)(void); 158 static void (*Perl_croak)(pTHX_ const char*, ...) __attribute__((noreturn));159 static void (*Perl_croak_nocontext)(const char*, ...) __attribute__((noreturn));158 static void (*Perl_croak)(pTHX_ const char*, ...); 159 static void (*Perl_croak_nocontext)(const char*, ...); 160 160 static I32 (*Perl_dowantarray)(pTHX); 161 161 static void (*Perl_free_tmps)(pTHX); 162 162 static HV* (*Perl_gv_stashpv)(pTHX_ const char*, I32); … … 1056 1056 int i; 1057 1057 long lnum; 1058 1058 char *line; 1059 buf_T *savebuf;1060 1059 PPCODE: 1061 1060 if (buf_valid(vimbuf)) 1062 1061 { … … 1069 1068 line = SvPV(ST(i),PL_na); 1070 1069 if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) 1071 1070 { 1072 savebuf = curbuf; 1073 curbuf = vimbuf; 1071 aco_save_T aco; 1072 1073 /* set curwin/curbuf for "vimbuf" and save some things */ 1074 aucmd_prepbuf(&aco, vimbuf); 1075 1074 1076 if (u_savesub(lnum) == OK) 1075 1077 { 1076 1078 ml_replace(lnum, (char_u *)line, TRUE); 1077 1079 changed_bytes(lnum, 0); 1078 1080 } 1079 curbuf = savebuf; 1081 1082 /* restore curwin/curbuf and a few other things */ 1083 aucmd_restbuf(&aco); 1084 /* Careful: autocommands may have made "vimbuf" invalid! */ 1080 1085 } 1081 1086 } 1082 1087 } … … 1087 1092 1088 1093 PREINIT: 1089 1094 long i, lnum = 0, count = 0; 1090 buf_T *savebuf;1091 1095 PPCODE: 1092 1096 if (buf_valid(vimbuf)) 1093 1097 { … … 1114 1118 { 1115 1119 if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count) 1116 1120 { 1117 savebuf = curbuf; 1118 curbuf = vimbuf; 1121 aco_save_T aco; 1122 1123 /* set curwin/curbuf for "vimbuf" and save some things */ 1124 aucmd_prepbuf(&aco, vimbuf); 1125 1119 1126 if (u_savedel(lnum, 1) == OK) 1120 1127 { 1121 1128 ml_delete(lnum, 0); 1122 1129 deleted_lines_mark(lnum, 1L); 1123 if ( savebuf == curbuf)1130 if (aco.save_buf == curbuf) 1124 1131 check_cursor(); 1125 1132 } 1126 curbuf = savebuf; 1133 1134 /* restore curwin/curbuf and a few other things */ 1135 aucmd_restbuf(&aco); 1136 /* Careful: autocommands may have made "vimbuf" invalid! */ 1137 1127 1138 update_curbuf(VALID); 1128 1139 } 1129 1140 } … … 1138 1149 int i; 1139 1150 long lnum; 1140 1151 char *line; 1141 buf_T *savebuf;1142 1152 PPCODE: 1143 1153 if (buf_valid(vimbuf)) 1144 1154 { … … 1151 1161 line = SvPV(ST(i),PL_na); 1152 1162 if (lnum >= 0 && lnum <= vimbuf->b_ml.ml_line_count && line != NULL) 1153 1163 { 1154 savebuf = curbuf; 1155 curbuf = vimbuf; 1164 aco_save_T aco; 1165 1166 /* set curwin/curbuf for "vimbuf" and save some things */ 1167 aucmd_prepbuf(&aco, vimbuf); 1168 1156 1169 if (u_inssub(lnum + 1) == OK) 1157 1170 { 1158 1171 ml_append(lnum, (char_u *)line, (colnr_T)0, FALSE); 1159 1172 appended_lines_mark(lnum, 1L); 1160 1173 } 1161 curbuf = savebuf; 1174 1175 /* restore curwin/curbuf and a few other things */ 1176 aucmd_restbuf(&aco); 1177 /* Careful: autocommands may have made "vimbuf" invalid! */ 1178 1162 1179 update_curbuf(VALID); 1163 1180 } 1164 1181 } -
src/if_ruby.c
diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c
old new 643 643 644 644 static VALUE set_buffer_line(buf_T *buf, linenr_T n, VALUE str) 645 645 { 646 buf_T *savebuf = curbuf; 647 char *line = STR2CSTR(str); 646 char *line = STR2CSTR(str); 647 aco_save_T aco; 648 649 if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) 650 { 651 /* set curwin/curbuf for "buf" and save some things */ 652 aucmd_prepbuf(&aco, buf); 648 653 649 if (n > 0 && n <= buf->b_ml.ml_line_count && line != NULL) {650 curbuf = buf;651 654 if (u_savesub(n) == OK) { 652 655 ml_replace(n, (char_u *)line, TRUE); 653 656 changed(); … … 655 658 syn_changed(n); /* recompute syntax hl. for this line */ 656 659 #endif 657 660 } 658 curbuf = savebuf; 661 662 /* restore curwin/curbuf and a few other things */ 663 aucmd_restbuf(&aco); 664 /* Careful: autocommands may have made "buf" invalid! */ 665 659 666 update_curbuf(NOT_VALID); 660 667 } 661 else { 668 else 669 { 662 670 rb_raise(rb_eIndexError, "index %d out of buffer", n); 663 671 return Qnil; /* For stop warning */ 664 672 } … … 676 684 677 685 static VALUE buffer_delete(VALUE self, VALUE num) 678 686 { 679 buf_T *buf = get_buf(self); 680 buf_T *savebuf = curbuf; 681 long n = NUM2LONG(num); 687 buf_T *buf = get_buf(self); 688 long n = NUM2LONG(num); 689 aco_save_T aco; 690 691 if (n > 0 && n <= buf->b_ml.ml_line_count) 692 { 693 /* set curwin/curbuf for "buf" and save some things */ 694 aucmd_prepbuf(&aco, buf); 682 695 683 if (n > 0 && n <= buf->b_ml.ml_line_count) {684 curbuf = buf;685 696 if (u_savedel(n, 1) == OK) { 686 697 ml_delete(n, 0); 687 698 … … 691 702 692 703 changed(); 693 704 } 694 curbuf = savebuf; 705 706 /* restore curwin/curbuf and a few other things */ 707 aucmd_restbuf(&aco); 708 /* Careful: autocommands may have made "buf" invalid! */ 709 695 710 update_curbuf(NOT_VALID); 696 711 } 697 else { 712 else 713 { 698 714 rb_raise(rb_eIndexError, "index %d out of buffer", n); 699 715 } 700 716 return Qnil; … … 702 718 703 719 static VALUE buffer_append(VALUE self, VALUE num, VALUE str) 704 720 { 705 buf_T *buf = get_buf(self); 706 buf_T *savebuf = curbuf; 707 char *line = STR2CSTR(str); 708 long n = NUM2LONG(num); 721 buf_T *buf = get_buf(self); 722 char *line = STR2CSTR(str); 723 long n = NUM2LONG(num); 724 aco_save_T aco; 725 726 if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) 727 { 728 /* set curwin/curbuf for "buf" and save some things */ 729 aucmd_prepbuf(&aco, buf); 709 730 710 if (n >= 0 && n <= buf->b_ml.ml_line_count && line != NULL) {711 curbuf = buf;712 731 if (u_inssub(n + 1) == OK) { 713 732 ml_append(n, (char_u *) line, (colnr_T) 0, FALSE); 714 733 … … 718 737 719 738 changed(); 720 739 } 721 curbuf = savebuf; 740 741 /* restore curwin/curbuf and a few other things */ 742 aucmd_restbuf(&aco); 743 /* Careful: autocommands may have made "buf" invalid! */ 744 722 745 update_curbuf(NOT_VALID); 723 746 } 724 747 else { -
src/macros.h
diff -Naur vim70.orig/src/macros.h vim70/src/macros.h
old new 276 276 # define MB_CHARLEN(p) STRLEN(p) 277 277 # define PTR2CHAR(p) ((int)*(p)) 278 278 #endif 279 280 #ifdef FEAT_AUTOCHDIR 281 # define DO_AUTOCHDIR if (p_acd) do_autochdir(); 282 #else 283 # define DO_AUTOCHDIR 284 #endif -
src/main.c
diff -Naur vim70.orig/src/main.c vim70/src/main.c
old new 564 564 */ 565 565 if (p_lpl) 566 566 { 567 # ifdef VMS /* Somehow VMS doesn't handle the "**". */ 568 source_runtime((char_u *)"plugin/*.vim", TRUE); 569 # else 567 570 source_runtime((char_u *)"plugin/**/*.vim", TRUE); 571 # endif 568 572 TIME_MSG("loading plugins"); 569 573 } 570 574 #endif … … 1126 1130 */ 1127 1131 update_curswant(); 1128 1132 1133 #ifdef FEAT_EVAL 1134 /* 1135 * May perform garbage collection when waiting for a character, but 1136 * only at the very toplevel. Otherwise we may be using a List or 1137 * Dict internally somewhere. 1138 * "may_garbage_collect" is reset in vgetc() which is invoked through 1139 * do_exmode() and normal_cmd(). 1140 */ 1141 may_garbage_collect = (!cmdwin && !noexmode); 1142 #endif 1129 1143 /* 1130 1144 * If we're invoked as ex, do a round of ex commands. 1131 1145 * Otherwise, get and execute a normal mode command. … … 2281 2295 mparm_T *parmp; 2282 2296 { 2283 2297 #ifdef FEAT_WINDOWS 2284 int rewind;2298 int dorewind; 2285 2299 int done = 0; 2286 2300 2287 2301 /* … … 2338 2352 ++autocmd_no_leave; 2339 2353 #endif 2340 2354 #ifdef FEAT_WINDOWS 2341 rewind = TRUE;2355 dorewind = TRUE; 2342 2356 while (done++ < 1000) 2343 2357 { 2344 if ( rewind)2358 if (dorewind) 2345 2359 { 2346 2360 if (parmp->window_layout == WIN_TABS) 2347 2361 goto_tabpage(1); … … 2360 2374 break; 2361 2375 curwin = curwin->w_next; 2362 2376 } 2363 rewind = FALSE;2377 dorewind = FALSE; 2364 2378 #endif 2365 2379 curbuf = curwin->w_buffer; 2366 2380 if (curbuf->b_ml.ml_mfp == NULL) … … 2381 2395 check_swap_exists_action(); 2382 2396 #endif 2383 2397 #ifdef FEAT_AUTOCMD 2384 rewind = TRUE; /* start again */2398 dorewind = TRUE; /* start again */ 2385 2399 #endif 2386 2400 } 2387 2401 #ifdef FEAT_WINDOWS … … 3208 3222 * Register for remote command execution with :serversend and --remote 3209 3223 * unless there was a -X or a --servername '' on the command line. 3210 3224 * Only register nongui-vim's with an explicit --servername argument. 3225 * When running as root --servername is also required. 3211 3226 */ 3212 3227 if (X_DISPLAY != NULL && parmp->servername != NULL && ( 3213 3228 # ifdef FEAT_GUI 3214 gui.in_use || 3229 (gui.in_use 3230 # ifdef UNIX 3231 && getuid() != 0 3232 # endif 3233 ) || 3215 3234 # endif 3216 3235 parmp->serverName_arg != NULL)) 3217 3236 { -
src/Makefile
diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
old new 2177 2177 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* . 2178 2178 if test -d $(RSRC_DIR); then \ 2179 2179 cd $(SHADOWDIR); \ 2180 ln -s ../infplist.xml .; \ 2180 2181 ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \ 2181 2182 fi 2182 2183 mkdir $(SHADOWDIR)/testdir … … 2260 2261 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in 2261 2262 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh 2262 2263 2263 QUOTESED = sed -e 's/ "/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'2264 QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/' 2264 2265 auto/pathdef.c: Makefile auto/config.mk 2265 2266 -@echo creating $@ 2266 2267 -@echo '/* pathdef.c */' > $@ -
src/mbyte.c
diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c
old new 311 311 312 312 #define IDX_MACROMAN 57 313 313 {"macroman", ENC_8BIT + ENC_MACROMAN, 0}, /* Mac OS */ 314 #define IDX_COUNT 58 314 #define IDX_DECMCS 58 315 {"dec-mcs", ENC_8BIT, 0}, /* DEC MCS */ 316 #define IDX_HPROMAN8 59 317 {"hp-roman8", ENC_8BIT, 0}, /* HP Roman8 */ 318 #define IDX_COUNT 60 315 319 }; 316 320 317 321 /* … … 359 363 {"932", IDX_CP932}, 360 364 {"949", IDX_CP949}, 361 365 {"936", IDX_CP936}, 366 {"gbk", IDX_CP936}, 367 {"gb18030", IDX_CP936}, /* only 99% the same */ 362 368 {"950", IDX_CP950}, 363 369 {"eucjp", IDX_EUC_JP}, 364 370 {"unix-jis", IDX_EUC_JP}, … … 386 392 {"950", IDX_BIG5}, 387 393 #endif 388 394 {"mac", IDX_MACROMAN}, 395 {"mac-roman", IDX_MACROMAN}, 389 396 {NULL, 0} 390 397 }; 391 398 … … 3507 3514 add_to_input_buf(delkey, (int)sizeof(delkey)); 3508 3515 } 3509 3516 3517 /* 3518 * Move the cursor left by "num_move_back" characters. 3519 * Note that ins_left() checks im_is_preediting() to avoid breaking undo for 3520 * these K_LEFT keys. 3521 */ 3510 3522 static void 3511 3523 im_correct_cursor(int num_move_back) 3512 3524 { … … 3734 3746 } 3735 3747 else if (cursor_index == 0 && preedit_string[0] == '\0') 3736 3748 { 3737 if (preedit_start_col == MAXCOL) 3738 xim_has_preediting = FALSE; 3749 xim_has_preediting = FALSE; 3739 3750 3740 3751 /* If at the start position (after typing backspace) 3741 3752 * preedit_start_col must be reset. */ … … 3850 3861 3851 3862 if (preedit_string != NULL && attr_list != NULL) 3852 3863 { 3853 int i ndex;3864 int idx; 3854 3865 3855 3866 /* Get the byte index as used by PangoAttrIterator */ 3856 for (i ndex = 0; col > 0 && preedit_string[index] != '\0'; --col)3857 i ndex += utfc_ptr2len((char_u *)preedit_string + index);3867 for (idx = 0; col > 0 && preedit_string[idx] != '\0'; --col) 3868 idx += utfc_ptr2len((char_u *)preedit_string + idx); 3858 3869 3859 if (preedit_string[i ndex] != '\0')3870 if (preedit_string[idx] != '\0') 3860 3871 { 3861 3872 PangoAttrIterator *iter; 3862 3873 int start, end; … … 3869 3880 { 3870 3881 pango_attr_iterator_range(iter, &start, &end); 3871 3882 3872 if (i ndex >= start && index < end)3883 if (idx >= start && idx < end) 3873 3884 char_attr |= translate_pango_attributes(iter); 3874 3885 } 3875 3886 while (pango_attr_iterator_next(iter)); -
src/memline.c
diff -Naur vim70.orig/src/memline.c vim70/src/memline.c
old new 215 215 #define ML_FLUSH 0x02 /* flush locked block */ 216 216 #define ML_SIMPLE(x) (x & 0x10) /* DEL, INS or FIND */ 217 217 218 static void ml_upd_block0 __ARGS((buf_T *buf, int set fname));218 static void ml_upd_block0 __ARGS((buf_T *buf, int set_fname)); 219 219 static void set_b0_fname __ARGS((ZERO_BL *, buf_T *buf)); 220 220 static void set_b0_dir_flag __ARGS((ZERO_BL *b0p, buf_T *buf)); 221 221 #ifdef FEAT_MBYTE … … 679 679 * Update the timestamp or the B0_SAME_DIR flag of the .swp file. 680 680 */ 681 681 static void 682 ml_upd_block0(buf, set fname)682 ml_upd_block0(buf, set_fname) 683 683 buf_T *buf; 684 int set fname;684 int set_fname; 685 685 { 686 686 memfile_T *mfp; 687 687 bhdr_T *hp; … … 695 695 EMSG(_("E304: ml_upd_block0(): Didn't get block 0??")); 696 696 else 697 697 { 698 if (set fname)698 if (set_fname) 699 699 set_b0_fname(b0p, buf); 700 700 else 701 701 set_b0_dir_flag(b0p, buf); -
src/menu.c
diff -Naur vim70.orig/src/menu.c vim70/src/menu.c
old new 511 511 * name (without mnemonic and accelerator text). */ 512 512 next_name = menu_name_skip(name); 513 513 dname = menu_text(name, NULL, NULL); 514 if (dname == NULL) 515 goto erret; 516 if (*dname == NUL) 517 { 518 /* Only a mnemonic or accelerator is not valid. */ 519 EMSG(_("E792: Empty menu name")); 520 goto erret; 521 } 514 522 515 523 /* See if it's already there */ 516 524 lower_pri = menup; … … 704 712 parent = menu; 705 713 name = next_name; 706 714 vim_free(dname); 715 dname = NULL; 707 716 if (pri_tab[pri_idx + 1] != -1) 708 717 ++pri_idx; 709 718 } … … 793 802 erret: 794 803 vim_free(path_name); 795 804 vim_free(dname); 805 806 /* Delete any empty submenu we added before discovering the error. Repeat 807 * for higher levels. */ 808 while (parent != NULL && parent->children == NULL) 809 { 810 if (parent->parent == NULL) 811 menup = &root_menu; 812 else 813 menup = &parent->parent->children; 814 for ( ; *menup != NULL && *menup != parent; menup = &((*menup)->next)) 815 ; 816 if (*menup == NULL) /* safety check */ 817 break; 818 parent = parent->parent; 819 free_menu(menup); 820 } 796 821 return FAIL; 797 822 } 798 823 … … 1753 1778 } 1754 1779 1755 1780 /* 1781 * Check that a pointer appears in the menu tree. Used to protect from using 1782 * a menu that was deleted after it was selected but before the event was 1783 * handled. 1784 * Return OK or FAIL. Used recursively. 1785 */ 1786 int 1787 check_menu_pointer(root, menu_to_check) 1788 vimmenu_T *root; 1789 vimmenu_T *menu_to_check; 1790 { 1791 vimmenu_T *p; 1792 1793 for (p = root; p != NULL; p = p->next) 1794 if (p == menu_to_check 1795 || (p->children != NULL 1796 && check_menu_pointer(p->children, menu_to_check) == OK)) 1797 return OK; 1798 return FAIL; 1799 } 1800 1801 /* 1756 1802 * After we have started the GUI, then we can create any menus that have been 1757 1803 * defined. This is done once here. add_menu_path() may have already been 1758 1804 * called to define these menus, and may be called again. This function calls -
src/message.c
diff -Naur vim70.orig/src/message.c vim70/src/message.c
old new 1925 1925 * If screen is completely filled and 'more' is set then wait 1926 1926 * for a character. 1927 1927 */ 1928 if (p_more && --lines_left == 0 && State != HITRETURN 1928 --lines_left; 1929 if (p_more && lines_left == 0 && State != HITRETURN 1929 1930 && !msg_no_more && !exmode_active) 1930 1931 { 1931 1932 #ifdef FEAT_CON_DIALOG … … 4175 4176 str_arg_l = 0; 4176 4177 else 4177 4178 { 4178 /* memchr on HP does not like n > 2^31 !!! */4179 char *q = memchr(str_arg, '\0',4179 /* Don't put the #if inside memchr(), it can be a 4180 * macro. */ 4180 4181 #if SIZEOF_INT <= 2 4181 precision4182 char *q = memchr(str_arg, '\0', precision); 4182 4183 #else 4183 precision <= (size_t)0x7fffffffL ? precision 4184 : (size_t)0x7fffffffL 4184 /* memchr on HP does not like n > 2^31 !!! */ 4185 char *q = memchr(str_arg, '\0', 4186 precision <= (size_t)0x7fffffffL ? precision 4187 : (size_t)0x7fffffffL); 4185 4188 #endif 4186 );4187 4189 str_arg_l = (q == NULL) ? precision : q - str_arg; 4188 4190 } 4189 4191 break; -
src/misc1.c
diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c
old new 3016 3016 int len = 0; 3017 3017 int n; 3018 3018 int save_mapped_ctrl_c = mapped_ctrl_c; 3019 int waited = 0; 3019 3020 3020 3021 mapped_ctrl_c = FALSE; /* mappings are not used here */ 3021 3022 for (;;) … … 3034 3035 /* Replace zero and CSI by a special key code. */ 3035 3036 n = fix_input_buffer(buf + len, n, FALSE); 3036 3037 len += n; 3038 waited = 0; 3037 3039 } 3040 else if (len > 0) 3041 ++waited; /* keep track of the waiting time */ 3038 3042 3039 /* incomplete termcode: get more characters */ 3040 if ((n = check_termcode(1, buf, len)) < 0) 3043 /* Incomplete termcode and not timed out yet: get more characters */ 3044 if ((n = check_termcode(1, buf, len)) < 0 3045 && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm))) 3041 3046 continue; 3047 3042 3048 /* found a termcode: adjust length */ 3043 3049 if (n > 0) 3044 3050 len = n; … … 3196 3202 else 3197 3203 MSG_PUTS(_("Choice number (<Enter> cancels): ")); 3198 3204 3199 /* Set the state such that text can be selected/copied/pasted. */ 3205 /* Set the state such that text can be selected/copied/pasted and we still 3206 * get mouse events. */ 3200 3207 save_cmdline_row = cmdline_row; 3201 cmdline_row = Rows - 1;3208 cmdline_row = 0; 3202 3209 save_State = State; 3203 if (mouse_used == NULL) 3204 State = CMDLINE; 3205 else 3206 State = NORMAL; 3210 State = CMDLINE; 3207 3211 3208 3212 i = get_number(TRUE, mouse_used); 3209 3213 if (KeyTyped) … … 4492 4496 int l = mb_ptr2len(s); 4493 4497 4494 4498 while (--l > 0) 4495 *d++ = * s++;4499 *d++ = *++s; 4496 4500 } 4497 4501 # endif 4498 4502 } … … 8070 8074 } 8071 8075 if (*that == '"' && *(that + 1) != NUL) 8072 8076 { 8073 that++; 8074 while (*that && (*that != '"' || *(that - 1) == '\\')) 8075 ++that; 8077 while (*++that && *that != '"') 8078 { 8079 /* skipping escaped characters in the string */ 8080 if (*that == '\\') 8081 { 8082 if (*++that == NUL) 8083 break; 8084 if (that[1] == NUL) 8085 { 8086 ++that; 8087 break; 8088 } 8089 } 8090 } 8076 8091 } 8077 8092 if (*that == '(' || *that == '[') 8078 8093 ++parencount; -
src/netbeans.c
diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c
old new 103 103 static int inputHandler = -1; /* simply ret.value of WSAAsyncSelect() */ 104 104 extern HWND s_hwnd; /* Gvim's Window handle */ 105 105 #endif 106 static int cmdno; /* current command number for reply */106 static int r_cmdno; /* current command number for reply */ 107 107 static int haveConnection = FALSE; /* socket is connected and 108 108 initialization is done */ 109 109 #ifdef FEAT_GUI_MOTIF … … 832 832 return; 833 833 } 834 834 835 cmdno = strtol(q, &q, 10);835 r_cmdno = strtol(q, &q, 10); 836 836 837 837 q = (char *)skipwhite((char_u *)q); 838 838 839 if (nb_do_cmd(bufno, (char_u *)verb, isfunc, cmdno, (char_u *)q) == FAIL)839 if (nb_do_cmd(bufno, (char_u *)verb, isfunc, r_cmdno, (char_u *)q) == FAIL) 840 840 { 841 841 #ifdef NBDEBUG 842 842 /* … … 1008 1008 if (netbeansForcedQuit) 1009 1009 { 1010 1010 /* mark as unmodified so NetBeans won't put up dialog on "killed" */ 1011 sprintf(buf, "%d:unmodified=%d\n", i, cmdno);1011 sprintf(buf, "%d:unmodified=%d\n", i, r_cmdno); 1012 1012 nbdebug(("EVT: %s", buf)); 1013 1013 nb_send(buf, "netbeans_end"); 1014 1014 } 1015 sprintf(buf, "%d:killed=%d\n", i, cmdno);1015 sprintf(buf, "%d:killed=%d\n", i, r_cmdno); 1016 1016 nbdebug(("EVT: %s", buf)); 1017 1017 /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */ 1018 1018 if (sd >= 0) … … 1986 1986 if (buf->bufp != NULL) 1987 1987 do_buffer(DOBUF_WIPE, DOBUF_FIRST, FORWARD, 1988 1988 buf->bufp->b_fnum, TRUE); 1989 buf->bufp = NULL; 1990 buf->initDone = FALSE; 1989 1991 doupdate = 1; 1990 1992 /* =====================================================================*/ 1991 1993 } … … 2561 2563 if (p != NULL) 2562 2564 { 2563 2565 vim_snprintf(buf, sizeof(buf), 2564 "0:balloonText=%d \"%s\"\n", cmdno, p);2566 "0:balloonText=%d \"%s\"\n", r_cmdno, p); 2565 2567 vim_free(p); 2566 2568 } 2567 2569 nbdebug(("EVT: %s", buf)); … … 2615 2617 2616 2618 if (haveConnection) 2617 2619 { 2618 sprintf(buf, "0:disconnect=%d\n", cmdno);2620 sprintf(buf, "0:disconnect=%d\n", r_cmdno); 2619 2621 nbdebug(("EVT: %s", buf)); 2620 2622 nb_send(buf, "netbeans_disconnect"); 2621 2623 } … … 2634 2636 return; 2635 2637 2636 2638 sprintf(buf, "0:geometry=%d %d %d %d %d\n", 2637 cmdno, (int)Columns, (int)Rows, new_x, new_y);2639 r_cmdno, (int)Columns, (int)Rows, new_x, new_y); 2638 2640 /*nbdebug(("EVT: %s", buf)); happens too many times during a move */ 2639 2641 nb_send(buf, "netbeans_frame_moved"); 2640 2642 } … … 2743 2745 if (bufno <= 0) 2744 2746 return; 2745 2747 2746 sprintf(buffer, "%d:killed=%d\n", bufno, cmdno);2748 sprintf(buffer, "%d:killed=%d\n", bufno, r_cmdno); 2747 2749 2748 2750 nbdebug(("EVT: %s", buffer)); 2749 2751 … … 2817 2819 if (p != NULL) 2818 2820 { 2819 2821 buf = alloc(128 + 2*newlen); 2820 sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", bufno, cmdno, off, p); 2822 sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", 2823 bufno, r_cmdno, off, p); 2821 2824 nbdebug(("EVT: %s", buf)); 2822 2825 nb_send((char *)buf, "netbeans_inserted"); 2823 2826 vim_free(p); … … 2859 2862 2860 2863 off = pos2off(bufp, &pos); 2861 2864 2862 sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, cmdno, off, len);2865 sprintf((char *)buf, "%d:remove=%d %ld %ld\n", bufno, r_cmdno, off, len); 2863 2866 nbdebug(("EVT: %s", buf)); 2864 2867 nb_send((char *)buf, "netbeans_removed"); 2865 2868 } … … 2884 2887 2885 2888 nbbuf->modified = 0; 2886 2889 2887 sprintf((char *)buf, "%d:unmodified=%d\n", bufno, cmdno);2890 sprintf((char *)buf, "%d:unmodified=%d\n", bufno, r_cmdno); 2888 2891 nbdebug(("EVT: %s", buf)); 2889 2892 nb_send((char *)buf, "netbeans_unmodified"); 2890 2893 #endif … … 2908 2911 long off = pos2off(curbuf, &curwin->w_cursor); 2909 2912 2910 2913 /* sync the cursor position */ 2911 sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);2914 sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off); 2912 2915 nbdebug(("EVT: %s", buf)); 2913 2916 nb_send(buf, "netbeans_button_release[newDotAndMark]"); 2914 2917 2915 sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, cmdno,2918 sprintf(buf, "%d:buttonRelease=%d %d %ld %d\n", bufno, r_cmdno, 2916 2919 button, (long)curwin->w_cursor.lnum, col); 2917 2920 nbdebug(("EVT: %s", buf)); 2918 2921 nb_send(buf, "netbeans_button_release"); … … 2973 2976 2974 2977 /* sync the cursor position */ 2975 2978 off = pos2off(curbuf, &curwin->w_cursor); 2976 sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);2979 sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, r_cmdno, off, off); 2977 2980 nbdebug(("EVT: %s", buf)); 2978 2981 nb_send(buf, "netbeans_keycommand"); 2979 2982 … … 2984 2987 2985 2988 /* now send keyCommand event */ 2986 2989 vim_snprintf(buf, sizeof(buf), "%d:keyCommand=%d \"%s\"\n", 2987 bufno,cmdno, keyName);2990 bufno, r_cmdno, keyName); 2988 2991 nbdebug(("EVT: %s", buf)); 2989 2992 nb_send(buf, "netbeans_keycommand"); 2990 2993 2991 2994 /* New: do both at once and include the lnum/col. */ 2992 2995 vim_snprintf(buf, sizeof(buf), "%d:keyAtPos=%d \"%s\" %ld %ld/%ld\n", 2993 bufno, cmdno, keyName,2996 bufno, r_cmdno, keyName, 2994 2997 off, (long)curwin->w_cursor.lnum, (long)curwin->w_cursor.col); 2995 2998 nbdebug(("EVT: %s", buf)); 2996 2999 nb_send(buf, "netbeans_keycommand"); … … 3013 3016 3014 3017 nbbuf->modified = 0; 3015 3018 3016 sprintf((char *)buf, "%d:save=%d\n", bufno, cmdno);3019 sprintf((char *)buf, "%d:save=%d\n", bufno, r_cmdno); 3017 3020 nbdebug(("EVT: %s", buf)); 3018 3021 nb_send((char *)buf, "netbeans_save_buffer"); 3019 3022 } … … 3037 3040 if (nbbuf->insertDone) 3038 3041 nbbuf->modified = 1; 3039 3042 3040 sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, cmdno);3043 sprintf((char *)buf, "%d:remove=%d 0 -1\n", bufno, r_cmdno); 3041 3044 nbdebug(("EVT(suppressed): %s", buf)); 3042 3045 /* nb_send(buf, "netbeans_deleted_all_lines"); */ 3043 3046 } -
src/normal.c
diff -Naur vim70.orig/src/normal.c vim70/src/normal.c
old new 2504 2504 * NOTE: Ignore right button down and drag mouse events. 2505 2505 * Windows only shows the popup menu on the button up event. 2506 2506 */ 2507 #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) 2507 #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \ 2508 || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) 2508 2509 if (!is_click) 2509 2510 return FALSE; 2510 2511 #endif … … 4126 4127 int save_p_ws; 4127 4128 int save_p_scs; 4128 4129 int retval = OK; 4129 int incl ;4130 int incll; 4130 4131 4131 4132 if ((pat = alloc(len + 7)) == NULL) 4132 4133 return FAIL; … … 4146 4147 * With "gd" Search back for the start of the current function, then go 4147 4148 * back until a blank line. If this fails go to line 1. 4148 4149 */ 4149 if (!locally || !findpar(&incl , BACKWARD, 1L, '{', FALSE))4150 if (!locally || !findpar(&incll, BACKWARD, 1L, '{', FALSE)) 4150 4151 { 4151 4152 setpcmark(); /* Set in findpar() otherwise */ 4152 4153 curwin->w_cursor.lnum = 1; -
src/ops.c
diff -Naur vim70.orig/src/ops.c vim70/src/ops.c
old new 2413 2413 else 2414 2414 { 2415 2415 curwin->w_cursor = oap->end; 2416 check_cursor_col(); 2416 2417 2417 2418 /* Works just like an 'i'nsert on the next character. */ 2418 2419 if (!lineempty(curwin->w_cursor.lnum) … … 3492 3493 # endif 3493 3494 if (flags & PUT_CURSEND) 3494 3495 { 3496 colnr_T len; 3497 3495 3498 curwin->w_cursor = curbuf->b_op_end; 3496 3499 curwin->w_cursor.col++; 3500 3501 /* in Insert mode we might be after the NUL, correct for that */ 3502 len = (colnr_T)STRLEN(ml_get_curline()); 3503 if (curwin->w_cursor.col > len) 3504 curwin->w_cursor.col = len; 3497 3505 } 3498 3506 else 3499 3507 curwin->w_cursor.lnum = lnum; -
src/option.c
diff -Naur vim70.orig/src/option.c vim70/src/option.c
old new 2294 2294 {(char_u *)0L, (char_u *)0L} 2295 2295 #endif 2296 2296 }, 2297 {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE ,2297 {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_COMMA, 2298 2298 #ifdef FEAT_SPELL 2299 2299 (char_u *)&p_sps, PV_NONE, 2300 2300 {(char_u *)"best", (char_u *)0L} … … 5227 5227 case PV_STL: return &curwin->w_p_stl_flags; 5228 5228 #endif 5229 5229 #ifdef FEAT_EVAL 5230 # ifdef FEAT_FOLDING 5230 5231 case PV_FDE: return &curwin->w_p_fde_flags; 5231 5232 case PV_FDT: return &curwin->w_p_fdt_flags; 5233 # endif 5232 5234 # ifdef FEAT_BEVAL 5233 5235 case PV_BEXPR: return &curbuf->b_p_bexpr_flags; 5234 5236 # endif 5235 #endif5236 #if defined(FEAT_EVAL)5237 5237 # if defined(FEAT_CINDENT) 5238 5238 case PV_INDE: return &curbuf->b_p_inde_flags; 5239 5239 # endif … … 5268 5268 char_u *s; 5269 5269 char_u **varp; 5270 5270 int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0; 5271 int idx = opt_idx; 5271 5272 5272 if ( opt_idx == -1) /* use name */5273 if (idx == -1) /* use name */ 5273 5274 { 5274 opt_idx = findoption(name);5275 if ( opt_idx < 0) /* not found (should not happen) */5275 idx = findoption(name); 5276 if (idx < 0) /* not found (should not happen) */ 5276 5277 { 5277 5278 EMSG2(_(e_intern2), "set_string_option_direct()"); 5278 5279 return; 5279 5280 } 5280 5281 } 5281 5282 5282 if (options[ opt_idx].var == NULL) /* can't set hidden option */5283 if (options[idx].var == NULL) /* can't set hidden option */ 5283 5284 return; 5284 5285 5285 5286 s = vim_strsave(val); 5286 5287 if (s != NULL) 5287 5288 { 5288 varp = (char_u **)get_varp_scope(&(options[ opt_idx]),5289 varp = (char_u **)get_varp_scope(&(options[idx]), 5289 5290 both ? OPT_LOCAL : opt_flags); 5290 if ((opt_flags & OPT_FREE) && (options[ opt_idx].flags & P_ALLOCED))5291 if ((opt_flags & OPT_FREE) && (options[idx].flags & P_ALLOCED)) 5291 5292 free_string_option(*varp); 5292 5293 *varp = s; 5293 5294 5294 5295 /* For buffer/window local option may also set the global value. */ 5295 5296 if (both) 5296 set_string_option_global( opt_idx, varp);5297 set_string_option_global(idx, varp); 5297 5298 5298 options[ opt_idx].flags |= P_ALLOCED;5299 options[idx].flags |= P_ALLOCED; 5299 5300 5300 5301 /* When setting both values of a global option with a local value, 5301 5302 * make the local value empty, so that the global value is used. */ 5302 if (((int)options[ opt_idx].indir & PV_BOTH) && both)5303 if (((int)options[idx].indir & PV_BOTH) && both) 5303 5304 { 5304 5305 free_string_option(*varp); 5305 5306 *varp = empty_option; 5306 5307 } 5307 5308 # ifdef FEAT_EVAL 5308 5309 if (set_sid != SID_NONE) 5309 set_option_scriptID_idx( opt_idx, opt_flags,5310 set_option_scriptID_idx(idx, opt_flags, 5310 5311 set_sid == 0 ? current_SID : set_sid); 5311 5312 # endif 5312 5313 } … … 6325 6326 else 6326 6327 errmsg = check_stl_option(p_ruf); 6327 6328 } 6328 else 6329 /* check 'statusline' only if it doesn't start with "%!" */ 6330 else if (varp != &p_stl || s[0] != '%' || s[1] != '!') 6329 6331 errmsg = check_stl_option(s); 6330 6332 if (varp == &p_ruf && errmsg == NULL) 6331 6333 comp_col(); … … 7324 7326 #ifdef FEAT_AUTOCHDIR 7325 7327 else if ((int *)varp == &p_acd) 7326 7328 { 7327 if (p_acd && curbuf->b_ffname != NULL 7328 && vim_chdirfile(curbuf->b_ffname) == OK) 7329 shorten_fnames(TRUE); 7329 /* Change directories when the 'acd' option is set now. */ 7330 DO_AUTOCHDIR 7330 7331 } 7331 7332 #endif 7332 7333 -
src/os_unix.c
diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c
old new 3934 3934 { 3935 3935 linenr_T lnum = curbuf->b_op_start.lnum; 3936 3936 int written = 0; 3937 char_u * p = ml_get(lnum);3937 char_u *lp = ml_get(lnum); 3938 3938 char_u *s; 3939 3939 size_t l; 3940 3940 … … 3942 3942 close(fromshell_fd); 3943 3943 for (;;) 3944 3944 { 3945 l = STRLEN( p + written);3945 l = STRLEN(lp + written); 3946 3946 if (l == 0) 3947 3947 len = 0; 3948 else if ( p[written] == NL)3948 else if (lp[written] == NL) 3949 3949 /* NL -> NUL translation */ 3950 3950 len = write(toshell_fd, "", (size_t)1); 3951 3951 else 3952 3952 { 3953 s = vim_strchr( p + written, NL);3954 len = write(toshell_fd, (char *) p + written,3955 s == NULL ? l : s - ( p + written));3953 s = vim_strchr(lp + written, NL); 3954 len = write(toshell_fd, (char *)lp + written, 3955 s == NULL ? l : s - (lp + written)); 3956 3956 } 3957 3957 if (len == l) 3958 3958 { … … 3973 3973 toshell_fd = -1; 3974 3974 break; 3975 3975 } 3976 p = ml_get(lnum);3976 lp = ml_get(lnum); 3977 3977 written = 0; 3978 3978 } 3979 3979 else if (len > 0) … … 4971 4971 if (((*file)[*num_file] = alloc(len + 2)) != NULL) 4972 4972 { 4973 4973 STRCPY((*file)[*num_file], p); 4974 if (!after_pathsep((*file)[*num_file] + len)) 4974 if (!after_pathsep((*file)[*num_file], 4975 (*file)[*num_file] + len)) 4975 4976 { 4976 4977 (*file)[*num_file][len] = psepc; 4977 4978 (*file)[*num_file][len + 1] = NUL; … … 5757 5758 int retval_int = 0; 5758 5759 int success = FALSE; 5759 5760 5760 /* Get a handle to the DLL module. */ 5761 /* 5762 * Get a handle to the DLL module. 5763 */ 5761 5764 # if defined(USE_DLOPEN) 5765 /* First clear any error, it's not cleared by the dlopen() call. */ 5766 (void)dlerror(); 5767 5762 5768 hinstLib = dlopen((char *)libname, RTLD_LAZY 5763 5769 # ifdef RTLD_LOCAL 5764 5770 | RTLD_LOCAL -
src/popupmnu.c
diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c
old new 552 552 { 553 553 pum_array = NULL; 554 554 redraw_all_later(SOME_VALID); 555 #ifdef FEAT_WINDOWS 556 redraw_tabline = TRUE; 557 #endif 555 558 status_redraw_all(); 556 559 } 557 560 -
src/proto/buffer.pro
diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro
old new 10 10 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit)); 11 11 extern void set_curbuf __ARGS((buf_T *buf, int action)); 12 12 extern void enter_buffer __ARGS((buf_T *buf)); 13 extern void do_autochdir __ARGS((void)); 13 14 extern buf_T *buflist_new __ARGS((char_u *ffname, char_u *sfname, linenr_T lnum, int flags)); 14 15 extern void free_buf_options __ARGS((buf_T *buf, int free_p_ff)); 15 16 extern int buflist_getfile __ARGS((int n, linenr_T lnum, int options, int forceit)); -
src/proto/menu.pro
diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro
old new 10 10 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu)); 11 11 extern int menu_is_toolbar __ARGS((char_u *name)); 12 12 extern int menu_is_separator __ARGS((char_u *name)); 13 extern int check_menu_pointer __ARGS((vimmenu_T *root, vimmenu_T *menu_to_check)); 13 14 extern void gui_create_initial_menus __ARGS((vimmenu_T *menu)); 14 15 extern void gui_update_menus __ARGS((int modes)); 15 16 extern int gui_is_menu_shortcut __ARGS((int key)); -
src/proto/undo.pro
diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro
old new 4 4 extern int u_savesub __ARGS((linenr_T lnum)); 5 5 extern int u_inssub __ARGS((linenr_T lnum)); 6 6 extern int u_savedel __ARGS((linenr_T lnum, long nlines)); 7 extern int undo_allowed __ARGS((void)); 7 8 extern void u_undo __ARGS((int count)); 8 9 extern void u_redo __ARGS((int count)); 9 10 extern void undo_time __ARGS((long step, int sec, int absolute)); -
src/quickfix.c
diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c
old new 500 500 { 501 501 if (tv != NULL) 502 502 { 503 int len;504 505 503 if (tv->v_type == VAR_STRING) 506 504 { 507 505 /* Get the next line from the supplied string */ … … 602 600 else 603 601 type = 0; 604 602 /* 605 * Extract error message data from matched line 603 * Extract error message data from matched line. 604 * We check for an actual submatch, because "\[" and "\]" in 605 * the 'errorformat' may cause the wrong submatch to be used. 606 606 */ 607 607 if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */ 608 608 { 609 int c = *regmatch.endp[i]; 609 int c; 610 611 if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) 612 continue; 610 613 611 614 /* Expand ~/file and $HOME/file to full path. */ 615 c = *regmatch.endp[i]; 612 616 *regmatch.endp[i] = NUL; 613 617 expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE); 614 618 *regmatch.endp[i] = c; … … 618 622 continue; 619 623 } 620 624 if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */ 625 { 626 if (regmatch.startp[i] == NULL) 627 continue; 621 628 enr = (int)atol((char *)regmatch.startp[i]); 629 } 622 630 if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */ 631 { 632 if (regmatch.startp[i] == NULL) 633 continue; 623 634 lnum = atol((char *)regmatch.startp[i]); 635 } 624 636 if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */ 637 { 638 if (regmatch.startp[i] == NULL) 639 continue; 625 640 col = (int)atol((char *)regmatch.startp[i]); 641 } 626 642 if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */ 643 { 644 if (regmatch.startp[i] == NULL) 645 continue; 627 646 type = *regmatch.startp[i]; 647 } 628 648 if (fmt_ptr->flags == '+' && !multiscan) /* %+ */ 629 649 STRCPY(errmsg, IObuff); 630 650 else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */ 631 651 { 652 if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) 653 continue; 632 654 len = (int)(regmatch.endp[i] - regmatch.startp[i]); 633 655 vim_strncpy(errmsg, regmatch.startp[i], len); 634 656 } 635 657 if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */ 658 { 659 if (regmatch.startp[i] == NULL) 660 continue; 636 661 tail = regmatch.startp[i]; 662 } 637 663 if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */ 638 664 { 665 if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) 666 continue; 639 667 col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1); 640 668 if (*((char_u *)regmatch.startp[i]) != TAB) 641 669 use_viscol = TRUE; 642 670 } 643 671 if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */ 644 672 { 673 if (regmatch.startp[i] == NULL) 674 continue; 645 675 col = (int)atol((char *)regmatch.startp[i]); 646 676 use_viscol = TRUE; 647 677 } 648 678 if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */ 649 679 { 680 if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) 681 continue; 650 682 len = (int)(regmatch.endp[i] - regmatch.startp[i]); 651 683 if (len > CMDBUFFSIZE - 5) 652 684 len = CMDBUFFSIZE - 5; … … 2429 2461 qf_info_T *qi; 2430 2462 { 2431 2463 buf_T *buf; 2432 #ifdef FEAT_AUTOCMD2433 2464 aco_save_T aco; 2434 #else2435 buf_T *save_curbuf;2436 #endif2437 2465 2438 2466 /* Check if a buffer for the quickfix list exists. Update it. */ 2439 2467 buf = qf_find_buf(qi); 2440 2468 if (buf != NULL) 2441 2469 { 2442 #ifdef FEAT_AUTOCMD2443 2470 /* set curwin/curbuf to buf and save a few things */ 2444 2471 aucmd_prepbuf(&aco, buf); 2445 #else2446 save_curbuf = curbuf;2447 curbuf = buf;2448 #endif2449 2472 2450 2473 qf_fill_buffer(qi); 2451 2474 2452 #ifdef FEAT_AUTOCMD2453 2475 /* restore curwin/curbuf and a few other things */ 2454 2476 aucmd_restbuf(&aco); 2455 #else2456 curbuf = save_curbuf;2457 #endif2458 2477 2459 2478 (void)qf_win_pos_update(qi, 0); 2460 2479 } … … 2943 2962 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) 2944 2963 char_u *save_ei = NULL; 2945 2964 #endif 2946 #ifndef FEAT_AUTOCMD2947 buf_T *save_curbuf;2948 #else2949 2965 aco_save_T aco; 2966 #ifdef FEAT_AUTOCMD 2950 2967 char_u *au_name = NULL; 2951 2968 int flags = 0; 2952 2969 colnr_T col; … … 3167 3184 * need to be done now, in that buffer. And the modelines 3168 3185 * need to be done (again). But not the window-local 3169 3186 * options! */ 3170 #if defined(FEAT_AUTOCMD)3171 3187 aucmd_prepbuf(&aco, buf); 3172 #else3173 save_curbuf = curbuf;3174 curbuf = buf;3175 curwin->w_buffer = curbuf;3176 #endif3177 3188 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) 3178 3189 apply_autocmds(EVENT_FILETYPE, buf->b_p_ft, 3179 3190 buf->b_fname, TRUE, buf); 3180 3191 #endif 3181 3192 do_modelines(OPT_NOWIN); 3182 #if defined(FEAT_AUTOCMD)3183 3193 aucmd_restbuf(&aco); 3184 #else3185 curbuf = save_curbuf;3186 curwin->w_buffer = curbuf;3187 #endif3188 3194 } 3189 3195 } 3190 3196 } … … 3285 3291 { 3286 3292 buf_T *newbuf; 3287 3293 int failed = TRUE; 3288 #ifdef FEAT_AUTOCMD3289 3294 aco_save_T aco; 3290 #else3291 buf_T *old_curbuf = curbuf;3292 #endif3293 3295 3294 3296 /* Allocate a buffer without putting it in the buffer list. */ 3295 3297 newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY); … … 3299 3301 /* Init the options. */ 3300 3302 buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP); 3301 3303 3302 #ifdef FEAT_AUTOCMD3303 3304 /* set curwin/curbuf to buf and save a few things */ 3304 3305 aucmd_prepbuf(&aco, newbuf); 3305 #else3306 curbuf = newbuf;3307 curwin->w_buffer = newbuf;3308 #endif3309 3306 3310 3307 /* Need to set the filename for autocommands. */ 3311 3308 (void)setfname(curbuf, fname, NULL, FALSE); … … 3336 3333 } 3337 3334 } 3338 3335 3339 #ifdef FEAT_AUTOCMD3340 3336 /* restore curwin/curbuf and a few other things */ 3341 3337 aucmd_restbuf(&aco); 3342 #else3343 curbuf = old_curbuf;3344 curwin->w_buffer = old_curbuf;3345 #endif3346 3338 3347 3339 if (!buf_valid(newbuf)) 3348 3340 return NULL; … … 3434 3426 || dict_add_nr_str(dict, "col", (long)qfp->qf_col, NULL) == FAIL 3435 3427 || dict_add_nr_str(dict, "vcol", (long)qfp->qf_viscol, NULL) == FAIL 3436 3428 || dict_add_nr_str(dict, "nr", (long)qfp->qf_nr, NULL) == FAIL 3437 || dict_add_nr_str(dict, "pattern", 0L, qfp->qf_pattern) == FAIL 3438 || dict_add_nr_str(dict, "text", 0L, qfp->qf_text) == FAIL 3429 || dict_add_nr_str(dict, "pattern", 0L, 3430 qfp->qf_pattern == NULL ? (char_u *)"" : qfp->qf_pattern) == FAIL 3431 || dict_add_nr_str(dict, "text", 0L, 3432 qfp->qf_text == NULL ? (char_u *)"" : qfp->qf_text) == FAIL 3439 3433 || dict_add_nr_str(dict, "type", 0L, buf) == FAIL 3440 3434 || dict_add_nr_str(dict, "valid", (long)qfp->qf_valid, NULL) == FAIL) 3441 3435 return FAIL; -
src/regexp.c
diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c
old new 3912 3912 { 3913 3913 colnr_T start, end; 3914 3914 colnr_T start2, end2; 3915 colnr_T col ;3915 colnr_T cols; 3916 3916 3917 3917 getvvcol(wp, &top, &start, NULL, &end); 3918 3918 getvvcol(wp, &bot, &start2, NULL, &end2); … … 3922 3922 end = end2; 3923 3923 if (top.col == MAXCOL || bot.col == MAXCOL) 3924 3924 end = MAXCOL; 3925 col = win_linetabsize(wp,3925 cols = win_linetabsize(wp, 3926 3926 regline, (colnr_T)(reginput - regline)); 3927 if (col < start || col> end - (*p_sel == 'e'))3927 if (cols < start || cols > end - (*p_sel == 'e')) 3928 3928 status = RA_NOMATCH; 3929 3929 } 3930 3930 } … … 4253 4253 { 4254 4254 int i, len; 4255 4255 char_u *opnd; 4256 int opndc , inpc;4256 int opndc = 0, inpc; 4257 4257 4258 4258 opnd = OPERAND(scan); 4259 4259 /* Safety check (just in case 'encoding' was changed since -
src/screen.c
diff -Naur vim70.orig/src/screen.c vim70/src/screen.c
old new 1228 1228 { 1229 1229 mid_end = wp->w_height; 1230 1230 if (lastwin == firstwin) 1231 { 1231 1232 screenclear(); 1233 #ifdef FEAT_WINDOWS 1234 /* The screen was cleared, redraw the tab pages line. */ 1235 if (redraw_tabline) 1236 draw_tabline(); 1237 #endif 1238 } 1232 1239 } 1233 1240 } 1234 1241 else … … 2612 2619 #ifdef FEAT_LINEBREAK 2613 2620 int need_showbreak = FALSE; 2614 2621 #endif 2615 #if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) 2622 #if defined(FEAT_SIGNS) || (defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)) \ 2623 || defined(FEAT_SYN_HL) || defined(FEAT_DIFF) 2616 2624 # define LINE_ATTR 2617 2625 int line_attr = 0; /* atrribute for the whole line */ 2618 2626 #endif … … 2626 2634 int prev_c = 0; /* previous Arabic character */ 2627 2635 int prev_c1 = 0; /* first composing char for prev_c */ 2628 2636 #endif 2629 #if defined( FEAT_DIFF) || defined(LINE_ATTR)2637 #if defined(LINE_ATTR) 2630 2638 int did_line_attr = 0; 2631 2639 #endif 2632 2640 … … 4116 4124 --ptr; /* put it back at the NUL */ 4117 4125 } 4118 4126 #endif 4119 #if defined( FEAT_DIFF) || defined(LINE_ATTR)4127 #if defined(LINE_ATTR) 4120 4128 else if (( 4121 4129 # ifdef FEAT_DIFF 4122 diff_hlf != (hlf_T)0 4123 # ifdef LINE_ATTR 4124 || 4125 # endif 4130 diff_hlf != (hlf_T)0 || 4126 4131 # endif 4127 # ifdef LINE_ATTR4128 4132 line_attr != 0 4129 # endif4130 4133 ) && ( 4131 4134 # ifdef FEAT_RIGHTLEFT 4132 4135 wp->w_p_rl ? (col >= 0) : … … 4237 4240 * At end of the text line or just after the last character. 4238 4241 */ 4239 4242 if (c == NUL 4240 #if defined( FEAT_DIFF) || defined(LINE_ATTR)4243 #if defined(LINE_ATTR) 4241 4244 || did_line_attr == 1 4242 4245 #endif 4243 4246 ) … … 4258 4261 || prevcol == (long)match_hl[0].startcol 4259 4262 || prevcol == (long)match_hl[1].startcol 4260 4263 || prevcol == (long)match_hl[2].startcol) 4261 # if defined( FEAT_DIFF) || defined(LINE_ATTR)4264 # if defined(LINE_ATTR) 4262 4265 && did_line_attr <= 1 4263 4266 # endif 4264 4267 ) … … 7103 7106 tabpage_T *tp; 7104 7107 #endif 7105 7108 static int entered = FALSE; /* avoid recursiveness */ 7106 static int d id_outofmem_msg = FALSE; /* did outofmem message */7109 static int done_outofmem_msg = FALSE; /* did outofmem message */ 7107 7110 7108 7111 /* 7109 7112 * Allocation of the screen buffers is done only when the size changes and … … 7133 7136 return; 7134 7137 entered = TRUE; 7135 7138 7139 /* 7140 * Note that the window sizes are updated before reallocating the arrays, 7141 * thus we must not redraw here! 7142 */ 7143 ++RedrawingDisabled; 7144 7136 7145 win_new_shellsize(); /* fit the windows in the new sized shell */ 7137 7146 7138 7147 comp_col(); /* recompute columns for shown command and ruler */ … … 7205 7214 #endif 7206 7215 || outofmem) 7207 7216 { 7208 if (ScreenLines != NULL || !d id_outofmem_msg)7217 if (ScreenLines != NULL || !done_outofmem_msg) 7209 7218 { 7210 7219 /* guess the size */ 7211 7220 do_outofmem_msg((long_u)((Rows + 1) * Columns)); 7212 7221 7213 7222 /* Remember we did this to avoid getting outofmem messages over 7214 7223 * and over again. */ 7215 d id_outofmem_msg = TRUE;7224 done_outofmem_msg = TRUE; 7216 7225 } 7217 7226 vim_free(new_ScreenLines); 7218 7227 new_ScreenLines = NULL; … … 7240 7249 } 7241 7250 else 7242 7251 { 7243 d id_outofmem_msg = FALSE;7252 done_outofmem_msg = FALSE; 7244 7253 7245 7254 for (new_row = 0; new_row < Rows; ++new_row) 7246 7255 { … … 7367 7376 #endif 7368 7377 7369 7378 entered = FALSE; 7379 --RedrawingDisabled; 7370 7380 7371 7381 #ifdef FEAT_AUTOCMD 7372 7382 if (starting == 0) -
src/search.c
diff -Naur vim70.orig/src/search.c vim70/src/search.c
old new 1259 1259 /* 1260 1260 * Add character and/or line offset 1261 1261 */ 1262 if (!(options & SEARCH_NOOF) || *pat == ';')1262 if (!(options & SEARCH_NOOF) || (pat != NULL && *pat == ';')) 1263 1263 { 1264 1264 if (spats[0].off.line) /* Add the offset to the line number. */ 1265 1265 { … … 4826 4826 4827 4827 if ((compl_cont_status & CONT_ADDING) && i == compl_length) 4828 4828 { 4829 /* get the next line */4830 4829 /* IOSIZE > compl_length, so the STRNCPY works */ 4831 4830 STRNCPY(IObuff, aux, i); 4832 if (!( depth < 0 4833 && lnum < end_lnum 4834 && (line = ml_get(++lnum)) != NULL) 4835 && !( depth >= 0 4836 && !vim_fgets(line = file_line, 4837 LSIZE, files[depth].fp))) 4831 4832 /* Get the next line: when "depth" < 0 from the current 4833 * buffer, otherwise from the included file. Jump to 4834 * exit_matched when past the last line. */ 4835 if (depth < 0) 4836 { 4837 if (lnum >= end_lnum) 4838 goto exit_matched; 4839 line = ml_get(++lnum); 4840 } 4841 else if (vim_fgets(line = file_line, 4842 LSIZE, files[depth].fp)) 4838 4843 goto exit_matched; 4839 4844 4840 4845 /* we read a line, set "already" to check this "line" later … … 4871 4876 goto exit_matched; 4872 4877 } 4873 4878 4874 add_r = ins_compl_add_infercase(aux, i, FALSE,4879 add_r = ins_compl_add_infercase(aux, i, p_ic, 4875 4880 curr_fname == curbuf->b_fname ? NULL : curr_fname, 4876 4881 dir, reuse); 4877 4882 if (add_r == OK) -
src/spell.c
diff -Naur vim70.orig/src/spell.c vim70/src/spell.c
old new 1483 1483 else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND 1484 1484 || !word_ends)) 1485 1485 { 1486 /* If there is no flag or the word is shorter than1486 /* If there is no compound flag or the word is shorter than 1487 1487 * COMPOUNDMIN reject it quickly. 1488 1488 * Makes you wonder why someone puts a compound flag on a word 1489 1489 * that's too short... Myspell compatibility requires this … … 2043 2043 int len; 2044 2044 # ifdef FEAT_SYN_HL 2045 2045 int has_syntax = syntax_present(wp->w_buffer); 2046 int col;2047 2046 # endif 2047 int col; 2048 2048 int can_spell; 2049 2049 char_u *buf = NULL; 2050 2050 int buflen = 0; … … 2093 2093 capcol = (int)(skipwhite(line) - line); 2094 2094 else if (curline && wp == curwin) 2095 2095 { 2096 int col = (int)(skipwhite(line) - line);2097 2098 2096 /* For spellbadword(): check if first word needs a capital. */ 2097 col = (int)(skipwhite(line) - line); 2099 2098 if (check_need_cap(lnum, col)) 2100 2099 capcol = col; 2101 2100 … … 2108 2107 * possible. */ 2109 2108 STRCPY(buf, line); 2110 2109 if (lnum < wp->w_buffer->b_ml.ml_line_count) 2111 spell_cat_line(buf + STRLEN(buf), ml_get(lnum + 1), MAXWLEN); 2110 spell_cat_line(buf + STRLEN(buf), 2111 ml_get_buf(wp->w_buffer, lnum + 1, FALSE), MAXWLEN); 2112 2112 2113 2113 p = buf + skip; 2114 2114 endp = buf + len; … … 5060 5060 int do_rep; 5061 5061 int do_repsal; 5062 5062 int do_sal; 5063 int do_map ;5063 int do_mapline; 5064 5064 int found_map = FALSE; 5065 5065 hashitem_T *hi; 5066 5066 int l; … … 5098 5098 do_sal = spin->si_sal.ga_len == 0; 5099 5099 5100 5100 /* Only do MAP lines when not done in another .aff file already. */ 5101 do_map = spin->si_map.ga_len == 0;5101 do_mapline = spin->si_map.ga_len == 0; 5102 5102 5103 5103 /* 5104 5104 * Allocate and init the afffile_T structure. … … 5780 5780 smsg((char_u *)_("Expected MAP count in %s line %d"), 5781 5781 fname, lnum); 5782 5782 } 5783 else if (do_map )5783 else if (do_mapline) 5784 5784 { 5785 5785 int c; 5786 5786 … … 7507 7507 { 7508 7508 char_u *p = p_msm; 7509 7509 long start = 0; 7510 long inc = 0;7510 long incr = 0; 7511 7511 long added = 0; 7512 7512 7513 7513 if (!VIM_ISDIGIT(*p)) … … 7519 7519 ++p; 7520 7520 if (!VIM_ISDIGIT(*p)) 7521 7521 return FAIL; 7522 inc = (getdigits(&p) * 102) / (SBLOCKSIZE / 10);7522 incr = (getdigits(&p) * 102) / (SBLOCKSIZE / 10); 7523 7523 if (*p != ',') 7524 7524 return FAIL; 7525 7525 ++p; … … 7529 7529 if (*p != NUL) 7530 7530 return FAIL; 7531 7531 7532 if (start == 0 || inc == 0 || added == 0 || inc> start)7532 if (start == 0 || incr == 0 || added == 0 || incr > start) 7533 7533 return FAIL; 7534 7534 7535 7535 compress_start = start; 7536 compress_inc = inc ;7536 compress_inc = incr; 7537 7537 compress_added = added; 7538 7538 return OK; 7539 7539 } … … 8291 8291 * Returns the number of nodes used. 8292 8292 */ 8293 8293 static int 8294 put_node(fd, node, i ndex, regionmask, prefixtree)8294 put_node(fd, node, idx, regionmask, prefixtree) 8295 8295 FILE *fd; /* NULL when only counting */ 8296 8296 wordnode_T *node; 8297 int i ndex;8297 int idx; 8298 8298 int regionmask; 8299 8299 int prefixtree; /* TRUE for PREFIXTREE */ 8300 8300 { 8301 int newindex = i ndex;8301 int newindex = idx; 8302 8302 int siblingcount = 0; 8303 8303 wordnode_T *np; 8304 8304 int flags; … … 8308 8308 return 0; 8309 8309 8310 8310 /* Store the index where this node is written. */ 8311 node->wn_u1.index = i ndex;8311 node->wn_u1.index = idx; 8312 8312 8313 8313 /* Count the number of siblings. */ 8314 8314 for (np = node; np != NULL; np = np->wn_sibling) … … 9243 9243 * Add "word[len]" to 'spellfile' as a good or bad word. 9244 9244 */ 9245 9245 void 9246 spell_add_word(word, len, bad, i ndex, undo)9246 spell_add_word(word, len, bad, idx, undo) 9247 9247 char_u *word; 9248 9248 int len; 9249 9249 int bad; 9250 int i ndex; /* "zG" and "zW": zero, otherwise index in9250 int idx; /* "zG" and "zW": zero, otherwise index in 9251 9251 'spellfile' */ 9252 9252 int undo; /* TRUE for "zug", "zuG", "zuw" and "zuW" */ 9253 9253 { 9254 FILE *fd ;9254 FILE *fd = NULL; 9255 9255 buf_T *buf = NULL; 9256 9256 int new_spf = FALSE; 9257 9257 char_u *fname; … … 9261 9261 int i; 9262 9262 char_u *spf; 9263 9263 9264 if (i ndex == 0) /* use internal wordlist */9264 if (idx == 0) /* use internal wordlist */ 9265 9265 { 9266 9266 if (int_wordlist == NULL) 9267 9267 { … … 9289 9289 for (spf = curbuf->b_p_spf, i = 1; *spf != NUL; ++i) 9290 9290 { 9291 9291 copy_option_part(&spf, fnamebuf, MAXPATHL, ","); 9292 if (i == i ndex)9292 if (i == idx) 9293 9293 break; 9294 9294 if (*spf == NUL) 9295 9295 { 9296 EMSGN(_("E765: 'spellfile' does not have %ld entries"), i ndex);9296 EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx); 9297 9297 return; 9298 9298 } 9299 9299 } … … 9336 9336 { 9337 9337 fputc('#', fd); 9338 9338 if (undo) 9339 { 9340 home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE); 9339 9341 smsg((char_u *)_("Word removed from %s"), NameBuff); 9342 } 9340 9343 } 9341 9344 fseek(fd, fpos_next, SEEK_SET); 9342 9345 } … … 9344 9347 fclose(fd); 9345 9348 } 9346 9349 } 9347 else 9350 9351 if (!undo) 9348 9352 { 9349 9353 fd = mch_fopen((char *)fname, "a"); 9350 9354 if (fd == NULL && new_spf) 9351 9355 { 9356 char_u *p; 9357 9352 9358 /* We just initialized the 'spellfile' option and can't open the 9353 9359 * file. We may need to create the "spell" directory first. We 9354 9360 * already checked the runtime directory is writable in 9355 9361 * init_spellfile(). */ 9356 if (!dir_of_file_exists(fname) )9362 if (!dir_of_file_exists(fname) && (p = gettail_sep(fname)) != fname) 9357 9363 { 9364 int c = *p; 9365 9358 9366 /* The directory doesn't exist. Try creating it and opening 9359 9367 * the file again. */ 9360 vim_mkdir(NameBuff, 0755); 9368 *p = NUL; 9369 vim_mkdir(fname, 0755); 9370 *p = c; 9361 9371 fd = mch_fopen((char *)fname, "a"); 9362 9372 } 9363 9373 } … … 10070 10080 10071 10081 /* List the suggestions. */ 10072 10082 msg_start(); 10083 msg_row = Rows - 1; /* for when 'cmdheight' > 1 */ 10073 10084 lines_left = Rows; /* avoid more prompt */ 10074 10085 vim_snprintf((char *)IObuff, IOSIZE, _("Change \"%.*s\" to:"), 10075 10086 sug.su_badlen, sug.su_badptr); … … 13579 13590 * the first "the" to itself. */ 13580 13591 return; 13581 13592 13582 /* Check if the word is already there. Also check the length that is 13583 * being replaced "thes," -> "these" is a different suggestion from 13584 * "thes" -> "these". */ 13585 stp = &SUG(*gap, 0); 13586 for (i = gap->ga_len; --i >= 0; ++stp) 13587 if (stp->st_wordlen == goodlen 13588 && stp->st_orglen == badlen 13589 && STRNCMP(stp->st_word, goodword, goodlen) == 0) 13590 { 13591 /* 13592 * Found it. Remember the word with the lowest score. 13593 */ 13594 if (stp->st_slang == NULL) 13595 stp->st_slang = slang; 13593 if (gap->ga_len == 0) 13594 i = -1; 13595 else 13596 { 13597 /* Check if the word is already there. Also check the length that is 13598 * being replaced "thes," -> "these" is a different suggestion from 13599 * "thes" -> "these". */ 13600 stp = &SUG(*gap, 0); 13601 for (i = gap->ga_len; --i >= 0; ++stp) 13602 if (stp->st_wordlen == goodlen 13603 && stp->st_orglen == badlen 13604 && STRNCMP(stp->st_word, goodword, goodlen) == 0) 13605 { 13606 /* 13607 * Found it. Remember the word with the lowest score. 13608 */ 13609 if (stp->st_slang == NULL) 13610 stp->st_slang = slang; 13596 13611 13597 new_sug.st_score = score; 13598 new_sug.st_altscore = altscore; 13599 new_sug.st_had_bonus = had_bonus; 13612 new_sug.st_score = score; 13613 new_sug.st_altscore = altscore; 13614 new_sug.st_had_bonus = had_bonus; 13615 13616 if (stp->st_had_bonus != had_bonus) 13617 { 13618 /* Only one of the two had the soundalike score computed. 13619 * Need to do that for the other one now, otherwise the 13620 * scores can't be compared. This happens because 13621 * suggest_try_change() doesn't compute the soundalike 13622 * word to keep it fast, while some special methods set 13623 * the soundalike score to zero. */ 13624 if (had_bonus) 13625 rescore_one(su, stp); 13626 else 13627 { 13628 new_sug.st_word = stp->st_word; 13629 new_sug.st_wordlen = stp->st_wordlen; 13630 new_sug.st_slang = stp->st_slang; 13631 new_sug.st_orglen = badlen; 13632 rescore_one(su, &new_sug); 13633 } 13634 } 13600 13635 13601 if (stp->st_had_bonus != had_bonus) 13602 { 13603 /* Only one of the two had the soundalike score computed. 13604 * Need to do that for the other one now, otherwise the 13605 * scores can't be compared. This happens because 13606 * suggest_try_change() doesn't compute the soundalike 13607 * word to keep it fast, while some special methods set 13608 * the soundalike score to zero. */ 13609 if (had_bonus) 13610 rescore_one(su, stp); 13611 else 13636 if (stp->st_score > new_sug.st_score) 13612 13637 { 13613 new_sug.st_word = stp->st_word; 13614 new_sug.st_wordlen = stp->st_wordlen; 13615 new_sug.st_slang = stp->st_slang; 13616 new_sug.st_orglen = badlen; 13617 rescore_one(su, &new_sug); 13638 stp->st_score = new_sug.st_score; 13639 stp->st_altscore = new_sug.st_altscore; 13640 stp->st_had_bonus = new_sug.st_had_bonus; 13618 13641 } 13642 break; 13619 13643 } 13620 13621 if (stp->st_score > new_sug.st_score) 13622 { 13623 stp->st_score = new_sug.st_score; 13624 stp->st_altscore = new_sug.st_altscore; 13625 stp->st_had_bonus = new_sug.st_had_bonus; 13626 } 13627 break; 13628 } 13644 } 13629 13645 13630 13646 if (i < 0 && ga_grow(gap, 1) == OK) 13631 13647 { … … 15656 15672 ? MB_STRNICMP(p, pat, STRLEN(pat)) == 0 15657 15673 : STRNCMP(p, pat, STRLEN(pat)) == 0) 15658 15674 && ins_compl_add_infercase(p, (int)STRLEN(p), 15659 FALSE, NULL, *dir, 0) == OK)15675 p_ic, NULL, *dir, 0) == OK) 15660 15676 /* if dir was BACKWARD then honor it just once */ 15661 15677 *dir = FORWARD; 15662 15678 } -
src/structs.h
diff -Naur vim70.orig/src/structs.h vim70/src/structs.h
old new 2213 2213 2214 2214 /* 2215 2215 * Struct to save values in before executing autocommands for a buffer that is 2216 * not the current buffer. 2216 * not the current buffer. Without FEAT_AUTOCMD only "curbuf" is remembered. 2217 2217 */ 2218 2218 typedef struct 2219 2219 { 2220 2220 buf_T *save_buf; /* saved curbuf */ 2221 #ifdef FEAT_AUTOCMD 2221 2222 buf_T *new_curbuf; /* buffer to be used */ 2222 2223 win_T *save_curwin; /* saved curwin, NULL if it didn't change */ 2223 2224 win_T *new_curwin; /* new curwin if save_curwin != NULL */ 2224 2225 pos_T save_cursor; /* saved cursor pos of save_curwin */ 2225 2226 linenr_T save_topline; /* saved topline of save_curwin */ 2226 # ifdef FEAT_DIFF2227 # ifdef FEAT_DIFF 2227 2228 int save_topfill; /* saved topfill of save_curwin */ 2229 # endif 2228 2230 #endif 2229 2231 } aco_save_T; 2230 2232 -
src/tag.c
diff -Naur vim70.orig/src/tag.c vim70/src/tag.c
old new 3787 3787 { 3788 3788 int num_matches, i, ret; 3789 3789 char_u **matches, *p; 3790 char_u *full_fname; 3790 3791 dict_T *dict; 3791 3792 tagptrs_T tp; 3792 3793 long is_static; … … 3809 3810 if (list_append_dict(list, dict) == FAIL) 3810 3811 ret = FAIL; 3811 3812 3813 full_fname = tag_full_fname(&tp); 3812 3814 if (add_tag_field(dict, "name", tp.tagname, tp.tagname_end) == FAIL 3813 || add_tag_field(dict, "filename", tp.fname,3814 tp.fname_end) == FAIL3815 || add_tag_field(dict, "filename", full_fname, 3816 NULL) == FAIL 3815 3817 || add_tag_field(dict, "cmd", tp.command, 3816 3818 tp.command_end) == FAIL 3817 3819 || add_tag_field(dict, "kind", tp.tagkind, … … 3819 3821 || dict_add_nr_str(dict, "static", is_static, NULL) == FAIL) 3820 3822 ret = FAIL; 3821 3823 3824 vim_free(full_fname); 3825 3822 3826 if (tp.command_end != NULL) 3823 3827 { 3824 3828 for (p = tp.command_end + 3; -
src/term.c
diff -Naur vim70.orig/src/term.c vim70/src/term.c
old new 4783 4783 return -1; 4784 4784 current_menu = (vimmenu_T *)val; 4785 4785 slen += num_bytes; 4786 4787 /* The menu may have been deleted right after it was used, check 4788 * for that. */ 4789 if (check_menu_pointer(root_menu, current_menu) == FAIL) 4790 { 4791 key_name[0] = KS_EXTRA; 4792 key_name[1] = (int)KE_IGNORE; 4793 } 4786 4794 } 4787 4795 # endif 4788 4796 # ifdef FEAT_GUI_TABLINE -
src/testdir/test56.in
diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in
old new 3 3 STARTTEST 4 4 :so small.vim 5 5 :" 6 :set nocp 6 :set nocp viminfo+=nviminfo 7 7 :/^start:/+1,/^end:/-1w! Xtest.vim 8 8 :source Xtest.vim 9 9 _x -
src/ui.c
diff -Naur vim70.orig/src/ui.c vim70/src/ui.c
old new 1137 1137 int len; 1138 1138 #ifdef FEAT_MBYTE 1139 1139 char_u *p; 1140 int i;1141 1140 #endif 1142 1141 int row1 = clip_star.start.lnum; 1143 1142 int col1 = clip_star.start.col; … … 1218 1217 #ifdef FEAT_MBYTE 1219 1218 if (enc_dbcs != 0) 1220 1219 { 1220 int i; 1221 1221 1222 p = ScreenLines + LineOffset[row]; 1222 1223 for (i = start_col; i < end_col; ++i) 1223 1224 if (enc_dbcs == DBCS_JPNU && p[i] == 0x8e) -
src/undo.c
diff -Naur vim70.orig/src/undo.c vim70/src/undo.c
old new 84 84 static void u_unch_branch __ARGS((u_header_T *uhp)); 85 85 static u_entry_T *u_get_headentry __ARGS((void)); 86 86 static void u_getbot __ARGS((void)); 87 static int undo_allowed __ARGS((void));88 87 static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T)); 89 88 static void u_doit __ARGS((int count)); 90 89 static void u_undoredo __ARGS((int undo)); … … 196 195 * Return TRUE when undo is allowed. Otherwise give an error message and 197 196 * return FALSE. 198 197 */ 199 staticint198 int 200 199 undo_allowed() 201 200 { 202 201 /* Don't allow changes when 'modifiable' is off. */ … … 1188 1187 int did_undo; /* just did an undo */ 1189 1188 int absolute; /* used ":undo N" */ 1190 1189 { 1191 char *msg ;1190 char *msgstr; 1192 1191 u_header_T *uhp; 1193 1192 char_u msgbuf[80]; 1194 1193 … … 1206 1205 1207 1206 u_oldcount -= u_newcount; 1208 1207 if (u_oldcount == -1) 1209 msg = N_("more line");1208 msgstr = N_("more line"); 1210 1209 else if (u_oldcount < 0) 1211 msg = N_("more lines");1210 msgstr = N_("more lines"); 1212 1211 else if (u_oldcount == 1) 1213 msg = N_("line less");1212 msgstr = N_("line less"); 1214 1213 else if (u_oldcount > 1) 1215 msg = N_("fewer lines");1214 msgstr = N_("fewer lines"); 1216 1215 else 1217 1216 { 1218 1217 u_oldcount = u_newcount; 1219 1218 if (u_newcount == 1) 1220 msg = N_("change");1219 msgstr = N_("change"); 1221 1220 else 1222 msg = N_("changes");1221 msgstr = N_("changes"); 1223 1222 } 1224 1223 1225 1224 if (curbuf->b_u_curhead != NULL) … … 1245 1244 1246 1245 smsg((char_u *)_("%ld %s; %s #%ld %s"), 1247 1246 u_oldcount < 0 ? -u_oldcount : u_oldcount, 1248 _(msg ),1247 _(msgstr), 1249 1248 did_undo ? _("before") : _("after"), 1250 1249 uhp == NULL ? 0L : uhp->uh_seq, 1251 1250 msgbuf); -
src/version.c
diff -Naur vim70.orig/src/version.c vim70/src/version.c
old new 667 667 static int included_patches[] = 668 668 { /* Add new patch number below this line */ 669 669 /**/ 670 109, 671 /**/ 672 107, 673 /**/ 674 106, 675 /**/ 676 105, 677 /**/ 678 104, 679 /**/ 680 103, 681 /**/ 682 102, 683 /**/ 684 101, 685 /**/ 686 100, 687 /**/ 688 99, 689 /**/ 690 98, 691 /**/ 692 97, 693 /**/ 694 96, 695 /**/ 696 95, 697 /**/ 698 94, 699 /**/ 700 93, 701 /**/ 702 92, 703 /**/ 704 91, 705 /**/ 706 90, 707 /**/ 708 89, 709 /**/ 710 88, 711 /**/ 712 87, 713 /**/ 714 86, 715 /**/ 716 85, 717 /**/ 718 84, 719 /**/ 720 83, 721 /**/ 722 82, 723 /**/ 724 81, 725 /**/ 726 80, 727 /**/ 728 79, 729 /**/ 730 78, 731 /**/ 732 77, 733 /**/ 734 76, 735 /**/ 736 75, 737 /**/ 738 73, 739 /**/ 740 72, 741 /**/ 742 71, 743 /**/ 744 70, 745 /**/ 746 69, 747 /**/ 748 68, 749 /**/ 750 67, 751 /**/ 752 66, 753 /**/ 754 64, 755 /**/ 756 63, 757 /**/ 758 62, 759 /**/ 760 61, 761 /**/ 762 60, 763 /**/ 764 59, 765 /**/ 766 58, 767 /**/ 768 56, 769 /**/ 770 55, 771 /**/ 772 54, 773 /**/ 774 53, 775 /**/ 776 52, 777 /**/ 778 51, 779 /**/ 780 50, 781 /**/ 782 49, 783 /**/ 784 48, 785 /**/ 786 47, 787 /**/ 788 46, 789 /**/ 790 44, 791 /**/ 792 43, 793 /**/ 794 42, 795 /**/ 796 41, 797 /**/ 798 40, 799 /**/ 800 39, 801 /**/ 802 38, 803 /**/ 804 37, 805 /**/ 806 36, 807 /**/ 808 35, 809 /**/ 810 34, 811 /**/ 812 33, 813 /**/ 814 31, 815 /**/ 816 30, 817 /**/ 818 29, 819 /**/ 820 28, 821 /**/ 822 26, 823 /**/ 824 25, 825 /**/ 826 24, 827 /**/ 828 23, 829 /**/ 830 22, 831 /**/ 832 21, 833 /**/ 834 20, 835 /**/ 836 19, 837 /**/ 838 18, 839 /**/ 840 17, 841 /**/ 842 16, 843 /**/ 844 15, 845 /**/ 846 14, 847 /**/ 848 13, 849 /**/ 850 12, 851 /**/ 852 11, 853 /**/ 854 10, 855 /**/ 856 9, 857 /**/ 858 8, 859 /**/ 860 7, 861 /**/ 862 6, 863 /**/ 864 4, 865 /**/ 866 3, 867 /**/ 868 2, 869 /**/ 870 1, 871 /**/ 670 872 0 671 873 }; 672 874 -
src/vim.h
diff -Naur vim70.orig/src/vim.h vim70/src/vim.h
old new 585 585 #define INSERT 0x10 /* Insert mode */ 586 586 #define LANGMAP 0x20 /* Language mapping, can be combined with 587 587 INSERT and CMDLINE */ 588 #define MAP_ALL_MODES 0x3f /* all mode bits used for mapping */589 588 590 589 #define REPLACE_FLAG 0x40 /* Replace mode flag */ 591 590 #define REPLACE (REPLACE_FLAG + INSERT) … … 605 604 #define CONFIRM 0x800 /* ":confirm" prompt */ 606 605 #define SELECTMODE 0x1000 /* Select mode, only for mappings */ 607 606 607 #define MAP_ALL_MODES (0x3f | SELECTMODE) /* all mode bits used for 608 * mapping */ 609 608 610 /* directions */ 609 611 #define FORWARD 1 610 612 #define BACKWARD (-1) … … 1118 1120 EVENT_FOCUSGAINED, /* got the focus */ 1119 1121 EVENT_FOCUSLOST, /* lost the focus to another app */ 1120 1122 EVENT_GUIENTER, /* after starting the GUI */ 1123 EVENT_GUIFAILED, /* after starting the GUI failed */ 1121 1124 EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */ 1122 1125 EVENT_INSERTENTER, /* when entering Insert mode */ 1123 1126 EVENT_INSERTLEAVE, /* when leaving Insert mode */ … … 1983 1986 /* values for vim_handle_signal() that are not a signal */ 1984 1987 #define SIGNAL_BLOCK -1 1985 1988 #define SIGNAL_UNBLOCK -2 1986 #if !defined(UNIX) && !defined(VMS) 1989 #if !defined(UNIX) && !defined(VMS) && !defined(OS2) 1987 1990 # define vim_handle_signal(x) 0 1988 1991 #endif 1989 1992 -
src/window.c
diff -Naur vim70.orig/src/window.c vim70/src/window.c
old new 340 340 { 341 341 tabpage_T *oldtab = curtab; 342 342 tabpage_T *newtab; 343 win_T *wp = curwin;344 343 345 344 /* First create a new tab with the window, then go back to 346 345 * the old tab and close the window there. */ 346 wp = curwin; 347 347 if (win_new_tabpage((int)Prenum) == OK 348 348 && valid_tabpage(oldtab)) 349 349 { … … 3954 3954 setmouse(); /* in case jumped to/from help buffer */ 3955 3955 #endif 3956 3956 3957 #ifdef FEAT_AUTOCHDIR 3958 /* Change directories when the 'acd' option is set on and after 3959 * switching windows. */ 3960 if (p_acd && curbuf->b_ffname != NULL 3961 && vim_chdirfile(curbuf->b_ffname) == OK) 3962 shorten_fnames(TRUE); 3963 #endif 3957 /* Change directories when the 'acd' option is set. */ 3958 DO_AUTOCHDIR 3964 3959 } 3965 3960 3966 3961 #endif /* FEAT_WINDOWS */
Note:
See TracBrowser
for help on using the repository browser.