0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.2a

This commit is contained in:
Bram Moolenaar
2008-06-24 20:19:36 +00:00
parent 176dd1e03c
commit f233048a12
32 changed files with 3829 additions and 442 deletions

View File

@@ -22,7 +22,7 @@
!define HAVE_NLS
!define VER_MAJOR 7
!define VER_MINOR 1
!define VER_MINOR 2a
# ----------- No configurable settings below this line -----------
@@ -139,7 +139,7 @@ FunctionEnd
Function .onInstSuccess
WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
MessageBox MB_YESNO|MB_ICONQUESTION \
"The installation process has been successfull. Happy Vimming! \
"The installation process has been successful. Happy Vimming! \
$\n$\n Do you want to see the README file now?" IDNO NoReadme
Exec '$0\gvim.exe -R "$0\README.txt"'
NoReadme:

View File

@@ -1,9 +1,9 @@
" vimball.vim : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Date: May 07, 2007
" Version: 22
" Date: Jun 05, 2008
" Version: 27
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
" Copyright: (c) 2004-2008 by Charles E. Campbell, Jr.
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
" No warranty, express or implied.
@@ -15,8 +15,9 @@ if &cp || exists("g:loaded_vimball") || v:version < 700
finish
endif
let s:keepcpo = &cpo
let g:loaded_vimball = "v22"
let g:loaded_vimball = "v27"
set cpo&vim
"DechoTabOn
" =====================================================================
" Constants: {{{1
@@ -24,6 +25,57 @@ if !exists("s:USAGE")
let s:USAGE = 0
let s:WARNING = 1
let s:ERROR = 2
" determine if cygwin is in use or not
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:netrw_cygwin= 1
else
let g:netrw_cygwin= 0
endif
else
let g:netrw_cygwin= 0
endif
endif
" set up g:vimball_mkdir if the mkdir() call isn't defined
if !exists("*mkdir")
if exists("g:netrw_local_mkdir")
let g:vimball_mkdir= g:netrw_local_mkdir
elseif executable("mkdir")
let g:vimball_mkdir= "mkdir"
elseif executable("makedir")
let g:vimball_mkdir= "makedir"
endif
if !exists(g:vimball_mkdir)
call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined")
endif
endif
" set up shell quoting character
if exists("g:vimball_shq") && !exists("g:netrw_shq")
let g:netrw_shq= g:vimball_shq
endif
if !exists("g:netrw_shq")
if exists("&shq") && &shq != ""
let g:netrw_shq= &shq
elseif has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
let g:netrw_shq= "'"
else
let g:netrw_shq= '"'
endif
else
let g:netrw_shq= "'"
endif
" call Decho("g:netrw_shq<".g:netrw_shq.">")
endif
" set up escape string (used to protect paths)
if !exists("g:vimball_path_escape")
let g:vimball_path_escape= ' ;#%'
endif
endif
" =====================================================================
@@ -31,7 +83,12 @@ endif
" ---------------------------------------------------------------------
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
" Vimball Format:
" Input:
" line1,line2: a range of lines containing paths to files to be included in the vimball
" writelevel : if true, force a write to filename.vba, even if it exists
" (usually accomplished with :MkVimball! ...
" filename : base name of file to be created (ie. filename.vba)
" Output: a filename.vba using vimball format:
" path
" filesize
" [file]
@@ -40,7 +97,7 @@ endif
" [file]
fun! vimball#MkVimball(line1,line2,writelevel,...) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
if a:1 =~ '.vim' || a:1 =~ '.txt'
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
else
let vbname= a:1
@@ -61,7 +118,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
endif
" user option bypass
call s:SaveSettings()
call vimball#SaveSettings()
if a:0 >= 2
" allow user to specify where to get the files
@@ -87,7 +144,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
if !filereadable(svfile)
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
call s:ChgDir(curdir)
call s:RestoreSettings()
call vimball#RestoreSettings()
" call Dret("MkVimball")
return
endif
@@ -113,8 +170,8 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
" write the file from the tab
let svfilepath= s:Path(svfile,'')
" call Decho("exe $r ".svfilepath)
exe "$r ".svfilepath
" call Decho("exe $r ".fnameescape(svfilepath))
exe "$r ".fnameescape(svfilepath)
call setline(lastline+1,line("$") - lastline - 1)
" call Decho("lastline=".lastline." line$=".line("$"))
@@ -127,14 +184,15 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
" write the vimball
exe "tabn ".vbtabnr
call s:ChgDir(curdir)
setlocal ff=unix
if a:writelevel
let vbnamepath= s:Path(vbname,'')
" call Decho("exe w! ".vbnamepath)
exe "w! ".vbnamepath
" call Decho("exe w! ".fnameescape(vbnamepath))
exe "w! ".fnameescape(vbnamepath)
else
let vbnamepath= s:Path(vbname,'')
" call Decho("exe w ".vbnamepath)
exe "w ".vbnamepath
" call Decho("exe w ".fnameescape(vbnamepath))
exe "w ".fnameescape(vbnamepath)
endif
" call Decho("Vimball<".vbname."> created")
echo "Vimball<".vbname."> created"
@@ -145,16 +203,24 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
exe "tabc ".vbtabnr
" restore options
call s:RestoreSettings()
call vimball#RestoreSettings()
" call Dret("MkVimball")
endfun
" ---------------------------------------------------------------------
" vimball#Vimball: extract and distribute contents from a vimball {{{2
" (invoked the the UseVimball command embedded in
" vimballs' prologue)
fun! vimball#Vimball(really,...)
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
if v:version < 701 || (v:version == 701 && !has("patch299"))
echoerr "This version of vimball requires vim 7.1 with patch 299"
" call Dret("vimball#Vimball : needs 7.1 with patch 299")
return
endif
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
echoerr "(Vimball) The current file does not appear to be a Vimball!"
" call Dret("vimball#Vimball")
@@ -162,8 +228,9 @@ fun! vimball#Vimball(really,...)
endif
" set up standard settings
call s:SaveSettings()
call vimball#SaveSettings()
let curtabnr = tabpagenr()
let vimballfile = expand("%:tr")
" set up vimball tab
" call Decho("setting up vimball tab")
@@ -186,7 +253,9 @@ fun! vimball#Vimball(really,...)
" call Decho("curdir<".curdir.">")
call s:ChgDir(home)
call vimball#RmVimball()
let s:ok_unablefind= 1
call vimball#RmVimball(vimballfile)
unlet s:ok_unablefind
let linenr = 4
let filecnt = 0
@@ -206,7 +275,7 @@ fun! vimball#Vimball(really,...)
while 1 < linenr && linenr < line("$")
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
let fname = substitute(fname,'\\','/','g')
let fsize = getline(linenr+1)
let fsize = getline(linenr+1)+0
let filecnt = filecnt + 1
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
@@ -219,10 +288,10 @@ fun! vimball#Vimball(really,...)
" call Decho("using L#".(linenr+1).": fsize=".fsize)
" Allow AsNeeded/ directory to take place of plugin/ directory
" when AsNeeded/filename is filereadable
" when AsNeeded/filename is filereadable or was present in VimballRecord
if fname =~ '\<plugin/'
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
if filereadable(anfname)
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname)
" call Decho("using anfname<".anfname."> instead of <".fname.">")
let fname= anfname
endif
@@ -240,7 +309,11 @@ fun! vimball#Vimball(really,...)
" call Decho("dirname<".dirname.">")
if !isdirectory(dirname)
" call Decho("making <".dirname.">")
if exists("g:vimball_mkdir")
call system(g:vimball_mkdir." ".s:Escape(dirname))
else
call mkdir(dirname)
endif
call s:RecordInVar(home,"rmdir('".dirname."')")
endif
endwhile
@@ -257,6 +330,7 @@ fun! vimball#Vimball(really,...)
" copy "a" buffer into tab
" call Decho('copy "a buffer into tab#'.vbtabnr)
exe "tabn ".vbtabnr
setlocal ma
silent! %d
silent put a
1
@@ -265,10 +339,10 @@ fun! vimball#Vimball(really,...)
" write tab to file
if a:really
let fnamepath= s:Path(home."/".fname,'')
" call Decho("exe w! ".fnamepath)
exe "silent w! ".fnamepath
" call Decho("exe w! ".fnameescape(fnamepath))
exe "silent w! ".fnameescape(fnamepath)
echo "wrote ".fnamepath
call s:RecordInVar(home,"call delete('".fnamepath."')")
call s:RecordInVar(home,"call delete('".fnameescape(fnamepath)."')")
endif
" return to tab with vimball
@@ -277,21 +351,20 @@ fun! vimball#Vimball(really,...)
" set up help if its a doc/*.txt file
" call Decho("didhelp<".didhelp."> fname<".fname.">")
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','')
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
" call Decho("didhelp<".didhelp.">")
endif
" update for next file
" let oldlinenr = linenr " Decho
let linenr = linenr + fsize
" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] = ".linenr)
" call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
let linenr= linenr + fsize
endwhile
" set up help
" call Decho("about to set up help: didhelp<".didhelp.">")
if didhelp != ""
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','g'),' ')
let htpath= s:Path(home."/".didhelp,"")
" call Decho("exe helptags ".htpath)
exe "helptags ".htpath
echo "did helptags"
@@ -311,7 +384,7 @@ fun! vimball#Vimball(really,...)
setlocal nomod bh=wipe
exe "tabn ".curtabnr
exe "tabc ".vbtabnr
call s:RestoreSettings()
call vimball#RestoreSettings()
call s:ChgDir(curdir)
" call Dret("vimball#Vimball")
@@ -329,12 +402,10 @@ fun! vimball#RmVimball(...)
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
return
endif
let eikeep= &ei
set ei=all
" call Decho("turned off all events")
if a:0 == 0
let curfile= '^'.expand("%:tr")
let curfile= expand("%:tr")
" call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
else
if a:1 =~ '[\/]'
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
@@ -342,11 +413,10 @@ fun! vimball#RmVimball(...)
return
endif
let curfile= a:1
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
endif
if curfile !~ '.vba$'
let curfile= curfile.".vba: "
else
let curfile= curfile.": "
if curfile =~ '\.vba$'
let curfile= substitute(curfile,'\.vba','','')
endif
if a:0 >= 2
let home= expand(a:2)
@@ -365,13 +435,34 @@ fun! vimball#RmVimball(...)
keepalt keepjumps 1split
silent! keepalt keepjumps e .VimballRecord
let keepsrch= @/
if search(curfile,'cw')
let exestring= substitute(getline("."),curfile,'','')
" call Decho("search for ^".curfile.".vba:")
" call Decho("search for ^".curfile."[-0-9.]*.vba:")
if search('^'.curfile.": ".'cw')
let foundit= 1
elseif search('^'.curfile.".vba: ",'cw')
let foundit= 1
elseif search('^'.curfile.'[-0-9.]*.vba: ','cw')
let foundit= 1
else
let foundit = 0
endif
if foundit
let exestring = substitute(getline("."),'^'.curfile.'\S\{-}\.vba: ','','')
let s:VBRstring= substitute(exestring,'call delete(','','g')
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
" call Decho("exe ".exestring)
silent! keepalt keepjumps exe exestring
silent! keepalt keepjumps d
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
" call Decho("exestring<".exestring.">")
echomsg "removed ".exestring." files"
else
let s:VBRstring= ''
let curfile = substitute(curfile,'\.vba','','')
" call Decho("unable to find <".curfile."> in .VimballRecord")
if !exists("s:ok_unablefind")
call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
endif
endif
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
@@ -379,10 +470,6 @@ fun! vimball#RmVimball(...)
endif
call s:ChgDir(curdir)
" restoring events
" call Decho("restoring events")
let &ei= eikeep
" call Dret("vimball#RmVimball")
endfun
@@ -393,21 +480,56 @@ fun! vimball#Decompress(fname)
" decompression:
if expand("%") =~ '.*\.gz' && executable("gunzip")
exe "!gunzip ".a:fname
" handle *.gz with gunzip
silent exe "!gunzip ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.gz' && executable("gzip")
" handle *.gz with gzip -d
silent exe "!gzip -d ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
exe "!bunzip2 ".a:fname
" handle *.bz2 with bunzip2
silent exe "!bunzip2 ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.bz2' && executable("bzip2")
" handle *.bz2 with bzip2 -d
silent exe "!bzip2 -d ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.zip' && executable("unzip")
exe "!unzip ".a:fname
" handle *.zip with unzip
silent exe "!unzip ".s:Escape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.zip$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
endif
set noma bt=nofile fmr=[[[,]]] fdm=marker
" call Dret("Decompress")
@@ -443,34 +565,35 @@ fun! vimball#ShowMesg(level,msg)
" call Dret("vimball#ShowMesg")
endfun
" ---------------------------------------------------------------------
let &cpo= s:keepcpo
unlet s:keepcpo
" =====================================================================
" s:ChgDir: change directory (in spite of Windoze) {{{2
fun! s:ChgDir(newdir)
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
if (has("win32") || has("win95") || has("win64") || has("win16"))
exe 'silent cd '.escape(substitute(a:newdir,'/','\\','g'),' ')
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
else
exe 'silent cd '.escape(a:newdir,' ')
exe 'silent cd '.fnameescape(a:newdir)
endif
" call Dret("ChgDir")
" call Dret("ChgDir : curdir<".getcwd().">")
endfun
" ---------------------------------------------------------------------
" s:Path: prepend and append quotes, do escaping, as necessary {{{2
" s:Path: prepend and append quotes and do escaping {{{2
fun! s:Path(cmd,quote)
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)")
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">) vimball_path_escape<".g:vimball_path_escape.">")
if (has("win32") || has("win95") || has("win64") || has("win16"))
let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
" let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
let cmdpath= a:quote.substitute(a:cmd,'\\','/','g').a:quote
" call Decho("cmdpath<".cmdpath."> (win32 mod)")
else
let cmdpath= a:quote.a:cmd.a:quote
" call Decho("cmdpath<".cmdpath."> (not-win32 mod)")
endif
if a:quote == ""
if a:quote == "" && g:vimball_path_escape !~ ' '
let cmdpath= escape(cmdpath,' ')
" call Decho("cmdpath<".cmdpath."> (empty quote case)")
endif
let cmdpath= escape(cmdpath,g:vimball_path_escape)
" call Dret("Path <".cmdpath.">")
return cmdpath
endfun
@@ -485,23 +608,20 @@ fun! s:RecordInVar(home,cmd)
" else
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
" endif
" call Decho("recorddir=".s:recorddir)
elseif !exists("s:recordfile")
let s:recordfile= a:cmd
" call Decho("recordfile=".s:recordfile)
else
let s:recordfile= s:recordfile."|".a:cmd
" call Decho("recordfile=".s:recordfile)
endif
" call Dret("RecordInVar")
" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
endfun
" ---------------------------------------------------------------------
" s:RecordInFile: {{{2
fun! s:RecordInFile(home)
" call Dfunc("RecordInFile()")
" call Dfunc("s:RecordInFile()")
if exists("g:vimball_norecord")
" call Dret("RecordInFile : (g:vimball_norecord)")
" call Dret("s:RecordInFile : g:vimball_norecord")
return
endif
@@ -509,8 +629,12 @@ fun! s:RecordInFile(home)
let curdir= getcwd()
call s:ChgDir(a:home)
keepalt keepjumps 1split
let cmd= expand("%:tr").": "
" call Decho("cmd<".cmd.">")
silent! keepalt keepjumps e .VimballRecord
setlocal ma
$
if exists("s:recordfile") && exists("s:recorddir")
let cmd= cmd.s:recordfile."|".s:recorddir
@@ -519,34 +643,32 @@ fun! s:RecordInFile(home)
elseif exists("s:recordfile")
let cmd= cmd.s:recordfile
else
" call Dret("RecordInFile")
" call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
return
endif
" call Decho("cmd<".cmd.">")
" put command into buffer, write .VimballRecord `file
keepalt keepjumps put=cmd
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
call s:ChgDir(curdir)
if exists("s:recorddir") |unlet s:recorddir |endif
if exists("s:recordfile")|unlet s:recordfile|endif
if exists("s:recorddir")
" call Decho("unlet s:recorddir<".s:recorddir.">")
unlet s:recorddir
endif
if exists("s:recordfile")
" call Decho("unlet s:recordfile<".s:recordfile.">")
unlet s:recordfile
endif
else
" call Decho("s:record[file|dir] doesn't exist")
endif
" call Dret("RecordInFile")
" call Dret("s:RecordInFile")
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
"fun! s:Rmdir(dirname)
"" call Dfunc("s:Rmdir(dirname<".a:dirname.">)")
" if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
" call system("del ".a:dirname)
" else
" call system("rmdir ".a:dirname)
" endif
"" call Dret("s:Rmdir")
"endfun
" ---------------------------------------------------------------------
" s:VimballHome: determine/get home directory path (usually from rtp) {{{2
fun! s:VimballHome()
@@ -557,6 +679,11 @@ fun! s:VimballHome()
" go to vim plugin home
for home in split(&rtp,',') + ['']
if isdirectory(home) && filewritable(home) | break | endif
let basehome= substitute(home,'[/\\]\.vim$','','')
if isdirectory(basehome) && filewritable(basehome)
let home= basehome."/.vim"
break
endif
endfor
if home == ""
" just pick the first directory
@@ -566,13 +693,25 @@ fun! s:VimballHome()
let home= substitute(home,'/','\\','g')
endif
endif
" insure that the home directory exists
" call Decho("picked home<".home.">")
if !isdirectory(home)
if exists("g:vimball_mkdir")
" call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">")
" call Decho("system(".g:vimball_mkdir." ".s:Escape(home).")")
call system(g:vimball_mkdir." ".s:Escape(home))
else
" call Decho("home<".home."> isn't a directory -- making it now with mkdir()")
call mkdir(home)
endif
endif
" call Dret("VimballHome <".home.">")
return home
endfun
" ---------------------------------------------------------------------
" s:SaveSettings: {{{2
fun! s:SaveSettings()
" vimball#SaveSettings: {{{2
fun! vimball#SaveSettings()
" call Dfunc("SaveSettings()")
let s:makeep = getpos("'a")
let s:regakeep= @a
@@ -587,17 +726,20 @@ fun! s:SaveSettings()
let s:pmkeep = &pm
let s:repkeep = &report
let s:vekeep = &ve
let s:ffkeep = &ff
if exists("&acd")
set ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm=
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix
else
set ei=all ve=all nofen noic report=999 nohid bt= ma lz pm=
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix
endif
" vimballs should be in unix format
setlocal ff=unix
" call Dret("SaveSettings")
endfun
" ---------------------------------------------------------------------
" s:RestoreSettings: {{{2
fun! s:RestoreSettings()
" vimball#RestoreSettings: {{{2
fun! vimball#RestoreSettings()
" call Dfunc("RestoreSettings()")
let @a = s:regakeep
if exists("&acd")
@@ -611,20 +753,34 @@ fun! s:RestoreSettings()
let &report = s:repkeep
let &ve = s:vekeep
let &ei = s:eikeep
let &ff = s:ffkeep
if s:makeep[0] != 0
" restore mark a
" call Decho("restore mark-a: makeep=".string(makeep))
call setpos("'a",s:makeep)
endif
if exists("&acd")
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
else
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
unlet s:acdkeep
endif
set bt=nofile noma
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
" call Dret("RestoreSettings")
endfun
" ---------------------------------------------------------------------
" s:Escape: {{{2
fun s:Escape(name)
" shellescape() was added by patch 7.0.111
if exists("*shellescape")
return shellescape(a:name)
endif
return g:netrw_shq . a:name . g:netrw_shq
endfun
" ---------------------------------------------------------------------
" Restore:
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.1. Last change: 2007 May 05
*index.txt* For Vim version 7.2a. Last change: 2008 May 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -467,6 +467,7 @@ tag command action in Normal mode ~
|v_ab| ab "a block" from "[(" to "])" (with braces)
|v_ap| ap "a paragraph" (with white space)
|v_as| as "a sentence" (with white space)
|v_at| at "a tag block" (with white space)
|v_aw| aw "a word" (with white space)
|v_a{| a{ same as aB
|v_a}| a} same as aB
@@ -484,6 +485,7 @@ tag command action in Normal mode ~
|v_ib| ib "inner block" from "[(" to "])"
|v_ip| ip "inner paragraph"
|v_is| is "inner sentence"
|v_it| it "inner tag block"
|v_iw| iw "inner word"
|v_i{| i{ same as iB
|v_i}| i} same as iB
@@ -874,6 +876,10 @@ tag command note action in Visual mode ~
mode
|v_X| X 2 delete the highlighted lines
|v_Y| Y yank the highlighted lines
|v_aquote| a" extend highlighted area with a double
quoted string
|v_a'| a' extend highlighted area with a single
quoted string
|v_a(| a( same as ab
|v_a)| a) same as ab
|v_a<| a< extend highlighted area with a <> block
@@ -882,9 +888,12 @@ tag command note action in Visual mode ~
|v_aW| aW extend highlighted area with "a WORD"
|v_a[| a[ extend highlighted area with a [] block
|v_a]| a] same as a[
|v_a`| a` extend highlighted area with a backtick
quoted string
|v_ab| ab extend highlighted area with a () block
|v_ap| ap extend highlighted area with a paragraph
|v_as| as extend highlighted area with a sentence
|v_at| at extend highlighted area with a tag block
|v_aw| aw extend highlighted area with "a word"
|v_a{| a{ same as aB
|v_a}| a} same as aB
@@ -895,6 +904,10 @@ tag command note action in Visual mode ~
|v_gq| gq 2 format the highlighted lines
|v_gv| gv exchange current and previous highlighted
area
|v_iquote| i" extend highlighted area with a double
quoted string (without quotes)
|v_i'| i' extend highlighted area with a single
quoted string (without quotes)
|v_i(| i( same as ib
|v_i)| i) same as ib
|v_i<| i< extend highlighted area with inner <> block
@@ -903,9 +916,12 @@ tag command note action in Visual mode ~
|v_iW| iW extend highlighted area with "inner WORD"
|v_i[| i[ extend highlighted area with inner [] block
|v_i]| i] same as i[
|v_i`| i` extend highlighted area with a backtick
quoted string (without the backticks)
|v_ib| ib extend highlighted area with inner () block
|v_ip| ip extend highlighted area with inner paragraph
|v_is| is extend highlighted area with inner sentence
|v_it| it extend highlighted area with inner tag block
|v_iw| iw extend highlighted area with "inner word"
|v_i{| i{ same as iB
|v_i}| i} same as iB
@@ -1339,16 +1355,14 @@ The commands are sorted on the non-optional part of their name.
|:print| :p[rint] print lines
|:profdel| :profd[el] stop profiling a function or script
|:profile| :prof[ile] profiling functions and scripts
|:promptfind| :pro[mtfind] open GUI dialog for searching
|:promptrepl| :promtr[epl] open GUI dialog for search/replace
|:promptfind| :pro[mptfind] open GUI dialog for searching
|:promptrepl| :promptr[epl] open GUI dialog for search/replace
|:perldo| :perld[o] execute Perl command for each line
|:pop| :po[p] jump to older entry in tag stack
|:popup| :pop[up] popup a menu by name
|:ppop| :pp[op] ":pop" in preview window
|:preserve| :pre[serve] write all text to swap file
|:previous| :prev[ious] go to previous file in argument list
|:promptfind| :pro[mptfind] Search dialog
|:promptrepl| :promptr[epl] Search/Replace dialog
|:psearch| :ps[earch] like ":ijump" but shows match in preview window
|:ptag| :pt[ag] show tag in preview window
|:ptNext| :ptN[ext] |:tNext| in preview window
@@ -1454,7 +1468,7 @@ The commands are sorted on the non-optional part of their name.
|:startinsert| :star[tinsert] start Insert mode
|:startgreplace| :startg[replace] start Virtual Replace mode
|:startreplace| :startr[eplace] start Replace mode
|:stopinsert|| :stopi[nsert] stop Insert mode
|:stopinsert| :stopi[nsert] stop Insert mode
|:stjump| :stj[ump] do ":tjump" and split window
|:stselect| :sts[elect] do ":tselect" and split window
|:sunhide| :sun[hide] same as ":unhide"

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.1. Last change: 2007 Mar 20
*message.txt* For Vim version 7.2a. Last change: 2007 Aug 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -53,7 +53,7 @@ If you are lazy, it also works without the shift key: >
:help e72
==============================================================================
2. Error messages *error-messages*
2. Error messages *error-messages* *errors*
When an error message is displayed, but it is removed before you could read
it, you can see it again with: >

View File

@@ -1,4 +1,4 @@
*os_mint.txt* For Vim version 7.1. Last change: 2005 Mar 29
*os_mint.txt* For Vim version 7.2a. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Jens M. Felderhoff

View File

@@ -1,4 +1,4 @@
*os_os2.txt* For Vim version 7.1. Last change: 2007 Apr 22
*os_os2.txt* For Vim version 7.2a. Last change: 2007 Apr 22
VIM REFERENCE MANUAL by Paul Slootman

View File

@@ -1,4 +1,4 @@
*tabpage.txt* For Vim version 7.1. Last change: 2007 Mar 11
*tabpage.txt* For Vim version 7.2a. Last change: 2007 Mar 11
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*usr_22.txt* For Vim version 7.1. Last change: 2006 Apr 24
*usr_22.txt* For Vim version 7.2a. Last change: 2007 Aug 14
VIM USER MANUAL - by Bram Moolenaar
@@ -10,7 +10,7 @@ ways to browse the directory tree. There are commands to jump to a file that
is mentioned in another. And Vim remembers which files have been edited
before.
|22.1| The file explorer
|22.1| The file browser
|22.2| The current directory
|22.3| Finding a file
|22.4| The buffer list
@@ -20,7 +20,7 @@ before.
Table of contents: |usr_toc.txt|
==============================================================================
*22.1* The file explorer
*22.1* The file browser
Vim has a plugin that makes it possible to edit a directory. Try this: >
@@ -29,85 +29,121 @@ Vim has a plugin that makes it possible to edit a directory. Try this: >
Through the magic of autocommands and Vim scripts, the window will be filled
with the contents of the directory. It looks like this:
" Press ? for keyboard shortcuts ~
" Sorted by name (.bak,~,.o,.h,.info,.swp,.obj,.orig,.rej at end of list) ~
"= /home/mool/vim/vim6/runtime/doc/ ~
../ ~
check/ ~
Makefile ~
autocmd.txt ~
change.txt ~
eval.txt~ ~
filetype.txt~ ~
help.txt.info ~
" ============================================================================ ~
" Netrw Directory Listing (netrw v109) ~
" Sorted by name ~
" Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,*,\.info$,\.swp$,\.o$\.obj$,\.bak$ ~
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec ~
" ============================================================================ ~
../ ~
./ ~
check/ ~
Makefile ~
autocmd.txt ~
change.txt ~
eval.txt~ ~
filetype.txt~ ~
help.txt.info ~
You can see these items:
1. A comment about using ? to get help for the functionality of the file
explorer.
2. The second line mentions how the items in the directory are listed. They
can be sorted in several ways.
3. The third line is the name of the current directory.
4. The "../" directory item. This is the parent directory.
5. The directory names.
6. The ordinary file names. As mentioned in the second line, some are not
here but "at the end of the list".
7. The less ordinary file names. You are expected to use these less often,
therefore they have been moved to the end.
1. The name of the browsing tool and its version number
2. The name of the browsing directory
3. The method of sorting (may be by name, time, or size)
4. How names are to be sorted (directories first, then *.h files,
*.c files, etc)
5. How to get help (use the <F1> key), and an abbreviated listing
of available commands
6. A listing of files, including "../", which allows one to to list
the parent directory.
If you have syntax highlighting enabled, the different parts are highlighted
to make it easier to spot them.
so as to make it easier to spot them.
You can use Normal mode Vim commands to move around in the text. For example,
move to a file and press <Enter>. Now you are editing that file. To go back
to the explorer use ":edit ." again. CTRL-O also works.
Try using <Enter> while the cursor is on a directory name. The result is
that the explorer moves into that directory and displays the items found
move the cursor atop a file and press <Enter>; you will then be editing that
file. To go back to the browser use ":edit ." again, or use ":Explore".
CTRL-O also works.
Try using <Enter> while the cursor is atop a directory name. The result is
that the file browser moves into that directory and displays the items found
there. Pressing <Enter> on the first directory "../" moves you one level
higher. Pressing "-" does the same thing, without the need to move to the
"../" item first.
You can press ? to get short help on the things you can do in the explorer.
This is what you get:
You can press <F1> to get help on the things you can do in the netrw file
browser. This is what you get: >
" <enter> : open file or directory ~
" o : open new window for file/directory ~
" O : open file in previously visited window ~
" p : preview the file ~
" i : toggle size/date listing ~
" s : select sort field r : reverse sort ~
" - : go up one level c : cd to this dir ~
" R : rename file D : delete file ~
" :help file-explorer for detailed help ~
9. Directory Browsing netrw-browse netrw-dir netrw-list netrw-help
The first few commands are for selecting a file to display. Depending on what
command you use, the file appears somewhere:
MAPS netrw-maps
<F1>.............Help.......................................|netrw-help|
<cr>.............Browsing...................................|netrw-cr|
<del>............Deleting Files or Directories..............|netrw-delete|
-................Going Up...................................|netrw--|
a................Hiding Files or Directories................|netrw-a|
mb...............Bookmarking a Directory....................|netrw-mb|
gb...............Changing to a Bookmarked Directory.........|netrw-gb|
c................Make Browsing Directory The Current Dir....|netrw-c|
d................Make A New Directory.......................|netrw-d|
D................Deleting Files or Directories..............|netrw-D|
<c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
i................Change Listing Style.......................|netrw-i|
<c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
o................Browsing with a Horizontal Split...........|netrw-o|
p................Use Preview Window.........................|netrw-p|
P................Edit in Previous Window....................|netrw-p|
q................Listing Bookmarks and History..............|netrw-q|
r................Reversing Sorting Order....................|netrw-r|
< (etc)
<Enter> Uses the current window.
o Opens a new window.
O Uses the previously visited window.
p Uses the preview window, and moves the cursor back
into the explorer window. |preview-window|
The <F1> key thus brings you to a netrw directory browsing contents help page.
Its a regular help page; use the usual |CTRL-]| to jump to tagged help items
and |CTRL-O| to jump back.
The following commands are used to display other information:
To select files for display and editing: (with the cursor is atop a filename)
i Display the size and date for the file. Using i again
will hide the information.
s Use the field the cursor is in to sort on. First
display the size and date with i. Then Move the
cursor to the size of any file and press s. The files
will now be sorted on size. Press s while the cursor
is on a date and the items will be sorted on date.
r reverse the sorting order (either size or date)
<enter> Open the file in the current window. |netrw-cr|
o Horizontally split window and display file |netrw-o|
v Vertically split window and display file |netrw-v|
p Use the |preview-window| |netrw-p|
P Edit in the previous window |netrw-P|
t Open file in a new tab |netrw-t|
There are a few extra commands:
The following normal-mode commands may be used to control the browser display:
c Change the current directory to the displayed
directory. You can then type an ":edit" command for
one of the files without prepending the path.
R Rename the file under the cursor. You will be
prompted for the new name.
D Delete the file under the cursor. You will get a
prompt to confirm this.
i Controls listing style (thin, long, wide, and tree).
The long listing includes size and date information.
s Repeatedly pressing s will change the way the files
are sorted; one may sort on name, modification time,
or size.
r Reverse the sorting order.
As a sampling of extra normal-mode commands:
c Change Vim's notion of the current directory to be
the same as the browser directory. (see
|g:netrw_keepdir| to control this, too)
R Rename the file or directory under the cursor; a
prompt will be issued for the new name.
D Delete the file or directory under the cursor; a
confirmation request will be issued.
mb gb Make bookmark/goto bookmark
One may also use command mode; again, just a sampling:
:Explore [directory] Browse specified/current directory
:NetrwSettings A comprehensive list of your current netrw
settings with help linkage.
The netrw browser is not limited to just your local machine; one may use
urls such as: (that trailing / is important)
:Explore ftp://somehost/path/to/dir/
:e scp://somehost/path/to/dir/
See |netrw-browse| for more.
==============================================================================
*22.2* The current directory
@@ -255,8 +291,8 @@ solution for you: >
The buffer "one.txt" disappears from the screen, but Vim still knows that you
are editing this buffer, so it keeps the modified text. This is called a
hidden buffer: The buffer contains text, but you can't see it.
The ":hide" command argument is another command. It makes that command
behave like the 'hidden' option was set. You could also set this option
The argument of ":hide" is another command. ":hide" makes that command
behave as if the 'hidden' option was set. You could also set this option
yourself. The effect is that when any buffer is abandoned, it becomes hidden.
Be careful! When you have hidden buffers with changes, don't exit Vim
without making sure you have saved all the buffers.

View File

@@ -1,4 +1,4 @@
*usr_45.txt* For Vim version 7.1. Last change: 2006 Apr 24
*usr_45.txt* For Vim version 7.2a. Last change: 2008 Apr 30
VIM USER MANUAL - by Bram Moolenaar
@@ -195,7 +195,7 @@ though. Example: >
If it doesn't work well, try getting a fontpack. If Microsoft didn't move it,
you can find it here:
http://www.microsoft.com/typography/fontpack/default.htm ~
http://www.microsoft.com/typography/fonts/default.aspx ~
Now you have told Vim to use Unicode internally and display text with a
Unicode font. Typed characters still arrive in the encoding of your original

View File

@@ -1,4 +1,4 @@
*version4.txt* For Vim version 7.1. Last change: 2006 Apr 24
*version4.txt* For Vim version 7.2a. Last change: 2006 Apr 24
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 7.1. Last change: 2007 Aug 14
*vi_diff.txt* For Vim version 7.2a. Last change: 2008 May 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -192,7 +192,7 @@ Syntax highlighting. |:syntax|
Spell checking. |spell|
When the 'spell' option is set Vim will highlight spelling mistakes.
About 40 languages are currently supported, selected with the
'spellang' option. In source code only comments and strings are
'spelllang' option. In source code only comments and strings are
checked for spelling.
Folding. |folding|
@@ -427,8 +427,9 @@ Printing. |printing|
Mouse support. |mouse-using|
The mouse is supported in the GUI version, in an xterm for Unix, for
Linux with gpm, for MS-DOS, and Win32. It can be used to position the
cursor, select the visual area, paste a register, etc.
BSDs with sysmouse, for Linux with gpm, for MS-DOS, and Win32. It
can be used to position the cursor, select the visual area, paste a
register, etc.
Usage of key names. |<>| |key-notation|
Special keys now all have a name like <Up>, <End>, etc.

View File

@@ -1,6 +1,7 @@
" Macros to play Conway's Game of Life in vi
" Version 1.0m: edges wrap
" by Eli-the-Bearded (eli@netusa.net), Sept 1996
" by Eli-the-Bearded Benjamin Elijah Griffin <vim@eli.users.panix.com>
" Sept 1996
" This file may be free distributed so long as these credits remain unchanged.
"
" Modified by Bram Moolenaar (Bram@vim.org), 1996 Sept 10

View File

@@ -1,6 +1,6 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN SECTION
" Date: Jan 05, 2007
" Date: Apr 07, 2008
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -22,7 +22,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = 1
let g:loaded_netrwPlugin = "v125"
let s:keepcpo = &cpo
if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None
@@ -47,28 +47,27 @@ augroup END
augroup Network
au!
if has("win32") || has("win95") || has("win64") || has("win16")
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "bwipe ".expand("<amatch>")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
else
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "bwipe ".expand("<amatch>")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "bwipe ".substitute(expand("<amatch>"),'file://\(\k\+@\)\=','','')|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
endif
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe '2Nread "'.expand("<amatch>").'"'|exe "silent doau BufReadPost ".expand("<amatch>")
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "' .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>")
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe '2Nread "'.expand("<amatch>").'"'|exe "silent doau BufReadPost ".expand("<amatch>")
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "' .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>")
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
try
au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("<amatch>").'"'
au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource "'.expand("<amatch>").'"'
catch /^Vim\%((\a\+)\)\=:E216/
au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("<amatch>").'"'
au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource "'.expand("<amatch>").'"'
endtry
augroup END
" Commands: :Nread, :Nwrite, :NetUserPass {{{2
com! -count=1 -nargs=* Nread call netrw#NetSavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#NetRestorePosn()
com! -range=% -nargs=* Nwrite call netrw#NetSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetRestorePosn()
com! -count=1 -nargs=* Nread call netrw#NetrwSavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#NetrwRestorePosn()
com! -range=% -nargs=* Nwrite call netrw#NetrwSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetrwRestorePosn()
com! -nargs=* NetUserPass call NetUserPass(<f-args>)
com! -nargs=+ Ncopy call netrw#NetObtain(<f-args>)
com! -nargs=* Nsource call netrw#NetSavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#NetRestorePosn()
com! -nargs=* Nsource call netrw#NetrwSavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#NetrwRestorePosn()
" Commands: :Explore, :Sexplore, Hexplore, Vexplore {{{2
com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
@@ -80,14 +79,15 @@ com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
" Commands: NetrwSettings {{{2
com! -nargs=0 NetrwSettings :call netrwSettings#NetrwSettings()
com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
com! -bang NetrwClean call netrw#NetrwClean(<bang>0)
" Maps:
if !exists("g:netrw_nogx") && maparg('g','n') == ""
if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX
endif
nno <silent> <Plug>NetrwBrowseX :call netrw#NetBrowseX(expand("<cWORD>"),0)<cr>
nno <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("<cWORD>"),0)<cr>
endif
" ---------------------------------------------------------------------

View File

@@ -11,11 +11,26 @@ FILES = fr_FR.aff fr_FR.dic
all: $SPELLDIR/fr.latin1.spl $SPELLDIR/fr.utf-8.spl ../README_fr.txt
# The spell file is iso-8859-15, but Vim normally uses "latin1" for this.
# This is OK for the utf-8 files, but for latin1 we need to avoid the "oe"
# character. When unpacking we create four files:
# fr_FR_latin1.aff modified file
# fr_FR_latin1.dic modified file
# fr_FR_iso15.aff original file (after applying diff)
# fr_FR_iso15.dic original file (after applying diff)
# Just before using the dictionary files, the right ones are copied to
# fr_FR.aff
# fr_FR.dic
$SPELLDIR/fr.latin1.spl : $FILES
:sys env LANG=fr_FR.ISO8859-1
:copy {force} fr_FR_latin1.aff fr_FR.aff
:copy {force} fr_FR_latin1.dic fr_FR.dic
:sys env LANG=fr_FR.ISO8859-15
$VIM -u NONE -e -c "mkspell! $SPELLDIR/fr fr_FR" -c q
$SPELLDIR/fr.utf-8.spl : $FILES
:copy {force} fr_FR_iso15.aff fr_FR.aff
:copy {force} fr_FR_iso15.dic fr_FR.dic
:sys env LANG=fr_FR.UTF-8
$VIM -u NONE -e -c "mkspell! $SPELLDIR/fr fr_FR" -c q
@@ -23,10 +38,13 @@ $SPELLDIR/fr.utf-8.spl : $FILES
:cat $source >!$target
#
# Fetching the files from OpenOffice.org.
# Used to fetch the files from OpenOffice.org. Those are old.
# Later versions are elsewhere.
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
:attr {fetch = $OODIR/%file%} fr_FR.zip
#OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
ZIPFILE = http://dico.savant.free.fr/_download/fr_FR_1-1-6.zip
:attr {fetch = $ZIPFILE} fr_FR.zip
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
@@ -42,15 +60,45 @@ fr_FR.aff fr_FR.dic: {buildcheck=}
@if os.path.exists('fr_FR.diff'):
:sys patch <fr_FR.diff
# Keep the unmodified files (after diff) for ISO-8859-15.
:copy fr_FR.aff fr_FR_iso15.aff
:copy fr_FR.dic fr_FR_iso15.dic
# For the latin1 .dic file change all the "oe" characters to the two
# characters "oe".
:sys $VIM -u NONE -e -c "set enc=latin1"
-c "e fr_FR.dic"
-c "%s/<2F>/oe/g"
-c "w! fr_FR_latin1.dic"
-c q
# For the latin1 .aff file delete all the "oe" and "OE" characters and
# delete the REP lines with those characters.
:sys $VIM -u NONE -e -c "set enc=latin1"
-c "e fr_FR.aff"
-c "%s/<2F>//g"
-c "%s/<2F>//g"
-c "%g/REP.*oe/d"
-c "w! fr_FR_latin1.aff"
-c q
# Generate diff files, so that others can get the OpenOffice files and apply
# the diffs to get the Vim versions.
# This uses the iso-8859-15 files.
diff:
:assertpkg diff
:copy {force} fr_FR_iso15.aff fr_FR.aff
:copy {force} fr_FR_iso15.dic fr_FR.dic
:sys {force} diff -a -C 1 fr_FR.orig.aff fr_FR.aff >fr_FR.diff
:sys {force} diff -a -C 1 fr_FR.orig.dic fr_FR.dic >>fr_FR.diff
# Delete all the unpacked and generated files, including the "orig" files.
clean:
:delete {force} fr_FR.zip fr_FR.aff fr_FR.dic
fr_FR.aff.orig fr_FR.dic.orig
fr_FR.orig.aff fr_FR.orig.dic
fr_FR_latin1.aff fr_FR_latin1.dic
fr_FR_iso15.aff fr_FR_iso15.dic
README_fr_FR.txt
# Check for updated OpenOffice spell files. When there are changes the
# ".new.aff" and ".new.dic" files are left behind for manual inspection.

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: AutoHotkey script file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-05-09
" Latest Revision: 2007-06-01
if exists("b:current_syntax")
finish
@@ -242,6 +242,10 @@ syn keyword autohotkeyType
\ local
\ global
syn keyword autohotkeyBoolean
\ true
\ false
hi def link autohotkeyTodo Todo
hi def link autohotkeyComment Comment
hi def link autohotkeyCommentStart autohotkeyComment
@@ -271,6 +275,7 @@ hi def link autohotkeyNumber Number
hi def link autohotkeyInteger autohotkeyNumber
hi def link autohotkeyFloat autohotkeyNumber
hi def link autohotkeyType Type
hi def link autohotkeyBoolean Boolean
let b:current_syntax = "autohotkey"

View File

@@ -2,13 +2,14 @@
" Language: fstab file
" Maintaner: Radu Dineiu <radu.dineiu@gmail.com>
" URL: http://ld.yi.org/vim/fstab.vim
" Last Change: 2007 Apr 24
" Version: 0.91
" Last Change: 2008 Jan 16
" Version: 0.92
"
" Credits:
" David Necas (Yeti) <yeti@physics.muni.cz>
" Stefano Zacchiroli <zack@debian.org>
" Georgi Georgiev <chutz@gg3.net>
" James Vega <jamessan@debian.org>
"
" Options:
" let fstab_unknown_fs_errors = 1
@@ -23,7 +24,7 @@ endif
" General
syn cluster fsGeneralCluster contains=fsComment
syn match fsComment /\s*#.*/
syn match fsOperator /[,=:]/
syn match fsOperator /[,=:#]/
" Device
syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError
@@ -31,9 +32,11 @@ syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained
syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts sysfs usbfs
syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs
syn match fsDeviceKeyword contained /^[a-zA-Z0-9.\-]\+\ze:/
syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator
syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator
syn match fsDeviceSshfs contained /#[_=[:alnum:]\.\/+-]\+@[a-z0-9._-]\+\a\{2}:[^ \t]\+/hs=s+1 contains=fsOperator
" Mount Point
syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError
@@ -43,7 +46,7 @@ syn keyword fsMountPointKeyword contained none swap
" Type
syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
syn match fsTypeUnknown /\s\+\zs\w\+/ contained
syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext2fs ext3 fdesc ffs filecore hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs
syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext2fs ext3 fdesc ffs filecore fuse hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs
" Options
" -------
@@ -143,6 +146,14 @@ syn match fsOptionsKeywords contained /\<resize=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsReiserHash contained rupasov tea r5 detect
syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly
" Options: sshfs
syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\|cache\)=/ nextgroup=fsOptionsYesNo
syn match fsOptionsKeywords contained /\<\%(ControlMaster\|StrictHostKeyChecking\|VerifyHostKeyDNS\)=/ nextgroup=fsOptionsSshYesNoAsk
syn match fsOptionsKeywords contained /\<\%(AddressFamily\|BindAddress\|Cipher\|Ciphers\|ControlPath\|DynamicForward\|EscapeChar\|GlobalKnownHostsFile\|HostKeyAlgorithms\|HostKeyAlias\|HostName\|IdentityFile\|KbdInteractiveDevices\|LocalForward\|LogLevel\|MACs\|PreferredAuthentications\|Protocol\|ProxyCommand\|RemoteForward\|RhostsAuthentication\|SendEnv\|SmartcardDevice\|User\|UserKnownHostsFile\|XAuthLocation\|comment\|workaround\|idmap\|ssh_command\|sftp_server\|fsname\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(CompressionLevel\|ConnectionAttempts\|ConnectTimeout\|NumberOfPasswordPrompts\|Port\|ServerAliveCountMax\|ServerAliveInterval\|cache_timeout\|cache_X_timeout\|ssh_protocol\|directport\|max_read\|umask\|uid\|gid\|entry_timeout\|negative_timeout\|attr_timeout\)=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsKeywords contained reconnect sshfs_sync no_readahead sshfs_debug transform_symlinks allow_other allow_root nonempty default_permissions large_read hard_remove use_ino readdir_ino direct_io kernel_cache
syn keyword fsOptionsSshYesNoAsk contained yes no ask
" Options: subfs
syn match fsOptionsKeywords contained /\<fs=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained procuid
@@ -208,11 +219,13 @@ if version >= 508 || !exists("did_config_syntax_inits")
HiLink fsDeviceKeyword Identifier
HiLink fsDeviceLabel String
HiLink fsDeviceUUID String
HiLink fsDeviceSshfs String
HiLink fsFreqPassNumber Number
if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1
HiLink fsTypeUnknown Error
endif
HiLink fsDeviceError Error
HiLink fsMountPointError Error
HiLink fsMountPointKeyword Keyword
@@ -235,6 +248,7 @@ if version >= 508 || !exists("did_config_syntax_inits")
HiLink fsOptionsHpfsCase String
HiLink fsOptionsIsoMap String
HiLink fsOptionsReiserHash String
HiLink fsOptionsSshYesNoAsk String
HiLink fsOptionsUfsType String
HiLink fsOptionsUfsError String

View File

@@ -1,8 +1,7 @@
"%% SiSU Vim syntax file
" SiSU Maintainer: Ralph Amissah <ralph@amissah.com>
" SiSU Markup: SiSU (sisu-0.38)
" (originally looked at Ruby Vim by Mirko Nasato)
" Last Update: 2006 Jul 22
"SiSU Vim syntax file
"SiSU Maintainer: Ralph Amissah <ralph@amissah.com>
"SiSU Markup: SiSU (sisu-0.66.0, 2008-02-24)
"(originally looked at Ruby Vim by Mirko Nasato)
if version < 600
syntax clear
@@ -10,9 +9,11 @@ elseif exists("b:current_syntax")
finish
else
endif
"% 11 Errors?
" Errors:
syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>"
"% 10 Markers: Endnote Identifiers, Pagebreaks etc.:
" Markers Identifiers:
if !exists("sisu_no_identifiers")
syn match sisu_mark_endnote "\~^"
syn match sisu_contain contains=@NoSpell "</\?sub>"
@@ -24,49 +25,62 @@ if !exists("sisu_no_identifiers")
syn match sisu_control "\""
syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)"
syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}"
syn match sisu_link contains=@NoSpell "\(https\?://\|\.\.\/\)\S\+"
syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+"
"metaverse specific
syn match sisu_ocn contains=@NoSpell "<\~\d\+;\w\d\+;\w\d\+>"
syn match sisu_marktail "<\~#>"
syn match sisu_markpara contains=@NoSpell "<:i[12]>"
syn match sisu_markpara contains=@NoSpell "<:i[1-9]>"
syn match sisu_link " \*\~\S\+"
syn match sisu_action "^<:insert\d\+>"
syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^._-]\+\.ss[it]$"
syn match sisu_require contains=@NoSpell "^<<{[a-zA-Z0-9^._-]\+\.ss[it]}$"
syn match sisu_contain "<:e>"
syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]"
syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]"
syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]"
syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]"
syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1"
syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+"
syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1"
syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+"
endif
"% 9 URLs Numbers: and ASCII Codes
"URLs Numbers And ASCII Codes:
syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>"
syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)"
"% 8 Tuned Error - is error if not already matched
"Tuned Error: (is error if not already matched)
syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]"
syn match sisu_error contains=sisu_error "<a href\|</a>]"
"% 7 Simple Enclosed Markup:
" Simple Markup:
"% url/link
"Simple Paired Enclosed Markup:
"url/link
syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$"
"% header
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(\S\+\|[^-]\)" end="$"
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(tags\?\|date\)\s\+"rs=e-1 end="\n$"
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^@\S\+:[+-]\?\s"rs=e-1 end="$"
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^@\(tags\?\|date\):\s\+"rs=e-1 end="\n$"
"% headings
"header
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(\S\+\|[^-]\)" end="\n$"
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^[@%]\S\+:[+-]\?\s"rs=e-1 end="\n$"
"headings
syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$"
"% grouped text
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="table{.\+" end="}table"
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="{t\~h}" end="$$"
"grouped text
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table"
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n\n"
syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)"
syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code"
"% endnotes
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n"
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n"
"endnotes
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n"
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n"
syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n"
"% images
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}\(\(https\?://\|\.\./\)\S\+\|image\)" oneline
"% some line operations
"links and images
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|\.\./\)\S\+" oneline
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline
"some line operations
syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$"
syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([12*]\|[12]\*\) " end="$"
syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$"
syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$"
syn region sisu_comment matchgroup=sisu_comment start="^%\{1,2\} " end="$"
"% font face curly brackets
"font face curly brackets
"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*"
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!"
syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_"
@@ -76,41 +90,43 @@ syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu
syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="},"
syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-"
syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="<a href=\".\{-}\">" end="</a>" oneline
"% single words bold italicise etc. "workon
"single words bold italicise etc. "workon
syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline
syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline
"% misc
"misc
syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline
"% metaverse html (flagged as errors for filetype sisu)
"metaverse html (flagged as errors for filetype sisu)
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<b>" end="</b>" skip="\n" oneline
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<em>" end="</em>" skip="\n" oneline
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<i>" end="</i>" skip="\n" oneline
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<u>" end="</u>" skip="\n" oneline
syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<ins>" end="</ins>" skip="\\\\\|\\'" oneline
syn region sisu_identifier contains=sisu_error matchgroup=sisu_html start="<del>" end="</del>" oneline
"% metaverse <:>
"metaverse
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>"
syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>"
syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:alt>" end="<:alt[-_]end>"
syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:poem>" end="<:poem[-_]end>"
"% 6 Expensive Mode
" Expensive Mode:
"Expensive Mode:
if !exists("sisu_no_expensive")
else " not Expensive
syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline
endif " Expensive?
"% 5 Headers: and Headings (Document Instructions)
"Headers And Headings: (Document Instructions)
syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+"
syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$"
"% 4 Errors?
"Errors:
syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+"
syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+"
syn match sisu_error_wspace contains=sisu_error_wspace " \s*$"
syn match sisu_error contains=sisu_error,sisu_error_wspace "[^ (}]https\?:\S\+"
syn match sisu_error contains=sisu_error_wspace "\t\+"
syn match sisu_error contains=sisu_error "https\?:\S\+[}><]"
syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+"
syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]"
syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n\n"
syn match sisu_error contains=sisu_error "^[\-\~]{[^{]\{-}\n\n"
syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n\n"
syn match sisu_error contains=sisu_error "\s\+.{{"
syn match sisu_error contains=sisu_error "^\~\s*$"
syn match sisu_error contains=sisu_error "^[0-9]\~\s*$"
@@ -124,48 +140,53 @@ syn match sisu_error contains=sisu_error "<dir>"
"errors for filetype sisu, though not error in 'metaverse':
syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>"
syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n\n"
"% 3 Error Exceptions?
"Error Exceptions:
syn match sisu_control "\n\n" "contains=ALL
syn match sisu_control " //"
syn match sisu_error "%{"
syn match sisu_error "<br>https\?:\S\+\|https\?:\S\+<br>"
syn match sisu_error "[><]https\?:\S\+\|https\?:\S\+[><]"
"% 2 Definitions - Define the default highlighting.
if version >= 508 || !exists("did_sisu_syntax_inits")
if version < 508
let did_sisu_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
"% 1 Defined
HiLink sisu_normal Normal
HiLink sisu_header PreProc
HiLink sisu_header_content Statement
HiLink sisu_heading Title
HiLink sisu_structure Operator
HiLink sisu_contain Include
HiLink sisu_mark_endnote Include
HiLink sisu_link NonText
HiLink sisu_linked String
HiLink sisu_fontface Include
HiLink sisu_strikeout DiffDelete
HiLink sisu_content_alt Special
HiLink sisu_content_endnote Special
HiLink sisu_control Define
HiLink sisu_ocn Include
HiLink sisu_number Number
HiLink sisu_identifier Function
HiLink sisu_underline Underlined
HiLink sisu_markpara Include
HiLink sisu_marktail Include
HiLink sisu_mark Identifier
HiLink sisu_break Structure
HiLink sisu_html Type
HiLink sisu_action Identifier
HiLink sisu_comment Comment
HiLink sisu_error_wspace Error
HiLink sisu_error Error
delcommand HiLink
endif
syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>"
syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]"
"Definitions Default Highlighting:
hi def link sisu_normal Normal
hi def link sisu_header PreProc
hi def link sisu_header_content Statement
hi def link sisu_heading Title
hi def link sisu_structure Operator
hi def link sisu_contain Include
hi def link sisu_mark_endnote Include
hi def link sisu_require NonText
hi def link sisu_link NonText
hi def link sisu_linked String
hi def link sisu_fontface Include
hi def link sisu_strikeout DiffDelete
hi def link sisu_content_alt Special
hi def link sisu_sem_content String
hi def link sisu_sem_content SpecialKey
hi def link sisu_sem_block Special
hi def link sisu_sem_marker Visual
"hi def link sisu_sem_marker Structure
hi def link sisu_sem_marker_block MatchParen
hi def link sisu_sem_ex_marker FoldColumn
hi def link sisu_sem_ex_marker_block Folded
hi def link sisu_sem_ex_content Comment
"hi def link sisu_sem_ex_content SpecialKey
hi def link sisu_sem_ex_block Comment
hi def link sisu_content_endnote Special
hi def link sisu_control Define
hi def link sisu_ocn Include
hi def link sisu_number Number
hi def link sisu_identifier Function
hi def link sisu_underline Underlined
hi def link sisu_markpara Include
hi def link sisu_marktail Include
hi def link sisu_mark Identifier
hi def link sisu_break Structure
hi def link sisu_html Type
hi def link sisu_action Identifier
hi def link sisu_comment Comment
hi def link sisu_error_sem_marker Error
hi def link sisu_error_wspace Error
hi def link sisu_error Error
let b:current_syntax = "sisu"

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: YAML (YAML Ain't Markup Language)
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Latest Revision: 2007-06-27
if exists("b:current_syntax")
finish
@@ -10,53 +10,140 @@ endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword yamlTodo contained TODO FIXME XXX NOTE
syn keyword yamlTodo
\ contained
\ TODO
\ FIXME
\ XXX
\ NOTE
syn region yamlComment display oneline start='\%(^\|\s\)#' end='$'
syn region yamlComment
\ display
\ oneline
\ start='%(^|s)#'
\ end='$'
\ contains=yamlTodo,@Spell
syn match yamlNodeProperty '!\%(![^\\^% ]\+\|[^!][^:/ ]*\)'
syn match yamlNodeProperty
\ '!\%(![^\\^% \t]\+\|[^!][^:/ \t]*\)'
syn match yamlAnchor '&.\+'
syn match yamlAnchor
\ '&.+'
syn match yamlAlias '\*.\+'
syn match yamlAlias
\ '*.+'
syn match yamlDelimiter '[-,:]'
syn match yamlBlock '[\[\]{}>|]'
syn match yamlOperator '[?+-]'
syn match yamlKey '\w\+\(\s\+\w\+\)*\ze\s*:'
syn match yamlDelimiter
\ '[-,:]'
syn match yamlBlock
\ '[[]{}>|]'
syn match yamlOperator
\ '[?+-]'
syn match yamlKey
\ 'w+(s+w+)*zes*:'
syn region yamlString start=+"+ skip=+\\"+ end=+"+
syn region yamlString
\ start=+"+
\ skip=+\"+
\ end=+"+
\ contains=yamlEscape
syn region yamlString start=+'+ skip=+''+ end=+'+
syn region yamlString
\ start=+'+
\ skip=+''+
\ end=+'+
\ contains=yamlSingleEscape
syn match yamlEscape contained display +\\[\\"abefnrtv^0_ NLP]+
syn match yamlEscape contained display '\\x\x\{2}'
syn match yamlEscape contained display '\\u\x\{4}'
syn match yamlEscape contained display '\\U\x\{8}'
syn match yamlEscape
\ contained
\ display
\ +\[\"abefnrtv^0_ NLP]+
syn match yamlEscape
\ contained
\ display
\ '\xx{2}'
syn match yamlEscape
\ contained
\ display
\ '\ux{4}'
syn match yamlEscape
\ contained
\ display
\ '\Ux{8}'
" TODO: how do we get 0x85, 0x2028, and 0x2029 into this?
syn match yamlEscape display '\\\%(\r\n\|[\r\n]\)'
syn match yamlSingleEscape contained display +''+
" XXX: Em, what is going on here? This can't be right. Leave out until we
" figure out what this is meant to do.
"syn match yamlEscape
" \ contained
" \ display
" \ '\%(rn|[rn])'
syn match yamlSingleEscape
\ contained
\ display
\ +''+
" TODO: sexagecimal and fixed (20:30.15 and 1,230.15)
syn match yamlNumber display
syn match yamlNumber
\ display
\ '\<[+-]\=\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\='
syn match yamlNumber display '0\o\+'
syn match yamlNumber display '0x\x\+'
syn match yamlNumber display '([+-]\=[iI]nf)'
syn match yamlNumber display '(NaN)'
syn match yamlNumber
\ display
\ '0o+'
syn match yamlNumber
\ display
\ '0xx+'
syn match yamlNumber
\ display
\ '([+-]=[iI]nf)'
syn match yamlNumber
\ display
\ '(NaN)'
syn match yamlConstant '\<[~yn]\>'
syn keyword yamlConstant true True TRUE false False FALSE
syn keyword yamlConstant yes Yes on ON no No off OFF
syn keyword yamlConstant null Null NULL nil Nil NIL
syn match yamlConstant
\ '<[~yn]>'
syn keyword yamlConstant
\ true
\ True
\ TRUE
\ false
\ False
\ FALSE
syn keyword yamlConstant
\ yes
\ Yes
\ on
\ ON
\ no
\ No
\ off
\ OFF
syn keyword yamlConstant
\ null
\ Null
\ NULL
\ nil
\ Nil
\ NIL
syn match yamlTimestamp '\d\d\d\d-\%(1[0-2]\|\d\)-\%(3[0-2]\|2\d\|1\d\|\d\)\%( \%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d [+-]\%([01]\d\|2[0-3]\):[0-5]\d\|t\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d[+-]\%([01]\d\|2[0-3]\):[0-5]\d\|T\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\dZ\)\='
syn match yamlTimestamp
\ '\d\d\d\d-\%(1[0-2]\|\d\)-\%(3[0-2]\|2\d\|1\d\|\d\)\%( \%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d [+-]\%([01]\d\|2[0-3]\):[0-5]\d\|t\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d[+-]\%([01]\d\|2[0-3]\):[0-5]\d\|T\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\dZ\)\='
syn region yamlDocumentHeader start='---' end='$' contains=yamlDirective
syn match yamlDocumentEnd '\.\.\.'
syn region yamlDocumentHeader
\ start='---'
\ end='$'
\ contains=yamlDirective
syn match yamlDocumentEnd
\ '\.\.\.'
syn match yamlDirective contained '%[^:]\+:.\+'
syn match yamlDirective
\ contained
\ '%[^:]+:.+'
syn match yamlIndentation
\ '^s*'
\ contains=yamlIndentationError
syn match yamlIndentationError
\ 't'
hi def link yamlTodo Todo
hi def link yamlComment Comment
@@ -76,6 +163,7 @@ hi def link yamlSingleEscape SpecialChar
hi def link yamlNumber Number
hi def link yamlConstant Constant
hi def link yamlTimestamp Number
hi def link yamlIndentationError Error
let b:current_syntax = "yaml"

BIN
runtime/tutor/Contents.info Executable file

Binary file not shown.

View File

@@ -1,36 +1,602 @@
# Makefile for the Vim tutor.
# This Makefile has two purposes:
# 1. Starting the compilation of Vim for Unix.
# 2. Creating the various distribution files.
# 1. Using this Makefile without an argument will compile Vim for Unix.
#
# The Japanese tutor exists in three encodings. Use the UTF-8 version as the
# original and create the others with conversion.
# "make install" is also possible.
#
# Similarly for Russian and Korean
# NOTE: If this doesn't work properly, first change directory to "src" and use
# the Makefile there:
# cd src
# make [arguments]
# Noticed on AIX systems when using this Makefile: Trying to run "cproto" or
# something else after Vim has been compiled. Don't know why...
# Noticed on OS/390 Unix: Restarts configure.
#
# The first (default) target is "first". This will result in running
# "make first", so that the target from "src/auto/config.mk" is picked
# up properly when config didn't run yet. Doing "make all" before configure
# has run can result in compiling with $(CC) empty.
all: tutor.ja.sjis tutor.ja.euc \
tutor.ko.euc \
tutor.ru tutor.ru.cp1251 \
tutor.gr tutor.gr.cp737 \
tutor.hu
first:
@echo "Starting make in the src directory."
@echo "If there are problems, cd to the src directory and run make there"
cd src && $(MAKE) $@
tutor.ja.sjis: tutor.ja.utf-8
nkf -WXs tutor.ja.utf-8 > tutor.ja.sjis
# Some make programs use the last target for the $@ default; put the other
# targets separately to always let $@ expand to "first" by default.
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
@echo "Starting make in the src directory."
@echo "If there are problems, cd to the src directory and run make there"
cd src && $(MAKE) $@
tutor.ja.euc: tutor.ja.utf-8
nkf -WXe tutor.ja.utf-8 > tutor.ja.euc
tutor.ko.euc: tutor.ko.utf-8
iconv -f UTF-8 -t EUC-KR tutor.ko.utf-8 > tutor.ko.euc
# 2. Create the various distributions:
#
# TARGET PRODUCES CONTAINS
# unixall vim-#.#.tar.bz2 Runtime files and Sources for Unix
#
# extra vim-#.#-extra.tar.gz Extra source and runtime files
# lang vim-#.#-lang.tar.gz multi-language files
#
# html vim##html.zip HTML docs
#
# amisrc vim##src.tgz sources for Amiga
# amirt vim##rt.tgz runtime for Amiga
# amibin vim##bin.tgz binary for Amiga
#
# dossrc vim##src.zip sources for MS-DOS
# dosrt vim##rt.zip runtime for MS-DOS
# dosbin vim##d16.zip binary for MS-DOS 16 bits
# vim##d32.zip binary for MS-DOS 32 bits
# vim##w32.zip binary for Win32
# gvim##.zip binary for GUI Win32
# gvim##ole.zip OLE exe for Win32 GUI
# gvim##_s.zip exe for Win32s GUI
# doslang vim##lang.zip language files for Win32
#
# os2bin vim##os2.zip binary for OS/2
# (use RT from dosrt)
#
# farsi farsi##.zip Farsi fonts
#
# All output files are created in the "dist" directory. Existing files are
# overwritten!
# To do all this you need the unix, extra and lang archives, and
# compiled binaries.
# Before creating an archive first delete all backup files, *.orig, etc.
tutor.ru: tutor.ru.utf-8
iconv -f UTF-8 -t KOI8-R tutor.ru.utf-8 > tutor.ru
MAJOR = 7
MINOR = 2a
tutor.ru.cp1251: tutor.ru.utf-8
iconv -f UTF-8 -t cp1251 tutor.ru.utf-8 > tutor.ru.cp1251
# Uncomment this line if the Win32s version is to be included.
DOSBIN_S = dosbin_s
tutor.gr: tutor.gr.utf-8
iconv -f UTF-8 -t ISO-8859-7 tutor.gr.utf-8 > tutor.gr
# CHECKLIST for creating a new version:
#
# - Update Vim version number. For a test version in: src/version.h, Contents,
# MAJOR/MINOR above, VIMMAJOR and VIMMINOR in src/Makefile, README*.txt,
# runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a
# minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def.
# - Correct included_patches[] in src/version.c.
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme (if you can make it
# work), Cscope and "huge" features. Exclude workshop and SNiFF.
# - With these features: "make proto" (requires cproto and Motif installed;
# ignore warnings for missing include files, fix problems for syntax errors).
# - With these features: "make depend" (works best with gcc).
# - "make lint" and check the output (ignore GTK warnings).
# - Enable the efence library in "src/Makefile" and run "make test". Disable
# Python and Ruby to avoid trouble with threads (efence is not threadsafe).
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
# - Do "make menu" to update the runtime/synmenu.vim file.
# - Add remarks for changes to runtime/doc/version7.txt.
# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
# ADDITIONS".
# - In runtime/doc run "make" and "make html" to check for errors.
# - Check if src/Makefile and src/feature.h don't contain any personal
# preferences or the GTK, Perl, etc. mentioned above.
# - Check file protections to be "644" for text and "755" for executables (run
# the "check" script).
# - Check compiling on Amiga, MS-DOS and MS-Windows.
# - Delete all *~, *.sw?, *.orig, *.rej files
# - "make unixall", "make extra", "make lang", "make html"
# - Make diff files against the previous release: "makediff7 7.1 7.2"
#
# Amiga:
# - "make amisrc", move the archive to the Amiga and compile:
# "make -f Make_manx.mak" (will use "big" features by default).
# - Run the tests: "make -f Make_manx.mak test"
# - Place the executables Vim and Xxd in this directory (set the executable
# flag).
# - "make amirt", "make amibin".
#
# PC:
# - "make dossrc" and "make dosrt". Unpack the archives on a PC.
# 16 bit DOS version:
# - Set environment for compiling with Borland C++ 3.1.
# - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that
# case set environment for compiling with Borland C++ 4.0 and do
# "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe").
# NOTE: this currently fails because Vim is too big.
# - "make test" and check the output.
# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
# "uninstald16.exe".
# 32 bit DOS version:
# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output for
# "ALL DONE".
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
# "uninstald32.exe".
# Win32 console version:
# - Set environment for Visual C++ 2008 Express Edition: "msvc2008.bat". Or,
# when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the paths
# when necessary).
# - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
# - Rename vim.pdb to vimw32.pdb.
# - When building the Win32s version later, delete vimrun.exe, install.exe and
# uninstal.exe. Otherwise rename executables to installw32.exe and
# uninstalw32.exe.
# Win32 GUI version:
# - "nmake -f Make_mvc.mak GUI=yes.
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
# - Move gvim.pdb to here.
# - Delete vimrun.exe, install.exe and uninstal.exe.
# - Copy "GvimExt/gvimext.dll" to here.
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
# - Rename "gvim.exe" to "gvim_ole.exe".
# - Rename gvim.pdb to "gvim_ole.pdb".
# - Delete install.exe and uninstal.exe.
# - If building the Win32s version delete vimrun.exe.
# Win32s GUI version:
# - Set environment for Visual C++ 4.1 (requires a new console window)
# - "vcvars32" (use the path for VC 4.1 e:\msdev\bin)
# - "nmake -f Make_mvc.mak GUI=yes INTL=no clean" (use the path for VC 4.1)
# - "nmake -f Make_mvc.mak GUI=yes INTL=no" (use the path for VC 4.1)
# - Rename "gvim.exe" to "gvim_w32s.exe".
# - Rename "install.exe" to "installw32.exe"
# - Rename "uninstal.exe" to "uninstalw32.exe"
# - The produced uninstalw32.exe and vimrun.exe are used.
# Create the archives:
# - Copy all the "*.exe" files to where this Makefile is.
# - Copy all the "*.pdb" files to where this Makefile is.
# - "make dosbin".
# - Run make on Unix to update the ".mo" files.
# - "make doslang".
# NSIS self installing exe:
# - Unpack the doslang archive on the PC.
# - Make sure gvim_ole.exe, vimd32.exe, vimw32.exe, installw32.exe,
# uninstalw32.exe and xxdw32.exe have been build as mentioned above.
# - put gvimext.dll in src/GvimExt and VisVim.dll in src/VisVim (get them
# from a binary archive or build them)
# Note: VisVim needs to be build with MSVC 5, newer versions don't work.
# - make sure there is a diff.exe two levels up
# - go to ../nsis and do "makensis gvim.nsi".
# - Copy gvim##.exe to the dist directory.
#
# OS/2:
# - Unpack the Unix "src", "extra" and "rt" archives.
# - "make -f Make_os2.mak".
# - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy
# them to here.
# - "make os2bin".
tutor.gr.cp737: tutor.gr.utf-8
iconv -f UTF-8 -t cp737 tutor.gr.utf-8 > tutor.gr.cp737
VIMVER = vim-$(MAJOR).$(MINOR)
VERSION = $(MAJOR)$(MINOR)
VDOT = $(MAJOR).$(MINOR)
VIMRTDIR = vim$(VERSION)
tutor.hu: tutor.hu.utf-8
iconv -f UTF-8 -t ISO-8859-2 tutor.hu.utf-8 > tutor.hu
# Vim used for conversion from "unix" to "dos"
VIM = vim
# How to include Filelist depends on the version of "make" you have.
# If the current choice doesn't work, try the other one.
include Filelist
#.include "Filelist"
# All output is put in the "dist" directory.
dist:
mkdir dist
# Clean up some files to avoid they are included.
prepare:
if test -f runtime/doc/uganda.nsis.txt; then \
rm runtime/doc/uganda.nsis.txt; fi
# For the zip files we need to create a file with the comment line
dist/comment:
mkdir dist/comment
COMMENT_RT = comment/$(VERSION)-rt
COMMENT_RT1 = comment/$(VERSION)-rt1
COMMENT_RT2 = comment/$(VERSION)-rt2
COMMENT_D16 = comment/$(VERSION)-bin-d16
COMMENT_D32 = comment/$(VERSION)-bin-d32
COMMENT_W32 = comment/$(VERSION)-bin-w32
COMMENT_GVIM = comment/$(VERSION)-bin-gvim
COMMENT_OLE = comment/$(VERSION)-bin-ole
COMMENT_W32S = comment/$(VERSION)-bin-w32s
COMMENT_SRC = comment/$(VERSION)-src
COMMENT_OS2 = comment/$(VERSION)-bin-os2
COMMENT_HTML = comment/$(VERSION)-html
COMMENT_FARSI = comment/$(VERSION)-farsi
COMMENT_LANG = comment/$(VERSION)-lang
dist/$(COMMENT_RT): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
dist/$(COMMENT_RT1): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 1) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT1)
dist/$(COMMENT_RT2): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 2) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT2)
dist/$(COMMENT_D16): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 16 bit real mode" > dist/$(COMMENT_D16)
dist/$(COMMENT_D32): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 32 bit protected mode" > dist/$(COMMENT_D32)
dist/$(COMMENT_W32): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
dist/$(COMMENT_GVIM): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
dist/$(COMMENT_OLE): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
dist/$(COMMENT_W32S): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows 3.1/3.11" > dist/$(COMMENT_W32S)
dist/$(COMMENT_SRC): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) sources for MS-DOS and MS-Windows" > dist/$(COMMENT_SRC)
dist/$(COMMENT_OS2): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) binaries + runtime files for OS/2" > dist/$(COMMENT_OS2)
dist/$(COMMENT_HTML): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) documentation in HTML" > dist/$(COMMENT_HTML)
dist/$(COMMENT_FARSI): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
dist/$(COMMENT_LANG): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) MS-Windows language files" > dist/$(COMMENT_LANG)
unixall: dist prepare
-rm -f dist/$(VIMVER).tar.bz2
-rm -rf dist/$(VIMRTDIR)
mkdir dist/$(VIMRTDIR)
tar cf - \
$(RT_ALL) \
$(RT_ALL_BIN) \
$(RT_UNIX) \
$(RT_UNIX_DOS_BIN) \
$(RT_SCRIPTS) \
$(LANG_GEN) \
$(LANG_GEN_BIN) \
$(SRC_ALL) \
$(SRC_UNIX) \
$(SRC_DOS_UNIX) \
| (cd dist/$(VIMRTDIR); tar xf -)
# Need to use a "distclean" config.mk file
cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
# Create an empty config.h file, make dependencies require it
touch dist/$(VIMRTDIR)/src/auto/config.h
# Make sure configure is newer than config.mk to force it to be generated
touch dist/$(VIMRTDIR)/src/configure
cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
bzip2 dist/$(VIMVER).tar
extra: dist prepare
-rm -f dist/$(VIMVER)-extra.tar.gz
-rm -rf dist/$(VIMRTDIR)
mkdir dist/$(VIMRTDIR)
tar cf - \
$(EXTRA) \
| (cd dist/$(VIMRTDIR); tar xf -)
cd dist && tar cf $(VIMVER)-extra.tar $(VIMRTDIR)
gzip -9 dist/$(VIMVER)-extra.tar
lang: dist prepare
-rm -f dist/$(VIMVER)-lang.tar.gz
-rm -rf dist/$(VIMRTDIR)
mkdir dist/$(VIMRTDIR)
tar cf - \
$(LANG_SRC) \
| (cd dist/$(VIMRTDIR); tar xf -)
# Make sure ja.sjis.po is newer than ja.po to avoid it being regenerated.
# Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
touch dist/$(VIMRTDIR)/src/po/cs.cp1250.po
touch dist/$(VIMRTDIR)/src/po/pl.cp1250.po
touch dist/$(VIMRTDIR)/src/po/sk.cp1250.po
touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
cd dist && tar cf $(VIMVER)-lang.tar $(VIMRTDIR)
gzip -9 dist/$(VIMVER)-lang.tar
amirt: dist prepare
-rm -f dist/vim$(VERSION)rt.tar.gz
-rm -rf dist/Vim
mkdir dist/Vim
mkdir dist/Vim/$(VIMRTDIR)
tar cf - \
$(ROOT_AMI) \
$(RT_ALL) \
$(RT_ALL_BIN) \
$(RT_SCRIPTS) \
$(RT_AMI) \
$(RT_NO_UNIX) \
$(RT_AMI_DOS) \
| (cd dist/Vim/$(VIMRTDIR); tar xf -)
mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
mv dist/Vim/$(VIMRTDIR)/runtime/* dist/Vim/$(VIMRTDIR)
rmdir dist/Vim/$(VIMRTDIR)/runtime
cd dist && tar cf vim$(VERSION)rt.tar Vim Vim.info
gzip -9 dist/vim$(VERSION)rt.tar
mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
amibin: dist prepare
-rm -f dist/vim$(VERSION)bin.tar.gz
-rm -rf dist/Vim
mkdir dist/Vim
mkdir dist/Vim/$(VIMRTDIR)
tar cf - \
$(ROOT_AMI) \
$(BIN_AMI) \
Vim \
Xxd \
| (cd dist/Vim/$(VIMRTDIR); tar xf -)
mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
cd dist && tar cf vim$(VERSION)bin.tar Vim Vim.info
gzip -9 dist/vim$(VERSION)bin.tar
mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
amisrc: dist prepare
-rm -f dist/vim$(VERSION)src.tar.gz
-rm -rf dist/Vim
mkdir dist/Vim
mkdir dist/Vim/$(VIMRTDIR)
tar cf - \
$(ROOT_AMI) \
$(SRC_ALL) \
$(SRC_AMI) \
$(SRC_AMI_DOS) \
| (cd dist/Vim/$(VIMRTDIR); tar xf -)
mv dist/Vim/$(VIMRTDIR)/vimdir.info dist/Vim.info
mv dist/Vim/$(VIMRTDIR)/runtime.info dist/Vim/$(VIMRTDIR).info
cd dist && tar cf vim$(VERSION)src.tar Vim Vim.info
gzip -9 dist/vim$(VERSION)src.tar
mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
no_title.vim: Makefile
echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
dosrt: dist dist/$(COMMENT_RT) dosrt_unix2dos
-rm -rf dist/vim$(VERSION)rt.zip
cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
# Split in two parts to avoid a "argument list too long" error.
dosrt_unix2dos: dist prepare no_title.vim
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(RT_ALL) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
tar cf - \
$(RT_SCRIPTS) \
$(RT_DOS) \
$(RT_NO_UNIX) \
$(RT_AMI_DOS) \
$(LANG_GEN) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
tar cf - \
$(RT_UNIX_DOS_BIN) \
$(RT_ALL_BIN) \
$(RT_DOS_BIN) \
$(LANG_GEN_BIN) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
rmdir dist/vim/$(VIMRTDIR)/runtime
# Convert runtime files from Unix fileformat to dos fileformat.
# Used before uploading. Don't delete the AAPDIR/sign files!
runtime_unix2dos: dosrt_unix2dos
-rm -rf `find runtime/dos -type f -print | sed -e /AAPDIR/d`
cd dist/vim/$(VIMRTDIR); tar cf - * \
| (cd ../../../runtime/dos; tar xf -)
dosbin: prepare dosbin_gvim dosbin_w32 dosbin_d32 dosbin_d16 dosbin_ole $(DOSBIN_S)
# make Win32 gvim
dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
-rm -rf dist/gvim$(VERSION).zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(BIN_DOS) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
cp gvim.pdb dist/gvim$(VERSION).pdb
# make Win32 console
dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
-rm -rf dist/vim$(VERSION)w32.zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(BIN_DOS) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
cp vimw32.pdb dist/vim$(VERSION)w32.pdb
# make 32bit DOS
dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
-rm -rf dist/vim$(VERSION)d32.zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(BIN_DOS) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
cp vimd32.exe dist/vim/$(VIMRTDIR)/vim.exe
cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
cp installd32.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstald32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cp csdpmi4b.zip dist/vim/$(VIMRTDIR)
cd dist && zip -9 -rD -z vim$(VERSION)d32.zip vim <$(COMMENT_D32)
# make 16bit DOS
dosbin_d16: dist no_title.vim dist/$(COMMENT_D16)
-rm -rf dist/vim$(VERSION)d16.zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(BIN_DOS) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
cp vimd16.exe dist/vim/$(VIMRTDIR)/vim.exe
cp xxdd16.exe dist/vim/$(VIMRTDIR)/xxd.exe
cp installd16.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstald16.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cd dist && zip -9 -rD -z vim$(VERSION)d16.zip vim <$(COMMENT_D16)
# make Win32 gvim with OLE
dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
-rm -rf dist/gvim$(VERSION)ole.zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(BIN_DOS) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
cp README_ole.txt dist/vim/$(VIMRTDIR)
cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
# make Win32s gvim
dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
-rm -rf dist/gvim$(VERSION)_s.zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(BIN_DOS) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
cp gvim_w32s.exe dist/vim/$(VIMRTDIR)/gvim.exe
cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
cp README_w32s.txt dist/vim/$(VIMRTDIR)
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cd dist && zip -9 -rD -z gvim$(VERSION)_s.zip vim <$(COMMENT_W32S)
# make Win32 lang archive
doslang: dist prepare no_title.vim dist/$(COMMENT_LANG)
-rm -rf dist/vim$(VERSION)lang.zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
mkdir dist/vim/$(VIMRTDIR)/lang
cd src && MAKEMO=yes $(MAKE) languages
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
# Add the message translations. Trick: skip ja.mo and use ja.sjis.mo instead.
# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
for i in $(LANG_DOS); do \
if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/pl.mo" -a "$$i" != "src/po/cs.mo" -a "$$i" != "src/po/sk.mo" -a "$$i" != "src/po/zh_CN.mo" -a "$$i" != "src/po/ru.mo" -a "$$i" != "src/po/uk.mo"; then \
n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
fi \
done
cp libintl.dll dist/vim/$(VIMRTDIR)/
cd dist && zip -9 -rD -z vim$(VERSION)lang.zip vim <$(COMMENT_LANG)
# MS-DOS sources
dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
-rm -rf dist/vim$(VERSION)src.zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(SRC_ALL) \
$(SRC_DOS) \
$(SRC_AMI_DOS) \
$(SRC_DOS_UNIX) \
runtime/doc/uganda.nsis.txt \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
rmdir dist/vim/$(VIMRTDIR)/runtime
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
tar cf - \
$(SRC_DOS_BIN) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
cd runtime/doc && $(MAKE) uganda.nsis.txt
os2bin: dist no_title.vim dist/$(COMMENT_OS2)
-rm -rf dist/vim$(VERSION)os2.zip
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
tar cf - \
$(BIN_OS2) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
cp vimos2.exe dist/vim/$(VIMRTDIR)/vim.exe
cp xxdos2.exe dist/vim/$(VIMRTDIR)/xxd.exe
cp teeos2.exe dist/vim/$(VIMRTDIR)/tee.exe
cp emx.dll emxlibcs.dll dist/vim/$(VIMRTDIR)
cd dist && zip -9 -rD -z vim$(VERSION)os2.zip vim <$(COMMENT_OS2)
html: dist dist/$(COMMENT_HTML)
-rm -rf dist/vim$(VERSION)html.zip
cd runtime/doc && zip -9 -z ../../dist/vim$(VERSION)html.zip *.html <../../dist/$(COMMENT_HTML)
farsi: dist dist/$(COMMENT_FARSI)
-rm -f dist/farsi$(VERSION).zip
zip -9 -rD -z dist/farsi$(VERSION).zip farsi < dist/$(COMMENT_FARSI)

View File

@@ -0,0 +1,130 @@
README_os_390.txt for version 7.2a of Vim: Vi IMproved.
Welcome to the OS/390 Unix port of VIM.
ATTENTION: THIS IS AN _ALPHA_ VERSION!!!
I expect you to know how to handle alpha software!
This port was done by Ralf Schandl <schandl@de.ibm.com>.
This port is not maintained or supported by IBM!!
For the list of changes see runtime/doc/os_390.txt.
Compiling:
----------
Note: After the file configure was created via autoconf, it had been
handedited, to make the test for ICEConnectionNumber work.
DO NOT run autoconf again!
Without X11:
If you build VIM without X11 support, compiling and building is nearly
straightforward. The only restriction is, that you can't call make from the
VIM toplevel directory. Change to the src directory first and call make from
there. Here is a what to do:
# Don't use c89!
# Make additional symbols visible.
# Allow intermixing of compiler options and files.
$ export CC=cc
$ export CFLAGS=-D_ALL_SOURCE
$ export _CC_CCMODE=1
$./configure --enable-max-features --without-x --enable-gui=no
$ cd src
$ make
$ make test
Note: Test 28 will be reported as failed. This is because diff can't
compare files containing '\0' characters. Test 11 will fail if you
don't have gzip.
$ make install
With X11:
There are two ways for building VIM with X11 support. The first way is simple
and results in a big executable (~13 Mb), the second needs a few additional
steps and results in a much smaller executable (~4.5 Mb). This examples assume
you want Motif.
The easy way:
$ export CC=cc
$ export CFLAGS="-D_ALL_SOURCE -W c,dll"
$ export LDFLAGS="-W l,dll"
$ export _CC_CCMODE=1
$ ./configure --enable-max-features --enable-gui=motif
$ cd src
$ make
With this VIM is linked statically with the X11 libraries.
The smarter way:
Make VIM as described above. Then create a file named 'link.sed' with the
following contense:
s/-lXext *//g
s/-lXmu *//g
s/-lXm */\/usr\/lib\/Xm.x /g
s/-lX11 */\/usr\/lib\/X11.x /g
s/-lXt *//g
s/-lSM */\/usr\/lib\/SM.x /g
s/-lICE */\/usr\/lib\/ICE.x /g
Then do:
$ rm vim
$ make
Now Vim is linked with the X11-DLLs.
See the Makefile and the file link.sh on how link.sed is used.
Hint:
-----
Use the online help! (See weaknesses below.)
Example:
Enter ':help syntax' and then press <TAB> several times, you will switch
through all help items containing 'syntax'. Press <ENTER> on the one you are
interested at. Or press <Ctrl-D> and you will get a list of all items printed
that contain 'syntax'.
The helpfiles contains cross-references. Links are between '|'. Position the
cursor on them and press <Ctrl-]> to follow this link. Use <Ctrl-T> to jump
back.
Known weaknesses:
-----------------
- You can't call make from the toplevel directory, you have to do a 'cd src'
first. If you do it, make will call configure again. I don't know why and
didn't investigate it, there were more important things to do. If you can
make it work drop me a note.
- The documentation was not updated for this alpha release. It contains lot of
ASCII dependencies, especially in examples.
- Digraphs are dependent on code page 1047. Digraphs are used to enter
characters that normally cannot be entered by an ordinary keyboard.
See ":help digraphs".
- Using 'ga' to show the code of the character under the cursor shows the
correct dec/hex/oct values, but the other informations might be missing or
wrong.
- The sed syntax file doesn't work, it is ASCII dependent.
Bugs:
-----
If you find a bug please inform me (schandl@de.ibm.com), don't disturb Bram
Moolenaar. It's most likely a bug I introduced during porting or some ASCII
dependency I didn't notice.
Feedback:
---------
Feedback welcome! Just drop me a note.

View File

@@ -0,0 +1,580 @@
" Script to define the syntax menu in synmenu.vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Jun 24
" This is used by "make menu" in the src directory.
edit <sfile>:p:h/synmenu.vim
/The Start Of The Syntax Menu/+1,/The End Of The Syntax Menu/-1d
let s:lnum = line(".") - 1
call append(s:lnum, "")
let s:lnum = s:lnum + 1
" Use the SynMenu command and function to define all menu entries
command! -nargs=* SynMenu call <SID>Syn(<q-args>)
let s:cur_menu_name = ""
let s:cur_menu_nr = 0
let s:cur_menu_item = 0
let s:cur_menu_char = ""
fun! <SID>Syn(arg)
" isolate menu name: until the first dot
let i = match(a:arg, '\.')
let menu_name = strpart(a:arg, 0, i)
let r = strpart(a:arg, i + 1, 999)
" isolate submenu name: until the colon
let i = match(r, ":")
let submenu_name = strpart(r, 0, i)
" after the colon is the syntax name
let syntax_name = strpart(r, i + 1, 999)
if s:cur_menu_name != menu_name
let s:cur_menu_name = menu_name
let s:cur_menu_nr = s:cur_menu_nr + 10
let s:cur_menu_item = 100
let s:cur_menu_char = submenu_name[0]
else
" When starting a new letter, insert a menu separator.
let c = submenu_name[0]
if c != s:cur_menu_char
exe 'an 50.' . s:cur_menu_nr . '.' . s:cur_menu_item . ' &Syntax.' . menu_name . ".-" . c . '- <nul>'
let s:cur_menu_item = s:cur_menu_item + 10
let s:cur_menu_char = c
endif
endif
call append(s:lnum, 'an 50.' . s:cur_menu_nr . '.' . s:cur_menu_item . ' &Syntax.' . menu_name . "." . submenu_name . ' :cal SetSyn("' . syntax_name . '")<CR>')
let s:cur_menu_item = s:cur_menu_item + 10
let s:lnum = s:lnum + 1
endfun
SynMenu AB.A2ps\ config:a2ps
SynMenu AB.Aap:aap
SynMenu AB.ABAP/4:abap
SynMenu AB.Abaqus:abaqus
SynMenu AB.ABC\ music\ notation:abc
SynMenu AB.ABEL:abel
SynMenu AB.AceDB\ model:acedb
SynMenu AB.Ada:ada
SynMenu AB.AfLex:aflex
SynMenu AB.ALSA\ config:alsaconf
SynMenu AB.Altera\ AHDL:ahdl
SynMenu AB.Amiga\ DOS:amiga
SynMenu AB.AMPL:ampl
SynMenu AB.Ant\ build\ file:ant
SynMenu AB.ANTLR:antlr
SynMenu AB.Apache\ config:apache
SynMenu AB.Apache-style\ config:apachestyle
SynMenu AB.Applix\ ELF:elf
SynMenu AB.Arc\ Macro\ Language:aml
SynMenu AB.Arch\ inventory:arch
SynMenu AB.ART:art
SynMenu AB.ASP\ with\ VBScript:aspvbs
SynMenu AB.ASP\ with\ Perl:aspperl
SynMenu AB.Assembly.680x0:asm68k
SynMenu AB.Assembly.Flat:fasm
SynMenu AB.Assembly.GNU:asm
SynMenu AB.Assembly.GNU\ H-8300:asmh8300
SynMenu AB.Assembly.Intel\ IA-64:ia64
SynMenu AB.Assembly.Microsoft:masm
SynMenu AB.Assembly.Netwide:nasm
SynMenu AB.Assembly.PIC:pic
SynMenu AB.Assembly.Turbo:tasm
SynMenu AB.Assembly.VAX\ Macro\ Assembly:vmasm
SynMenu AB.Assembly.Z-80:z8a
SynMenu AB.Assembly.xa\ 6502\ cross\ assember:a65
SynMenu AB.ASN\.1:asn
SynMenu AB.Asterisk\ config:asterisk
SynMenu AB.Asterisk\ voicemail\ config:asteriskvm
SynMenu AB.Atlas:atlas
SynMenu AB.AutoHotKey:autohotkey
SynMenu AB.AutoIt:autoit
SynMenu AB.Automake:automake
SynMenu AB.Avenue:ave
SynMenu AB.Awk:awk
SynMenu AB.AYacc:ayacc
SynMenu AB.B:b
SynMenu AB.Baan:baan
SynMenu AB.Basic.FreeBasic:freebasic
SynMenu AB.Basic.IBasic:ibasic
SynMenu AB.Basic.QBasic:basic
SynMenu AB.Basic.Visual\ Basic:vb
SynMenu AB.Bazaar\ commit\ file:bzr
SynMenu AB.BC\ calculator:bc
SynMenu AB.BDF\ font:bdf
SynMenu AB.BibTeX.Bibliography\ database:bib
SynMenu AB.BibTeX.Bibliography\ Style:bst
SynMenu AB.BIND.BIND\ config:named
SynMenu AB.BIND.BIND\ zone:bindzone
SynMenu AB.Blank:blank
SynMenu C.C:c
SynMenu C.C++:cpp
SynMenu C.C#:cs
SynMenu C.Calendar:calendar
SynMenu C.Cascading\ Style\ Sheets:css
SynMenu C.CDL:cdl
SynMenu C.Cdrdao\ TOC:cdrtoc
SynMenu C.Cdrdao\ config:cdrdaoconf
SynMenu C.Century\ Term:cterm
SynMenu C.CH\ script:ch
SynMenu C.ChangeLog:changelog
SynMenu C.Cheetah\ template:cheetah
SynMenu C.CHILL:chill
SynMenu C.ChordPro:chordpro
SynMenu C.Clean:clean
SynMenu C.Clever:cl
SynMenu C.Clipper:clipper
SynMenu C.Cmake:cmake
SynMenu C.Cmusrc:cmusrc
SynMenu C.Cobol:cobol
SynMenu C.Coco/R:coco
SynMenu C.Cold\ Fusion:cf
SynMenu C.Conary\ Recipe:conaryrecipe
SynMenu C.Config.Cfg\ Config\ file:cfg
SynMenu C.Config.Configure\.in:config
SynMenu C.Config.Generic\ Config\ file:conf
SynMenu C.CRM114:crm
SynMenu C.Crontab:crontab
SynMenu C.CSP:csp
SynMenu C.Ctrl-H:ctrlh
SynMenu C.CUDA:cuda
SynMenu C.CUPL.CUPL:cupl
SynMenu C.CUPL.Simulation:cuplsim
SynMenu C.CVS.commit\ file:cvs
SynMenu C.CVS.cvsrc:cvsrc
SynMenu C.Cyn++:cynpp
SynMenu C.Cynlib:cynlib
SynMenu DE.D:d
SynMenu DE.Debian.Debian\ ChangeLog:debchangelog
SynMenu DE.Debian.Debian\ Control:debcontrol
SynMenu DE.Debian.Debian\ Sources\.list:debsources
SynMenu DE.Denyhosts:denyhosts
SynMenu DE.Desktop:desktop
SynMenu DE.Dict\ config:dictconf
SynMenu DE.Dictd\ config:dictdconf
SynMenu DE.Diff:diff
SynMenu DE.Digital\ Command\ Lang:dcl
SynMenu DE.Dircolors:dircolors
SynMenu DE.Django\ template:django
SynMenu DE.DNS/BIND\ zone:bindzone
SynMenu DE.DocBook.auto-detect:docbk
SynMenu DE.DocBook.SGML:docbksgml
SynMenu DE.DocBook.XML:docbkxml
SynMenu DE.Dot:dot
SynMenu DE.Doxygen.C\ with\ doxygen:c.doxygen
SynMenu DE.Doxygen.C++\ with\ doxygen:cpp.doxygen
SynMenu DE.Doxygen.IDL\ with\ doxygen:idl.doxygen
SynMenu DE.Doxygen.Java\ with\ doxygen:java.doxygen
SynMenu DE.Dracula:dracula
SynMenu DE.DSSSL:dsl
SynMenu DE.DTD:dtd
SynMenu DE.DTML\ (Zope):dtml
SynMenu DE.DTrace:dtrace
SynMenu DE.Dylan.Dylan:dylan
SynMenu DE.Dylan.Dylan\ interface:dylanintr
SynMenu DE.Dylan.Dylan\ lid:dylanlid
SynMenu DE.EDIF:edif
SynMenu DE.Eiffel:eiffel
SynMenu DE.Elinks\ config:elinks
SynMenu DE.Elm\ filter\ rules:elmfilt
SynMenu DE.Embedix\ Component\ Description:ecd
SynMenu DE.ERicsson\ LANGuage:erlang
SynMenu DE.ESMTP\ rc:esmtprc
SynMenu DE.ESQL-C:esqlc
SynMenu DE.Essbase\ script:csc
SynMenu DE.Esterel:esterel
SynMenu DE.Eterm\ config:eterm
SynMenu DE.Eviews:eviews
SynMenu DE.Exim\ conf:exim
SynMenu DE.Expect:expect
SynMenu DE.Exports:exports
SynMenu FG.Fetchmail:fetchmail
SynMenu FG.FlexWiki:flexwiki
SynMenu FG.Focus\ Executable:focexec
SynMenu FG.Focus\ Master:master
SynMenu FG.FORM:form
SynMenu FG.Forth:forth
SynMenu FG.Fortran:fortran
SynMenu FG.FoxPro:foxpro
SynMenu FG.FrameScript:framescript
SynMenu FG.Fstab:fstab
SynMenu FG.Fvwm.Fvwm\ configuration:fvwm1
SynMenu FG.Fvwm.Fvwm2\ configuration:fvwm2
SynMenu FG.Fvwm.Fvwm2\ configuration\ with\ M4:fvwm2m4
SynMenu FG.GDB\ command\ file:gdb
SynMenu FG.GDMO:gdmo
SynMenu FG.Gedcom:gedcom
SynMenu FG.Git.Output:git
SynMenu FG.Git.Commit:gitcommit
SynMenu FG.Git.Config:gitconfig
SynMenu FG.Git.Rebase:gitrebase
SynMenu FG.Git.Send\ Email:gitsendemail
SynMenu FG.Gkrellmrc:gkrellmrc
SynMenu FG.GP:gp
SynMenu FG.GPG:gpg
SynMenu FG.Group\ file:group
SynMenu FG.Grub:grub
SynMenu FG.GNU\ Server\ Pages:gsp
SynMenu FG.GNUplot:gnuplot
SynMenu FG.GrADS\ scripts:grads
SynMenu FG.Gretl:gretl
SynMenu FG.Groff:groff
SynMenu FG.Groovy:groovy
SynMenu FG.GTKrc:gtkrc
SynMenu HIJK.Hamster:hamster
SynMenu HIJK.Haskell.Haskell:haskell
SynMenu HIJK.Haskell.Haskell-c2hs:chaskell
SynMenu HIJK.Haskell.Haskell-literate:lhaskell
SynMenu HIJK.HASTE:haste
SynMenu HIJK.Hercules:hercules
SynMenu HIJK.Hex\ dump.XXD:xxd
SynMenu HIJK.Hex\ dump.Intel\ MCS51:hex
SynMenu HIJK.HTML.HTML:html
SynMenu HIJK.HTML.HTML\ with\ M4:htmlm4
SynMenu HIJK.HTML.HTML\ with\ Ruby\ (eRuby):eruby
SynMenu HIJK.HTML.Cheetah\ HTML\ template:htmlcheetah
SynMenu HIJK.HTML.Django\ HTML\ template:htmldjango
SynMenu HIJK.HTML.HTML/OS:htmlos
SynMenu HIJK.HTML.XHTML:xhtml
SynMenu HIJK.Host\.conf:hostconf
SynMenu HIJK.Hyper\ Builder:hb
SynMenu HIJK.Icewm\ menu:icemenu
SynMenu HIJK.Icon:icon
SynMenu HIJK.IDL\Generic\ IDL:idl
SynMenu HIJK.IDL\Microsoft\ IDL:msidl
SynMenu HIJK.Indent\ profile:indent
SynMenu HIJK.Inform:inform
SynMenu HIJK.Informix\ 4GL:fgl
SynMenu HIJK.Initng:initng
SynMenu HIJK.Inittab:inittab
SynMenu HIJK.Inno\ setup:iss
SynMenu HIJK.InstallShield\ script:ishd
SynMenu HIJK.Interactive\ Data\ Lang:idlang
SynMenu HIJK.IPfilter:ipfilter
SynMenu HIJK.JAL:jal
SynMenu HIJK.JAM:jam
SynMenu HIJK.Jargon:jargon
SynMenu HIJK.Java.Java:java
SynMenu HIJK.Java.JavaCC:javacc
SynMenu HIJK.Java.Java\ Server\ Pages:jsp
SynMenu HIJK.Java.Java\ Properties:jproperties
SynMenu HIJK.JavaScript:javascript
SynMenu HIJK.Jess:jess
SynMenu HIJK.Jgraph:jgraph
SynMenu HIJK.Kconfig:kconfig
SynMenu HIJK.KDE\ script:kscript
SynMenu HIJK.Kimwitu++:kwt
SynMenu HIJK.KixTart:kix
SynMenu L-Ma.Lace:lace
SynMenu L-Ma.LamdaProlog:lprolog
SynMenu L-Ma.Latte:latte
SynMenu L-Ma.Ld\ script:ld
SynMenu L-Ma.LDAP.LDIF:ldif
SynMenu L-Ma.LDAP.Configuration:ldapconf
SynMenu L-Ma.Lex:lex
SynMenu L-Ma.LFTP\ config:lftp
SynMenu L-Ma.Libao:libao
SynMenu L-Ma.LifeLines\ script:lifelines
SynMenu L-Ma.Lilo:lilo
SynMenu L-Ma.Limits\ config:limits
SynMenu L-Ma.Linden\ scripting:lsl
SynMenu L-Ma.Lisp:lisp
SynMenu L-Ma.Lite:lite
SynMenu L-Ma.LiteStep\ RC:litestep
SynMenu L-Ma.Locale\ Input:fdcc
SynMenu L-Ma.Login\.access:loginaccess
SynMenu L-Ma.Login\.defs:logindefs
SynMenu L-Ma.Logtalk:logtalk
SynMenu L-Ma.LOTOS:lotos
SynMenu L-Ma.LotusScript:lscript
SynMenu L-Ma.Lout:lout
SynMenu L-Ma.LPC:lpc
SynMenu L-Ma.Lua:lua
SynMenu L-Ma.Lynx\ Style:lss
SynMenu L-Ma.Lynx\ config:lynx
SynMenu L-Ma.M4:m4
SynMenu L-Ma.MaGic\ Point:mgp
SynMenu L-Ma.Mail:mail
SynMenu L-Ma.Mail\ aliases:mailaliases
SynMenu L-Ma.Mailcap:mailcap
SynMenu L-Ma.Makefile:make
SynMenu L-Ma.MakeIndex:ist
SynMenu L-Ma.Man\ page:man
SynMenu L-Ma.Man\.conf:manconf
SynMenu L-Ma.Maple\ V:maple
SynMenu L-Ma.Mason:mason
SynMenu L-Ma.Mathematica:mma
SynMenu L-Ma.Matlab:matlab
SynMenu L-Ma.Maxima:maxima
SynMenu Me-NO.MEL\ (for\ Maya):mel
SynMenu Me-NO.Messages\ (/var/log):messages
SynMenu Me-NO.Metafont:mf
SynMenu Me-NO.MetaPost:mp
SynMenu Me-NO.MGL:mgl
SynMenu Me-NO.MMIX:mmix
SynMenu Me-NO.Modconf:modconf
SynMenu Me-NO.Model:model
SynMenu Me-NO.Modsim\ III:modsim3
SynMenu Me-NO.Modula\ 2:modula2
SynMenu Me-NO.Modula\ 3:modula3
SynMenu Me-NO.Monk:monk
SynMenu Me-NO.Mplayer\ config:mplayerconf
SynMenu Me-NO.MOO:moo
SynMenu Me-NO.Mrxvtrc:mrxvtrc
SynMenu Me-NO.MS-DOS/Windows.4DOS\ \.bat\ file:btm
SynMenu Me-NO.MS-DOS/Windows.\.bat\/\.cmd\ file:dosbatch
SynMenu Me-NO.MS-DOS/Windows.\.ini\ file:dosini
SynMenu Me-NO.MS-DOS/Windows.Message\ text:msmessages
SynMenu Me-NO.MS-DOS/Windows.Module\ Definition:def
SynMenu Me-NO.MS-DOS/Windows.Registry:registry
SynMenu Me-NO.MS-DOS/Windows.Resource\ file:rc
SynMenu Me-NO.Msql:msql
SynMenu Me-NO.MuPAD:mupad
SynMenu Me-NO.MUSHcode:mush
SynMenu Me-NO.Muttrc:muttrc
SynMenu Me-NO.Nanorc:nanorc
SynMenu Me-NO.Nastran\ input/DMAP:nastran
SynMenu Me-NO.Natural:natural
SynMenu Me-NO.Netrc:netrc
SynMenu Me-NO.Novell\ NCF\ batch:ncf
SynMenu Me-NO.Not\ Quite\ C\ (LEGO):nqc
SynMenu Me-NO.Nroff:nroff
SynMenu Me-NO.NSIS\ script:nsis
SynMenu Me-NO.Objective\ C:objc
SynMenu Me-NO.Objective\ C++:objcpp
SynMenu Me-NO.OCAML:ocaml
SynMenu Me-NO.Occam:occam
SynMenu Me-NO.Omnimark:omnimark
SynMenu Me-NO.OpenROAD:openroad
SynMenu Me-NO.Open\ Psion\ Lang:opl
SynMenu Me-NO.Oracle\ config:ora
SynMenu PQ.Packet\ filter\ conf:pf
SynMenu PQ.Palm\ resource\ compiler:pilrc
SynMenu PQ.Pam\ config:pamconf
SynMenu PQ.PApp:papp
SynMenu PQ.Pascal:pascal
SynMenu PQ.Password\ file:passwd
SynMenu PQ.PCCTS:pccts
SynMenu PQ.PDF:pdf
SynMenu PQ.Perl.Perl:perl
SynMenu PQ.Perl.Perl\ POD:pod
SynMenu PQ.Perl.Perl\ XS:xs
SynMenu PQ.PHP.PHP\ 3-4:php
SynMenu PQ.PHP.Phtml\ (PHP\ 2):phtml
SynMenu PQ.Pike:pike
SynMenu PQ.Pine\ RC:pine
SynMenu PQ.Pinfo\ RC:pinfo
SynMenu PQ.PL/M:plm
SynMenu PQ.PL/SQL:plsql
SynMenu PQ.PLP:plp
SynMenu PQ.PO\ (GNU\ gettext):po
SynMenu PQ.Postfix\ main\ config:pfmain
SynMenu PQ.PostScript.PostScript:postscr
SynMenu PQ.PostScript.PostScript\ Printer\ Description:ppd
SynMenu PQ.Povray.Povray\ scene\ descr:pov
SynMenu PQ.Povray.Povray\ configuration:povini
SynMenu PQ.PPWizard:ppwiz
SynMenu PQ.Prescribe\ (Kyocera):prescribe
SynMenu PQ.Printcap:pcap
SynMenu PQ.Privoxy:privoxy
SynMenu PQ.Procmail:procmail
SynMenu PQ.Product\ Spec\ File:psf
SynMenu PQ.Progress:progress
SynMenu PQ.Prolog:prolog
SynMenu PQ.ProMeLa:promela
SynMenu PQ.Protocols:protocols
SynMenu PQ.Purify\ log:purifylog
SynMenu PQ.Pyrex:pyrex
SynMenu PQ.Python:python
SynMenu PQ.Quake:quake
SynMenu PQ.Quickfix\ window:qf
SynMenu R-Sg.R.R:r
SynMenu R-Sg.R.R\ help:rhelp
SynMenu R-Sg.R.R\ noweb:rnoweb
SynMenu R-Sg.Racc\ input:racc
SynMenu R-Sg.Radiance:radiance
SynMenu R-Sg.Ratpoison:ratpoison
SynMenu R-Sg.RCS.RCS\ log\ output:rcslog
SynMenu R-Sg.RCS.RCS\ file:rcs
SynMenu R-Sg.Readline\ config:readline
SynMenu R-Sg.Rebol:rebol
SynMenu R-Sg.Remind:remind
SynMenu R-Sg.Relax\ NG\ compact:rnc
SynMenu R-Sg.Renderman.Renderman\ Shader\ Lang:sl
SynMenu R-Sg.Renderman.Renderman\ Interface\ Bytestream:rib
SynMenu R-Sg.Resolv\.conf:resolv
SynMenu R-Sg.Reva\ Forth:reva
SynMenu R-Sg.Rexx:rexx
SynMenu R-Sg.Robots\.txt:robots
SynMenu R-Sg.RockLinux\ package\ desc\.:desc
SynMenu R-Sg.Rpcgen:rpcgen
SynMenu R-Sg.RPL/2:rpl
SynMenu R-Sg.ReStructuredText:rst
SynMenu R-Sg.RTF:rtf
SynMenu R-Sg.Ruby:ruby
SynMenu R-Sg.S-Lang:slang
SynMenu R-Sg.Samba\ config:samba
SynMenu R-Sg.SAS:sas
SynMenu R-Sg.Sather:sather
SynMenu R-Sg.Scheme:scheme
SynMenu R-Sg.Scilab:scilab
SynMenu R-Sg.Screen\ RC:screen
SynMenu R-Sg.SDL:sdl
SynMenu R-Sg.Sed:sed
SynMenu R-Sg.Sendmail\.cf:sm
SynMenu R-Sg.Send-pr:sendpr
SynMenu R-Sg.Sensors\.conf:sensors
SynMenu R-Sg.Service\ Location\ config:slpconf
SynMenu R-Sg.Service\ Location\ registration:slpreg
SynMenu R-Sg.Service\ Location\ SPI:slpspi
SynMenu R-Sg.Services:services
SynMenu R-Sg.Setserial\ config:setserial
SynMenu R-Sg.SGML.SGML\ catalog:catalog
SynMenu R-Sg.SGML.SGML\ DTD:sgml
SynMenu R-Sg.SGML.SGML\ Declaration:sgmldecl
SynMenu R-Sg.SGML.SGML-linuxdoc:sgmllnx
SynMenu Sh-S.Shell\ script.sh\ and\ ksh:sh
SynMenu Sh-S.Shell\ script.csh:csh
SynMenu Sh-S.Shell\ script.tcsh:tcsh
SynMenu Sh-S.Shell\ script.zsh:zsh
SynMenu Sh-S.SiCAD:sicad
SynMenu Sh-S.Sieve:sieve
SynMenu Sh-S.Simula:simula
SynMenu Sh-S.Sinda.Sinda\ compare:sindacmp
SynMenu Sh-S.Sinda.Sinda\ input:sinda
SynMenu Sh-S.Sinda.Sinda\ output:sindaout
SynMenu Sh-S.SiSU:sisu
SynMenu Sh-S.SKILL.SKILL:skill
SynMenu Sh-S.SKILL.SKILL\ for\ Diva:diva
SynMenu Sh-S.Slice:slice
SynMenu Sh-S.SLRN.Slrn\ rc:slrnrc
SynMenu Sh-S.SLRN.Slrn\ score:slrnsc
SynMenu Sh-S.SmallTalk:st
SynMenu Sh-S.Smarty\ Templates:smarty
SynMenu Sh-S.SMIL:smil
SynMenu Sh-S.SMITH:smith
SynMenu Sh-S.SNMP\ MIB:mib
SynMenu Sh-S.SNNS.SNNS\ network:snnsnet
SynMenu Sh-S.SNNS.SNNS\ pattern:snnspat
SynMenu Sh-S.SNNS.SNNS\ result:snnsres
SynMenu Sh-S.Snobol4:snobol4
SynMenu Sh-S.Snort\ Configuration:hog
SynMenu Sh-S.SPEC\ (Linux\ RPM):spec
SynMenu Sh-S.Specman:specman
SynMenu Sh-S.Spice:spice
SynMenu Sh-S.Spyce:spyce
SynMenu Sh-S.Speedup:spup
SynMenu Sh-S.Splint:splint
SynMenu Sh-S.Squid\ config:squid
SynMenu Sh-S.SQL.ESQL-C:esqlc
SynMenu Sh-S.SQL.MySQL:mysql
SynMenu Sh-S.SQL.PL/SQL:plsql
SynMenu Sh-S.SQL.SQL\ Anywhere:sqlanywhere
SynMenu Sh-S.SQL.SQL\ (automatic):sql
SynMenu Sh-S.SQL.SQL\ (Oracle):sqloracle
SynMenu Sh-S.SQL.SQL\ Forms:sqlforms
SynMenu Sh-S.SQL.SQLJ:sqlj
SynMenu Sh-S.SQL.SQL-Informix:sqlinformix
SynMenu Sh-S.SQR:sqr
SynMenu Sh-S.Ssh.ssh_config:sshconfig
SynMenu Sh-S.Ssh.sshd_config:sshdconfig
SynMenu Sh-S.Standard\ ML:sml
SynMenu Sh-S.Stata.SMCL:smcl
SynMenu Sh-S.Stata.Stata:stata
SynMenu Sh-S.Stored\ Procedures:stp
SynMenu Sh-S.Strace:strace
SynMenu Sh-S.Streaming\ descriptor\ file:sd
SynMenu Sh-S.Subversion\ commit:svn
SynMenu Sh-S.Sudoers:sudoers
SynMenu Sh-S.Symbian\ meta-makefile:mmp
SynMenu Sh-S.Sysctl\.conf:sysctl
SynMenu TUV.TADS:tads
SynMenu TUV.Tags:tags
SynMenu TUV.TAK.TAK\ compare:takcmp
SynMenu TUV.TAK.TAK\ input:tak
SynMenu TUV.TAK.TAK\ output:takout
SynMenu TUV.Tcl/Tk:tcl
SynMenu TUV.TealInfo:tli
SynMenu TUV.Telix\ Salt:tsalt
SynMenu TUV.Termcap/Printcap:ptcap
SynMenu TUV.Terminfo:terminfo
SynMenu TUV.TeX.TeX/LaTeX:tex
SynMenu TUV.TeX.plain\ TeX:plaintex
SynMenu TUV.TeX.ConTeXt:context
SynMenu TUV.TeX.TeX\ configuration:texmf
SynMenu TUV.TeX.Texinfo:texinfo
SynMenu TUV.TF\ mud\ client:tf
SynMenu TUV.Tidy\ configuration:tidy
SynMenu TUV.Tilde:tilde
SynMenu TUV.TPP:tpp
SynMenu TUV.Trasys\ input:trasys
SynMenu TUV.Trustees:trustees
SynMenu TUV.TSS.Command\ Line:tsscl
SynMenu TUV.TSS.Geometry:tssgm
SynMenu TUV.TSS.Optics:tssop
SynMenu TUV.Udev\ config:udevconf
SynMenu TUV.Udev\ permissions:udevperm
SynMenu TUV.Udev\ rules:udevrules
SynMenu TUV.UIT/UIL:uil
SynMenu TUV.UnrealScript:uc
SynMenu TUV.Updatedb\.conf:updatedb
SynMenu TUV.Valgrind:valgrind
SynMenu TUV.Vera:vera
SynMenu TUV.Verilog-AMS\ HDL:verilogams
SynMenu TUV.Verilog\ HDL:verilog
SynMenu TUV.Vgrindefs:vgrindefs
SynMenu TUV.VHDL:vhdl
SynMenu TUV.Vim.Vim\ help\ file:help
SynMenu TUV.Vim.Vim\ script:vim
SynMenu TUV.Vim.Viminfo\ file:viminfo
SynMenu TUV.Virata\ config:virata
SynMenu TUV.Visual\ Basic:vb
SynMenu TUV.VOS\ CM\ macro:voscm
SynMenu TUV.VRML:vrml
SynMenu TUV.VSE\ JCL:vsejcl
SynMenu WXYZ.WEB.CWEB:cweb
SynMenu WXYZ.WEB.WEB:web
SynMenu WXYZ.WEB.WEB\ Changes:change
SynMenu WXYZ.Webmacro:webmacro
SynMenu WXYZ.Website\ MetaLanguage:wml
SynMenu WXYZ.wDiff:wdiff
SynMenu WXYZ.Wget\ config:wget
SynMenu WXYZ.Whitespace\ (add):whitespace
SynMenu WXYZ.WildPackets\ EtherPeek\ Decoder:dcd
SynMenu WXYZ.WinBatch/Webbatch:winbatch
SynMenu WXYZ.Windows\ Scripting\ Host:wsh
SynMenu WXYZ.WSML:wsml
SynMenu WXYZ.WvDial:wvdial
SynMenu WXYZ.X\ Keyboard\ Extension:xkb
SynMenu WXYZ.X\ Pixmap:xpm
SynMenu WXYZ.X\ Pixmap\ (2):xpm2
SynMenu WXYZ.X\ resources:xdefaults
SynMenu WXYZ.XBL:xbl
SynMenu WXYZ.Xinetd\.conf:xinetd
SynMenu WXYZ.Xmodmap:xmodmap
SynMenu WXYZ.Xmath:xmath
SynMenu WXYZ.XML:xml
SynMenu WXYZ.XML\ Schema\ (XSD):xsd
SynMenu WXYZ.XQuery:xquery
SynMenu WXYZ.Xslt:xslt
SynMenu WXYZ.XFree86\ Config:xf86conf
SynMenu WXYZ.YAML:yaml
SynMenu WXYZ.Yacc:yacc
call append(s:lnum, "")
wq

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

BIN
runtime/tutor/src.info Executable file

Binary file not shown.

View File

@@ -0,0 +1,815 @@
===============================================================================
= Κ αλ ω σ ή ρ θ α τ ε σ τ ο V I M T u t o r - Έκδοση 1.5 =
===============================================================================
Ο Vim είναι ένας πανίσχυρος συντάκτης που έχει πολλές εντολές, πάρα
πολλές για να εξηγήσουμε σε μία περιήγηση όπως αυτή. Αυτή η περιήγηση
σχεδιάστηκε για να περιγράψει ικανοποιητικά τις εντολές που θα σας
κάνουν να χρησιμοποιείτε εύκολα τον Vim σαν έναν γενικής χρήσης συντάκτη.
Ο κατά προσέγγιση χρόνος που απαιτείται για να ολοκληρώσετε την περιήγηση
είναι 25-30 λεπτά, εξαρτώντας από το πόσο χρόνο θα ξοδέψετε για
πειραματισμούς.
Οι εντολές στα μαθήματα θα τροποποιήσουν το κείμενο. Δημιουργήστε ένα
αντίγραφο αυτού του αρχείου για να εξασκηθείτε (αν ξεκινήσατε το
"Vimtutor" αυτό είναι ήδη ένα αντίγραφο).
Είναι σημαντικό να θυμάστε ότι αυτή η περιήγηση είναι οργανωμένη έτσι
ώστε να διδάσκει μέσω της χρήσης. Αυτό σημαίνει ότι χρειάζεται να
εκτελείτε τις εντολές για να τις μάθετε σωστά. Αν διαβάζετε μόνο το
κείμενο, θα τις ξεχάσετε!
Τώρα, βεβαιωθείτε ότι το πλήκτρο Shift-Lock ΔΕΝ είναι πατημένο και
πατήστε το πλήκτρο j αρκετές φορές για να μετακινήσετε τον δρομέα έτσι
ώστε το Μάθημα 1.1 να γεμίσει πλήρως την οθόνη.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 1.1: ΜΕΤΑΚΙΝΟΝΤΑΣ ΤΟΝ ΔΡΟΜΕΑ
** Για να κινήσετε τον δρομέα, πατήστε τα πλήκτρα h,j,k,l όπως δείχνεται. **
^
k Hint: Το πλήκτρο h είναι αριστερά και κινεί στ' αριστερά.
< h l > Το πλήκτρο l είναι δεξιά και κινεί στα δεξιά.
j Το πλήκτρο j μοιάζει με βελάκι προς τα κάτω.
v
1. Μετακινείστε τον δρομέα τριγύρω στην οθόνη μέχρι να νοιώθετε άνετα.
2. Κρατήστε πατημένο το κάτω πλήκτρο (j) μέχρι να επαναληφθεί.
---> Τώρα ξέρετε πώς να μετακινηθείτε στο επόμενο μάθημα.
3. Χρησιμοποιώντας το κάτω πλήκτρο, μετακινηθείτε στο Μάθημα 1.2.
Σημείωση: Αν αμφιβάλλετε για κάτι που πατήσατε, πατήστε <ESC> για να βρεθείτε
στην Κανονική Κατάσταση. Μετά πατήστε ξανά την εντολή που θέλατε.
Σημείωση: Τα πλήκτρα του δρομέα θα πρέπει επίσης να δουλεύουν. Αλλά με τα hjkl
θα μπορείτε να κινηθείτε πολύ γρηγορότερα, μόλις τα συνηθίσετε.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 1.2: ΜΠΑΙΝΟΝΤΑΣ ΚΑΙ ΒΓΑΙΝΟΝΤΑΣ ΣΤΟΝ VIM
!! ΣΗΜΕΙΩΣΗ: Πριν εκτελέσετε κάποιο από τα βήματα, διαβάστε όλο το μάθημα!!
1. Πατήστε το πλήκτρο <ESC> (για να είστε σίγουρα στην Κανονική Κατάσταση).
2. Πληκτρολογήστε: :q! <ENTER>.
---> Αυτό εξέρχεται από τον συντάκτη ΧΩΡΙΣ να σώσει όποιες αλλαγές έχετε κάνει.
Αν θέλετε να σώσετε τις αλλαγές και να εξέρθετε πληκτρολογήστε:
:wq <ENTER>
3. Όταν δείτε την προτροπή του φλοιού, πληκτρολογήστε την εντολή με την οποία
μπήκατε σε αυτήν την περιήγηση. Μπορεί να είναι: vimtutor <ENTER>
Κανονικά θα χρησιμοποιούσατε: vim tutor <ENTER>
---> 'vim' σημαίνει εισαγωγή στον συντάκτη vim, 'tutor' είναι το αρχείο που
θέλουμε να διορθώσουμε.
4. Αν έχετε απομνημονεύσει αυτά τα βήματα και έχετε αυτοπεποίθηση, εκτελέστε
τα βήματα 1 έως 3 για να βγείτε και να μπείτε ξανά στον συντάκτη. Μετά
μετακινήστε τον δρομέα κάτω στο Μάθημα 1.3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 1.3: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕΝΟΥ - ΔΙΑΓΡΑΦΗ
** Όσο είστε στην Κανονική Κατάσταση πατήστε x για να διαγράψετε τον
χαρακτήρα κάτω από τον δρομέα. **
1. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->.
2. Για να διορθώσετε τα λάθη, κινείστε τον δρομέα μέχρι να είναι πάνω από
τον χαρακτήρα που θα διαγραφεί.
3. Πατήστε το πλήκτρο x για να διαγράψετε τον ανεπιθύμητο χαρακτήρα.
4. Επαναλάβετε τα βήματα 2 μέχρι 4 μέχρι η πρόταση να είναι σωστή.
---> The ccow jumpedd ovverr thhe mooon.
5. Τώρα που η γραμμή είναι σωστή, πηγαίντε στο Μάθημα 1.4.
ΣΗΜΕΙΩΣΗ: Καθώς διατρέχετε αυτήν την περιήγηση, προσπαθήστε να μην
απομνημονεύετε, μαθαίνετε με τη χρήση.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 1.4: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕΝΟΥ - ΠΑΡΕΜΒΟΛΗ
** Όσο είστε σε Κανονική Κατάσταση πατήστε i για να παρεμβάλλετε κείμενο. **
1. Μετακινείστε τον δρομέα μέχρι την πρώτη γραμμή παρακάτω σημειωμένη με --->.
2. Για να κάνετε την πρώτη γραμμή ίδια με την δεύτερη, μετακινείστε τον
δρομέα πάνω στον πρώτο χαρακτήρα ΜΕΤΑ από όπου θα παρεμβληθεί το κείμενο.
3. Πατήστε το i και πληκτρολογήστε τις απαραίτητες προσθήκες.
4. Καθώς διορθώνετε κάθε λάθος πατήστε <ESC> για να επιστρέψετε στην
Κανονική Κατάσταση. Επαναλάβετε τα βήματα 2 μέχρι 4 για να διορθώσετε
την πρόταση.
---> There is text misng this .
---> There is some text missing from this line.
5. Όταν είστε άνετοι με την παρεμβολή κειμένου μετακινηθείτε στην
παρακάτω περίληψη.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ΜΑΘΗΜΑ 1 ΠΕΡΙΛΗΨΗ
1. Ο δρομέας κινείται χρησιμοποιώντας είτε τα πλήκτρα δρομέα ή τα hjkl.
h (αριστέρα) j (κάτω) k (πάνω) l (δεξιά)
2. Για να μπείτε στον Vim (από την προτροπή %) γράψτε: vim ΑΡΧΕΙΟ <ENTER>
3. Για να βγείτε γράψτε: <ESC> :q! <ENTER> για απόρριψη των αλλαγών.
Ή γράψτε: <ESC> :wq <ENTER> για αποθήκευση των αλλαγών.
4. Για να διαγράψετε έναν χαρακτήρα κάτω από τον δρομέα σε
Κανονική Κατάσταση πατήστε: x
5. Για να εισάγετε κείμενο στον δρομέα όσο είστε σε Κανονική Κατάσταση γράψτε:
i πληκτρολογήστε το κείμενο <ESC>
ΣΗΜΕΙΩΣΗ: Πατώντας <ESC> θα τοποθετηθείτε στην Κανονική Κατάσταση ή θα
ακυρώσετε μία ανεπιθύμητη και μερικώς ολοκληρωμένη εντολή.
Τώρα συνεχίστε με το Μάθημα 2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 2.1: ΕΝΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ
** Γράψτε dw για να διαγράψετε μέχρι το τέλος μίας λέξης. **
1. Πατήστε <ESC> για να βεβαιωθείτε ότι είστε στην Κανονική Κατάσταση.
2. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->.
3. Πηγαίνετε τον δρομέα στην αρχή της λέξης που πρέπει να διαγραφεί.
4. Γράψτε dw για να κάνετε την λέξη να εξαφανιστεί.
ΣΗΜΕΙΩΣΗ: Τα γράμματα dw θα εμφανιστούν στην τελευταία γραμμή της οθόνης όσο
τα πληκτρολογείτε. Αν γράψατε κάτι λάθος, πατήστε <ESC> και
ξεκινήστε από την αρχή.
---> There are a some words fun that don't belong paper in this sentence.
5. Επαναλάβετε τα βήματα 3 και 4 μέχρι η πρόταση να είναι σωστή και
πηγαίνετε στο Μάθημα 2.2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 2.2: ΠΕΡΙΣΣΟΤΕΡΕΣ ΕΝΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ
** Πληκτρολογήστε d$ για να διαγράψετε μέχρι το τέλος της γραμμής. **
1. Πατήστε <ESC> για να βεβαιωθείτε ότι είστε στην Κανονική Κατάσταση.
2. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->.
3. Μετακινείστε τον δρομέα στο τέλος της σωστής γραμμής (ΜΕΤΑ την πρώτη . ).
4. Πατήστε d$ για να διαγράψετε μέχρι το τέλος της γραμμής.
---> Somebody typed the end of this line twice. end of this line twice.
5. Πηγαίνετε στο Μάθημα 2.3 για να καταλάβετε τι συμβαίνει.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 2.3: ΠΕΡΙ ΕΝΤΟΛΩΝ ΚΑΙ ΑΝΤΙΚΕΙΜΕΝΩΝ
Η μορφή της εντολής διαγραφής d είναι ως εξής:
[αριθμός] d αντικείμενο Ή d [αριθμός] αντικείμενο
Όπου:
αριθμός - πόσες φορές θα εκτελεστεί η εντολή (προαιρετικό, εξ' ορισμού=1).
d - η εντολή της διαγραφής.
αντικείμενο - πάνω σε τι θα λειτουργήσει η εντολή (παρακάτω λίστα).
Μία μικρή λίστα από αντικείμενα:
w - από τον δρομέα μέχρι το τέλος της λέξης, περιλαμβάνοντας το διάστημα.
e - από τον δρομέα μέχρι το τέλος της λέξης, ΧΩΡΙΣ το διάστημα.
$ - από τον δρομέα μέχρι το τέλος της γραμμής.
ΣΗΜΕΙΩΣΗ: Για τους τύπους της περιπέτειας, πατώντας απλώς το αντικείμενο όσο
είστε στην Κανονική Κατάσταση χωρίς κάποια εντολή θα μετακινήσετε
τον δρομέα όπως καθορίζεται στην λίστα αντικειμένων.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 2.4: ΜΙΑ ΕΞΑΙΡΕΣΗ ΣΤΗΝ 'ΕΝΤΟΛΗ-ΑΝΤΙΚΕΙΜΕΝΟ'
** Πληκτρολογήστε dd για να διαγράψετε όλη τη γραμμή. **
Εξαιτίας της συχνότητας της διαγραφής ολόκληρης γραμμής, οι σχεδιαστές
του Vim αποφάσισαν ότι θα ήταν ευκολότερο να γράφετε απλώς δύο d στη
σειρά για να διαγράψετε μία γραμμή.
1. Μετακινείστε τον δρομέα στη δεύτερη γραμμή της παρακάτω φράσης.
2. Γράψτε dd για να διαγράψετε τη γραμμή.
3. Τώρα μετακινηθείτε στην τέταρτη γραμμή.
4. Γράψτε 2dd (θυμηθείτε αριθμός-εντολή-αντικείμενο) για να
διαγράψετε δύο γραμμές.
1) Roses are red,
2) Mud is fun,
3) Violets are blue,
4) I have a car,
5) Clocks tell time,
6) Sugar is sweet
7) And so are you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 2.5: Η ΕΝΤΟΛΗ ΑΝΑΙΡΕΣΗΣ
** Πατήστε u για να αναιρέσετε τις τελευταίες εντολές,
U για να διορθώσετε όλη τη γραμμή. **
1. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με ---> και
τοποθετήστε τον πάνω στο πρώτο λάθος.
2. Πατήστε x για να διαγράψετε τον πρώτο ανεπιθύμητο χαρακτήρα.
3. Τώρα πατήστε u για να αναιρέσετε την τελευταία εκτελεσμένη εντολή.
4. Αυτή τη φορά διορθώστε όλα τα λάθη στη γραμμή χρησιμοποιώντας την εντολή x.
5. Τώρα πατήστε ένα κεφαλαίο U για να επιστρέψετε τη γραμμή στην αρχική
της κατάσταση.
6. Τώρα πατήστε u μερικές φορές για να αναιρέσετε την U και
προηγούμενες εντολές.
7. Τώρα πατήστε CTRL-R (κρατώντας πατημένο το πλήκτρο CTRL καθώς πατάτε το R)
μερικές φορές για να επαναφέρετε τις εντολές (αναίρεση των αναιρέσεων).
---> Fiix the errors oon thhis line and reeplace them witth undo.
8. Αυτές είναι πολύ χρήσιμες εντολές. Τώρα πηγαίνετε στην
Περίληψη του Μαθήματος 2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ΜΑΘΗΜΑ 2 ΠΕΡΙΛΗΨΗ
1. Για να διαγράψετε από τον δρομέα μέχρι το τέλος λέξης γράψτε: dw
2. Για να διαγράψετε από τον δρομέα μέχρι το τέλος γραμμής γράψτε: d$
3. Για να διαγράψετε ολόκληρη τη γραμμή γράψτε: dd
4. Η μορφή για μία εντολή στην Κανονική Κατάσταση είναι:
[αριθμός] εντολή αντικείμενο Ή εντολή [αριθμός] αντικείμενο
όπου:
αριθμός - πόσες φορές να επαναληφθεί η εντολή
εντολή - τι να γίνει, όπως η d για διαγραφή
αντικείμενο - πάνω σε τι να ενεργήσει η εντολή, όπως w (λέξη),
$ (τέλος της γραμμής), κτλ.
5. Για να αναιρέσετε προηγούμενες ενέργειες, πατήστε: u (πεζό u)
Για να αναιρέσετε όλες τις αλλαγές στη γραμμή, πατήστε: U (κεφαλαίο U)
Για να αναιρέσετε τις αναιρέσεις, πατήστε: CTRL-R
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 3.1: Η ΕΝΤΟΛΗ ΤΟΠΟΘΕΤΗΣΗΣ
** Πατήστε p για να τοποθετήσετε την τελευταία διαγραφή μετά τον δρομέα. **
1. Μετακινείστε τον δρομέα στην πρώτη γραμμή της παρακάτω ομάδας.
2. Πατήστε dd για να διαγράψετε τη γραμμή και να την αποθηκεύσετε σε
προσωρινή μνήμη του Vim.
3. Μετακινείστε τον δρομέα στη γραμμή ΠΑΝΩ από εκεί που θα πρέπει να πάει
η διαγραμμένη γραμμή.
4. Όσο είστε σε Κανονική Κατάσταση, πατήστε p για να βάλετε τη γραμμή.
5. Επαναλάβετε τα βήματα 2 έως 4 για να βάλετε όλες τις γραμμές στη
σωστή σειρά.
d) Can you learn too?
b) Violets are blue,
c) Intelligence is learned,
a) Roses are red,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 3.2: Η ΕΝΤΟΛΗ ΑΝΤΙΚΑΤΑΣΤΑΣΗΣ
** Πατήστε r και χαρακτήρα για να αλλάξετε αυτόν που είναι
κάτω από τον δρομέα. **
1. Μετακινείστε τον δρομέα στην πρώτη γραμμή παρακάτω σημειωμένη με --->.
2. Μετακινείστε τον δρομέα έτσι ώστε να είναι πάνω στο πρώτο λάθος.
3. Πατήστε r και μετά τον χαρακτήρα ο οποίος διορθώνει το λάθος.
4. Επαναλάβετε τα βήματα 2 και 3 μέχρι να είναι σωστή η πρώτη γραμμή.
---> Whan this lime was tuoed in, someone presswd some wrojg keys!
---> When this line was typed in, someone pressed some wrong keys!
5. Τώρα πηγαίνετε στο Μάθημα 3.2.
ΣΗΜΕΙΩΣΗ: Να θυμάστε ότι πρέπει να μαθαίνετε με τη χρήση, και όχι με
την απομνημόνευση.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 3.3: Η ΕΝΤΟΛΗ ΑΛΛΑΓΗΣ
** Για να αλλάξετε τμήμα ή όλη τη λέξη, πατήστε cw . **
1. Μετακινείστε τον δρομέα στην πρώτη γραμμή παρακάτω σημειωμένη με --->.
2. Τοποθετήστε τον δρομέα πάνω στο u της λέξης lubw.
3. Πατήστε cw και τη σωστή λέξη (στην περίπτωση αυτή, γράψτε 'ine'.)
4. Πατήστε <ESC> και πηγαίνετε στο επόμενο λάθος (στον πρώτο
χαρακτήρα προς αλλαγή).
5. Επαναλάβετε τα βήματα 3 και 4 μέχρις ότου η πρώτη πρόταση να είναι
ίδια με τη δεύτερη.
---> This lubw has a few wptfd that mrrf changing usf the change command.
---> This line has a few words that need changing using the change command.
Παρατηρείστε ότι η cw όχι μόνο αντικαθιστάει τη λέξη, αλλά σας εισάγει
επίσης σε παρεμβολή.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 3.4: ΠΕΡΙΣΣΟΤΕΡΕΣ ΑΛΛΑΓΕΣ ΜΕ c
** Η εντολή αλλαγής χρησιμοποιείται με τα ίδια αντικείμενα της διαγραφής. **
1. Η εντολή αλλαγής δουλεύει με τον ίδιο τρόπο όπως η διαγραφή. Η μορφή είναι:
[αριθμός] c αντικείμενο Ή c [αριθμός] αντικείμενο
2. Τα αντικείμενα είναι πάλι τα ίδια, όπως w (λέξη), $ (τέλος γραμμής), κτλ.
3. Μετακινηθείτε στην πρώτη γραμμή παρακάτω σημειωμένη με --->.
4. Μετακινείστε τον δρομέα στο πρώτο λάθος.
5. Γράψτε c$ για να κάνετε το υπόλοιπο της γραμμής ίδιο με τη δεύτερη
και πατήστε <ESC>.
---> The end of this line needs some help to make it like the second.
---> The end of this line needs to be corrected using the c$ command.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ΜΑΘΗΜΑ 3 ΠΕΡΙΛΗΨΗ
1. Για να τοποθετήσετε κείμενο που μόλις έχει διαγραφεί, πατήστε p .
Αυτό τοποθετεί το διαγραμμένο κείμενο ΜΕΤΑ τον δρομέα (αν διαγράφτηκε
γραμμή θα πάει μετά στη γραμμή κάτω από τον δρομέα.
2. Για να αντικαταστήσετε τον χαρακτήρα κάτω από τον δρομέα, πατήστε r
και μετά τον χαρακτήρα που θα αντικαταστήσει τον αρχικό.
3. Η εντολή αλλαγής σας επιτρέπει να αλλάξετε το καθορισμένο αντικείμενο
από τον δρομέα μέχρι το τέλος του αντικείμενο. Π.χ. γράψτε cw για να
αλλάξετε από τον δρομέα μέχρι το τέλος της λέξης, c$ για να αλλάξετε
μέχρι το τέλος γραμμής.
4. Η μορφή για την αλλαγή είναι:
[αριθμός] c αντικείμενο Ή c [αριθμός] αντικείμενο
Τώρα συνεχίστε με το επόμενο μάθημα.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 4.1: ΘΕΣΗ ΚΑΙ ΚΑΤΑΣΤΑΣΗ ΑΡΧΕΙΟΥ
** Πατήστε CTRL-g για να εμφανιστεί η θέση σας στο αρχείο και η κατάστασή του.
Πατήστε SHIFT-G για να πάτε σε μία γραμμή στο αρχείο. **
Σημείωση: Διαβάστε ολόκληρο το μάθημα πριν εκτελέσετε κάποιο από τα βήματα!!
1. Κρατήστε πατημένο το πλήκτρο Ctrl και πατήστε g . Μία γραμμή κατάστασης
θα εμφανιστεί στο κάτω μέρος της σελίδας με το όνομα αρχείου και τη
γραμμή που είστε. Θυμηθείτε τον αριθμό γραμμής για το Βήμα 3.
2. Πατήστε shift-G για να μετακινηθείτε στο τέλος του αρχείου.
3. Πατήστε τον αριθμό της γραμμής που ήσασταν και μετά shift-G. Αυτό θα
σας επιστρέψει στη γραμμή που ήσασταν πριν πατήσετε για πρώτη φορά Ctrl-g.
(Όταν πληκτρολογείτε τους αριθμούς, ΔΕΝ θα εμφανίζονται στην οθόνη).
4. Αν νοιώθετε σίγουρος για αυτό, εκτελέστε τα βήματα 1 έως 3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 4.2: Η ΕΝΤΟΛΗ ΑΝΑΖΗΤΗΣΗΣ
** Πατήστε / ακολουθούμενο από τη φράση που ψάχνετε. **
1. Σε Κανονική Κατάσταση πατήστε τον χαρακτήρα / . Παρατηρήστε ότι αυτός και
ο δρομέας εμφανίζονται στο κάτω μέρος της οθόνης όπως με την εντολή : .
2. Τώρα γράψτε 'errroor' <ENTER>. Αυτή είναι η λέξη που θέλετε να ψάξετε.
3. Για να ψάξετε ξανά για την ίδια φράση, πατήστε απλώς n .
Για να ψάξετε την ίδια φράση στην αντίθετη κατεύθυνση, πατήστε Shift-N .
4. Αν θέλετε να ψάξετε για μία φράση προς τα πίσω, χρησιμοποιήστε την εντολή ? αντί της / .
---> Όταν η αναζήτηση φτάσει στο τέλος του αρχείου θα συνεχίσει από την αρχή.
"errroor" is not the way to spell error; errroor is an error.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 4.3: ΕΥΡΕΣΗ ΤΑΙΡΙΑΣΤΩΝ ΠΑΡΕΝΘΕΣΕΩΝ
** Πατήστε % για να βρείτε την αντίστοιχη ), ], ή } . **
1. Τοποθετήστε τον δρομέα σε κάποια (, [, ή { στην παρακάτω γραμμή
σημειωμένη με --->.
2. Τώρα πατήστε τον χαρακτήρα % .
3. Ο δρομέας θα πρέπει να είναι στην αντίστοιχη παρένθεση ή αγκύλη.
4. Πατήστε % για να μετακινήσετε τον δρομέα πίσω στην πρώτη αγκύλη
(του ζευγαριού).
---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
ΣΗΜΕΙΩΣΗ: Αυτό είναι πολύ χρήσιμο στην αποσφαλμάτωση ενός προγράμματος
με μη ταιριαστές παρενθέσεις!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 4.4: ΕΝΑΣ ΤΡΟΠΟΣ ΓΙΑ ΑΛΛΑΓΗ ΛΑΘΩΝ
** Γράψτε :s/old/new/g για να αλλάξετε το 'new' με το 'old'. **
1. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->.
2. Γράψτε :s/thee/the <ENTER> . Σημειώστε ότι αυτή η εντολή αλλάζει μόνο
την πρώτη εμφάνιση στη γραμμή.
3. Τώρα γράψτε :s/thee/the/g εννοώντας γενική αντικατάσταση στη
γραμμή. Αυτό αλλάζει όλες τις εμφανίσεις επί της γραμμής.
---> thee best time to see thee flowers is in thee spring.
4. Για να αλλάξετε κάθε εμφάνιση μίας συμβολοσειράς μεταξύ δύο γραμμών,
γράψτε :#,#s/old/new/g όπου #,# οι αριθμοί των δύο γραμμών.
Γράψτε :%s/old/new/g για να αλλάξετε κάθε εμφάνιση σε όλο το αρχείο.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ΜΑΘΗΜΑ 4 ΠΕΡΙΛΗΨΗ
1. Το Ctrl-g εμφανίζει τη θέση σας στο αρχείο και την κατάστασή του.
Το Shift-G πηγαίνει στο τέλος του αρχείου. Ένας αριθμός γραμμής
ακολουθούμενος από Shift-G πηγαίνει σε εκείνη τη γραμμή.
2. Γράφοντας / ακολουθούμενο από μία φράση ψάχνει προς τα ΜΠΡΟΣΤΑ για
τη φράση. Γράφοντας ? ακολουθούμενο από μία φράση ψάχνει προς τα ΠΙΣΩ
για τη φράση. Μετά από μία αναζήτηση πατήστε n για να βρείτε την
επόμενη εμφάνιση προς την ίδια κατεύθυνση ή Shift-N για να ψάξετε
προς την αντίθετη κατεύθυνση.
3. Πατώντας % όσο ο δρομέας είναι πάνω σε μία (,),[,],{, ή } εντοπίζει
το αντίστοιχο ταίρι του ζευγαριού.
4. Για αντικατάσταση με new του πρώτου old στη γραμμή γράψτε :s/old/new
Για αντικατάσταση με new όλων των 'old' στη γραμμή γράψτε :s/old/new/g
Για αντικατάσταση φράσεων μεταξύ δύο # γραμμών γράψτε :#,#s/old/new/g
Για αντικατάσταση όλων των εμφανίσεων στο αρχείο γράψτε :%s/old/new/g
Για ερώτηση επιβεβαίωσης κάθε φορά προσθέστε ένα 'c' "%s/old/new/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 5.1: ΠΩΣ ΕΚΤΕΛΩ ΜΙΑ ΕΞΩΤΕΡΙΚΗ ΕΝΤΟΛΗ
** Γράψτε :! ακολουθούμενο από μία εξωτερική εντολή για να την εκτελέσετε. **
1. Πατήστε την οικεία εντολή : για να θέσετε τον δρομέα στο κάτω μέρος
της οθόνης. Αυτό σας επιτρέπει να δώσετε μία εντολή.
2. Τώρα πατήστε το ! (θαυμαστικό). Αυτό σας επιτρέπει να εκτελέσετε
οποιαδήποτε εξωτερική εντολή του φλοιού.
3. Σαν παράδειγμα γράψτε ls μετά από το ! και πατήστε <ENTER>. Αυτό θα
σας εμφανίσει μία λίστα του καταλόγου σας, ακριβώς σαν να ήσασταν στην
προτροπή του φλοιού. Ή χρησιμοποιήστε :!dir αν το ls δεν δουλεύει.
---> Σημείωση: Είναι δυνατόν να εκτελέσετε οποιαδήποτε εξωτερική εντολή
με αυτόν τον τρόπο.
---> Σημείωση: Όλες οι εντολές : πρέπει να τερματίζονται πατώντας το <ENTER>.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 5.2: ΠΕΡΙΣΣΟΤΕΡΑ ΠΕΡΙ ΕΓΓΡΑΦΗΣ ΑΡΧΕΙΩΝ
** Για να σώσετε τις αλλάγες που κάνατε στο αρχείο, γράψτε :w ΑΡΧΕΙΟ. **
1. Γράψτε :!dir ή :!ls για να πάρετε μία λίστα του καταλόγου σας.
Ήδη ξέρετε ότι πρέπει να πατήσετε <ENTER> μετά από αυτό.
2. Διαλέξτε ένα όνομα αρχείου που δεν υπάρχει ακόμα, όπως το TEST.
3. Τώρα γράψτε: :w TEST (όπου TEST είναι το όνομα αρχείου που διαλέξατε).
4. Αυτό σώζει όλο το αρχείο (vim Tutor) με το όνομα TEST. Για να το
επαληθεύσετε, γράψτε ξανά :!dir για να δείτε τον κατάλογό σας.
---> Σημειώστε ότι αν βγαίνατε από τον Vim και μπαίνατε ξανά με το όνομα
αρχείου TEST, το αρχείο θα ήταν ακριβές αντίγραφο του tutor όταν το σώσατε.
5. Τώρα διαγράψτε το αρχείο γράφοντας (MS-DOS): :!del TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 5.3: ΕΠΙΛΕΚΤΙΚΗ ΕΝΤΟΛΗ ΕΓΓΡΑΦΗΣ
** Για να σώσετε τμήμα του αρχείου, γράψτε :#,# w ΑΡΧΕΙΟ **
1. Άλλη μια φορά, γράψτε :!dir ή :!ls για να πάρετε μία λίστα από τον
κατάλογό σας και διαλέξτε ένα κατάλληλο όνομα αρχείου όπως το TEST.
2. Μετακινείστε τον δρομέα στο πάνω μέρος αυτής της σελίδας και πατήστε
Ctrl-g για να βρείτε τον αριθμό αυτής της γραμμής.
ΝΑ ΘΥΜΑΣΤΕ ΑΥΤΟΝ ΤΟΝ ΑΡΙΘΜΟ!
3. Τώρα πηγαίνετε στο κάτω μέρος της σελίδας και πατήστε Ctrl-g ξανά.
ΝΑ ΘΥΜΑΣΤΕ ΚΑΙ ΑΥΤΟΝ ΤΟΝ ΑΡΙΘΜΟ!
4. Για να σώσετε ΜΟΝΟ ένα τμήμα σε αρχείο, γράψτε :#,# w TEST
όπου #,# οι δύο αριθμοί που απομνημονεύσατε (πάνω,κάτω) και TEST το
όνομα του αρχείου σας.
5. Ξανά, δείτε ότι το αρχείο είναι εκεί με την :!dir αλλά ΜΗΝ το διαγράψετε.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 5.4: ΑΝΑΚΤΩΝΤΑΣ ΚΑΙ ΕΝΩΝΟΝΤΑΣ ΑΡΧΕΙΑ
** Για να εισάγετε τα περιεχόμενα ενός αρχείου, γράψτε :r ΑΡΧΕΙΟ **
1. Γράψτε :!dir για να βεβαιωθείτε ότι το TEST υπάρχει από πριν.
2. Τοποθετήστε τον δρομέα στο πάνω μέρος της σελίδας.
ΣΗΜΕΙΩΣΗ: Αφότου εκτελέσετε το Βήμα 3 θα δείτε το Μάθημα 5.3.
Μετά κινηθείτε ΚΑΤΩ ξανά προς το μάθημα αυτό.
3. Τώρα ανακτήστε το αρχείο σας TEST χρησιμοποιώντας την εντολή :r TEST
όπου TEST είναι το όνομα του αρχείου.
ΣΗΜΕΙΩΣΗ: Το αρχείο που ανακτάτε τοποθετείται ξεκινώντας εκεί που βρίσκεται
ο δρομέας.
4. Για να επαληθεύσετε ότι το αρχείο ανακτήθηκε, πίσω τον δρομέα και
παρατηρήστε ότι υπάρχουν τώρα δύο αντίγραφα του Μαθήματος 5.3, το
αρχικό και η έκδοση του αρχείου.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ΜΑΘΗΜΑ 5 ΠΕΡΙΛΗΨΗ
1. :!εντολή εκτελεί μία εξωτερική εντολή.
Μερικά χρήσιμα παραδείγματα είναι (MS-DOS):
:!dir - εμφάνιση λίστας ενός καταλόγου.
:!del ΑΡΧΕΙΟ - διαγράφει το ΑΡΧΕΙΟ.
2. :w ΑΡΧΕΙΟ γράφει το τρέχων αρχείο του Vim στο δίσκο με όνομα ΑΡΧΕΙΟ.
3. :#,#w ΑΡΧΕΙΟ σώζει τις γραμμές από # μέχρι # στο ΑΡΧΕΙΟ.
4. :r ΑΡΧΕΙΟ ανακτεί το αρχείο δίσκου ΑΡΧΕΙΟ και το παρεμβάλλει μέσα
στο τρέχον αρχείο μετά από τη θέση του δρομέα.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 6.1: Η ΕΝΤΟΛΗ ΑΝΟΙΓΜΑΤΟΣ
** Πατήστε o για να ανοίξετε μία γραμμή κάτω από τον δρομέα και να
βρεθείτε σε Κατάσταση Κειμένου. **
1. Μετακινείστε τον δρομέα στην παρακάτω γραμμή σημειωμένη με --->.
2. Πατήστε o (πεζό) για να ανοίξετε μία γραμμή ΚΑΤΩ από τον δρομέα και να
βρεθείτε σε Κατάσταση Κειμένου.
3. Τώρα αντιγράψτε τη σημειωμένη με ---> γραμμή και πατήστε <ESC> για να
βγείτε από την Κατάσταση Κειμένου.
---> After typing o the cursor is placed on the open line in Insert mode.
4. Για να ανοίξετε μία γραμμή ΠΑΝΩ από τον δρομέα, πατήστε απλά ένα κεφαλαίο
O, αντί για ένα πεζό o. Δοκιμάστε το στην παρακάτω γραμμή.
Ανοίγετε γραμμή πάνω από αυτήν πατώντας Shift-O όσο ο δρομέας είναι στη γραμμή
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 6.2: Η ΕΝΤΟΛΗ ΠΡΟΣΘΗΚΗΣ
** Πατήστε a για να εισάγετε κείμενο ΜΕΤΑ τον δρομέα. **
1. Μετακινείστε τον δρομέα στο τέλος της πρώτης γραμμής παρακάτω
σημειωμένη με ---> πατώντας $ στην Κανονική Κατάσταση.
2. Πατήστε ένα a (πεζό) για να προσθέσετε κείμενο ΜΕΤΑ από τον χαρακτήρα
που είναι κάτω από τον δρομέα. (Το κεφαλαίο A προσθέτει στο τέλος
της γραμμής).
Σημείωση: Αυτό αποφεύγει το πάτημα του i , τον τελευταίο χαρακτήρα, το
κείμενο της εισαγωγής, <ESC>, δρομέα-δεξιά, και τέλος, x, μόνο και
μόνο για να προσθέσετε στο τέλος της γραμμής!
3. Συμπληρώστε τώρα την πρώτη γραμμή. Σημειώστε επίσης ότι η προσθήκη είναι
ακριβώς ίδια στην Κατάσταση Κειμένου με την Κατάσταση Εισαγωγής, εκτός
από τη θέση που εισάγεται το κείμενο.
---> This line will allow you to practice
---> This line will allow you to practice appending text to the end of a line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 6.3: ΑΛΛΗ ΕΚΔΟΣΗ ΤΗΣ ΑΝΤΙΚΑΤΑΣΤΑΣΗΣ
** Πατήστε κεφαλαίο R για να αλλάξετε περισσότερους από έναν χαρακτήρες. **
1. Μετακινείστε τον δρομέα στην πρώτη γραμμή παρακάτω σημειωμένη με --->.
2. Τοποθετήστε τον δρομέα στην αρχή της πρώτης λέξης που είναι διαφορετική
από τη δεύτερη γραμμή σημειωμένη με ---> (η λέξη 'last').
3. Πατήστε τώρα R και αλλάξτε το υπόλοιπο του κειμένου στην πρώτη γραμμή
γράφοντας πάνω από το παλιό κείμενο ώστε να κάνετε την πρώτη γραμμή ίδια
με τη δεύτερη.
---> To make the first line the same as the last on this page use the keys.
---> To make the first line the same as the second, type R and the new text.
4. Σημειώστε ότι όταν πατάτε <ESC> για να βγείτε, παραμένει οποιοδήποτε
αναλλοίωτο κείμενο.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Μάθημα 6.4: ΡΥΘΜΙΣΗ ΕΠΙΛΟΓΗΣ
** Ρυθμίστε μία επιλογή έτσι ώστε η αναζήτηση ή η αντικατάσταση να αγνοεί
τη διαφορά πεζών-κεφαλαίων **
1. Ψάξτε για 'ignore' εισάγοντας:
/ignore
Συνεχίστε αρκετές φορές πατώντας το πλήκτρο n.
2. Θέστε την επιλογή 'ic' (Ignore case) γράφοντας:
:set ic
3. Ψάξτε τώρα ξανά για 'ignore' πατώντας: n
Συνεχίστε την αναζήτηση μερικές ακόμα φορές πατώντας το πλήκτρο n
4. Θέστε τις επιλογές 'hlsearch' και 'incsearch':
:set hls is
5. Εισάγετε τώρα ξανά την εντολή αναζήτησης, και δείτε τι συμβαίνει
/ignore
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ΜΑΘΗΜΑ 6 ΠΕΡΙΛΗΨΗ
1. Πατώντας o ανοίγει μία γραμμή ΚΑΤΩ από τον δρομέα και τοποθετεί τον
δρομέα στην ανοιχτή γραμμή σε Κατάσταση Κειμένου.
2. Πατήστε a για να εισάγετε κείμενο ΜΕΤΑ τον χαρακτήρα στον οποίο είναι
ο δρομέας. Πατώντας κεφαλαίο A αυτόματα προσθέτει κείμενο στο τέλος
της γραμμής.
3. Πατώντας κεφαλαίο R εισέρχεται στην Κατάσταη Αντικατάστασης μέχρι να
πατηθεί το <ESC> και να εξέλθει.
4. Γράφοντας ":set xxx" ρυθμίζει την επιλογή "xxx".
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ΜΑΘΗΜΑ 7: ON-LINE ΕΝΤΟΛΕΣ ΒΟΗΘΕΙΑΣ
** Χρησιμοποιήστε το on-line σύστημα βοήθειας **
Ο Vim έχει ένα περιεκτικό on-line σύστημα βοήθειας. Για να ξεκινήσει,
δοκιμάστε κάποιο από τα τρία:
- πατήστε το πλήκτρο <HELP> (αν έχετε κάποιο)
- πατήστε το πλήκτρο <F1> (αν έχετε κάποιο)
- γράψτε :help <ENTER>
Γράψτε :q <ENTER> για να κλείσετε το παράθυρο της βοήθειας.
Μπορείτε να βρείτε βοήθεια πάνω σε κάθε αντικείμενο, δίνοντας μία παράμετρο
στην εντολή ":help". Δοκιμάστε αυτά (μην ξεχνάτε να πατάτε <ENTER>):
:help w
:help c_<T
:help insert-index
:help user-manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ΜΑΘΗΜΑ 8: ΔΗΜΙΟΥΡΓΗΣΤΕ ΕΝΑ SCRIPT ΕΚΚΙΝΗΣΗΣ
** Ενεργοποιήστε χαρακτηριστικά του Vim **
Ο Vim έχει πολλά περισσότερα χαρακτηριστικά απ' ό,τι ο Vi, αλλά τα
περισσότερα είναι αρχικά απενεργοποιημένα. Για να αρχίσετε να χρησιμοποιείτε
περισσότερα χαρακτηριστικά πρέπει να φτιάξετε ένα αρχείο "vimrc".
1. Αρχίστε διορθώνοντας το αρχείο "vimrc", αυτό εξαρτάται από το σύστημά σας:
:edit ~/.vimrc για Unix
:edit $VIM/_vimrc για MS-Windows
2. Τώρα εισάγετε το κείμενο παραδείγματος για αρχείο "vimrc":
:read $VIMRUNTIME/vimrc_example.vim
3. Γράψτε το αρχείο με την:
:write
Την επόμενη φορά που θα ξεκινήσετε τον Vim θα χρησιμοποιήσει φωτισμό
σύνταξης. Μπορείτε να προσθέσετε όλες τις προτιμώμενες επιλογές σ' αυτό
το αρχείο "vimrc".
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Εδώ ολοκληρώνεται το Vim Tutor. Σκοπός του ήταν να δώσει μία σύντομη
περίληψη του συντάκτη Vim, τουλάχιστον τόση ώστε να σας επιτρέψει να
χρησιμοποιήσετε τον συντάκτη αρκετά εύκολα. Απέχει πολύ από μία
ολοκληρωμένη παρουσίαση καθώς ο Vim έχει πάρα πολλές εντολές. Διαβάστε
κατόπιν το εγχειρίδιο χρήσης:
":help user-manual".
Για περαιτέρω διάβασμα και μελέτη, συστήνεται αυτό το βιβλίο:
Vim - Vi Improved - by Steve Oualline
Publisher: New Riders
Το πρώτο βιβλίο πλήρως αφιερωμένο στον Vim.
Ιδιαίτερα χρήσιμο για αρχάριους.
Υπάρχουν πολλά παραδείγματα και εικόνες.
Δείτε την http://iccf-holland.org/click5.html
Αυτό το βιβλίο είναι παλιότερο και περισσότερο για τον Vi παρά για τον Vim,
αλλά επίσης συνιστώμενο:
Learning the Vi Editor - by Linda Lamb
Publisher: O'Reilly & Associates Inc.
Είναι ένα καλό βιβλίο για να μάθετε σχεδόν τα πάντα που θέλετε
να κάνετε με τον Vi.
Η έκτη έκδοση περιέχει ακόμα πληροφορίες για τον Vim.
Αυτή η περιήγηση γράφτηκε από τους Michael C. Pierce και Robert K. Ware,
Colorado School of Mines χρησιμοποιώντας ιδέες από τον Charles Smith,
Colorado State University. E-mail: bware@mines.colorado.edu.
Προσαρμογή για τον Vim από τον Bram Moolenaar.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -0,0 +1,823 @@
===============================================================================
= <20> d v <20> z <20> l j <20> k a V I M T u t o r b a n - 1.5-<2D>s verzi<7A> ===
===============================================================================
A Vim egy nagyon hat<61>kony szerkeszt<7A>, amelnyek rengeteg utas<61>t<EFBFBD>sa
van, t<>l sok, hogy egy ilyen oktat<61>ban (tutorban), mint az itteni
mindet elmagyar<61>zzuk. Ez az oktat<61> arra t<>rekszik, hogy annyit
elmagyar<61>zzon, amennyi el<65>g, hogy k<>nnyed<65>n haszn<7A>ljuk a Vim-et, az
<20>ltal<61>nos c<>l<EFBFBD> sz<73>vegszerkeszt<7A>t.
A feladatok megold<6C>s<EFBFBD>hoz 25-30 perc sz<73>ks<6B>ges att<74>l f<>gg<67>en,
mennyit t<>lt<6C>nk a kis<69>rletez<65>ssel.
A leck<63>ben szerepl<70> utas<61>t<EFBFBD>sok m<>dos<6F>tani fogj<67>k a sz<73>vegek.
K<>sz<73>tsen m<>solatot err<72>l a f<>jlr<6C>l, ha gyakorolni akar.
(Ha "vimtutor"-ral ind<6E>totta, akkor ez m<>r egy m<>solat.)
Fontos meg<65>rteni, hogy ez az oktat<61> cselekedve tan<61>ttat.
Ez azt jelenti, hogy <20>nnek aj<61>nlott v<>grehajtania az utas<61>t<EFBFBD>sokat,
hogy megfelel<65>en megtanulja azokat. Ha csak olvassa, elfelejti!
Most bizonyosodjon, meg, hogy a Caps-Lock gombja NINCS lenyomva, <20>s
Nyomja meg megfelel<65> sz<73>m<EFBFBD>szor a j gombot, hogy az 1.1-es
lecke teljesen a k<>perny<6E>n legyen!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.1. lecke: A KURZOR MOZGAT<41>SA
** A kurzor mozgat<61>s<EFBFBD>hoz nyomja meg a h,j,k,l gombokat az al<61>bbi szerint. **
^
k Tipp: A h billenty<74> van balra, <20>s balra mozgat
< h l > A l billenty<74> van jobbra, <20>s jobbra mozgat
j A j billenty<74> olyan, mint egy lefele ny<6E>l
v
1. Mozgassa a kurzort k<>rbe az ablakban, am<61>g hozz<7A> nem szokik!
2. Tartsa lenyomva a lefel<65>t (j), akkor ism<73>tl<74>dik!
---> Most tudja, hogyan mehet a k<>vetkez<65> leck<63>re.
3. A lefel<65> fomb haszn<7A>lat<61>val menjen a 1.2. leck<63>re!
Megj: Ha nem biztos benne, mit nyomott meg, nyomja meg az <ESC>-et, hogy
norm<72>l m<>dba ker<65>lj<6C>n, <20>s ism<73>telje meg a parancsot!
Megj: A kurzor gomboknak is m<>k<EFBFBD>dni<6E>k kell, de a hjkl haszn<7A>lat<61>val
sokkal gyorsabban tud, mozogni, ha hozz<7A>szokik.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.2. lecke: BE <20>S KIL<49>P<EFBFBD>S A VIMB<4D>L
!! MEGJ: Miel<65>tt v<>grehajtja az al<61>bbi l<>p<EFBFBD>seket, olvassa v<>gig a leck<63>t !!
1. Nyomja meg az <ESC> gombot (hogy biztosan norm<72>l m<>dban legyen).
2. <20>rja: :q! <ENTER>.
---> Ezzel kil<69>p a szerkeszt<7A>b<EFBFBD>l a v<>ltoz<6F>sok MENT<4E>SE N<>LK<4C>L.
Ha menteni szeretn<74> a v<>ltoz<6F>sokat <20>s kil<69>pni, <20>rja:
:wq <ENTER>
3. Amikor a shell promptot l<>tja, <20>rja be a parancsot, amely ebbe a
tutorba hozza:
Ez val<61>sz<73>n<EFBFBD>leg: vimtutor <ENTER>
Norm<72>lis esetben ezt <20>rn<72>: vim tutor.hu <ENTER>
---> 'vim' jelenti a vimbe bel<65>p<EFBFBD>st, 'tutor.hu' a f<>jl, amit szerkeszteni k<>v<EFBFBD>n.
4. Ha megjegyezte a l<>p<EFBFBD>seket <20>s biztos mag<61>ban, hajtsa v<>gre a l<>p<EFBFBD>seket
1-t<>l 3-ig, hogy kil<69>pjen <20>s visszat<61>rjen a szerkeszt<7A>be. Azut<75>n
menjen az 1.3. leck<63>re.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.3. lecke: SZ<53>VEG SZERKESZT<5A>SE - T<>RL<52>S
** Norm<72>l m<>dban nyomjon x-et, hogy a kurzor alatti karaktert t<>r<EFBFBD>lje. **
1. Mozgassa a kurzort a ---> kezdet<65> sorra!
2. A hib<69>k kijav<61>t<EFBFBD>s<EFBFBD>hoz mozgassa a kurzort am<61>g a t<>rlend<6E> karakter
f<>l<EFBFBD> nem <20>r.
3. Nyomja meg az x gombot, hogy t<>r<EFBFBD>lje a nemk<6D>v<EFBFBD>nt karaktert.
4. Ism<73>telje a 2, 3, 4-es l<>p<EFBFBD>seket, hogy kijav<61>tsa a mondatot.
---> <20><>szi <20>jjjell izziik aa galaggonya rruuh<75>ja.
5. Ha a sor helyes, ugorjon a 1.4. leck<63>re.
MEGJ: A tanul<75>s sor<6F>n ne memoriz<69>lni pr<70>b<EFBFBD>ljon, hanem haszn<7A>lat sor<6F>n tanuljon.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.4. lecke: SZ<53>VEG SZERKESZT<5A>SE - BESZ<53>R<EFBFBD>S
** Norm<72>l m<>dban i megnyom<6F>s<EFBFBD>val lehet beilleszteni. **
1. Az al<61>bbi els<6C> ---> kezdet<65> sorra menjen.
2. Ahhoz, hogy az els<6C>t azonoss<73> tegye a m<>sodikkal, mozgassa a kurzort
az els<6C> karakterre, amely UT<55>N sz<73>veget kell besz<73>rni.
3. Nyomjon i-t <20>s <20>rja be a megfelel<65> sz<73>veget.
4. Amikor mindent be<62>rt, nyomjon <ESC>-et, hogy Norm<72>l m<>dba visszat<61>rjen.
Ism<73>telje a 2 <20>s 4 k<>z<EFBFBD>tti l<>p<EFBFBD>seket, hogy kijav<61>tsa a mondatot.
---> Az <20>that<61> so<73>l hizik p<>r <20>sz.
---> Az itt l<>that<61> sorb<72>l hi<68>nyzik p<>r r<>sz.
5. Ha m<>r begyakorolta a besz<73>r<EFBFBD>st, menjen az al<61>bbi <20>sszefoglal<61>ra.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. LECKE <20>SSZEFOGLAL<41>JA
1. A kurzort vagy a nyilakkal vagy a hjkl gombokkal mozgathatja.
h (balra) j (le) k (fel) l (jobbra)
2. A Vimbe (a $ promptt<74>l) <20>gy l<>phet be: vim FILENAME <ENTER>
3. A Vimb<6D>l <20>gy l<>phet ki: <ESC> :q! <ENTER> a v<>ltoztat<61>sok eldob<6F>s<EFBFBD>val.
vagy <20>gy: <ESC> :wq <ENTER> a v<>ltoz<6F>sok ment<6E>s<EFBFBD>vel.
4. A kurzor alatti karakter t<>rl<72>se norm<72>l m<>dban: x
5. Sz<53>veg besz<73>r<EFBFBD>sa a kurzor ut<75>n norm<72>l m<>dban:
i g<>pelje be a sz<73>veget <ESC>
MEGJ: Az <ESC> megnyom<6F>sa norm<72>l m<>dba viszi, vagy megszak<61>t egy nem befejezett
r<>szben befejezett parancsot.
Most folytassuk a 2. leck<63>vel!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2.1. lecke: T<>RL<52> UTAS<41>T<EFBFBD>SOK
** dw t<>r<EFBFBD>l a sz<73> v<>g<EFBFBD>ig. **
1. Nyomjon <ESC>-et, hogy megbizonyosodjon, hogy norm<72>l m<>dban van!
2. Mozgassa a kurzort a ---> kezdet<65> sorra!
3. Mozgassa a kurzort arra annak a sz<73>nak az elej<65>re, amit t<>r<EFBFBD>lni szeretne.
T<>r<EFBFBD>lje az <20>llatokat a mondatb<74>l.
4. A sz<73> t<>rl<72>s<EFBFBD>hez <20>rja: dw
MEGJ: Ha rosszul kezdte az utas<61>t<EFBFBD>st csak nyomjon <ESC> gombot
a megszak<61>t<EFBFBD>s<EFBFBD>hoz.
---> P<>r sz<73> kutya nem uhu illik pingvin a mondatba teh<65>n.
5. Ism<73>telje a 3 <20>s 4 k<>z<EFBFBD>tti utas<61>t<EFBFBD>sokat am<61>g kell <20>s ugorjon a 2.2 leck<63>re!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2.2. lecke: M<>G T<>BB T<>RL<52> UTAS<41>T<EFBFBD>S
** d$ be<62>r<EFBFBD>s<EFBFBD>val a sor v<>g<EFBFBD>ig t<>r<EFBFBD>lhet. **
1. Nyomjon <ESC>-et, hogy megbizonyosodjon, hogy norm<72>l m<>dban van!
2. Mozgassa a kurzort a ---> kezdet<65> sorra!
3. Mozgassa a kurzort a helyes sor v<>g<EFBFBD>re (az els<6C> . UT<55>N)!
4. d$ beg<65>pel<65>s<EFBFBD>velt<6C>r<EFBFBD>lje a sor v<>g<EFBFBD>t!
---> Valaki a sor v<>g<EFBFBD>t k<>tszer g<>pelte be. k<>tszer g<>pelte be.
5. Menjen a 2.3. leck<63>re, hogy meg<65>rtse mi t<>rt<72>nt!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2.3. lecke: UTAS<41>T<EFBFBD>SOKR<4B>L <20>S OBJEKTUMOKR<4B>L
A d (delete=t<>rl<72>s) utas<61>t<EFBFBD>s form<72>ja a k<>vetkez<65>:
[sz<73>m] d objektum VAGY d [sz<73>m] objektum
Ahol:
sz<73>m - h<>nyszor hajt<6A>djon v<>gre a parancs (elhagyhat<61>, alap<61>rt<72>k=1).
d - a t<>rl<72>s (delete) utas<61>t<EFBFBD>s.
objektum - amin a parancsnak teljes<65>lnie kell (al<61>bb list<73>zva).
Objektumok r<>vid list<73>ja:
w - a kurzort<72>l a sz<73> v<>g<EFBFBD>ig, bele<6C>rtve a sz<73>k<EFBFBD>zt.
e - a kurzort<72>l a sz<73> v<>g<EFBFBD>ig, NEM bele<6C>rtve a sz<73>k<EFBFBD>zt.
$ - a kurzort<72>l a sor v<>g<EFBFBD>ig.
MEGJ: V<>llalkoz<6F>bbak kedv<64><76>rt, csup<75>n az objektum beg<65>pel<65>s<EFBFBD>vel parancs n<>lk<6C>l
a kurzor oda ker<65>l, amit az objektumlista megad.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2.4. lecke: EGY KIV<49>TEL A 'PARANCSOBJEKTUM' AL<41>L
** dd be<62>r<EFBFBD>s<EFBFBD>val t<>r<EFBFBD>lheti az eg<65>sz sort. **
A teljes sor t<>rl<72>s<EFBFBD>nek gyakoris<69>ga miatt a Vi tervez<65>i elhat<61>rozt<7A>k,
hogy k<>nnyebb lenne csup<75>n a d-t k<>tszer megnyomni, hogy egy sort t<>r<EFBFBD>lj<6C>nk.
1. Mozgassa a kurzort az al<61>bbi kifejez<65>sek m<>sodik sor<6F>ra!
2. dd beg<65>pel<65>s<EFBFBD>vel t<>r<EFBFBD>lje a sort!
3. Menjen a 4. (eredetileg 5.) sorra!
4. 2dd (ugyeb<65>r sz<73>m-utas<61>t<EFBFBD>s-objektum) beg<65>pel<65>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>n k<>t sort!
1) Alv<6C> szegek a j<>ghideg homokban,
2) - kezdi a k<>lt<6C> -
3) Plak<61>tmag<61>nyban <20>z<EFBFBD> <20>jjelek.
4) Pingvinek ne f<>ljetek,
5) T<>volr<6C>l egy vaku villant,
6) <20>gve hagytad a folyos<6F>n a villanyt.
7) Ma ontj<74>k v<>remet.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2.5. lecke: A VISSZAVON<4F>S (UNDO) PARANCS
** u g<>pel<65>s<EFBFBD>vel visszavonhat<61> az utols<6C> parancs, U az eg<65>sz sort helyre<72>ll<6C>tja. **
1. Menj<6E>nk az al<61>bbi ---> kezdet<65> sor els<6C> hib<69>j<EFBFBD>ra!
2. x lenyom<6F>s<EFBFBD>val t<>r<EFBFBD>lje az els<6C> felesleges karaktert!
3. u megnyom<6F>s<EFBFBD>val vonja vissza az utols<6C>nak v<>grehajtott utas<61>t<EFBFBD>st!
4. M<>sodj<64>ra jav<61>tson ki minden hib<69>t a sorben az x utas<61>t<EFBFBD>ssal!
5. Most nagy U -val <20>ll<6C>tsa vissza a sor eredeti <20>llapot<6F>t!
6. Nyomja meg az u gombot p<>rszor, hogy az U <20>s sz el<65>z<EFBFBD> utas<61>t<EFBFBD>sokat
vissza<7A>ll<6C>tsa!
7. CTRL-R (CTRL gomb lenyom<6F>sa mellett <20>ss<73>n R-t) p<>rszor csin<69>lja <20>jra a
visszavont parancsokat (redo)!
---> Jav<61><76>tsd a hhib<69>kaat ebbben a sooorban majd <20>ll<6C>tsa visszaaa az eredetit.
8. Ezek nagyon hasznos parancsok. Most ugarjon a 2. lecke <20>sszefoglal<61>j<EFBFBD>ra.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2. LECKE <20>SSZEFOGLAL<41>JA
1. T<>rl<72>s a kurzort<72>l a sz<73> v<>g<EFBFBD>ig: dw
2. T<>rl<72>s a kurzort<72>l a sz<73> v<>g<EFBFBD>ig: d$
3. Eg<45>sz sor t<>rl<72>se: dd
4. Egy utas<61>t<EFBFBD>s alakja norm<72>l m<>dban:
[sz<73>m] utas<61>t<EFBFBD>s objektum VAGY utas<61>t<EFBFBD>s [sz<73>m] objektum
ahol:
sz<73>m - h<>nyszor ism<73>telj<6C>k a parancsot
utas<61>t<EFBFBD>s - mit tegy<67>nk, pl. d a t<>rl<72>skor
objektum - mire hasson az utas<61>t<EFBFBD>s, p<>ld<6C>ul w (sz<73>=word),
$ (a sor v<>g<EFBFBD>ig), stb.
5. Az el<65>z<EFBFBD> tett visszavon<6F>sa (undo): u (kis u)
A sor <20>sszes v<>ltoz<6F>s<EFBFBD>nak visszavon<6F>sa: U (nagy U)
Visszavon<6F>sok visszavon<6F>sa: CTRL-R
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.1. lecke: A PUT PARANCS
** p le<6C>t<EFBFBD>s<EFBFBD>vel az utols<6C>nak t<>r<EFBFBD>ltet a kurzor ut<75>n illeszhetj<74>k. **
1. Mozgassuk a kurzort az al<61>bbi sorok els<6C> sor<6F>ra.
2. dd le<6C>t<EFBFBD>s<EFBFBD>vel t<>r<EFBFBD>lj<6C>k a sort <20>s elt<6C>rol<6F>dik a Vim puffer<65>ben.
3. Mozgassuk a kurzort AF<41>L<EFBFBD> a sor f<>l<EFBFBD>, ahov<6F> mozgatni szeretn<74>nk a
t<>r<EFBFBD>lt sort.
4. Norm<72>l m<>dban <20>rjunk p bet<65>t a t<>r<EFBFBD>lt sor beilleszt<7A>s<EFBFBD>hez.
5. Folytassuk a 2-4. utas<61>t<EFBFBD>sokkal hogy a helyes sorrendet kapjuk.
d) Can you learn too?
b) Violets are blue,
c) Intelligence is learned,
a) Roses are red,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.2. lecke: A REPLACE PARANCS
** r <20>s a karakterek le<6C>t<EFBFBD>s<EFBFBD>vel a kurzor alatti karaktert megv<67>ltoztatjuk. **
1. Mozgassuk a kurzort az els<6C> ---> kezdet<65> sorra!
2. Mozgassuk a kurzort az els<6C> hiba f<>l<EFBFBD>!
3. r majd a k<>v<EFBFBD>nt karakter le<6C>t<EFBFBD>s<EFBFBD>vel v<>ltoztassuk meg a hib<69>sat!
4. A 2. <20>s 3. l<>p<EFBFBD>sekkel jav<61>tsuk az <20>sszes hib<69>t!
---> Whan this lime was tuoed in, someone presswd some wrojg keys!
---> When this line was typed in, someone pressed some wrong keys!
5. Menj<6E>nk a 3.2. leck<63>re!
MEGJ: Eml<6D>kezzen, hogy nem memoriz<69>l<EFBFBD>ssal, hanem gyakorl<72>ssal tanuljon.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.3. lecke: A CHANGE PARANCS
** A sz<73> egy r<>sz<73>nek megv<67>ltoztat<61>s<EFBFBD>hoz <20>rjuk: cw . **
1. Mozgassuk a kurzort az els<6C> ---> kezdet<65> sorra!
2. Vigye a kurzort a Ezen sz<73> z bet<65>je f<>l<EFBFBD>!
3. cw <20>s a helyes sz<73>r<EFBFBD>sz (itt 'bben') be<62>r<EFBFBD>s<EFBFBD>val jav<61>tsa a sz<73>t!
4. <ESC> lenyom<6F>sa ut<75>n a k<>vetkez<65> hib<69>ra ugorjon (az els<6C> cser<65>lend<6E>
karakterre)!
5. A 3. <20>s 4. l<>p<EFBFBD>sek ism<73>tl<74>s<EFBFBD>vel az els<6C> mondatot tegye a m<>sodikkal
azonoss<73>!
---> Ezen a sorrrrr p<>r sz<73>ra meg kell v<>ltozzanak a change utask<73>r<EFBFBD>s<EFBFBD>.
---> Ebben a sorban p<>r sz<73>t meg kell v<>ltoztatni a change utas<61>t<EFBFBD>ssal.
Vegy<EFBFBD>k <20>szre, hogy a cw nem csak a sz<73>t <20>rja <20>t, hanem besz<73>r<EFBFBD>
(insert) m<>dba v<>lt.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.4. lecke: T<>BBF<42>LE V<>LTOZTAT<41>S c-VEL
** A c utas<61>t<EFBFBD>s haszn<7A>lhat<61> ugyanazokkal az objektumokkal mint a t<>rl<72>s **
1. A change utas<61>t<EFBFBD>s a t<>rl<72>ssel azonosan viselkedik. A forma:
[sz<73>m] c objektum OR c [sz<73>m] objektum
2. Az objektumok is azonosak, pl. w (sz<73>), $ (sorv<72>g), stb.
3. Mozgassuk a kurzort az els<6C> ---> kezdet<65> sorra!
4. Menj<6E>nk az els<6C> hib<69>ra!
5. c$ beg<65>pel<65>s<EFBFBD>vel a sorv<72>geket tegy<67>k azonoss<73> <20>s nyomjunk <ESC>-et!
---> Ennek a sornak a v<>ge kiigaz<61>t<EFBFBD>sra szorul, hogy megegyezzen a m<>sodikkal.
---> Ennek a sornak a v<>ge a c$ paranccsal v<>ltoztathat<61> meg.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3. LECKE <20>SSZEFOGLAL<41>JA
1. A m<>r t<>r<EFBFBD>lt sort beilleszt<7A>s<EFBFBD>hez nyomjunk p-t. Ez a t<>r<EFBFBD>lt sz<73>veget
a kurzor UT<55>N helyezi (ha sor ker<65>lt t<>rl<72>sre, a kurzor allatti sorba).
2. A kurzor alatti karakter <20>t<EFBFBD>r<EFBFBD>s<EFBFBD>hoz az r-et <20>s azt a karaktert
nyomjuk, amellyel az eredetit fel<65>l szeretn<74>nk <20>rni.
3. A v<>ltoztat<61>s (c) utas<61>t<EFBFBD>s a karaktert<72>l az objektum v<>g<EFBFBD>ig
v<>ltoztatja meg az objektumot. P<>ld<6C>ul a cw a kurzort<72>l a sz<73> v<>g<EFBFBD>ig,
a c$ a sor v<>g<EFBFBD>ig.
4. A v<>ltoztat<61>s form<72>tuma:
[sz<73>m] c objektum VAGY c [sz<73>m] objektum
Ugorjunk a k<>vetkez<65> leck<63>re!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.1. lecke: HELY <20>S F<>JL<4A>LLAPOT
** CTRL-g megnyom<6F>s<EFBFBD>val megn<67>zhetj<74>k a hely<6C>nket a f<>jlban <20>s a f<>jl <20>llapot<6F>t.
SHIFT-G le<6C>t<EFBFBD>s<EFBFBD>vel a f<>jl adott sor<6F>ra ugorhatunk. **
Megj: Olvassuk el az eg<65>sz leck<63>t a l<>p<EFBFBD>sek v<>grehajt<6A>sa el<65>tt!!
1. Tartsuk nyomva a Ctrl gombot <20>s nyomjunk g-t. Az <20>llapotsor
megjelenik a lap alj<6C>n a f<>jln<6C>vvel <20>s az aktu<74>lis sor sorsz<73>m<EFBFBD>val.
Jegyezz<7A>k meg a sorsz<73>mot a 3. l<>p<EFBFBD>shez!
2. Nyomjunk Shift-G-t a lap alj<6C>ra ugr<67>shoz!
3. <20>ss<73>k be az eredeti sor sz<73>m<EFBFBD>t, majd <20>ss<73>nk shift-G-t! Ezzel
visszajutunk az eredeti sorra ahol Ctrl-g-t nyomtunk.
(A be<62>rt sz<73>m NEM fog megjelenni a k<>perny<6E>n.)
4. Ha megjegyezte a feladatot, hajtsa v<>gre az 1-3. l<>p<EFBFBD>seket!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.2. lecke: A SEARCH PARANCS
** / majd a k<>v<EFBFBD>nt kifejez<65>s be<62>r<EFBFBD>s<EFBFBD>val kereshetj<74>k meg a kifejez<65>st. **
1. Norm<72>l m<>dban <20>ss<73>nk / karaktert! Ez <20>s a kurzor megjelenik
a k<>perny<6E> alj<6C>n, ahogy a : utas<61>t<EFBFBD>s is.
2. <20>rjuk be: 'hiibaa' <ENTER>! Ez az a sz<73> amit keres<65>nk.
3. A kifejez<65>s <20>jabb keres<65>s<EFBFBD>hez <20>ss<73>k le egyszer<65>en: n .
A kifejez<65>s ellenkez<65> ir<69>nyban t<>rt<72>n<EFBFBD> keres<65>s<EFBFBD>hez ezt <20>ss<73>k be: Shift-N .
4. Ha visszafel<65> szeretne keresni, akkor ? kell a ! helyett.
---> "hiibaa" nem a helyes m<>dja a hiba le<6C>r<EFBFBD>s<EFBFBD>nak; a hiibaa egy hiba.
Megj: Ha a keres<65>s el<65>ri a f<>jl v<>g<EFBFBD>t, akkor az elej<65>n kezdi.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.3. lecke: Z<>R<EFBFBD>JELEK P<>RJ<52>NAK KERES<45>SE
** % le<6C>t<EFBFBD>s<EFBFBD>vel megtal<61>ljuk a ),], vagy } p<>rj<72>t. **
1. Helyezze a kurzort valamelyik (, [, vagy { z<>r<EFBFBD>jelre a ---> kezdet<65>
sorban!
2. <20>ss<73>n % karaktert!
3. A kurzor a z<>r<EFBFBD>jel p<>rj<72>ra fog ugrani.
4. % le<6C>t<EFBFBD>s<EFBFBD>vel visszaugrik az eredeti z<>r<EFBFBD>jelre.
---> Ez ( egy tesztsor (-ekkel, [-ekkel ] <20>s {-ekkel } a sorban. ))
Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a
z<>r<EFBFBD>jelek nem p<>rosak!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.4. lecke: A HIB<49>K KIJAV<41>T<EFBFBD>S<EFBFBD>NAK EGY M<>DJA
** :s/<2F>j/r<>gi/g beg<65>pel<65>s<EFBFBD>vel az '<27>j'-ra cser<65>lj<6C>k a 'r<>gi'-t. **
1. Menj<6E>nk a ---> kezdet<65> sorra!
2. <20>rjuk be: :s/eggy/egy <ENTER> . Ekkor csak az els<6C> v<>ltozik meg a
sorban.
3. Most ezt <20>rjuk: :s/eggy/egg/g amely glob<6F>lisan helyettes<65>t
a sorban.
Ez a sorban minden el<65>fordul<75>st helyettes<65>t.
---> eggy hegy meggy, szembe j<>n eggy m<>sik heggy.
4. K<>t sor k<>z<EFBFBD>tt a karaktersor minden el<65>fordul<75>s<EFBFBD>nak helyettes<65>t<EFBFBD>se:
:#,#s/r<>gi/<2F>j/g ahol #,# a k<>t sor sorsz<73>ma.
:%s/r<>gi/<2F>j/g a f<>jlbeli <20>sszes el<65>fordul<75>s helyettes<65>t<EFBFBD>se.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4. LECKE <20>SSZEFOGLAL<41>JA
1. Ctrl-g ki<6B>rja az kurzor hely<6C>t a f<>jlban <20>s a f<>jl <20>llapot<6F>t.
Shift-G a f<>jl v<>g<EFBFBD>re megy, gg az elej<65>re. Egy sz<73>m ut<75>n
Shift-G az adott sz<73>m<EFBFBD> sorra ugrik.
2. / ut<75>n egy kifejez<65>s EL<45>REFELE keresi a kifejez<65>st.
2. ? ut<75>n egy kifejez<65>s VISSZAFELE keresi a kifejez<65>st.
Egy keres<65>s ut<75>n az n a k<>vetkez<65> el<65>fordul<75>st keresi azonos ir<69>nyban
Shift-N az ellenkez<65> ir<69>nyban keres.
3. % beg<65>pel<65>s<EFBFBD>vel, ha (,),[,],{, vagy } karakteren vagyunk a z<>r<EFBFBD>jel
p<>rj<72>ra ugrik.
4. az els<6C> r<>gi helyettes<65>t<EFBFBD>se <20>jjal a sorban :s/r<>gi/<2F>j
az <20>sszes r<>gi helyettes<65>t<EFBFBD>se <20>jjal a sorban :s/r<>gi/<2F>j/g
k<>t sor k<>z<EFBFBD>tti kifejez<65>sekre :#,#s/r<>gi/<2F>j/g
# hely<6C>n az aktu<74>lis sor (.) <20>s az utols<6C> ($) is <20>llhat :.,$/r<>gi/<2F>j/g
A f<>jlbeli <20>sszes el<65>fordul<75>s helyettes<65>t<EFBFBD>se :%s/r<>gi/<2F>j/g
Mindenkori meger<65>s<EFBFBD>t<EFBFBD>sre v<>r 'c' hat<61>s<EFBFBD>ra :%s/r<>gi/<2F>j/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5.1. lecke: K<>LS<4C> PARANCS V<>GREHAJT<4A>SA
** :! ut<75>n k<>ls<6C> parancsot <20>rva v<>grehajt<6A>dik a parancs. **
1. <20>rjuk be az ismer<65>s : parancsot, hogy a kurzort a k<>perny<6E> alj<6C>ra
helyezz<7A>k. Ez lehet<65>v<EFBFBD> teszi egy parancs be<62>r<EFBFBD>s<EFBFBD>t.
2. ! (felki<6B>lt<6C>jel) be<62>r<EFBFBD>s<EFBFBD>val tegy<67>k lehet<65>v<EFBFBD> k<>ls<6C> h<>j (shell)-parancs
v<>grehajt<6A>s<EFBFBD>t.
3. <20>rjunk p<>ld<6C>ul ls parancsot a ! ut<75>n majd <20>ss<73>nk <ENTER>-t. Ez ki
fogja list<73>zni a k<>nyvt<76>runkat ugyan<61>gy, mintha a shell promptn<74>l
lenn<6E>nk. Vagy <20>rja ezt :!dir ha az ls nem m<>k<EFBFBD>dik.
Megj: Ilym<79>don b<>rmely k<>ls<6C> utas<61>t<EFBFBD>s v<>grehajthat<61>.
Megj: Minden : parancs ut<75>n <ENTER>-t kell <20>tni.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5.2. lecke: B<>VEBBEN A F<>JLOK <20>R<EFBFBD>S<EFBFBD>R<EFBFBD>L
** A f<>jlok v<>ltoz<6F>sait <20>gy <20>rhatjuk ki :w F<>JLN<4C>V. **
1. :!dir vagy :!ls be<62>r<EFBFBD>s<EFBFBD>val list<73>zzuk a k<>nyvt<76>runkat!
<20>n m<>r tudja, hogy <ENTER>-t kell <20>tnie ut<75>na.
2. V<>lasszon egy f<>jlnevet, amely m<>g nem l<>tezik pl. TESZT!
3. <20>rja: :w TESZT (ahol TESZT a v<>lasztott f<>jln<6C>v)!
4. Ez elmenti a teljes f<>jlt (a Vim Tutort) TESZT n<>ven.
Ellen<65>rz<72>sk<73>pp <20>rjuk ism<73>t :!dir hogy l<>ssuk a k<>nyvt<76>rat!
(Felfel<65> gombbal : ut<75>n az el<65>z<EFBFBD> utas<61>t<EFBFBD>sok visszahozhat<61>ak.)
Megj: Ha <20>n kil<69>pne a Vimb<6D>l <20>s <20>s visszat<61>rne a TESZT f<>jln<6C>vvel, akkor a
f<>jl a tutor ment<6E>skori pontos m<>solata lenne.
5. T<>vol<6F>tsa el a f<>jlt (MS-DOS): :!del TESZT
vagy (Unix): :!rm TESZT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5.3. lecke: EGY KIV<49>LASZTOTT R<>SZ KI<4B>R<EFBFBD>SA
** A f<>jl egy r<>sz<73>nek ki<6B>r<EFBFBD>s<EFBFBD>hoz <20>rja :#,# w F<>JLN<4C>V **
1. :!dir vagy :!ls be<62>r<EFBFBD>s<EFBFBD>val list<73>zza a k<>nyvt<76>rat, <20>s v<>lasszon egy
megfelel<65> f<>jlnevet, pl. TESZT.
2. Mozgassa a kurzort ennek az oldalnak a tetej<65>re, <20>s nyomjon
Ctrl-g-t, hogy megtudja a sorsz<73>mot. JEGYEZZE MEG A SZ<53>MOT!
3. Most menjen a lap alj<6C>ra, <20>s <20>sse be ism<73>t: Ctrl-g. EZT A SZ<53>MOT
IS JEGYEZZE MEG!
4. Ha csak ezt a r<>sz<73>t szeretn<74> menteni a f<>jlnak, <20>rja :#,# w TESZT
ahol #,# a k<>t sorsz<73>m, amit megjegyzett, TESZT az <20>n f<>jlneve.
5. Ism<73>t n<>zze meg, hogy a f<>jl ott van (:!dir) de NE t<>r<EFBFBD>lje.
6. Vimben l<>tezik egy m<>sik lehet<65>s<EFBFBD>g: nyomja meg a Shift-V gombp<62>rt
az els<6C> menteni k<>v<EFBFBD>nt soron, majd menjen le az utols<6C>ra, ezut<75>n
<20>rja :w TESZT2 Ekkor a TESZT2 f<>jlba ker<65>l a kijel<65>lt r<>sz.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5.4. lecke: RETRIEVING AND MERGING FILES
** Egy f<>jl tartalm<6C>nak beilleszt<7A>s<EFBFBD>hez <20>rja :r F<>JLN<4C>V **
1. :!dir be<62>r<EFBFBD>s<EFBFBD>val n<>zze meg, hogy az <20>n TESZT f<>jlja l<>tezik m<>g.
2. Helyezze a kurzort ennek az oldalnak a tetej<65>re.
MEGJ: A 3. l<>p<EFBFBD>s ut<75>n az 5.3. leck<63>t fogja l<>tni. Azut<75>n LEFEL<45> indulva
keresse meg ism<73>t ezt a leck<63>t.
3. Most sz<73>rja be a TESZT nev<65> f<>jlt a :r TESZT paranccsal, ahol
TESZT az <20>n f<>jlj<6C>nak a neve.
MEGJ: A f<>jl, amit beillesztett a kurzora alatt helyezkedik el.
4. Hogy ellen<65>rizz<7A>k, hogy a f<>jlt t<>nyleg beillsztett<74>k, menjen
vissza, <20>s n<>zze meg, hogy k<>tszer szerepel az 5.3. lecke! Az eredeti
mellett a f<>jlb<6C>l bem<65>solt is ott van.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5. LECKE <20>SSZEFOGLAL<41>JA
1. :!parancs v<>grehajt egy k<>ls<6C> utas<61>t<EFBFBD>st.
P<>r hasznos p<>lda:
(MS-DOS) (Unix)
:!dir :!ls - k<>nyvt<76>rlista ki<6B>r<EFBFBD>sa.
:!del F<>JLN<4C>V :!rm F<>JLN<4C>V - F<>JLN<4C>V nev<65> f<>jl t<>rl<72>se.
2. :w F<>JLN<4C>V ki<6B>rja a jelenlegi Vim-f<>jlt a lemezre F<>JN<4A>V n<>ven.
3. :#,#w F<>JLN<4C>V ki<6B>rja a k<>t sorsz<73>m (#) k<>z<EFBFBD>tti sorokat F<>JLN<4C>V-be
M<>sik lehet<65>s<EFBFBD>g, hogy a kezd<7A>sorn<72>l Ctrl-v-t nyom lemegy az utols<6C>
sorra, majd ezt <20>ti be :w F<>JLN<4C>V
4. :r F<>JLN<4C>V beolvassa a F<>JLN<4C>V f<>jlt <20>s behelyezi a jelenlegi f<>jlba
a kurzorpozici<63> ut<75>ni sorba.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6.1. lecke: A OPEN PARANCS
** o be<62>r<EFBFBD>s<EFBFBD>val nyithat egy <20>j sort a kurzor alatt <20>s v<>lthat besz<73>r<EFBFBD> m<>dba **
1. Mozgassuk a kurzort a ---> kezdet<65> sorra.
2. o (kicsi) be<62>r<EFBFBD>s<EFBFBD>val nyisson egy sort a kurzor ALATT! Ekkor
automatikusan besz<73>r<EFBFBD> (insert) m<>dba ker<65>l.
3. M<>solja le a ---> jel<65> sort <20>s <ESC> megnyom<6F>s<EFBFBD>val l<>pjen ki
a besz<73>r<EFBFBD> m<>db<64>l.
---> Az o lenyom<6F>sa ut<75>n a kurzor a k<>vetkez<65> sor elej<65>n <20>ll besz<73>r<EFBFBD> m<>dban.
4. A kurzor FELETTI for megnyit<69>s<EFBFBD>hoz egyzser<65>en a nagy O bet<65>t <20>rjon
kicsi helyett. Pr<50>b<EFBFBD>lja ki a k<>vetkez<65> soron!
Nyisson egy <20>j sort efelett Shift-O megnyom<6F>s<EFBFBD>val, mialatt a kurzor
ezen a soron <20>ll.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6.2. lecke: AZ APPEND PARANCS
** a lenyom<6F>s<EFBFBD>val a kuror UT<55>N sz<73>rhatunk sz<73>veget. **
1. Mozgassuk a kurzort a k<>vetkez<65> ---> kezdet<65> sor v<>g<EFBFBD>re <20>gy,
hogy norm<72>l m<>dban $ <20>r be.
2. a (kicsi) le<6C>t<EFBFBD>s<EFBFBD>vel sz<73>veget sz<73>rhat be AM<41>G<EFBFBD> a karakter m<>g<EFBFBD>,
amelyen a kurzor <20>ll.
(A nagy A az eg<65>sz sor v<>g<EFBFBD>re <20>rja a sz<73>veget.)
Megj: A Vimben a sor legv<67>g<EFBFBD>re is lehet <20>llni, azonba ez el<65>dj<64>ben
a Vi-ban nem lehets<74>ges, ez<65>rt abban az a n<>lk<6C>l el<65>g k<>r<EFBFBD>lm<6C>nyes
a sor v<>g<EFBFBD>hez sz<73>veget <20>rni.
3. Eg<45>sz<73>tse ki az els<6C> sort. Vegye <20>szre, hogy az a utas<61>t<EFBFBD>s (append)
teljesen egyezik az i-vel (insert) csup<75>n a besz<73>rt sz<73>veg helye
k<>l<EFBFBD>nb<6E>zik.
---> Ez a sor lehet<65>v<EFBFBD> teszi <20>nnek, hogy gyakorolja
---> Ez a sor lehet<65>v<EFBFBD> teszi <20>nnek, hogy gyakorolja a sor v<>g<EFBFBD>re beilleszt<7A>st.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6.3. lecke: AZ <20>T<EFBFBD>R<EFBFBD>S M<>SIK V<>LTOZATA
** Nagy R be<62>r<EFBFBD>s<EFBFBD>val <20>rhat fel<65>l t<>bb mint egy karaktert. **
1. Mozgassuk a kurzort az els<6C> ---> kezdet<65> sorra!
2. Place the cursor at the beginning of the first word that is different
from the second line marked ---> (the word 'last').
3. Now type R and replace the remainder of the text on the first line by
typing over the old text to make the first line the same as the second.
---> To make the first line the same as the last on this page use the keys.
---> To make the first line the same as the second, type R and the new text.
4. Note that when you press <ESC> to exit, any unaltered text remains.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6.4. lecke: BE<42>LL<4C>T<EFBFBD>SOK
** <20>ll<6C>tsuk be, hogy a keres<65>s <20>s a helyettes<65>t<EFBFBD>s ne f<>ggj<67>n kis/NAGYbet<65>kt<6B>l **
1. Keress<73>k meg az 'ignore'-t az be<62>rva:
/ignore
Ezt ism<73>telj<6C>k t<>bbsz<73>r az n billenty<74>vel
2. <20>ll<6C>tsuk be az 'ic' (Ignore case) lehet<65>s<EFBFBD>get <20>gy:
:set ic
3. Most keress<73>nk ism<73>t az 'ignore'-ra n-nel
Ism<73>telj<6C>k meg t<>bbsz<73>r a keres<65>st: n
4. <20>ll<6C>tsuk be a 'hlsearch' <20>s 'incsearch' lehet<65>s<EFBFBD>geket:
:set hls is
5. Most ism<73>t <20>rjuk be a keres<65>parancsot, <20>s l<>ssuk mi t<>rt<72>nik:
/ignore
6. A kiemel<65>st sz<73>ntess<73>k meg al<61>bbi utas<61>t<EFBFBD>sok egyik<69>vel:
:set nohls vagy :nohlsearch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6. LECKE <20>SSZEFOGLAL<41>JA
1. Typing o opens a line BELOW the cursor and places the cursor on the open
line in Insert mode.
Typing a capital O opens the line ABOVE the line the cursor is on.
2. Type an a to insert text AFTER the character the cursor is on.
Typing a capital A automatically appends text to the end of the line.
3. Typing a capital R enters Replace mode until <ESC> is pressed to exit.
4. Typing ":set xxx" sets the option "xxx"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7. lecke: ON-LINE HELP PARANCSOK
** Az online s<>g<EFBFBD>rendszer haszn<7A>lata **
A Vim r<>szletes s<>g<EFBFBD>val rendelkezik. Indul<75>shoz a k<>vetkez<65>k egyik<69>t
tegye:
- nyomja meg a <HELP> gombot (ha van ilyen)
- nyomja meg az <F1> gombot (ha van ilyen)
- <20>rja be: :help <ENTER>
:q <ENTER> be<62>r<EFBFBD>s<EFBFBD>val z<>rhatja be a s<>g<EFBFBD>ablakot.
Majdnem minden t<>mak<61>rr<72>l tal<61>lhat s<>g<EFBFBD>t, argumentum megad<61>s<EFBFBD>val
":help" utas<61>t<EFBFBD>s . Pr<50>b<EFBFBD>lja az al<61>bbiakat ki (<ENTER>-t ne felejts<74>k):
:help w
:help c_<T
:help insert-index
:help user-manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8. lecke: IND<4E>T<EFBFBD>SZKRIPT <20>R<EFBFBD>SA
** A Vim lehet<65>s<EFBFBD>geinek be<62>ll<6C>t<EFBFBD>sa **
A Vim rengeteg lehet<65>s<EFBFBD>ggel rendelkezik a Vi-hoz k<>pest, de a legt<67>bb
alapb<70>l el<65>rhetetlen. Ahhoz, hogy alapb<70>l t<>bb lehet<65>s<EFBFBD>g<EFBFBD>nk legyen k<>sz<73>ten<65>nk
kell egy "vimrc" f<>jlt.
1. Kezdj<64>k el szerkeszteni a "vimrc" f<>jlt, ennek m<>dja:
:edit ~/.vimrc Unixon, Linuxon
:edit $VIM/_vimrc MS-Windowson
2. Most sz<73>rjuk be a p<>lda "vimrc" f<>jl sz<73>veg<65>t:
:read $VIMRUNTIME/vimrc_example.vim
3. <20>rjuk ki a f<>jlt:
:write
Legk<67>zelebb a Vim szintaxiskiemel<65>ssel indul.
Hozz<7A>adhatja kedvenc be<62>ll<6C>t<EFBFBD>sait ehhez a "vimrc" f<>jlhoz.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Itt v<>gz<67>dik a Vim oktat<61>, melynek a sz<73>nd<6E>ka egy r<>vid <20>ttekint<6E>s a
Vimr<6D>l, amely el<65>g ahhoz, hogy el<65>g k<>nnyed<65>n kezelj<6C>k a szerkeszt<7A>t.
T<>vol van a teljess<73>gt<67>l, mivel a Vimnek sz<73>mtalan tov<6F>bbi utas<61>t<EFBFBD>sa
van. Ezut<75>n a felhaszn<7A>l<EFBFBD>i k<>zik<69>nyvet <20>rdemes elolvasni az angolul
tud<75>knak: ":help user-manual". (egyel<65>re nem tud magyarul)
Tov<6F>bbi magyar olvasnival<61>k <20>rhet<65>ek el az al<61>bbi oldalr<6C>l.
http://ubuntu.hu/index.php?title=Vim
For further reading and studying, this book is recommended:
Vim - Vi Improved - by Steve Oualline
Publisher: New Riders
The first book completely dedicated to Vim. Especially useful for beginners.
There are many examples and pictures.
See http://iccf-holland.org/click5.html
This book is older and more about Vi than Vim, but also recommended:
Learning the Vi Editor - by Linda Lamb
Publisher: O'Reilly & Associates Inc.
It is a good book to get to know almost anything you want to do with Vi.
The sixth edition also includes information on Vim.
This tutorial was written by Michael C. Pierce and Robert K. Ware,
Colorado School of Mines using ideas supplied by Charles Smith,
Colorado State University. E-mail: bware@mines.colorado.edu.
Modified for Vim by Bram Moolenaar.

View File

@@ -1233,12 +1233,13 @@ do_buffer(action, start, dir, count, forceit)
if (action == DOBUF_SPLIT) /* split window first */
{
# ifdef FEAT_WINDOWS
/* jump to first window containing buf if one exists ("useopen") */
if (vim_strchr(p_swb, 'o') != NULL && buf_jump_open_win(buf))
/* If 'switchbuf' contains "useopen": jump to first window containing
* "buf" if one exists */
if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf))
return OK;
/* jump to first window in any tab page containing buf if one exists
* ("usetab") */
if (vim_strchr(p_swb, 'a') != NULL && buf_jump_open_tab(buf))
/* If 'switchbuf' contians "usetab": jump to first window in any tab
* page containing "buf" if one exists */
if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf))
return OK;
if (win_split(0, 0) == FAIL)
# endif
@@ -1874,16 +1875,21 @@ buflist_getfile(n, lnum, options, forceit)
#ifdef FEAT_WINDOWS
if (options & GETF_SWITCH)
{
/* use existing open window for buffer if wanted */
if (vim_strchr(p_swb, 'o') != NULL) /* useopen */
/* If 'switchbuf' contains "useopen": jump to first window containing
* "buf" if one exists */
if (swb_flags & SWB_USEOPEN)
wp = buf_jump_open_win(buf);
/* use existing open window in any tab page for buffer if wanted */
if (vim_strchr(p_swb, 'a') != NULL) /* usetab */
/* If 'switchbuf' contians "usetab": jump to first window in any tab
* page containing "buf" if one exists */
if (wp == NULL && (swb_flags & SWB_USETAB))
wp = buf_jump_open_tab(buf);
/* split window if wanted ("split") */
if (wp == NULL && vim_strchr(p_swb, 'l') != NULL && !bufempty())
/* If 'switchbuf' contains "split" or "newtab" and the current buffer
* isn't empty: open new window */
if (wp == NULL && (swb_flags & (SWB_SPLIT | SWB_NEWTAB)) && !bufempty())
{
if (win_split(0, 0) == FAIL)
if (swb_flags & SWB_NEWTAB) /* Open in a new tab */
tabpage_new();
else if (win_split(0, 0) == FAIL) /* Open in a new window */
return FAIL;
# ifdef FEAT_SCROLLBIND
curwin->w_p_scb = FALSE;
@@ -4023,7 +4029,7 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, t
#endif
n = width - maxwidth + 1;
p = s + n;
mch_memmove(s + 1, p, STRLEN(p) + 1);
STRMOVE(s + 1, p);
*s = '<';
/* Fill up for half a double-wide character. */
@@ -4054,7 +4060,7 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, t
if (l < itemcnt)
{
p = item[l].start + maxwidth - width;
mch_memmove(p, item[l].start, STRLEN(item[l].start) + 1);
STRMOVE(p, item[l].start);
for (s = item[l].start; s < p; s++)
*s = fillchar;
for (l++; l < itemcnt; l++)
@@ -4867,7 +4873,7 @@ chk_modeline(lnum, flags)
*/
for (e = s; *e != ':' && *e != NUL; ++e)
if (e[0] == '\\' && e[1] == ':')
mch_memmove(e, e + 1, STRLEN(e));
STRMOVE(e, e + 1);
if (*e == NUL)
end = TRUE;

View File

@@ -221,7 +221,7 @@ get_recorded()
char_u *
get_inserted()
{
return(get_buffcont(&redobuff, FALSE));
return get_buffcont(&redobuff, FALSE);
}
/*
@@ -2233,6 +2233,8 @@ vgetorpeek(advance)
if ((mp == NULL || max_mlen >= mp_match_len)
&& keylen != KL_PART_MAP)
{
int save_keylen = keylen;
/*
* When no matching mapping found or found a
* non-matching mapping that matches at least what the
@@ -2252,6 +2254,12 @@ vgetorpeek(advance)
{
keylen = check_termcode(max_mlen + 1, NULL, 0);
/* If no termcode matched but 'pastetoggle'
* matched partially it's like an incomplete key
* sequence. */
if (keylen == 0 && save_keylen == KL_PART_KEY)
keylen = KL_PART_KEY;
/*
* When getting a partial match, but the last
* characters were not typed, don't wait for a
@@ -2293,7 +2301,9 @@ vgetorpeek(advance)
#endif
/* When there was a matching mapping and no
* termcode could be replaced after another one,
* use that mapping. */
* use that mapping (loop around). If there was
* no mapping use the character from the
* typeahead buffer right here. */
if (mp == NULL)
{
/*
@@ -2883,6 +2893,12 @@ inchar(buf, maxlen, wait_time, tb_change_cnt)
#endif
)
{
#if defined(FEAT_NETBEANS_INTG)
/* Process the queued netbeans messages. */
netbeans_parse_messages();
#endif
if (got_int || (script_char = getc(scriptin[curscript])) < 0)
{
/* Reached EOF.
@@ -3847,7 +3863,7 @@ showmap(mp, local)
while (++len <= 3)
msg_putchar(' ');
/* Get length of what we write */
/* Display the LHS. Get length of what we write. */
len = msg_outtrans_special(mp->m_keys, TRUE);
do
{

View File

@@ -25,7 +25,6 @@
#if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
/* Note: when making changes here also adjust configure.in. */
# include <fcntl.h>
#ifdef WIN32
# ifdef DEBUG
# include <tchar.h> /* for _T definition for TRACEn macros */
@@ -327,6 +326,7 @@ netbeans_connect(void)
if ((sd = (NBSOCK)socket(AF_INET, SOCK_STREAM, 0)) == (NBSOCK)-1)
{
nbdebug(("error in socket() in netbeans_connect()\n"));
PERROR("socket() in netbeans_connect()");
goto theend;
}
@@ -344,6 +344,7 @@ netbeans_connect(void)
sd = mch_open(hostname, O_RDONLY, 0);
goto theend;
}
nbdebug(("error in gethostbyname() in netbeans_connect()\n"));
PERROR("gethostbyname() in netbeans_connect()");
sd = -1;
goto theend;
@@ -352,7 +353,8 @@ netbeans_connect(void)
#else
if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
{
PERROR("socket()");
nbdebug(("error in socket() in netbeans_connect()\n"));
PERROR("socket() in netbeans_connect()");
goto theend;
}
@@ -369,12 +371,14 @@ netbeans_connect(void)
#ifdef INET_SOCKETS
if ((sd = (NBSOCK)socket(AF_INET, SOCK_STREAM, 0)) == (NBSOCK)-1)
{
nbdebug(("socket()#2 in netbeans_connect()\n"));
PERROR("socket()#2 in netbeans_connect()");
goto theend;
}
#else
if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
{
nbdebug(("socket()#2 in netbeans_connect()\n"));
PERROR("socket()#2 in netbeans_connect()");
goto theend;
}
@@ -398,6 +402,7 @@ netbeans_connect(void)
if (!success)
{
/* Get here when the server can't be found. */
nbdebug(("Cannot connect to Netbeans #2\n"));
PERROR(_("Cannot connect to Netbeans #2"));
getout(1);
}
@@ -406,6 +411,7 @@ netbeans_connect(void)
}
else
{
nbdebug(("Cannot connect to Netbeans\n"));
PERROR(_("Cannot connect to Netbeans"));
getout(1);
}
@@ -450,6 +456,8 @@ getConnInfo(char *file, char **host, char **port, char **auth)
*/
if (mch_stat(file, &st) == 0 && (st.st_mode & 0077) != 0)
{
nbdebug(("Wrong access mode for NetBeans connection info file: \"%s\"\n",
file));
EMSG2(_("E668: Wrong access mode for NetBeans connection info file: \"%s\""),
file);
return FAIL;
@@ -459,6 +467,7 @@ getConnInfo(char *file, char **host, char **port, char **auth)
fp = mch_fopen(file, "r");
if (fp == NULL)
{
nbdebug(("Cannot open NetBeans connection info file\n"));
PERROR("E660: Cannot open NetBeans connection info file");
return FAIL;
}
@@ -621,13 +630,13 @@ save(char_u *buf, int len)
/*
* While there's still a command in the work queue, parse and execute it.
*/
static void
nb_parse_messages(void)
void
netbeans_parse_messages(void)
{
char_u *p;
queue_T *node;
while (head.next != &head)
while (head.next != NULL && head.next != &head)
{
node = head.next;
@@ -640,7 +649,8 @@ nb_parse_messages(void)
* prepend the text to that buffer and delete this one. */
if (node->next == &head)
return;
p = alloc((unsigned)(STRLEN(node->buffer) + STRLEN(node->next->buffer) + 1));
p = alloc((unsigned)(STRLEN(node->buffer)
+ STRLEN(node->next->buffer) + 1));
if (p == NULL)
return; /* out of memory */
STRCPY(p, node->buffer);
@@ -679,7 +689,7 @@ nb_parse_messages(void)
else
{
/* more follows, move to the start */
mch_memmove(node->buffer, p, STRLEN(p) + 1);
STRMOVE(node->buffer, p);
}
}
}
@@ -711,7 +721,9 @@ messageFromNetbeans(gpointer clientData, gint unused1,
static char_u *buf = NULL;
int len;
int readlen = 0;
#ifndef FEAT_GUI_GTK
static int level = 0;
#endif
if (sd < 0)
{
@@ -719,7 +731,9 @@ messageFromNetbeans(gpointer clientData, gint unused1,
return;
}
#ifndef FEAT_GUI_GTK
++level; /* recursion guard; this will be called from the X event loop */
#endif
/* Allocate a buffer to read into. */
if (buf == NULL)
@@ -749,15 +763,23 @@ messageFromNetbeans(gpointer clientData, gint unused1,
netbeans_disconnect();
nbdebug(("messageFromNetbeans: Error in read() from socket\n"));
if (len < 0)
{
nbdebug(("read from Netbeans socket\n"));
PERROR(_("read from Netbeans socket"));
}
return; /* don't try to parse it */
}
#ifdef FEAT_GUI_GTK
if (gtk_main_level() > 0)
gtk_main_quit();
#else
/* Parse the messages, but avoid recursion. */
if (level == 1)
nb_parse_messages();
netbeans_parse_messages();
--level;
#endif
}
/*
@@ -809,6 +831,7 @@ nb_parse_cmd(char_u *cmd)
if (*verb != ':')
{
nbdebug((" missing colon: %s\n", cmd));
EMSG2("E627: missing colon: %s", cmd);
return;
}
@@ -832,6 +855,7 @@ nb_parse_cmd(char_u *cmd)
if (isfunc < 0)
{
nbdebug((" missing ! or / in: %s\n", cmd));
EMSG2("E628: missing ! or / in: %s", cmd);
return;
}
@@ -1037,13 +1061,19 @@ nb_send(char *buf, char *fun)
if (sd < 0)
{
if (!did_error)
{
nbdebug((" %s(): write while not connected\n", fun));
EMSG2("E630: %s(): write while not connected", fun);
}
did_error = TRUE;
}
else if (sock_write(sd, buf, (int)STRLEN(buf)) != (int)STRLEN(buf))
{
if (!did_error)
{
nbdebug((" %s(): write failed\n", fun));
EMSG2("E631: %s(): write failed", fun);
}
did_error = TRUE;
}
else
@@ -1229,7 +1259,7 @@ nb_partialremove(linenr_T lnum, colnr_T first, colnr_T last)
if (newtext != NULL)
{
mch_memmove(newtext, oldtext, first);
mch_memmove(newtext + first, oldtext + lastbyte + 1, STRLEN(oldtext + lastbyte + 1) + 1);
STRMOVE(newtext + first, oldtext + lastbyte + 1);
nbdebug((" NEW LINE %d: %s\n", lnum, newtext));
ml_replace(lnum, newtext, FALSE);
}
@@ -1329,8 +1359,8 @@ nb_do_cmd(
#ifdef FEAT_SIGNS
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in getAnno"));
EMSG("E652: null bufp in getAnno");
nbdebug((" Invalid buffer identifier in getAnno\n"));
EMSG("E652: Invalid buffer identifier in getAnno");
retval = FAIL;
}
else
@@ -1352,8 +1382,8 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in getLength"));
EMSG("E632: null bufp in getLength");
nbdebug((" invalid buffer identifier in getLength\n"));
EMSG("E632: invalid buffer identifier in getLength");
retval = FAIL;
}
else
@@ -1374,8 +1404,8 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in getText"));
EMSG("E633: null bufp in getText");
nbdebug((" invalid buffer identifier in getText\n"));
EMSG("E633: invalid buffer identifier in getText");
retval = FAIL;
}
else
@@ -1438,8 +1468,8 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in remove"));
EMSG("E634: null bufp in remove");
nbdebug((" invalid buffer identifier in remove\n"));
EMSG("E634: invalid buffer identifier in remove");
retval = FAIL;
}
else
@@ -1457,6 +1487,7 @@ nb_do_cmd(
pos = off2pos(buf->bufp, off);
if (!pos)
{
nbdebug((" !bad position\n"));
nb_reply_text(cmdno, (char_u *)"!bad position");
netbeansFireChanges = oldFire;
netbeansSuppressNoLines = oldSuppress;
@@ -1467,6 +1498,7 @@ nb_do_cmd(
pos = off2pos(buf->bufp, off+count-1);
if (!pos)
{
nbdebug((" !bad count\n"));
nb_reply_text(cmdno, (char_u *)"!bad count");
netbeansFireChanges = oldFire;
netbeansSuppressNoLines = oldSuppress;
@@ -1599,8 +1631,8 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in insert"));
EMSG("E635: null bufp in insert");
nbdebug((" invalid buffer identifier in insert\n"));
EMSG("E635: invalid buffer identifier in insert");
retval = FAIL;
}
else if (args != NULL)
@@ -1756,7 +1788,8 @@ nb_do_cmd(
/* Create a buffer without a name. */
if (buf == NULL)
{
EMSG("E636: null buf in create");
nbdebug((" invalid buffer identifier in create\n"));
EMSG("E636: invalid buffer identifier in create");
return FAIL;
}
vim_free(buf->displayname);
@@ -1775,7 +1808,7 @@ nb_do_cmd(
{
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in insertDone"));
nbdebug((" invalid buffer identifier in insertDone\n"));
}
else
{
@@ -1793,7 +1826,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in saveDone"));
nbdebug((" invalid buffer identifier in saveDone\n"));
}
else
print_save_msg(buf, savedChars);
@@ -1803,7 +1836,8 @@ nb_do_cmd(
{
if (buf == NULL)
{
EMSG("E637: null buf in startDocumentListen");
nbdebug((" invalid buffer identifier in startDocumentListen\n"));
EMSG("E637: invalid buffer identifier in startDocumentListen");
return FAIL;
}
buf->fireChanges = 1;
@@ -1813,15 +1847,19 @@ nb_do_cmd(
{
if (buf == NULL)
{
EMSG("E638: null buf in stopDocumentListen");
nbdebug((" invalid buffer identifier in stopDocumentListen\n"));
EMSG("E638: invalid buffer identifier in stopDocumentListen");
return FAIL;
}
buf->fireChanges = 0;
if (buf->bufp != NULL && buf->bufp->b_was_netbeans_file)
{
if (!buf->bufp->b_netbeans_file)
{
nbdebug(("E658: NetBeans connection lost for buffer %ld\n", buf->bufp->b_fnum));
EMSGN(_("E658: NetBeans connection lost for buffer %ld"),
buf->bufp->b_fnum);
}
else
{
/* NetBeans uses stopDocumentListen when it stops editing
@@ -1838,7 +1876,8 @@ nb_do_cmd(
{
if (buf == NULL)
{
EMSG("E639: null buf in setTitle");
nbdebug((" invalid buffer identifier in setTitle\n"));
EMSG("E639: invalid buffer identifier in setTitle");
return FAIL;
}
vim_free(buf->displayname);
@@ -1849,7 +1888,8 @@ nb_do_cmd(
{
if (buf == NULL || buf->bufp == NULL)
{
EMSG("E640: null buf in initDone");
nbdebug((" invalid buffer identifier in initDone\n"));
EMSG("E640: invalid buffer identifier in initDone");
return FAIL;
}
doupdate = 1;
@@ -1871,7 +1911,8 @@ nb_do_cmd(
if (buf == NULL)
{
EMSG("E641: null buf in setBufferNumber");
nbdebug((" invalid buffer identifier in setBufferNumber\n"));
EMSG("E641: invalid buffer identifier in setBufferNumber");
return FAIL;
}
path = (char_u *)nb_unquote(args, NULL);
@@ -1881,6 +1922,7 @@ nb_do_cmd(
vim_free(path);
if (bufp == NULL)
{
nbdebug((" File %s not found in setBufferNumber\n", args));
EMSG2("E642: File %s not found in setBufferNumber", args);
return FAIL;
}
@@ -1910,7 +1952,8 @@ nb_do_cmd(
{
if (buf == NULL)
{
EMSG("E643: null buf in setFullName");
nbdebug((" invalid buffer identifier in setFullName\n"));
EMSG("E643: invalid buffer identifier in setFullName");
return FAIL;
}
vim_free(buf->displayname);
@@ -1929,7 +1972,8 @@ nb_do_cmd(
{
if (buf == NULL)
{
EMSG("E644: null buf in editFile");
nbdebug((" invalid buffer identifier in editFile\n"));
EMSG("E644: invalid buffer identifier in editFile");
return FAIL;
}
/* Edit a file: like create + setFullName + read the file. */
@@ -1950,7 +1994,11 @@ nb_do_cmd(
{
if (buf == NULL || buf->bufp == NULL)
{
/* EMSG("E645: null bufp in setVisible"); */
nbdebug((" invalid buffer identifier in setVisible\n"));
/* This message was commented out, probably because it can
* happen when shutting down. */
if (p_verbose > 0)
EMSG("E645: invalid buffer identifier in setVisible");
return FAIL;
}
if (streq((char *)args, "T") && buf->bufp != curbuf)
@@ -1982,7 +2030,11 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
/* EMSG("E646: null bufp in setModified"); */
nbdebug((" invalid buffer identifier in setModified\n"));
/* This message was commented out, probably because it can
* happen when shutting down. */
if (p_verbose > 0)
EMSG("E646: invalid buffer identifier in setModified");
return FAIL;
}
prev_b_changed = buf->bufp->b_changed;
@@ -2016,7 +2068,7 @@ nb_do_cmd(
else if (streq((char *)cmd, "setModtime"))
{
if (buf == NULL || buf->bufp == NULL)
nbdebug((" null bufp in setModtime"));
nbdebug((" invalid buffer identifier in setModtime\n"));
else
buf->bufp->b_mtime = atoi((char *)args);
/* =====================================================================*/
@@ -2024,7 +2076,7 @@ nb_do_cmd(
else if (streq((char *)cmd, "setReadOnly"))
{
if (buf == NULL || buf->bufp == NULL)
nbdebug((" null bufp in setReadOnly"));
nbdebug((" invalid buffer identifier in setReadOnly\n"));
else if (streq((char *)args, "T"))
buf->bufp->b_p_ro = TRUE;
else
@@ -2065,7 +2117,8 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
EMSG("E647: null bufp in setDot");
nbdebug((" invalid buffer identifier in setDot\n"));
EMSG("E647: invalid buffer identifier in setDot");
return FAIL;
}
@@ -2117,7 +2170,8 @@ nb_do_cmd(
if (buf == NULL)
{
EMSG("E648: null buf in close");
nbdebug((" invalid buffer identifier in close\n"));
EMSG("E648: invalid buffer identifier in close");
return FAIL;
}
@@ -2125,8 +2179,14 @@ nb_do_cmd(
if (buf->displayname != NULL)
name = buf->displayname;
#endif
/* if (buf->bufp == NULL) */
/* EMSG("E649: null bufp in close"); */
if (buf->bufp == NULL)
{
nbdebug((" invalid buffer identifier in close\n"));
/* This message was commented out, probably because it can
* happen when shutting down. */
if (p_verbose > 0)
EMSG("E649: invalid buffer identifier in close");
}
nbdebug((" CLOSE %d: %s\n", bufno, name));
need_mouse_correct = TRUE;
if (buf->bufp != NULL)
@@ -2139,7 +2199,7 @@ nb_do_cmd(
}
else if (streq((char *)cmd, "setStyle")) /* obsolete... */
{
nbdebug((" setStyle is obsolete!"));
nbdebug((" setStyle is obsolete!\n"));
/* =====================================================================*/
}
else if (streq((char *)cmd, "setExitDelay"))
@@ -2162,7 +2222,8 @@ nb_do_cmd(
if (buf == NULL)
{
EMSG("E650: null buf in defineAnnoType");
nbdebug((" invalid buffer identifier in defineAnnoType\n"));
EMSG("E650: invalid buffer identifier in defineAnnoType");
return FAIL;
}
@@ -2224,7 +2285,8 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
EMSG("E651: null bufp in addAnno");
nbdebug((" invalid buffer identifier in addAnno\n"));
EMSG("E651: invalid buffer identifier in addAnno");
return FAIL;
}
@@ -2250,12 +2312,12 @@ nb_do_cmd(
# ifdef NBDEBUG
if (len != -1)
{
nbdebug((" partial line annotation -- Not Yet Implemented!"));
nbdebug((" partial line annotation -- Not Yet Implemented!\n"));
}
# endif
if (serNum >= GUARDEDOFFSET)
{
nbdebug((" too many annotations! ignoring..."));
nbdebug((" too many annotations! ignoring...\n"));
return FAIL;
}
if (pos)
@@ -2276,7 +2338,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in removeAnno"));
nbdebug((" invalid buffer identifier in removeAnno\n"));
return FAIL;
}
doupdate = 1;
@@ -2292,7 +2354,7 @@ nb_do_cmd(
else if (streq((char *)cmd, "moveAnnoToFront"))
{
#ifdef FEAT_SIGNS
nbdebug((" moveAnnoToFront: Not Yet Implemented!"));
nbdebug((" moveAnnoToFront: Not Yet Implemented!\n"));
#endif
/* =====================================================================*/
}
@@ -2315,7 +2377,7 @@ nb_do_cmd(
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in %s command", cmd));
nbdebug((" invalid buffer identifier in %s command\n", cmd));
return FAIL;
}
nb_set_curbuf(buf->bufp);
@@ -2399,7 +2461,7 @@ nb_do_cmd(
*/
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in %s command", cmd));
nbdebug((" invalid buffer identifier in %s command\n", cmd));
return FAIL;
}
@@ -2423,13 +2485,17 @@ nb_do_cmd(
#endif
}
}
else
{
nbdebug((" Buffer has no changes!\n"));
}
/* =====================================================================*/
}
else if (streq((char *)cmd, "netbeansBuffer"))
{
if (buf == NULL || buf->bufp == NULL)
{
nbdebug((" null bufp in %s command", cmd));
nbdebug((" invalid buffer identifier in %s command\n", cmd));
return FAIL;
}
if (*args == 'T')
@@ -2455,6 +2521,10 @@ nb_do_cmd(
{
/* not used yet */
}
else
{
nbdebug(("Unrecognised command: %s\n", cmd));
}
/*
* Unrecognized command is ignored.
*/
@@ -2994,7 +3064,7 @@ netbeans_removed(
if (len < 0)
{
nbdebug(("Negative len %ld in netbeans_removed()!", len));
nbdebug(("Negative len %ld in netbeans_removed()!\n", len));
return;
}
@@ -3635,6 +3705,7 @@ print_save_msg(buf, nchars)
STRCAT(ebuf, IObuff);
STRCAT(ebuf, (char_u *)_("is read-only (add ! to override)"));
STRCPY(IObuff, ebuf);
nbdebug((" %s\n", ebuf ));
emsg(IObuff);
}
}

View File

@@ -891,7 +891,7 @@ msgid "E156: Missing sign name"
msgstr "E156: Ontbrekende tekennaam"
msgid "E612: Too many signs defined"
msgstr "Te veel tekens gedefinieer"
msgstr "E612: Te veel tekens gedefinieer"
#, c-format
msgid "E239: Invalid sign text: %s"

View File

@@ -1,4 +1,4 @@
CODE PRELOAD EXECUTEONLY
DATA MULTIPLE SHARED
DESCRIPTION 'Vim 7.1'
DESCRIPTION 'Vim 7.2a'
HEAPSIZE 0,0

View File

@@ -9,10 +9,6 @@
#include "vim.h"
#ifdef HAVE_FCNTL_H
# include <fcntl.h> /* for chdir() */
#endif
static int path_is_url __ARGS((char_u *p));
#if defined(FEAT_WINDOWS) || defined(PROTO)
static int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir));