diff --git a/usr/bin/ex.exe b/usr/bin/ex.exe index 70c9866289e..02455292708 100755 Binary files a/usr/bin/ex.exe and b/usr/bin/ex.exe differ diff --git a/usr/bin/rsync.exe b/usr/bin/rsync.exe index 7256f9ff68a..c273e6da12d 100644 Binary files a/usr/bin/rsync.exe and b/usr/bin/rsync.exe differ diff --git a/usr/bin/rview.exe b/usr/bin/rview.exe index 70c9866289e..02455292708 100755 Binary files a/usr/bin/rview.exe and b/usr/bin/rview.exe differ diff --git a/usr/bin/rvim.exe b/usr/bin/rvim.exe index 70c9866289e..02455292708 100755 Binary files a/usr/bin/rvim.exe and b/usr/bin/rvim.exe differ diff --git a/usr/bin/view.exe b/usr/bin/view.exe index 70c9866289e..02455292708 100755 Binary files a/usr/bin/view.exe and b/usr/bin/view.exe differ diff --git a/usr/bin/vim.exe b/usr/bin/vim.exe index 70c9866289e..02455292708 100755 Binary files a/usr/bin/vim.exe and b/usr/bin/vim.exe differ diff --git a/usr/bin/vimdiff.exe b/usr/bin/vimdiff.exe index 70c9866289e..02455292708 100755 Binary files a/usr/bin/vimdiff.exe and b/usr/bin/vimdiff.exe differ diff --git a/usr/bin/vimtutor b/usr/bin/vimtutor index 409c10c0474..1d530d491ed 100755 --- a/usr/bin/vimtutor +++ b/usr/bin/vimtutor @@ -50,6 +50,7 @@ hu Hungarian \ it Italian \ ja Japanese \ ko Korean \ +lt Lithuanian \ lv Latvian \ nb Bokmål \ nl Dutch \ @@ -61,7 +62,7 @@ sk Slovak \ sr Serbian \ sv Swedish \ tr Turkish \ -uk English \ +uk Ukrainian \ vi Vietnamese \ zh Chinese diff --git a/usr/bin/xxd.exe b/usr/bin/xxd.exe index 1bfed6f085a..ad7404f4536 100755 Binary files a/usr/bin/xxd.exe and b/usr/bin/xxd.exe differ diff --git a/usr/share/man/de.ISO8859-1/man1/rview.1.gz b/usr/share/man/de.ISO8859-1/man1/rview.1.gz index 369999eb720..e85218b8d15 100644 Binary files a/usr/share/man/de.ISO8859-1/man1/rview.1.gz and b/usr/share/man/de.ISO8859-1/man1/rview.1.gz differ diff --git a/usr/share/man/de.ISO8859-1/man1/rvim.1.gz b/usr/share/man/de.ISO8859-1/man1/rvim.1.gz index 369999eb720..e85218b8d15 100644 Binary files a/usr/share/man/de.ISO8859-1/man1/rvim.1.gz and b/usr/share/man/de.ISO8859-1/man1/rvim.1.gz differ diff --git a/usr/share/man/de.ISO8859-1/man1/view.1.gz b/usr/share/man/de.ISO8859-1/man1/view.1.gz index 369999eb720..e85218b8d15 100644 Binary files a/usr/share/man/de.ISO8859-1/man1/view.1.gz and b/usr/share/man/de.ISO8859-1/man1/view.1.gz differ diff --git a/usr/share/man/de.ISO8859-1/man1/vim.1.gz b/usr/share/man/de.ISO8859-1/man1/vim.1.gz index 369999eb720..e85218b8d15 100644 Binary files a/usr/share/man/de.ISO8859-1/man1/vim.1.gz and b/usr/share/man/de.ISO8859-1/man1/vim.1.gz differ diff --git a/usr/share/man/de.UTF-8/man1/rview.1.gz b/usr/share/man/de.UTF-8/man1/rview.1.gz index fcda1b35c43..f08fa610de3 100644 Binary files a/usr/share/man/de.UTF-8/man1/rview.1.gz and b/usr/share/man/de.UTF-8/man1/rview.1.gz differ diff --git a/usr/share/man/de.UTF-8/man1/rvim.1.gz b/usr/share/man/de.UTF-8/man1/rvim.1.gz index fcda1b35c43..f08fa610de3 100644 Binary files a/usr/share/man/de.UTF-8/man1/rvim.1.gz and b/usr/share/man/de.UTF-8/man1/rvim.1.gz differ diff --git a/usr/share/man/de.UTF-8/man1/view.1.gz b/usr/share/man/de.UTF-8/man1/view.1.gz index fcda1b35c43..f08fa610de3 100644 Binary files a/usr/share/man/de.UTF-8/man1/view.1.gz and b/usr/share/man/de.UTF-8/man1/view.1.gz differ diff --git a/usr/share/man/de.UTF-8/man1/vim.1.gz b/usr/share/man/de.UTF-8/man1/vim.1.gz index fcda1b35c43..f08fa610de3 100644 Binary files a/usr/share/man/de.UTF-8/man1/vim.1.gz and b/usr/share/man/de.UTF-8/man1/vim.1.gz differ diff --git a/usr/share/man/de/man1/rview.1.gz b/usr/share/man/de/man1/rview.1.gz index 369999eb720..e85218b8d15 100644 Binary files a/usr/share/man/de/man1/rview.1.gz and b/usr/share/man/de/man1/rview.1.gz differ diff --git a/usr/share/man/de/man1/rvim.1.gz b/usr/share/man/de/man1/rvim.1.gz index 369999eb720..e85218b8d15 100644 Binary files a/usr/share/man/de/man1/rvim.1.gz and b/usr/share/man/de/man1/rvim.1.gz differ diff --git a/usr/share/man/de/man1/view.1.gz b/usr/share/man/de/man1/view.1.gz index 369999eb720..e85218b8d15 100644 Binary files a/usr/share/man/de/man1/view.1.gz and b/usr/share/man/de/man1/view.1.gz differ diff --git a/usr/share/man/de/man1/vim.1.gz b/usr/share/man/de/man1/vim.1.gz index 369999eb720..e85218b8d15 100644 Binary files a/usr/share/man/de/man1/vim.1.gz and b/usr/share/man/de/man1/vim.1.gz differ diff --git a/usr/share/man/it.ISO8859-1/man1/vimtutor.1.gz b/usr/share/man/it.ISO8859-1/man1/vimtutor.1.gz index 8658119889b..d523b07b24f 100644 Binary files a/usr/share/man/it.ISO8859-1/man1/vimtutor.1.gz and b/usr/share/man/it.ISO8859-1/man1/vimtutor.1.gz differ diff --git a/usr/share/man/it.UTF-8/man1/vimtutor.1.gz b/usr/share/man/it.UTF-8/man1/vimtutor.1.gz index e4abdf64152..a56f7cb8a3e 100644 Binary files a/usr/share/man/it.UTF-8/man1/vimtutor.1.gz and b/usr/share/man/it.UTF-8/man1/vimtutor.1.gz differ diff --git a/usr/share/man/it/man1/vimtutor.1.gz b/usr/share/man/it/man1/vimtutor.1.gz index 8658119889b..d523b07b24f 100644 Binary files a/usr/share/man/it/man1/vimtutor.1.gz and b/usr/share/man/it/man1/vimtutor.1.gz differ diff --git a/usr/share/man/man1/rsync-ssl.1.gz b/usr/share/man/man1/rsync-ssl.1.gz index 4dd99b7a393..a4d5c6a7015 100644 Binary files a/usr/share/man/man1/rsync-ssl.1.gz and b/usr/share/man/man1/rsync-ssl.1.gz differ diff --git a/usr/share/man/man1/rsync.1.gz b/usr/share/man/man1/rsync.1.gz index a005fcd0701..01cf79dd100 100644 Binary files a/usr/share/man/man1/rsync.1.gz and b/usr/share/man/man1/rsync.1.gz differ diff --git a/usr/share/man/man1/vimtutor.1.gz b/usr/share/man/man1/vimtutor.1.gz index b4313debca5..7d5c76e9eb4 100644 Binary files a/usr/share/man/man1/vimtutor.1.gz and b/usr/share/man/man1/vimtutor.1.gz differ diff --git a/usr/share/man/man5/rsyncd.conf.5.gz b/usr/share/man/man5/rsyncd.conf.5.gz index 6e9aa66334b..663d2f0399c 100644 Binary files a/usr/share/man/man5/rsyncd.conf.5.gz and b/usr/share/man/man5/rsyncd.conf.5.gz differ diff --git a/usr/share/man/ru.KOI8-R/man1/vimtutor.1.gz b/usr/share/man/ru.KOI8-R/man1/vimtutor.1.gz index 56fb9eccd5d..fe479ed8490 100644 Binary files a/usr/share/man/ru.KOI8-R/man1/vimtutor.1.gz and b/usr/share/man/ru.KOI8-R/man1/vimtutor.1.gz differ diff --git a/usr/share/man/ru.UTF-8/man1/vimtutor.1.gz b/usr/share/man/ru.UTF-8/man1/vimtutor.1.gz index 7cdc6006f77..817bbe00888 100644 Binary files a/usr/share/man/ru.UTF-8/man1/vimtutor.1.gz and b/usr/share/man/ru.UTF-8/man1/vimtutor.1.gz differ diff --git a/usr/share/vim/vim91/autoload/dist/ft.vim b/usr/share/vim/vim91/autoload/dist/ft.vim index 214cf6e3ec4..47b2fede177 100644 --- a/usr/share/vim/vim91/autoload/dist/ft.vim +++ b/usr/share/vim/vim91/autoload/dist/ft.vim @@ -3,7 +3,7 @@ vim9script # Vim functions for file type detection # # Maintainer: The Vim Project -# Last Change: 2024 May 23 +# Last Change: 2025 Jan 11 # Former Maintainer: Bram Moolenaar # These functions are moved here from runtime/filetype.vim to make startup @@ -32,6 +32,10 @@ enddef # This function checks for the kind of assembly that is wanted by the user, or # can be detected from the first five lines of the file. export def FTasm() + # tiasm uses `* commment` + if join(getline(1, 10), "\n") =~ '\%(\%(^\|\n\)\*\|Texas Instruments Incorporated\)' + setf tiasm + endif # make sure b:asmsyntax exists if !exists("b:asmsyntax") b:asmsyntax = "" @@ -144,6 +148,14 @@ export def FTcfg() endif enddef +export def FTcl() + if join(getline(1, 4), '') =~ '/\*' + setf opencl + else + setf lisp + endif +enddef + export def FTcls() if exists("g:filetype_cls") exe "setf " .. g:filetype_cls @@ -425,7 +437,7 @@ export def FThtml() while n < 40 && n <= line("$") # Check for Angular - if getline(n) =~ '@\(if\|for\|defer\|switch\)\|\*\(ngIf\|ngFor\|ngSwitch\|ngTemplateOutlet\)\|ng-template\|ng-content\|{{.*}}' + if getline(n) =~ '@\(if\|for\|defer\|switch\)\|\*\(ngIf\|ngFor\|ngSwitch\|ngTemplateOutlet\)\|ng-template\|ng-content' setf htmlangular return endif @@ -888,6 +900,7 @@ export def SetFileTypeSH(name: string, setft = true): string if exists("b:is_sh") unlet b:is_sh endif + return SetFileTypeShell("bash", setft) elseif name =~ '\' || name =~ '\' # Ubuntu links "sh" to "dash", thus it is expected to work the same way b:is_sh = 1 @@ -994,6 +1007,14 @@ export def SQL() endif enddef +export def FTsa() + if join(getline(1, 4), "\n") =~# '\%(^\|\n\);' + setf tiasm + return + endif + setf sather +enddef + # This function checks the first 25 lines of file extension "sc" to resolve # detection between scala and SuperCollider. # NOTE: We don't check for 'Class : Method', as this can easily be confused diff --git a/usr/share/vim/vim91/autoload/dist/vimindent.vim b/usr/share/vim/vim91/autoload/dist/vimindent.vim index 727e98352cc..0681496ae92 100644 --- a/usr/share/vim/vim91/autoload/dist/vimindent.vim +++ b/usr/share/vim/vim91/autoload/dist/vimindent.vim @@ -2,11 +2,12 @@ vim9script # Language: Vim script # Maintainer: github user lacygoill -# Last Change: 2024 Nov 08 +# Last Change: 2024 Dec 26 # # Includes changes from The Vim Project: # - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966) # - 2024 Nov 08: Fix indent after :silent! function (D. Kearns via #16009) +# - 2024 Dec 26: Fix indent for enums (Jim Zhou via #16293) # NOTE: Whenever you change the code, make sure the tests are still passing: # @@ -172,6 +173,7 @@ const MODIFIERS: dict = { def: ['export', 'static'], class: ['export', 'abstract', 'export abstract'], interface: ['export'], + enum: ['export'], } # ... # class: ['export', 'abstract', 'export abstract'], @@ -634,6 +636,7 @@ def Offset( # {{{2 elseif !line_A.isfirst && (line_B->EndsWithLineContinuation() || line_A.text =~ LINE_CONTINUATION_AT_SOL) + && !(line_B->EndsWithComma() && line_A.lnum->IsInside('EnumBlock')) return shiftwidth() endif @@ -1051,6 +1054,22 @@ def ContinuesBelowBracketBlock( # {{{3 enddef def IsInside(lnum: number, syntax: string): bool # {{{3 + if syntax == 'EnumBlock' + var cur_pos = getpos('.') + cursor(lnum, 1) + var enum_pos = search('^\C\s*\%(export\s\)\=\s*enum\s\+\S\+', 'bnW') + var endenum_pos = search('^\C\s*endenum\>', 'bnW') + setpos('.', cur_pos) + + if enum_pos == 0 && endenum_pos == 0 + return false + endif + if (enum_pos > 0 && (endenum_pos == 0 || enum_pos > endenum_pos)) + return true + endif + return false + endif + if !exists('b:vimindent') || !b:vimindent->has_key($'is_{syntax}') return false diff --git a/usr/share/vim/vim91/autoload/gzip.vim b/usr/share/vim/vim91/autoload/gzip.vim index 26b1cda0349..a6fbe2c336e 100644 --- a/usr/share/vim/vim91/autoload/gzip.vim +++ b/usr/share/vim/vim91/autoload/gzip.vim @@ -1,6 +1,6 @@ " Vim autoload file for editing compressed files. " Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Last Change: 2024 Nov 25 " Former Maintainer: Bram Moolenaar " These functions are used by the gzip plugin. @@ -148,6 +148,9 @@ fun gzip#read(cmd) else let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<") endif + if filereadable(undofile(expand("%"))) + exe "sil rundo " . fnameescape(undofile(expand("%"))) + endif if &verbose >= 8 execute "doau BufReadPost " . fname else diff --git a/usr/share/vim/vim91/autoload/netrw.vim b/usr/share/vim/vim91/autoload/netrw.vim index 89aad816f8c..25efab0418f 100644 --- a/usr/share/vim/vim91/autoload/netrw.vim +++ b/usr/share/vim/vim91/autoload/netrw.vim @@ -1,11 +1,11 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION " Maintainer: This runtime file is looking for a new maintainer. -" Date: May 03, 2023 -" Version: 173a +" Date: May 03, 2023 +" Version: 173a " Last Change: {{{1 -" 2023 Nov 21 by Vim Project: ignore wildignore when expanding $COMSPEC (v173a) -" 2023 Nov 22 by Vim Project: fix handling of very long filename on longlist style (v173a) +" 2023 Nov 21 by Vim Project: ignore wildignore when expanding $COMSPEC (v173a) +" 2023 Nov 22 by Vim Project: fix handling of very long filename on longlist style (v173a) " 2024 Feb 19 by Vim Project: (announce adoption) " 2024 Feb 29 by Vim Project: handle symlinks in tree mode correctly " 2024 Apr 03 by Vim Project: detect filetypes for remote edited files @@ -36,8 +36,15 @@ " 2024 Nov 07 by Vim Project: fix a few issues with netrw tree listing (#15996) " 2024 Nov 10 by Vim Project: directory symlink not resolved in tree view (#16020) " 2024 Nov 14 by Vim Project: small fixes to netrw#BrowseX (#16056) +" 2024 Nov 23 by Vim Project: update decompress defaults (#16104) +" 2024 Nov 23 by Vim Project: fix powershell escaping issues (#16094) +" 2024 Dec 04 by Vim Project: do not detach for gvim (#16168) +" 2024 Dec 08 by Vim Project: check the first arg of netrw_browsex_viewer for being executable (#16185) +" 2024 Dec 12 by Vim Project: do not pollute the search history (#16206) +" 2024 Dec 19 by Vim Project: change style (#16248) +" 2024 Dec 20 by Vim Project: change style continued (#16266), fix escaping of # in :Open command (#16265) " }}} -" Former Maintainer: Charles E Campbell +" Former Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, @@ -67,15 +74,15 @@ endif " (netrw will benefit from vim's having patch#656, too) let s:needspatches=[1557,213] if exists("s:needspatches") - for ptch in s:needspatches - if v:version < 704 || (v:version == 704 && !has("patch".ptch)) - if !exists("s:needpatch{ptch}") - unsilent echomsg "***sorry*** this version of netrw requires vim v7.4 with patch#".ptch - endif - let s:needpatch{ptch}= 1 - finish - endif - endfor + for ptch in s:needspatches + if v:version < 704 || (v:version == 704 && !has("patch".ptch)) + if !exists("s:needpatch{ptch}") + unsilent echomsg "***sorry*** this version of netrw requires vim v7.4 with patch#".ptch + endif + let s:needpatch{ptch}= 1 + finish + endif + endfor endif let g:loaded_netrw = "v173" @@ -100,124 +107,124 @@ setl cpo&vim " (this function can optionally take a list of messages) " Dec 2, 2019 : max errnum currently is 106 fun! netrw#ErrorMsg(level,msg,errnum) -" call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) + " call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) if a:level < g:netrw_errorlvl -" call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g:netrw_errorlvl=".g:netrw_errorlvl) - return + " call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g:netrw_errorlvl=".g:netrw_errorlvl) + return endif if a:level == 1 - let level= "**warning** (netrw) " + let level= "**warning** (netrw) " elseif a:level == 2 - let level= "**error** (netrw) " + let level= "**error** (netrw) " else - let level= "**note** (netrw) " + let level= "**note** (netrw) " endif -" call Decho("level=".level,'~'.expand("")) + " call Decho("level=".level,'~'.expand("")) if g:netrw_use_errorwindow == 2 && exists("*popup_atcursor") - " use popup window - if type(a:msg) == 3 - let msg = [level]+a:msg - else - let msg= level.a:msg - endif - let s:popuperr_id = popup_atcursor(msg,{}) - let s:popuperr_text= "" - elseif g:netrw_use_errorwindow - " (default) netrw creates a one-line window to show error/warning - " messages (reliably displayed) - - " record current window number - let s:winBeforeErr= winnr() -" call Decho("s:winBeforeErr=".s:winBeforeErr,'~'.expand("")) - - " getting messages out reliably is just plain difficult! - " This attempt splits the current window, creating a one line window. - if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0 -" call Decho("write to NetrwMessage buffer",'~'.expand("")) - exe bufwinnr("NetrwMessage")."wincmd w" -" call Decho("setl ma noro",'~'.expand("")) - setl ma noro - if type(a:msg) == 3 - for msg in a:msg - NetrwKeepj call setline(line("$")+1,level.msg) - endfor - else - NetrwKeepj call setline(line("$")+1,level.a:msg) - endif - NetrwKeepj $ - else -" call Decho("create a NetrwMessage buffer window",'~'.expand("")) - bo 1split - sil! call s:NetrwEnew() - sil! NetrwKeepj call s:NetrwOptionsSafe(1) - setl bt=nofile - NetrwKeepj file NetrwMessage -" call Decho("setl ma noro",'~'.expand("")) - setl ma noro + " use popup window if type(a:msg) == 3 - for msg in a:msg - NetrwKeepj call setline(line("$")+1,level.msg) - endfor + let msg = [level]+a:msg else - NetrwKeepj call setline(line("$"),level.a:msg) + let msg= level.a:msg + endif + let s:popuperr_id = popup_atcursor(msg,{}) + let s:popuperr_text= "" + elseif g:netrw_use_errorwindow + " (default) netrw creates a one-line window to show error/warning + " messages (reliably displayed) + + " record current window number + let s:winBeforeErr= winnr() + " call Decho("s:winBeforeErr=".s:winBeforeErr,'~'.expand("")) + + " getting messages out reliably is just plain difficult! + " This attempt splits the current window, creating a one line window. + if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0 + " call Decho("write to NetrwMessage buffer",'~'.expand("")) + exe bufwinnr("NetrwMessage")."wincmd w" + " call Decho("setl ma noro",'~'.expand("")) + setl ma noro + if type(a:msg) == 3 + for msg in a:msg + NetrwKeepj call setline(line("$")+1,level.msg) + endfor + else + NetrwKeepj call setline(line("$")+1,level.a:msg) + endif + NetrwKeepj $ + else + " call Decho("create a NetrwMessage buffer window",'~'.expand("")) + bo 1split + sil! call s:NetrwEnew() + sil! NetrwKeepj call s:NetrwOptionsSafe(1) + setl bt=nofile + NetrwKeepj file NetrwMessage + " call Decho("setl ma noro",'~'.expand("")) + setl ma noro + if type(a:msg) == 3 + for msg in a:msg + NetrwKeepj call setline(line("$")+1,level.msg) + endfor + else + NetrwKeepj call setline(line("$"),level.a:msg) + endif + NetrwKeepj $ + endif + " call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr(),'~'.expand("")) + if &fo !~ '[ta]' + syn clear + syn match netrwMesgNote "^\*\*note\*\*" + syn match netrwMesgWarning "^\*\*warning\*\*" + syn match netrwMesgError "^\*\*error\*\*" + hi link netrwMesgWarning WarningMsg + hi link netrwMesgError Error endif - NetrwKeepj $ - endif -" call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr(),'~'.expand("")) - if &fo !~ '[ta]' - syn clear - syn match netrwMesgNote "^\*\*note\*\*" - syn match netrwMesgWarning "^\*\*warning\*\*" - syn match netrwMesgError "^\*\*error\*\*" - hi link netrwMesgWarning WarningMsg - hi link netrwMesgError Error - endif -" call Decho("setl noma ro bh=wipe",'~'.expand("")) - setl ro nomod noma bh=wipe + " call Decho("setl noma ro bh=wipe",'~'.expand("")) + setl ro nomod noma bh=wipe else - " (optional) netrw will show messages using echomsg. Even if the - " message doesn't appear, at least it'll be recallable via :messages -" redraw! - if a:level == s:WARNING - echohl WarningMsg - elseif a:level == s:ERROR - echohl Error - endif + " (optional) netrw will show messages using echomsg. Even if the + " message doesn't appear, at least it'll be recallable via :messages + " redraw! + if a:level == s:WARNING + echohl WarningMsg + elseif a:level == s:ERROR + echohl Error + endif - if type(a:msg) == 3 - for msg in a:msg - unsilent echomsg level.msg - endfor - else - unsilent echomsg level.a:msg - endif + if type(a:msg) == 3 + for msg in a:msg + unsilent echomsg level.msg + endfor + else + unsilent echomsg level.a:msg + endif -" call Decho("echomsg ***netrw*** ".a:msg,'~'.expand("")) - echohl None + " call Decho("echomsg ***netrw*** ".a:msg,'~'.expand("")) + echohl None endif -" call Dret("netrw#ErrorMsg") + " call Dret("netrw#ErrorMsg") endfun " --------------------------------------------------------------------- " s:NetrwInit: initializes variables if they haven't been defined {{{2 " Loosely, varname = value. fun s:NetrwInit(varname,value) -" call Decho("varname<".a:varname."> value=".a:value,'~'.expand("")) + " call Decho("varname<".a:varname."> value=".a:value,'~'.expand("")) if !exists(a:varname) - if type(a:value) == 0 - exe "let ".a:varname."=".a:value - elseif type(a:value) == 1 && a:value =~ '^[{[]' - exe "let ".a:varname."=".a:value - elseif type(a:value) == 1 - exe "let ".a:varname."="."'".a:value."'" - else - exe "let ".a:varname."=".a:value - endif + if type(a:value) == 0 + exe "let ".a:varname."=".a:value + elseif type(a:value) == 1 && a:value =~ '^[{[]' + exe "let ".a:varname."=".a:value + elseif type(a:value) == 1 + exe "let ".a:varname."="."'".a:value."'" + else + exe "let ".a:varname."=".a:value + endif endif endfun @@ -225,11 +232,11 @@ endfun " Netrw Constants: {{{2 call s:NetrwInit("g:netrw_dirhistcnt",0) if !exists("s:LONGLIST") - call s:NetrwInit("s:THINLIST",0) - call s:NetrwInit("s:LONGLIST",1) - call s:NetrwInit("s:WIDELIST",2) - call s:NetrwInit("s:TREELIST",3) - call s:NetrwInit("s:MAXLIST" ,4) + call s:NetrwInit("s:THINLIST",0) + call s:NetrwInit("s:LONGLIST",1) + call s:NetrwInit("s:WIDELIST",2) + call s:NetrwInit("s:TREELIST",3) + call s:NetrwInit("s:MAXLIST" ,4) endif let s:NOTE = 0 @@ -247,63 +254,63 @@ let g:netrw_localmovecmdopt = "" " --------------------------------------------------------------------- " Default values for netrw's global protocol variables {{{2 if exists("*popup_atcursor") -\ && has("syntax") -\ && exists("g:syntax_on") -\ && has("mouse") + \ && has("syntax") + \ && exists("g:syntax_on") + \ && has("mouse") call s:NetrwInit("g:netrw_use_errorwindow",2) else call s:NetrwInit("g:netrw_use_errorwindow",1) endif if !exists("g:netrw_dav_cmd") - if executable("cadaver") - let g:netrw_dav_cmd = "cadaver" - elseif executable("curl") - let g:netrw_dav_cmd = "curl" - else - let g:netrw_dav_cmd = "" - endif + if executable("cadaver") + let g:netrw_dav_cmd = "cadaver" + elseif executable("curl") + let g:netrw_dav_cmd = "curl" + else + let g:netrw_dav_cmd = "" + endif endif if !exists("g:netrw_fetch_cmd") - if executable("fetch") - let g:netrw_fetch_cmd = "fetch -o" - else - let g:netrw_fetch_cmd = "" - endif + if executable("fetch") + let g:netrw_fetch_cmd = "fetch -o" + else + let g:netrw_fetch_cmd = "" + endif endif if !exists("g:netrw_file_cmd") - if executable("elinks") - call s:NetrwInit("g:netrw_file_cmd","elinks") - elseif executable("links") - call s:NetrwInit("g:netrw_file_cmd","links") - endif + if executable("elinks") + call s:NetrwInit("g:netrw_file_cmd","elinks") + elseif executable("links") + call s:NetrwInit("g:netrw_file_cmd","links") + endif endif if !exists("g:netrw_ftp_cmd") - let g:netrw_ftp_cmd = "ftp" + let g:netrw_ftp_cmd = "ftp" endif let s:netrw_ftp_cmd= g:netrw_ftp_cmd if !exists("g:netrw_ftp_options") - let g:netrw_ftp_options= "-i -n" + let g:netrw_ftp_options= "-i -n" endif if !exists("g:netrw_http_cmd") - if executable("wget") - let g:netrw_http_cmd = "wget" - call s:NetrwInit("g:netrw_http_xcmd","-q -O") - elseif executable("curl") - let g:netrw_http_cmd = "curl" - call s:NetrwInit("g:netrw_http_xcmd","-L -o") - elseif executable("elinks") - let g:netrw_http_cmd = "elinks" - call s:NetrwInit("g:netrw_http_xcmd","-source >") - elseif executable("fetch") - let g:netrw_http_cmd = "fetch" - call s:NetrwInit("g:netrw_http_xcmd","-o") - elseif executable("links") - let g:netrw_http_cmd = "links" - call s:NetrwInit("g:netrw_http_xcmd","-http.extra-header ".shellescape("Accept-Encoding: identity", 1)." -source >") - else - let g:netrw_http_cmd = "" - endif + if executable("wget") + let g:netrw_http_cmd = "wget" + call s:NetrwInit("g:netrw_http_xcmd","-q -O") + elseif executable("curl") + let g:netrw_http_cmd = "curl" + call s:NetrwInit("g:netrw_http_xcmd","-L -o") + elseif executable("elinks") + let g:netrw_http_cmd = "elinks" + call s:NetrwInit("g:netrw_http_xcmd","-source >") + elseif executable("fetch") + let g:netrw_http_cmd = "fetch" + call s:NetrwInit("g:netrw_http_xcmd","-o") + elseif executable("links") + let g:netrw_http_cmd = "links" + call s:NetrwInit("g:netrw_http_xcmd","-http.extra-header ".shellescape("Accept-Encoding: identity", 1)." -source >") + else + let g:netrw_http_cmd = "" + endif endif call s:NetrwInit("g:netrw_http_put_cmd","curl -T") call s:NetrwInit("g:netrw_keepj","keepj") @@ -311,37 +318,37 @@ call s:NetrwInit("g:netrw_rcp_cmd" , "rcp") call s:NetrwInit("g:netrw_rsync_cmd", "rsync") call s:NetrwInit("g:netrw_rsync_sep", "/") if !exists("g:netrw_scp_cmd") - if executable("scp") - call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") - elseif executable("pscp") - call s:NetrwInit("g:netrw_scp_cmd", 'pscp -q') - else - call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") - endif + if executable("scp") + call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") + elseif executable("pscp") + call s:NetrwInit("g:netrw_scp_cmd", 'pscp -q') + else + call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") + endif endif call s:NetrwInit("g:netrw_sftp_cmd" , "sftp") call s:NetrwInit("g:netrw_ssh_cmd" , "ssh") if has("win32") - \ && exists("g:netrw_use_nt_rcp") - \ && g:netrw_use_nt_rcp - \ && executable( $SystemRoot .'/system32/rcp.exe') - let s:netrw_has_nt_rcp = 1 - let s:netrw_rcpmode = '-b' + \ && exists("g:netrw_use_nt_rcp") + \ && g:netrw_use_nt_rcp + \ && executable( $SystemRoot .'/system32/rcp.exe') + let s:netrw_has_nt_rcp = 1 + let s:netrw_rcpmode = '-b' else - let s:netrw_has_nt_rcp = 0 - let s:netrw_rcpmode = '' + let s:netrw_has_nt_rcp = 0 + let s:netrw_rcpmode = '' endif " --------------------------------------------------------------------- " Default values for netrw's global variables {{{2 " Cygwin Detection ------- {{{3 if !exists("g:netrw_cygwin") - if has("win32unix") && &shell =~ '\%(\\|\\)\%(\.exe\)\=$' - let g:netrw_cygwin= 1 - else - let g:netrw_cygwin= 0 - endif + if has("win32unix") && &shell =~ '\%(\\|\\)\%(\.exe\)\=$' + let g:netrw_cygwin= 1 + else + let g:netrw_cygwin= 0 + endif endif " Default values - a-c ---------- {{{3 call s:NetrwInit("g:netrw_alto" , &sb) @@ -354,8 +361,8 @@ call s:NetrwInit("g:netrw_clipboard" , 1) call s:NetrwInit("g:netrw_compress" , "gzip") call s:NetrwInit("g:netrw_ctags" , "ctags") if exists("g:netrw_cursorline") && !exists("g:netrw_cursor") - call netrw#ErrorMsg(s:NOTE,'g:netrw_cursorline is deprecated; use g:netrw_cursor instead',77) - let g:netrw_cursor= g:netrw_cursorline + call netrw#ErrorMsg(s:NOTE,'g:netrw_cursorline is deprecated; use g:netrw_cursor instead',77) + let g:netrw_cursor= g:netrw_cursorline endif call s:NetrwInit("g:netrw_cursor" , 2) let s:netrw_usercul = &cursorline @@ -365,125 +372,157 @@ call s:NetrwInit("g:netrw_cygdrive","/cygdrive") " Default values - d-g ---------- {{{3 call s:NetrwInit("s:didstarstar",0) call s:NetrwInit("g:netrw_dirhistcnt" , 0) -call s:NetrwInit("g:netrw_decompress" , '{ ".gz" : "gunzip", ".bz2" : "bunzip2", ".zip" : "unzip", ".tar" : "tar -xf", ".xz" : "unxz" }') +let s:xz_opt = has('unix') ? "XZ_OPT=-T0" : + \ (has("win32") && &shell =~? '\vcmd(\.exe)?$' ? + \ "setx XZ_OPT=-T0 &&" : "") +call s:NetrwInit("g:netrw_decompress ", "{" + \ .."'.lz4': 'lz4 -d'," + \ .."'.lzo': 'lzop -d'," + \ .."'.lz': 'lzip -dk'," + \ .."'.7z': '7za x'," + \ .."'.001': '7za x'," + \ .."'.zip': 'unzip'," + \ .."'.bz': 'bunzip2 -k'," + \ .."'.bz2': 'bunzip2 -k'," + \ .."'.gz': 'gunzip -k'," + \ .."'.lzma': 'unlzma -T0 -k'," + \ .."'.xz': 'unxz -T0 -k'," + \ .."'.zst': 'zstd -T0 -d'," + \ .."'.Z': 'uncompress -k'," + \ .."'.tar': 'tar -xvf'," + \ .."'.tar.bz': 'tar -xvjf'," + \ .."'.tar.bz2': 'tar -xvjf'," + \ .."'.tbz': 'tar -xvjf'," + \ .."'.tbz2': 'tar -xvjf'," + \ .."'.tar.gz': 'tar -xvzf'," + \ .."'.tgz': 'tar -xvzf'," + \ .."'.tar.lzma': '"..s:xz_opt.." tar -xvf --lzma'," + \ .."'.tlz': '"..s:xz_opt.." tar -xvf --lzma'," + \ .."'.tar.xz': '"..s:xz_opt.." tar -xvfJ'," + \ .."'.txz': '"..s:xz_opt.." tar -xvfJ'," + \ .."'.tar.zst': '"..s:xz_opt.." tar -xvf --use-compress-program=unzstd'," + \ .."'.tzst': '"..s:xz_opt.." tar -xvf --use-compress-program=unzstd'," + \ .."'.rar': '"..(executable("unrar")?"unrar x -ad":"rar x -ad").."'" + \ .."}") +unlet s:xz_opt call s:NetrwInit("g:netrw_dirhistmax" , 10) call s:NetrwInit("g:netrw_fastbrowse" , 1) call s:NetrwInit("g:netrw_ftp_browse_reject", '^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$') if !exists("g:netrw_ftp_list_cmd") - if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) - let g:netrw_ftp_list_cmd = "ls -lF" - let g:netrw_ftp_timelist_cmd = "ls -tlF" - let g:netrw_ftp_sizelist_cmd = "ls -slF" - else - let g:netrw_ftp_list_cmd = "dir" - let g:netrw_ftp_timelist_cmd = "dir" - let g:netrw_ftp_sizelist_cmd = "dir" - endif + if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) + let g:netrw_ftp_list_cmd = "ls -lF" + let g:netrw_ftp_timelist_cmd = "ls -tlF" + let g:netrw_ftp_sizelist_cmd = "ls -slF" + else + let g:netrw_ftp_list_cmd = "dir" + let g:netrw_ftp_timelist_cmd = "dir" + let g:netrw_ftp_sizelist_cmd = "dir" + endif endif call s:NetrwInit("g:netrw_ftpmode",'binary') " Default values - h-lh ---------- {{{3 call s:NetrwInit("g:netrw_hide",1) if !exists("g:netrw_ignorenetrc") - if &shell =~ '\c\<\%(cmd\|4nt\)\.exe$' - let g:netrw_ignorenetrc= 1 - else - let g:netrw_ignorenetrc= 0 - endif + if &shell =~ '\c\<\%(cmd\|4nt\)\.exe$' + let g:netrw_ignorenetrc= 1 + else + let g:netrw_ignorenetrc= 0 + endif endif call s:NetrwInit("g:netrw_keepdir",1) if !exists("g:netrw_list_cmd") - if g:netrw_scp_cmd =~ '^pscp' && executable("pscp") - if exists("g:netrw_list_cmd_options") - let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME: ".g:netrw_list_cmd_options - else - let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME:" - endif - elseif executable(g:netrw_ssh_cmd) - " provide a scp-based default listing command - if exists("g:netrw_list_cmd_options") - let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa ".g:netrw_list_cmd_options + if g:netrw_scp_cmd =~ '^pscp' && executable("pscp") + if exists("g:netrw_list_cmd_options") + let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME: ".g:netrw_list_cmd_options + else + let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME:" + endif + elseif executable(g:netrw_ssh_cmd) + " provide a scp-based default listing command + if exists("g:netrw_list_cmd_options") + let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa ".g:netrw_list_cmd_options + else + let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa" + endif else - let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa" + " call Decho(g:netrw_ssh_cmd." is not executable",'~'.expand("")) + let g:netrw_list_cmd= "" endif - else -" call Decho(g:netrw_ssh_cmd." is not executable",'~'.expand("")) - let g:netrw_list_cmd= "" - endif endif call s:NetrwInit("g:netrw_list_hide","") " Default values - lh-lz ---------- {{{3 if exists("g:netrw_local_copycmd") - let g:netrw_localcopycmd= g:netrw_local_copycmd - call netrw#ErrorMsg(s:NOTE,"g:netrw_local_copycmd is deprecated in favor of g:netrw_localcopycmd",84) + let g:netrw_localcopycmd= g:netrw_local_copycmd + call netrw#ErrorMsg(s:NOTE,"g:netrw_local_copycmd is deprecated in favor of g:netrw_localcopycmd",84) endif if !exists("g:netrw_localcmdshell") - let g:netrw_localcmdshell= "" + let g:netrw_localcmdshell= "" endif if !exists("g:netrw_localcopycmd") - if has("win32") - if g:netrw_cygwin - let g:netrw_localcopycmd= "cp" + if has("win32") + if g:netrw_cygwin + let g:netrw_localcopycmd= "cp" + else + let g:netrw_localcopycmd = expand("$COMSPEC", v:true) + let g:netrw_localcopycmdopt= " /c copy" + endif + elseif has("unix") || has("macunix") + let g:netrw_localcopycmd= "cp" else - let g:netrw_localcopycmd = expand("$COMSPEC", v:true) - let g:netrw_localcopycmdopt= " /c copy" + let g:netrw_localcopycmd= "" endif - elseif has("unix") || has("macunix") - let g:netrw_localcopycmd= "cp" - else - let g:netrw_localcopycmd= "" - endif endif if !exists("g:netrw_localcopydircmd") - if has("win32") - if g:netrw_cygwin - let g:netrw_localcopydircmd = "cp" - let g:netrw_localcopydircmdopt= " -R" - else - let g:netrw_localcopydircmd = expand("$COMSPEC", v:true) - let g:netrw_localcopydircmdopt= " /c xcopy /e /c /h /i /k" - endif - elseif has("unix") - let g:netrw_localcopydircmd = "cp" - let g:netrw_localcopydircmdopt= " -R" - elseif has("macunix") - let g:netrw_localcopydircmd = "cp" - let g:netrw_localcopydircmdopt= " -R" - else - let g:netrw_localcopydircmd= "" - endif + if has("win32") + if g:netrw_cygwin + let g:netrw_localcopydircmd = "cp" + let g:netrw_localcopydircmdopt= " -R" + else + let g:netrw_localcopydircmd = expand("$COMSPEC", v:true) + let g:netrw_localcopydircmdopt= " /c xcopy /e /c /h /i /k" + endif + elseif has("unix") + let g:netrw_localcopydircmd = "cp" + let g:netrw_localcopydircmdopt= " -R" + elseif has("macunix") + let g:netrw_localcopydircmd = "cp" + let g:netrw_localcopydircmdopt= " -R" + else + let g:netrw_localcopydircmd= "" + endif endif if exists("g:netrw_local_mkdir") - let g:netrw_localmkdir= g:netrw_local_mkdir - call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87) + let g:netrw_localmkdir= g:netrw_local_mkdir + call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87) endif if has("win32") if g:netrw_cygwin - call s:NetrwInit("g:netrw_localmkdir","mkdir") + call s:NetrwInit("g:netrw_localmkdir","mkdir") else - let g:netrw_localmkdir = expand("$COMSPEC", v:true) - let g:netrw_localmkdiropt= " /c mkdir" + let g:netrw_localmkdir = expand("$COMSPEC", v:true) + let g:netrw_localmkdiropt= " /c mkdir" endif else - call s:NetrwInit("g:netrw_localmkdir","mkdir") + call s:NetrwInit("g:netrw_localmkdir","mkdir") endif call s:NetrwInit("g:netrw_remote_mkdir","mkdir") if exists("g:netrw_local_movecmd") - let g:netrw_localmovecmd= g:netrw_local_movecmd - call netrw#ErrorMsg(s:NOTE,"g:netrw_local_movecmd is deprecated in favor of g:netrw_localmovecmd",88) + let g:netrw_localmovecmd= g:netrw_local_movecmd + call netrw#ErrorMsg(s:NOTE,"g:netrw_local_movecmd is deprecated in favor of g:netrw_localmovecmd",88) endif if !exists("g:netrw_localmovecmd") - if has("win32") - if g:netrw_cygwin - let g:netrw_localmovecmd= "mv" + if has("win32") + if g:netrw_cygwin + let g:netrw_localmovecmd= "mv" + else + let g:netrw_localmovecmd = expand("$COMSPEC", v:true) + let g:netrw_localmovecmdopt= " /c move" + endif + elseif has("unix") || has("macunix") + let g:netrw_localmovecmd= "mv" else - let g:netrw_localmovecmd = expand("$COMSPEC", v:true) - let g:netrw_localmovecmdopt= " /c move" + let g:netrw_localmovecmd= "" endif - elseif has("unix") || has("macunix") - let g:netrw_localmovecmd= "mv" - else - let g:netrw_localmovecmd= "" - endif endif " following serves as an example for how to insert a version&patch specific test "if v:version < 704 || (v:version == 704 && !has("patch1107")) @@ -491,10 +530,10 @@ endif call s:NetrwInit("g:netrw_liststyle" , s:THINLIST) " sanity checks if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST - let g:netrw_liststyle= s:THINLIST + let g:netrw_liststyle= s:THINLIST endif if g:netrw_liststyle == s:LONGLIST && g:netrw_scp_cmd !~ '^pscp' - let g:netrw_list_cmd= g:netrw_list_cmd." -l" + let g:netrw_list_cmd= g:netrw_list_cmd." -l" endif " Default values - m-r ---------- {{{3 call s:NetrwInit("g:netrw_markfileesc" , '*./[\~') @@ -504,11 +543,11 @@ call s:NetrwInit("g:netrw_mkdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mk call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~# '[anh]')) call s:NetrwInit("g:netrw_retmap" , 0) if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) - call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") + call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") elseif has("win32") - call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM") + call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM") else - call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") + call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") endif call s:NetrwInit("g:netrw_preview" , 0) call s:NetrwInit("g:netrw_scpport" , "-P") @@ -521,29 +560,29 @@ call s:NetrwInit("g:netrw_rmf_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm " Default values - q-s ---------- {{{3 call s:NetrwInit("g:netrw_quickhelp",0) let s:QuickHelp= ["-:go up dir D:delete R:rename s:sort-by x:special", - \ "(create new) %:file d:directory", - \ "(windows split&open) o:horz v:vert p:preview", - \ "i:style qf:file info O:obtain r:reverse", - \ "(marks) mf:mark file mt:set target mm:move mc:copy", - \ "(bookmarks) mb:make mB:delete qb:list gb:go to", - \ "(history) qb:list u:go up U:go down", - \ "(targets) mt:target Tb:use bookmark Th:use history"] + \ "(create new) %:file d:directory", + \ "(windows split&open) o:horz v:vert p:preview", + \ "i:style qf:file info O:obtain r:reverse", + \ "(marks) mf:mark file mt:set target mm:move mc:copy", + \ "(bookmarks) mb:make mB:delete qb:list gb:go to", + \ "(history) qb:list u:go up U:go down", + \ "(targets) mt:target Tb:use bookmark Th:use history"] " g:netrw_sepchr: picking a character that doesn't appear in filenames that can be used to separate priority from filename call s:NetrwInit("g:netrw_sepchr" , (&enc == "euc-jp")? "\" : "\") if !exists("g:netrw_keepj") || g:netrw_keepj == "keepj" - call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil keepj " : "keepj ") + call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil keepj " : "keepj ") else - call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil " : " ") + call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil " : " ") endif call s:NetrwInit("g:netrw_sort_by" , "name") " alternatives: date , size call s:NetrwInit("g:netrw_sort_options" , "") call s:NetrwInit("g:netrw_sort_direction", "normal") " alternative: reverse (z y x ...) if !exists("g:netrw_sort_sequence") - if has("unix") - let g:netrw_sort_sequence= '[\/]$,\,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$' - else - let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$' - endif + if has("unix") + let g:netrw_sort_sequence= '[\/]$,\,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$' + else + let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$' + endif endif call s:NetrwInit("g:netrw_special_syntax" , 0) call s:NetrwInit("g:netrw_ssh_browse_reject", '^total\s\+\d\+$') @@ -552,15 +591,15 @@ call s:NetrwInit("g:netrw_sizestyle" ,"b") " Default values - t-w ---------- {{{3 call s:NetrwInit("g:netrw_timefmt","%c") if !exists("g:netrw_xstrlen") - if exists("g:Align_xstrlen") - let g:netrw_xstrlen= g:Align_xstrlen - elseif exists("g:drawit_xstrlen") - let g:netrw_xstrlen= g:drawit_xstrlen - elseif &enc == "latin1" || !has("multi_byte") - let g:netrw_xstrlen= 0 - else - let g:netrw_xstrlen= 1 - endif + if exists("g:Align_xstrlen") + let g:netrw_xstrlen= g:Align_xstrlen + elseif exists("g:drawit_xstrlen") + let g:netrw_xstrlen= g:drawit_xstrlen + elseif &enc == "latin1" || !has("multi_byte") + let g:netrw_xstrlen= 0 + else + let g:netrw_xstrlen= 1 + endif endif call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.") call s:NetrwInit("g:netrw_winsize",50) @@ -570,50 +609,50 @@ if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif " Default values for netrw's script variables: {{{2 call s:NetrwInit("g:netrw_fname_escape",' ?&;%') if has("win32") - call s:NetrwInit("g:netrw_glob_escape",'*?`{[]$') + call s:NetrwInit("g:netrw_glob_escape",'*?`{[]$') else - call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\') + call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\') endif call s:NetrwInit("g:netrw_menu_escape",'.&? \') call s:NetrwInit("g:netrw_tmpfile_escape",' &;') call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\\"") if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4') - let s:treedepthstring= "│ " + let s:treedepthstring= "│ " else - let s:treedepthstring= "| " + let s:treedepthstring= "| " endif call s:NetrwInit("s:netrw_posn",'{}') " BufEnter event ignored by decho when following variable is true " Has a side effect that doau BufReadPost doesn't work, so " files read by network transfer aren't appropriately highlighted. -"let g:decho_bufenter = 1 "Decho +"let g:decho_bufenter = 1 "Decho " ====================== " Netrw Initialization: {{{1 " ====================== if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on") -" call Decho("installed beval events",'~'.expand("")) - let &l:bexpr = "netrw#BalloonHelp()" -" call Decho("&l:bexpr<".&l:bexpr."> buf#".bufnr()) - au FileType netrw setl beval - au WinLeave * if &ft == "netrw" && exists("s:initbeval")|let &beval= s:initbeval|endif - au VimEnter * let s:initbeval= &beval -"else " Decho -" if v:version < 700 | call Decho("did not install beval events: v:version=".v:version." < 700","~".expand("")) | endif -" if !has("balloon_eval") | call Decho("did not install beval events: does not have balloon_eval","~".expand("")) | endif -" if exists("s:initbeval") | call Decho("did not install beval events: s:initbeval exists","~".expand("")) | endif -" if exists("g:netrw_nobeval") | call Decho("did not install beval events: g:netrw_nobeval exists","~".expand("")) | endif -" if !has("syntax") | call Decho("did not install beval events: does not have syntax highlighting","~".expand("")) | endif -" if exists("g:syntax_on") | call Decho("did not install beval events: g:syntax_on exists","~".expand("")) | endif + " call Decho("installed beval events",'~'.expand("")) + let &l:bexpr = "netrw#BalloonHelp()" + " call Decho("&l:bexpr<".&l:bexpr."> buf#".bufnr()) + au FileType netrw setl beval + au WinLeave * if &ft == "netrw" && exists("s:initbeval")|let &beval= s:initbeval|endif + au VimEnter * let s:initbeval= &beval + "else " Decho + " if v:version < 700 | call Decho("did not install beval events: v:version=".v:version." < 700","~".expand("")) | endif + " if !has("balloon_eval") | call Decho("did not install beval events: does not have balloon_eval","~".expand("")) | endif + " if exists("s:initbeval") | call Decho("did not install beval events: s:initbeval exists","~".expand("")) | endif + " if exists("g:netrw_nobeval") | call Decho("did not install beval events: g:netrw_nobeval exists","~".expand("")) | endif + " if !has("syntax") | call Decho("did not install beval events: does not have syntax highlighting","~".expand("")) | endif + " if exists("g:syntax_on") | call Decho("did not install beval events: g:syntax_on exists","~".expand("")) | endif endif -au WinEnter * if &ft == "netrw"|call s:NetrwInsureWinVars()|endif +au WinEnter * if &ft == "netrw"|call s:NetrwInsureWinVars()|endif if g:netrw_keepj =~# "keepj" - com! -nargs=* NetrwKeepj keepj + com! -nargs=* NetrwKeepj keepj else - let g:netrw_keepj= "" - com! -nargs=* NetrwKeepj + let g:netrw_keepj= "" + com! -nargs=* NetrwKeepj endif " ============================== @@ -623,49 +662,49 @@ endif " --------------------------------------------------------------------- " netrw#BalloonHelp: {{{2 if v:version >= 700 && has("balloon_eval") && has("syntax") && exists("g:syntax_on") && !exists("g:netrw_nobeval") -" call Decho("loading netrw#BalloonHelp()",'~'.expand("")) - fun! netrw#BalloonHelp() - if &ft != "netrw" - return "" - endif - if exists("s:popuperr_id") && popup_getpos(s:popuperr_id) != {} - " popup error window is still showing - " s:pouperr_id and s:popuperr_text are set up in netrw#ErrorMsg() - if exists("s:popuperr_text") && s:popuperr_text != "" && v:beval_text != s:popuperr_text - " text under mouse hasn't changed; only close window when it changes - call popup_close(s:popuperr_id) - unlet s:popuperr_text - else - let s:popuperr_text= v:beval_text - endif - let mesg= "" - elseif !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval) - let mesg= "" - elseif v:beval_text == "Netrw" || v:beval_text == "Directory" || v:beval_text == "Listing" - let mesg = "i: thin-long-wide-tree gh: quick hide/unhide of dot-files qf: quick file info %:open new file" - elseif getline(v:beval_lnum) =~ '^"\s*/' - let mesg = ": edit/enter o: edit/enter in horiz window t: edit/enter in new tab v:edit/enter in vert window" - elseif v:beval_text == "Sorted" || v:beval_text == "by" - let mesg = 's: sort by name, time, file size, extension r: reverse sorting order mt: mark target' - elseif v:beval_text == "Sort" || v:beval_text == "sequence" - let mesg = "S: edit sorting sequence" - elseif v:beval_text == "Hiding" || v:beval_text == "Showing" - let mesg = "a: hiding-showing-all ctrl-h: editing hiding list mh: hide/show by suffix" - elseif v:beval_text == "Quick" || v:beval_text == "Help" - let mesg = "Help: press " - elseif v:beval_text == "Copy/Move" || v:beval_text == "Tgt" - let mesg = "mt: mark target mc: copy marked file to target mm: move marked file to target" - else - let mesg= "" - endif - return mesg - endfun -"else " Decho -" if v:version < 700 |call Decho("did not load netrw#BalloonHelp(): vim version ".v:version." < 700 -","~".expand(""))|endif -" if !has("balloon_eval") |call Decho("did not load netrw#BalloonHelp(): does not have balloon eval","~".expand("")) |endif -" if !has("syntax") |call Decho("did not load netrw#BalloonHelp(): syntax disabled","~".expand("")) |endif -" if !exists("g:syntax_on") |call Decho("did not load netrw#BalloonHelp(): g:syntax_on n/a","~".expand("")) |endif -" if exists("g:netrw_nobeval") |call Decho("did not load netrw#BalloonHelp(): g:netrw_nobeval exists","~".expand("")) |endif + " call Decho("loading netrw#BalloonHelp()",'~'.expand("")) + fun! netrw#BalloonHelp() + if &ft != "netrw" + return "" + endif + if exists("s:popuperr_id") && popup_getpos(s:popuperr_id) != {} + " popup error window is still showing + " s:pouperr_id and s:popuperr_text are set up in netrw#ErrorMsg() + if exists("s:popuperr_text") && s:popuperr_text != "" && v:beval_text != s:popuperr_text + " text under mouse hasn't changed; only close window when it changes + call popup_close(s:popuperr_id) + unlet s:popuperr_text + else + let s:popuperr_text= v:beval_text + endif + let mesg= "" + elseif !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval) + let mesg= "" + elseif v:beval_text == "Netrw" || v:beval_text == "Directory" || v:beval_text == "Listing" + let mesg = "i: thin-long-wide-tree gh: quick hide/unhide of dot-files qf: quick file info %:open new file" + elseif getline(v:beval_lnum) =~ '^"\s*/' + let mesg = ": edit/enter o: edit/enter in horiz window t: edit/enter in new tab v:edit/enter in vert window" + elseif v:beval_text == "Sorted" || v:beval_text == "by" + let mesg = 's: sort by name, time, file size, extension r: reverse sorting order mt: mark target' + elseif v:beval_text == "Sort" || v:beval_text == "sequence" + let mesg = "S: edit sorting sequence" + elseif v:beval_text == "Hiding" || v:beval_text == "Showing" + let mesg = "a: hiding-showing-all ctrl-h: editing hiding list mh: hide/show by suffix" + elseif v:beval_text == "Quick" || v:beval_text == "Help" + let mesg = "Help: press " + elseif v:beval_text == "Copy/Move" || v:beval_text == "Tgt" + let mesg = "mt: mark target mc: copy marked file to target mm: move marked file to target" + else + let mesg= "" + endif + return mesg + endfun + "else " Decho + " if v:version < 700 |call Decho("did not load netrw#BalloonHelp(): vim version ".v:version." < 700 -","~".expand(""))|endif + " if !has("balloon_eval") |call Decho("did not load netrw#BalloonHelp(): does not have balloon eval","~".expand("")) |endif + " if !has("syntax") |call Decho("did not load netrw#BalloonHelp(): syntax disabled","~".expand("")) |endif + " if !exists("g:syntax_on") |call Decho("did not load netrw#BalloonHelp(): g:syntax_on n/a","~".expand("")) |endif + " if exists("g:netrw_nobeval") |call Decho("did not load netrw#BalloonHelp(): g:netrw_nobeval exists","~".expand("")) |endif endif " ------------------------------------------------------------------------ @@ -687,39 +726,39 @@ endif " == 6: Texplore fun! netrw#Explore(indx,dosplit,style,...) if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() + let b:netrw_curdir= getcwd() endif " record current file for Rexplore's benefit if &ft != "netrw" - let w:netrw_rexfile= expand("%:p") + let w:netrw_rexfile= expand("%:p") endif " record current directory let curdir = simplify(b:netrw_curdir) let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') if !exists("g:netrw_cygwin") && has("win32") - let curdir= substitute(curdir,'\','/','g') + let curdir= substitute(curdir,'\','/','g') endif " using completion, directories with spaces in their names (thanks, Bill Gates, for a truly dumb idea) " will end up with backslashes here. Solution: strip off backslashes that precede white space and " try Explore again. if a:0 > 0 - if a:1 =~ "\\\s" && !filereadable(s:NetrwFile(a:1)) && !isdirectory(s:NetrwFile(a:1)) - let a1 = substitute(a:1, '\\\(\s\)', '\1', 'g') - if a1 != a:1 - call netrw#Explore(a:indx, a:dosplit, a:style, a1) - return + if a:1 =~ "\\\s" && !filereadable(s:NetrwFile(a:1)) && !isdirectory(s:NetrwFile(a:1)) + let a1 = substitute(a:1, '\\\(\s\)', '\1', 'g') + if a1 != a:1 + call netrw#Explore(a:indx, a:dosplit, a:style, a1) + return + endif endif - endif endif " save registers if has("clipboard") && g:netrw_clipboard -" call Decho("(netrw#Explore) save @* and @+",'~'.expand("")) - sil! let keepregstar = @* - sil! let keepregplus = @+ + " call Decho("(netrw#Explore) save @* and @+",'~'.expand("")) + sil! let keepregstar = @* + sil! let keepregplus = @+ endif sil! let keepregslash= @/ @@ -727,138 +766,138 @@ fun! netrw#Explore(indx,dosplit,style,...) " -or- file has been modified AND file not hidden when abandoned " -or- Texplore used if a:dosplit || (&modified && &hidden == 0 && &bufhidden != "hide") || a:style == 6 - call s:SaveWinVars() - let winsz= g:netrw_winsize - if a:indx > 0 - let winsz= a:indx - endif - - if a:style == 0 " Explore, Sexplore - let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz - if winsz == 0|let winsz= ""|endif - exe "noswapfile ".(g:netrw_alto ? "below " : "above ").winsz."wincmd s" + call s:SaveWinVars() + let winsz= g:netrw_winsize + if a:indx > 0 + let winsz= a:indx + endif - elseif a:style == 1 " Explore!, Sexplore! - let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz - if winsz == 0|let winsz= ""|endif - exe "keepalt noswapfile ".(g:netrw_altv ? "rightbelow " : "leftabove ").winsz."wincmd v" + if a:style == 0 " Explore, Sexplore + let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz + if winsz == 0|let winsz= ""|endif + exe "noswapfile ".(g:netrw_alto ? "below " : "above ").winsz."wincmd s" - elseif a:style == 2 " Hexplore - let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz - if winsz == 0|let winsz= ""|endif - exe "keepalt noswapfile ".(g:netrw_alto ? "below " : "above ").winsz."wincmd s" + elseif a:style == 1 " Explore!, Sexplore! + let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz + if winsz == 0|let winsz= ""|endif + exe "keepalt noswapfile ".(g:netrw_altv ? "rightbelow " : "leftabove ").winsz."wincmd v" - elseif a:style == 3 " Hexplore! - let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz - if winsz == 0|let winsz= ""|endif - exe "keepalt noswapfile ".(!g:netrw_alto ? "below " : "above ").winsz."wincmd s" + elseif a:style == 2 " Hexplore + let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz + if winsz == 0|let winsz= ""|endif + exe "keepalt noswapfile ".(g:netrw_alto ? "below " : "above ").winsz."wincmd s" - elseif a:style == 4 " Vexplore - let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz - if winsz == 0|let winsz= ""|endif - exe "keepalt noswapfile ".(g:netrw_altv ? "rightbelow " : "leftabove ").winsz."wincmd v" + elseif a:style == 3 " Hexplore! + let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz + if winsz == 0|let winsz= ""|endif + exe "keepalt noswapfile ".(!g:netrw_alto ? "below " : "above ").winsz."wincmd s" - elseif a:style == 5 " Vexplore! - let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz - if winsz == 0|let winsz= ""|endif - exe "keepalt noswapfile ".(!g:netrw_altv ? "rightbelow " : "leftabove ").winsz."wincmd v" + elseif a:style == 4 " Vexplore + let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz + if winsz == 0|let winsz= ""|endif + exe "keepalt noswapfile ".(g:netrw_altv ? "rightbelow " : "leftabove ").winsz."wincmd v" - elseif a:style == 6 " Texplore - call s:SaveBufVars() - exe "keepalt tabnew ".fnameescape(curdir) - call s:RestoreBufVars() - endif - call s:RestoreWinVars() + elseif a:style == 5 " Vexplore! + let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz + if winsz == 0|let winsz= ""|endif + exe "keepalt noswapfile ".(!g:netrw_altv ? "rightbelow " : "leftabove ").winsz."wincmd v" + + elseif a:style == 6 " Texplore + call s:SaveBufVars() + exe "keepalt tabnew ".fnameescape(curdir) + call s:RestoreBufVars() + endif + call s:RestoreWinVars() endif NetrwKeepj norm! 0 if a:0 > 0 - if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)) - let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),'')) - elseif a:1 == '.' - let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd()) - if dirname !~ '/$' - let dirname= dirname."/" - endif - elseif a:1 =~ '\$' - let dirname= simplify(expand(a:1)) - elseif a:1 !~ '^\*\{1,2}/' && a:1 !~ '^\a\{3,}://' - let dirname= simplify(a:1) - else - let dirname= a:1 - endif - else - " clear explore - call s:NetrwClearExplore() - return + if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)) + let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),'')) + elseif a:1 == '.' + let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd()) + if dirname !~ '/$' + let dirname= dirname."/" + endif + elseif a:1 =~ '\$' + let dirname= simplify(expand(a:1)) + elseif a:1 !~ '^\*\{1,2}/' && a:1 !~ '^\a\{3,}://' + let dirname= simplify(a:1) + else + let dirname= a:1 + endif + else + " clear explore + call s:NetrwClearExplore() + return endif if dirname =~ '\.\./\=$' - let dirname= simplify(fnamemodify(dirname,':p:h')) + let dirname= simplify(fnamemodify(dirname,':p:h')) elseif dirname =~ '\.\.' || dirname == '.' - let dirname= simplify(fnamemodify(dirname,':p')) + let dirname= simplify(fnamemodify(dirname,':p')) endif if dirname =~ '^\*//' - " starpat=1: Explore *//pattern (current directory only search for files containing pattern) - let pattern= substitute(dirname,'^\*//\(.*\)$','\1','') - let starpat= 1 - if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + " starpat=1: Explore *//pattern (current directory only search for files containing pattern) + let pattern= substitute(dirname,'^\*//\(.*\)$','\1','') + let starpat= 1 + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif elseif dirname =~ '^\*\*//' - " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) - let pattern= substitute(dirname,'^\*\*//','','') - let starpat= 2 + " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) + let pattern= substitute(dirname,'^\*\*//','','') + let starpat= 2 elseif dirname =~ '/\*\*/' - " handle .../**/.../filepat - let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','') - if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && has("win32")) - let b:netrw_curdir = prefixdir - else - let b:netrw_curdir= getcwd().'/'.prefixdir - endif - let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','') - let starpat= 4 + " handle .../**/.../filepat + let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','') + if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && has("win32")) + let b:netrw_curdir = prefixdir + else + let b:netrw_curdir= getcwd().'/'.prefixdir + endif + let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','') + let starpat= 4 elseif dirname =~ '^\*/' - " case starpat=3: Explore */filepat (search in current directory for filenames matching filepat) - let starpat= 3 + " case starpat=3: Explore */filepat (search in current directory for filenames matching filepat) + let starpat= 3 elseif dirname=~ '^\*\*/' - " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) - let starpat= 4 + " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) + let starpat= 4 else - let starpat= 0 + let starpat= 0 endif if starpat == 0 && a:indx >= 0 - " [Explore Hexplore Vexplore Sexplore] [dirname] - if dirname == "" - let dirname= curfiledir - endif - if dirname =~# '^scp://' || dirname =~ '^ftp://' - call netrw#Nread(2,dirname) - else + " [Explore Hexplore Vexplore Sexplore] [dirname] if dirname == "" - let dirname= getcwd() - elseif has("win32") && !g:netrw_cygwin - " Windows : check for a drive specifier, or else for a remote share name ('\\Foo' or '//Foo', - " depending on whether backslashes have been converted to forward slashes by earlier code). - if dirname !~ '^[a-zA-Z]:' && dirname !~ '^\\\\\w\+' && dirname !~ '^//\w\+' - let dirname= b:netrw_curdir."/".dirname - endif - elseif dirname !~ '^/' - let dirname= b:netrw_curdir."/".dirname - endif - call netrw#LocalBrowseCheck(dirname) - endif - if exists("w:netrw_bannercnt") - " done to handle P08-Ingelrest. :Explore will _Always_ go to the line just after the banner. - " If one wants to return the same place in the netrw window, use :Rex instead. - exe w:netrw_bannercnt - endif + let dirname= curfiledir + endif + if dirname =~# '^scp://' || dirname =~ '^ftp://' + call netrw#Nread(2,dirname) + else + if dirname == "" + let dirname= getcwd() + elseif has("win32") && !g:netrw_cygwin + " Windows : check for a drive specifier, or else for a remote share name ('\\Foo' or '//Foo', + " depending on whether backslashes have been converted to forward slashes by earlier code). + if dirname !~ '^[a-zA-Z]:' && dirname !~ '^\\\\\w\+' && dirname !~ '^//\w\+' + let dirname= b:netrw_curdir."/".dirname + endif + elseif dirname !~ '^/' + let dirname= b:netrw_curdir."/".dirname + endif + call netrw#LocalBrowseCheck(dirname) + endif + if exists("w:netrw_bannercnt") + " done to handle P08-Ingelrest. :Explore will _Always_ go to the line just after the banner. + " If one wants to return the same place in the netrw window, use :Rex instead. + exe w:netrw_bannercnt + endif " starpat=1: Explore *//pattern (current directory only search for files containing pattern) @@ -866,214 +905,214 @@ fun! netrw#Explore(indx,dosplit,style,...) " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) elseif a:indx <= 0 - " Nexplore, Pexplore, Explore: handle starpat - if !mapcheck("","n") && !mapcheck("","n") && exists("b:netrw_curdir") - let s:didstarstar= 1 - nnoremap :Pexplore - nnoremap :Nexplore - endif - - if has("path_extra") - if !exists("w:netrw_explore_indx") - let w:netrw_explore_indx= 0 + " Nexplore, Pexplore, Explore: handle starpat + if !mapcheck("","n") && !mapcheck("","n") && exists("b:netrw_curdir") + let s:didstarstar= 1 + nnoremap :Pexplore + nnoremap :Nexplore endif - let indx = a:indx + if has("path_extra") + if !exists("w:netrw_explore_indx") + let w:netrw_explore_indx= 0 + endif - if indx == -1 - " Nexplore - if !exists("w:netrw_explore_list") " sanity check - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or improperly; see help for netrw-starstar",40) - if has("clipboard") && g:netrw_clipboard - if @* != keepregstar | sil! let @* = keepregstar | endif - if @+ != keepregplus | sil! let @+ = keepregplus | endif + let indx = a:indx + + if indx == -1 + " Nexplore + if !exists("w:netrw_explore_list") " sanity check + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or improperly; see help for netrw-starstar",40) + if has("clipboard") && g:netrw_clipboard + if @* != keepregstar | sil! let @* = keepregstar | endif + if @+ != keepregplus | sil! let @+ = keepregplus | endif + endif + sil! let @/ = keepregslash + return + endif + let indx= w:netrw_explore_indx + if indx < 0 | let indx= 0 | endif + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif + let curfile= w:netrw_explore_list[indx] + while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx] + let indx= indx + 1 + endwhile + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif + + elseif indx == -2 + " Pexplore + if !exists("w:netrw_explore_list") " sanity check + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or improperly; see help for netrw-starstar",41) + if has("clipboard") && g:netrw_clipboard + if @* != keepregstar | sil! let @* = keepregstar | endif + if @+ != keepregplus | sil! let @+ = keepregplus | endif + endif + sil! let @/ = keepregslash + return + endif + let indx= w:netrw_explore_indx + if indx < 0 | let indx= 0 | endif + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif + let curfile= w:netrw_explore_list[indx] + while indx >= 0 && curfile == w:netrw_explore_list[indx] + let indx= indx - 1 + endwhile + if indx < 0 | let indx= 0 | endif + + else + " Explore -- initialize + " build list of files to Explore with Nexplore/Pexplore + NetrwKeepj keepalt call s:NetrwClearExplore() + let w:netrw_explore_indx= 0 + if !exists("b:netrw_curdir") + let b:netrw_curdir= getcwd() + endif + + " switch on starpat to build the w:netrw_explore_list of files + if starpat == 1 + " starpat=1: Explore *//pattern (current directory only search for files containing pattern) + try + exe "NetrwKeepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*" + catch /^Vim\%((\a\+)\)\=:E480/ + keepalt call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pattern.">",76) + return + endtry + let w:netrw_explore_list = s:NetrwExploreListUniq(map(getqflist(),'bufname(v:val.bufnr)')) + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + + elseif starpat == 2 + " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) + try + exe "sil NetrwKeepj noautocmd keepalt vimgrep /".pattern."/gj "."**/*" + catch /^Vim\%((\a\+)\)\=:E480/ + keepalt call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45) + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + if has("clipboard") && g:netrw_clipboard + if @* != keepregstar | sil! let @* = keepregstar | endif + if @+ != keepregplus | sil! let @+ = keepregplus | endif + endif + sil! let @/ = keepregslash + return + endtry + let s:netrw_curdir = b:netrw_curdir + let w:netrw_explore_list = getqflist() + let w:netrw_explore_list = s:NetrwExploreListUniq(map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)')) + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + + elseif starpat == 3 + " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) + let filepat= substitute(dirname,'^\*/','','') + let filepat= substitute(filepat,'^[%#<]','\\&','') + let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".filepat),'\n')) + if &hls | let keepregslash= s:ExplorePatHls(filepat) | endif + + elseif starpat == 4 + " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) + let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".dirname),'\n')) + if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif + endif " switch on starpat to build w:netrw_explore_list + + let w:netrw_explore_listlen = len(w:netrw_explore_list) + + if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/') + keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"no files matched",42) + if has("clipboard") && g:netrw_clipboard + if @* != keepregstar | sil! let @* = keepregstar | endif + if @+ != keepregplus | sil! let @+ = keepregplus | endif + endif + sil! let @/ = keepregslash + return + endif + endif " if indx ... endif + + " NetrwStatusLine support - for exploring support + let w:netrw_explore_indx= indx + + " wrap the indx around, but issue a note + if indx >= w:netrw_explore_listlen || indx < 0 + let indx = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0 + let w:netrw_explore_indx= indx + keepalt NetrwKeepj call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43) endif - sil! let @/ = keepregslash - return - endif - let indx= w:netrw_explore_indx - if indx < 0 | let indx= 0 | endif - if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif - let curfile= w:netrw_explore_list[indx] - while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx] - let indx= indx + 1 - endwhile - if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif - - elseif indx == -2 - " Pexplore - if !exists("w:netrw_explore_list") " sanity check - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or improperly; see help for netrw-starstar",41) - if has("clipboard") && g:netrw_clipboard - if @* != keepregstar | sil! let @* = keepregstar | endif - if @+ != keepregplus | sil! let @+ = keepregplus | endif + + exe "let dirfile= w:netrw_explore_list[".indx."]" + let newdir= substitute(dirfile,'/[^/]*$','','e') + + call netrw#LocalBrowseCheck(newdir) + if !exists("w:netrw_liststyle") + let w:netrw_liststyle= g:netrw_liststyle + endif + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST + keepalt NetrwKeepj call search('^'.substitute(dirfile,"^.*/","","").'\>',"W") + else + keepalt NetrwKeepj call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w") + endif + let w:netrw_explore_mtchcnt = indx + 1 + let w:netrw_explore_bufnr = bufnr("%") + let w:netrw_explore_line = line(".") + keepalt NetrwKeepj call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}') + + else + if !exists("g:netrw_quiet") + keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44) endif - sil! let @/ = keepregslash - return - endif - let indx= w:netrw_explore_indx - if indx < 0 | let indx= 0 | endif - if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif - let curfile= w:netrw_explore_list[indx] - while indx >= 0 && curfile == w:netrw_explore_list[indx] - let indx= indx - 1 - endwhile - if indx < 0 | let indx= 0 | endif - - else - " Explore -- initialize - " build list of files to Explore with Nexplore/Pexplore - NetrwKeepj keepalt call s:NetrwClearExplore() - let w:netrw_explore_indx= 0 - if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() - endif - - " switch on starpat to build the w:netrw_explore_list of files - if starpat == 1 - " starpat=1: Explore *//pattern (current directory only search for files containing pattern) - try - exe "NetrwKeepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*" - catch /^Vim\%((\a\+)\)\=:E480/ - keepalt call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pattern.">",76) - return - endtry - let w:netrw_explore_list = s:NetrwExploreListUniq(map(getqflist(),'bufname(v:val.bufnr)')) - if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif - - elseif starpat == 2 - " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) - try - exe "sil NetrwKeepj noautocmd keepalt vimgrep /".pattern."/gj "."**/*" - catch /^Vim\%((\a\+)\)\=:E480/ - keepalt call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45) - if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif - if has("clipboard") && g:netrw_clipboard - if @* != keepregstar | sil! let @* = keepregstar | endif - if @+ != keepregplus | sil! let @+ = keepregplus | endif - endif - sil! let @/ = keepregslash - return - endtry - let s:netrw_curdir = b:netrw_curdir - let w:netrw_explore_list = getqflist() - let w:netrw_explore_list = s:NetrwExploreListUniq(map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)')) - if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif - - elseif starpat == 3 - " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) - let filepat= substitute(dirname,'^\*/','','') - let filepat= substitute(filepat,'^[%#<]','\\&','') - let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".filepat),'\n')) - if &hls | let keepregslash= s:ExplorePatHls(filepat) | endif - - elseif starpat == 4 - " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) - let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".dirname),'\n')) - if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif - endif " switch on starpat to build w:netrw_explore_list - - let w:netrw_explore_listlen = len(w:netrw_explore_list) - - if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/') - keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"no files matched",42) if has("clipboard") && g:netrw_clipboard if @* != keepregstar | sil! let @* = keepregstar | endif if @+ != keepregplus | sil! let @+ = keepregplus | endif endif sil! let @/ = keepregslash return - endif - endif " if indx ... endif - - " NetrwStatusLine support - for exploring support - let w:netrw_explore_indx= indx - - " wrap the indx around, but issue a note - if indx >= w:netrw_explore_listlen || indx < 0 - let indx = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0 - let w:netrw_explore_indx= indx - keepalt NetrwKeepj call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43) endif - exe "let dirfile= w:netrw_explore_list[".indx."]" - let newdir= substitute(dirfile,'/[^/]*$','','e') - - call netrw#LocalBrowseCheck(newdir) - if !exists("w:netrw_liststyle") - let w:netrw_liststyle= g:netrw_liststyle + else + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/' + sil! unlet w:netrw_treedict + sil! unlet w:netrw_treetop endif - if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST - keepalt NetrwKeepj call search('^'.substitute(dirfile,"^.*/","","").'\>',"W") + let newdir= dirname + if !exists("b:netrw_curdir") + NetrwKeepj call netrw#LocalBrowseCheck(getcwd()) else - keepalt NetrwKeepj call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w") + NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,newdir,0)) endif - let w:netrw_explore_mtchcnt = indx + 1 - let w:netrw_explore_bufnr = bufnr("%") - let w:netrw_explore_line = line(".") - keepalt NetrwKeepj call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}') - - else - if !exists("g:netrw_quiet") - keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44) - endif - if has("clipboard") && g:netrw_clipboard - if @* != keepregstar | sil! let @* = keepregstar | endif - if @+ != keepregplus | sil! let @+ = keepregplus | endif - endif - sil! let @/ = keepregslash - return - endif - - else - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/' - sil! unlet w:netrw_treedict - sil! unlet w:netrw_treetop - endif - let newdir= dirname - if !exists("b:netrw_curdir") - NetrwKeepj call netrw#LocalBrowseCheck(getcwd()) - else - NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,newdir,0)) - endif endif " visual display of **/ **// */ Exploration files if exists("w:netrw_explore_indx") && exists("b:netrw_curdir") - if !exists("s:explore_prvdir") || s:explore_prvdir != b:netrw_curdir - " only update match list when current directory isn't the same as before - let s:explore_prvdir = b:netrw_curdir - let s:explore_match = "" - let dirlen = strlen(b:netrw_curdir) - if b:netrw_curdir !~ '/$' - let dirlen= dirlen + 1 - endif - let prvfname= "" - for fname in w:netrw_explore_list - if fname =~ '^'.b:netrw_curdir - if s:explore_match == "" - let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' - else - let s:explore_match= s:explore_match.'\|\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' + if !exists("s:explore_prvdir") || s:explore_prvdir != b:netrw_curdir + " only update match list when current directory isn't the same as before + let s:explore_prvdir = b:netrw_curdir + let s:explore_match = "" + let dirlen = strlen(b:netrw_curdir) + if b:netrw_curdir !~ '/$' + let dirlen= dirlen + 1 endif - elseif fname !~ '^/' && fname != prvfname - if s:explore_match == "" - let s:explore_match= '\<'.escape(fname,g:netrw_markfileesc).'\>' - else - let s:explore_match= s:explore_match.'\|\<'.escape(fname,g:netrw_markfileesc).'\>' + let prvfname= "" + for fname in w:netrw_explore_list + if fname =~ '^'.b:netrw_curdir + if s:explore_match == "" + let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' + else + let s:explore_match= s:explore_match.'\|\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' + endif + elseif fname !~ '^/' && fname != prvfname + if s:explore_match == "" + let s:explore_match= '\<'.escape(fname,g:netrw_markfileesc).'\>' + else + let s:explore_match= s:explore_match.'\|\<'.escape(fname,g:netrw_markfileesc).'\>' + endif + endif + let prvfname= fname + endfor + if has("syntax") && exists("g:syntax_on") && g:syntax_on + exe "2match netrwMarkFile /".s:explore_match."/" endif - endif - let prvfname= fname - endfor - if has("syntax") && exists("g:syntax_on") && g:syntax_on - exe "2match netrwMarkFile /".s:explore_match."/" endif - endif - echo "==Pexplore ==Nexplore" + echo "==Pexplore ==Nexplore" else - 2match none - if exists("s:explore_match") | unlet s:explore_match | endif - if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif + 2match none + if exists("s:explore_match") | unlet s:explore_match | endif + if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif endif " since Explore may be used to initialize netrw's browser, @@ -1081,8 +1120,8 @@ fun! netrw#Explore(indx,dosplit,style,...) " Consequently, set s:netrw_events to 2. let s:netrw_events= 2 if has("clipboard") && g:netrw_clipboard - if @* != keepregstar | sil! let @* = keepregstar | endif - if @+ != keepregplus | sil! let @+ = keepregplus | endif + if @* != keepregstar | sil! let @* = keepregstar | endif + if @+ != keepregplus | sil! let @+ = keepregplus | endif endif sil! let @/ = keepregslash endfun @@ -1095,93 +1134,93 @@ endfun " s:lexplore_win : window number of Lexplore window (serves to indicate which window is a Lexplore window) " w:lexplore_buf : buffer number of Lexplore window (serves to indicate which window is a Lexplore window) fun! netrw#Lexplore(count,rightside,...) -" call Dfunc("netrw#Lexplore(count=".a:count." rightside=".a:rightside.",...) a:0=".a:0." ft=".&ft) + " call Dfunc("netrw#Lexplore(count=".a:count." rightside=".a:rightside.",...) a:0=".a:0." ft=".&ft) let curwin= winnr() if a:0 > 0 && a:1 != "" - " if a netrw window is already on the left-side of the tab - " and a directory has been specified, explore with that - " directory. - let a1 = expand(a:1) - exe "1wincmd w" - if &ft == "netrw" - exe "Explore ".fnameescape(a1) - exe curwin."wincmd w" - let s:lexplore_win= curwin - let w:lexplore_buf= bufnr("%") - if exists("t:netrw_lexposn") - unlet t:netrw_lexposn + " if a netrw window is already on the left-side of the tab + " and a directory has been specified, explore with that + " directory. + let a1 = expand(a:1) + exe "1wincmd w" + if &ft == "netrw" + exe "Explore ".fnameescape(a1) + exe curwin."wincmd w" + let s:lexplore_win= curwin + let w:lexplore_buf= bufnr("%") + if exists("t:netrw_lexposn") + unlet t:netrw_lexposn + endif + return endif - return - endif - exe curwin."wincmd w" + exe curwin."wincmd w" else - let a1= "" + let a1= "" endif if exists("t:netrw_lexbufnr") - " check if t:netrw_lexbufnr refers to a netrw window - let lexwinnr = bufwinnr(t:netrw_lexbufnr) + " check if t:netrw_lexbufnr refers to a netrw window + let lexwinnr = bufwinnr(t:netrw_lexbufnr) else - let lexwinnr= 0 + let lexwinnr= 0 endif if lexwinnr > 0 - " close down netrw explorer window - exe lexwinnr."wincmd w" - let g:netrw_winsize = -winwidth(0) - let t:netrw_lexposn = winsaveview() - close - if lexwinnr < curwin - let curwin= curwin - 1 - endif - if lexwinnr != curwin - exe curwin."wincmd w" - endif - unlet t:netrw_lexbufnr - - else - " open netrw explorer window - exe "1wincmd w" - let keep_altv = g:netrw_altv - let g:netrw_altv = 0 - if a:count != 0 - let netrw_winsize = g:netrw_winsize - let g:netrw_winsize = a:count - endif - let curfile= expand("%") - exe (a:rightside? "botright" : "topleft")." vertical ".((g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize) . " new" - if a:0 > 0 && a1 != "" - call netrw#Explore(0,0,0,a1) - exe "Explore ".fnameescape(a1) - elseif curfile =~ '^\a\{3,}://' - call netrw#Explore(0,0,0,substitute(curfile,'[^/\\]*$','','')) - else - call netrw#Explore(0,0,0,".") - endif - if a:count != 0 - let g:netrw_winsize = netrw_winsize - endif - setlocal winfixwidth - let g:netrw_altv = keep_altv - let t:netrw_lexbufnr = bufnr("%") - " done to prevent build-up of hidden buffers due to quitting and re-invocation of :Lexplore. - " Since the intended use of :Lexplore is to have an always-present explorer window, the extra - " effort to prevent mis-use of :Lex is warranted. - set bh=wipe - if exists("t:netrw_lexposn") - call winrestview(t:netrw_lexposn) - unlet t:netrw_lexposn - endif + " close down netrw explorer window + exe lexwinnr."wincmd w" + let g:netrw_winsize = -winwidth(0) + let t:netrw_lexposn = winsaveview() + close + if lexwinnr < curwin + let curwin= curwin - 1 + endif + if lexwinnr != curwin + exe curwin."wincmd w" + endif + unlet t:netrw_lexbufnr + + else + " open netrw explorer window + exe "1wincmd w" + let keep_altv = g:netrw_altv + let g:netrw_altv = 0 + if a:count != 0 + let netrw_winsize = g:netrw_winsize + let g:netrw_winsize = a:count + endif + let curfile= expand("%") + exe (a:rightside? "botright" : "topleft")." vertical ".((g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize) . " new" + if a:0 > 0 && a1 != "" + call netrw#Explore(0,0,0,a1) + exe "Explore ".fnameescape(a1) + elseif curfile =~ '^\a\{3,}://' + call netrw#Explore(0,0,0,substitute(curfile,'[^/\\]*$','','')) + else + call netrw#Explore(0,0,0,".") + endif + if a:count != 0 + let g:netrw_winsize = netrw_winsize + endif + setlocal winfixwidth + let g:netrw_altv = keep_altv + let t:netrw_lexbufnr = bufnr("%") + " done to prevent build-up of hidden buffers due to quitting and re-invocation of :Lexplore. + " Since the intended use of :Lexplore is to have an always-present explorer window, the extra + " effort to prevent mis-use of :Lex is warranted. + set bh=wipe + if exists("t:netrw_lexposn") + call winrestview(t:netrw_lexposn) + unlet t:netrw_lexposn + endif endif " set up default window for editing via if exists("g:netrw_chgwin") && g:netrw_chgwin == -1 - if a:rightside - let g:netrw_chgwin= 1 - else - let g:netrw_chgwin= 2 - endif + if a:rightside + let g:netrw_chgwin= 1 + else + let g:netrw_chgwin= 2 + endif endif endfun @@ -1191,73 +1230,73 @@ endfun " supports :NetrwClean -- remove netrw from first directory on runtimepath " :NetrwClean! -- remove netrw from all directories on runtimepath fun! netrw#Clean(sys) -" call Dfunc("netrw#Clean(sys=".a:sys.")") + " call Dfunc("netrw#Clean(sys=".a:sys.")") if a:sys - let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No") + let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No") else - let choice= confirm("Remove personal copy of netrw?","&Yes\n&No") + let choice= confirm("Remove personal copy of netrw?","&Yes\n&No") endif -" call Decho("choice=".choice,'~'.expand("")) + " call Decho("choice=".choice,'~'.expand("")) let diddel= 0 let diddir= "" if choice == 1 - for dir in split(&rtp,',') - if filereadable(dir."/plugin/netrwPlugin.vim") -" call Decho("removing netrw-related files from ".dir,'~'.expand("")) - if s:NetrwDelete(dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif - if s:NetrwDelete(dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif - if s:NetrwDelete(dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif - if s:NetrwDelete(dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif - if s:NetrwDelete(dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif - if s:NetrwDelete(dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif - let diddir= dir - let diddel= diddel + 1 - if !a:sys|break|endif - endif - endfor - endif - - echohl WarningMsg + for dir in split(&rtp,',') + if filereadable(dir."/plugin/netrwPlugin.vim") + " call Decho("removing netrw-related files from ".dir,'~'.expand("")) + if s:NetrwDelete(dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif + if s:NetrwDelete(dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif + if s:NetrwDelete(dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif + if s:NetrwDelete(dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif + if s:NetrwDelete(dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif + if s:NetrwDelete(dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif + let diddir= dir + let diddel= diddel + 1 + if !a:sys|break|endif + endif + endfor + endif + + echohl WarningMsg if diddel == 0 - echomsg "netrw is either not installed or not removable" + echomsg "netrw is either not installed or not removable" elseif diddel == 1 - echomsg "removed one copy of netrw from <".diddir.">" + echomsg "removed one copy of netrw from <".diddir.">" else - echomsg "removed ".diddel." copies of netrw" + echomsg "removed ".diddel." copies of netrw" endif - echohl None + echohl None -" call Dret("netrw#Clean") + " call Dret("netrw#Clean") endfun " --------------------------------------------------------------------- " netrw#MakeTgt: make a target out of the directory name provided {{{2 fun! netrw#MakeTgt(dname) -" call Dfunc("netrw#MakeTgt(dname<".a:dname.">)") - " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) + " call Dfunc("netrw#MakeTgt(dname<".a:dname.">)") + " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) let svpos = winsaveview() -" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) + " call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) let s:netrwmftgt_islocal= (a:dname !~ '^\a\{3,}://') -" call Decho("s:netrwmftgt_islocal=".s:netrwmftgt_islocal,'~'.expand("")) + " call Decho("s:netrwmftgt_islocal=".s:netrwmftgt_islocal,'~'.expand("")) if s:netrwmftgt_islocal - let netrwmftgt= simplify(a:dname) + let netrwmftgt= simplify(a:dname) else - let netrwmftgt= a:dname + let netrwmftgt= a:dname endif if exists("s:netrwmftgt") && netrwmftgt == s:netrwmftgt - " re-selected target, so just clear it - unlet s:netrwmftgt s:netrwmftgt_islocal + " re-selected target, so just clear it + unlet s:netrwmftgt s:netrwmftgt_islocal else - let s:netrwmftgt= netrwmftgt + let s:netrwmftgt= netrwmftgt endif if g:netrw_fastbrowse <= 1 - call s:NetrwRefresh((b:netrw_curdir !~ '\a\{3,}://'),b:netrw_curdir) + call s:NetrwRefresh((b:netrw_curdir !~ '\a\{3,}://'),b:netrw_curdir) endif -" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand(""))" + " call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand(""))" call winrestview(svpos) -" call Dret("netrw#MakeTgt") + " call Dret("netrw#MakeTgt") endfun " --------------------------------------------------------------------- @@ -1268,250 +1307,250 @@ endfun " fname : a filename or a list of filenames " tgtdir : optional place where files are to go (not present, uses getcwd()) fun! netrw#Obtain(islocal,fname,...) -" call Dfunc("netrw#Obtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0) + " call Dfunc("netrw#Obtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0) " NetrwStatusLine support - for obtaining support if type(a:fname) == 1 - let fnamelist= [ a:fname ] + let fnamelist= [ a:fname ] elseif type(a:fname) == 3 - let fnamelist= a:fname + let fnamelist= a:fname else - call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62) -" call Dret("netrw#Obtain") - return + call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62) + " call Dret("netrw#Obtain") + return endif -" call Decho("fnamelist<".string(fnamelist).">",'~'.expand("")) + " call Decho("fnamelist<".string(fnamelist).">",'~'.expand("")) if a:0 > 0 - let tgtdir= a:1 + let tgtdir= a:1 else - let tgtdir= getcwd() + let tgtdir= getcwd() endif -" call Decho("tgtdir<".tgtdir.">",'~'.expand("")) + " call Decho("tgtdir<".tgtdir.">",'~'.expand("")) if exists("b:netrw_islocal") && b:netrw_islocal - " obtain a file from local b:netrw_curdir to (local) tgtdir -" call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir,'~'.expand("")) - if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir - let topath= s:ComposePath(tgtdir,"") - if has("win32") - " transfer files one at time -" call Decho("transfer files one at a time",'~'.expand("")) - for fname in fnamelist -" call Decho("system(".g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath).")",'~'.expand("")) - call system(g:netrw_localcopycmd.g:netrw_localcopycmdopt." ".s:ShellEscape(fname)." ".s:ShellEscape(topath)) - if v:shell_error != 0 - call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) -" call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath)) - return - endif - endfor - else - " transfer files with one command -" call Decho("transfer files with one command",'~'.expand("")) - let filelist= join(map(deepcopy(fnamelist),"s:ShellEscape(v:val)")) -" call Decho("system(".g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath).")",'~'.expand("")) - call system(g:netrw_localcopycmd.g:netrw_localcopycmdopt." ".filelist." ".s:ShellEscape(topath)) - if v:shell_error != 0 - call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) -" call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath)) - return - endif + " obtain a file from local b:netrw_curdir to (local) tgtdir + " call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir,'~'.expand("")) + if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir + let topath= s:ComposePath(tgtdir,"") + if has("win32") + " transfer files one at time + " call Decho("transfer files one at a time",'~'.expand("")) + for fname in fnamelist + " call Decho("system(".g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath).")",'~'.expand("")) + call system(g:netrw_localcopycmd.g:netrw_localcopycmdopt." ".s:ShellEscape(fname)." ".s:ShellEscape(topath)) + if v:shell_error != 0 + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) + " call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath)) + return + endif + endfor + else + " transfer files with one command + " call Decho("transfer files with one command",'~'.expand("")) + let filelist= join(map(deepcopy(fnamelist),"s:ShellEscape(v:val)")) + " call Decho("system(".g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath).")",'~'.expand("")) + call system(g:netrw_localcopycmd.g:netrw_localcopycmdopt." ".filelist." ".s:ShellEscape(topath)) + if v:shell_error != 0 + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) + " call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath)) + return + endif + endif + elseif !exists("b:netrw_curdir") + call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36) + else + call netrw#ErrorMsg(s:WARNING,"local browsing directory and current directory are identical",37) endif - elseif !exists("b:netrw_curdir") - call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36) - else - call netrw#ErrorMsg(s:WARNING,"local browsing directory and current directory are identical",37) - endif else - " obtain files from remote b:netrw_curdir to local tgtdir -" call Decho("obtain a file from remote ".b:netrw_curdir." to ".tgtdir,'~'.expand("")) - if type(a:fname) == 1 - call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname) - endif - call s:NetrwMethod(b:netrw_curdir) - - if b:netrw_method == 4 - " obtain file using scp -" call Decho("obtain via scp (method#4)",'~'.expand("")) - if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".g:netrw_port - else - let useport= "" - endif - if b:netrw_fname =~ '/' - let path= substitute(b:netrw_fname,'^\(.*/\).\{-}$','\1','') - else - let path= "" + " obtain files from remote b:netrw_curdir to local tgtdir + " call Decho("obtain a file from remote ".b:netrw_curdir." to ".tgtdir,'~'.expand("")) + if type(a:fname) == 1 + call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname) endif - let filelist= join(map(deepcopy(fnamelist),'escape(s:ShellEscape(g:netrw_machine.":".path.v:val,1)," ")')) - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.s:ShellEscape(useport,1)." ".filelist." ".s:ShellEscape(tgtdir,1)) + call s:NetrwMethod(b:netrw_curdir) - elseif b:netrw_method == 2 - " obtain file using ftp + .netrc -" call Decho("obtain via ftp+.netrc (method #2)",'~'.expand("")) - call s:SaveBufVars()|sil NetrwKeepj new|call s:RestoreBufVars() - let tmpbufnr= bufnr("%") - setl ff=unix - if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" - NetrwKeepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif + if b:netrw_method == 4 + " obtain file using scp + " call Decho("obtain via scp (method#4)",'~'.expand("")) + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " ".g:netrw_scpport." ".g:netrw_port + else + let useport= "" + endif + if b:netrw_fname =~ '/' + let path= substitute(b:netrw_fname,'^\(.*/\).\{-}$','\1','') + else + let path= "" + endif + let filelist= join(map(deepcopy(fnamelist),'escape(s:ShellEscape(g:netrw_machine.":".path.v:val,1)," ")')) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.s:ShellEscape(useport,1)." ".filelist." ".s:ShellEscape(tgtdir,1)) + + elseif b:netrw_method == 2 + " obtain file using ftp + .netrc + " call Decho("obtain via ftp+.netrc (method #2)",'~'.expand("")) + call s:SaveBufVars()|sil NetrwKeepj new|call s:RestoreBufVars() + let tmpbufnr= bufnr("%") + setl ff=unix + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + NetrwKeepj put =g:netrw_ftpmode + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif - if exists("b:netrw_fname") && b:netrw_fname != "" - call setline(line("$")+1,'cd "'.b:netrw_fname.'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif + if exists("b:netrw_fname") && b:netrw_fname != "" + call setline(line("$")+1,'cd "'.b:netrw_fname.'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif - for fname in fnamelist - call setline(line("$")+1,'get "'.fname.'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endfor - if exists("g:netrw_port") && g:netrw_port != "" - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)) - else - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)) - endif - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' - let debugkeep= &debug - setl debug=msg - call netrw#ErrorMsg(s:ERROR,getline(1),4) - let &debug= debugkeep - endif - - elseif b:netrw_method == 3 - " obtain with ftp + machine, id, passwd, and fname (ie. no .netrc) -" call Decho("obtain via ftp+mipf (method #3)",'~'.expand("")) - call s:SaveBufVars()|sil NetrwKeepj new|call s:RestoreBufVars() - let tmpbufnr= bufnr("%") - setl ff=unix + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif + for fname in fnamelist + call setline(line("$")+1,'get "'.fname.'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endfor + if exists("g:netrw_port") && g:netrw_port != "" + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)) + else + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)) + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + let debugkeep= &debug + setl debug=msg + call netrw#ErrorMsg(s:ERROR,getline(1),4) + let &debug= debugkeep + endif - if exists("g:netrw_port") && g:netrw_port != "" - NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline('$'),'~'.expand("")) - else - NetrwKeepj put ='open '.g:netrw_machine -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif + elseif b:netrw_method == 3 + " obtain with ftp + machine, id, passwd, and fname (ie. no .netrc) + " call Decho("obtain via ftp+mipf (method #3)",'~'.expand("")) + call s:SaveBufVars()|sil NetrwKeepj new|call s:RestoreBufVars() + let tmpbufnr= bufnr("%") + setl ff=unix + + if exists("g:netrw_port") && g:netrw_port != "" + NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port + " call Decho("filter input: ".getline('$'),'~'.expand("")) + else + NetrwKeepj put ='open '.g:netrw_machine + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif - if exists("g:netrw_uid") && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - NetrwKeepj put =g:netrw_uid -" call Decho("filter input: ".getline('$'),'~'.expand("")) - if exists("s:netrw_passwd") && s:netrw_passwd != "" - NetrwKeepj put ='\"'.s:netrw_passwd.'\"' + if exists("g:netrw_uid") && g:netrw_uid != "" + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + NetrwKeepj put =g:netrw_uid + " call Decho("filter input: ".getline('$'),'~'.expand("")) + if exists("s:netrw_passwd") && s:netrw_passwd != "" + NetrwKeepj put ='\"'.s:netrw_passwd.'\"' + endif + " call Decho("filter input: ".getline('$'),'~'.expand("")) + elseif exists("s:netrw_passwd") + NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif endif -" call Decho("filter input: ".getline('$'),'~'.expand("")) - elseif exists("s:netrw_passwd") - NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif - endif - if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" - NetrwKeepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + NetrwKeepj put =g:netrw_ftpmode + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif - if exists("b:netrw_fname") && b:netrw_fname != "" - NetrwKeepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif + if exists("b:netrw_fname") && b:netrw_fname != "" + NetrwKeepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif - for fname in fnamelist - NetrwKeepj call setline(line("$")+1,'get "'.fname.'"') - endfor -" call Decho("filter input: ".getline('$'),'~'.expand("")) + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif + for fname in fnamelist + NetrwKeepj call setline(line("$")+1,'get "'.fname.'"') + endfor + " call Decho("filter input: ".getline('$'),'~'.expand("")) + + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + " Note: using "_dd to delete to the black hole register; avoids messing up @@ + NetrwKeepj norm! 1G"_dd + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" + " call Decho("error<".getline(1).">",'~'.expand("")) + if !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),5) + endif + endif - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password - " Note: using "_dd to delete to the black hole register; avoids messing up @@ - NetrwKeepj norm! 1G"_dd - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" -" call Decho("error<".getline(1).">",'~'.expand("")) - if !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),5) - endif - endif - - elseif b:netrw_method == 9 - " obtain file using sftp -" call Decho("obtain via sftp (method #9)",'~'.expand("")) - if a:fname =~ '/' - let localfile= substitute(a:fname,'^.*/','','') - else - let localfile= a:fname - endif - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1).s:ShellEscape(localfile)." ".s:ShellEscape(tgtdir)) - - elseif !exists("b:netrw_method") || b:netrw_method < 0 - " probably a badly formed url; protocol not recognized -" call Dret("netrw#Obtain : unsupported method") - return + elseif b:netrw_method == 9 + " obtain file using sftp + " call Decho("obtain via sftp (method #9)",'~'.expand("")) + if a:fname =~ '/' + let localfile= substitute(a:fname,'^.*/','','') + else + let localfile= a:fname + endif + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1).s:ShellEscape(localfile)." ".s:ShellEscape(tgtdir)) - else - " protocol recognized but not supported for Obtain (yet?) - if !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"current protocol not supported for obtaining file",97) + elseif !exists("b:netrw_method") || b:netrw_method < 0 + " probably a badly formed url; protocol not recognized + " call Dret("netrw#Obtain : unsupported method") + return + + else + " protocol recognized but not supported for Obtain (yet?) + if !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"current protocol not supported for obtaining file",97) + endif + " call Dret("netrw#Obtain : current protocol not supported for obtaining file") + return endif -" call Dret("netrw#Obtain : current protocol not supported for obtaining file") - return - endif - " restore status line - if type(a:fname) == 1 && exists("s:netrw_users_stl") - NetrwKeepj call s:SetupNetrwStatusLine(s:netrw_users_stl) - endif + " restore status line + if type(a:fname) == 1 && exists("s:netrw_users_stl") + NetrwKeepj call s:SetupNetrwStatusLine(s:netrw_users_stl) + endif endif " cleanup if exists("tmpbufnr") - if bufnr("%") != tmpbufnr - exe tmpbufnr."bw!" - else - q! - endif + if bufnr("%") != tmpbufnr + exe tmpbufnr."bw!" + else + q! + endif endif -" call Dret("netrw#Obtain") + " call Dret("netrw#Obtain") endfun " --------------------------------------------------------------------- " netrw#Nread: save position, call netrw#NetRead(), and restore position {{{2 fun! netrw#Nread(mode,fname) -" call Dfunc("netrw#Nread(mode=".a:mode." fname<".a:fname.">)") + " call Dfunc("netrw#Nread(mode=".a:mode." fname<".a:fname.">)") let svpos= winsaveview() -" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) + " call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) call netrw#NetRead(a:mode,a:fname) -" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("")) + " call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("")) call winrestview(svpos) if exists("w:netrw_liststyle") && w:netrw_liststyle != s:TREELIST - if exists("w:netrw_bannercnt") - " start with cursor just after the banner - exe w:netrw_bannercnt - endif + if exists("w:netrw_bannercnt") + " start with cursor just after the banner + exe w:netrw_bannercnt + endif endif -" call Dret("netrw#Nread") + " call Dret("netrw#Nread") endfun " ------------------------------------------------------------------------ @@ -1526,21 +1565,21 @@ endfun " - restore a user option when != safe option (s:NetrwRestoreSetting) " vt: (variable type) normally its either "w:" or "s:" fun! s:NetrwOptionsSave(vt) -" call Dfunc("s:NetrwOptionsSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma) -" call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"),'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt." hid=".&hid,'~'.expand("")) -" call Decho("(s:NetrwOptionsSave) lines=".&lines) + " call Dfunc("s:NetrwOptionsSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma) + " call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"),'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt." hid=".&hid,'~'.expand("")) + " call Decho("(s:NetrwOptionsSave) lines=".&lines) if !exists("{a:vt}netrw_optionsave") - let {a:vt}netrw_optionsave= 1 + let {a:vt}netrw_optionsave= 1 else -" call Dret("s:NetrwOptionsSave : options already saved") - return + " call Dret("s:NetrwOptionsSave : options already saved") + return endif -" call Decho("prior to save: fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff,'~'.expand("")) + " call Decho("prior to save: fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff,'~'.expand("")) " Save current settings and current directory -" call Decho("saving current settings and current directory",'~'.expand("")) + " call Decho("saving current settings and current directory",'~'.expand("")) let s:yykeep = @@ if exists("&l:acd")|let {a:vt}netrw_acdkeep = &l:acd|endif let {a:vt}netrw_aikeep = &l:ai @@ -1557,11 +1596,11 @@ fun! s:NetrwOptionsSave(vt) let {a:vt}netrw_cpokeep = &l:cpo let {a:vt}netrw_cuckeep = &l:cuc let {a:vt}netrw_culkeep = &l:cul -" call Decho("(s:NetrwOptionsSave) COMBAK: cuc=".&l:cuc." cul=".&l:cul) + " call Decho("(s:NetrwOptionsSave) COMBAK: cuc=".&l:cuc." cul=".&l:cul) let {a:vt}netrw_diffkeep = &l:diff let {a:vt}netrw_fenkeep = &l:fen if !exists("g:netrw_ffkeep") || g:netrw_ffkeep - let {a:vt}netrw_ffkeep = &l:ff + let {a:vt}netrw_ffkeep = &l:ff endif let {a:vt}netrw_fokeep = &l:fo " formatoptions let {a:vt}netrw_gdkeep = &l:gd " gdefault @@ -1581,7 +1620,7 @@ fun! s:NetrwOptionsSave(vt) let {a:vt}netrw_selkeep = &l:sel let {a:vt}netrw_spellkeep = &l:spell if !g:netrw_use_noswf - let {a:vt}netrw_swfkeep = &l:swf + let {a:vt}netrw_swfkeep = &l:swf endif let {a:vt}netrw_tskeep = &l:ts let {a:vt}netrw_twkeep = &l:tw " textwidth @@ -1590,20 +1629,20 @@ fun! s:NetrwOptionsSave(vt) let {a:vt}netrw_writekeep = &l:write " save a few selected netrw-related variables -" call Decho("saving a few selected netrw-related variables",'~'.expand("")) + " call Decho("saving a few selected netrw-related variables",'~'.expand("")) if g:netrw_keepdir - let {a:vt}netrw_dirkeep = getcwd() -" call Decho("saving to ".a:vt."netrw_dirkeep<".{a:vt}netrw_dirkeep.">",'~'.expand("")) + let {a:vt}netrw_dirkeep = getcwd() + " call Decho("saving to ".a:vt."netrw_dirkeep<".{a:vt}netrw_dirkeep.">",'~'.expand("")) endif if has("clipboard") && g:netrw_clipboard - sil! let {a:vt}netrw_starkeep = @* - sil! let {a:vt}netrw_pluskeep = @+ + sil! let {a:vt}netrw_starkeep = @* + sil! let {a:vt}netrw_pluskeep = @+ endif sil! let {a:vt}netrw_slashkeep= @/ -" call Decho("(s:NetrwOptionsSave) lines=".&lines) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) -" call Dret("s:NetrwOptionsSave : tab#".tabpagenr()." win#".winnr()) + " call Decho("(s:NetrwOptionsSave) lines=".&lines) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) + " call Dret("s:NetrwOptionsSave : tab#".tabpagenr()." win#".winnr()) endfun " --------------------------------------------------------------------- @@ -1611,25 +1650,25 @@ endfun " Use s:NetrwSaveOptions() to save user settings " Use s:NetrwOptionsRestore() to restore user settings fun! s:NetrwOptionsSafe(islocal) -" call Dfunc("s:NetrwOptionsSafe(islocal=".a:islocal.") win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$")) -" call Decho("win#".winnr()."'s ft=".&ft,'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Dfunc("s:NetrwOptionsSafe(islocal=".a:islocal.") win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$")) + " call Decho("win#".winnr()."'s ft=".&ft,'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) if exists("+acd") | call s:NetrwSetSafeSetting("&l:acd",0)|endif call s:NetrwSetSafeSetting("&l:ai",0) call s:NetrwSetSafeSetting("&l:aw",0) call s:NetrwSetSafeSetting("&l:bl",0) call s:NetrwSetSafeSetting("&l:bomb",0) if a:islocal - call s:NetrwSetSafeSetting("&l:bt","nofile") + call s:NetrwSetSafeSetting("&l:bt","nofile") else - call s:NetrwSetSafeSetting("&l:bt","acwrite") + call s:NetrwSetSafeSetting("&l:bt","acwrite") endif call s:NetrwSetSafeSetting("&l:ci",0) call s:NetrwSetSafeSetting("&l:cin",0) if g:netrw_fastbrowse > a:islocal - call s:NetrwSetSafeSetting("&l:bh","hide") + call s:NetrwSetSafeSetting("&l:bh","hide") else - call s:NetrwSetSafeSetting("&l:bh","delete") + call s:NetrwSetSafeSetting("&l:bh","delete") endif call s:NetrwSetSafeSetting("&l:cino","") call s:NetrwSetSafeSetting("&l:com","") @@ -1644,7 +1683,7 @@ fun! s:NetrwOptionsSafe(islocal) setl isk+=@ isk+=* isk+=/ call s:NetrwSetSafeSetting("&l:magic",1) if g:netrw_use_noswf - call s:NetrwSetSafeSetting("swf",0) + call s:NetrwSetSafeSetting("swf",0) endif call s:NetrwSetSafeSetting("&l:report",10000) call s:NetrwSetSafeSetting("&l:sel","inclusive") @@ -1658,41 +1697,41 @@ fun! s:NetrwOptionsSafe(islocal) call s:NetrwCursor(0) " allow the user to override safe options -" call Decho("ft<".&ft."> ei=".&ei,'~'.expand("")) + " call Decho("ft<".&ft."> ei=".&ei,'~'.expand("")) if &ft == "netrw" -" call Decho("do any netrw FileType autocmds (doau FileType netrw)",'~'.expand("")) - keepalt NetrwKeepj doau FileType netrw + " call Decho("do any netrw FileType autocmds (doau FileType netrw)",'~'.expand("")) + keepalt NetrwKeepj doau FileType netrw endif -" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh." bt<".&bt.">",'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Dret("s:NetrwOptionsSafe") + " call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh." bt<".&bt.">",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Dret("s:NetrwOptionsSafe") endfun " --------------------------------------------------------------------- " s:NetrwOptionsRestore: restore options (based on prior s:NetrwOptionsSave) {{{2 fun! s:NetrwOptionsRestore(vt) if !exists("{a:vt}netrw_optionsave") - " filereadable() returns zero for remote files (e.g. scp://user@localhost//etc/fstab) - " Note: @ may not be in 'isfname', so '^\w\+://\f\+/' may not match - if filereadable(expand("%")) || expand("%") =~# '^\w\+://\f\+' - filetype detect - else - setl ft=netrw - endif - return + " filereadable() returns zero for remote files (e.g. scp://user@localhost//etc/fstab) + " Note: @ may not be in 'isfname', so '^\w\+://\f\+/' may not match + if filereadable(expand("%")) || expand("%") =~# '^\w\+://\f\+' + filetype detect + else + setl ft=netrw + endif + return endif unlet {a:vt}netrw_optionsave if exists("+acd") - if exists("{a:vt}netrw_acdkeep") - let curdir = getcwd() - let &l:acd = {a:vt}netrw_acdkeep - unlet {a:vt}netrw_acdkeep - if &l:acd - call s:NetrwLcd(curdir) + if exists("{a:vt}netrw_acdkeep") + let curdir = getcwd() + let &l:acd = {a:vt}netrw_acdkeep + unlet {a:vt}netrw_acdkeep + if &l:acd + call s:NetrwLcd(curdir) + endif endif - endif endif call s:NetrwRestoreSetting(a:vt."netrw_aikeep","&l:ai") call s:NetrwRestoreSetting(a:vt."netrw_awkeep","&l:aw") @@ -1708,7 +1747,7 @@ fun! s:NetrwOptionsRestore(vt) call s:NetrwRestoreSetting(a:vt."netrw_diffkeep","&l:diff") call s:NetrwRestoreSetting(a:vt."netrw_fenkeep","&l:fen") if exists("g:netrw_ffkeep") && g:netrw_ffkeep - call s:NetrwRestoreSetting(a:vt."netrw_ffkeep")","&l:ff") + call s:NetrwRestoreSetting(a:vt."netrw_ffkeep")","&l:ff") endif call s:NetrwRestoreSetting(a:vt."netrw_fokeep" ,"&l:fo") call s:NetrwRestoreSetting(a:vt."netrw_gdkeep" ,"&l:gd") @@ -1738,32 +1777,32 @@ fun! s:NetrwOptionsRestore(vt) call s:NetrwRestoreSetting(a:vt."netrw_tskeep","&l:ts") if exists("{a:vt}netrw_swfkeep") - if &directory == "" - " user hasn't specified a swapfile directory; - " netrw will temporarily set the swapfile directory - " to the current directory as returned by getcwd(). - let &l:directory= getcwd() - sil! let &l:swf = {a:vt}netrw_swfkeep - setl directory= - unlet {a:vt}netrw_swfkeep - elseif &l:swf != {a:vt}netrw_swfkeep - if !g:netrw_use_noswf - " following line causes a Press ENTER in windows -- can't seem to work around it!!! - sil! let &l:swf= {a:vt}netrw_swfkeep - endif - unlet {a:vt}netrw_swfkeep - endif + if &directory == "" + " user hasn't specified a swapfile directory; + " netrw will temporarily set the swapfile directory + " to the current directory as returned by getcwd(). + let &l:directory= getcwd() + sil! let &l:swf = {a:vt}netrw_swfkeep + setl directory= + unlet {a:vt}netrw_swfkeep + elseif &l:swf != {a:vt}netrw_swfkeep + if !g:netrw_use_noswf + " following line causes a Press ENTER in windows -- can't seem to work around it!!! + sil! let &l:swf= {a:vt}netrw_swfkeep + endif + unlet {a:vt}netrw_swfkeep + endif endif if exists("{a:vt}netrw_dirkeep") && isdirectory(s:NetrwFile({a:vt}netrw_dirkeep)) && g:netrw_keepdir - let dirkeep = substitute({a:vt}netrw_dirkeep,'\\','/','g') - if exists("{a:vt}netrw_dirkeep") - call s:NetrwLcd(dirkeep) - unlet {a:vt}netrw_dirkeep - endif + let dirkeep = substitute({a:vt}netrw_dirkeep,'\\','/','g') + if exists("{a:vt}netrw_dirkeep") + call s:NetrwLcd(dirkeep) + unlet {a:vt}netrw_dirkeep + endif endif if has("clipboard") && g:netrw_clipboard - call s:NetrwRestoreSetting(a:vt."netrw_starkeep","@*") - call s:NetrwRestoreSetting(a:vt."netrw_pluskeep","@+") + call s:NetrwRestoreSetting(a:vt."netrw_starkeep","@*") + call s:NetrwRestoreSetting(a:vt."netrw_pluskeep","@+") endif call s:NetrwRestoreSetting(a:vt."netrw_slashkeep","@/") @@ -1771,7 +1810,7 @@ fun! s:NetrwOptionsRestore(vt) " were having their filetype detect-generated settings overwritten by " NetrwOptionRestore. if &ft != "netrw" - filetype detect + filetype detect endif endfun @@ -1784,26 +1823,26 @@ endfun " Called from s:NetrwOptionsSafe " ex. call s:NetrwSetSafeSetting("&l:sel","inclusive") fun! s:NetrwSetSafeSetting(setting,safesetting) -" call Dfunc("s:NetrwSetSafeSetting(setting<".a:setting."> safesetting<".a:safesetting.">)") + " call Dfunc("s:NetrwSetSafeSetting(setting<".a:setting."> safesetting<".a:safesetting.">)") if a:setting =~ '^&' -" call Decho("fyi: a:setting starts with &") - exe "let settingval= ".a:setting -" call Decho("fyi: settingval<".settingval.">") - - if settingval != a:safesetting -" call Decho("set setting<".a:setting."> to option value<".a:safesetting.">") - if type(a:safesetting) == 0 - exe "let ".a:setting."=".a:safesetting - elseif type(a:safesetting) == 1 - exe "let ".a:setting."= '".a:safesetting."'" - else - call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:setting." with a safesetting of type#".type(a:safesetting),105) + " call Decho("fyi: a:setting starts with &") + exe "let settingval= ".a:setting + " call Decho("fyi: settingval<".settingval.">") + + if settingval != a:safesetting + " call Decho("set setting<".a:setting."> to option value<".a:safesetting.">") + if type(a:safesetting) == 0 + exe "let ".a:setting."=".a:safesetting + elseif type(a:safesetting) == 1 + exe "let ".a:setting."= '".a:safesetting."'" + else + call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:setting." with a safesetting of type#".type(a:safesetting),105) + endif endif - endif endif -" call Dret("s:NetrwSetSafeSetting") + " call Dret("s:NetrwSetSafeSetting") endfun " ------------------------------------------------------------------------ @@ -1815,67 +1854,67 @@ endfun " Used by s:NetrwOptionsRestore() to restore each netrw-sensitive setting " keepvars are set up by s:NetrwOptionsSave fun! s:NetrwRestoreSetting(keepvar,setting) -""" call Dfunc("s:NetrwRestoreSetting(a:keepvar<".a:keepvar."> a:setting<".a:setting.">)") + """ call Dfunc("s:NetrwRestoreSetting(a:keepvar<".a:keepvar."> a:setting<".a:setting.">)") " typically called from s:NetrwOptionsRestore " call s:NetrwRestoreSettings(keep-option-variable-name,'associated-option') " ex. call s:NetrwRestoreSetting(a:vt."netrw_selkeep","&l:sel") " Restores option (but only if different) from a:keepvar if exists(a:keepvar) - exe "let keepvarval= ".a:keepvar - exe "let setting= ".a:setting - -"" call Decho("fyi: a:keepvar<".a:keepvar."> exists") -"" call Decho("fyi: keepvarval=".keepvarval) -"" call Decho("fyi: a:setting<".a:setting."> setting<".setting.">") - - if setting != keepvarval -"" call Decho("restore setting<".a:setting."> (currently=".setting.") to keepvarval<".keepvarval.">") - if type(a:setting) == 0 - exe "let ".a:setting."= ".keepvarval - elseif type(a:setting) == 1 - exe "let ".a:setting."= '".substitute(keepvarval,"'","''","g")."'" - else - call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:keepvar." with a setting of type#".type(a:setting),105) + exe "let keepvarval= ".a:keepvar + exe "let setting= ".a:setting + + "" call Decho("fyi: a:keepvar<".a:keepvar."> exists") + "" call Decho("fyi: keepvarval=".keepvarval) + "" call Decho("fyi: a:setting<".a:setting."> setting<".setting.">") + + if setting != keepvarval + "" call Decho("restore setting<".a:setting."> (currently=".setting.") to keepvarval<".keepvarval.">") + if type(a:setting) == 0 + exe "let ".a:setting."= ".keepvarval + elseif type(a:setting) == 1 + exe "let ".a:setting."= '".substitute(keepvarval,"'","''","g")."'" + else + call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:keepvar." with a setting of type#".type(a:setting),105) + endif endif - endif - exe "unlet ".a:keepvar + exe "unlet ".a:keepvar endif -"" call Dret("s:NetrwRestoreSetting") + "" call Dret("s:NetrwRestoreSetting") endfun " --------------------------------------------------------------------- " NetrwStatusLine: {{{2 fun! NetrwStatusLine() -" vvv NetrwStatusLine() debugging vvv -" let g:stlmsg="" -" if !exists("w:netrw_explore_bufnr") -" let g:stlmsg="!X" -" elseif w:netrw_explore_bufnr != bufnr("%") -" let g:stlmsg="explore_bufnr!=".bufnr("%") -" endif -" if !exists("w:netrw_explore_line") -" let g:stlmsg=" !X" -" elseif w:netrw_explore_line != line(".") -" let g:stlmsg=" explore_line!={line(.)<".line(".").">" -" endif -" if !exists("w:netrw_explore_list") -" let g:stlmsg=" !X" -" endif -" ^^^ NetrwStatusLine() debugging ^^^ + " vvv NetrwStatusLine() debugging vvv + " let g:stlmsg="" + " if !exists("w:netrw_explore_bufnr") + " let g:stlmsg="!X" + " elseif w:netrw_explore_bufnr != bufnr("%") + " let g:stlmsg="explore_bufnr!=".bufnr("%") + " endif + " if !exists("w:netrw_explore_line") + " let g:stlmsg=" !X" + " elseif w:netrw_explore_line != line(".") + " let g:stlmsg=" explore_line!={line(.)<".line(".").">" + " endif + " if !exists("w:netrw_explore_list") + " let g:stlmsg=" !X" + " endif + " ^^^ NetrwStatusLine() debugging ^^^ if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") - " restore user's status line - let &l:stl = s:netrw_users_stl - let &laststatus = s:netrw_users_ls - if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif - if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif - return "" + " restore user's status line + let &l:stl = s:netrw_users_stl + let &laststatus = s:netrw_users_ls + if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif + if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif + return "" else - return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen + return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen endif endfun @@ -1890,7 +1929,7 @@ endfun " =2 replace with remote file " =3 obtain file, but leave in temporary format fun! netrw#NetRead(mode,...) -" call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw.((a:0 > 0)? " a:1<".a:1.">" : "")) + " call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw.((a:0 > 0)? " a:1<".a:1.">" : "")) " NetRead: save options {{{3 call s:NetrwOptionsSave("w:") @@ -1899,414 +1938,414 @@ fun! netrw#NetRead(mode,...) " NetrwSafeOptions sets a buffer up for a netrw listing, which includes buflisting off. " However, this setting is not wanted for a remote editing session. The buffer should be "nofile", still. setl bl -" call Decho("buf#".bufnr("%")."<".bufname("%")."> bl=".&bl." bt=".&bt." bh=".&bh,'~'.expand("")) + " call Decho("buf#".bufnr("%")."<".bufname("%")."> bl=".&bl." bt=".&bt." bh=".&bh,'~'.expand("")) " NetRead: interpret mode into a readcmd {{{3 if a:mode == 0 " read remote file before current line - let readcmd = "0r" + let readcmd = "0r" elseif a:mode == 1 " read file after current line - let readcmd = "r" + let readcmd = "r" elseif a:mode == 2 " replace with remote file - let readcmd = "%r" + let readcmd = "%r" elseif a:mode == 3 " skip read of file (leave as temporary) - let readcmd = "t" + let readcmd = "t" else - exe a:mode - let readcmd = "r" + exe a:mode + let readcmd = "r" endif let ichoice = (a:0 == 0)? 0 : 1 -" call Decho("readcmd<".readcmd."> ichoice=".ichoice,'~'.expand("")) + " call Decho("readcmd<".readcmd."> ichoice=".ichoice,'~'.expand("")) " NetRead: get temporary filename {{{3 let tmpfile= s:GetTempfile("") if tmpfile == "" -" call Dret("netrw#NetRead : unable to get a tempfile!") - return + " call Dret("netrw#NetRead : unable to get a tempfile!") + return endif while ichoice <= a:0 - " attempt to repeat with previous host-file-etc - if exists("b:netrw_lastfile") && a:0 == 0 -" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">",'~'.expand("")) - let choice = b:netrw_lastfile + " attempt to repeat with previous host-file-etc + if exists("b:netrw_lastfile") && a:0 == 0 + " call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">",'~'.expand("")) + let choice = b:netrw_lastfile + let ichoice= ichoice + 1 + + else + exe "let choice= a:" . ichoice + " call Decho("no lastfile: choice<" . choice . ">",'~'.expand("")) + + if match(choice,"?") == 0 + " give help + echomsg 'NetRead Usage:' + echomsg ':Nread machine:path uses rcp' + echomsg ':Nread "machine path" uses ftp with <.netrc>' + echomsg ':Nread "machine id password path" uses ftp' + echomsg ':Nread dav://machine[:port]/path uses cadaver' + echomsg ':Nread fetch://machine/path uses fetch' + echomsg ':Nread ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' + echomsg ':Nread http://[user@]machine/path uses http wget' + echomsg ':Nread file:///path uses elinks' + echomsg ':Nread https://[user@]machine/path uses http wget' + echomsg ':Nread rcp://[user@]machine/path uses rcp' + echomsg ':Nread rsync://machine[:port]/path uses rsync' + echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp' + echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp' + sleep 4 + break + + elseif match(choice,'^"') != -1 + " Reconstruct Choice if choice starts with '"' + " call Decho("reconstructing choice",'~'.expand("")) + if match(choice,'"$') != -1 + " case "..." + let choice= strpart(choice,1,strlen(choice)-2) + else + " case "... ... ..." + let choice = strpart(choice,1,strlen(choice)-1) + let wholechoice = "" + + while match(choice,'"$') == -1 + let wholechoice = wholechoice . " " . choice + let ichoice = ichoice + 1 + if ichoice > a:0 + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3) + endif + " call Dret("netrw#NetRead :2 getcwd<".getcwd().">") + return + endif + let choice= a:{ichoice} + endwhile + let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) + endif + endif + endif + + " call Decho("choice<" . choice . ">",'~'.expand("")) let ichoice= ichoice + 1 - else - exe "let choice= a:" . ichoice -" call Decho("no lastfile: choice<" . choice . ">",'~'.expand("")) - - if match(choice,"?") == 0 - " give help - echomsg 'NetRead Usage:' - echomsg ':Nread machine:path uses rcp' - echomsg ':Nread "machine path" uses ftp with <.netrc>' - echomsg ':Nread "machine id password path" uses ftp' - echomsg ':Nread dav://machine[:port]/path uses cadaver' - echomsg ':Nread fetch://machine/path uses fetch' - echomsg ':Nread ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' - echomsg ':Nread http://[user@]machine/path uses http wget' - echomsg ':Nread file:///path uses elinks' - echomsg ':Nread https://[user@]machine/path uses http wget' - echomsg ':Nread rcp://[user@]machine/path uses rcp' - echomsg ':Nread rsync://machine[:port]/path uses rsync' - echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp' - echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp' - sleep 4 - break - - elseif match(choice,'^"') != -1 - " Reconstruct Choice if choice starts with '"' -" call Decho("reconstructing choice",'~'.expand("")) - if match(choice,'"$') != -1 - " case "..." - let choice= strpart(choice,1,strlen(choice)-2) - else - " case "... ... ..." - let choice = strpart(choice,1,strlen(choice)-1) - let wholechoice = "" - - while match(choice,'"$') == -1 - let wholechoice = wholechoice . " " . choice - let ichoice = ichoice + 1 - if ichoice > a:0 + " NetRead: Determine method of read (ftp, rcp, etc) {{{3 + call s:NetrwMethod(choice) + if !exists("b:netrw_method") || b:netrw_method < 0 + " call Dret("netrw#NetRead : unsupported method") + return + endif + let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix + + " Check whether or not NetrwBrowse() should be handling this request + " call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">",'~'.expand("")) + if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://' + " call Decho("yes, choice matches '^.*[\/]$'",'~'.expand("")) + NetrwKeepj call s:NetrwBrowse(0,choice) + " call Dret("netrw#NetRead :3 getcwd<".getcwd().">") + return + endif + + " ============ + " NetRead: Perform Protocol-Based Read {{{3 + " =========================== + if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 + echo "(netrw) Processing your read request..." + endif + + "......................................... + " NetRead: (rcp) NetRead Method #1 {{{3 + if b:netrw_method == 1 " read with rcp + " call Decho("read via rcp (method #1)",'~'.expand("")) + " ER: nothing done with g:netrw_uid yet? + " ER: on Win2K" rcp machine[.user]:file tmpfile + " ER: when machine contains '.' adding .user is required (use $USERNAME) + " ER: the tmpfile is full path: rcp sees C:\... as host C + if s:netrw_has_nt_rcp == 1 + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_machine .'.'. g:netrw_uid + else + " Any way needed it machine contains a '.' + let uid_machine = g:netrw_machine .'.'. $USERNAME + endif + else + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_uid .'@'. g:netrw_machine + else + let uid_machine = g:netrw_machine + endif + endif + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".s:ShellEscape(uid_machine.":".b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1)) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (ftp + <.netrc>) NetRead Method #2 {{{3 + elseif b:netrw_method == 2 " read with ftp + <.netrc> + " call Decho("read via ftp+.netrc (method #2)",'~'.expand("")) + let netrw_fname= b:netrw_fname + NetrwKeepj call s:SaveBufVars()|new|NetrwKeepj call s:RestoreBufVars() + let filtbuf= bufnr("%") + setl ff=unix + NetrwKeepj put =g:netrw_ftpmode + " call Decho("filter input: ".getline(line("$")),'~'.expand("")) + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline(line("$")),'~'.expand("")) + endif + call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile) + " call Decho("filter input: ".getline(line("$")),'~'.expand("")) + if exists("g:netrw_port") && g:netrw_port != "" + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)) + else + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)) + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + let debugkeep = &debug + setl debug=msg + NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),4) + let &debug = debugkeep + endif + call s:SaveBufVars() + keepj bd! + if bufname("%") == "" && getline("$") == "" && line('$') == 1 + " needed when one sources a file in a nolbl setting window via ftp + q! + endif + call s:RestoreBufVars() + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (ftp + machine,id,passwd,filename) NetRead Method #3 {{{3 + elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname + " Construct execution string (four lines) which will be passed through filter + " call Decho("read via ftp+mipf (method #3)",'~'.expand("")) + let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) + NetrwKeepj call s:SaveBufVars()|new|NetrwKeepj call s:RestoreBufVars() + let filtbuf= bufnr("%") + setl ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port + " call Decho("filter input: ".getline('.'),'~'.expand("")) + else + NetrwKeepj put ='open '.g:netrw_machine + " call Decho("filter input: ".getline('.'),'~'.expand("")) + endif + + if exists("g:netrw_uid") && g:netrw_uid != "" + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + NetrwKeepj put =g:netrw_uid + " call Decho("filter input: ".getline('.'),'~'.expand("")) + if exists("s:netrw_passwd") + NetrwKeepj put ='\"'.s:netrw_passwd.'\"' + endif + " call Decho("filter input: ".getline('.'),'~'.expand("")) + elseif exists("s:netrw_passwd") + NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' + " call Decho("filter input: ".getline('.'),'~'.expand("")) + endif + endif + + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + NetrwKeepj put =g:netrw_ftpmode + " call Decho("filter input: ".getline('.'),'~'.expand("")) + endif + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline('.'),'~'.expand("")) + endif + NetrwKeepj put ='get \"'.netrw_fname.'\" '.tmpfile + " call Decho("filter input: ".getline('.'),'~'.expand("")) + + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + NetrwKeepj norm! 1G"_dd + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" + " call Decho("error<".getline(1).">",'~'.expand("")) + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,getline(1),5) + endif + endif + call s:SaveBufVars()|keepj bd!|call s:RestoreBufVars() + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (scp) NetRead Method #4 {{{3 + elseif b:netrw_method == 4 " read with scp + " call Decho("read via scp (method #4)",'~'.expand("")) + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " ".g:netrw_scpport." ".g:netrw_port + else + let useport= "" + endif + " 'C' in 'C:\path\to\file' is handled as hostname on windows. + " This is workaround to avoid mis-handle windows local-path: + if g:netrw_scp_cmd =~ '^scp' && has("win32") + let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\(\a\):[/\\]\(.*\)$', '/\1/\2', '') + else + let tmpfile_get = tmpfile + endif + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".escape(s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1),' ')." ".s:ShellEscape(tmpfile_get,1)) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (http) NetRead Method #5 (wget) {{{3 + elseif b:netrw_method == 5 + " call Decho("read via http (method #5)",'~'.expand("")) + if g:netrw_http_cmd == "" if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3) + call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6) endif -" call Dret("netrw#NetRead :2 getcwd<".getcwd().">") + " call Dret("netrw#NetRead :4 getcwd<".getcwd().">") return - endif - let choice= a:{ichoice} - endwhile - let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) - endif - endif - endif + endif -" call Decho("choice<" . choice . ">",'~'.expand("")) - let ichoice= ichoice + 1 + if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd") + " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch) + " call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)",'~'.expand("")) + if exists("g:netrw_http_xcmd") + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".s:ShellEscape(tmpfile,1)) + else + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)) + endif + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - " NetRead: Determine method of read (ftp, rcp, etc) {{{3 - call s:NetrwMethod(choice) - if !exists("b:netrw_method") || b:netrw_method < 0 -" call Dret("netrw#NetRead : unsupported method") - return - endif - let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix - - " Check whether or not NetrwBrowse() should be handling this request -" call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">",'~'.expand("")) - if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://' -" call Decho("yes, choice matches '^.*[\/]$'",'~'.expand("")) - NetrwKeepj call s:NetrwBrowse(0,choice) -" call Dret("netrw#NetRead :3 getcwd<".getcwd().">") - return - endif - - " ============ - " NetRead: Perform Protocol-Based Read {{{3 - " =========================== - if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 - echo "(netrw) Processing your read request..." - endif - - "......................................... - " NetRead: (rcp) NetRead Method #1 {{{3 - if b:netrw_method == 1 " read with rcp -" call Decho("read via rcp (method #1)",'~'.expand("")) - " ER: nothing done with g:netrw_uid yet? - " ER: on Win2K" rcp machine[.user]:file tmpfile - " ER: when machine contains '.' adding .user is required (use $USERNAME) - " ER: the tmpfile is full path: rcp sees C:\... as host C - if s:netrw_has_nt_rcp == 1 - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_machine .'.'. g:netrw_uid - else - " Any way needed it machine contains a '.' - let uid_machine = g:netrw_machine .'.'. $USERNAME - endif - else - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_uid .'@'. g:netrw_machine - else - let uid_machine = g:netrw_machine - endif - endif - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".s:ShellEscape(uid_machine.":".b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1)) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (ftp + <.netrc>) NetRead Method #2 {{{3 - elseif b:netrw_method == 2 " read with ftp + <.netrc> -" call Decho("read via ftp+.netrc (method #2)",'~'.expand("")) - let netrw_fname= b:netrw_fname - NetrwKeepj call s:SaveBufVars()|new|NetrwKeepj call s:RestoreBufVars() - let filtbuf= bufnr("%") - setl ff=unix - NetrwKeepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline(line("$")),'~'.expand("")) - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline(line("$")),'~'.expand("")) - endif - call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile) -" call Decho("filter input: ".getline(line("$")),'~'.expand("")) - if exists("g:netrw_port") && g:netrw_port != "" - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)) - else - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)) - endif - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' - let debugkeep = &debug - setl debug=msg - NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),4) - let &debug = debugkeep - endif - call s:SaveBufVars() - keepj bd! - if bufname("%") == "" && getline("$") == "" && line('$') == 1 - " needed when one sources a file in a nolbl setting window via ftp - q! - endif - call s:RestoreBufVars() - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (ftp + machine,id,passwd,filename) NetRead Method #3 {{{3 - elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname - " Construct execution string (four lines) which will be passed through filter -" call Decho("read via ftp+mipf (method #3)",'~'.expand("")) - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - NetrwKeepj call s:SaveBufVars()|new|NetrwKeepj call s:RestoreBufVars() - let filtbuf= bufnr("%") - setl ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline('.'),'~'.expand("")) - else - NetrwKeepj put ='open '.g:netrw_machine -" call Decho("filter input: ".getline('.'),'~'.expand("")) - endif + else + " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker) + " call Decho("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)",'~'.expand("")) + let netrw_html= substitute(b:netrw_fname,"#.*$","","") + let netrw_tag = substitute(b:netrw_fname,"^.*#","","") + " call Decho("netrw_html<".netrw_html.">",'~'.expand("")) + " call Decho("netrw_tag <".netrw_tag.">",'~'.expand("")) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.netrw_html,1)) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + " call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/','~'.expand("")) + exe 'NetrwKeepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\" + endif + let b:netrw_lastfile = choice + " call Decho("setl ro",'~'.expand("")) + setl ro nomod + + "......................................... + " NetRead: (dav) NetRead Method #6 {{{3 + elseif b:netrw_method == 6 + " call Decho("read via cadaver (method #6)",'~'.expand("")) + + if !executable(g:netrw_dav_cmd) + call netrw#ErrorMsg(s:ERROR,g:netrw_dav_cmd." is not executable",73) + " call Dret("netrw#NetRead : ".g:netrw_dav_cmd." not executable") + return + endif + if g:netrw_dav_cmd =~ "curl" + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_dav_cmd." ".s:ShellEscape("dav://".g:netrw_machine.b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1)) + else + " Construct execution string (four lines) which will be passed through filter + let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) + new + setl ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port + else + NetrwKeepj put ='open '.g:netrw_machine + endif + if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" + NetrwKeepj put ='user '.g:netrw_uid.' '.s:netrw_passwd + endif + NetrwKeepj put ='get '.netrw_fname.' '.tmpfile + NetrwKeepj put ='quit' - if exists("g:netrw_uid") && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - NetrwKeepj put =g:netrw_uid -" call Decho("filter input: ".getline('.'),'~'.expand("")) - if exists("s:netrw_passwd") - NetrwKeepj put ='\"'.s:netrw_passwd.'\"' + " perform cadaver operation: + NetrwKeepj norm! 1G"_dd + call s:NetrwExe(s:netrw_silentxfer."%!".g:netrw_dav_cmd) + keepj bd! endif -" call Decho("filter input: ".getline('.'),'~'.expand("")) - elseif exists("s:netrw_passwd") - NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline('.'),'~'.expand("")) - endif - endif + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (rsync) NetRead Method #7 {{{3 + elseif b:netrw_method == 7 + " call Decho("read via rsync (method #7)",'~'.expand("")) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(g:netrw_machine.g:netrw_rsync_sep.b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1)) + let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (fetch) NetRead Method #8 {{{3 + " fetch://[user@]host[:http]/path + elseif b:netrw_method == 8 + " call Decho("read via fetch (method #8)",'~'.expand("")) + if g:netrw_fetch_cmd == "" + if !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7) + endif + " call Dret("NetRead") + return + endif + if exists("g:netrw_option") && g:netrw_option =~ ":https\=" + let netrw_option= "http" + else + let netrw_option= "ftp" + endif + " call Decho("read via fetch for ".netrw_option,'~'.expand("")) - if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" - NetrwKeepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('.'),'~'.expand("")) - endif - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('.'),'~'.expand("")) - endif - NetrwKeepj put ='get \"'.netrw_fname.'\" '.tmpfile -" call Decho("filter input: ".getline('.'),'~'.expand("")) + if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != "" + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)) + else + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)) + endif - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password - NetrwKeepj norm! 1G"_dd - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" -" call Decho("error<".getline(1).">",'~'.expand("")) - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,getline(1),5) - endif - endif - call s:SaveBufVars()|keepj bd!|call s:RestoreBufVars() - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (scp) NetRead Method #4 {{{3 - elseif b:netrw_method == 4 " read with scp -" call Decho("read via scp (method #4)",'~'.expand("")) - if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".g:netrw_port - else - let useport= "" - endif - " 'C' in 'C:\path\to\file' is handled as hostname on windows. - " This is workaround to avoid mis-handle windows local-path: - if g:netrw_scp_cmd =~ '^scp' && has("win32") - let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\(\a\):[/\\]\(.*\)$', '/\1/\2', '') - else - let tmpfile_get = tmpfile - endif - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".escape(s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1),' ')." ".s:ShellEscape(tmpfile_get,1)) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (http) NetRead Method #5 (wget) {{{3 - elseif b:netrw_method == 5 -" call Decho("read via http (method #5)",'~'.expand("")) - if g:netrw_http_cmd == "" - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6) - endif -" call Dret("netrw#NetRead :4 getcwd<".getcwd().">") - return - endif - - if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd") - " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch) -" call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)",'~'.expand("")) - if exists("g:netrw_http_xcmd") - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".s:ShellEscape(tmpfile,1)) - else - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)) - endif - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - - else - " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker) -" call Decho("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)",'~'.expand("")) - let netrw_html= substitute(b:netrw_fname,"#.*$","","") - let netrw_tag = substitute(b:netrw_fname,"^.*#","","") -" call Decho("netrw_html<".netrw_html.">",'~'.expand("")) -" call Decho("netrw_tag <".netrw_tag.">",'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.netrw_html,1)) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) -" call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/','~'.expand("")) - exe 'NetrwKeepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\" - endif - let b:netrw_lastfile = choice -" call Decho("setl ro",'~'.expand("")) - setl ro nomod - - "......................................... - " NetRead: (dav) NetRead Method #6 {{{3 - elseif b:netrw_method == 6 -" call Decho("read via cadaver (method #6)",'~'.expand("")) - - if !executable(g:netrw_dav_cmd) - call netrw#ErrorMsg(s:ERROR,g:netrw_dav_cmd." is not executable",73) -" call Dret("netrw#NetRead : ".g:netrw_dav_cmd." not executable") - return - endif - if g:netrw_dav_cmd =~ "curl" - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_dav_cmd." ".s:ShellEscape("dav://".g:netrw_machine.b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1)) - else - " Construct execution string (four lines) which will be passed through filter - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - new - setl ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port - else - NetrwKeepj put ='open '.g:netrw_machine - endif - if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" - NetrwKeepj put ='user '.g:netrw_uid.' '.s:netrw_passwd - endif - NetrwKeepj put ='get '.netrw_fname.' '.tmpfile - NetrwKeepj put ='quit' - - " perform cadaver operation: - NetrwKeepj norm! 1G"_dd - call s:NetrwExe(s:netrw_silentxfer."%!".g:netrw_dav_cmd) - keepj bd! - endif - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (rsync) NetRead Method #7 {{{3 - elseif b:netrw_method == 7 -" call Decho("read via rsync (method #7)",'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(g:netrw_machine.g:netrw_rsync_sep.b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1)) - let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (fetch) NetRead Method #8 {{{3 - " fetch://[user@]host[:http]/path - elseif b:netrw_method == 8 -" call Decho("read via fetch (method #8)",'~'.expand("")) - if g:netrw_fetch_cmd == "" - if !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7) - endif -" call Dret("NetRead") - return - endif - if exists("g:netrw_option") && g:netrw_option =~ ":https\=" - let netrw_option= "http" - else - let netrw_option= "ftp" - endif -" call Decho("read via fetch for ".netrw_option,'~'.expand("")) - - if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != "" - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)) - else - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)) - endif - - let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) - let b:netrw_lastfile = choice -" call Decho("setl ro",'~'.expand("")) - setl ro nomod - - "......................................... - " NetRead: (sftp) NetRead Method #9 {{{3 - elseif b:netrw_method == 9 -" call Decho("read via sftp (method #9)",'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: (file) NetRead Method #10 {{{3 - elseif b:netrw_method == 10 && exists("g:netrw_file_cmd") -" " call Decho("read via ".b:netrw_file_cmd." (method #10)",'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_file_cmd." ".s:ShellEscape(b:netrw_fname,1)." ".tmpfile) - let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) - let b:netrw_lastfile = choice - - "......................................... - " NetRead: Complain {{{3 - else - call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8) - endif + let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + " call Decho("setl ro",'~'.expand("")) + setl ro nomod + + "......................................... + " NetRead: (sftp) NetRead Method #9 {{{3 + elseif b:netrw_method == 9 + " call Decho("read via sftp (method #9)",'~'.expand("")) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: (file) NetRead Method #10 {{{3 + elseif b:netrw_method == 10 && exists("g:netrw_file_cmd") + " " call Decho("read via ".b:netrw_file_cmd." (method #10)",'~'.expand("")) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_file_cmd." ".s:ShellEscape(b:netrw_fname,1)." ".tmpfile) + let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) + let b:netrw_lastfile = choice + + "......................................... + " NetRead: Complain {{{3 + else + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8) + endif endwhile " NetRead: cleanup {{{3 if exists("b:netrw_method") -" call Decho("cleanup b:netrw_method and b:netrw_fname",'~'.expand("")) - unlet b:netrw_method - unlet b:netrw_fname + " call Decho("cleanup b:netrw_method and b:netrw_fname",'~'.expand("")) + unlet b:netrw_method + unlet b:netrw_fname endif if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' && tmpfile !~ '.tar.xz$' && tmpfile !~ '.txz' -" call Decho("cleanup by deleting tmpfile<".tmpfile.">",'~'.expand("")) - NetrwKeepj call s:NetrwDelete(tmpfile) + " call Decho("cleanup by deleting tmpfile<".tmpfile.">",'~'.expand("")) + NetrwKeepj call s:NetrwDelete(tmpfile) endif NetrwKeepj call s:NetrwOptionsRestore("w:") -" call Dret("netrw#NetRead :5 getcwd<".getcwd().">") + " call Dret("netrw#NetRead :5 getcwd<".getcwd().">") endfun " ------------------------------------------------------------------------ " netrw#NetWrite: responsible for writing a file over the net {{{2 fun! netrw#NetWrite(...) range -" call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw) + " call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw) " NetWrite: option handling {{{3 let mod= 0 @@ -2316,366 +2355,366 @@ fun! netrw#NetWrite(...) range " NetWrite: Get Temporary Filename {{{3 let tmpfile= s:GetTempfile("") if tmpfile == "" -" call Dret("netrw#NetWrite : unable to get a tempfile!") - return + " call Dret("netrw#NetWrite : unable to get a tempfile!") + return endif if a:0 == 0 - let ichoice = 0 + let ichoice = 0 else - let ichoice = 1 + let ichoice = 1 endif let curbufname= expand("%") -" call Decho("curbufname<".curbufname.">",'~'.expand("")) + " call Decho("curbufname<".curbufname.">",'~'.expand("")) if &binary - " For binary writes, always write entire file. - " (line numbers don't really make sense for that). - " Also supports the writing of tar and zip files. -" call Decho("(write entire file) sil exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile),'~'.expand("")) - exe "sil NetrwKeepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) + " For binary writes, always write entire file. + " (line numbers don't really make sense for that). + " Also supports the writing of tar and zip files. + " call Decho("(write entire file) sil exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile),'~'.expand("")) + exe "sil NetrwKeepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) elseif g:netrw_cygwin - " write (selected portion of) file to temporary - let cygtmpfile= substitute(tmpfile,g:netrw_cygdrive.'/\(.\)','\1:','') -" call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile),'~'.expand("")) - exe "sil NetrwKeepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile) + " write (selected portion of) file to temporary + let cygtmpfile= substitute(tmpfile,g:netrw_cygdrive.'/\(.\)','\1:','') + " call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile),'~'.expand("")) + exe "sil NetrwKeepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile) else - " write (selected portion of) file to temporary -" call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile),'~'.expand("")) - exe "sil NetrwKeepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) + " write (selected portion of) file to temporary + " call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile),'~'.expand("")) + exe "sil NetrwKeepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) endif if curbufname == "" - " when the file is [No Name], and one attempts to Nwrite it, the buffer takes - " on the temporary file's name. Deletion of the temporary file during - " cleanup then causes an error message. - 0file! + " when the file is [No Name], and one attempts to Nwrite it, the buffer takes + " on the temporary file's name. Deletion of the temporary file during + " cleanup then causes an error message. + 0file! endif " NetWrite: while choice loop: {{{3 while ichoice <= a:0 - " Process arguments: {{{4 - " attempt to repeat with previous host-file-etc - if exists("b:netrw_lastfile") && a:0 == 0 -" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">",'~'.expand("")) - let choice = b:netrw_lastfile - let ichoice= ichoice + 1 - else - exe "let choice= a:" . ichoice - - " Reconstruct Choice when choice starts with '"' - if match(choice,"?") == 0 - echomsg 'NetWrite Usage:"' - echomsg ':Nwrite machine:path uses rcp' - echomsg ':Nwrite "machine path" uses ftp with <.netrc>' - echomsg ':Nwrite "machine id password path" uses ftp' - echomsg ':Nwrite dav://[user@]machine/path uses cadaver' - echomsg ':Nwrite fetch://[user@]machine/path uses fetch' - echomsg ':Nwrite ftp://machine[#port]/path uses ftp (autodetects <.netrc>)' - echomsg ':Nwrite rcp://machine/path uses rcp' - echomsg ':Nwrite rsync://[user@]machine/path uses rsync' - echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp' - echomsg ':Nwrite sftp://[user@]machine/path uses sftp' - sleep 4 - break - - elseif match(choice,"^\"") != -1 - if match(choice,"\"$") != -1 - " case "..." - let choice=strpart(choice,1,strlen(choice)-2) - else - " case "... ... ..." - let choice = strpart(choice,1,strlen(choice)-1) - let wholechoice = "" - - while match(choice,"\"$") == -1 - let wholechoice= wholechoice . " " . choice - let ichoice = ichoice + 1 - if choice > a:0 - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13) - endif -" call Dret("netrw#NetWrite") - return - endif - let choice= a:{ichoice} - endwhile - let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) - endif - endif - endif - let ichoice= ichoice + 1 -" call Decho("choice<" . choice . "> ichoice=".ichoice,'~'.expand("")) - - " Determine method of write (ftp, rcp, etc) {{{4 - NetrwKeepj call s:NetrwMethod(choice) - if !exists("b:netrw_method") || b:netrw_method < 0 -" call Dfunc("netrw#NetWrite : unsupported method") - return - endif - - " ============= - " NetWrite: Perform Protocol-Based Write {{{3 - " ============================ - if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 - echo "(netrw) Processing your write request..." -" call Decho("Processing your write request...",'~'.expand("")) - endif - - "......................................... - " NetWrite: (rcp) NetWrite Method #1 {{{3 - if b:netrw_method == 1 -" call Decho("write via rcp (method #1)",'~'.expand("")) - if s:netrw_has_nt_rcp == 1 - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_machine .'.'. g:netrw_uid - else - let uid_machine = g:netrw_machine .'.'. $USERNAME - endif - else - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_uid .'@'. g:netrw_machine - else - let uid_machine = g:netrw_machine - endif - endif - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(uid_machine.":".b:netrw_fname,1)) - let b:netrw_lastfile = choice - - "......................................... - " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{3 - elseif b:netrw_method == 2 -" call Decho("write via ftp+.netrc (method #2)",'~'.expand("")) - let netrw_fname = b:netrw_fname - - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead - let bhkeep = &l:bh - let curbuf = bufnr("%") - setl bh=hide - keepj keepalt enew - -" call Decho("filter input window#".winnr(),'~'.expand("")) - setl ff=unix - NetrwKeepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$'),'~'.expand("")) - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline("$"),'~'.expand("")) - endif - NetrwKeepj call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"') -" call Decho("filter input: ".getline("$"),'~'.expand("")) - if exists("g:netrw_port") && g:netrw_port != "" - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)) + " Process arguments: {{{4 + " attempt to repeat with previous host-file-etc + if exists("b:netrw_lastfile") && a:0 == 0 + " call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">",'~'.expand("")) + let choice = b:netrw_lastfile + let ichoice= ichoice + 1 else -" call Decho("filter input window#".winnr(),'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)) - endif - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" - if !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),14) - endif - let mod=1 - endif - - " remove enew buffer (quietly) - let filtbuf= bufnr("%") - exe curbuf."b!" - let &l:bh = bhkeep - exe filtbuf."bw!" - - let b:netrw_lastfile = choice - - "......................................... - " NetWrite: (ftp + machine, id, passwd, filename) NetWrite Method #3 {{{3 - elseif b:netrw_method == 3 - " Construct execution string (three or more lines) which will be passed through filter -" call Decho("read via ftp+mipf (method #3)",'~'.expand("")) - let netrw_fname = b:netrw_fname - let bhkeep = &l:bh - - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead - let curbuf = bufnr("%") - setl bh=hide - keepj keepalt enew - setl ff=unix + exe "let choice= a:" . ichoice + + " Reconstruct Choice when choice starts with '"' + if match(choice,"?") == 0 + echomsg 'NetWrite Usage:"' + echomsg ':Nwrite machine:path uses rcp' + echomsg ':Nwrite "machine path" uses ftp with <.netrc>' + echomsg ':Nwrite "machine id password path" uses ftp' + echomsg ':Nwrite dav://[user@]machine/path uses cadaver' + echomsg ':Nwrite fetch://[user@]machine/path uses fetch' + echomsg ':Nwrite ftp://machine[#port]/path uses ftp (autodetects <.netrc>)' + echomsg ':Nwrite rcp://machine/path uses rcp' + echomsg ':Nwrite rsync://[user@]machine/path uses rsync' + echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp' + echomsg ':Nwrite sftp://[user@]machine/path uses sftp' + sleep 4 + break - if exists("g:netrw_port") && g:netrw_port != "" - NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline('.'),'~'.expand("")) - else - NetrwKeepj put ='open '.g:netrw_machine -" call Decho("filter input: ".getline('.'),'~'.expand("")) - endif - if exists("g:netrw_uid") && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - NetrwKeepj put =g:netrw_uid -" call Decho("filter input: ".getline('.'),'~'.expand("")) - if exists("s:netrw_passwd") && s:netrw_passwd != "" - NetrwKeepj put ='\"'.s:netrw_passwd.'\"' - endif -" call Decho("filter input: ".getline('.'),'~'.expand("")) - elseif exists("s:netrw_passwd") && s:netrw_passwd != "" - NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline('.'),'~'.expand("")) - endif - endif - NetrwKeepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$'),'~'.expand("")) - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline("$"),'~'.expand("")) + elseif match(choice,"^\"") != -1 + if match(choice,"\"$") != -1 + " case "..." + let choice=strpart(choice,1,strlen(choice)-2) + else + " case "... ... ..." + let choice = strpart(choice,1,strlen(choice)-1) + let wholechoice = "" + + while match(choice,"\"$") == -1 + let wholechoice= wholechoice . " " . choice + let ichoice = ichoice + 1 + if choice > a:0 + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13) + endif + " call Dret("netrw#NetWrite") + return + endif + let choice= a:{ichoice} + endwhile + let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) + endif + endif endif - NetrwKeepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"' -" call Decho("filter input: ".getline('.'),'~'.expand("")) - " save choice/id/password for future use - let b:netrw_lastfile = choice + let ichoice= ichoice + 1 + " call Decho("choice<" . choice . "> ichoice=".ichoice,'~'.expand("")) - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password - NetrwKeepj norm! 1G"_dd - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - if getline(1) !~ "^$" - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,getline(1),15) - endif - let mod=1 - endif - - " remove enew buffer (quietly) - let filtbuf= bufnr("%") - exe curbuf."b!" - let &l:bh= bhkeep - exe filtbuf."bw!" - - "......................................... - " NetWrite: (scp) NetWrite Method #4 {{{3 - elseif b:netrw_method == 4 -" call Decho("write via scp (method #4)",'~'.expand("")) - if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port) - else - let useport= "" + " Determine method of write (ftp, rcp, etc) {{{4 + NetrwKeepj call s:NetrwMethod(choice) + if !exists("b:netrw_method") || b:netrw_method < 0 + " call Dfunc("netrw#NetWrite : unsupported method") + return endif - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1)) - let b:netrw_lastfile = choice - "......................................... - " NetWrite: (http) NetWrite Method #5 {{{3 - elseif b:netrw_method == 5 -" call Decho("write via http (method #5)",'~'.expand("")) - let curl= substitute(g:netrw_http_put_cmd,'\s\+.*$',"","") - if executable(curl) - let url= g:netrw_choice - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_put_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(url,1) ) - elseif !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd.">",16) + " ============= + " NetWrite: Perform Protocol-Based Write {{{3 + " ============================ + if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 + echo "(netrw) Processing your write request..." + " call Decho("Processing your write request...",'~'.expand("")) endif - "......................................... - " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{3 - elseif b:netrw_method == 6 -" call Decho("write via cadaver (method #6)",'~'.expand("")) + "......................................... + " NetWrite: (rcp) NetWrite Method #1 {{{3 + if b:netrw_method == 1 + " call Decho("write via rcp (method #1)",'~'.expand("")) + if s:netrw_has_nt_rcp == 1 + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_machine .'.'. g:netrw_uid + else + let uid_machine = g:netrw_machine .'.'. $USERNAME + endif + else + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_uid .'@'. g:netrw_machine + else + let uid_machine = g:netrw_machine + endif + endif + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(uid_machine.":".b:netrw_fname,1)) + let b:netrw_lastfile = choice + + "......................................... + " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{3 + elseif b:netrw_method == 2 + " call Decho("write via ftp+.netrc (method #2)",'~'.expand("")) + let netrw_fname = b:netrw_fname + + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead + let bhkeep = &l:bh + let curbuf = bufnr("%") + setl bh=hide + keepj keepalt enew + + " call Decho("filter input window#".winnr(),'~'.expand("")) + setl ff=unix + NetrwKeepj put =g:netrw_ftpmode + " call Decho("filter input: ".getline('$'),'~'.expand("")) + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline("$"),'~'.expand("")) + endif + NetrwKeepj call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"') + " call Decho("filter input: ".getline("$"),'~'.expand("")) + if exists("g:netrw_port") && g:netrw_port != "" + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)) + else + " call Decho("filter input window#".winnr(),'~'.expand("")) + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)) + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" + if !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),14) + endif + let mod=1 + endif - " Construct execution string (four lines) which will be passed through filter - let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape) - let bhkeep = &l:bh + " remove enew buffer (quietly) + let filtbuf= bufnr("%") + exe curbuf."b!" + let &l:bh = bhkeep + exe filtbuf."bw!" - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead - let curbuf = bufnr("%") - setl bh=hide - keepj keepalt enew + let b:netrw_lastfile = choice - setl ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port - else - NetrwKeepj put ='open '.g:netrw_machine - endif - if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" - NetrwKeepj put ='user '.g:netrw_uid.' '.s:netrw_passwd - endif - NetrwKeepj put ='put '.tmpfile.' '.netrw_fname + "......................................... + " NetWrite: (ftp + machine, id, passwd, filename) NetWrite Method #3 {{{3 + elseif b:netrw_method == 3 + " Construct execution string (three or more lines) which will be passed through filter + " call Decho("read via ftp+mipf (method #3)",'~'.expand("")) + let netrw_fname = b:netrw_fname + let bhkeep = &l:bh + + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead + let curbuf = bufnr("%") + setl bh=hide + keepj keepalt enew + setl ff=unix + + if exists("g:netrw_port") && g:netrw_port != "" + NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port + " call Decho("filter input: ".getline('.'),'~'.expand("")) + else + NetrwKeepj put ='open '.g:netrw_machine + " call Decho("filter input: ".getline('.'),'~'.expand("")) + endif + if exists("g:netrw_uid") && g:netrw_uid != "" + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + NetrwKeepj put =g:netrw_uid + " call Decho("filter input: ".getline('.'),'~'.expand("")) + if exists("s:netrw_passwd") && s:netrw_passwd != "" + NetrwKeepj put ='\"'.s:netrw_passwd.'\"' + endif + " call Decho("filter input: ".getline('.'),'~'.expand("")) + elseif exists("s:netrw_passwd") && s:netrw_passwd != "" + NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' + " call Decho("filter input: ".getline('.'),'~'.expand("")) + endif + endif + NetrwKeepj put =g:netrw_ftpmode + " call Decho("filter input: ".getline('$'),'~'.expand("")) + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline("$"),'~'.expand("")) + endif + NetrwKeepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"' + " call Decho("filter input: ".getline('.'),'~'.expand("")) + " save choice/id/password for future use + let b:netrw_lastfile = choice + + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + NetrwKeepj norm! 1G"_dd + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,getline(1),15) + endif + let mod=1 + endif + + " remove enew buffer (quietly) + let filtbuf= bufnr("%") + exe curbuf."b!" + let &l:bh= bhkeep + exe filtbuf."bw!" + + "......................................... + " NetWrite: (scp) NetWrite Method #4 {{{3 + elseif b:netrw_method == 4 + " call Decho("write via scp (method #4)",'~'.expand("")) + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port) + else + let useport= "" + endif + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1)) + let b:netrw_lastfile = choice + + "......................................... + " NetWrite: (http) NetWrite Method #5 {{{3 + elseif b:netrw_method == 5 + " call Decho("write via http (method #5)",'~'.expand("")) + let curl= substitute(g:netrw_http_put_cmd,'\s\+.*$',"","") + if executable(curl) + let url= g:netrw_choice + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_put_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(url,1) ) + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd.">",16) + endif - " perform cadaver operation: - NetrwKeepj norm! 1G"_dd - call s:NetrwExe(s:netrw_silentxfer."%!".g:netrw_dav_cmd) + "......................................... + " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{3 + elseif b:netrw_method == 6 + " call Decho("write via cadaver (method #6)",'~'.expand("")) - " remove enew buffer (quietly) - let filtbuf= bufnr("%") - exe curbuf."b!" - let &l:bh = bhkeep - exe filtbuf."bw!" + " Construct execution string (four lines) which will be passed through filter + let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape) + let bhkeep = &l:bh - let b:netrw_lastfile = choice + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead + let curbuf = bufnr("%") + setl bh=hide + keepj keepalt enew - "......................................... - " NetWrite: (rsync) NetWrite Method #7 {{{3 - elseif b:netrw_method == 7 -" call Decho("write via rsync (method #7)",'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(g:netrw_machine.g:netrw_rsync_sep.b:netrw_fname,1)) - let b:netrw_lastfile = choice + setl ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port + else + NetrwKeepj put ='open '.g:netrw_machine + endif + if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" + NetrwKeepj put ='user '.g:netrw_uid.' '.s:netrw_passwd + endif + NetrwKeepj put ='put '.tmpfile.' '.netrw_fname + + " perform cadaver operation: + NetrwKeepj norm! 1G"_dd + call s:NetrwExe(s:netrw_silentxfer."%!".g:netrw_dav_cmd) + + " remove enew buffer (quietly) + let filtbuf= bufnr("%") + exe curbuf."b!" + let &l:bh = bhkeep + exe filtbuf."bw!" + + let b:netrw_lastfile = choice + + "......................................... + " NetWrite: (rsync) NetWrite Method #7 {{{3 + elseif b:netrw_method == 7 + " call Decho("write via rsync (method #7)",'~'.expand("")) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(g:netrw_machine.g:netrw_rsync_sep.b:netrw_fname,1)) + let b:netrw_lastfile = choice + + "......................................... + " NetWrite: (sftp) NetWrite Method #9 {{{3 + elseif b:netrw_method == 9 + " call Decho("write via sftp (method #9)",'~'.expand("")) + let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) + if exists("g:netrw_uid") && ( g:netrw_uid != "" ) + let uid_machine = g:netrw_uid .'@'. g:netrw_machine + else + let uid_machine = g:netrw_machine + endif - "......................................... - " NetWrite: (sftp) NetWrite Method #9 {{{3 - elseif b:netrw_method == 9 -" call Decho("write via sftp (method #9)",'~'.expand("")) - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - if exists("g:netrw_uid") && ( g:netrw_uid != "" ) - let uid_machine = g:netrw_uid .'@'. g:netrw_machine + " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead + let bhkeep = &l:bh + let curbuf = bufnr("%") + setl bh=hide + keepj keepalt enew + + setl ff=unix + call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname) + " call Decho("filter input: ".getline('.'),'~'.expand("")) + let sftpcmd= substitute(g:netrw_sftp_cmd,"%TEMPFILE%",escape(tmpfile,'\'),"g") + call s:NetrwExe(s:netrw_silentxfer."%!".sftpcmd.' '.s:ShellEscape(uid_machine,1)) + let filtbuf= bufnr("%") + exe curbuf."b!" + let &l:bh = bhkeep + exe filtbuf."bw!" + let b:netrw_lastfile = choice + + "......................................... + " NetWrite: Complain {{{3 else - let uid_machine = g:netrw_machine + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17) + let leavemod= 1 endif - - " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead - let bhkeep = &l:bh - let curbuf = bufnr("%") - setl bh=hide - keepj keepalt enew - - setl ff=unix - call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname) -" call Decho("filter input: ".getline('.'),'~'.expand("")) - let sftpcmd= substitute(g:netrw_sftp_cmd,"%TEMPFILE%",escape(tmpfile,'\'),"g") - call s:NetrwExe(s:netrw_silentxfer."%!".sftpcmd.' '.s:ShellEscape(uid_machine,1)) - let filtbuf= bufnr("%") - exe curbuf."b!" - let &l:bh = bhkeep - exe filtbuf."bw!" - let b:netrw_lastfile = choice - - "......................................... - " NetWrite: Complain {{{3 - else - call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17) - let leavemod= 1 - endif endwhile " NetWrite: Cleanup: {{{3 -" call Decho("cleanup",'~'.expand("")) + " call Decho("cleanup",'~'.expand("")) if s:FileReadable(tmpfile) -" call Decho("tmpfile<".tmpfile."> readable, will now delete it",'~'.expand("")) - call s:NetrwDelete(tmpfile) + " call Decho("tmpfile<".tmpfile."> readable, will now delete it",'~'.expand("")) + call s:NetrwDelete(tmpfile) endif call s:NetrwOptionsRestore("w:") if a:firstline == 1 && a:lastline == line("$") - " restore modifiability; usually equivalent to set nomod - let &l:mod= mod -" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + " restore modifiability; usually equivalent to set nomod + let &l:mod= mod + " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) elseif !exists("leavemod") - " indicate that the buffer has not been modified since last written -" call Decho("set nomod",'~'.expand("")) - setl nomod -" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + " indicate that the buffer has not been modified since last written + " call Decho("set nomod",'~'.expand("")) + setl nomod + " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) endif -" call Dret("netrw#NetWrite") + " call Dret("netrw#NetWrite") endfun " --------------------------------------------------------------------- @@ -2684,39 +2723,39 @@ endfun " then sources that file, " then removes that file. fun! netrw#NetSource(...) -" call Dfunc("netrw#NetSource() a:0=".a:0) + " call Dfunc("netrw#NetSource() a:0=".a:0) if a:0 > 0 && a:1 == '?' - " give help - echomsg 'NetSource Usage:' - echomsg ':Nsource dav://machine[:port]/path uses cadaver' - echomsg ':Nsource fetch://machine/path uses fetch' - echomsg ':Nsource ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' - echomsg ':Nsource http[s]://[user@]machine/path uses http wget' - echomsg ':Nsource rcp://[user@]machine/path uses rcp' - echomsg ':Nsource rsync://machine[:port]/path uses rsync' - echomsg ':Nsource scp://[user@]machine[[:#]port]/path uses scp' - echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp' - sleep 4 - else - let i= 1 - while i <= a:0 - call netrw#NetRead(3,a:{i}) -" call Decho("s:netread_tmpfile<".s:netrw_tmpfile.">",'~'.expand("")) - if s:FileReadable(s:netrw_tmpfile) -" call Decho("exe so ".fnameescape(s:netrw_tmpfile),'~'.expand("")) - exe "so ".fnameescape(s:netrw_tmpfile) -" call Decho("delete(".s:netrw_tmpfile.")",'~'.expand("")) - if delete(s:netrw_tmpfile) - call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".s:netrw_tmpfile.">!",103) - endif - unlet s:netrw_tmpfile - else - call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48) - endif - let i= i + 1 - endwhile + " give help + echomsg 'NetSource Usage:' + echomsg ':Nsource dav://machine[:port]/path uses cadaver' + echomsg ':Nsource fetch://machine/path uses fetch' + echomsg ':Nsource ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' + echomsg ':Nsource http[s]://[user@]machine/path uses http wget' + echomsg ':Nsource rcp://[user@]machine/path uses rcp' + echomsg ':Nsource rsync://machine[:port]/path uses rsync' + echomsg ':Nsource scp://[user@]machine[[:#]port]/path uses scp' + echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp' + sleep 4 + else + let i= 1 + while i <= a:0 + call netrw#NetRead(3,a:{i}) + " call Decho("s:netread_tmpfile<".s:netrw_tmpfile.">",'~'.expand("")) + if s:FileReadable(s:netrw_tmpfile) + " call Decho("exe so ".fnameescape(s:netrw_tmpfile),'~'.expand("")) + exe "so ".fnameescape(s:netrw_tmpfile) + " call Decho("delete(".s:netrw_tmpfile.")",'~'.expand("")) + if delete(s:netrw_tmpfile) + call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".s:netrw_tmpfile.">!",103) + endif + unlet s:netrw_tmpfile + else + call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48) + endif + let i= i + 1 + endwhile endif -" call Dret("netrw#NetSource") + " call Dret("netrw#NetSource") endfun " --------------------------------------------------------------------- @@ -2728,31 +2767,31 @@ fun! netrw#SetTreetop(iscmd,...) " iscmd==1: netrw#SetTreetop called using :Ntree from the command line " clear out the current tree if exists("w:netrw_treetop") - let inittreetop= w:netrw_treetop - unlet w:netrw_treetop + let inittreetop= w:netrw_treetop + unlet w:netrw_treetop endif if exists("w:netrw_treedict") - unlet w:netrw_treedict + unlet w:netrw_treedict endif if (a:iscmd == 0 || a:1 == "") && exists("inittreetop") - let treedir = s:NetrwTreePath(inittreetop) - else - if isdirectory(s:NetrwFile(a:1)) - let treedir = a:1 - let s:netrw_treetop = treedir - elseif exists("b:netrw_curdir") && (isdirectory(s:NetrwFile(b:netrw_curdir."/".a:1)) || a:1 =~ '^\a\{3,}://') - let treedir = b:netrw_curdir."/".a:1 - let s:netrw_treetop = treedir - else - " normally the cursor is left in the message window. - " However, here this results in the directory being listed in the message window, which is not wanted. - let netrwbuf= bufnr("%") - call netrw#ErrorMsg(s:ERROR,"sorry, ".a:1." doesn't seem to be a directory!",95) - exe bufwinnr(netrwbuf)."wincmd w" - let treedir = "." - let s:netrw_treetop = getcwd() - endif + let treedir = s:NetrwTreePath(inittreetop) + else + if isdirectory(s:NetrwFile(a:1)) + let treedir = a:1 + let s:netrw_treetop = treedir + elseif exists("b:netrw_curdir") && (isdirectory(s:NetrwFile(b:netrw_curdir."/".a:1)) || a:1 =~ '^\a\{3,}://') + let treedir = b:netrw_curdir."/".a:1 + let s:netrw_treetop = treedir + else + " normally the cursor is left in the message window. + " However, here this results in the directory being listed in the message window, which is not wanted. + let netrwbuf= bufnr("%") + call netrw#ErrorMsg(s:ERROR,"sorry, ".a:1." doesn't seem to be a directory!",95) + exe bufwinnr(netrwbuf)."wincmd w" + let treedir = "." + let s:netrw_treetop = getcwd() + endif endif " determine if treedir is remote or local @@ -2760,9 +2799,9 @@ fun! netrw#SetTreetop(iscmd,...) " browse the resulting directory if islocal - call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(islocal,treedir,0)) + call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(islocal,treedir,0)) else - call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,treedir,0)) + call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,treedir,0)) endif endfun @@ -2774,125 +2813,125 @@ endfun " == r : read file after current line " == t : leave file in temporary form (ie. don't read into buffer) fun! s:NetrwGetFile(readcmd, tfile, method) -" call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)") + " call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)") " readcmd=='t': simply do nothing if a:readcmd == 't' -" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) -" call Dret("NetrwGetFile : skip read of tfile<".a:tfile.">") - return + " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + " call Dret("NetrwGetFile : skip read of tfile<".a:tfile.">") + return endif " get name of remote filename (ie. url and all) let rfile= bufname("%") -" call Decho("rfile<".rfile.">",'~'.expand("")) + " call Decho("rfile<".rfile.">",'~'.expand("")) if exists("*NetReadFixup") - " for the use of NetReadFixup (not otherwise used internally) - let line2= line("$") + " for the use of NetReadFixup (not otherwise used internally) + let line2= line("$") endif if a:readcmd[0] == '%' - " get file into buffer -" call Decho("get file into buffer",'~'.expand("")) - - " rename the current buffer to the temp file (ie. tfile) - if g:netrw_cygwin - let tfile= substitute(a:tfile,g:netrw_cygdrive.'/\(.\)','\1:','') - else - let tfile= a:tfile - endif - call s:NetrwBufRename(tfile) - - " edit temporary file (ie. read the temporary file in) - if rfile =~ '\.zip$' -" call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)",'~'.expand("")) - call zip#Browse(tfile) - elseif rfile =~ '\.tar$' -" call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)",'~'.expand("")) - call tar#Browse(tfile) - elseif rfile =~ '\.tar\.gz$' -" call Decho("handling remote gzip-compressed tar file",'~'.expand("")) - call tar#Browse(tfile) - elseif rfile =~ '\.tar\.bz2$' -" call Decho("handling remote bz2-compressed tar file",'~'.expand("")) - call tar#Browse(tfile) - elseif rfile =~ '\.tar\.xz$' -" call Decho("handling remote xz-compressed tar file",'~'.expand("")) - call tar#Browse(tfile) - elseif rfile =~ '\.txz$' -" call Decho("handling remote xz-compressed tar file (.txz)",'~'.expand("")) - call tar#Browse(tfile) - else -" call Decho("edit temporary file",'~'.expand("")) - NetrwKeepj e! - endif - - " rename buffer back to remote filename - call s:NetrwBufRename(rfile) - - " Jan 19, 2022: COMBAK -- bram problem with https://github.com/vim/vim/pull/9554.diff filetype - " Detect filetype of local version of remote file. - " Note that isk must not include a "/" for scripts.vim - " to process this detection correctly. -" call Decho("detect filetype of local version of remote file<".rfile.">",'~'.expand("")) -" call Decho("..did_filetype()=".did_filetype()) -" setl ft= -" call Decho("..initial filetype<".&ft."> for buf#".bufnr()."<".bufname().">") - let iskkeep= &isk - setl isk-=/ - filetype detect -" call Decho("..local filetype<".&ft."> for buf#".bufnr()."<".bufname().">") - let &l:isk= iskkeep -" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)") - let line1 = 1 - let line2 = line("$") + " get file into buffer + " call Decho("get file into buffer",'~'.expand("")) + + " rename the current buffer to the temp file (ie. tfile) + if g:netrw_cygwin + let tfile= substitute(a:tfile,g:netrw_cygdrive.'/\(.\)','\1:','') + else + let tfile= a:tfile + endif + call s:NetrwBufRename(tfile) + + " edit temporary file (ie. read the temporary file in) + if rfile =~ '\.zip$' + " call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)",'~'.expand("")) + call zip#Browse(tfile) + elseif rfile =~ '\.tar$' + " call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)",'~'.expand("")) + call tar#Browse(tfile) + elseif rfile =~ '\.tar\.gz$' + " call Decho("handling remote gzip-compressed tar file",'~'.expand("")) + call tar#Browse(tfile) + elseif rfile =~ '\.tar\.bz2$' + " call Decho("handling remote bz2-compressed tar file",'~'.expand("")) + call tar#Browse(tfile) + elseif rfile =~ '\.tar\.xz$' + " call Decho("handling remote xz-compressed tar file",'~'.expand("")) + call tar#Browse(tfile) + elseif rfile =~ '\.txz$' + " call Decho("handling remote xz-compressed tar file (.txz)",'~'.expand("")) + call tar#Browse(tfile) + else + " call Decho("edit temporary file",'~'.expand("")) + NetrwKeepj e! + endif + + " rename buffer back to remote filename + call s:NetrwBufRename(rfile) + + " Jan 19, 2022: COMBAK -- bram problem with https://github.com/vim/vim/pull/9554.diff filetype + " Detect filetype of local version of remote file. + " Note that isk must not include a "/" for scripts.vim + " to process this detection correctly. + " call Decho("detect filetype of local version of remote file<".rfile.">",'~'.expand("")) + " call Decho("..did_filetype()=".did_filetype()) + " setl ft= + " call Decho("..initial filetype<".&ft."> for buf#".bufnr()."<".bufname().">") + let iskkeep= &isk + setl isk-=/ + filetype detect + " call Decho("..local filetype<".&ft."> for buf#".bufnr()."<".bufname().">") + let &l:isk= iskkeep + " call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)") + let line1 = 1 + let line2 = line("$") elseif !&ma - " attempting to read a file after the current line in the file, but the buffer is not modifiable - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"attempt to read<".a:tfile."> into a non-modifiable buffer!",94) -" call Dret("NetrwGetFile : attempt to read<".a:tfile."> into a non-modifiable buffer!") - return + " attempting to read a file after the current line in the file, but the buffer is not modifiable + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"attempt to read<".a:tfile."> into a non-modifiable buffer!",94) + " call Dret("NetrwGetFile : attempt to read<".a:tfile."> into a non-modifiable buffer!") + return elseif s:FileReadable(a:tfile) - " read file after current line -" call Decho("read file<".a:tfile."> after current line",'~'.expand("")) - let curline = line(".") - let lastline= line("$") -" call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)."> line#".curline,'~'.expand("")) - exe "NetrwKeepj ".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile) - let line1= curline + 1 - let line2= line("$") - lastline + 1 - - else - " not readable -" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) -" call Decho("tfile<".a:tfile."> not readable",'~'.expand("")) - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9) -" call Dret("NetrwGetFile : tfile<".a:tfile."> not readable") - return + " read file after current line + " call Decho("read file<".a:tfile."> after current line",'~'.expand("")) + let curline = line(".") + let lastline= line("$") + " call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)."> line#".curline,'~'.expand("")) + exe "NetrwKeepj ".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile) + let line1= curline + 1 + let line2= line("$") - lastline + 1 + + else + " not readable + " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + " call Decho("tfile<".a:tfile."> not readable",'~'.expand("")) + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9) + " call Dret("NetrwGetFile : tfile<".a:tfile."> not readable") + return endif " User-provided (ie. optional) fix-it-up command if exists("*NetReadFixup") -" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")",'~'.expand("")) - NetrwKeepj call NetReadFixup(a:method, line1, line2) -" else " Decho -" call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")",'~'.expand("")) + " call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")",'~'.expand("")) + NetrwKeepj call NetReadFixup(a:method, line1, line2) + " else " Decho + " call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")",'~'.expand("")) endif if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu - " update the Buffers menu - NetrwKeepj call s:UpdateBuffersMenu() + " update the Buffers menu + NetrwKeepj call s:UpdateBuffersMenu() endif -" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile),'~'.expand("")) + " call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile),'~'.expand("")) - " make sure file is being displayed -" redraw! + " make sure file is being displayed + " redraw! -" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) -" call Dret("NetrwGetFile") + " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + " call Dret("NetrwGetFile") endfun " ------------------------------------------------------------------------ @@ -2902,44 +2941,44 @@ endfun " Output: " b:netrw_method= 1: rcp " 2: ftp + <.netrc> -" 3: ftp + machine, id, password, and [path]filename -" 4: scp -" 5: http[s] (wget) -" 6: dav -" 7: rsync -" 8: fetch -" 9: sftp -" 10: file +" 3: ftp + machine, id, password, and [path]filename +" 4: scp +" 5: http[s] (wget) +" 6: dav +" 7: rsync +" 8: fetch +" 9: sftp +" 10: file " g:netrw_machine= hostname " b:netrw_fname = filename " g:netrw_port = optional port number (for ftp) " g:netrw_choice = copy of input url (choice) fun! s:NetrwMethod(choice) -" call Dfunc("s:NetrwMethod(a:choice<".a:choice.">)") + " call Dfunc("s:NetrwMethod(a:choice<".a:choice.">)") - " sanity check: choice should have at least three slashes in it - if strlen(substitute(a:choice,'[^/]','','g')) < 3 + " sanity check: choice should have at least three slashes in it + if strlen(substitute(a:choice,'[^/]','','g')) < 3 call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78) let b:netrw_method = -1 -" call Dret("s:NetrwMethod : incorrect url format<".a:choice.">") + " call Dret("s:NetrwMethod : incorrect url format<".a:choice.">") return - endif + endif - " record current g:netrw_machine, if any - " curmachine used if protocol == ftp and no .netrc - if exists("g:netrw_machine") + " record current g:netrw_machine, if any + " curmachine used if protocol == ftp and no .netrc + if exists("g:netrw_machine") let curmachine= g:netrw_machine -" call Decho("curmachine<".curmachine.">",'~'.expand("")) - else + " call Decho("curmachine<".curmachine.">",'~'.expand("")) + else let curmachine= "N O T A HOST" - endif - if exists("g:netrw_port") + endif + if exists("g:netrw_port") let netrw_port= g:netrw_port - endif + endif - " insure that netrw_ftp_cmd starts off every method determination - " with the current g:netrw_ftp_cmd - let s:netrw_ftp_cmd= g:netrw_ftp_cmd + " insure that netrw_ftp_cmd starts off every method determination + " with the current g:netrw_ftp_cmd + let s:netrw_ftp_cmd= g:netrw_ftp_cmd " initialization let b:netrw_method = 0 @@ -2949,18 +2988,18 @@ fun! s:NetrwMethod(choice) let g:netrw_choice = a:choice " Patterns: - " mipf : a:machine a:id password filename Use ftp - " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd + " mipf : a:machine a:id password filename Use ftp + " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd " ftpurm : ftp://[user@]host[[#:]port]/filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd - " rcpurm : rcp://[user@]host/filename Use rcp - " rcphf : [user@]host:filename Use rcp + " rcpurm : rcp://[user@]host/filename Use rcp + " rcphf : [user@]host:filename Use rcp " scpurm : scp://[user@]host[[#:]port]/filename Use scp - " httpurm : http[s]://[user@]host/filename Use wget + " httpurm : http[s]://[user@]host/filename Use wget " davurm : dav[s]://host[:port]/path Use cadaver/curl " rsyncurm : rsync://host[:port]/path Use rsync " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http) " sftpurm : sftp://[user@]host/filename Use scp - " fileurm : file://[user@]host/filename Use elinks or links + " fileurm : file://[user@]host/filename Use elinks or links let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$' let mf = '^\(\S\+\)\s\+\(\S\+\)$' let ftpurm = '^ftp://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' @@ -2974,306 +3013,306 @@ fun! s:NetrwMethod(choice) let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$' let fileurm = '^file\=://\(.*\)$' -" call Decho("determine method:",'~'.expand("")) + " call Decho("determine method:",'~'.expand("")) " Determine Method " Method#1: rcp://user@hostname/...path-to-file {{{3 if match(a:choice,rcpurm) == 0 -" call Decho("rcp://...",'~'.expand("")) - let b:netrw_method = 1 - let userid = substitute(a:choice,rcpurm,'\1',"") - let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"") - let b:netrw_fname = substitute(a:choice,rcpurm,'\3',"") - if userid != "" - let g:netrw_uid= userid - endif + " call Decho("rcp://...",'~'.expand("")) + let b:netrw_method = 1 + let userid = substitute(a:choice,rcpurm,'\1',"") + let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"") + let b:netrw_fname = substitute(a:choice,rcpurm,'\3',"") + if userid != "" + let g:netrw_uid= userid + endif " Method#4: scp://user@hostname/...path-to-file {{{3 elseif match(a:choice,scpurm) == 0 -" call Decho("scp://...",'~'.expand("")) - let b:netrw_method = 4 - let g:netrw_machine = substitute(a:choice,scpurm,'\1',"") - let g:netrw_port = substitute(a:choice,scpurm,'\2',"") - let b:netrw_fname = substitute(a:choice,scpurm,'\3',"") + " call Decho("scp://...",'~'.expand("")) + let b:netrw_method = 4 + let g:netrw_machine = substitute(a:choice,scpurm,'\1',"") + let g:netrw_port = substitute(a:choice,scpurm,'\2',"") + let b:netrw_fname = substitute(a:choice,scpurm,'\3',"") " Method#5: http[s]://user@hostname/...path-to-file {{{3 elseif match(a:choice,httpurm) == 0 -" call Decho("http[s]://...",'~'.expand("")) - let b:netrw_method = 5 - let g:netrw_machine= substitute(a:choice,httpurm,'\1',"") - let b:netrw_fname = substitute(a:choice,httpurm,'\2',"") - let b:netrw_http = (a:choice =~ '^https:')? "https" : "http" + " call Decho("http[s]://...",'~'.expand("")) + let b:netrw_method = 5 + let g:netrw_machine= substitute(a:choice,httpurm,'\1',"") + let b:netrw_fname = substitute(a:choice,httpurm,'\2',"") + let b:netrw_http = (a:choice =~ '^https:')? "https" : "http" " Method#6: dav://hostname[:port]/..path-to-file.. {{{3 elseif match(a:choice,davurm) == 0 -" call Decho("dav://...",'~'.expand("")) - let b:netrw_method= 6 - if a:choice =~ 'davs:' - let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"") - else - let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"") - endif - let b:netrw_fname = substitute(a:choice,davurm,'\3',"") - - " Method#7: rsync://user@hostname/...path-to-file {{{3 + " call Decho("dav://...",'~'.expand("")) + let b:netrw_method= 6 + if a:choice =~ 'davs:' + let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"") + else + let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"") + endif + let b:netrw_fname = substitute(a:choice,davurm,'\3',"") + + " Method#7: rsync://user@hostname/...path-to-file {{{3 elseif match(a:choice,rsyncurm) == 0 -" call Decho("rsync://...",'~'.expand("")) - let b:netrw_method = 7 - let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"") - let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"") + " call Decho("rsync://...",'~'.expand("")) + let b:netrw_method = 7 + let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"") + let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"") - " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{3 + " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{3 elseif match(a:choice,ftpurm) == 0 -" call Decho("ftp://...",'~'.expand("")) - let userid = substitute(a:choice,ftpurm,'\2',"") - let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") - let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") - let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"") -" call Decho("g:netrw_machine<".g:netrw_machine.">",'~'.expand("")) - if userid != "" - let g:netrw_uid= userid - endif - - if curmachine != g:netrw_machine - if exists("s:netrw_hup[".g:netrw_machine."]") - call NetUserPass("ftp:".g:netrw_machine) - elseif exists("s:netrw_passwd") - " if there's a change in hostname, require password re-entry - unlet s:netrw_passwd - endif - if exists("netrw_port") - unlet netrw_port - endif - endif - - if exists("g:netrw_uid") && exists("s:netrw_passwd") - let b:netrw_method = 3 - else - let host= substitute(g:netrw_machine,'\..*$','','') - if exists("s:netrw_hup[host]") - call NetUserPass("ftp:".host) - - elseif has("win32") && s:netrw_ftp_cmd =~# '-[sS]:' -" call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("")) -" call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">",'~'.expand("")) - if g:netrw_ftp_cmd =~# '-[sS]:\S*MACHINE\>' - let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\',g:netrw_machine,'') -" call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("")) - endif - let b:netrw_method= 2 - elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc -" call Decho("using <".expand("$HOME/.netrc")."> (readable)",'~'.expand("")) - let b:netrw_method= 2 - else - if !exists("g:netrw_uid") || g:netrw_uid == "" - call NetUserPass() - elseif !exists("s:netrw_passwd") || s:netrw_passwd == "" - call NetUserPass(g:netrw_uid) - " else just use current g:netrw_uid and s:netrw_passwd - endif - let b:netrw_method= 3 - endif - endif + " call Decho("ftp://...",'~'.expand("")) + let userid = substitute(a:choice,ftpurm,'\2',"") + let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") + let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") + let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"") + " call Decho("g:netrw_machine<".g:netrw_machine.">",'~'.expand("")) + if userid != "" + let g:netrw_uid= userid + endif + + if curmachine != g:netrw_machine + if exists("s:netrw_hup[".g:netrw_machine."]") + call NetUserPass("ftp:".g:netrw_machine) + elseif exists("s:netrw_passwd") + " if there's a change in hostname, require password re-entry + unlet s:netrw_passwd + endif + if exists("netrw_port") + unlet netrw_port + endif + endif + + if exists("g:netrw_uid") && exists("s:netrw_passwd") + let b:netrw_method = 3 + else + let host= substitute(g:netrw_machine,'\..*$','','') + if exists("s:netrw_hup[host]") + call NetUserPass("ftp:".host) + + elseif has("win32") && s:netrw_ftp_cmd =~# '-[sS]:' + " call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("")) + " call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">",'~'.expand("")) + if g:netrw_ftp_cmd =~# '-[sS]:\S*MACHINE\>' + let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\',g:netrw_machine,'') + " call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("")) + endif + let b:netrw_method= 2 + elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc + " call Decho("using <".expand("$HOME/.netrc")."> (readable)",'~'.expand("")) + let b:netrw_method= 2 + else + if !exists("g:netrw_uid") || g:netrw_uid == "" + call NetUserPass() + elseif !exists("s:netrw_passwd") || s:netrw_passwd == "" + call NetUserPass(g:netrw_uid) + " else just use current g:netrw_uid and s:netrw_passwd + endif + let b:netrw_method= 3 + endif + endif " Method#8: fetch {{{3 elseif match(a:choice,fetchurm) == 0 -" call Decho("fetch://...",'~'.expand("")) - let b:netrw_method = 8 - let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"") - let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"") - let b:netrw_option = substitute(a:choice,fetchurm,'\4',"") - let b:netrw_fname = substitute(a:choice,fetchurm,'\5',"") - - " Method#3: Issue an ftp : "machine id password [path/]filename" {{{3 + " call Decho("fetch://...",'~'.expand("")) + let b:netrw_method = 8 + let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"") + let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"") + let b:netrw_option = substitute(a:choice,fetchurm,'\4',"") + let b:netrw_fname = substitute(a:choice,fetchurm,'\5',"") + + " Method#3: Issue an ftp : "machine id password [path/]filename" {{{3 elseif match(a:choice,mipf) == 0 -" call Decho("(ftp) host id pass file",'~'.expand("")) - let b:netrw_method = 3 - let g:netrw_machine = substitute(a:choice,mipf,'\1',"") - let g:netrw_uid = substitute(a:choice,mipf,'\2',"") - let s:netrw_passwd = substitute(a:choice,mipf,'\3',"") - let b:netrw_fname = substitute(a:choice,mipf,'\4',"") - call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd) + " call Decho("(ftp) host id pass file",'~'.expand("")) + let b:netrw_method = 3 + let g:netrw_machine = substitute(a:choice,mipf,'\1',"") + let g:netrw_uid = substitute(a:choice,mipf,'\2',"") + let s:netrw_passwd = substitute(a:choice,mipf,'\3',"") + let b:netrw_fname = substitute(a:choice,mipf,'\4',"") + call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd) " Method#3: Issue an ftp: "hostname [path/]filename" {{{3 elseif match(a:choice,mf) == 0 -" call Decho("(ftp) host file",'~'.expand("")) - if exists("g:netrw_uid") && exists("s:netrw_passwd") - let b:netrw_method = 3 - let g:netrw_machine = substitute(a:choice,mf,'\1',"") - let b:netrw_fname = substitute(a:choice,mf,'\2',"") + " call Decho("(ftp) host file",'~'.expand("")) + if exists("g:netrw_uid") && exists("s:netrw_passwd") + let b:netrw_method = 3 + let g:netrw_machine = substitute(a:choice,mf,'\1',"") + let b:netrw_fname = substitute(a:choice,mf,'\2',"") - elseif s:FileReadable(expand("$HOME/.netrc")) - let b:netrw_method = 2 - let g:netrw_machine = substitute(a:choice,mf,'\1',"") - let b:netrw_fname = substitute(a:choice,mf,'\2',"") - endif + elseif s:FileReadable(expand("$HOME/.netrc")) + let b:netrw_method = 2 + let g:netrw_machine = substitute(a:choice,mf,'\1',"") + let b:netrw_fname = substitute(a:choice,mf,'\2',"") + endif " Method#9: sftp://user@hostname/...path-to-file {{{3 elseif match(a:choice,sftpurm) == 0 -" call Decho("sftp://...",'~'.expand("")) - let b:netrw_method = 9 - let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"") - let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"") + " call Decho("sftp://...",'~'.expand("")) + let b:netrw_method = 9 + let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"") + let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"") " Method#1: Issue an rcp: hostname:filename" (this one should be last) {{{3 elseif match(a:choice,rcphf) == 0 -" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">",'~'.expand("")) - let b:netrw_method = 1 - let userid = substitute(a:choice,rcphf,'\2',"") - let g:netrw_machine = substitute(a:choice,rcphf,'\3',"") - let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") -" call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">",'~'.expand("")) -" call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">",'~'.expand("")) -" call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">",'~'.expand("")) -" call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">",'~'.expand("")) - if userid != "" - let g:netrw_uid= userid - endif - - " Method#10: file://user@hostname/...path-to-file {{{3 + " call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">",'~'.expand("")) + let b:netrw_method = 1 + let userid = substitute(a:choice,rcphf,'\2',"") + let g:netrw_machine = substitute(a:choice,rcphf,'\3',"") + let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") + " call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">",'~'.expand("")) + " call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">",'~'.expand("")) + " call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">",'~'.expand("")) + " call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">",'~'.expand("")) + if userid != "" + let g:netrw_uid= userid + endif + + " Method#10: file://user@hostname/...path-to-file {{{3 elseif match(a:choice,fileurm) == 0 && exists("g:netrw_file_cmd") -" call Decho("http[s]://...",'~'.expand("")) - let b:netrw_method = 10 - let b:netrw_fname = substitute(a:choice,fileurm,'\1',"") -" call Decho('\1<'.substitute(a:choice,fileurm,'\1',"").">",'~'.expand("")) + " call Decho("http[s]://...",'~'.expand("")) + let b:netrw_method = 10 + let b:netrw_fname = substitute(a:choice,fileurm,'\1',"") + " call Decho('\1<'.substitute(a:choice,fileurm,'\1',"").">",'~'.expand("")) " Cannot Determine Method {{{3 else - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45) - endif - let b:netrw_method = -1 + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45) + endif + let b:netrw_method = -1 endif "}}}3 if g:netrw_port != "" - " remove any leading [:#] from port number - let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','') + " remove any leading [:#] from port number + let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','') elseif exists("netrw_port") - " retain port number as implicit for subsequent ftp operations - let g:netrw_port= netrw_port + " retain port number as implicit for subsequent ftp operations + let g:netrw_port= netrw_port endif -" call Decho("a:choice <".a:choice.">",'~'.expand("")) -" call Decho("b:netrw_method <".b:netrw_method.">",'~'.expand("")) -" call Decho("g:netrw_machine<".g:netrw_machine.">",'~'.expand("")) -" call Decho("g:netrw_port <".g:netrw_port.">",'~'.expand("")) -" if exists("g:netrw_uid") "Decho -" call Decho("g:netrw_uid <".g:netrw_uid.">",'~'.expand("")) -" endif "Decho -" if exists("s:netrw_passwd") "Decho -" call Decho("s:netrw_passwd <".s:netrw_passwd.">",'~'.expand("")) -" endif "Decho -" call Decho("b:netrw_fname <".b:netrw_fname.">",'~'.expand("")) -" call Dret("s:NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port) + " call Decho("a:choice <".a:choice.">",'~'.expand("")) + " call Decho("b:netrw_method <".b:netrw_method.">",'~'.expand("")) + " call Decho("g:netrw_machine<".g:netrw_machine.">",'~'.expand("")) + " call Decho("g:netrw_port <".g:netrw_port.">",'~'.expand("")) + " if exists("g:netrw_uid") "Decho + " call Decho("g:netrw_uid <".g:netrw_uid.">",'~'.expand("")) + " endif "Decho + " if exists("s:netrw_passwd") "Decho + " call Decho("s:netrw_passwd <".s:netrw_passwd.">",'~'.expand("")) + " endif "Decho + " call Decho("b:netrw_fname <".b:netrw_fname.">",'~'.expand("")) + " call Dret("s:NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port) endfun " --------------------------------------------------------------------- " NetUserPass: set username and password for subsequent ftp transfer {{{2 -" Usage: :call NetUserPass() -- will prompt for userid and password -" :call NetUserPass("uid") -- will prompt for password -" :call NetUserPass("uid","password") -- sets global userid and password -" :call NetUserPass("ftp:host") -- looks up userid and password using hup dictionary -" :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password +" Usage: :call NetUserPass() -- will prompt for userid and password +" :call NetUserPass("uid") -- will prompt for password +" :call NetUserPass("uid","password") -- sets global userid and password +" :call NetUserPass("ftp:host") -- looks up userid and password using hup dictionary +" :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password fun! NetUserPass(...) -" call Dfunc("NetUserPass() a:0=".a:0) - - if !exists('s:netrw_hup') - let s:netrw_hup= {} - endif - - if a:0 == 0 - " case: no input arguments - - " change host and username if not previously entered; get new password - if !exists("g:netrw_machine") - let g:netrw_machine= input('Enter hostname: ') - endif - if !exists("g:netrw_uid") || g:netrw_uid == "" - " get username (user-id) via prompt - let g:netrw_uid= input('Enter username: ') - endif - " get password via prompting - let s:netrw_passwd= inputsecret("Enter Password: ") - - " set up hup database - let host = substitute(g:netrw_machine,'\..*$','','') - if !exists('s:netrw_hup[host]') - let s:netrw_hup[host]= {} - endif - let s:netrw_hup[host].uid = g:netrw_uid - let s:netrw_hup[host].passwd = s:netrw_passwd - - elseif a:0 == 1 - " case: one input argument - - if a:1 =~ '^ftp:' - " get host from ftp:... url - " access userid and password from hup (host-user-passwd) dictionary -" call Decho("case a:0=1: a:1<".a:1."> (get host from ftp:... url)",'~'.expand("")) - let host = substitute(a:1,'^ftp:','','') - let host = substitute(host,'\..*','','') - if exists("s:netrw_hup[host]") - let g:netrw_uid = s:netrw_hup[host].uid - let s:netrw_passwd = s:netrw_hup[host].passwd -" call Decho("get s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">",'~'.expand("")) -" call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">",'~'.expand("")) - else - let g:netrw_uid = input("Enter UserId: ") - let s:netrw_passwd = inputsecret("Enter Password: ") - endif - - else - " case: one input argument, not an url. Using it as a new user-id. -" call Decho("case a:0=1: a:1<".a:1."> (get host from input argument, not an url)",'~'.expand("")) - if exists("g:netrw_machine") - if g:netrw_machine =~ '[0-9.]\+' - let host= g:netrw_machine - else - let host= substitute(g:netrw_machine,'\..*$','','') - endif - else - let g:netrw_machine= input('Enter hostname: ') - endif - let g:netrw_uid = a:1 -" call Decho("set g:netrw_uid= <".g:netrw_uid.">",'~'.expand("")) - if exists("g:netrw_passwd") - " ask for password if one not previously entered - let s:netrw_passwd= g:netrw_passwd - else - let s:netrw_passwd = inputsecret("Enter Password: ") - endif - endif - -" call Decho("host<".host.">",'~'.expand("")) - if exists("host") - if !exists('s:netrw_hup[host]') - let s:netrw_hup[host]= {} - endif - let s:netrw_hup[host].uid = g:netrw_uid - let s:netrw_hup[host].passwd = s:netrw_passwd - endif - - elseif a:0 == 2 - let g:netrw_uid = a:1 - let s:netrw_passwd = a:2 - - elseif a:0 == 3 - " enter hostname, user-id, and password into the hup dictionary - let host = substitute(a:1,'^\a\+:','','') - let host = substitute(host,'\..*$','','') - if !exists('s:netrw_hup[host]') - let s:netrw_hup[host]= {} - endif - let s:netrw_hup[host].uid = a:2 - let s:netrw_hup[host].passwd = a:3 - let g:netrw_uid = s:netrw_hup[host].uid - let s:netrw_passwd = s:netrw_hup[host].passwd -" call Decho("set s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">",'~'.expand("")) -" call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">",'~'.expand("")) - endif - -" call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">") + " call Dfunc("NetUserPass() a:0=".a:0) + + if !exists('s:netrw_hup') + let s:netrw_hup= {} + endif + + if a:0 == 0 + " case: no input arguments + + " change host and username if not previously entered; get new password + if !exists("g:netrw_machine") + let g:netrw_machine= input('Enter hostname: ') + endif + if !exists("g:netrw_uid") || g:netrw_uid == "" + " get username (user-id) via prompt + let g:netrw_uid= input('Enter username: ') + endif + " get password via prompting + let s:netrw_passwd= inputsecret("Enter Password: ") + + " set up hup database + let host = substitute(g:netrw_machine,'\..*$','','') + if !exists('s:netrw_hup[host]') + let s:netrw_hup[host]= {} + endif + let s:netrw_hup[host].uid = g:netrw_uid + let s:netrw_hup[host].passwd = s:netrw_passwd + + elseif a:0 == 1 + " case: one input argument + + if a:1 =~ '^ftp:' + " get host from ftp:... url + " access userid and password from hup (host-user-passwd) dictionary + " call Decho("case a:0=1: a:1<".a:1."> (get host from ftp:... url)",'~'.expand("")) + let host = substitute(a:1,'^ftp:','','') + let host = substitute(host,'\..*','','') + if exists("s:netrw_hup[host]") + let g:netrw_uid = s:netrw_hup[host].uid + let s:netrw_passwd = s:netrw_hup[host].passwd + " call Decho("get s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">",'~'.expand("")) + " call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">",'~'.expand("")) + else + let g:netrw_uid = input("Enter UserId: ") + let s:netrw_passwd = inputsecret("Enter Password: ") + endif + + else + " case: one input argument, not an url. Using it as a new user-id. + " call Decho("case a:0=1: a:1<".a:1."> (get host from input argument, not an url)",'~'.expand("")) + if exists("g:netrw_machine") + if g:netrw_machine =~ '[0-9.]\+' + let host= g:netrw_machine + else + let host= substitute(g:netrw_machine,'\..*$','','') + endif + else + let g:netrw_machine= input('Enter hostname: ') + endif + let g:netrw_uid = a:1 + " call Decho("set g:netrw_uid= <".g:netrw_uid.">",'~'.expand("")) + if exists("g:netrw_passwd") + " ask for password if one not previously entered + let s:netrw_passwd= g:netrw_passwd + else + let s:netrw_passwd = inputsecret("Enter Password: ") + endif + endif + + " call Decho("host<".host.">",'~'.expand("")) + if exists("host") + if !exists('s:netrw_hup[host]') + let s:netrw_hup[host]= {} + endif + let s:netrw_hup[host].uid = g:netrw_uid + let s:netrw_hup[host].passwd = s:netrw_passwd + endif + + elseif a:0 == 2 + let g:netrw_uid = a:1 + let s:netrw_passwd = a:2 + + elseif a:0 == 3 + " enter hostname, user-id, and password into the hup dictionary + let host = substitute(a:1,'^\a\+:','','') + let host = substitute(host,'\..*$','','') + if !exists('s:netrw_hup[host]') + let s:netrw_hup[host]= {} + endif + let s:netrw_hup[host].uid = a:2 + let s:netrw_hup[host].passwd = a:3 + let g:netrw_uid = s:netrw_hup[host].uid + let s:netrw_passwd = s:netrw_hup[host].passwd + " call Decho("set s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">",'~'.expand("")) + " call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">",'~'.expand("")) + endif + + " call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">") endfun " ================================= @@ -3283,13 +3322,13 @@ endfun " --------------------------------------------------------------------- " s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2 fun! s:ExplorePatHls(pattern) -" call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)") + " call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)") let repat= substitute(a:pattern,'^**/\{1,2}','','') -" call Decho("repat<".repat.">",'~'.expand("")) + " call Decho("repat<".repat.">",'~'.expand("")) let repat= escape(repat,'][.\') -" call Decho("repat<".repat.">",'~'.expand("")) + " call Decho("repat<".repat.">",'~'.expand("")) let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>' -" call Dret("s:ExplorePatHls repat<".repat.">") + " call Dret("s:ExplorePatHls repat<".repat.">") return repat endfun @@ -3303,185 +3342,185 @@ endfun " 5: (user: ) go down (next) directory, using history " 6: (user: ) delete bookmark fun! s:NetrwBookHistHandler(chg,curdir) -" call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhistcnt." histmax=".g:netrw_dirhistmax) + " call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhistcnt." histmax=".g:netrw_dirhistmax) if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 -" " call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax") - return + " " call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax") + return endif let ykeep = @@ let curbufnr = bufnr("%") if a:chg == 0 - " bookmark the current directory -" call Decho("(user: ) bookmark the current directory",'~'.expand("")) - if exists("s:netrwmarkfilelist_{curbufnr}") - call s:NetrwBookmark(0) - echo "bookmarked marked files" - else - call s:MakeBookmark(a:curdir) - echo "bookmarked the current directory" - endif - - try - call s:NetrwBookHistSave() - catch - endtry + " bookmark the current directory + " call Decho("(user: ) bookmark the current directory",'~'.expand("")) + if exists("s:netrwmarkfilelist_{curbufnr}") + call s:NetrwBookmark(0) + echo "bookmarked marked files" + else + call s:MakeBookmark(a:curdir) + echo "bookmarked the current directory" + endif + + try + call s:NetrwBookHistSave() + catch + endtry elseif a:chg == 1 - " change to the bookmarked directory -" call Decho("(user: <".v:count."gb>) change to the bookmarked directory",'~'.expand("")) - if exists("g:netrw_bookmarklist[v:count-1]") -" call Decho("(user: <".v:count."gb>) bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("")) - exe "NetrwKeepj e ".fnameescape(g:netrw_bookmarklist[v:count-1]) - else - echomsg "Sorry, bookmark#".v:count." doesn't exist!" - endif + " change to the bookmarked directory + " call Decho("(user: <".v:count."gb>) change to the bookmarked directory",'~'.expand("")) + if exists("g:netrw_bookmarklist[v:count-1]") + " call Decho("(user: <".v:count."gb>) bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("")) + exe "NetrwKeepj e ".fnameescape(g:netrw_bookmarklist[v:count-1]) + else + echomsg "Sorry, bookmark#".v:count." doesn't exist!" + endif elseif a:chg == 2 -" redraw! - let didwork= 0 - " list user's bookmarks -" call Decho("(user: ) list user's bookmarks",'~'.expand("")) - if exists("g:netrw_bookmarklist") -" call Decho('list '.len(g:netrw_bookmarklist).' bookmarks','~'.expand("")) - let cnt= 1 - for bmd in g:netrw_bookmarklist -" call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1],'~'.expand("")) - echo printf("Netrw Bookmark#%-2d: %s",cnt,g:netrw_bookmarklist[cnt-1]) - let didwork = 1 - let cnt = cnt + 1 - endfor - endif - - " list directory history - " Note: history is saved only when PerformListing is done; - " ie. when netrw can re-use a netrw buffer, the current directory is not saved in the history. - let cnt = g:netrw_dirhistcnt - let first = 1 - let histcnt = 0 - if g:netrw_dirhistmax > 0 - while ( first || cnt != g:netrw_dirhistcnt ) -" call Decho("first=".first." cnt=".cnt." dirhistcnt=".g:netrw_dirhistcnt,'~'.expand("")) - if exists("g:netrw_dirhist_{cnt}") -" call Decho("Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt},'~'.expand("")) - echo printf("Netrw History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt}) - let didwork= 1 - endif - let histcnt = histcnt + 1 - let first = 0 - let cnt = ( cnt - 1 ) % g:netrw_dirhistmax - if cnt < 0 - let cnt= cnt + g:netrw_dirhistmax - endif - endwhile - else - let g:netrw_dirhistcnt= 0 - endif - if didwork - call inputsave()|call input("Press to continue")|call inputrestore() - endif + " redraw! + let didwork= 0 + " list user's bookmarks + " call Decho("(user: ) list user's bookmarks",'~'.expand("")) + if exists("g:netrw_bookmarklist") + " call Decho('list '.len(g:netrw_bookmarklist).' bookmarks','~'.expand("")) + let cnt= 1 + for bmd in g:netrw_bookmarklist + " call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1],'~'.expand("")) + echo printf("Netrw Bookmark#%-2d: %s",cnt,g:netrw_bookmarklist[cnt-1]) + let didwork = 1 + let cnt = cnt + 1 + endfor + endif - elseif a:chg == 3 - " saves most recently visited directories (when they differ) -" call Decho("(browsing) record curdir history",'~'.expand("")) - if !exists("g:netrw_dirhistcnt") || !exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") || g:netrw_dirhist_{g:netrw_dirhistcnt} != a:curdir + " list directory history + " Note: history is saved only when PerformListing is done; + " ie. when netrw can re-use a netrw buffer, the current directory is not saved in the history. + let cnt = g:netrw_dirhistcnt + let first = 1 + let histcnt = 0 if g:netrw_dirhistmax > 0 - let g:netrw_dirhistcnt = ( g:netrw_dirhistcnt + 1 ) % g:netrw_dirhistmax - let g:netrw_dirhist_{g:netrw_dirhistcnt} = a:curdir + while ( first || cnt != g:netrw_dirhistcnt ) + " call Decho("first=".first." cnt=".cnt." dirhistcnt=".g:netrw_dirhistcnt,'~'.expand("")) + if exists("g:netrw_dirhist_{cnt}") + " call Decho("Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt},'~'.expand("")) + echo printf("Netrw History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt}) + let didwork= 1 + endif + let histcnt = histcnt + 1 + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + if cnt < 0 + let cnt= cnt + g:netrw_dirhistmax + endif + endwhile + else + let g:netrw_dirhistcnt= 0 + endif + if didwork + call inputsave()|call input("Press to continue")|call inputrestore() + endif + + elseif a:chg == 3 + " saves most recently visited directories (when they differ) + " call Decho("(browsing) record curdir history",'~'.expand("")) + if !exists("g:netrw_dirhistcnt") || !exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") || g:netrw_dirhist_{g:netrw_dirhistcnt} != a:curdir + if g:netrw_dirhistmax > 0 + let g:netrw_dirhistcnt = ( g:netrw_dirhistcnt + 1 ) % g:netrw_dirhistmax + let g:netrw_dirhist_{g:netrw_dirhistcnt} = a:curdir + endif + " call Decho("save dirhist#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) endif -" call Decho("save dirhist#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) - endif elseif a:chg == 4 - " u: change to the previous directory stored on the history list -" call Decho("(user: ) chg to prev dir from history",'~'.expand("")) - if g:netrw_dirhistmax > 0 - let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt - v:count1 ) % g:netrw_dirhistmax - if g:netrw_dirhistcnt < 0 - let g:netrw_dirhistcnt= g:netrw_dirhistcnt + g:netrw_dirhistmax - endif - else - let g:netrw_dirhistcnt= 0 - endif - if exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") -" call Decho("changedir u#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") - setl ma noro -" call Decho("setl ma noro",'~'.expand("")) - sil! NetrwKeepj %d _ - setl nomod -" call Decho("setl nomod",'~'.expand("")) -" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) - endif -" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}),'~'.expand("")) - exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}) - else + " u: change to the previous directory stored on the history list + " call Decho("(user: ) chg to prev dir from history",'~'.expand("")) if g:netrw_dirhistmax > 0 - let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt + v:count1 ) % g:netrw_dirhistmax + let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt - v:count1 ) % g:netrw_dirhistmax + if g:netrw_dirhistcnt < 0 + let g:netrw_dirhistcnt= g:netrw_dirhistcnt + g:netrw_dirhistmax + endif + else + let g:netrw_dirhistcnt= 0 + endif + if exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") + " call Decho("changedir u#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") + setl ma noro + " call Decho("setl ma noro",'~'.expand("")) + sil! NetrwKeepj %d _ + setl nomod + " call Decho("setl nomod",'~'.expand("")) + " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + endif + " call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}),'~'.expand("")) + exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}) else - let g:netrw_dirhistcnt= 0 + if g:netrw_dirhistmax > 0 + let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt + v:count1 ) % g:netrw_dirhistmax + else + let g:netrw_dirhistcnt= 0 + endif + echo "Sorry, no predecessor directory exists yet" endif - echo "Sorry, no predecessor directory exists yet" - endif elseif a:chg == 5 - " U: change to the subsequent directory stored on the history list -" call Decho("(user: ) chg to next dir from history",'~'.expand("")) - if g:netrw_dirhistmax > 0 - let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt + 1 ) % g:netrw_dirhistmax - if exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") -" call Decho("changedir U#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") -" call Decho("setl ma noro",'~'.expand("")) - setl ma noro - sil! NetrwKeepj %d _ -" call Decho("removed all lines from buffer (%d)",'~'.expand("")) -" call Decho("setl nomod",'~'.expand("")) - setl nomod -" call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) - endif -" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}),'~'.expand("")) - exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}) - else - let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt - 1 ) % g:netrw_dirhistmax - if g:netrw_dirhistcnt < 0 - let g:netrw_dirhistcnt= g:netrw_dirhistcnt + g:netrw_dirhistmax - endif - echo "Sorry, no successor directory exists yet" - endif - else - let g:netrw_dirhistcnt= 0 - echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")" - endif + " U: change to the subsequent directory stored on the history list + " call Decho("(user: ) chg to next dir from history",'~'.expand("")) + if g:netrw_dirhistmax > 0 + let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt + 1 ) % g:netrw_dirhistmax + if exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") + " call Decho("changedir U#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") + " call Decho("setl ma noro",'~'.expand("")) + setl ma noro + sil! NetrwKeepj %d _ + " call Decho("removed all lines from buffer (%d)",'~'.expand("")) + " call Decho("setl nomod",'~'.expand("")) + setl nomod + " call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + endif + " call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}),'~'.expand("")) + exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}) + else + let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt - 1 ) % g:netrw_dirhistmax + if g:netrw_dirhistcnt < 0 + let g:netrw_dirhistcnt= g:netrw_dirhistcnt + g:netrw_dirhistmax + endif + echo "Sorry, no successor directory exists yet" + endif + else + let g:netrw_dirhistcnt= 0 + echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")" + endif elseif a:chg == 6 -" call Decho("(user: ) delete bookmark'd directory",'~'.expand("")) - if exists("s:netrwmarkfilelist_{curbufnr}") - call s:NetrwBookmark(1) - echo "removed marked files from bookmarks" - else - " delete the v:count'th bookmark - let iremove = v:count - let dremove = g:netrw_bookmarklist[iremove - 1] -" call Decho("delete bookmark#".iremove."<".g:netrw_bookmarklist[iremove - 1].">",'~'.expand("")) - call s:MergeBookmarks() -" call Decho("remove g:netrw_bookmarklist[".(iremove-1)."]<".g:netrw_bookmarklist[(iremove-1)].">",'~'.expand("")) - NetrwKeepj call remove(g:netrw_bookmarklist,iremove-1) - echo "removed ".dremove." from g:netrw_bookmarklist" -" call Decho("g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("")) - endif -" call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("")) - - try - call s:NetrwBookHistSave() - catch - endtry + " call Decho("(user: ) delete bookmark'd directory",'~'.expand("")) + if exists("s:netrwmarkfilelist_{curbufnr}") + call s:NetrwBookmark(1) + echo "removed marked files from bookmarks" + else + " delete the v:count'th bookmark + let iremove = v:count + let dremove = g:netrw_bookmarklist[iremove - 1] + " call Decho("delete bookmark#".iremove."<".g:netrw_bookmarklist[iremove - 1].">",'~'.expand("")) + call s:MergeBookmarks() + " call Decho("remove g:netrw_bookmarklist[".(iremove-1)."]<".g:netrw_bookmarklist[(iremove-1)].">",'~'.expand("")) + NetrwKeepj call remove(g:netrw_bookmarklist,iremove-1) + echo "removed ".dremove." from g:netrw_bookmarklist" + " call Decho("g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("")) + endif + " call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("")) + + try + call s:NetrwBookHistSave() + catch + endtry endif call s:NetrwBookmarkMenu() call s:NetrwTgtMenu() let @@= ykeep -" call Dret("s:NetrwBookHistHandler") + " call Dret("s:NetrwBookHistHandler") endfun " --------------------------------------------------------------------- @@ -3489,38 +3528,38 @@ endfun " Will source the history file (.netrwhist) only if the g:netrw_disthistmax is > 0. " Sister function: s:NetrwBookHistSave() fun! s:NetrwBookHistRead() -" call Dfunc("s:NetrwBookHistRead()") + " call Dfunc("s:NetrwBookHistRead()") if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 -" call Dret("s:NetrwBookHistRead - nothing read (suppressed due to dirhistmax=".(exists("g:netrw_dirhistmax")? g:netrw_dirhistmax : "n/a").")") - return + " call Dret("s:NetrwBookHistRead - nothing read (suppressed due to dirhistmax=".(exists("g:netrw_dirhistmax")? g:netrw_dirhistmax : "n/a").")") + return endif let ykeep= @@ " read bookmarks if !exists("s:netrw_initbookhist") - let home = s:NetrwHome() - let savefile= home."/.netrwbook" - if filereadable(s:NetrwFile(savefile)) -" call Decho("sourcing .netrwbook",'~'.expand("")) - exe "keepalt NetrwKeepj so ".savefile - endif - - " read history - if g:netrw_dirhistmax > 0 - let savefile= home."/.netrwhist" + let home = s:NetrwHome() + let savefile= home."/.netrwbook" if filereadable(s:NetrwFile(savefile)) -" call Decho("sourcing .netrwhist",'~'.expand("")) - exe "keepalt NetrwKeepj so ".savefile + " call Decho("sourcing .netrwbook",'~'.expand("")) + exe "keepalt NetrwKeepj so ".savefile + endif + + " read history + if g:netrw_dirhistmax > 0 + let savefile= home."/.netrwhist" + if filereadable(s:NetrwFile(savefile)) + " call Decho("sourcing .netrwhist",'~'.expand("")) + exe "keepalt NetrwKeepj so ".savefile + endif + let s:netrw_initbookhist= 1 + au VimLeave * call s:NetrwBookHistSave() endif - let s:netrw_initbookhist= 1 - au VimLeave * call s:NetrwBookHistSave() - endif endif let @@= ykeep -" call Decho("dirhistmax=".(exists("g:netrw_dirhistmax")? g:netrw_dirhistmax : "n/a"),'~'.expand("")) -" call Decho("dirhistcnt=".(exists("g:netrw_dirhistcnt")? g:netrw_dirhistcnt : "n/a"),'~'.expand("")) -" call Dret("s:NetrwBookHistRead") + " call Decho("dirhistmax=".(exists("g:netrw_dirhistmax")? g:netrw_dirhistmax : "n/a"),'~'.expand("")) + " call Decho("dirhistcnt=".(exists("g:netrw_dirhistcnt")? g:netrw_dirhistcnt : "n/a"),'~'.expand("")) + " call Dret("s:NetrwBookHistRead") endfun " --------------------------------------------------------------------- @@ -3532,23 +3571,23 @@ endfun " will be saved. " (s:NetrwBookHistHandler(3,...) used to record history) fun! s:NetrwBookHistSave() -" call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax." dirhistcnt=".g:netrw_dirhistcnt) + " call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax." dirhistcnt=".g:netrw_dirhistcnt) if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 -" call Dret("s:NetrwBookHistSave : nothing saved (dirhistmax=".g:netrw_dirhistmax.")") - return + " call Dret("s:NetrwBookHistSave : nothing saved (dirhistmax=".g:netrw_dirhistmax.")") + return endif let savefile= s:NetrwHome()."/.netrwhist" -" call Decho("savefile<".savefile.">",'~'.expand("")) + " call Decho("savefile<".savefile.">",'~'.expand("")) 1split " setting up a new buffer which will become .netrwhist call s:NetrwEnew() -" call Decho("case g:netrw_use_noswf=".g:netrw_use_noswf.(exists("+acd")? " +acd" : " -acd"),'~'.expand("")) + " call Decho("case g:netrw_use_noswf=".g:netrw_use_noswf.(exists("+acd")? " +acd" : " -acd"),'~'.expand("")) if g:netrw_use_noswf - setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf + setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf else - setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 + setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 endif setl nocin noai noci magic nospell nohid wig= noaw setl ma noro write @@ -3558,52 +3597,52 @@ fun! s:NetrwBookHistSave() " rename enew'd file: .netrwhist -- no attempt to merge " record dirhistmax and current dirhistcnt " save history -" call Decho("saving history: dirhistmax=".g:netrw_dirhistmax." dirhistcnt=".g:netrw_dirhistcnt." lastline=".line("$"),'~'.expand("")) + " call Decho("saving history: dirhistmax=".g:netrw_dirhistmax." dirhistcnt=".g:netrw_dirhistcnt." lastline=".line("$"),'~'.expand("")) sil! keepalt file .netrwhist call setline(1,"let g:netrw_dirhistmax =".g:netrw_dirhistmax) call setline(2,"let g:netrw_dirhistcnt =".g:netrw_dirhistcnt) if g:netrw_dirhistmax > 0 - let lastline = line("$") - let cnt = g:netrw_dirhistcnt - let first = 1 - while ( first || cnt != g:netrw_dirhistcnt ) - let lastline= lastline + 1 - if exists("g:netrw_dirhist_{cnt}") - call setline(lastline,'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'") -" call Decho("..".lastline.'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'",'~'.expand("")) - endif - let first = 0 - let cnt = ( cnt - 1 ) % g:netrw_dirhistmax - if cnt < 0 - let cnt= cnt + g:netrw_dirhistmax - endif - endwhile - exe "sil! w! ".savefile -" call Decho("exe sil! w! ".savefile,'~'.expand("")) + let lastline = line("$") + let cnt = g:netrw_dirhistcnt + let first = 1 + while ( first || cnt != g:netrw_dirhistcnt ) + let lastline= lastline + 1 + if exists("g:netrw_dirhist_{cnt}") + call setline(lastline,'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'") + " call Decho("..".lastline.'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'",'~'.expand("")) + endif + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + if cnt < 0 + let cnt= cnt + g:netrw_dirhistmax + endif + endwhile + exe "sil! w! ".savefile + " call Decho("exe sil! w! ".savefile,'~'.expand("")) endif " save bookmarks sil NetrwKeepj %d _ if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] -" call Decho("saving bookmarks",'~'.expand("")) - " merge and write .netrwbook - let savefile= s:NetrwHome()."/.netrwbook" - - if filereadable(s:NetrwFile(savefile)) - let booklist= deepcopy(g:netrw_bookmarklist) - exe "sil NetrwKeepj keepalt so ".savefile - for bdm in booklist - if index(g:netrw_bookmarklist,bdm) == -1 - call add(g:netrw_bookmarklist,bdm) - endif - endfor - call sort(g:netrw_bookmarklist) - endif + " call Decho("saving bookmarks",'~'.expand("")) + " merge and write .netrwbook + let savefile= s:NetrwHome()."/.netrwbook" + + if filereadable(s:NetrwFile(savefile)) + let booklist= deepcopy(g:netrw_bookmarklist) + exe "sil NetrwKeepj keepalt so ".savefile + for bdm in booklist + if index(g:netrw_bookmarklist,bdm) == -1 + call add(g:netrw_bookmarklist,bdm) + endif + endfor + call sort(g:netrw_bookmarklist) + endif - " construct and save .netrwbook - call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist)) - exe "sil! w! ".savefile -" call Decho("exe sil! w! ".savefile,'~'.expand("")) + " construct and save .netrwbook + call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist)) + exe "sil! w! ".savefile + " call Decho("exe sil! w! ".savefile,'~'.expand("")) endif " cleanup -- remove buffer used to construct history @@ -3611,7 +3650,7 @@ fun! s:NetrwBookHistSave() q! exe "keepalt ".bgone."bwipe!" -" call Dret("s:NetrwBookHistSave") + " call Dret("s:NetrwBookHistSave") endfun " --------------------------------------------------------------------- @@ -3626,38 +3665,38 @@ fun! s:NetrwBrowse(islocal,dirname) " save alternate-file's filename if w:netrw_rexlocal doesn't exist " This is useful when one edits a local file, then :e ., then :Rex if a:islocal && !exists("w:netrw_rexfile") && bufname("#") != "" - let w:netrw_rexfile= bufname("#") + let w:netrw_rexfile= bufname("#") endif " s:NetrwBrowse : initialize history {{{3 if !exists("s:netrw_initbookhist") - NetrwKeepj call s:NetrwBookHistRead() + NetrwKeepj call s:NetrwBookHistRead() endif " s:NetrwBrowse : simplify the dirname (especially for ".."s in dirnames) {{{3 if a:dirname !~ '^\a\{3,}://' - let dirname= simplify(a:dirname) + let dirname= simplify(a:dirname) else - let dirname= a:dirname + let dirname= a:dirname endif " repoint t:netrw_lexbufnr if appropriate if exists("t:netrw_lexbufnr") && bufnr("%") == t:netrw_lexbufnr - let repointlexbufnr= 1 + let repointlexbufnr= 1 endif " s:NetrwBrowse : sanity checks: {{{3 if exists("s:netrw_skipbrowse") - unlet s:netrw_skipbrowse - return + unlet s:netrw_skipbrowse + return endif if !exists("*shellescape") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69) - return + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69) + return endif if !exists("*fnameescape") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70) - return + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70) + return endif " s:NetrwBrowse : save options: {{{3 @@ -3665,56 +3704,56 @@ fun! s:NetrwBrowse(islocal,dirname) " s:NetrwBrowse : re-instate any marked files {{{3 if has("syntax") && exists("g:syntax_on") && g:syntax_on - if exists("s:netrwmarkfilelist_{bufnr('%')}") - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" - endif + if exists("s:netrwmarkfilelist_{bufnr('%')}") + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + endif endif if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep - " s:NetrwBrowse : set up "safe" options for local directory/file {{{3 - if s:NetrwLcd(dirname) - return - endif + " s:NetrwBrowse : set up "safe" options for local directory/file {{{3 + if s:NetrwLcd(dirname) + return + endif elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"' - " s:NetrwBrowse : remote regular file handler {{{3 - if bufname(dirname) != "" - exe "NetrwKeepj b ".bufname(dirname) - else - " attempt transfer of remote regular file - - " remove any filetype indicator from end of dirname, except for the - " "this is a directory" indicator (/). - " There shouldn't be one of those here, anyway. - let path= substitute(dirname,'[*=@|]\r\=$','','e') - call s:RemotePathAnalysis(dirname) - - " s:NetrwBrowse : remote-read the requested file into current buffer {{{3 - call s:NetrwEnew(dirname) - call s:NetrwOptionsSafe(a:islocal) - setl ma noro - let b:netrw_curdir = dirname - let url = s:method."://".((s:user == "")? "" : s:user."@").s:machine.(s:port ? ":".s:port : "")."/".s:path - call s:NetrwBufRename(url) - exe "sil! NetrwKeepj keepalt doau BufReadPre ".fnameescape(s:fname) - sil call netrw#NetRead(2,url) - " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error - if s:path =~ '.bz2' - exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.bz2$','','')) - elseif s:path =~ '.gz' - exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.gz$','','')) - elseif s:path =~ '.gz' - exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.txz$','','')) - else - exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(s:fname) - endif - endif - - " s:NetrwBrowse : save certain window-oriented variables into buffer-oriented variables {{{3 - call s:SetBufWinVars() - call s:NetrwOptionsRestore("w:") - setl ma nomod noro - return + " s:NetrwBrowse : remote regular file handler {{{3 + if bufname(dirname) != "" + exe "NetrwKeepj b ".bufname(dirname) + else + " attempt transfer of remote regular file + + " remove any filetype indicator from end of dirname, except for the + " "this is a directory" indicator (/). + " There shouldn't be one of those here, anyway. + let path= substitute(dirname,'[*=@|]\r\=$','','e') + call s:RemotePathAnalysis(dirname) + + " s:NetrwBrowse : remote-read the requested file into current buffer {{{3 + call s:NetrwEnew(dirname) + call s:NetrwOptionsSafe(a:islocal) + setl ma noro + let b:netrw_curdir = dirname + let url = s:method."://".((s:user == "")? "" : s:user."@").s:machine.(s:port ? ":".s:port : "")."/".s:path + call s:NetrwBufRename(url) + exe "sil! NetrwKeepj keepalt doau BufReadPre ".fnameescape(s:fname) + sil call netrw#NetRead(2,url) + " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error + if s:path =~ '.bz2' + exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.bz2$','','')) + elseif s:path =~ '.gz' + exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.gz$','','')) + elseif s:path =~ '.gz' + exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.txz$','','')) + else + exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(s:fname) + endif + endif + + " s:NetrwBrowse : save certain window-oriented variables into buffer-oriented variables {{{3 + call s:SetBufWinVars() + call s:NetrwOptionsRestore("w:") + setl ma nomod noro + return endif " use buffer-oriented WinVars if buffer variables exist but associated window variables don't {{{3 @@ -3736,89 +3775,89 @@ fun! s:NetrwBrowse(islocal,dirname) let prevbufnr = bufnr('%') let reusing= s:NetrwGetBuffer(a:islocal,dirname) if exists("s:rexposn_".prevbufnr) - let s:rexposn_{bufnr('%')} = s:rexposn_{prevbufnr} + let s:rexposn_{bufnr('%')} = s:rexposn_{prevbufnr} endif " maintain markfile highlighting if has("syntax") && exists("g:syntax_on") && g:syntax_on - if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" - else - 2match none - endif + if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + else + 2match none + endif endif if reusing && line("$") > 1 - call s:NetrwOptionsRestore("w:") - setl noma nomod nowrap - return + call s:NetrwOptionsRestore("w:") + setl noma nomod nowrap + return endif " set b:netrw_curdir to the new directory name {{{3 let b:netrw_curdir= dirname if b:netrw_curdir =~ '[/\\]$' - let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') + let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') endif if b:netrw_curdir =~ '\a:$' && has("win32") - let b:netrw_curdir= b:netrw_curdir."/" + let b:netrw_curdir= b:netrw_curdir."/" endif if b:netrw_curdir == '' - if has("amiga") - " On the Amiga, the empty string connotes the current directory - let b:netrw_curdir= getcwd() - else - " under unix, when the root directory is encountered, the result - " from the preceding substitute is an empty string. - let b:netrw_curdir= '/' - endif + if has("amiga") + " On the Amiga, the empty string connotes the current directory + let b:netrw_curdir= getcwd() + else + " under unix, when the root directory is encountered, the result + " from the preceding substitute is an empty string. + let b:netrw_curdir= '/' + endif endif if !a:islocal && b:netrw_curdir !~ '/$' - let b:netrw_curdir= b:netrw_curdir.'/' + let b:netrw_curdir= b:netrw_curdir.'/' endif " ------------ " (local only) {{{3 " ------------ if a:islocal - " Set up ShellCmdPost handling. Append current buffer to browselist - call s:LocalFastBrowser() + " Set up ShellCmdPost handling. Append current buffer to browselist + call s:LocalFastBrowser() - " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3 - if !g:netrw_keepdir - if !exists("&l:acd") || !&l:acd - if s:NetrwLcd(b:netrw_curdir) - return - endif + " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3 + if !g:netrw_keepdir + if !exists("&l:acd") || !&l:acd + if s:NetrwLcd(b:netrw_curdir) + return + endif + endif endif - endif " -------------------------------- " remote handling: {{{3 " -------------------------------- else - " analyze dirname and g:netrw_list_cmd {{{3 - if dirname =~# "^NetrwTreeListing\>" - let dirname= b:netrw_curdir - elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") - let dirname= substitute(b:netrw_curdir,'\\','/','g') - if dirname !~ '/$' - let dirname= dirname.'/' + " analyze dirname and g:netrw_list_cmd {{{3 + if dirname =~# "^NetrwTreeListing\>" + let dirname= b:netrw_curdir + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") + let dirname= substitute(b:netrw_curdir,'\\','/','g') + if dirname !~ '/$' + let dirname= dirname.'/' + endif + let b:netrw_curdir = dirname + else + let dirname = substitute(dirname,'\\','/','g') endif - let b:netrw_curdir = dirname - else - let dirname = substitute(dirname,'\\','/','g') - endif - let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$' - if dirname !~ dirpat - if !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20) + let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$' + if dirname !~ dirpat + if !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20) + endif + NetrwKeepj call s:NetrwOptionsRestore("w:") + setl noma nomod nowrap + return endif - NetrwKeepj call s:NetrwOptionsRestore("w:") - setl noma nomod nowrap - return - endif - let b:netrw_curdir= dirname + let b:netrw_curdir= dirname endif " (additional remote handling) " ------------------------------- @@ -3834,26 +3873,26 @@ fun! s:NetrwBrowse(islocal,dirname) " If there is a rexposn: restore position with rexposn " Otherwise : set rexposn if exists("s:rexposn_".bufnr("%")) - NetrwKeepj call winrestview(s:rexposn_{bufnr('%')}) - if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt - NetrwKeepj exe w:netrw_bannercnt - endif + NetrwKeepj call winrestview(s:rexposn_{bufnr('%')}) + if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt + NetrwKeepj exe w:netrw_bannercnt + endif else - NetrwKeepj call s:SetRexDir(a:islocal,b:netrw_curdir) + NetrwKeepj call s:SetRexDir(a:islocal,b:netrw_curdir) endif if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval") - let &l:bexpr= "netrw#BalloonHelp()" - setl beval + let &l:bexpr= "netrw#BalloonHelp()" + setl beval endif " repoint t:netrw_lexbufnr if appropriate if exists("repointlexbufnr") - let t:netrw_lexbufnr= bufnr("%") + let t:netrw_lexbufnr= bufnr("%") endif " restore position if reusing - call winrestview(svpos) + call winrestview(svpos) endif " The s:LocalBrowseRefresh() function is called by an autocmd @@ -3869,125 +3908,125 @@ endfun " directory is used. " Returns a path to the file specified by a:fname fun! s:NetrwFile(fname) -" "" call Dfunc("s:NetrwFile(fname<".a:fname.">) win#".winnr()) -" "" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("")) -" "" call Decho("g:netrw_cygwin =".(exists("g:netrw_cygwin")? g:netrw_cygwin : 'n/a'),'~'.expand("")) -" "" call Decho("g:netrw_liststyle=".(exists("g:netrw_liststyle")? g:netrw_liststyle : 'n/a'),'~'.expand("")) -" "" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("")) + " "" call Dfunc("s:NetrwFile(fname<".a:fname.">) win#".winnr()) + " "" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("")) + " "" call Decho("g:netrw_cygwin =".(exists("g:netrw_cygwin")? g:netrw_cygwin : 'n/a'),'~'.expand("")) + " "" call Decho("g:netrw_liststyle=".(exists("g:netrw_liststyle")? g:netrw_liststyle : 'n/a'),'~'.expand("")) + " "" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("")) " clean up any leading treedepthstring if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - let fname= substitute(a:fname,'^'.s:treedepthstring.'\+','','') -" "" call Decho("clean up any leading treedepthstring: fname<".fname.">",'~'.expand("")) + let fname= substitute(a:fname,'^'.s:treedepthstring.'\+','','') + " "" call Decho("clean up any leading treedepthstring: fname<".fname.">",'~'.expand("")) else - let fname= a:fname + let fname= a:fname endif if g:netrw_keepdir - " vim's idea of the current directory possibly may differ from netrw's - if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() - endif + " vim's idea of the current directory possibly may differ from netrw's + if !exists("b:netrw_curdir") + let b:netrw_curdir= getcwd() + endif - if !exists("g:netrw_cygwin") && has("win32") - if fname =~ '^\' || fname =~ '^\a:\' - " windows, but full path given - let ret= fname -" "" call Decho("windows+full path: isdirectory(".fname.")",'~'.expand("")) + if !exists("g:netrw_cygwin") && has("win32") + if fname =~ '^\' || fname =~ '^\a:\' + " windows, but full path given + let ret= fname + " "" call Decho("windows+full path: isdirectory(".fname.")",'~'.expand("")) + else + " windows, relative path given + let ret= s:ComposePath(b:netrw_curdir,fname) + " "" call Decho("windows+rltv path: isdirectory(".fname.")",'~'.expand("")) + endif + + elseif fname =~ '^/' + " not windows, full path given + let ret= fname + " "" call Decho("unix+full path: isdirectory(".fname.")",'~'.expand("")) else - " windows, relative path given - let ret= s:ComposePath(b:netrw_curdir,fname) -" "" call Decho("windows+rltv path: isdirectory(".fname.")",'~'.expand("")) + " not windows, relative path given + let ret= s:ComposePath(b:netrw_curdir,fname) + " "" call Decho("unix+rltv path: isdirectory(".fname.")",'~'.expand("")) endif - - elseif fname =~ '^/' - " not windows, full path given - let ret= fname -" "" call Decho("unix+full path: isdirectory(".fname.")",'~'.expand("")) - else - " not windows, relative path given - let ret= s:ComposePath(b:netrw_curdir,fname) -" "" call Decho("unix+rltv path: isdirectory(".fname.")",'~'.expand("")) - endif else - " vim and netrw agree on the current directory - let ret= fname -" "" call Decho("vim and netrw agree on current directory (g:netrw_keepdir=".g:netrw_keepdir.")",'~'.expand("")) -" "" call Decho("vim directory: ".getcwd(),'~'.expand("")) -" "" call Decho("netrw directory: ".(exists("b:netrw_curdir")? b:netrw_curdir : 'n/a'),'~'.expand("")) + " vim and netrw agree on the current directory + let ret= fname + " "" call Decho("vim and netrw agree on current directory (g:netrw_keepdir=".g:netrw_keepdir.")",'~'.expand("")) + " "" call Decho("vim directory: ".getcwd(),'~'.expand("")) + " "" call Decho("netrw directory: ".(exists("b:netrw_curdir")? b:netrw_curdir : 'n/a'),'~'.expand("")) endif -" "" call Dret("s:NetrwFile ".ret) + " "" call Dret("s:NetrwFile ".ret) return ret endfun " --------------------------------------------------------------------- " s:NetrwFileInfo: supports qf (query for file information) {{{2 fun! s:NetrwFileInfo(islocal,fname) -" call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">) b:netrw_curdir<".b:netrw_curdir.">") + " call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">) b:netrw_curdir<".b:netrw_curdir.">") let ykeep= @@ if a:islocal - let lsopt= "-lsad" - if g:netrw_sizestyle =~# 'H' - let lsopt= "-lsadh" - elseif g:netrw_sizestyle =~# 'h' - let lsopt= "-lsadh --si" - endif -" call Decho("(s:NetrwFileInfo) lsopt<".lsopt.">") - if (has("unix") || has("macunix")) && executable("/bin/ls") - - if getline(".") == "../" - echo system("/bin/ls ".lsopt." ".s:ShellEscape("..")) -" call Decho("#1: echo system(/bin/ls -lsad ".s:ShellEscape(..).")",'~'.expand("")) - - elseif w:netrw_liststyle == s:TREELIST && getline(".") !~ '^'.s:treedepthstring - echo system("/bin/ls ".lsopt." ".s:ShellEscape(b:netrw_curdir)) -" call Decho("#2: echo system(/bin/ls -lsad ".s:ShellEscape(b:netrw_curdir).")",'~'.expand("")) + let lsopt= "-lsad" + if g:netrw_sizestyle =~# 'H' + let lsopt= "-lsadh" + elseif g:netrw_sizestyle =~# 'h' + let lsopt= "-lsadh --si" + endif + " call Decho("(s:NetrwFileInfo) lsopt<".lsopt.">") + if (has("unix") || has("macunix")) && executable("/bin/ls") - elseif exists("b:netrw_curdir") - echo system("/bin/ls ".lsopt." ".s:ShellEscape(s:ComposePath(b:netrw_curdir,a:fname))) -" call Decho("#3: echo system(/bin/ls -lsad ".s:ShellEscape(b:netrw_curdir.a:fname).")",'~'.expand("")) + if getline(".") == "../" + echo system("/bin/ls ".lsopt." ".s:ShellEscape("..")) + " call Decho("#1: echo system(/bin/ls -lsad ".s:ShellEscape(..).")",'~'.expand("")) + elseif w:netrw_liststyle == s:TREELIST && getline(".") !~ '^'.s:treedepthstring + echo system("/bin/ls ".lsopt." ".s:ShellEscape(b:netrw_curdir)) + " call Decho("#2: echo system(/bin/ls -lsad ".s:ShellEscape(b:netrw_curdir).")",'~'.expand("")) + + elseif exists("b:netrw_curdir") + echo system("/bin/ls ".lsopt." ".s:ShellEscape(s:ComposePath(b:netrw_curdir,a:fname))) + " call Decho("#3: echo system(/bin/ls -lsad ".s:ShellEscape(b:netrw_curdir.a:fname).")",'~'.expand("")) + + else + " call Decho('using ls '.a:fname." using cwd<".getcwd().">",'~'.expand("")) + echo system("/bin/ls ".lsopt." ".s:ShellEscape(s:NetrwFile(a:fname))) + " call Decho("#5: echo system(/bin/ls -lsad ".s:ShellEscape(a:fname).")",'~'.expand("")) + endif else -" call Decho('using ls '.a:fname." using cwd<".getcwd().">",'~'.expand("")) - echo system("/bin/ls ".lsopt." ".s:ShellEscape(s:NetrwFile(a:fname))) -" call Decho("#5: echo system(/bin/ls -lsad ".s:ShellEscape(a:fname).")",'~'.expand("")) - endif - else - " use vim functions to return information about file below cursor -" call Decho("using vim functions to query for file info",'~'.expand("")) - if !isdirectory(s:NetrwFile(a:fname)) && !filereadable(s:NetrwFile(a:fname)) && a:fname =~ '[*@/]' - let fname= substitute(a:fname,".$","","") - else - let fname= a:fname - endif - let t = getftime(s:NetrwFile(fname)) - let sz = getfsize(s:NetrwFile(fname)) - if g:netrw_sizestyle =~# "[hH]" - let sz= s:NetrwHumanReadable(sz) + " use vim functions to return information about file below cursor + " call Decho("using vim functions to query for file info",'~'.expand("")) + if !isdirectory(s:NetrwFile(a:fname)) && !filereadable(s:NetrwFile(a:fname)) && a:fname =~ '[*@/]' + let fname= substitute(a:fname,".$","","") + else + let fname= a:fname + endif + let t = getftime(s:NetrwFile(fname)) + let sz = getfsize(s:NetrwFile(fname)) + if g:netrw_sizestyle =~# "[hH]" + let sz= s:NetrwHumanReadable(sz) + endif + echo a:fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(s:NetrwFile(fname))) + " call Decho("fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname)),'~'.expand("")) endif - echo a:fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(s:NetrwFile(fname))) -" call Decho("fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname)),'~'.expand("")) - endif else - echo "sorry, \"qf\" not supported yet for remote files" + echo "sorry, \"qf\" not supported yet for remote files" endif let @@= ykeep -" call Dret("s:NetrwFileInfo") + " call Dret("s:NetrwFileInfo") endfun " --------------------------------------------------------------------- " s:NetrwFullPath: returns the full path to a directory and/or file {{{2 fun! s:NetrwFullPath(filename) -" " call Dfunc("s:NetrwFullPath(filename<".a:filename.">)") + " " call Dfunc("s:NetrwFullPath(filename<".a:filename.">)") let filename= a:filename if filename !~ '^/' - let filename= resolve(getcwd().'/'.filename) + let filename= resolve(getcwd().'/'.filename) endif if filename != "/" && filename =~ '/$' - let filename= substitute(filename,'/$','','') + let filename= substitute(filename,'/$','','') endif -" " call Dret("s:NetrwFullPath <".filename.">") + " " call Dret("s:NetrwFullPath <".filename.">") return filename endfun @@ -3997,165 +4036,165 @@ endfun " 1=re-used buffer (buffer not cleared) " Nov 09, 2020: tst952 shows that when user does :set hidden that NetrwGetBuffer will come up with a [No Name] buffer (hid fix) fun! s:NetrwGetBuffer(islocal,dirname) -" call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." hid=".&hid,'~'.expand("")) -" call Decho("netrwbuf dictionary=".(exists("s:netrwbuf")? string(s:netrwbuf) : 'n/a'),'~'.expand("")) -" call Dredir("ls!","s:NetrwGetBuffer") + " call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." hid=".&hid,'~'.expand("")) + " call Decho("netrwbuf dictionary=".(exists("s:netrwbuf")? string(s:netrwbuf) : 'n/a'),'~'.expand("")) + " call Dredir("ls!","s:NetrwGetBuffer") let dirname= a:dirname " re-use buffer if possible {{{3 -" call Decho("--re-use a buffer if possible--",'~'.expand("")) + " call Decho("--re-use a buffer if possible--",'~'.expand("")) if !exists("s:netrwbuf") -" call Decho(" s:netrwbuf initialized to {}",'~'.expand("")) - let s:netrwbuf= {} + " call Decho(" s:netrwbuf initialized to {}",'~'.expand("")) + let s:netrwbuf= {} endif -" call Decho(" s:netrwbuf =".string(s:netrwbuf),'~'.expand("")) -" call Decho(" w:netrw_liststyle =".(exists("w:netrw_liststyle")? w:netrw_liststyle : "n/a"),'~'.expand("")) + " call Decho(" s:netrwbuf =".string(s:netrwbuf),'~'.expand("")) + " call Decho(" w:netrw_liststyle =".(exists("w:netrw_liststyle")? w:netrw_liststyle : "n/a"),'~'.expand("")) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - let bufnum = -1 + let bufnum = -1 - if !empty(s:netrwbuf) && has_key(s:netrwbuf,s:NetrwFullPath(dirname)) - if has_key(s:netrwbuf,"NetrwTreeListing") - let bufnum= s:netrwbuf["NetrwTreeListing"] + if !empty(s:netrwbuf) && has_key(s:netrwbuf,s:NetrwFullPath(dirname)) + if has_key(s:netrwbuf,"NetrwTreeListing") + let bufnum= s:netrwbuf["NetrwTreeListing"] + else + let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)] + endif + " call Decho(" NetrwTreeListing: bufnum#".bufnum,'~'.expand("")) + if !bufexists(bufnum) + call remove(s:netrwbuf,"NetrwTreeListing") + let bufnum= -1 + endif + elseif bufnr("NetrwTreeListing") != -1 + let bufnum= bufnr("NetrwTreeListing") + " call Decho(" NetrwTreeListing".": bufnum#".bufnum,'~'.expand("")) else - let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)] - endif -" call Decho(" NetrwTreeListing: bufnum#".bufnum,'~'.expand("")) - if !bufexists(bufnum) - call remove(s:netrwbuf,"NetrwTreeListing") - let bufnum= -1 + " call Decho(" did not find a NetrwTreeListing buffer",'~'.expand("")) + let bufnum= -1 endif - elseif bufnr("NetrwTreeListing") != -1 - let bufnum= bufnr("NetrwTreeListing") -" call Decho(" NetrwTreeListing".": bufnum#".bufnum,'~'.expand("")) - else -" call Decho(" did not find a NetrwTreeListing buffer",'~'.expand("")) - let bufnum= -1 - endif elseif has_key(s:netrwbuf,s:NetrwFullPath(dirname)) - let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)] -" call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnum,'~'.expand("")) - if !bufexists(bufnum) - call remove(s:netrwbuf,s:NetrwFullPath(dirname)) - let bufnum= -1 - endif + let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)] + " call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnum,'~'.expand("")) + if !bufexists(bufnum) + call remove(s:netrwbuf,s:NetrwFullPath(dirname)) + let bufnum= -1 + endif else -" call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."] not a key",'~'.expand("")) - let bufnum= -1 + " call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."] not a key",'~'.expand("")) + let bufnum= -1 endif -" call Decho(" bufnum#".bufnum,'~'.expand("")) + " call Decho(" bufnum#".bufnum,'~'.expand("")) " highjack the current buffer " IF the buffer already has the desired name " AND it is empty let curbuf = bufname("%") if curbuf == '.' - let curbuf = getcwd() - endif -" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)") -" call Decho("deciding if netrw may highjack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("")) -" call Decho("..dirname<".dirname."> IF dirname == bufname",'~'.expand("")) -" call Decho("..curbuf<".curbuf.">",'~'.expand("")) -" call Decho("..line($)=".line("$")." AND this is 1",'~'.expand("")) -" call Decho("..getline(%)<".getline("%")."> AND this line is empty",'~'.expand("")) + let curbuf = getcwd() + endif + " call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)") + " call Decho("deciding if netrw may highjack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("")) + " call Decho("..dirname<".dirname."> IF dirname == bufname",'~'.expand("")) + " call Decho("..curbuf<".curbuf.">",'~'.expand("")) + " call Decho("..line($)=".line("$")." AND this is 1",'~'.expand("")) + " call Decho("..getline(%)<".getline("%")."> AND this line is empty",'~'.expand("")) if dirname == curbuf && line("$") == 1 && getline("%") == "" -" call Dret("s:NetrwGetBuffer 0 : highjacking buffer#".bufnr("%")) - return 0 + " call Dret("s:NetrwGetBuffer 0 : highjacking buffer#".bufnr("%")) + return 0 else " DEBUG -" call Decho("..did NOT highjack buffer",'~'.expand("")) + " call Decho("..did NOT highjack buffer",'~'.expand("")) endif " Aug 14, 2021: was thinking about looking for a [No Name] buffer here and using it, but that might cause problems " get enew buffer and name it -or- re-use buffer {{{3 if bufnum < 0 " get enew buffer and name it -" call Decho("--get enew buffer and name it (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)",'~'.expand("")) - call s:NetrwEnew(dirname) -" call Decho(" got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)",'~'.expand("")) - " name the buffer - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - " Got enew buffer; transform into a NetrwTreeListing -" call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --",'~'.expand("")) - let w:netrw_treebufnr = bufnr("%") - call s:NetrwBufRename("NetrwTreeListing") - if g:netrw_use_noswf - setl nobl bt=nofile noswf - else - setl nobl bt=nofile - endif - nnoremap [[ :sil call TreeListMove('[[') - nnoremap ]] :sil call TreeListMove(']]') - nnoremap [] :sil call TreeListMove('[]') - nnoremap ][ :sil call TreeListMove('][') -" call Decho(" tree listing bufnr=".w:netrw_treebufnr,'~'.expand("")) - else - call s:NetrwBufRename(dirname) - " enter the new buffer into the s:netrwbuf dictionary - let s:netrwbuf[s:NetrwFullPath(dirname)]= bufnr("%") -" call Decho("update netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnr("%"),'~'.expand("")) -" call Decho("netrwbuf dictionary=".string(s:netrwbuf),'~'.expand("")) - endif -" call Decho(" named enew buffer#".bufnr("%")."<".bufname("%").">",'~'.expand("")) + " call Decho("--get enew buffer and name it (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)",'~'.expand("")) + call s:NetrwEnew(dirname) + " call Decho(" got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)",'~'.expand("")) + " name the buffer + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + " Got enew buffer; transform into a NetrwTreeListing + " call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --",'~'.expand("")) + let w:netrw_treebufnr = bufnr("%") + call s:NetrwBufRename("NetrwTreeListing") + if g:netrw_use_noswf + setl nobl bt=nofile noswf + else + setl nobl bt=nofile + endif + nnoremap [[ :sil call TreeListMove('[[') + nnoremap ]] :sil call TreeListMove(']]') + nnoremap [] :sil call TreeListMove('[]') + nnoremap ][ :sil call TreeListMove('][') + " call Decho(" tree listing bufnr=".w:netrw_treebufnr,'~'.expand("")) + else + call s:NetrwBufRename(dirname) + " enter the new buffer into the s:netrwbuf dictionary + let s:netrwbuf[s:NetrwFullPath(dirname)]= bufnr("%") + " call Decho("update netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnr("%"),'~'.expand("")) + " call Decho("netrwbuf dictionary=".string(s:netrwbuf),'~'.expand("")) + endif + " call Decho(" named enew buffer#".bufnr("%")."<".bufname("%").">",'~'.expand("")) else " Re-use the buffer -" call Decho("--re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)",'~'.expand("")) - " ignore all events - let eikeep= &ei - setl ei=all - - if &ft == "netrw" -" call Decho("buffer type is netrw; not using keepalt with b ".bufnum) - exe "sil! NetrwKeepj noswapfile b ".bufnum -" call Dredir("ls!","one") - else -" call Decho("buffer type is not netrw; using keepalt with b ".bufnum) - call s:NetrwEditBuf(bufnum) -" call Dredir("ls!","two") - endif -" call Decho(" line($)=".line("$"),'~'.expand("")) - if bufname("%") == '.' - call s:NetrwBufRename(getcwd()) - endif - - " restore ei - let &ei= eikeep - - if line("$") <= 1 && getline(1) == "" - " empty buffer - NetrwKeepj call s:NetrwListSettings(a:islocal) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) -" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it") - return 0 + " call Decho("--re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)",'~'.expand("")) + " ignore all events + let eikeep= &ei + setl ei=all - elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1) -" call Decho("g:netrw_fastbrowse=".g:netrw_fastbrowse." a:islocal=".a:islocal.": clear buffer",'~'.expand("")) - NetrwKeepj call s:NetrwListSettings(a:islocal) - sil NetrwKeepj %d _ -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) -" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse) - return 0 + if &ft == "netrw" + " call Decho("buffer type is netrw; not using keepalt with b ".bufnum) + exe "sil! NetrwKeepj noswapfile b ".bufnum + " call Dredir("ls!","one") + else + " call Decho("buffer type is not netrw; using keepalt with b ".bufnum) + call s:NetrwEditBuf(bufnum) + " call Dredir("ls!","two") + endif + " call Decho(" line($)=".line("$"),'~'.expand("")) + if bufname("%") == '.' + call s:NetrwBufRename(getcwd()) + endif - elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST -" call Decho("--re-use tree listing--",'~'.expand("")) -" call Decho(" clear buffer<".expand("%")."> with :%d",'~'.expand("")) - setl ma - sil NetrwKeepj %d _ - NetrwKeepj call s:NetrwListSettings(a:islocal) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) -" call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh") - return 0 + " restore ei + let &ei= eikeep - else -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) -" call Dret("s:NetrwGetBuffer 1") - return 1 - endif + if line("$") <= 1 && getline(1) == "" + " empty buffer + NetrwKeepj call s:NetrwListSettings(a:islocal) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it") + return 0 + + elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1) + " call Decho("g:netrw_fastbrowse=".g:netrw_fastbrowse." a:islocal=".a:islocal.": clear buffer",'~'.expand("")) + NetrwKeepj call s:NetrwListSettings(a:islocal) + sil NetrwKeepj %d _ + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse) + return 0 + + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + " call Decho("--re-use tree listing--",'~'.expand("")) + " call Decho(" clear buffer<".expand("%")."> with :%d",'~'.expand("")) + setl ma + sil NetrwKeepj %d _ + NetrwKeepj call s:NetrwListSettings(a:islocal) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh") + return 0 + + else + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Dret("s:NetrwGetBuffer 1") + return 1 + endif endif " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{3 @@ -4163,19 +4202,19 @@ fun! s:NetrwGetBuffer(islocal,dirname) " slow 0 D D Deleting a buffer implies it will not be re-used (slow) " med 1 D H " fast 2 H H -" call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--",'~'.expand("")) + " call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--",'~'.expand("")) let fname= expand("%") NetrwKeepj call s:NetrwListSettings(a:islocal) call s:NetrwBufRename(fname) " delete all lines from buffer {{{3 -" call Decho("--delete all lines from buffer--",'~'.expand("")) -" call Decho(" clear buffer<".expand("%")."> with :%d",'~'.expand("")) + " call Decho("--delete all lines from buffer--",'~'.expand("")) + " call Decho(" clear buffer<".expand("%")."> with :%d",'~'.expand("")) sil! keepalt NetrwKeepj %d _ -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) -" call Dret("s:NetrwGetBuffer 0") + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Dret("s:NetrwGetBuffer 0") return 0 endfun @@ -4184,23 +4223,23 @@ endfun " Change backslashes to forward slashes, if any. " If doesc is true, escape certain troublesome characters fun! s:NetrwGetcwd(doesc) -" call Dfunc("NetrwGetcwd(doesc=".a:doesc.")") + " call Dfunc("NetrwGetcwd(doesc=".a:doesc.")") let curdir= substitute(getcwd(),'\\','/','ge') if curdir !~ '[\/]$' - let curdir= curdir.'/' + let curdir= curdir.'/' endif if a:doesc - let curdir= fnameescape(curdir) + let curdir= fnameescape(curdir) endif -" call Dret("NetrwGetcwd <".curdir.">") + " call Dret("NetrwGetcwd <".curdir.">") return curdir endfun " --------------------------------------------------------------------- " s:NetrwGetWord: it gets the directory/file named under the cursor {{{2 fun! s:NetrwGetWord() -" call Dfunc("s:NetrwGetWord() liststyle=".s:ShowStyle()." virtcol=".virtcol(".")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Dfunc("s:NetrwGetWord() liststyle=".s:ShowStyle()." virtcol=".virtcol(".")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) let keepsol= &l:sol setl nosol @@ -4208,102 +4247,102 @@ fun! s:NetrwGetWord() " insure that w:netrw_liststyle is set up if !exists("w:netrw_liststyle") - if exists("g:netrw_liststyle") - let w:netrw_liststyle= g:netrw_liststyle - else - let w:netrw_liststyle= s:THINLIST - endif -" call Decho("w:netrw_liststyle=".w:netrw_liststyle,'~'.expand("")) + if exists("g:netrw_liststyle") + let w:netrw_liststyle= g:netrw_liststyle + else + let w:netrw_liststyle= s:THINLIST + endif + " call Decho("w:netrw_liststyle=".w:netrw_liststyle,'~'.expand("")) endif if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt - " Active Banner support -" call Decho("active banner handling",'~'.expand("")) - NetrwKeepj norm! 0 - let dirname= "./" - let curline= getline('.') - - if curline =~# '"\s*Sorted by\s' - NetrwKeepj norm! "_s - let s:netrw_skipbrowse= 1 - echo 'Pressing "s" also works' - - elseif curline =~# '"\s*Sort sequence:' - let s:netrw_skipbrowse= 1 - echo 'Press "S" to edit sorting sequence' - - elseif curline =~# '"\s*Quick Help:' - NetrwKeepj norm! ? - let s:netrw_skipbrowse= 1 - - elseif curline =~# '"\s*\%(Hiding\|Showing\):' - NetrwKeepj norm! a - let s:netrw_skipbrowse= 1 - echo 'Pressing "a" also works' - - elseif line("$") > w:netrw_bannercnt - exe 'sil NetrwKeepj '.w:netrw_bannercnt - endif + " Active Banner support + " call Decho("active banner handling",'~'.expand("")) + NetrwKeepj norm! 0 + let dirname= "./" + let curline= getline('.') + + if curline =~# '"\s*Sorted by\s' + NetrwKeepj norm! "_s + let s:netrw_skipbrowse= 1 + echo 'Pressing "s" also works' + + elseif curline =~# '"\s*Sort sequence:' + let s:netrw_skipbrowse= 1 + echo 'Press "S" to edit sorting sequence' + + elseif curline =~# '"\s*Quick Help:' + NetrwKeepj norm! ? + let s:netrw_skipbrowse= 1 + + elseif curline =~# '"\s*\%(Hiding\|Showing\):' + NetrwKeepj norm! a + let s:netrw_skipbrowse= 1 + echo 'Pressing "a" also works' + + elseif line("$") > w:netrw_bannercnt + exe 'sil NetrwKeepj '.w:netrw_bannercnt + endif elseif w:netrw_liststyle == s:THINLIST -" call Decho("thin column handling",'~'.expand("")) - NetrwKeepj norm! 0 - let dirname= substitute(getline('.'),'\t -->.*$','','') + " call Decho("thin column handling",'~'.expand("")) + NetrwKeepj norm! 0 + let dirname= substitute(getline('.'),'\t -->.*$','','') elseif w:netrw_liststyle == s:LONGLIST -" call Decho("long column handling",'~'.expand("")) - NetrwKeepj norm! 0 - let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e') + " call Decho("long column handling",'~'.expand("")) + NetrwKeepj norm! 0 + let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e') elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST -" call Decho("treelist handling",'~'.expand("")) - let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e') - let dirname= substitute(dirname,'\t -->.*$','','') + " call Decho("treelist handling",'~'.expand("")) + let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e') + let dirname= substitute(dirname,'\t -->.*$','','') else -" call Decho("obtain word from wide listing",'~'.expand("")) - let dirname= getline('.') + " call Decho("obtain word from wide listing",'~'.expand("")) + let dirname= getline('.') - if !exists("b:netrw_cpf") - let b:netrw_cpf= 0 - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' - call histdel("/",-1) -" "call Decho("computed cpf=".b:netrw_cpf,'~'.expand("")) - endif - -" call Decho("buf#".bufnr("%")."<".bufname("%").">",'~'.expand("")) - let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf -" call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt,'~'.expand("")) -" call Decho("1: dirname<".dirname.">",'~'.expand("")) - if filestart == 0 - NetrwKeepj norm! 0ma - else - call cursor(line("."),filestart+1) - NetrwKeepj norm! ma - endif - - let dict={} - " save the unnamed register and register 0-9 and a - let dict.a=[getreg('a'), getregtype('a')] - for i in range(0, 9) - let dict[i] = [getreg(i), getregtype(i)] - endfor - let dict.unnamed = [getreg(''), getregtype('')] - - let eofname= filestart + b:netrw_cpf + 1 - if eofname <= col("$") - call cursor(line("."),filestart+b:netrw_cpf+1) - NetrwKeepj norm! "ay`a - else - NetrwKeepj norm! "ay$ - endif - - let dirname = @a - call s:RestoreRegister(dict) - -" call Decho("2: dirname<".dirname.">",'~'.expand("")) - let dirname= substitute(dirname,'\s\+$','','e') -" call Decho("3: dirname<".dirname.">",'~'.expand("")) + if !exists("b:netrw_cpf") + let b:netrw_cpf= 0 + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' + call histdel("/",-1) + " "call Decho("computed cpf=".b:netrw_cpf,'~'.expand("")) + endif + + " call Decho("buf#".bufnr("%")."<".bufname("%").">",'~'.expand("")) + let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf + " call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt,'~'.expand("")) + " call Decho("1: dirname<".dirname.">",'~'.expand("")) + if filestart == 0 + NetrwKeepj norm! 0ma + else + call cursor(line("."),filestart+1) + NetrwKeepj norm! ma + endif + + let dict={} + " save the unnamed register and register 0-9 and a + let dict.a=[getreg('a'), getregtype('a')] + for i in range(0, 9) + let dict[i] = [getreg(i), getregtype(i)] + endfor + let dict.unnamed = [getreg(''), getregtype('')] + + let eofname= filestart + b:netrw_cpf + 1 + if eofname <= col("$") + call cursor(line("."),filestart+b:netrw_cpf+1) + NetrwKeepj norm! "ay`a + else + NetrwKeepj norm! "ay$ + endif + + let dirname = @a + call s:RestoreRegister(dict) + + " call Decho("2: dirname<".dirname.">",'~'.expand("")) + let dirname= substitute(dirname,'\s\+$','','e') + " call Decho("3: dirname<".dirname.">",'~'.expand("")) endif " symlinks are indicated by a trailing "@". Remove it before further processing. @@ -4314,7 +4353,7 @@ fun! s:NetrwGetWord() let &l:sol= keepsol -" call Dret("s:NetrwGetWord <".dirname.">") + " call Dret("s:NetrwGetWord <".dirname.">") return dirname endfun @@ -4323,27 +4362,27 @@ endfun " g:netrw_bufsettings will be used after the listing is produced. " Called by s:NetrwGetBuffer() fun! s:NetrwListSettings(islocal) -" call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) let fname= bufname("%") -" " call Decho("setl bt=nofile nobl ma nonu nowrap noro nornu",'~'.expand("")) + " " call Decho("setl bt=nofile nobl ma nonu nowrap noro nornu",'~'.expand("")) " nobl noma nomod nonu noma nowrap ro nornu (std g:netrw_bufsettings) setl bt=nofile nobl ma nonu nowrap noro nornu call s:NetrwBufRename(fname) if g:netrw_use_noswf - setl noswf + setl noswf endif -" call Dredir("ls!","s:NetrwListSettings") -" call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("")) + " call Dredir("ls!","s:NetrwListSettings") + " call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("")) exe "setl ts=".(g:netrw_maxfilenamelen+1) setl isk+=.,~,- if g:netrw_fastbrowse > a:islocal - setl bh=hide + setl bh=hide else - setl bh=delete + setl bh=delete endif -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Dret("s:NetrwListSettings") + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Dret("s:NetrwListSettings") endfun " --------------------------------------------------------------------- @@ -4359,29 +4398,29 @@ fun! s:NetrwListStyle(islocal) " repoint t:netrw_lexbufnr if appropriate if exists("t:netrw_lexbufnr") && bufnr("%") == t:netrw_lexbufnr - let repointlexbufnr= 1 + let repointlexbufnr= 1 endif if w:netrw_liststyle == s:THINLIST - " use one column listing - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') + " use one column listing + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') elseif w:netrw_liststyle == s:LONGLIST - " use long list - let g:netrw_list_cmd = g:netrw_list_cmd." -l" + " use long list + let g:netrw_list_cmd = g:netrw_list_cmd." -l" elseif w:netrw_liststyle == s:WIDELIST - " give wide list - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') + " give wide list + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') else - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46) - let g:netrw_liststyle = s:THINLIST - let w:netrw_liststyle = g:netrw_liststyle - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46) + let g:netrw_liststyle = s:THINLIST + let w:netrw_liststyle = g:netrw_liststyle + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') endif setl ma noro @@ -4396,11 +4435,11 @@ fun! s:NetrwListStyle(islocal) " repoint t:netrw_lexbufnr if appropriate if exists("repointlexbufnr") - let t:netrw_lexbufnr= bufnr("%") + let t:netrw_lexbufnr= bufnr("%") endif " restore position; keep cursor on the filename -" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("")) + " call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("")) NetrwKeepj call winrestview(svpos) let @@= ykeep @@ -4419,16 +4458,16 @@ fun! s:NetrwBannerCtrl(islocal) " keep cursor on the filename if g:netrw_banner && exists("w:netrw_bannercnt") && line(".") >= w:netrw_bannercnt - let fname= s:NetrwGetWord() - sil NetrwKeepj $ - let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') -" " call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'),'~'.expand("")) - if result <= 0 && exists("w:netrw_bannercnt") - exe "NetrwKeepj ".w:netrw_bannercnt - endif + let fname= s:NetrwGetWord() + sil NetrwKeepj $ + let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') + " " call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'),'~'.expand("")) + if result <= 0 && exists("w:netrw_bannercnt") + exe "NetrwKeepj ".w:netrw_bannercnt + endif endif let @@= ykeep -" call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner) + " call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner) endfun " --------------------------------------------------------------------- @@ -4444,53 +4483,53 @@ endfun " With bang: deletes files/directories from Netrw's bookmark system fun! s:NetrwBookmark(del,...) if a:0 == 0 - if &ft == "netrw" - let curbufnr = bufnr("%") + if &ft == "netrw" + let curbufnr = bufnr("%") + + if exists("s:netrwmarkfilelist_{curbufnr}") + " for every filename in the marked list + let svpos = winsaveview() + let islocal= expand("%") !~ '^\a\{3,}://' + for fname in s:netrwmarkfilelist_{curbufnr} + if a:del|call s:DeleteBookmark(fname)|else|call s:MakeBookmark(fname)|endif + endfor + let curdir = exists("b:netrw_curdir")? b:netrw_curdir : getcwd() + call s:NetrwUnmarkList(curbufnr,curdir) + NetrwKeepj call s:NetrwRefresh(islocal,s:NetrwBrowseChgDir(islocal,'./',0)) + NetrwKeepj call winrestview(svpos) + else + let fname= s:NetrwGetWord() + if a:del|call s:DeleteBookmark(fname)|else|call s:MakeBookmark(fname)|endif + endif - if exists("s:netrwmarkfilelist_{curbufnr}") - " for every filename in the marked list - let svpos = winsaveview() - let islocal= expand("%") !~ '^\a\{3,}://' - for fname in s:netrwmarkfilelist_{curbufnr} + else + " bookmark currently open file + let fname= expand("%") if a:del|call s:DeleteBookmark(fname)|else|call s:MakeBookmark(fname)|endif - endfor - let curdir = exists("b:netrw_curdir")? b:netrw_curdir : getcwd() - call s:NetrwUnmarkList(curbufnr,curdir) - NetrwKeepj call s:NetrwRefresh(islocal,s:NetrwBrowseChgDir(islocal,'./',0)) - NetrwKeepj call winrestview(svpos) - else - let fname= s:NetrwGetWord() - if a:del|call s:DeleteBookmark(fname)|else|call s:MakeBookmark(fname)|endif - endif - - else - " bookmark currently open file - let fname= expand("%") - if a:del|call s:DeleteBookmark(fname)|else|call s:MakeBookmark(fname)|endif - endif - - else - " bookmark specified files - " attempts to infer if working remote or local - " by deciding if the current file begins with an url - " Globbing cannot be done remotely. - let islocal= expand("%") !~ '^\a\{3,}://' - let i = 1 - while i <= a:0 - if islocal - if v:version > 704 || (v:version == 704 && has("patch656")) - let mbfiles= glob(fnameescape(a:{i}),0,1,1) - else - let mbfiles= glob(fnameescape(a:{i}),0,1) - endif - else - let mbfiles= [a:{i}] - endif - for mbfile in mbfiles - if a:del|call s:DeleteBookmark(mbfile)|else|call s:MakeBookmark(mbfile)|endif - endfor - let i= i + 1 - endwhile + endif + + else + " bookmark specified files + " attempts to infer if working remote or local + " by deciding if the current file begins with an url + " Globbing cannot be done remotely. + let islocal= expand("%") !~ '^\a\{3,}://' + let i = 1 + while i <= a:0 + if islocal + if v:version > 704 || (v:version == 704 && has("patch656")) + let mbfiles= glob(fnameescape(a:{i}),0,1,1) + else + let mbfiles= glob(fnameescape(a:{i}),0,1) + endif + else + let mbfiles= [a:{i}] + endif + for mbfile in mbfiles + if a:del|call s:DeleteBookmark(mbfile)|else|call s:MakeBookmark(mbfile)|endif + endfor + let i= i + 1 + endwhile endif " update the menu @@ -4504,61 +4543,61 @@ endfun " (see s:NetrwMenu()) fun! s:NetrwBookmarkMenu() if !exists("s:netrw_menucnt") - return + return endif -" call Dfunc("NetrwBookmarkMenu() histcnt=".g:netrw_dirhistcnt." menucnt=".s:netrw_menucnt) + " call Dfunc("NetrwBookmarkMenu() histcnt=".g:netrw_dirhistcnt." menucnt=".s:netrw_menucnt) " the following test assures that gvim is running, has menus available, and has menus enabled. if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu - if exists("g:NetrwTopLvlMenu") -" call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)",'~'.expand("")) - exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks' - exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete' - endif - if !exists("s:netrw_initbookhist") - call s:NetrwBookHistRead() - endif - - " show bookmarked places - if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0 - let cnt= 1 - for bmd in g:netrw_bookmarklist -" call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmd.' :e '.bmd,'~'.expand("")) - let bmd= escape(bmd,g:netrw_menu_escape) - - " show bookmarks for goto menu - exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.' :e '.bmd."\" - - " show bookmarks for deletion menu - exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.' '.cnt."mB" - let cnt= cnt + 1 - endfor + if exists("g:NetrwTopLvlMenu") + " call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)",'~'.expand("")) + exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks' + exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete' + endif + if !exists("s:netrw_initbookhist") + call s:NetrwBookHistRead() + endif - endif + " show bookmarked places + if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0 + let cnt= 1 + for bmd in g:netrw_bookmarklist + " call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmd.' :e '.bmd,'~'.expand("")) + let bmd= escape(bmd,g:netrw_menu_escape) - " show directory browsing history - if g:netrw_dirhistmax > 0 - let cnt = g:netrw_dirhistcnt - let first = 1 - let histcnt = 0 - while ( first || cnt != g:netrw_dirhistcnt ) - let histcnt = histcnt + 1 - let priority = g:netrw_dirhistcnt + histcnt - if exists("g:netrw_dirhist_{cnt}") - let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape) -" call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir,'~'.expand("")) - exe 'sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir."\" - endif - let first = 0 - let cnt = ( cnt - 1 ) % g:netrw_dirhistmax - if cnt < 0 - let cnt= cnt + g:netrw_dirhistmax - endif - endwhile - endif + " show bookmarks for goto menu + exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.' :e '.bmd."\" + + " show bookmarks for deletion menu + exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.' '.cnt."mB" + let cnt= cnt + 1 + endfor + + endif + + " show directory browsing history + if g:netrw_dirhistmax > 0 + let cnt = g:netrw_dirhistcnt + let first = 1 + let histcnt = 0 + while ( first || cnt != g:netrw_dirhistcnt ) + let histcnt = histcnt + 1 + let priority = g:netrw_dirhistcnt + histcnt + if exists("g:netrw_dirhist_{cnt}") + let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape) + " call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir,'~'.expand("")) + exe 'sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir."\" + endif + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + if cnt < 0 + let cnt= cnt + g:netrw_dirhistmax + endif + endwhile + endif endif -" call Dret("NetrwBookmarkMenu") + " call Dret("NetrwBookmarkMenu") endfun " --------------------------------------------------------------------- @@ -4572,10 +4611,10 @@ endfun fun! s:NetrwBrowseChgDir(islocal,newdir,cursor,...) let ykeep= @@ if !exists("b:netrw_curdir") - " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called - " and the current window is the NetrwMessage window. - let @@= ykeep - return + " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called + " and the current window is the NetrwMessage window. + let @@= ykeep + return endif " NetrwBrowseChgDir; save options and initialize {{{3 @@ -4585,314 +4624,314 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,cursor,...) let newdir = a:newdir if a:cursor && exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treetop") - " dirname is the path to the word under the cursor - let dirname = s:NetrwTreePath(w:netrw_treetop) - " newdir resolves to a directory and points to a directory in dirname - " /tmp/test/folder_symlink/ -> /tmp/test/original_folder/ - if a:islocal && fnamemodify(dirname, ':t') == newdir && isdirectory(resolve(dirname)) && resolve(dirname) == resolve(newdir) - let dirname = fnamemodify(resolve(dirname), ':p:h:h') - let newdir = fnamemodify(resolve(newdir), ':t') - endif - " Remove trailing "/" - let dirname = substitute(dirname, "/$", "", "") - - " If the word under the cursor is a directory (except for ../), NetrwTreePath - " returns the full path, including the word under the cursor, remove it - if newdir =~ "/$" && newdir != "../" - let dirname = fnamemodify(dirname, ":h") - endif - else - let dirname = b:netrw_curdir + " dirname is the path to the word under the cursor + let dirname = s:NetrwTreePath(w:netrw_treetop) + " newdir resolves to a directory and points to a directory in dirname + " /tmp/test/folder_symlink/ -> /tmp/test/original_folder/ + if a:islocal && fnamemodify(dirname, ':t') == newdir && isdirectory(resolve(dirname)) && resolve(dirname) == resolve(newdir) + let dirname = fnamemodify(resolve(dirname), ':p:h:h') + let newdir = fnamemodify(resolve(newdir), ':t') + endif + " Remove trailing "/" + let dirname = substitute(dirname, "/$", "", "") + + " If the word under the cursor is a directory (except for ../), NetrwTreePath + " returns the full path, including the word under the cursor, remove it + if newdir =~ "/$" && newdir != "../" + let dirname = fnamemodify(dirname, ":h") + endif + else + let dirname = b:netrw_curdir endif if has("win32") - let dirname = substitute(dirname,'\\','/','ge') + let dirname = substitute(dirname,'\\','/','ge') endif let dolockout = 0 let dorestore = 1 " ignore s when done in the banner if g:netrw_banner - if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt && line("$") >= w:netrw_bannercnt - if getline(".") =~# 'Quick Help' - let g:netrw_quickhelp= (g:netrw_quickhelp + 1)%len(s:QuickHelp) - setl ma noro nowrap - NetrwKeepj call setline(line('.'),'" Quick Help: :help '.s:QuickHelp[g:netrw_quickhelp]) - setl noma nomod nowrap - NetrwKeepj call s:NetrwOptionsRestore("s:") + if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt && line("$") >= w:netrw_bannercnt + if getline(".") =~# 'Quick Help' + let g:netrw_quickhelp= (g:netrw_quickhelp + 1)%len(s:QuickHelp) + setl ma noro nowrap + NetrwKeepj call setline(line('.'),'" Quick Help: :help '.s:QuickHelp[g:netrw_quickhelp]) + setl noma nomod nowrap + NetrwKeepj call s:NetrwOptionsRestore("s:") + endif endif - endif endif " set up o/s-dependent directory recognition pattern if has("amiga") - let dirpat= '[\/:]$' + let dirpat= '[\/:]$' else - let dirpat= '[\/]$' + let dirpat= '[\/]$' endif if dirname !~ dirpat - " apparently vim is "recognizing" that it is in a directory and - " is removing the trailing "/". Bad idea, so let's put it back. - let dirname= dirname.'/' + " apparently vim is "recognizing" that it is in a directory and + " is removing the trailing "/". Bad idea, so let's put it back. + let dirname= dirname.'/' endif if newdir !~ dirpat && !(a:islocal && isdirectory(s:NetrwFile(s:ComposePath(dirname,newdir)))) - " ------------------------------ - " NetrwBrowseChgDir: edit a file {{{3 - " ------------------------------ - - " save position for benefit of Rexplore - let s:rexposn_{bufnr("%")}= winsaveview() - - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)' - if dirname =~ '/$' - let dirname= dirname.newdir - else - let dirname= dirname."/".newdir - endif - elseif newdir =~ '^\(/\|\a:\)' - let dirname= newdir - else - let dirname= s:ComposePath(dirname,newdir) - endif - " this lets netrw#BrowseX avoid the edit - if a:0 < 1 - NetrwKeepj call s:NetrwOptionsRestore("s:") - let curdir= b:netrw_curdir - if !exists("s:didsplit") - if type(g:netrw_browse_split) == 3 - " open file in server - " Note that g:netrw_browse_split is a List: [servername,tabnr,winnr] - call s:NetrwServerEdit(a:islocal,dirname) - return + " ------------------------------ + " NetrwBrowseChgDir: edit a file {{{3 + " ------------------------------ + + " save position for benefit of Rexplore + let s:rexposn_{bufnr("%")}= winsaveview() + + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)' + if dirname =~ '/$' + let dirname= dirname.newdir + else + let dirname= dirname."/".newdir + endif + elseif newdir =~ '^\(/\|\a:\)' + let dirname= newdir + else + let dirname= s:ComposePath(dirname,newdir) + endif + " this lets netrw#BrowseX avoid the edit + if a:0 < 1 + NetrwKeepj call s:NetrwOptionsRestore("s:") + let curdir= b:netrw_curdir + if !exists("s:didsplit") + if type(g:netrw_browse_split) == 3 + " open file in server + " Note that g:netrw_browse_split is a List: [servername,tabnr,winnr] + call s:NetrwServerEdit(a:islocal,dirname) + return + + elseif g:netrw_browse_split == 1 + " horizontally splitting the window first + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize + exe "keepalt ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s" + if !&ea + keepalt wincmd _ + endif + call s:SetRexDir(a:islocal,curdir) + + elseif g:netrw_browse_split == 2 + " vertically splitting the window first + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize + exe "keepalt ".(g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s" + if !&ea + keepalt wincmd | + endif + call s:SetRexDir(a:islocal,curdir) + + elseif g:netrw_browse_split == 3 + " open file in new tab + keepalt tabnew + if !exists("b:netrw_curdir") + let b:netrw_curdir= getcwd() + endif + call s:SetRexDir(a:islocal,curdir) + + elseif g:netrw_browse_split == 4 + " act like "P" (ie. open previous window) + if s:NetrwPrevWinOpen(2) == 3 + let @@= ykeep + return + endif + call s:SetRexDir(a:islocal,curdir) + + else + " handling a file, didn't split, so remove menu + call s:NetrwMenu(0) + " optional change to window + if g:netrw_chgwin >= 1 + if winnr("$")+1 == g:netrw_chgwin + " if g:netrw_chgwin is set to one more than the last window, then + " vertically split the last window to make that window available. + let curwin= winnr() + exe "NetrwKeepj keepalt ".winnr("$")."wincmd w" + vs + exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd ".curwin + endif + exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w" + endif + call s:SetRexDir(a:islocal,curdir) + endif - elseif g:netrw_browse_split == 1 - " horizontally splitting the window first - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize - exe "keepalt ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s" - if !&ea - keepalt wincmd _ endif - call s:SetRexDir(a:islocal,curdir) - elseif g:netrw_browse_split == 2 - " vertically splitting the window first - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize - exe "keepalt ".(g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s" - if !&ea - keepalt wincmd | - endif - call s:SetRexDir(a:islocal,curdir) - - elseif g:netrw_browse_split == 3 - " open file in new tab - keepalt tabnew - if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() - endif - call s:SetRexDir(a:islocal,curdir) - - elseif g:netrw_browse_split == 4 - " act like "P" (ie. open previous window) - if s:NetrwPrevWinOpen(2) == 3 - let @@= ykeep - return - endif - call s:SetRexDir(a:islocal,curdir) - - else - " handling a file, didn't split, so remove menu - call s:NetrwMenu(0) - " optional change to window - if g:netrw_chgwin >= 1 - if winnr("$")+1 == g:netrw_chgwin - " if g:netrw_chgwin is set to one more than the last window, then - " vertically split the last window to make that window available. - let curwin= winnr() - exe "NetrwKeepj keepalt ".winnr("$")."wincmd w" - vs - exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd ".curwin - endif - exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w" - endif - call s:SetRexDir(a:islocal,curdir) - endif - - endif - - " the point where netrw actually edits the (local) file - " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will - " use keepalt to support :e # to return to a directory listing - if !&mod - " if e the new file would fail due to &mod, then don't change any of the flags - let dolockout= 1 - endif - if a:islocal - " some like c-^ to return to the last edited file - " others like c-^ to return to the netrw buffer - " Apr 30, 2020: used to have e! here. That can cause loss of a modified file, - " so emit error E37 instead. - call s:NetrwEditFile("e","",dirname) - call s:NetrwCursor(1) - if &hidden || &bufhidden == "hide" - " file came from vim's hidden storage. Don't "restore" options with it. - let dorestore= 0 - endif - else - endif - - " handle g:Netrw_funcref -- call external-to-netrw functions - " This code will handle g:Netrw_funcref as an individual function reference - " or as a list of function references. It will ignore anything that's not - " a function reference. See :help Funcref for information about function references. - if exists("g:Netrw_funcref") - if type(g:Netrw_funcref) == 2 - NetrwKeepj call g:Netrw_funcref() - elseif type(g:Netrw_funcref) == 3 - for Fncref in g:Netrw_funcref - if type(Fncref) == 2 - NetrwKeepj call Fncref() - endif - endfor - endif + " the point where netrw actually edits the (local) file + " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will + " use keepalt to support :e # to return to a directory listing + if !&mod + " if e the new file would fail due to &mod, then don't change any of the flags + let dolockout= 1 + endif + if a:islocal + " some like c-^ to return to the last edited file + " others like c-^ to return to the netrw buffer + " Apr 30, 2020: used to have e! here. That can cause loss of a modified file, + " so emit error E37 instead. + call s:NetrwEditFile("e","",dirname) + call s:NetrwCursor(1) + if &hidden || &bufhidden == "hide" + " file came from vim's hidden storage. Don't "restore" options with it. + let dorestore= 0 + endif + else + endif + + " handle g:Netrw_funcref -- call external-to-netrw functions + " This code will handle g:Netrw_funcref as an individual function reference + " or as a list of function references. It will ignore anything that's not + " a function reference. See :help Funcref for information about function references. + if exists("g:Netrw_funcref") + if type(g:Netrw_funcref) == 2 + NetrwKeepj call g:Netrw_funcref() + elseif type(g:Netrw_funcref) == 3 + for Fncref in g:Netrw_funcref + if type(Fncref) == 2 + NetrwKeepj call Fncref() + endif + endfor + endif + endif endif - endif elseif newdir =~ '^/' - " ---------------------------------------------------- - " NetrwBrowseChgDir: just go to the new directory spec {{{3 - " ---------------------------------------------------- - let dirname = newdir - NetrwKeepj call s:SetRexDir(a:islocal,dirname) - NetrwKeepj call s:NetrwOptionsRestore("s:") - norm! m` + " ---------------------------------------------------- + " NetrwBrowseChgDir: just go to the new directory spec {{{3 + " ---------------------------------------------------- + let dirname = newdir + NetrwKeepj call s:SetRexDir(a:islocal,dirname) + NetrwKeepj call s:NetrwOptionsRestore("s:") + norm! m` elseif newdir == './' - " --------------------------------------------- - " NetrwBrowseChgDir: refresh the directory list {{{3 - " --------------------------------------------- - NetrwKeepj call s:SetRexDir(a:islocal,dirname) - norm! m` + " --------------------------------------------- + " NetrwBrowseChgDir: refresh the directory list {{{3 + " --------------------------------------------- + NetrwKeepj call s:SetRexDir(a:islocal,dirname) + norm! m` elseif newdir == '../' - " -------------------------------------- - " NetrwBrowseChgDir: go up one directory {{{3 - " -------------------------------------- + " -------------------------------------- + " NetrwBrowseChgDir: go up one directory {{{3 + " -------------------------------------- - if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") - " force a refresh - setl noro ma - NetrwKeepj %d _ - endif + if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") + " force a refresh + setl noro ma + NetrwKeepj %d _ + endif + + if has("amiga") + " amiga + if a:islocal + let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','') + let dirname= substitute(dirname,'/$','','') + else + let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','') + endif + + elseif !g:netrw_cygwin && has("win32") + " windows + if a:islocal + let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') + if dirname == "" + let dirname= '/' + endif + else + let dirname= substitute(dirname,'^\(\a\{3,}://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') + endif + if dirname =~ '^\a:$' + let dirname= dirname.'/' + endif - if has("amiga") - " amiga - if a:islocal - let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','') - let dirname= substitute(dirname,'/$','','') else - let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','') + " unix or cygwin + if a:islocal + let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') + if dirname == "" + let dirname= '/' + endif + else + let dirname= substitute(dirname,'^\(\a\{3,}://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') + endif endif + NetrwKeepj call s:SetRexDir(a:islocal,dirname) + norm! m` - elseif !g:netrw_cygwin && has("win32") - " windows - if a:islocal - let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') - if dirname == "" - let dirname= '/' - endif + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") + " -------------------------------------- + " NetrwBrowseChgDir: Handle Tree Listing {{{3 + " -------------------------------------- + " force a refresh (for TREELIST, NetrwTreeDir() will force the refresh) + setl noro ma + if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")) + NetrwKeepj %d _ + endif + let treedir = s:NetrwTreeDir(a:islocal) + let s:treecurpos = winsaveview() + let haskey = 0 + + " search treedict for tree dir as-is + if has_key(w:netrw_treedict,treedir) + let haskey= 1 else - let dirname= substitute(dirname,'^\(\a\{3,}://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') endif - if dirname =~ '^\a:$' - let dirname= dirname.'/' + + " search treedict for treedir with a [/@] appended + if !haskey && treedir !~ '[/@]$' + if has_key(w:netrw_treedict,treedir."/") + let treedir= treedir."/" + let haskey = 1 + else + endif endif - else - " unix or cygwin - if a:islocal - let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') - if dirname == "" - let dirname= '/' - endif - else - let dirname= substitute(dirname,'^\(\a\{3,}://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') + " search treedict for treedir with any trailing / elided + if !haskey && treedir =~ '/$' + let treedir= substitute(treedir,'/$','','') + if has_key(w:netrw_treedict,treedir) + let haskey = 1 + else + endif endif - endif - NetrwKeepj call s:SetRexDir(a:islocal,dirname) - norm! m` - elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") - " -------------------------------------- - " NetrwBrowseChgDir: Handle Tree Listing {{{3 - " -------------------------------------- - " force a refresh (for TREELIST, NetrwTreeDir() will force the refresh) - setl noro ma - if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")) - NetrwKeepj %d _ - endif - let treedir = s:NetrwTreeDir(a:islocal) - let s:treecurpos = winsaveview() - let haskey = 0 - - " search treedict for tree dir as-is - if has_key(w:netrw_treedict,treedir) - let haskey= 1 - else - endif - - " search treedict for treedir with a [/@] appended - if !haskey && treedir !~ '[/@]$' - if has_key(w:netrw_treedict,treedir."/") - let treedir= treedir."/" - let haskey = 1 - else - endif - endif - - " search treedict for treedir with any trailing / elided - if !haskey && treedir =~ '/$' - let treedir= substitute(treedir,'/$','','') - if has_key(w:netrw_treedict,treedir) - let haskey = 1 + if haskey + " close tree listing for selected subdirectory + call remove(w:netrw_treedict,treedir) + let dirname= w:netrw_treetop else + " go down one directory + let dirname= substitute(treedir,'/*$','/','') endif - endif - - if haskey - " close tree listing for selected subdirectory - call remove(w:netrw_treedict,treedir) - let dirname= w:netrw_treetop - else - " go down one directory - let dirname= substitute(treedir,'/*$','/','') - endif - NetrwKeepj call s:SetRexDir(a:islocal,dirname) - let s:treeforceredraw = 1 + NetrwKeepj call s:SetRexDir(a:islocal,dirname) + let s:treeforceredraw = 1 else - " ---------------------------------------- - " NetrwBrowseChgDir: Go down one directory {{{3 - " ---------------------------------------- - let dirname = s:ComposePath(dirname,newdir) - NetrwKeepj call s:SetRexDir(a:islocal,dirname) - norm! m` + " ---------------------------------------- + " NetrwBrowseChgDir: Go down one directory {{{3 + " ---------------------------------------- + let dirname = s:ComposePath(dirname,newdir) + NetrwKeepj call s:SetRexDir(a:islocal,dirname) + norm! m` endif - " -------------------------------------- - " NetrwBrowseChgDir: Restore and Cleanup {{{3 - " -------------------------------------- + " -------------------------------------- + " NetrwBrowseChgDir: Restore and Cleanup {{{3 + " -------------------------------------- if dorestore - " dorestore is zero'd when a local file was hidden or bufhidden; - " in such a case, we want to keep whatever settings it may have. - NetrwKeepj call s:NetrwOptionsRestore("s:") + " dorestore is zero'd when a local file was hidden or bufhidden; + " in such a case, we want to keep whatever settings it may have. + NetrwKeepj call s:NetrwOptionsRestore("s:") endif if dolockout && dorestore - if filewritable(dirname) - setl ma noro nomod - else - setl ma ro nomod - endif + if filewritable(dirname) + setl ma noro nomod + else + setl ma ro nomod + endif endif call s:RestorePosn(s:netrw_posn) let @@= ykeep @@ -4906,62 +4945,62 @@ endfun " for tree, keeps cursor on current filename fun! s:NetrwBrowseUpDir(islocal) if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt-1 - " this test needed because occasionally this function seems to be incorrectly called - " when multiple leftmouse clicks are taken when atop the one line help in the banner. - " I'm allowing the very bottom line to permit a "-" exit so that one may escape empty - " directories. - return + " this test needed because occasionally this function seems to be incorrectly called + " when multiple leftmouse clicks are taken when atop the one line help in the banner. + " I'm allowing the very bottom line to permit a "-" exit so that one may escape empty + " directories. + return endif norm! 0 if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") - let curline= getline(".") - let swwline= winline() - 1 - if exists("w:netrw_treetop") - let b:netrw_curdir= w:netrw_treetop - elseif exists("b:netrw_curdir") - let w:netrw_treetop= b:netrw_curdir - else - let w:netrw_treetop= getcwd() - let b:netrw_curdir = w:netrw_treetop - endif - let curfile = getline(".") - let curpath = s:NetrwTreePath(w:netrw_treetop) - if a:islocal - call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../',0)) - else - call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../',0)) - endif - if w:netrw_treetop == '/' - keepj call search('^\M'.curfile,"w") - elseif curfile == '../' - keepj call search('^\M'.curfile,"wb") - else - while 1 - keepj call search('^\M'.s:treedepthstring.curfile,"wb") - let treepath= s:NetrwTreePath(w:netrw_treetop) - if treepath == curpath - break - endif - endwhile - endif + let curline= getline(".") + let swwline= winline() - 1 + if exists("w:netrw_treetop") + let b:netrw_curdir= w:netrw_treetop + elseif exists("b:netrw_curdir") + let w:netrw_treetop= b:netrw_curdir + else + let w:netrw_treetop= getcwd() + let b:netrw_curdir = w:netrw_treetop + endif + let curfile = getline(".") + let curpath = s:NetrwTreePath(w:netrw_treetop) + if a:islocal + call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../',0)) + else + call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../',0)) + endif + if w:netrw_treetop == '/' + keepj call search('^\M'.curfile,"w") + elseif curfile == '../' + keepj call search('^\M'.curfile,"wb") + else + while 1 + keepj call search('^\M'.s:treedepthstring.curfile,"wb") + let treepath= s:NetrwTreePath(w:netrw_treetop) + if treepath == curpath + break + endif + endwhile + endif else - call s:SavePosn(s:netrw_posn) - if exists("b:netrw_curdir") - let curdir= b:netrw_curdir - else - let curdir= expand(getcwd()) - endif - if a:islocal - call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../',0)) - else - call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../',0)) - endif - call s:RestorePosn(s:netrw_posn) - let curdir= substitute(curdir,'^.*[\/]','','') - let curdir= '\<'. escape(curdir, '~'). '/' - call search(curdir,'wc') + call s:SavePosn(s:netrw_posn) + if exists("b:netrw_curdir") + let curdir= b:netrw_curdir + else + let curdir= expand(getcwd()) + endif + if a:islocal + call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../',0)) + else + call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../',0)) + endif + call s:RestorePosn(s:netrw_posn) + let curdir= substitute(curdir,'^.*[\/]','','') + let curdir= '\<'. escape(curdir, '~'). '/' + call search(curdir,'wc') endif endfun @@ -4979,69 +5018,71 @@ func s:redir() endfunc if has('unix') - if has('win32unix') - " Cygwin provides cygstart - if executable('cygstart') - fun! netrw#Launch(args) - exe 'silent ! cygstart --hide' a:args s:redir() | redraw! - endfun - elseif !empty($MSYSTEM) && executable('start') - " MSYS2/Git Bash comes by default without cygstart; see - " https://www.msys2.org/wiki/How-does-MSYS2-differ-from-Cygwin - " Instead it provides /usr/bin/start script running `cmd.exe //c start` - " Adding "" //b` sets void title, hides cmd window and blocks path conversion - " of /b to \b\ " by MSYS2; see https://www.msys2.org/docs/filesystem-paths/ - fun! netrw#Launch(args) - exe 'silent !start "" //b' a:args s:redir() | redraw! - endfun - else - " imitate /usr/bin/start script for other environments and hope for the best - fun! netrw#Launch(args) - exe 'silent !cmd //c start "" //b' a:args s:redir() | redraw! - endfun - endif - elseif exists('$WSL_DISTRO_NAME') " use cmd.exe to start GUI apps in WSL - fun! netrw#Launch(args) - let args = a:args - exe 'silent !' .. - \ ((args =~? '\v<\f+\.(exe|com|bat|cmd)>') ? - \ 'cmd.exe /c start /b ' .. args : - \ 'nohup ' .. args .. ' ' .. s:redir() .. ' &') - \ | redraw! - endfun - else + if has('win32unix') + " Cygwin provides cygstart + if executable('cygstart') + fun! netrw#Launch(args) + exe 'silent ! cygstart --hide' a:args s:redir() | redraw! + endfun + elseif !empty($MSYSTEM) && executable('start') + " MSYS2/Git Bash comes by default without cygstart; see + " https://www.msys2.org/wiki/How-does-MSYS2-differ-from-Cygwin + " Instead it provides /usr/bin/start script running `cmd.exe //c start` + " Adding "" //b` sets void title, hides cmd window and blocks path conversion + " of /b to \b\ " by MSYS2; see https://www.msys2.org/docs/filesystem-paths/ + fun! netrw#Launch(args) + exe 'silent !start "" //b' a:args s:redir() | redraw! + endfun + else + " imitate /usr/bin/start script for other environments and hope for the best + fun! netrw#Launch(args) + exe 'silent !cmd //c start "" //b' a:args s:redir() | redraw! + endfun + endif + elseif exists('$WSL_DISTRO_NAME') " use cmd.exe to start GUI apps in WSL + fun! netrw#Launch(args) + let args = a:args + exe 'silent !' .. + \ ((args =~? '\v<\f+\.(exe|com|bat|cmd)>') ? + \ 'cmd.exe /c start /b ' .. args : + \ 'nohup ' .. args .. ' ' .. s:redir() .. ' &') + \ | redraw! + endfun + else + fun! netrw#Launch(args) + exe ':silent ! nohup' a:args s:redir() (has('gui_running') ? '' : '&') | redraw! + endfun + endif +elseif has('win32') fun! netrw#Launch(args) - exe ':silent ! nohup' a:args s:redir() '&' | redraw! + exe 'silent !' .. (&shell =~? '\' ? '' : 'cmd.exe /c') + \ 'start "" /b' a:args s:redir() | redraw! endfun - endif -elseif has('win32') - fun! netrw#Launch(args) - exe 'silent !' .. (&shell =~? '\' ? '' : 'cmd.exe /c') - \ 'start "" /b' a:args s:redir() | redraw! - endfun else - fun! netrw#Launch(dummy) - echom 'No common launcher found' - endfun + fun! netrw#Launch(dummy) + echom 'No common launcher found' + endfun endif " Git Bash if has('win32unix') - " (cyg)start suffices - let s:os_viewer = '' + " (cyg)start suffices + let s:os_viewer = '' " Windows / WSL elseif executable('explorer.exe') - let s:os_viewer = 'explorer.exe' + let s:os_viewer = 'explorer.exe' " Linux / BSD elseif executable('xdg-open') - let s:os_viewer = 'xdg-open' + let s:os_viewer = 'xdg-open' " MacOS elseif executable('open') - let s:os_viewer = 'open' + let s:os_viewer = 'open' endif fun! s:viewer() - if exists('g:netrw_browsex_viewer') && executable(g:netrw_browsex_viewer) + " g:netrw_browsex_viewer could be a string of program + its arguments, + " test if first argument is executable + if exists('g:netrw_browsex_viewer') && executable(split(g:netrw_browsex_viewer)[0]) " extract any viewing options. Assumes that they're set apart by spaces. " call Decho("extract any viewing options from g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">",'~'.expand("")) if g:netrw_browsex_viewer =~ '\s' @@ -5073,7 +5114,7 @@ endfun fun! netrw#Open(file) abort call netrw#Launch(s:viewer() .. ' ' .. shellescape(a:file, 1)) -endf +endfun if !exists('g:netrw_regex_url') let g:netrw_regex_url = '\%(\%(http\|ftp\|irc\)s\?\|file\)://\S\{-}' @@ -5085,8 +5126,8 @@ endif " 0=local, 1=remote fun! netrw#BrowseX(fname,remote) if a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$' - " remote directory, not a webpage access, looks like an attempt to do a directory listing - norm! gf + " remote directory, not a webpage access, looks like an attempt to do a directory listing + norm! gf endif if exists("g:netrw_browsex_viewer") && exists("g:netrw_browsex_support_remote") && !g:netrw_browsex_support_remote @@ -5104,79 +5145,78 @@ fun! netrw#BrowseX(fname,remote) " special core dump handler if a:fname =~ '/core\(\.\d\+\)\=$' - if exists("g:Netrw_corehandler") - if type(g:Netrw_corehandler) == 2 - " g:Netrw_corehandler is a function reference (see :help Funcref) - call g:Netrw_corehandler(s:NetrwFile(a:fname)) - elseif type(g:Netrw_corehandler) == 3 - " g:Netrw_corehandler is a List of function references (see :help Funcref) - for Fncref in g:Netrw_corehandler - if type(Fncref) == 2 - call Fncref(a:fname) - endif - endfor - endif - call winrestview(screenposn) - let @@= ykeep - let &aw= awkeep - return - endif + if exists("g:Netrw_corehandler") + if type(g:Netrw_corehandler) == 2 + " g:Netrw_corehandler is a function reference (see :help Funcref) + call g:Netrw_corehandler(s:NetrwFile(a:fname)) + elseif type(g:Netrw_corehandler) == 3 + " g:Netrw_corehandler is a List of function references (see :help Funcref) + for Fncref in g:Netrw_corehandler + if type(Fncref) == 2 + call Fncref(a:fname) + endif + endfor + endif + call winrestview(screenposn) + let @@= ykeep + let &aw= awkeep + return + endif endif " set up the filename " (lower case the extension, make a local copy of a remote file) let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e') if has("win32") - let exten= substitute(exten,'^.*$','\L&\E','') + let exten= substitute(exten,'^.*$','\L&\E','') endif if exten =~ "[\\/]" - let exten= "" + let exten= "" endif if remote == 1 - " create a local copy - setl bh=delete - call netrw#NetRead(3,a:fname) - " attempt to rename tempfile - let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','') - let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','') - if s:netrw_tmpfile != newname && newname != "" - if rename(s:netrw_tmpfile,newname) == 0 - " renaming succeeded - let fname= newname - else - " renaming failed - let fname= s:netrw_tmpfile - endif - else - let fname= s:netrw_tmpfile - endif - else - let fname= a:fname - " special ~ handler for local - if fname =~ '^\~' && expand("$HOME") != "" - let fname= s:NetrwFile(substitute(fname,'^\~',expand("$HOME"),'')) - endif - endif - - " although shellescape(..., 1) is used in netrw#Open(), it's insufficient - call netrw#Open(escape(fname, '#%')) + " create a local copy + setl bh=delete + call netrw#NetRead(3,a:fname) + " attempt to rename tempfile + let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','') + let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','') + if s:netrw_tmpfile != newname && newname != "" + if rename(s:netrw_tmpfile,newname) == 0 + " renaming succeeded + let fname= newname + else + " renaming failed + let fname= s:netrw_tmpfile + endif + else + let fname= s:netrw_tmpfile + endif + else + let fname= a:fname + " special ~ handler for local + if fname =~ '^\~' && expand("$HOME") != "" + let fname= s:NetrwFile(substitute(fname,'^\~',expand("$HOME"),'')) + endif + endif + + call netrw#Open(fname) " cleanup: remove temporary file, " delete current buffer if success with handler, " return to prior buffer (directory listing) " Feb 12, 2008: had to de-activate removal of " temporary file because it wasn't getting seen. -" if remote == 1 && fname != a:fname -" call s:NetrwDelete(fname) -" endif + " if remote == 1 && fname != a:fname + " call s:NetrwDelete(fname) + " endif if remote == 1 - setl bh=delete bt=nofile - if g:netrw_use_noswf - setl noswf - endif - exe "sil! NetrwKeepj norm! \" + setl bh=delete bt=nofile + if g:netrw_use_noswf + setl noswf + endif + exe "sil! NetrwKeepj norm! \" endif call winrestview(screenposn) let @@ = ykeep @@ -5188,22 +5228,22 @@ endfun " See also: netrw#BrowseXVis " netrw#BrowseX fun! netrw#GX() -" call Dfunc("netrw#GX()") + " call Dfunc("netrw#GX()") if &ft == "netrw" - let fname= s:NetrwGetWord() + let fname= s:NetrwGetWord() else - let fname= exists("g:netrw_gx")? expand(g:netrw_gx) : s:GetURL() + let fname= exists("g:netrw_gx")? expand(g:netrw_gx) : s:GetURL() endif -" call Dret("netrw#GX <".fname.">") + " call Dret("netrw#GX <".fname.">") return fname endfun fun! s:GetURL() abort - let URL = '' - if exists('*Netrw_get_URL_' .. &filetype) - let URL = call('Netrw_get_URL_' .. &filetype, []) - endif - if !empty(URL) | return URL | endif + let URL = '' + if exists('*Netrw_get_URL_' .. &filetype) + let URL = call('Netrw_get_URL_' .. &filetype, []) + endif + if !empty(URL) | return URL | endif " URLs end in letter, digit or forward slash let URL = matchstr(expand(""), '\<' .. g:netrw_regex_url .. '\ze[^A-Za-z0-9/]*$') if !empty(URL) | return URL | endif @@ -5239,53 +5279,53 @@ endfun " Using the file command on a "[No Name]" buffer does not seem to cause the old "[No Name]" buffer " to become an unlisted buffer, so in that case don't bwipe it. fun! s:NetrwBufRename(newname) -" call Dfunc("s:NetrwBufRename(newname<".a:newname.">) buf(%)#".bufnr("%")."<".bufname(bufnr("%")).">") -" call Dredir("ls!","s:NetrwBufRename (before rename)") + " call Dfunc("s:NetrwBufRename(newname<".a:newname.">) buf(%)#".bufnr("%")."<".bufname(bufnr("%")).">") + " call Dredir("ls!","s:NetrwBufRename (before rename)") let oldbufname= bufname(bufnr("%")) -" call Decho("buf#".bufnr("%").": oldbufname<".oldbufname.">",'~'.expand("")) + " call Decho("buf#".bufnr("%").": oldbufname<".oldbufname.">",'~'.expand("")) if oldbufname != a:newname -" call Decho("do buffer rename: oldbufname<".oldbufname."> ≠ a:newname<".a:newname.">",'~'.expand("")) - let b:junk= 1 -" call Decho("rename buffer: sil! keepj keepalt file ".fnameescape(a:newname),'~'.expand("")) - exe 'sil! keepj keepalt file '.fnameescape(a:newname) -" call Dredir("ls!","s:NetrwBufRename (before bwipe)~".expand("")) - let oldbufnr= bufnr(oldbufname) -" call Decho("oldbufname<".oldbufname."> oldbufnr#".oldbufnr,'~'.expand("")) -" call Decho("bufnr(%)=".bufnr("%"),'~'.expand("")) - if oldbufname != "" && oldbufnr != -1 && oldbufnr != bufnr("%") -" call Decho("bwipe ".oldbufnr,'~'.expand("")) - exe "bwipe! ".oldbufnr -" else " Decho -" call Decho("did *not* bwipe buf#".oldbufnr,'~'.expand("")) -" call Decho("..reason: if oldbufname<".oldbufname."> is empty",'~'.expand(""))" -" call Decho("..reason: if oldbufnr#".oldbufnr." is -1",'~'.expand(""))" -" call Decho("..reason: if oldbufnr#".oldbufnr." != bufnr(%)#".bufnr("%"),'~'.expand(""))" - endif -" call Dredir("ls!","s:NetrwBufRename (after rename)") -" else " Decho -" call Decho("oldbufname<".oldbufname."> == a:newname: did *not* rename",'~'.expand("")) - endif - -" call Dret("s:NetrwBufRename : buf#".bufnr("%").": oldname<".oldbufname."> newname<".a:newname."> expand(%)<".expand("%").">") + " call Decho("do buffer rename: oldbufname<".oldbufname."> ≠ a:newname<".a:newname.">",'~'.expand("")) + let b:junk= 1 + " call Decho("rename buffer: sil! keepj keepalt file ".fnameescape(a:newname),'~'.expand("")) + exe 'sil! keepj keepalt file '.fnameescape(a:newname) + " call Dredir("ls!","s:NetrwBufRename (before bwipe)~".expand("")) + let oldbufnr= bufnr(oldbufname) + " call Decho("oldbufname<".oldbufname."> oldbufnr#".oldbufnr,'~'.expand("")) + " call Decho("bufnr(%)=".bufnr("%"),'~'.expand("")) + if oldbufname != "" && oldbufnr != -1 && oldbufnr != bufnr("%") + " call Decho("bwipe ".oldbufnr,'~'.expand("")) + exe "bwipe! ".oldbufnr + " else " Decho + " call Decho("did *not* bwipe buf#".oldbufnr,'~'.expand("")) + " call Decho("..reason: if oldbufname<".oldbufname."> is empty",'~'.expand(""))" + " call Decho("..reason: if oldbufnr#".oldbufnr." is -1",'~'.expand(""))" + " call Decho("..reason: if oldbufnr#".oldbufnr." != bufnr(%)#".bufnr("%"),'~'.expand(""))" + endif + " call Dredir("ls!","s:NetrwBufRename (after rename)") + " else " Decho + " call Decho("oldbufname<".oldbufname."> == a:newname: did *not* rename",'~'.expand("")) + endif + + " call Dret("s:NetrwBufRename : buf#".bufnr("%").": oldname<".oldbufname."> newname<".a:newname."> expand(%)<".expand("%").">") endfun " --------------------------------------------------------------------- " netrw#CheckIfRemote: returns 1 if current file looks like an url, 0 else {{{2 fun! netrw#CheckIfRemote(...) -" call Dfunc("netrw#CheckIfRemote() a:0=".a:0) + " call Dfunc("netrw#CheckIfRemote() a:0=".a:0) if a:0 > 0 - let curfile= a:1 + let curfile= a:1 else - let curfile= expand("%") + let curfile= expand("%") endif -" call Decho("curfile<".curfile.">") + " call Decho("curfile<".curfile.">") if curfile =~ '^\a\{3,}://' -" call Dret("netrw#CheckIfRemote 1") - return 1 + " call Dret("netrw#CheckIfRemote 1") + return 1 else -" call Dret("netrw#CheckIfRemote 0") - return 0 + " call Dret("netrw#CheckIfRemote 0") + return 0 endif endfun @@ -5300,10 +5340,10 @@ fun! s:NetrwChgPerm(islocal,curdir) let chgperm= substitute(chgperm,'\',s:ShellEscape(newperm),'') call system(chgperm) if v:shell_error != 0 - NetrwKeepj call netrw#ErrorMsg(1,"changing permission on file<".expand("")."> seems to have failed",75) + NetrwKeepj call netrw#ErrorMsg(1,"changing permission on file<".expand("")."> seems to have failed",75) endif if a:islocal - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) endif let @@= ykeep endfun @@ -5313,30 +5353,30 @@ endfun " Returns 0: kdeinit not running " 1: kdeinit is running fun! s:CheckIfKde() -" call Dfunc("s:CheckIfKde()") + " call Dfunc("s:CheckIfKde()") " seems kde systems often have gnome-open due to dependencies, even though " gnome-open's subsidiary display tools are largely absent. Kde systems " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) if !exists("s:haskdeinit") - if has("unix") && executable("ps") && !has("win32unix") - let s:haskdeinit= system("ps -e") =~ '\")) + " call Decho("setting s:haskdeinit=".s:haskdeinit,'~'.expand("")) endif -" call Dret("s:CheckIfKde ".s:haskdeinit) + " call Dret("s:CheckIfKde ".s:haskdeinit) return s:haskdeinit endfun " --------------------------------------------------------------------- " s:NetrwClearExplore: clear explore variables (if any) {{{2 fun! s:NetrwClearExplore() -" call Dfunc("s:NetrwClearExplore()") + " call Dfunc("s:NetrwClearExplore()") 2match none if exists("s:explore_match") |unlet s:explore_match |endif if exists("s:explore_indx") |unlet s:explore_indx |endif @@ -5347,40 +5387,40 @@ fun! s:NetrwClearExplore() if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif -" redraw! -" call Dret("s:NetrwClearExplore") + " redraw! + " call Dret("s:NetrwClearExplore") endfun " --------------------------------------------------------------------- " s:NetrwEditBuf: decides whether or not to use keepalt to edit a buffer {{{2 fun! s:NetrwEditBuf(bufnum) -" call Dfunc("s:NetrwEditBuf(fname<".a:bufnum.">)") + " call Dfunc("s:NetrwEditBuf(fname<".a:bufnum.">)") if exists("g:netrw_altfile") && g:netrw_altfile && &ft == "netrw" -" call Decho("exe sil! NetrwKeepj keepalt noswapfile b ".fnameescape(a:bufnum)) - exe "sil! NetrwKeepj keepalt noswapfile b ".fnameescape(a:bufnum) + " call Decho("exe sil! NetrwKeepj keepalt noswapfile b ".fnameescape(a:bufnum)) + exe "sil! NetrwKeepj keepalt noswapfile b ".fnameescape(a:bufnum) else -" call Decho("exe sil! NetrwKeepj noswapfile b ".fnameescape(a:bufnum)) - exe "sil! NetrwKeepj noswapfile b ".fnameescape(a:bufnum) + " call Decho("exe sil! NetrwKeepj noswapfile b ".fnameescape(a:bufnum)) + exe "sil! NetrwKeepj noswapfile b ".fnameescape(a:bufnum) endif -" call Dret("s:NetrwEditBuf") + " call Dret("s:NetrwEditBuf") endfun " --------------------------------------------------------------------- " s:NetrwEditFile: decides whether or not to use keepalt to edit a file {{{2 " NetrwKeepj [keepalt] fun! s:NetrwEditFile(cmd,opt,fname) -" call Dfunc("s:NetrwEditFile(cmd<".a:cmd.">,opt<".a:opt.">,fname<".a:fname.">) ft<".&ft.">") + " call Dfunc("s:NetrwEditFile(cmd<".a:cmd.">,opt<".a:opt.">,fname<".a:fname.">) ft<".&ft.">") if exists("g:netrw_altfile") && g:netrw_altfile && &ft == "netrw" -" call Decho("exe NetrwKeepj keepalt ".a:opt." ".a:cmd." ".fnameescape(a:fname)) - exe "NetrwKeepj keepalt ".a:opt." ".a:cmd." ".fnameescape(a:fname) + " call Decho("exe NetrwKeepj keepalt ".a:opt." ".a:cmd." ".fnameescape(a:fname)) + exe "NetrwKeepj keepalt ".a:opt." ".a:cmd." ".fnameescape(a:fname) else -" call Decho("exe NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname)) + " call Decho("exe NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname)) if a:cmd =~# 'e\%[new]!' && !&hidden && getbufvar(bufname('%'), '&modified', 0) call setbufvar(bufname('%'), '&bufhidden', 'hide') endif - exe "NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname) + exe "NetrwKeepj ".a:opt." ".a:cmd." ".fnameescape(a:fname) endif -" call Dret("s:NetrwEditFile") + " call Dret("s:NetrwEditFile") endfun " --------------------------------------------------------------------- @@ -5389,10 +5429,10 @@ fun! s:NetrwExploreListUniq(explist) " this assumes that the list is already sorted let newexplist= [] for member in a:explist - if !exists("uniqmember") || member != uniqmember - let uniqmember = member - let newexplist = newexplist + [ member ] - endif + if !exists("uniqmember") || member != uniqmember + let uniqmember = member + let newexplist = newexplist + [ member ] + endif endfor return newexplist endfun @@ -5402,17 +5442,17 @@ endfun fun! s:NetrwForceChgDir(islocal,newdir) let ykeep= @@ if a:newdir !~ '/$' - " ok, looks like force is needed to get directory-style treatment - if a:newdir =~ '@$' - let newdir= substitute(a:newdir,'@$','/','') - elseif a:newdir =~ '[*=|\\]$' - let newdir= substitute(a:newdir,'.$','/','') - else - let newdir= a:newdir.'/' - endif - else - " should already be getting treatment as a directory - let newdir= a:newdir + " ok, looks like force is needed to get directory-style treatment + if a:newdir =~ '@$' + let newdir= substitute(a:newdir,'@$','/','') + elseif a:newdir =~ '[*=|\\]$' + let newdir= substitute(a:newdir,'.$','/','') + else + let newdir= a:newdir.'/' + endif + else + " should already be getting treatment as a directory + let newdir= a:newdir endif let newdir= s:NetrwBrowseChgDir(a:islocal,newdir,0) call s:NetrwBrowse(a:islocal,newdir) @@ -5426,34 +5466,34 @@ endfun " pare =1: remove the current directory from the resulting glob() filelist " =0: leave the current directory in the resulting glob() filelist fun! s:NetrwGlob(direntry,expr,pare) -" call Dfunc("s:NetrwGlob(direntry<".a:direntry."> expr<".a:expr."> pare=".a:pare.")") + " call Dfunc("s:NetrwGlob(direntry<".a:direntry."> expr<".a:expr."> pare=".a:pare.")") if netrw#CheckIfRemote() - keepalt 1sp - keepalt enew - let keep_liststyle = w:netrw_liststyle - let w:netrw_liststyle = s:THINLIST - if s:NetrwRemoteListing() == 0 - keepj keepalt %s@/@@ - let filelist= getline(1,$) - q! - else - " remote listing error -- leave treedict unchanged - let filelist= w:netrw_treedict[a:direntry] - endif - let w:netrw_liststyle= keep_liststyle + keepalt 1sp + keepalt enew + let keep_liststyle = w:netrw_liststyle + let w:netrw_liststyle = s:THINLIST + if s:NetrwRemoteListing() == 0 + keepj keepalt %s@/@@ + let filelist= getline(1,$) + q! + else + " remote listing error -- leave treedict unchanged + let filelist= w:netrw_treedict[a:direntry] + endif + let w:netrw_liststyle= keep_liststyle else - let path= s:ComposePath(fnameescape(a:direntry), a:expr) + let path= s:ComposePath(fnameescape(a:direntry), a:expr) if has("win32") - " escape [ so it is not detected as wildcard character, see :h wildcard - let path= substitute(path, '[', '[[]', 'g') + " escape [ so it is not detected as wildcard character, see :h wildcard + let path= substitute(path, '[', '[[]', 'g') endif if v:version > 704 || (v:version == 704 && has("patch656")) - let filelist= glob(path,0,1,1) + let filelist= glob(path,0,1,1) else - let filelist= glob(path,0,1) + let filelist= glob(path,0,1) endif if a:pare - let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")') + let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")') endif endif return filelist @@ -5463,14 +5503,14 @@ endfun " s:NetrwForceFile: (gf support) Force treatment as a file {{{2 fun! s:NetrwForceFile(islocal,newfile) if a:newfile =~ '[/@*=|\\]$' - let newfile= substitute(a:newfile,'.$','','') + let newfile= substitute(a:newfile,'.$','','') else - let newfile= a:newfile + let newfile= a:newfile endif if a:islocal - call s:NetrwBrowseChgDir(a:islocal,newfile,0) + call s:NetrwBrowseChgDir(a:islocal,newfile,0) else - call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile,0)) + call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile,0)) endif endfun @@ -5487,35 +5527,35 @@ fun! s:NetrwHide(islocal) if exists("s:netrwmarkfilelist_{bufnr('%')}") - " hide the files in the markfile list - for fname in s:netrwmarkfilelist_{bufnr("%")} - if match(g:netrw_list_hide,'\<'.fname.'\>') != -1 - " remove fname from hiding list - let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','') - let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g') - let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','') - else - " append fname to hiding list - if exists("g:netrw_list_hide") && g:netrw_list_hide != "" - let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>' - else - let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>' - endif - endif - endfor - NetrwKeepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) - let g:netrw_hide= 1 + " hide the files in the markfile list + for fname in s:netrwmarkfilelist_{bufnr("%")} + if match(g:netrw_list_hide,'\<'.fname.'\>') != -1 + " remove fname from hiding list + let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','') + let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g') + let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','') + else + " append fname to hiding list + if exists("g:netrw_list_hide") && g:netrw_list_hide != "" + let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>' + else + let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>' + endif + endif + endfor + NetrwKeepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + let g:netrw_hide= 1 else - " switch between show-all/show-not-hidden/show-hidden - let g:netrw_hide=(g:netrw_hide+1)%3 - exe "NetrwKeepj norm! 0" - if g:netrw_hide && g:netrw_list_hide == "" - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49) - let @@= ykeep - return - endif + " switch between show-all/show-not-hidden/show-hidden + let g:netrw_hide=(g:netrw_hide+1)%3 + exe "NetrwKeepj norm! 0" + if g:netrw_hide && g:netrw_list_hide == "" + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49) + let @@= ykeep + return + endif endif NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) @@ -5552,15 +5592,15 @@ fun! s:NetrwHidden(islocal) let svpos = winsaveview() if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+' - " remove .file pattern from hiding list - let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','') + " remove .file pattern from hiding list + let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','') elseif s:Strlen(g:netrw_list_hide) >= 1 - let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+' + let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+' else - let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+' + let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+' endif if g:netrw_list_hide =~ '^,' - let g:netrw_list_hide= strpart(g:netrw_list_hide,1) + let g:netrw_list_hide= strpart(g:netrw_list_hide,1) endif " refresh screen and return to saved position @@ -5573,35 +5613,35 @@ endfun " s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2 fun! s:NetrwHome() if exists("g:netrw_home") - let home= expand(g:netrw_home) - else - " go to vim plugin home - for home in split(&rtp,',') + [''] - if isdirectory(s:NetrwFile(home)) && filewritable(s:NetrwFile(home)) | break | endif - let basehome= substitute(home,'[/\\]\.vim$','','') - if isdirectory(s:NetrwFile(basehome)) && filewritable(s:NetrwFile(basehome)) - let home= basehome."/.vim" - break - endif - endfor - if home == "" - " just pick the first directory - let home= substitute(&rtp,',.*$','','') - endif - if has("win32") - let home= substitute(home,'/','\\','g') - endif + let home= expand(g:netrw_home) + else + " go to vim plugin home + for home in split(&rtp,',') + [''] + if isdirectory(s:NetrwFile(home)) && filewritable(s:NetrwFile(home)) | break | endif + let basehome= substitute(home,'[/\\]\.vim$','','') + if isdirectory(s:NetrwFile(basehome)) && filewritable(s:NetrwFile(basehome)) + let home= basehome."/.vim" + break + endif + endfor + if home == "" + " just pick the first directory + let home= substitute(&rtp,',.*$','','') + endif + if has("win32") + let home= substitute(home,'/','\\','g') + endif endif " insure that the home directory exists if g:netrw_dirhistmax > 0 && !isdirectory(s:NetrwFile(home)) -" call Decho("insure that the home<".home."> directory exists") - if exists("g:netrw_mkdir") -" call Decho("call system(".g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home)).")") - call system(g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home))) - else -" call Decho("mkdir(".home.")") - call mkdir(home) - endif + " call Decho("insure that the home<".home."> directory exists") + if exists("g:netrw_mkdir") + " call Decho("call system(".g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home)).")") + call system(g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home))) + else + " call Decho("mkdir(".home.")") + call mkdir(home) + endif endif let g:netrw_home= home return home @@ -5611,16 +5651,16 @@ endfun " s:NetrwLeftmouse: handles the when in a netrw browsing window {{{2 fun! s:NetrwLeftmouse(islocal) if exists("s:netrwdrag") - return + return endif if &ft != "netrw" - return + return endif let ykeep= @@ " check if the status bar was clicked on instead of a file/directory name while getchar(0) != 0 - "clear the input stream + "clear the input stream endwhile call feedkeys("\") let c = getchar() @@ -5628,27 +5668,27 @@ fun! s:NetrwLeftmouse(islocal) let wlastline = line('w$') let lastline = line('$') if mouse_lnum >= wlastline + 1 || v:mouse_win != winnr() - " appears to be a status bar leftmouse click - let @@= ykeep - return - endif - " Dec 04, 2013: following test prevents leftmouse selection/deselection of directories and files in treelist mode - " Windows are separated by vertical separator bars - but the mouse seems to be doing what it should when dragging that bar - " without this test when its disabled. - " May 26, 2014: edit file, :Lex, resize window -- causes refresh. Reinstated a modified test. See if problems develop. - if v:mouse_col > virtcol('.') + " appears to be a status bar leftmouse click let @@= ykeep return - endif + endif + " Dec 04, 2013: following test prevents leftmouse selection/deselection of directories and files in treelist mode + " Windows are separated by vertical separator bars - but the mouse seems to be doing what it should when dragging that bar + " without this test when its disabled. + " May 26, 2014: edit file, :Lex, resize window -- causes refresh. Reinstated a modified test. See if problems develop. + if v:mouse_col > virtcol('.') + let @@= ykeep + return + endif if a:islocal - if exists("b:netrw_curdir") - NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord(),1)) - endif + if exists("b:netrw_curdir") + NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord(),1)) + endif else - if exists("b:netrw_curdir") - NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1)) - endif + if exists("b:netrw_curdir") + NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1)) + endif endif let @@= ykeep endfun @@ -5657,7 +5697,7 @@ endfun " s:NetrwCLeftmouse: used to select a file/directory for a target {{{2 fun! s:NetrwCLeftmouse(islocal) if &ft != "netrw" - return + return endif call s:NetrwMarkFileTgt(a:islocal) endfun @@ -5669,100 +5709,100 @@ endfun " a:islocal=2 : used, remote " a:islocal=3 : used, local fun! s:NetrwServerEdit(islocal,fname) -" call Dfunc("s:NetrwServerEdit(islocal=".a:islocal.",fname<".a:fname.">)") + " call Dfunc("s:NetrwServerEdit(islocal=".a:islocal.",fname<".a:fname.">)") let islocal = a:islocal%2 " =0: remote =1: local let ctrlr = a:islocal >= 2 " =0: not used =1: used if (islocal && isdirectory(s:NetrwFile(a:fname))) || (!islocal && a:fname =~ '/$') - " handle directories in the local window -- not in the remote vim server - " user must have closed the NETRWSERVER window. Treat as normal editing from netrw. - let g:netrw_browse_split= 0 - if exists("s:netrw_browse_split") && exists("s:netrw_browse_split_".winnr()) - let g:netrw_browse_split= s:netrw_browse_split_{winnr()} - unlet s:netrw_browse_split_{winnr()} - endif - call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,a:fname,0)) - return + " handle directories in the local window -- not in the remote vim server + " user must have closed the NETRWSERVER window. Treat as normal editing from netrw. + let g:netrw_browse_split= 0 + if exists("s:netrw_browse_split") && exists("s:netrw_browse_split_".winnr()) + let g:netrw_browse_split= s:netrw_browse_split_{winnr()} + unlet s:netrw_browse_split_{winnr()} + endif + call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,a:fname,0)) + return endif if has("clientserver") && executable("gvim") if exists("g:netrw_browse_split") && type(g:netrw_browse_split) == 3 - let srvrname = g:netrw_browse_split[0] - let tabnum = g:netrw_browse_split[1] - let winnum = g:netrw_browse_split[2] - - if serverlist() !~ '\<'.srvrname.'\>' - if !ctrlr - " user must have closed the server window and the user did not use , but - " used something like . - if exists("g:netrw_browse_split") - unlet g:netrw_browse_split - endif - let g:netrw_browse_split= 0 - if exists("s:netrw_browse_split_".winnr()) - let g:netrw_browse_split= s:netrw_browse_split_{winnr()} - endif - call s:NetrwBrowseChgDir(islocal,a:fname,0) - return - - elseif has("win32") && executable("start") - " start up remote netrw server under windows - call system("start gvim --servername ".srvrname) - - else - " start up remote netrw server under linux - call system("gvim --servername ".srvrname) + let srvrname = g:netrw_browse_split[0] + let tabnum = g:netrw_browse_split[1] + let winnum = g:netrw_browse_split[2] + + if serverlist() !~ '\<'.srvrname.'\>' + if !ctrlr + " user must have closed the server window and the user did not use , but + " used something like . + if exists("g:netrw_browse_split") + unlet g:netrw_browse_split + endif + let g:netrw_browse_split= 0 + if exists("s:netrw_browse_split_".winnr()) + let g:netrw_browse_split= s:netrw_browse_split_{winnr()} + endif + call s:NetrwBrowseChgDir(islocal,a:fname,0) + return + + elseif has("win32") && executable("start") + " start up remote netrw server under windows + call system("start gvim --servername ".srvrname) + + else + " start up remote netrw server under linux + call system("gvim --servername ".srvrname) + endif endif - endif - call remote_send(srvrname,":tabn ".tabnum."\") - call remote_send(srvrname,":".winnum."wincmd w\") - call remote_send(srvrname,":e ".fnameescape(s:NetrwFile(a:fname))."\") + call remote_send(srvrname,":tabn ".tabnum."\") + call remote_send(srvrname,":".winnum."wincmd w\") + call remote_send(srvrname,":e ".fnameescape(s:NetrwFile(a:fname))."\") else - if serverlist() !~ '\<'.g:netrw_servername.'\>' + if serverlist() !~ '\<'.g:netrw_servername.'\>' + + if !ctrlr + if exists("g:netrw_browse_split") + unlet g:netrw_browse_split + endif + let g:netrw_browse_split= 0 + call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,a:fname,0)) + return + + else + if has("win32") && executable("start") + " start up remote netrw server under windows + call system("start gvim --servername ".g:netrw_servername) + else + " start up remote netrw server under linux + call system("gvim --servername ".g:netrw_servername) + endif + endif + endif + + while 1 + try + call remote_send(g:netrw_servername,":e ".fnameescape(s:NetrwFile(a:fname))."\") + break + catch /^Vim\%((\a\+)\)\=:E241/ + sleep 200m + endtry + endwhile - if !ctrlr - if exists("g:netrw_browse_split") + if exists("g:netrw_browse_split") + if type(g:netrw_browse_split) != 3 + let s:netrw_browse_split_{winnr()}= g:netrw_browse_split + endif unlet g:netrw_browse_split - endif - let g:netrw_browse_split= 0 - call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,a:fname,0)) - return + endif + let g:netrw_browse_split= [g:netrw_servername,1,1] + endif - else - if has("win32") && executable("start") - " start up remote netrw server under windows - call system("start gvim --servername ".g:netrw_servername) - else - " start up remote netrw server under linux - call system("gvim --servername ".g:netrw_servername) - endif - endif - endif - - while 1 - try - call remote_send(g:netrw_servername,":e ".fnameescape(s:NetrwFile(a:fname))."\") - break - catch /^Vim\%((\a\+)\)\=:E241/ - sleep 200m - endtry - endwhile - - if exists("g:netrw_browse_split") - if type(g:netrw_browse_split) != 3 - let s:netrw_browse_split_{winnr()}= g:netrw_browse_split - endif - unlet g:netrw_browse_split - endif - let g:netrw_browse_split= [g:netrw_servername,1,1] - endif - - else + else call netrw#ErrorMsg(s:ERROR,"you need a gui-capable vim and client-server to use ",98) - endif + endif endfun @@ -5770,61 +5810,61 @@ endfun " s:NetrwSLeftmouse: marks the file under the cursor. May be dragged to select additional files {{{2 fun! s:NetrwSLeftmouse(islocal) if &ft != "netrw" - return + return endif -" call Dfunc("s:NetrwSLeftmouse(islocal=".a:islocal.")") + " call Dfunc("s:NetrwSLeftmouse(islocal=".a:islocal.")") let s:ngw= s:NetrwGetWord() call s:NetrwMarkFile(a:islocal,s:ngw) -" call Dret("s:NetrwSLeftmouse") + " call Dret("s:NetrwSLeftmouse") endfun " --------------------------------------------------------------------- " s:NetrwSLeftdrag: invoked via a shift-leftmouse and dragging {{{2 " Used to mark multiple files. fun! s:NetrwSLeftdrag(islocal) -" call Dfunc("s:NetrwSLeftdrag(islocal=".a:islocal.")") + " call Dfunc("s:NetrwSLeftdrag(islocal=".a:islocal.")") if !exists("s:netrwdrag") - let s:netrwdrag = winnr() - if a:islocal - nno :call NetrwSLeftrelease(1) - else - nno :call NetrwSLeftrelease(0) - endif + let s:netrwdrag = winnr() + if a:islocal + nno :call NetrwSLeftrelease(1) + else + nno :call NetrwSLeftrelease(0) + endif endif let ngw = s:NetrwGetWord() if !exists("s:ngw") || s:ngw != ngw - call s:NetrwMarkFile(a:islocal,ngw) + call s:NetrwMarkFile(a:islocal,ngw) endif let s:ngw= ngw -" call Dret("s:NetrwSLeftdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) + " call Dret("s:NetrwSLeftdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) endfun " --------------------------------------------------------------------- " s:NetrwSLeftrelease: terminates shift-leftmouse dragging {{{2 fun! s:NetrwSLeftrelease(islocal) -" call Dfunc("s:NetrwSLeftrelease(islocal=".a:islocal.") s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) + " call Dfunc("s:NetrwSLeftrelease(islocal=".a:islocal.") s:netrwdrag=".s:netrwdrag." buf#".bufnr("%")) if exists("s:netrwdrag") - nunmap - let ngw = s:NetrwGetWord() - if !exists("s:ngw") || s:ngw != ngw - call s:NetrwMarkFile(a:islocal,ngw) - endif - if exists("s:ngw") - unlet s:ngw - endif - unlet s:netrwdrag + nunmap + let ngw = s:NetrwGetWord() + if !exists("s:ngw") || s:ngw != ngw + call s:NetrwMarkFile(a:islocal,ngw) + endif + if exists("s:ngw") + unlet s:ngw + endif + unlet s:netrwdrag endif -" call Dret("s:NetrwSLeftrelease") + " call Dret("s:NetrwSLeftrelease") endfun " --------------------------------------------------------------------- " s:NetrwListHide: uses [range]g~...~d to delete files that match {{{2 " comma-separated patterns given in g:netrw_list_hide fun! s:NetrwListHide() -" call Dfunc("s:NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") -" call Decho("initial: ".string(getline(w:netrw_bannercnt,'$'))) + " call Dfunc("s:NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") + " call Decho("initial: ".string(getline(w:netrw_bannercnt,'$'))) let ykeep= @@ " find a character not in the "hide" string to use as a separator for :g and :v commands @@ -5832,47 +5872,47 @@ fun! s:NetrwListHide() " Duplicate characters don't matter. " Remove all such characters from the '/~@#...890' string. " Use the first character left as a separator character. -" call Decho("find a character not in the hide string to use as a separator",'~'.expand("")) + " call Decho("find a character not in the hide string to use as a separator",'~'.expand("")) let listhide= g:netrw_list_hide let sep = strpart(substitute('~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1) -" call Decho("sep<".sep."> (sep not in hide string)",'~'.expand("")) + " call Decho("sep<".sep."> (sep not in hide string)",'~'.expand("")) while listhide != "" - if listhide =~ ',' - let hide = substitute(listhide,',.*$','','e') - let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e') - else - let hide = listhide - let listhide = "" - endif -" call Decho("..extracted pattern from listhide: hide<".hide."> g:netrw_sort_by<".g:netrw_sort_by.'>','~'.expand("")) - if g:netrw_sort_by =~ '^[ts]' - if hide =~ '^\^' -" call Decho("..modify hide to handle a \"^...\" pattern",'~'.expand("")) - let hide= substitute(hide,'^\^','^\(\\d\\+/\)','') - elseif hide =~ '^\\(\^' - let hide= substitute(hide,'^\\(\^','\\(^\\(\\d\\+/\\)','') - endif -" call Decho("..hide<".hide."> listhide<".listhide.'>','~'.expand("")) - endif - - " Prune the list by hiding any files which match -" call Decho("..prune the list by hiding any files which ".((g:netrw_hide == 1)? "" : "don't")."match hide<".hide.">") - if g:netrw_hide == 1 -" call Decho("..hiding<".hide.">",'~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' - elseif g:netrw_hide == 2 -" call Decho("..showing<".hide.">",'~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' - endif -" call Decho("..result: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) + if listhide =~ ',' + let hide = substitute(listhide,',.*$','','e') + let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e') + else + let hide = listhide + let listhide = "" + endif + " call Decho("..extracted pattern from listhide: hide<".hide."> g:netrw_sort_by<".g:netrw_sort_by.'>','~'.expand("")) + if g:netrw_sort_by =~ '^[ts]' + if hide =~ '^\^' + " call Decho("..modify hide to handle a \"^...\" pattern",'~'.expand("")) + let hide= substitute(hide,'^\^','^\(\\d\\+/\)','') + elseif hide =~ '^\\(\^' + let hide= substitute(hide,'^\\(\^','\\(^\\(\\d\\+/\\)','') + endif + " call Decho("..hide<".hide."> listhide<".listhide.'>','~'.expand("")) + endif + + " Prune the list by hiding any files which match + " call Decho("..prune the list by hiding any files which ".((g:netrw_hide == 1)? "" : "don't")."match hide<".hide.">") + if g:netrw_hide == 1 + " call Decho("..hiding<".hide.">",'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' + elseif g:netrw_hide == 2 + " call Decho("..showing<".hide.">",'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' + endif + " call Decho("..result: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) endwhile if g:netrw_hide == 2 - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' -" call Decho("..v KEEP: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' -" call Decho("..g KEEP: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' + " call Decho("..v KEEP: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' + " call Decho("..g KEEP: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) endif " remove any blank lines that have somehow remained. @@ -5880,7 +5920,7 @@ fun! s:NetrwListHide() exe 'sil! NetrwKeepj 1,$g@^\s*$@d' let @@= ykeep -" call Dret("s:NetrwListHide") + " call Dret("s:NetrwListHide") endfun " --------------------------------------------------------------------- @@ -5897,102 +5937,102 @@ fun! s:NetrwMakeDir(usrhost) call inputrestore() if newdirname == "" - let @@= ykeep - return + let @@= ykeep + return endif if a:usrhost == "" - " Local mkdir: - " sanity checks - let fullnewdir= b:netrw_curdir.'/'.newdirname - if isdirectory(s:NetrwFile(fullnewdir)) - if !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24) + " Local mkdir: + " sanity checks + let fullnewdir= b:netrw_curdir.'/'.newdirname + if isdirectory(s:NetrwFile(fullnewdir)) + if !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24) + endif + let @@= ykeep + return endif - let @@= ykeep - return - endif - if s:FileReadable(fullnewdir) - if !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25) + if s:FileReadable(fullnewdir) + if !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25) + endif + let @@= ykeep + return endif - let @@= ykeep - return - endif - " requested new local directory is neither a pre-existing file or - " directory, so make it! - if exists("*mkdir") - if has("unix") - call mkdir(fullnewdir,"p",xor(0777, system("umask"))) + " requested new local directory is neither a pre-existing file or + " directory, so make it! + if exists("*mkdir") + if has("unix") + call mkdir(fullnewdir,"p",xor(0777, system("umask"))) + else + call mkdir(fullnewdir,"p") + endif else - call mkdir(fullnewdir,"p") - endif - else - let netrw_origdir= s:NetrwGetcwd(1) - if s:NetrwLcd(b:netrw_curdir) - return - endif - call s:NetrwExe("sil! !".g:netrw_localmkdir.g:netrw_localmkdiropt.' '.s:ShellEscape(newdirname,1)) - if v:shell_error != 0 - let @@= ykeep - call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) - return - endif - if !g:netrw_keepdir - if s:NetrwLcd(netrw_origdir) - return - endif + let netrw_origdir= s:NetrwGetcwd(1) + if s:NetrwLcd(b:netrw_curdir) + return + endif + call s:NetrwExe("sil! !".g:netrw_localmkdir.g:netrw_localmkdiropt.' '.s:ShellEscape(newdirname,1)) + if v:shell_error != 0 + let @@= ykeep + call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) + return + endif + if !g:netrw_keepdir + if s:NetrwLcd(netrw_origdir) + return + endif + endif endif - endif - if v:shell_error == 0 - " refresh listing - let svpos= winsaveview() - call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) - call winrestview(svpos) - elseif !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26) - endif + if v:shell_error == 0 + " refresh listing + let svpos= winsaveview() + call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) + call winrestview(svpos) + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26) + endif elseif !exists("b:netrw_method") || b:netrw_method == 4 - " Remote mkdir: using ssh - let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd) - let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname - call s:NetrwExe("sil! !".mkdircmd." ".s:ShellEscape(newdirname,1)) - if v:shell_error == 0 - " refresh listing + " Remote mkdir: using ssh + let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd) + let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname + call s:NetrwExe("sil! !".mkdircmd." ".s:ShellEscape(newdirname,1)) + if v:shell_error == 0 + " refresh listing + let svpos= winsaveview() + NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./',0)) + NetrwKeepj call winrestview(svpos) + elseif !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27) + endif + + elseif b:netrw_method == 2 + " Remote mkdir: using ftp+.netrc let svpos= winsaveview() + if exists("b:netrw_fname") + let remotepath= b:netrw_fname + else + let remotepath= "" + endif + call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"') NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./',0)) NetrwKeepj call winrestview(svpos) - elseif !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27) - endif - - elseif b:netrw_method == 2 - " Remote mkdir: using ftp+.netrc - let svpos= winsaveview() - if exists("b:netrw_fname") - let remotepath= b:netrw_fname - else - let remotepath= "" - endif - call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"') - NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./',0)) - NetrwKeepj call winrestview(svpos) elseif b:netrw_method == 3 - " Remote mkdir: using ftp + machine, id, passwd, and fname (ie. no .netrc) - let svpos= winsaveview() - if exists("b:netrw_fname") - let remotepath= b:netrw_fname - else - let remotepath= "" - endif - call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"') - NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./',0)) - NetrwKeepj call winrestview(svpos) + " Remote mkdir: using ftp + machine, id, passwd, and fname (ie. no .netrc) + let svpos= winsaveview() + if exists("b:netrw_fname") + let remotepath= b:netrw_fname + else + let remotepath= "" + endif + call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"') + NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./',0)) + NetrwKeepj call winrestview(svpos) endif let @@= ykeep @@ -6002,24 +6042,24 @@ endfun " s:TreeSqueezeDir: allows a shift-cr (gvim only) to squeeze the current tree-listing directory {{{2 fun! s:TreeSqueezeDir(islocal) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") - " its a tree-listing style - let curdepth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e') - let stopline = (exists("w:netrw_bannercnt")? (w:netrw_bannercnt + 1) : 1) - let depth = strchars(substitute(curdepth,' ','','g')) - let srch = -1 - if depth >= 2 - NetrwKeepj norm! 0 - let curdepthm1= substitute(curdepth,'^'.s:treedepthstring,'','') - let srch = search('^'.curdepthm1.'\%('.s:treedepthstring.'\)\@!','bW',stopline) - elseif depth == 1 - NetrwKeepj norm! 0 - let treedepthchr= substitute(s:treedepthstring,' ','','') - let srch = search('^[^'.treedepthchr.']','bW',stopline) - endif - if srch > 0 - call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,s:NetrwGetWord(),1)) - exe srch - endif + " its a tree-listing style + let curdepth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e') + let stopline = (exists("w:netrw_bannercnt")? (w:netrw_bannercnt + 1) : 1) + let depth = strchars(substitute(curdepth,' ','','g')) + let srch = -1 + if depth >= 2 + NetrwKeepj norm! 0 + let curdepthm1= substitute(curdepth,'^'.s:treedepthstring,'','') + let srch = search('^'.curdepthm1.'\%('.s:treedepthstring.'\)\@!','bW',stopline) + elseif depth == 1 + NetrwKeepj norm! 0 + let treedepthchr= substitute(s:treedepthstring,' ','','') + let srch = search('^[^'.treedepthchr.']','bW',stopline) + endif + if srch > 0 + call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,s:NetrwGetWord(),1)) + exe srch + endif endif endfun @@ -6029,311 +6069,311 @@ fun! s:NetrwMaps(islocal) " mouse maps: {{{3 if g:netrw_mousemaps && g:netrw_retmap -" call Decho("set up Rexplore 2-leftmouse",'~'.expand("")) - if !hasmapto("NetrwReturn") - if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$' - nmap <2-leftmouse> NetrwReturn - elseif maparg("","n") == "" - nmap NetrwReturn + " call Decho("set up Rexplore 2-leftmouse",'~'.expand("")) + if !hasmapto("NetrwReturn") + if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$' + nmap <2-leftmouse> NetrwReturn + elseif maparg("","n") == "" + nmap NetrwReturn + endif endif - endif - nno NetrwReturn :Rexplore + nno NetrwReturn :Rexplore endif " generate default maps {{{3 - if !hasmapto('NetrwHide') |nmap a NetrwHide_a|endif - if !hasmapto('NetrwBrowseUpDir') |nmap - NetrwBrowseUpDir|endif - if !hasmapto('NetrwOpenFile') |nmap % NetrwOpenFile|endif - if !hasmapto('NetrwBadd_cb') |nmap cb NetrwBadd_cb|endif - if !hasmapto('NetrwBadd_cB') |nmap cB NetrwBadd_cB|endif - if !hasmapto('NetrwLcd') |nmap cd NetrwLcd|endif - if !hasmapto('NetrwSetChgwin') |nmap C NetrwSetChgwin|endif - if !hasmapto('NetrwRefresh') |nmap NetrwRefresh|endif - if !hasmapto('NetrwLocalBrowseCheck') |nmap NetrwLocalBrowseCheck|endif - if !hasmapto('NetrwServerEdit') |nmap NetrwServerEdit|endif - if !hasmapto('NetrwMakeDir') |nmap d NetrwMakeDir|endif - if !hasmapto('NetrwBookHistHandler_gb')|nmap gb NetrwBookHistHandler_gb|endif + if !hasmapto('NetrwHide') |nmap a NetrwHide_a|endif + if !hasmapto('NetrwBrowseUpDir') |nmap - NetrwBrowseUpDir|endif + if !hasmapto('NetrwOpenFile') |nmap % NetrwOpenFile|endif + if !hasmapto('NetrwBadd_cb') |nmap cb NetrwBadd_cb|endif + if !hasmapto('NetrwBadd_cB') |nmap cB NetrwBadd_cB|endif + if !hasmapto('NetrwLcd') |nmap cd NetrwLcd|endif + if !hasmapto('NetrwSetChgwin') |nmap C NetrwSetChgwin|endif + if !hasmapto('NetrwRefresh') |nmap NetrwRefresh|endif + if !hasmapto('NetrwLocalBrowseCheck') |nmap NetrwLocalBrowseCheck|endif + if !hasmapto('NetrwServerEdit') |nmap NetrwServerEdit|endif + if !hasmapto('NetrwMakeDir') |nmap d NetrwMakeDir|endif + if !hasmapto('NetrwBookHistHandler_gb')|nmap gb NetrwBookHistHandler_gb|endif if a:islocal - " local normal-mode maps {{{3 - nnoremap NetrwHide_a :call NetrwHide(1) - nnoremap NetrwBrowseUpDir :call NetrwBrowseUpDir(1) - nnoremap NetrwOpenFile :call NetrwOpenFile(1) - nnoremap NetrwBadd_cb :call NetrwBadd(1,0) - nnoremap NetrwBadd_cB :call NetrwBadd(1,1) - nnoremap NetrwLcd :call NetrwLcd(b:netrw_curdir) - nnoremap NetrwSetChgwin :call NetrwSetChgwin() - nnoremap NetrwLocalBrowseCheck :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord(),1)) - nnoremap NetrwServerEdit :call NetrwServerEdit(3,NetrwGetWord()) - nnoremap NetrwMakeDir :call NetrwMakeDir("") - nnoremap NetrwBookHistHandler_gb :call NetrwBookHistHandler(1,b:netrw_curdir) -" --------------------------------------------------------------------- - nnoremap gd :call NetrwForceChgDir(1,NetrwGetWord()) - nnoremap gf :call NetrwForceFile(1,NetrwGetWord()) - nnoremap gh :call NetrwHidden(1) - nnoremap gn :call netrw#SetTreetop(0,NetrwGetWord()) - nnoremap gp :call NetrwChgPerm(1,b:netrw_curdir) - nnoremap I :call NetrwBannerCtrl(1) - nnoremap i :call NetrwListStyle(1) - nnoremap ma :call NetrwMarkFileArgList(1,0) - nnoremap mA :call NetrwMarkFileArgList(1,1) - nnoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) - nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) - nnoremap mc :call NetrwMarkFileCopy(1) - nnoremap md :call NetrwMarkFileDiff(1) - nnoremap me :call NetrwMarkFileEdit(1) - nnoremap mf :call NetrwMarkFile(1,NetrwGetWord()) - nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) - nnoremap mg :call NetrwMarkFileGrep(1) - nnoremap mh :call NetrwMarkHideSfx(1) - nnoremap mm :call NetrwMarkFileMove(1) - nnoremap mp :call NetrwMarkFilePrint(1) - nnoremap mr :call NetrwMarkFileRegexp(1) - nnoremap ms :call NetrwMarkFileSource(1) - nnoremap mT :call NetrwMarkFileTag(1) - nnoremap mt :call NetrwMarkFileTgt(1) - nnoremap mu :call NetrwUnMarkFile(1) - nnoremap mv :call NetrwMarkFileVimCmd(1) - nnoremap mx :call NetrwMarkFileExe(1,0) - nnoremap mX :call NetrwMarkFileExe(1,1) - nnoremap mz :call NetrwMarkFileCompress(1) - nnoremap O :call NetrwObtain(1) - nnoremap o :call NetrwSplit(3) - nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1,1)) - nnoremap P :call NetrwPrevWinOpen(1) - nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) - nnoremap qf :call NetrwFileInfo(1,NetrwGetWord()) - nnoremap qF :call NetrwMarkFileQFEL(1,getqflist()) - nnoremap qL :call NetrwMarkFileQFEL(1,getloclist(v:count)) - nnoremap s :call NetrwSortStyle(1) - nnoremap S :call NetSortSequence(1) - nnoremap Tb :call NetrwSetTgt(1,'b',v:count1) - nnoremap t :call NetrwSplit(4) - nnoremap Th :call NetrwSetTgt(1,'h',v:count) - nnoremap u :call NetrwBookHistHandler(4,expand("%")) - nnoremap U :call NetrwBookHistHandler(5,expand("%")) - nnoremap v :call NetrwSplit(5) - nnoremap x :call netrw#BrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),1,0),0)" - nnoremap X :call NetrwLocalExecute(expand(""))" - - nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./',0)) - if !hasmapto('NetrwHideEdit') - nmap NetrwHideEdit - endif - nnoremap NetrwHideEdit :call NetrwHideEdit(1) - if !hasmapto('NetrwRefresh') - nmap NetrwRefresh - endif - nnoremap NetrwRefresh :call NetrwRefresh(1,NetrwBrowseChgDir(1,(exists("w:netrw_liststyle") && exists("w:netrw_treetop") && w:netrw_liststyle == 3)? w:netrw_treetop : './',0)) - if s:didstarstar || !mapcheck("","n") - nnoremap :Nexplore - endif - if s:didstarstar || !mapcheck("","n") - nnoremap :Pexplore - endif - if !hasmapto('NetrwTreeSqueeze') - nmap NetrwTreeSqueeze - endif - nnoremap NetrwTreeSqueeze :call TreeSqueezeDir(1) - let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape) - if g:netrw_mousemaps == 1 - nmap NetrwLeftmouse - nmap NetrwCLeftmouse - nmap NetrwMiddlemouse - nmap NetrwSLeftmouse - nmap NetrwSLeftdrag - nmap <2-leftmouse> Netrw2Leftmouse - imap ILeftmouse - imap IMiddlemouse - nno NetrwLeftmouse :exec "norm! \leftmouse>"call NetrwLeftmouse(1) - nno NetrwCLeftmouse :exec "norm! \leftmouse>"call NetrwCLeftmouse(1) - nno NetrwMiddlemouse :exec "norm! \leftmouse>"call NetrwPrevWinOpen(1) - nno NetrwSLeftmouse :exec "norm! \leftmouse>"call NetrwSLeftmouse(1) - nno NetrwSLeftdrag :exec "norm! \leftmouse>"call NetrwSLeftdrag(1) - nmap Netrw2Leftmouse - - exe 'nnoremap :exec "norm! \leftmouse>"call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'vnoremap :exec "norm! \leftmouse>"call NetrwLocalRm("'.mapsafecurdir.'")' - endif - exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'nnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'nnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' - exe 'nnoremap d :call NetrwMakeDir("")' - exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'vnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' - exe 'vnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' - nnoremap :he netrw-quickhelp - - " support user-specified maps - call netrw#UserMaps(1) - - else - " remote normal-mode maps {{{3 - call s:RemotePathAnalysis(b:netrw_curdir) - nnoremap NetrwHide_a :call NetrwHide(0) - nnoremap NetrwBrowseUpDir :call NetrwBrowseUpDir(0) - nnoremap NetrwOpenFile :call NetrwOpenFile(0) - nnoremap NetrwBadd_cb :call NetrwBadd(0,0) - nnoremap NetrwBadd_cB :call NetrwBadd(0,1) - nnoremap NetrwLcd :call NetrwLcd(b:netrw_curdir) - nnoremap NetrwSetChgwin :call NetrwSetChgwin() - nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./',0)) - nnoremap NetrwLocalBrowseCheck :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord(),1)) - nnoremap NetrwServerEdit :call NetrwServerEdit(2,NetrwGetWord()) - nnoremap NetrwBookHistHandler_gb :call NetrwBookHistHandler(1,b:netrw_curdir) -" --------------------------------------------------------------------- - nnoremap gd :call NetrwForceChgDir(0,NetrwGetWord()) - nnoremap gf :call NetrwForceFile(0,NetrwGetWord()) - nnoremap gh :call NetrwHidden(0) - nnoremap gp :call NetrwChgPerm(0,b:netrw_curdir) - nnoremap I :call NetrwBannerCtrl(1) - nnoremap i :call NetrwListStyle(0) - nnoremap ma :call NetrwMarkFileArgList(0,0) - nnoremap mA :call NetrwMarkFileArgList(0,1) - nnoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) - nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) - nnoremap mc :call NetrwMarkFileCopy(0) - nnoremap md :call NetrwMarkFileDiff(0) - nnoremap me :call NetrwMarkFileEdit(0) - nnoremap mf :call NetrwMarkFile(0,NetrwGetWord()) - nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) - nnoremap mg :call NetrwMarkFileGrep(0) - nnoremap mh :call NetrwMarkHideSfx(0) - nnoremap mm :call NetrwMarkFileMove(0) - nnoremap mp :call NetrwMarkFilePrint(0) - nnoremap mr :call NetrwMarkFileRegexp(0) - nnoremap ms :call NetrwMarkFileSource(0) - nnoremap mT :call NetrwMarkFileTag(0) - nnoremap mt :call NetrwMarkFileTgt(0) - nnoremap mu :call NetrwUnMarkFile(0) - nnoremap mv :call NetrwMarkFileVimCmd(0) - nnoremap mx :call NetrwMarkFileExe(0,0) - nnoremap mX :call NetrwMarkFileExe(0,1) - nnoremap mz :call NetrwMarkFileCompress(0) - nnoremap O :call NetrwObtain(0) - nnoremap o :call NetrwSplit(0) - nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1,1)) - nnoremap P :call NetrwPrevWinOpen(0) - nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) - nnoremap qf :call NetrwFileInfo(0,NetrwGetWord()) - nnoremap qF :call NetrwMarkFileQFEL(0,getqflist()) - nnoremap qL :call NetrwMarkFileQFEL(0,getloclist(v:count)) - nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./',0)) - nnoremap s :call NetrwSortStyle(0) - nnoremap S :call NetSortSequence(0) - nnoremap Tb :call NetrwSetTgt(0,'b',v:count1) - nnoremap t :call NetrwSplit(1) - nnoremap Th :call NetrwSetTgt(0,'h',v:count) - nnoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) - nnoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) - nnoremap v :call NetrwSplit(2) - nnoremap x :call netrw#BrowseX(NetrwBrowseChgDir(0,NetrwGetWord(),1),1) - nmap gx x - if !hasmapto('NetrwHideEdit') - nmap NetrwHideEdit - endif - nnoremap NetrwHideEdit :call NetrwHideEdit(0) - if !hasmapto('NetrwRefresh') - nmap NetrwRefresh - endif - if !hasmapto('NetrwTreeSqueeze') - nmap NetrwTreeSqueeze - endif - nnoremap NetrwTreeSqueeze :call TreeSqueezeDir(0) - - let mapsafepath = escape(s:path, s:netrw_map_escape) - let mapsafeusermach = escape(((s:user == "")? "" : s:user."@").s:machine, s:netrw_map_escape) - - nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./',0)) - if g:netrw_mousemaps == 1 - nmap NetrwLeftmouse - nno NetrwLeftmouse :exec "norm! \leftmouse>"call NetrwLeftmouse(0) - nmap NetrwCLeftmouse - nno NetrwCLeftmouse :exec "norm! \leftmouse>"call NetrwCLeftmouse(0) - nmap NetrwSLeftmouse - nno NetrwSLeftmouse :exec "norm! \leftmouse>"call NetrwSLeftmouse(0) - nmap NetrwSLeftdrag - nno NetrwSLeftdrag :exec "norm! \leftmouse>"call NetrwSLeftdrag(0) - nmap NetrwMiddlemouse - nno NetrwMiddlemouse :exec "norm! \leftmouse>"call NetrwPrevWinOpen(0) - nmap <2-leftmouse> Netrw2Leftmouse - nmap Netrw2Leftmouse - - imap ILeftmouse - imap IMiddlemouse - imap ISLeftmouse - exe 'nnoremap :exec "norm! \leftmouse>"call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'vnoremap :exec "norm! \leftmouse>"call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - endif - exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'nnoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' - exe 'nnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'nnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'vnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - exe 'vnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' - nnoremap :he netrw-quickhelp - - " support user-specified maps - call netrw#UserMaps(0) + " local normal-mode maps {{{3 + nnoremap NetrwHide_a :call NetrwHide(1) + nnoremap NetrwBrowseUpDir :call NetrwBrowseUpDir(1) + nnoremap NetrwOpenFile :call NetrwOpenFile(1) + nnoremap NetrwBadd_cb :call NetrwBadd(1,0) + nnoremap NetrwBadd_cB :call NetrwBadd(1,1) + nnoremap NetrwLcd :call NetrwLcd(b:netrw_curdir) + nnoremap NetrwSetChgwin :call NetrwSetChgwin() + nnoremap NetrwLocalBrowseCheck :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord(),1)) + nnoremap NetrwServerEdit :call NetrwServerEdit(3,NetrwGetWord()) + nnoremap NetrwMakeDir :call NetrwMakeDir("") + nnoremap NetrwBookHistHandler_gb :call NetrwBookHistHandler(1,b:netrw_curdir) + " --------------------------------------------------------------------- + nnoremap gd :call NetrwForceChgDir(1,NetrwGetWord()) + nnoremap gf :call NetrwForceFile(1,NetrwGetWord()) + nnoremap gh :call NetrwHidden(1) + nnoremap gn :call netrw#SetTreetop(0,NetrwGetWord()) + nnoremap gp :call NetrwChgPerm(1,b:netrw_curdir) + nnoremap I :call NetrwBannerCtrl(1) + nnoremap i :call NetrwListStyle(1) + nnoremap ma :call NetrwMarkFileArgList(1,0) + nnoremap mA :call NetrwMarkFileArgList(1,1) + nnoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) + nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) + nnoremap mc :call NetrwMarkFileCopy(1) + nnoremap md :call NetrwMarkFileDiff(1) + nnoremap me :call NetrwMarkFileEdit(1) + nnoremap mf :call NetrwMarkFile(1,NetrwGetWord()) + nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + nnoremap mg :call NetrwMarkFileGrep(1) + nnoremap mh :call NetrwMarkHideSfx(1) + nnoremap mm :call NetrwMarkFileMove(1) + nnoremap mp :call NetrwMarkFilePrint(1) + nnoremap mr :call NetrwMarkFileRegexp(1) + nnoremap ms :call NetrwMarkFileSource(1) + nnoremap mT :call NetrwMarkFileTag(1) + nnoremap mt :call NetrwMarkFileTgt(1) + nnoremap mu :call NetrwUnMarkFile(1) + nnoremap mv :call NetrwMarkFileVimCmd(1) + nnoremap mx :call NetrwMarkFileExe(1,0) + nnoremap mX :call NetrwMarkFileExe(1,1) + nnoremap mz :call NetrwMarkFileCompress(1) + nnoremap O :call NetrwObtain(1) + nnoremap o :call NetrwSplit(3) + nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1,1)) + nnoremap P :call NetrwPrevWinOpen(1) + nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) + nnoremap qf :call NetrwFileInfo(1,NetrwGetWord()) + nnoremap qF :call NetrwMarkFileQFEL(1,getqflist()) + nnoremap qL :call NetrwMarkFileQFEL(1,getloclist(v:count)) + nnoremap s :call NetrwSortStyle(1) + nnoremap S :call NetSortSequence(1) + nnoremap Tb :call NetrwSetTgt(1,'b',v:count1) + nnoremap t :call NetrwSplit(4) + nnoremap Th :call NetrwSetTgt(1,'h',v:count) + nnoremap u :call NetrwBookHistHandler(4,expand("%")) + nnoremap U :call NetrwBookHistHandler(5,expand("%")) + nnoremap v :call NetrwSplit(5) + nnoremap x :call netrw#BrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),1,0),0)" + nnoremap X :call NetrwLocalExecute(expand(""))" + + nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./',0)) + if !hasmapto('NetrwHideEdit') + nmap NetrwHideEdit + endif + nnoremap NetrwHideEdit :call NetrwHideEdit(1) + if !hasmapto('NetrwRefresh') + nmap NetrwRefresh + endif + nnoremap NetrwRefresh :call NetrwRefresh(1,NetrwBrowseChgDir(1,(exists("w:netrw_liststyle") && exists("w:netrw_treetop") && w:netrw_liststyle == 3)? w:netrw_treetop : './',0)) + if s:didstarstar || !mapcheck("","n") + nnoremap :Nexplore + endif + if s:didstarstar || !mapcheck("","n") + nnoremap :Pexplore + endif + if !hasmapto('NetrwTreeSqueeze') + nmap NetrwTreeSqueeze + endif + nnoremap NetrwTreeSqueeze :call TreeSqueezeDir(1) + let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape) + if g:netrw_mousemaps == 1 + nmap NetrwLeftmouse + nmap NetrwCLeftmouse + nmap NetrwMiddlemouse + nmap NetrwSLeftmouse + nmap NetrwSLeftdrag + nmap <2-leftmouse> Netrw2Leftmouse + imap ILeftmouse + imap IMiddlemouse + nno NetrwLeftmouse :exec "norm! \leftmouse>"call NetrwLeftmouse(1) + nno NetrwCLeftmouse :exec "norm! \leftmouse>"call NetrwCLeftmouse(1) + nno NetrwMiddlemouse :exec "norm! \leftmouse>"call NetrwPrevWinOpen(1) + nno NetrwSLeftmouse :exec "norm! \leftmouse>"call NetrwSLeftmouse(1) + nno NetrwSLeftdrag :exec "norm! \leftmouse>"call NetrwSLeftdrag(1) + nmap Netrw2Leftmouse - + exe 'nnoremap :exec "norm! \leftmouse>"call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap :exec "norm! \leftmouse>"call NetrwLocalRm("'.mapsafecurdir.'")' + endif + exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'nnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'nnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' + exe 'nnoremap d :call NetrwMakeDir("")' + exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' + nnoremap :he netrw-quickhelp + + " support user-specified maps + call netrw#UserMaps(1) + + else + " remote normal-mode maps {{{3 + call s:RemotePathAnalysis(b:netrw_curdir) + nnoremap NetrwHide_a :call NetrwHide(0) + nnoremap NetrwBrowseUpDir :call NetrwBrowseUpDir(0) + nnoremap NetrwOpenFile :call NetrwOpenFile(0) + nnoremap NetrwBadd_cb :call NetrwBadd(0,0) + nnoremap NetrwBadd_cB :call NetrwBadd(0,1) + nnoremap NetrwLcd :call NetrwLcd(b:netrw_curdir) + nnoremap NetrwSetChgwin :call NetrwSetChgwin() + nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./',0)) + nnoremap NetrwLocalBrowseCheck :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord(),1)) + nnoremap NetrwServerEdit :call NetrwServerEdit(2,NetrwGetWord()) + nnoremap NetrwBookHistHandler_gb :call NetrwBookHistHandler(1,b:netrw_curdir) + " --------------------------------------------------------------------- + nnoremap gd :call NetrwForceChgDir(0,NetrwGetWord()) + nnoremap gf :call NetrwForceFile(0,NetrwGetWord()) + nnoremap gh :call NetrwHidden(0) + nnoremap gp :call NetrwChgPerm(0,b:netrw_curdir) + nnoremap I :call NetrwBannerCtrl(1) + nnoremap i :call NetrwListStyle(0) + nnoremap ma :call NetrwMarkFileArgList(0,0) + nnoremap mA :call NetrwMarkFileArgList(0,1) + nnoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) + nnoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) + nnoremap mc :call NetrwMarkFileCopy(0) + nnoremap md :call NetrwMarkFileDiff(0) + nnoremap me :call NetrwMarkFileEdit(0) + nnoremap mf :call NetrwMarkFile(0,NetrwGetWord()) + nnoremap mF :call NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + nnoremap mg :call NetrwMarkFileGrep(0) + nnoremap mh :call NetrwMarkHideSfx(0) + nnoremap mm :call NetrwMarkFileMove(0) + nnoremap mp :call NetrwMarkFilePrint(0) + nnoremap mr :call NetrwMarkFileRegexp(0) + nnoremap ms :call NetrwMarkFileSource(0) + nnoremap mT :call NetrwMarkFileTag(0) + nnoremap mt :call NetrwMarkFileTgt(0) + nnoremap mu :call NetrwUnMarkFile(0) + nnoremap mv :call NetrwMarkFileVimCmd(0) + nnoremap mx :call NetrwMarkFileExe(0,0) + nnoremap mX :call NetrwMarkFileExe(0,1) + nnoremap mz :call NetrwMarkFileCompress(0) + nnoremap O :call NetrwObtain(0) + nnoremap o :call NetrwSplit(0) + nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1,1)) + nnoremap P :call NetrwPrevWinOpen(0) + nnoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) + nnoremap qf :call NetrwFileInfo(0,NetrwGetWord()) + nnoremap qF :call NetrwMarkFileQFEL(0,getqflist()) + nnoremap qL :call NetrwMarkFileQFEL(0,getloclist(v:count)) + nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./',0)) + nnoremap s :call NetrwSortStyle(0) + nnoremap S :call NetSortSequence(0) + nnoremap Tb :call NetrwSetTgt(0,'b',v:count1) + nnoremap t :call NetrwSplit(1) + nnoremap Th :call NetrwSetTgt(0,'h',v:count) + nnoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) + nnoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) + nnoremap v :call NetrwSplit(2) + nnoremap x :call netrw#BrowseX(NetrwBrowseChgDir(0,NetrwGetWord(),1),1) + nmap gx x + if !hasmapto('NetrwHideEdit') + nmap NetrwHideEdit + endif + nnoremap NetrwHideEdit :call NetrwHideEdit(0) + if !hasmapto('NetrwRefresh') + nmap NetrwRefresh + endif + if !hasmapto('NetrwTreeSqueeze') + nmap NetrwTreeSqueeze + endif + nnoremap NetrwTreeSqueeze :call TreeSqueezeDir(0) + + let mapsafepath = escape(s:path, s:netrw_map_escape) + let mapsafeusermach = escape(((s:user == "")? "" : s:user."@").s:machine, s:netrw_map_escape) + + nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./',0)) + if g:netrw_mousemaps == 1 + nmap NetrwLeftmouse + nno NetrwLeftmouse :exec "norm! \leftmouse>"call NetrwLeftmouse(0) + nmap NetrwCLeftmouse + nno NetrwCLeftmouse :exec "norm! \leftmouse>"call NetrwCLeftmouse(0) + nmap NetrwSLeftmouse + nno NetrwSLeftmouse :exec "norm! \leftmouse>"call NetrwSLeftmouse(0) + nmap NetrwSLeftdrag + nno NetrwSLeftdrag :exec "norm! \leftmouse>"call NetrwSLeftdrag(0) + nmap NetrwMiddlemouse + nno NetrwMiddlemouse :exec "norm! \leftmouse>"call NetrwPrevWinOpen(0) + nmap <2-leftmouse> Netrw2Leftmouse + nmap Netrw2Leftmouse - + imap ILeftmouse + imap IMiddlemouse + imap ISLeftmouse + exe 'nnoremap :exec "norm! \leftmouse>"call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap :exec "norm! \leftmouse>"call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + endif + exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'nnoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' + exe 'nnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'nnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' + nnoremap :he netrw-quickhelp + + " support user-specified maps + call netrw#UserMaps(0) endif " }}}3 endfun " --------------------------------------------------------------------- -" s:NetrwCommands: set up commands {{{2 +" s:NetrwCommands: set up commands {{{2 " If -buffer, the command is only available from within netrw buffers " Otherwise, the command is available from any window, so long as netrw " has been used at least once in the session. fun! s:NetrwCommands(islocal) -" call Dfunc("s:NetrwCommands(islocal=".a:islocal.")") + " call Dfunc("s:NetrwCommands(islocal=".a:islocal.")") - com! -nargs=* -complete=file -bang NetrwMB call s:NetrwBookmark(0,) - com! -nargs=* NetrwC call s:NetrwSetChgwin() + com! -nargs=* -complete=file -bang NetrwMB call s:NetrwBookmark(0,) + com! -nargs=* NetrwC call s:NetrwSetChgwin() com! Rexplore if exists("w:netrw_rexlocal")|call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")|else|call netrw#ErrorMsg(s:WARNING,"win#".winnr()." not a former netrw window",79)|endif if a:islocal - com! -buffer -nargs=+ -complete=file MF call s:NetrwMarkFiles(1,) + com! -buffer -nargs=+ -complete=file MF call s:NetrwMarkFiles(1,) else - com! -buffer -nargs=+ -complete=file MF call s:NetrwMarkFiles(0,) + com! -buffer -nargs=+ -complete=file MF call s:NetrwMarkFiles(0,) endif - com! -buffer -nargs=? -complete=file MT call s:NetrwMarkTarget() + com! -buffer -nargs=? -complete=file MT call s:NetrwMarkTarget() -" call Dret("s:NetrwCommands") + " call Dret("s:NetrwCommands") endfun " --------------------------------------------------------------------- " s:NetrwMarkFiles: apply s:NetrwMarkFile() to named file(s) {{{2 " glob()ing only works with local files fun! s:NetrwMarkFiles(islocal,...) -" call Dfunc("s:NetrwMarkFiles(islocal=".a:islocal."...) a:0=".a:0) + " call Dfunc("s:NetrwMarkFiles(islocal=".a:islocal."...) a:0=".a:0) let curdir = s:NetrwGetCurdir(a:islocal) let i = 1 while i <= a:0 - if a:islocal - if v:version > 704 || (v:version == 704 && has("patch656")) - let mffiles= glob(a:{i},0,1,1) - else - let mffiles= glob(a:{i},0,1) - endif - else - let mffiles= [a:{i}] - endif -" call Decho("mffiles".string(mffiles),'~'.expand("")) - for mffile in mffiles -" call Decho("mffile<".mffile.">",'~'.expand("")) - call s:NetrwMarkFile(a:islocal,mffile) - endfor - let i= i + 1 + if a:islocal + if v:version > 704 || (v:version == 704 && has("patch656")) + let mffiles= glob(a:{i},0,1,1) + else + let mffiles= glob(a:{i},0,1) + endif + else + let mffiles= [a:{i}] + endif + " call Decho("mffiles".string(mffiles),'~'.expand("")) + for mffile in mffiles + " call Decho("mffile<".mffile.">",'~'.expand("")) + call s:NetrwMarkFile(a:islocal,mffile) + endfor + let i= i + 1 endwhile -" call Dret("s:NetrwMarkFiles") + " call Dret("s:NetrwMarkFiles") endfun " --------------------------------------------------------------------- " s:NetrwMarkTarget: implements :MT (mark target) {{{2 fun! s:NetrwMarkTarget(...) if a:0 == 0 || (a:0 == 1 && a:1 == "") - let curdir = s:NetrwGetCurdir(1) - let tgt = b:netrw_curdir + let curdir = s:NetrwGetCurdir(1) + let tgt = b:netrw_curdir else - let curdir = s:NetrwGetCurdir((a:1 =~ '^\a\{3,}://')? 0 : 1) - let tgt = a:1 + let curdir = s:NetrwGetCurdir((a:1 =~ '^\a\{3,}://')? 0 : 1) + let tgt = a:1 endif let s:netrwmftgt = tgt let s:netrwmftgt_islocal = tgt !~ '^\a\{3,}://' @@ -6361,13 +6401,13 @@ endfun " Creates a buffer version of islocal " b:netrw_islocal fun! s:NetrwMarkFile(islocal,fname) -" call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)") -" call Decho("bufnr(%)=".bufnr("%").": ".bufname("%"),'~'.expand("")) + " call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)") + " call Decho("bufnr(%)=".bufnr("%").": ".bufname("%"),'~'.expand("")) " sanity check if empty(a:fname) -" call Dret("s:NetrwMarkFile : empty fname") - return + " call Dret("s:NetrwMarkFile : empty fname") + return endif let curdir = s:NetrwGetCurdir(a:islocal) @@ -6375,107 +6415,107 @@ fun! s:NetrwMarkFile(islocal,fname) let curbufnr= bufnr("%") let leader= '\%(^\|\s\)\zs' if a:fname =~ '\a$' - let trailer = '\>[@=|\/\*]\=\ze\%( \|\t\|$\)' + let trailer = '\>[@=|\/\*]\=\ze\%( \|\t\|$\)' else - let trailer = '[@=|\/\*]\=\ze\%( \|\t\|$\)' + let trailer = '[@=|\/\*]\=\ze\%( \|\t\|$\)' endif if exists("s:netrwmarkfilelist_".curbufnr) - " markfile list pre-exists -" call Decho("case s:netrwmarkfilelist_".curbufnr." already exists",'~'.expand("")) -" call Decho("starting s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) -" call Decho("starting s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">",'~'.expand("")) - let b:netrw_islocal= a:islocal - - if index(s:netrwmarkfilelist_{curbufnr},a:fname) == -1 - " append filename to buffer's markfilelist -" call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) - call add(s:netrwmarkfilelist_{curbufnr},a:fname) - let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|'.leader.escape(a:fname,g:netrw_markfileesc).trailer - - else - " remove filename from buffer's markfilelist -" call Decho("remove filename<".a:fname."> from local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) - call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname') - if s:netrwmarkfilelist_{curbufnr} == [] - " local markfilelist is empty; remove it entirely -" call Decho("markfile list now empty",'~'.expand("")) - call s:NetrwUnmarkList(curbufnr,curdir) - else - " rebuild match list to display markings correctly -" call Decho("rebuild s:netrwmarkfilemtch_".curbufnr,'~'.expand("")) - let s:netrwmarkfilemtch_{curbufnr}= "" - let first = 1 - for fname in s:netrwmarkfilelist_{curbufnr} - if first - let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.leader.escape(fname,g:netrw_markfileesc).trailer + " markfile list pre-exists + " call Decho("case s:netrwmarkfilelist_".curbufnr." already exists",'~'.expand("")) + " call Decho("starting s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) + " call Decho("starting s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">",'~'.expand("")) + let b:netrw_islocal= a:islocal + + if index(s:netrwmarkfilelist_{curbufnr},a:fname) == -1 + " append filename to buffer's markfilelist + " call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) + call add(s:netrwmarkfilelist_{curbufnr},a:fname) + let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|'.leader.escape(a:fname,g:netrw_markfileesc).trailer + + else + " remove filename from buffer's markfilelist + " call Decho("remove filename<".a:fname."> from local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) + call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname') + if s:netrwmarkfilelist_{curbufnr} == [] + " local markfilelist is empty; remove it entirely + " call Decho("markfile list now empty",'~'.expand("")) + call s:NetrwUnmarkList(curbufnr,curdir) else - let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|'.leader.escape(fname,g:netrw_markfileesc).trailer + " rebuild match list to display markings correctly + " call Decho("rebuild s:netrwmarkfilemtch_".curbufnr,'~'.expand("")) + let s:netrwmarkfilemtch_{curbufnr}= "" + let first = 1 + for fname in s:netrwmarkfilelist_{curbufnr} + if first + let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.leader.escape(fname,g:netrw_markfileesc).trailer + else + let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|'.leader.escape(fname,g:netrw_markfileesc).trailer + endif + let first= 0 + endfor + " call Decho("ending s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) endif - let first= 0 - endfor -" call Decho("ending s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) endif - endif else - " initialize new markfilelist -" call Decho("case: initialize new markfilelist",'~'.expand("")) + " initialize new markfilelist + " call Decho("case: initialize new markfilelist",'~'.expand("")) -" call Decho("add fname<".a:fname."> to new markfilelist_".curbufnr,'~'.expand("")) - let s:netrwmarkfilelist_{curbufnr}= [] - call add(s:netrwmarkfilelist_{curbufnr},substitute(a:fname,'[|@]$','','')) -" call Decho("ending s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) + " call Decho("add fname<".a:fname."> to new markfilelist_".curbufnr,'~'.expand("")) + let s:netrwmarkfilelist_{curbufnr}= [] + call add(s:netrwmarkfilelist_{curbufnr},substitute(a:fname,'[|@]$','','')) + " call Decho("ending s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("")) - " build initial markfile matching pattern - if a:fname =~ '/$' - let s:netrwmarkfilemtch_{curbufnr}= leader.escape(a:fname,g:netrw_markfileesc) - else - let s:netrwmarkfilemtch_{curbufnr}= leader.escape(a:fname,g:netrw_markfileesc).trailer - endif -" call Decho("ending s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">",'~'.expand("")) + " build initial markfile matching pattern + if a:fname =~ '/$' + let s:netrwmarkfilemtch_{curbufnr}= leader.escape(a:fname,g:netrw_markfileesc) + else + let s:netrwmarkfilemtch_{curbufnr}= leader.escape(a:fname,g:netrw_markfileesc).trailer + endif + " call Decho("ending s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">",'~'.expand("")) endif " handle global markfilelist if exists("s:netrwmarkfilelist") - let dname= s:ComposePath(b:netrw_curdir,a:fname) - if index(s:netrwmarkfilelist,dname) == -1 - " append new filename to global markfilelist - call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname)) -" call Decho("append filename<".a:fname."> to global s:markfilelist<".string(s:netrwmarkfilelist).">",'~'.expand("")) - else - " remove new filename from global markfilelist -" call Decho("remove new filename from global s:markfilelist",'~'.expand("")) -" call Decho("..filter(".string(s:netrwmarkfilelist).",'v:val != '.".dname.")",'~'.expand("")) - call filter(s:netrwmarkfilelist,'v:val != "'.dname.'"') -" call Decho("..ending s:netrwmarkfilelist <".string(s:netrwmarkfilelist).">",'~'.expand("")) - if s:netrwmarkfilelist == [] -" call Decho("s:netrwmarkfilelist is empty; unlet it",'~'.expand("")) - unlet s:netrwmarkfilelist + let dname= s:ComposePath(b:netrw_curdir,a:fname) + if index(s:netrwmarkfilelist,dname) == -1 + " append new filename to global markfilelist + call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname)) + " call Decho("append filename<".a:fname."> to global s:markfilelist<".string(s:netrwmarkfilelist).">",'~'.expand("")) + else + " remove new filename from global markfilelist + " call Decho("remove new filename from global s:markfilelist",'~'.expand("")) + " call Decho("..filter(".string(s:netrwmarkfilelist).",'v:val != '.".dname.")",'~'.expand("")) + call filter(s:netrwmarkfilelist,'v:val != "'.dname.'"') + " call Decho("..ending s:netrwmarkfilelist <".string(s:netrwmarkfilelist).">",'~'.expand("")) + if s:netrwmarkfilelist == [] + " call Decho("s:netrwmarkfilelist is empty; unlet it",'~'.expand("")) + unlet s:netrwmarkfilelist + endif endif - endif else - " initialize new global-directory markfilelist - let s:netrwmarkfilelist= [] - call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname)) -" call Decho("init s:netrwmarkfilelist<".string(s:netrwmarkfilelist).">",'~'.expand("")) + " initialize new global-directory markfilelist + let s:netrwmarkfilelist= [] + call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname)) + " call Decho("init s:netrwmarkfilelist<".string(s:netrwmarkfilelist).">",'~'.expand("")) endif " set up 2match'ing to netrwmarkfilemtch_# list if has("syntax") && exists("g:syntax_on") && g:syntax_on - if exists("s:netrwmarkfilemtch_{curbufnr}") && s:netrwmarkfilemtch_{curbufnr} != "" -" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/",'~'.expand("")) - if exists("g:did_drchip_netrwlist_syntax") - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/" + if exists("s:netrwmarkfilemtch_{curbufnr}") && s:netrwmarkfilemtch_{curbufnr} != "" + " " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/",'~'.expand("")) + if exists("g:did_drchip_netrwlist_syntax") + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/" + endif + else + " " call Decho("2match none",'~'.expand("")) + 2match none endif - else -" " call Decho("2match none",'~'.expand("")) - 2match none - endif endif let @@= ykeep -" call Decho("s:netrwmarkfilelist[".(exists("s:netrwmarkfilelist")? string(s:netrwmarkfilelist) : "")."] (avail in all buffers)",'~'.expand("")) -" call Dret("s:NetrwMarkFile : s:netrwmarkfilelist_".curbufnr."<".(exists("s:netrwmarkfilelist_{curbufnr}")? string(s:netrwmarkfilelist_{curbufnr}) : " doesn't exist")."> (buf#".curbufnr."list)") + " call Decho("s:netrwmarkfilelist[".(exists("s:netrwmarkfilelist")? string(s:netrwmarkfilelist) : "")."] (avail in all buffers)",'~'.expand("")) + " call Dret("s:NetrwMarkFile : s:netrwmarkfilelist_".curbufnr."<".(exists("s:netrwmarkfilelist_{curbufnr}")? string(s:netrwmarkfilelist_{curbufnr}) : " doesn't exist")."> (buf#".curbufnr."list)") endfun " --------------------------------------------------------------------- @@ -6488,29 +6528,28 @@ fun! s:NetrwMarkFileArgList(islocal,tomflist) let curbufnr = bufnr("%") if a:tomflist - " mA: move argument list to marked file list - while argc() - let fname= argv(0) - exe "argdel ".fnameescape(fname) - call s:NetrwMarkFile(a:islocal,fname) - endwhile + " mA: move argument list to marked file list + while argc() + let fname= argv(0) + exe "argdel ".fnameescape(fname) + call s:NetrwMarkFile(a:islocal,fname) + endwhile else - " ma: move marked file list to argument list - if exists("s:netrwmarkfilelist") + " ma: move marked file list to argument list + if exists("s:netrwmarkfilelist") - " for every filename in the marked list - for fname in s:netrwmarkfilelist - exe "argadd ".fnameescape(fname) - endfor " for every file in the marked list + " for every filename in the marked list + for fname in s:netrwmarkfilelist + exe "argadd ".fnameescape(fname) + endfor " for every file in the marked list - " unmark list and refresh - call s:NetrwUnmarkList(curbufnr,curdir) - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - NetrwKeepj call winrestview(svpos) - endif + " unmark list and refresh + call s:NetrwUnmarkList(curbufnr,curdir) + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + NetrwKeepj call winrestview(svpos) + endif endif - endfun " --------------------------------------------------------------------- @@ -6528,52 +6567,52 @@ fun! s:NetrwMarkFileCompress(islocal) " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + return endif if exists("s:netrwmarkfilelist_{curbufnr}") && exists("g:netrw_compress") && exists("g:netrw_decompress") - " for every filename in the marked list - for fname in s:netrwmarkfilelist_{curbufnr} - let sfx= substitute(fname,'^.\{-}\(\.\a\+\)$','\1','') - if exists("g:netrw_decompress['".sfx."']") - " fname has a suffix indicating that its compressed; apply associated decompression routine - let exe= g:netrw_decompress[sfx] - let exe= netrw#WinPath(exe) - if a:islocal - if g:netrw_keepdir - let fname= s:ShellEscape(s:ComposePath(curdir,fname)) + " for every filename in the marked list + for fname in s:netrwmarkfilelist_{curbufnr} + let sfx= substitute(fname,'^.\{-}\(\.[[:alnum:]]\+\)$','\1','') + if exists("g:netrw_decompress['".sfx."']") + " fname has a suffix indicating that its compressed; apply associated decompression routine + let exe= g:netrw_decompress[sfx] + let exe= netrw#WinPath(exe) + if a:islocal + if g:netrw_keepdir + let fname= s:ShellEscape(s:ComposePath(curdir,fname)) + endif + call system(exe." ".fname) + if v:shell_error + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50) + endif + else + let fname= s:ShellEscape(b:netrw_curdir.fname,1) + NetrwKeepj call s:RemoteSystem(exe." ".fname) + endif + endif - call system(exe." ".fname) - if v:shell_error - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50) + unlet sfx + + if exists("exe") + unlet exe + elseif a:islocal + " fname not a compressed file, so compress it + call system(netrw#WinPath(g:netrw_compress)." ".s:ShellEscape(s:ComposePath(b:netrw_curdir,fname))) + if v:shell_error + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_compress<".g:netrw_compress."> to something that works",104) + endif + else + " fname not a compressed file, so compress it + NetrwKeepj call s:RemoteSystem(netrw#WinPath(g:netrw_compress)." ".s:ShellEscape(fname)) endif - else - let fname= s:ShellEscape(b:netrw_curdir.fname,1) - NetrwKeepj call s:RemoteSystem(exe." ".fname) - endif - - endif - unlet sfx - - if exists("exe") - unlet exe - elseif a:islocal - " fname not a compressed file, so compress it - call system(netrw#WinPath(g:netrw_compress)." ".s:ShellEscape(s:ComposePath(b:netrw_curdir,fname))) - if v:shell_error - call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_compress<".g:netrw_compress."> to something that works",104) - endif - else - " fname not a compressed file, so compress it - NetrwKeepj call s:RemoteSystem(netrw#WinPath(g:netrw_compress)." ".s:ShellEscape(fname)) - endif - endfor " for every file in the marked list + endfor " for every file in the marked list - call s:NetrwUnmarkList(curbufnr,curdir) - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - NetrwKeepj call winrestview(svpos) + call s:NetrwUnmarkList(curbufnr,curdir) + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + NetrwKeepj call winrestview(svpos) endif endfun @@ -6585,224 +6624,224 @@ endfun " Returns 1=success (used by NetrwMarkFileMove()) " 0=failure fun! s:NetrwMarkFileCopy(islocal,...) -" call Dfunc("s:NetrwMarkFileCopy(islocal=".a:islocal.") target<".(exists("s:netrwmftgt")? s:netrwmftgt : '---')."> a:0=".a:0) + " call Dfunc("s:NetrwMarkFileCopy(islocal=".a:islocal.") target<".(exists("s:netrwmftgt")? s:netrwmftgt : '---')."> a:0=".a:0) let curdir = s:NetrwGetCurdir(a:islocal) let curbufnr = bufnr("%") if b:netrw_curdir !~ '/$' - if !exists("b:netrw_curdir") - let b:netrw_curdir= curdir - endif - let b:netrw_curdir= b:netrw_curdir."/" + if !exists("b:netrw_curdir") + let b:netrw_curdir= curdir + endif + let b:netrw_curdir= b:netrw_curdir."/" endif " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) -" call Dret("s:NetrwMarkFileCopy") - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + " call Dret("s:NetrwMarkFileCopy") + return endif -" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) + " call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) if !exists("s:netrwmftgt") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your marked file target is empty! (:help netrw-mt)",67) -" call Dret("s:NetrwMarkFileCopy 0") - return 0 + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your marked file target is empty! (:help netrw-mt)",67) + " call Dret("s:NetrwMarkFileCopy 0") + return 0 endif -" call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("")) + " call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("")) if a:islocal && s:netrwmftgt_islocal - " Copy marked files, local directory to local directory -" call Decho("copy from local to local",'~'.expand("")) - if !executable(g:netrw_localcopycmd) - call netrw#ErrorMsg(s:ERROR,"g:netrw_localcopycmd<".g:netrw_localcopycmd."> not executable on your system, aborting",91) -" call Dfunc("s:NetrwMarkFileMove : g:netrw_localcopycmd<".g:netrw_localcopycmd."> n/a!") - return - endif - - " copy marked files while within the same directory (ie. allow renaming) - if s:StripTrailingSlash(simplify(s:netrwmftgt)) == s:StripTrailingSlash(simplify(b:netrw_curdir)) - if len(s:netrwmarkfilelist_{bufnr('%')}) == 1 - " only one marked file -" call Decho("case: only one marked file",'~'.expand("")) - let args = s:ShellEscape(b:netrw_curdir.s:netrwmarkfilelist_{bufnr('%')}[0]) - let oldname = s:netrwmarkfilelist_{bufnr('%')}[0] - elseif a:0 == 1 -" call Decho("case: handling one input argument",'~'.expand("")) - " this happens when the next case was used to recursively call s:NetrwMarkFileCopy() - let args = s:ShellEscape(b:netrw_curdir.a:1) - let oldname = a:1 - else - " copy multiple marked files inside the same directory -" call Decho("case: handling a multiple marked files",'~'.expand("")) - let s:recursive= 1 - for oldname in s:netrwmarkfilelist_{bufnr("%")} - let ret= s:NetrwMarkFileCopy(a:islocal,oldname) - if ret == 0 - break - endif - endfor - unlet s:recursive - call s:NetrwUnmarkList(curbufnr,curdir) -" call Dret("s:NetrwMarkFileCopy ".ret) - return ret + " Copy marked files, local directory to local directory + " call Decho("copy from local to local",'~'.expand("")) + if !executable(g:netrw_localcopycmd) + call netrw#ErrorMsg(s:ERROR,"g:netrw_localcopycmd<".g:netrw_localcopycmd."> not executable on your system, aborting",91) + " call Dfunc("s:NetrwMarkFileMove : g:netrw_localcopycmd<".g:netrw_localcopycmd."> n/a!") + return endif - call inputsave() - let newname= input("Copy ".oldname." to : ",oldname,"file") - call inputrestore() - if newname == "" -" call Dret("s:NetrwMarkFileCopy 0") - return 0 - endif - let args= s:ShellEscape(oldname) - let tgt = s:ShellEscape(s:netrwmftgt.'/'.newname) - else - let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"s:ShellEscape(b:netrw_curdir.\"/\".v:val)")) - let tgt = s:ShellEscape(s:netrwmftgt) - endif - if !g:netrw_cygwin && has("win32") - let args= substitute(args,'/','\\','g') - let tgt = substitute(tgt, '/','\\','g') - endif - if args =~ "'" |let args= substitute(args,"'\\(.*\\)'",'\1','')|endif - if tgt =~ "'" |let tgt = substitute(tgt ,"'\\(.*\\)'",'\1','')|endif - if args =~ '//'|let args= substitute(args,'//','/','g')|endif - if tgt =~ '//'|let tgt = substitute(tgt ,'//','/','g')|endif -" call Decho("args <".args.">",'~'.expand("")) -" call Decho("tgt <".tgt.">",'~'.expand("")) - if isdirectory(s:NetrwFile(args)) -" call Decho("args<".args."> is a directory",'~'.expand("")) - let copycmd= g:netrw_localcopydircmd -" call Decho("using copydircmd<".copycmd.">",'~'.expand("")) + " copy marked files while within the same directory (ie. allow renaming) + if s:StripTrailingSlash(simplify(s:netrwmftgt)) == s:StripTrailingSlash(simplify(b:netrw_curdir)) + if len(s:netrwmarkfilelist_{bufnr('%')}) == 1 + " only one marked file + " call Decho("case: only one marked file",'~'.expand("")) + let args = s:ShellEscape(b:netrw_curdir.s:netrwmarkfilelist_{bufnr('%')}[0]) + let oldname = s:netrwmarkfilelist_{bufnr('%')}[0] + elseif a:0 == 1 + " call Decho("case: handling one input argument",'~'.expand("")) + " this happens when the next case was used to recursively call s:NetrwMarkFileCopy() + let args = s:ShellEscape(b:netrw_curdir.a:1) + let oldname = a:1 + else + " copy multiple marked files inside the same directory + " call Decho("case: handling a multiple marked files",'~'.expand("")) + let s:recursive= 1 + for oldname in s:netrwmarkfilelist_{bufnr("%")} + let ret= s:NetrwMarkFileCopy(a:islocal,oldname) + if ret == 0 + break + endif + endfor + unlet s:recursive + call s:NetrwUnmarkList(curbufnr,curdir) + " call Dret("s:NetrwMarkFileCopy ".ret) + return ret + endif + + call inputsave() + let newname= input("Copy ".oldname." to : ",oldname,"file") + call inputrestore() + if newname == "" + " call Dret("s:NetrwMarkFileCopy 0") + return 0 + endif + let args= s:ShellEscape(oldname) + let tgt = s:ShellEscape(s:netrwmftgt.'/'.newname) + else + let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"s:ShellEscape(b:netrw_curdir.\"/\".v:val)")) + let tgt = s:ShellEscape(s:netrwmftgt) + endif if !g:netrw_cygwin && has("win32") - " window's xcopy doesn't copy a directory to a target properly. Instead, it copies a directory's - " contents to a target. One must append the source directory name to the target to get xcopy to - " do the right thing. - let tgt= tgt.'\'.substitute(a:1,'^.*[\\/]','','') -" call Decho("modified tgt for xcopy",'~'.expand("")) - endif - else - let copycmd= g:netrw_localcopycmd - endif - if g:netrw_localcopycmd =~ '\s' - let copycmd = substitute(copycmd,'\s.*$','','') - let copycmdargs = substitute(copycmd,'^.\{-}\(\s.*\)$','\1','') - let copycmd = netrw#WinPath(copycmd).copycmdargs - else - let copycmd = netrw#WinPath(copycmd) - endif -" call Decho("args <".args.">",'~'.expand("")) -" call Decho("tgt <".tgt.">",'~'.expand("")) -" call Decho("copycmd<".copycmd.">",'~'.expand("")) -" call Decho("system(".copycmd." '".args."' '".tgt."')",'~'.expand("")) - call system(copycmd.g:netrw_localcopycmdopt." '".args."' '".tgt."'") - if v:shell_error != 0 - if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && g:netrw_keepdir - call netrw#ErrorMsg(s:ERROR,"copy failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",101) - else - call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localcopycmd<".g:netrw_localcopycmd.">; it doesn't work!",80) - endif -" call Dret("s:NetrwMarkFileCopy 0 : failed: system(".g:netrw_localcopycmd." ".args." ".s:ShellEscape(s:netrwmftgt)) - return 0 - endif + let args= substitute(args,'/','\\','g') + let tgt = substitute(tgt, '/','\\','g') + endif + if args =~ "'" |let args= substitute(args,"'\\(.*\\)'",'\1','')|endif + if tgt =~ "'" |let tgt = substitute(tgt ,"'\\(.*\\)'",'\1','')|endif + if args =~ '//'|let args= substitute(args,'//','/','g')|endif + if tgt =~ '//'|let tgt = substitute(tgt ,'//','/','g')|endif + " call Decho("args <".args.">",'~'.expand("")) + " call Decho("tgt <".tgt.">",'~'.expand("")) + if isdirectory(s:NetrwFile(args)) + " call Decho("args<".args."> is a directory",'~'.expand("")) + let copycmd= g:netrw_localcopydircmd + " call Decho("using copydircmd<".copycmd.">",'~'.expand("")) + if !g:netrw_cygwin && has("win32") + " window's xcopy doesn't copy a directory to a target properly. Instead, it copies a directory's + " contents to a target. One must append the source directory name to the target to get xcopy to + " do the right thing. + let tgt= tgt.'\'.substitute(a:1,'^.*[\\/]','','') + " call Decho("modified tgt for xcopy",'~'.expand("")) + endif + else + let copycmd= g:netrw_localcopycmd + endif + if g:netrw_localcopycmd =~ '\s' + let copycmd = substitute(copycmd,'\s.*$','','') + let copycmdargs = substitute(copycmd,'^.\{-}\(\s.*\)$','\1','') + let copycmd = netrw#WinPath(copycmd).copycmdargs + else + let copycmd = netrw#WinPath(copycmd) + endif + " call Decho("args <".args.">",'~'.expand("")) + " call Decho("tgt <".tgt.">",'~'.expand("")) + " call Decho("copycmd<".copycmd.">",'~'.expand("")) + " call Decho("system(".copycmd." '".args."' '".tgt."')",'~'.expand("")) + call system(copycmd.g:netrw_localcopycmdopt." '".args."' '".tgt."'") + if v:shell_error != 0 + if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && g:netrw_keepdir + call netrw#ErrorMsg(s:ERROR,"copy failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",101) + else + call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localcopycmd<".g:netrw_localcopycmd.">; it doesn't work!",80) + endif + " call Dret("s:NetrwMarkFileCopy 0 : failed: system(".g:netrw_localcopycmd." ".args." ".s:ShellEscape(s:netrwmftgt)) + return 0 + endif elseif a:islocal && !s:netrwmftgt_islocal - " Copy marked files, local directory to remote directory -" call Decho("copy from local to remote",'~'.expand("")) - NetrwKeepj call s:NetrwUpload(s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) + " Copy marked files, local directory to remote directory + " call Decho("copy from local to remote",'~'.expand("")) + NetrwKeepj call s:NetrwUpload(s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) elseif !a:islocal && s:netrwmftgt_islocal - " Copy marked files, remote directory to local directory -" call Decho("copy from remote to local",'~'.expand("")) - NetrwKeepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) + " Copy marked files, remote directory to local directory + " call Decho("copy from remote to local",'~'.expand("")) + NetrwKeepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) elseif !a:islocal && !s:netrwmftgt_islocal - " Copy marked files, remote directory to remote directory -" call Decho("copy from remote to remote",'~'.expand("")) - let curdir = getcwd() - let tmpdir = s:GetTempfile("") - if tmpdir !~ '/' - let tmpdir= curdir."/".tmpdir - endif - if exists("*mkdir") - call mkdir(tmpdir) - else - call s:NetrwExe("sil! !".g:netrw_localmkdir.g:netrw_localmkdiropt.' '.s:ShellEscape(tmpdir,1)) - if v:shell_error != 0 - call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) -" call Dret("s:NetrwMarkFileCopy : failed: sil! !".g:netrw_localmkdir.' '.s:ShellEscape(tmpdir,1) ) - return - endif - endif - if isdirectory(s:NetrwFile(tmpdir)) - if s:NetrwLcd(tmpdir) -" call Dret("s:NetrwMarkFileCopy : lcd failure") - return - endif - NetrwKeepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir) - let localfiles= map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")') - NetrwKeepj call s:NetrwUpload(localfiles,s:netrwmftgt) - if getcwd() == tmpdir - for fname in s:netrwmarkfilelist_{bufnr('%')} - NetrwKeepj call s:NetrwDelete(fname) - endfor - if s:NetrwLcd(curdir) -" call Dret("s:NetrwMarkFileCopy : lcd failure") - return - endif - if delete(tmpdir,"d") - call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".tmpdir.">!",103) - endif + " Copy marked files, remote directory to remote directory + " call Decho("copy from remote to remote",'~'.expand("")) + let curdir = getcwd() + let tmpdir = s:GetTempfile("") + if tmpdir !~ '/' + let tmpdir= curdir."/".tmpdir + endif + if exists("*mkdir") + call mkdir(tmpdir) else - if s:NetrwLcd(curdir) -" call Dret("s:NetrwMarkFileCopy : lcd failure") - return - endif + call s:NetrwExe("sil! !".g:netrw_localmkdir.g:netrw_localmkdiropt.' '.s:ShellEscape(tmpdir,1)) + if v:shell_error != 0 + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) + " call Dret("s:NetrwMarkFileCopy : failed: sil! !".g:netrw_localmkdir.' '.s:ShellEscape(tmpdir,1) ) + return + endif + endif + if isdirectory(s:NetrwFile(tmpdir)) + if s:NetrwLcd(tmpdir) + " call Dret("s:NetrwMarkFileCopy : lcd failure") + return + endif + NetrwKeepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir) + let localfiles= map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")') + NetrwKeepj call s:NetrwUpload(localfiles,s:netrwmftgt) + if getcwd() == tmpdir + for fname in s:netrwmarkfilelist_{bufnr('%')} + NetrwKeepj call s:NetrwDelete(fname) + endfor + if s:NetrwLcd(curdir) + " call Dret("s:NetrwMarkFileCopy : lcd failure") + return + endif + if delete(tmpdir,"d") + call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".tmpdir.">!",103) + endif + else + if s:NetrwLcd(curdir) + " call Dret("s:NetrwMarkFileCopy : lcd failure") + return + endif + endif endif - endif endif " ------- " cleanup " ------- -" call Decho("cleanup",'~'.expand("")) + " call Decho("cleanup",'~'.expand("")) " remove markings from local buffer call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer -" call Decho(" g:netrw_fastbrowse =".g:netrw_fastbrowse,'~'.expand("")) -" call Decho(" s:netrwmftgt =".s:netrwmftgt,'~'.expand("")) -" call Decho(" s:netrwmftgt_islocal=".s:netrwmftgt_islocal,'~'.expand("")) -" call Decho(" curdir =".curdir,'~'.expand("")) -" call Decho(" a:islocal =".a:islocal,'~'.expand("")) -" call Decho(" curbufnr =".curbufnr,'~'.expand("")) + " call Decho(" g:netrw_fastbrowse =".g:netrw_fastbrowse,'~'.expand("")) + " call Decho(" s:netrwmftgt =".s:netrwmftgt,'~'.expand("")) + " call Decho(" s:netrwmftgt_islocal=".s:netrwmftgt_islocal,'~'.expand("")) + " call Decho(" curdir =".curdir,'~'.expand("")) + " call Decho(" a:islocal =".a:islocal,'~'.expand("")) + " call Decho(" curbufnr =".curbufnr,'~'.expand("")) if exists("s:recursive") -" call Decho(" s:recursive =".s:recursive,'~'.expand("")) + " call Decho(" s:recursive =".s:recursive,'~'.expand("")) else -" call Decho(" s:recursive =n/a",'~'.expand("")) + " call Decho(" s:recursive =n/a",'~'.expand("")) endif " see s:LocalFastBrowser() for g:netrw_fastbrowse interpretation (refreshing done for both slow and medium) if g:netrw_fastbrowse <= 1 - NetrwKeepj call s:LocalBrowseRefresh() - else - " refresh local and targets for fast browsing - if !exists("s:recursive") - " remove markings from local buffer -" call Decho(" remove markings from local buffer",'~'.expand("")) - NetrwKeepj call s:NetrwUnmarkList(curbufnr,curdir) - endif - - " refresh buffers - if s:netrwmftgt_islocal -" call Decho(" refresh s:netrwmftgt=".s:netrwmftgt,'~'.expand("")) - NetrwKeepj call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt) - endif - if a:islocal && s:netrwmftgt != curdir -" call Decho(" refresh curdir=".curdir,'~'.expand("")) - NetrwKeepj call s:NetrwRefreshDir(a:islocal,curdir) - endif + NetrwKeepj call s:LocalBrowseRefresh() + else + " refresh local and targets for fast browsing + if !exists("s:recursive") + " remove markings from local buffer + " call Decho(" remove markings from local buffer",'~'.expand("")) + NetrwKeepj call s:NetrwUnmarkList(curbufnr,curdir) + endif + + " refresh buffers + if s:netrwmftgt_islocal + " call Decho(" refresh s:netrwmftgt=".s:netrwmftgt,'~'.expand("")) + NetrwKeepj call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt) + endif + if a:islocal && s:netrwmftgt != curdir + " call Decho(" refresh curdir=".curdir,'~'.expand("")) + NetrwKeepj call s:NetrwRefreshDir(a:islocal,curdir) + endif endif -" call Dret("s:NetrwMarkFileCopy 1") + " call Dret("s:NetrwMarkFileCopy 1") return 1 endfun @@ -6812,101 +6851,101 @@ endfun " Either two or three files can be so handled. " Uses the global marked file list. fun! s:NetrwMarkFileDiff(islocal) -" call Dfunc("s:NetrwMarkFileDiff(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") + " call Dfunc("s:NetrwMarkFileDiff(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") let curbufnr= bufnr("%") " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) -" call Dret("s:NetrwMarkFileDiff") - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + " call Dret("s:NetrwMarkFileDiff") + return endif let curdir= s:NetrwGetCurdir(a:islocal) -" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) + " call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) if exists("s:netrwmarkfilelist_{".curbufnr."}") - let cnt = 0 - for fname in s:netrwmarkfilelist - let cnt= cnt + 1 - if cnt == 1 -" call Decho("diffthis: fname<".fname.">",'~'.expand("")) - exe "NetrwKeepj e ".fnameescape(fname) - diffthis - elseif cnt == 2 || cnt == 3 - below vsplit -" call Decho("diffthis: ".fname,'~'.expand("")) - exe "NetrwKeepj e ".fnameescape(fname) - diffthis - else - break - endif - endfor - call s:NetrwUnmarkList(curbufnr,curdir) + let cnt = 0 + for fname in s:netrwmarkfilelist + let cnt= cnt + 1 + if cnt == 1 + " call Decho("diffthis: fname<".fname.">",'~'.expand("")) + exe "NetrwKeepj e ".fnameescape(fname) + diffthis + elseif cnt == 2 || cnt == 3 + below vsplit + " call Decho("diffthis: ".fname,'~'.expand("")) + exe "NetrwKeepj e ".fnameescape(fname) + diffthis + else + break + endif + endfor + call s:NetrwUnmarkList(curbufnr,curdir) endif -" call Dret("s:NetrwMarkFileDiff") + " call Dret("s:NetrwMarkFileDiff") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileEdit: (invoked by me) put marked files on arg list and start editing them {{{2 " Uses global markfilelist fun! s:NetrwMarkFileEdit(islocal) -" call Dfunc("s:NetrwMarkFileEdit(islocal=".a:islocal.")") + " call Dfunc("s:NetrwMarkFileEdit(islocal=".a:islocal.")") let curdir = s:NetrwGetCurdir(a:islocal) let curbufnr = bufnr("%") " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) -" call Dret("s:NetrwMarkFileEdit") - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + " call Dret("s:NetrwMarkFileEdit") + return endif -" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) + " call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) if exists("s:netrwmarkfilelist_{curbufnr}") - call s:SetRexDir(a:islocal,curdir) - let flist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) - " unmark markedfile list -" call s:NetrwUnmarkList(curbufnr,curdir) - call s:NetrwUnmarkAll() -" call Decho("exe sil args ".flist,'~'.expand("")) - exe "sil args ".flist + call s:SetRexDir(a:islocal,curdir) + let flist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) + " unmark markedfile list + " call s:NetrwUnmarkList(curbufnr,curdir) + call s:NetrwUnmarkAll() + " call Decho("exe sil args ".flist,'~'.expand("")) + exe "sil args ".flist endif echo "(use :bn, :bp to navigate files; :Rex to return)" -" call Dret("s:NetrwMarkFileEdit") + " call Dret("s:NetrwMarkFileEdit") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileQFEL: convert a quickfix-error or location list into a marked file list {{{2 fun! s:NetrwMarkFileQFEL(islocal,qfel) -" call Dfunc("s:NetrwMarkFileQFEL(islocal=".a:islocal.",qfel)") + " call Dfunc("s:NetrwMarkFileQFEL(islocal=".a:islocal.",qfel)") call s:NetrwUnmarkAll() let curbufnr= bufnr("%") if !empty(a:qfel) - for entry in a:qfel - let bufnmbr= entry["bufnr"] -" call Decho("bufname(".bufnmbr.")<".bufname(bufnmbr)."> line#".entry["lnum"]." text=".entry["text"],'~'.expand("")) - if !exists("s:netrwmarkfilelist_{curbufnr}") -" call Decho("case: no marked file list",'~'.expand("")) - call s:NetrwMarkFile(a:islocal,bufname(bufnmbr)) - elseif index(s:netrwmarkfilelist_{curbufnr},bufname(bufnmbr)) == -1 - " s:NetrwMarkFile will remove duplicate entries from the marked file list. - " So, this test lets two or more hits on the same pattern to be ignored. -" call Decho("case: ".bufname(bufnmbr)." not currently in marked file list",'~'.expand("")) - call s:NetrwMarkFile(a:islocal,bufname(bufnmbr)) - else -" call Decho("case: ".bufname(bufnmbr)." already in marked file list",'~'.expand("")) - endif - endfor - echo "(use me to edit marked files)" + for entry in a:qfel + let bufnmbr= entry["bufnr"] + " call Decho("bufname(".bufnmbr.")<".bufname(bufnmbr)."> line#".entry["lnum"]." text=".entry["text"],'~'.expand("")) + if !exists("s:netrwmarkfilelist_{curbufnr}") + " call Decho("case: no marked file list",'~'.expand("")) + call s:NetrwMarkFile(a:islocal,bufname(bufnmbr)) + elseif index(s:netrwmarkfilelist_{curbufnr},bufname(bufnmbr)) == -1 + " s:NetrwMarkFile will remove duplicate entries from the marked file list. + " So, this test lets two or more hits on the same pattern to be ignored. + " call Decho("case: ".bufname(bufnmbr)." not currently in marked file list",'~'.expand("")) + call s:NetrwMarkFile(a:islocal,bufname(bufnmbr)) + else + " call Decho("case: ".bufname(bufnmbr)." already in marked file list",'~'.expand("")) + endif + endfor + echo "(use me to edit marked files)" else - call netrw#ErrorMsg(s:WARNING,"can't convert quickfix error list; its empty!",92) + call netrw#ErrorMsg(s:WARNING,"can't convert quickfix error list; its empty!",92) endif -" call Dret("s:NetrwMarkFileQFEL") + " call Dret("s:NetrwMarkFileQFEL") endfun " --------------------------------------------------------------------- @@ -6919,94 +6958,94 @@ fun! s:NetrwMarkFileExe(islocal,enbloc) let curbufnr = bufnr("%") if a:enbloc == 0 - " individually apply command to files, one at a time + " individually apply command to files, one at a time " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + return endif if exists("s:netrwmarkfilelist_{curbufnr}") - " get the command - call inputsave() - let cmd= input("Enter command: ","","file") - call inputrestore() - if cmd == "" - return - endif - - " apply command to marked files, individually. Substitute: filename -> % - " If no %, then append a space and the filename to the command - for fname in s:netrwmarkfilelist_{curbufnr} - if a:islocal - if g:netrw_keepdir - let fname= s:ShellEscape(netrw#WinPath(s:ComposePath(curdir,fname))) - endif - else - let fname= s:ShellEscape(netrw#WinPath(b:netrw_curdir.fname)) - endif - if cmd =~ '%' - let xcmd= substitute(cmd,'%',fname,'g') - else - let xcmd= cmd.' '.fname - endif - if a:islocal - let ret= system(xcmd) - else - let ret= s:RemoteSystem(xcmd) - endif - if v:shell_error < 0 - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54) - break - else - if ret !=# '' - echo "\n" - " skip trailing new line - echo ret[0:-2] - else - echo ret - endif + " get the command + call inputsave() + let cmd= input("Enter command: ","","file") + call inputrestore() + if cmd == "" + return endif - endfor - " unmark marked file list - call s:NetrwUnmarkList(curbufnr,curdir) + " apply command to marked files, individually. Substitute: filename -> % + " If no %, then append a space and the filename to the command + for fname in s:netrwmarkfilelist_{curbufnr} + if a:islocal + if g:netrw_keepdir + let fname= s:ShellEscape(netrw#WinPath(s:ComposePath(curdir,fname))) + endif + else + let fname= s:ShellEscape(netrw#WinPath(b:netrw_curdir.fname)) + endif + if cmd =~ '%' + let xcmd= substitute(cmd,'%',fname,'g') + else + let xcmd= cmd.' '.fname + endif + if a:islocal + let ret= system(xcmd) + else + let ret= s:RemoteSystem(xcmd) + endif + if v:shell_error < 0 + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54) + break + else + if ret !=# '' + echo "\n" + " skip trailing new line + echo ret[0:-2] + else + echo ret + endif + endif + endfor - " refresh the listing - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - NetrwKeepj call winrestview(svpos) - else - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) - endif + " unmark marked file list + call s:NetrwUnmarkList(curbufnr,curdir) - else " apply command to global list of files, en bloc + " refresh the listing + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + NetrwKeepj call winrestview(svpos) + else + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) + endif - call inputsave() - let cmd= input("Enter command: ","","file") - call inputrestore() - if cmd == "" - return - endif - if cmd =~ '%' - let cmd= substitute(cmd,'%',join(map(s:netrwmarkfilelist,'s:ShellEscape(v:val)'),' '),'g') - else - let cmd= cmd.' '.join(map(s:netrwmarkfilelist,'s:ShellEscape(v:val)'),' ') - endif - if a:islocal - call system(cmd) - if v:shell_error < 0 - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54) - endif - else - let ret= s:RemoteSystem(cmd) - endif - call s:NetrwUnmarkAll() + else " apply command to global list of files, en bloc - " refresh the listing - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - NetrwKeepj call winrestview(svpos) + call inputsave() + let cmd= input("Enter command: ","","file") + call inputrestore() + if cmd == "" + return + endif + if cmd =~ '%' + let cmd= substitute(cmd,'%',join(map(s:netrwmarkfilelist,'s:ShellEscape(v:val)'),' '),'g') + else + let cmd= cmd.' '.join(map(s:netrwmarkfilelist,'s:ShellEscape(v:val)'),' ') + endif + if a:islocal + call system(cmd) + if v:shell_error < 0 + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54) + endif + else + let ret= s:RemoteSystem(cmd) + endif + call s:NetrwUnmarkAll() + + " refresh the listing + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + NetrwKeepj call winrestview(svpos) - endif + endif endfun " --------------------------------------------------------------------- @@ -7020,44 +7059,44 @@ fun! s:NetrwMarkHideSfx(islocal) " s:netrwmarkfilelist_{curbufnr}: the List of marked files if exists("s:netrwmarkfilelist_{curbufnr}") - for fname in s:netrwmarkfilelist_{curbufnr} - " construct suffix pattern - if fname =~ '\.' - let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','') - else - let sfxpat= '^\%(\%(\.\)\@!.\)*$' - endif - " determine if its in the hiding list or not - let inhidelist= 0 - if g:netrw_list_hide != "" - let itemnum = 0 - let hidelist= split(g:netrw_list_hide,',') - for hidepat in hidelist - if sfxpat == hidepat - let inhidelist= 1 - break - endif - let itemnum= itemnum + 1 - endfor - endif - if inhidelist - " remove sfxpat from list - call remove(hidelist,itemnum) - let g:netrw_list_hide= join(hidelist,",") - elseif g:netrw_list_hide != "" - " append sfxpat to non-empty list - let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat - else - " set hiding list to sfxpat - let g:netrw_list_hide= sfxpat - endif + for fname in s:netrwmarkfilelist_{curbufnr} + " construct suffix pattern + if fname =~ '\.' + let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','') + else + let sfxpat= '^\%(\%(\.\)\@!.\)*$' + endif + " determine if its in the hiding list or not + let inhidelist= 0 + if g:netrw_list_hide != "" + let itemnum = 0 + let hidelist= split(g:netrw_list_hide,',') + for hidepat in hidelist + if sfxpat == hidepat + let inhidelist= 1 + break + endif + let itemnum= itemnum + 1 + endfor + endif + if inhidelist + " remove sfxpat from list + call remove(hidelist,itemnum) + let g:netrw_list_hide= join(hidelist,",") + elseif g:netrw_list_hide != "" + " append sfxpat to non-empty list + let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat + else + " set hiding list to sfxpat + let g:netrw_list_hide= sfxpat + endif endfor - " refresh the listing - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - NetrwKeepj call winrestview(svpos) + " refresh the listing + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + NetrwKeepj call winrestview(svpos) else - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif endfun @@ -7071,40 +7110,40 @@ fun! s:NetrwMarkFileVimCmd(islocal) " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + return endif if exists("s:netrwmarkfilelist_{curbufnr}") - " get the command - call inputsave() - let cmd= input("Enter vim command: ","","file") - call inputrestore() - if cmd == "" - return - endif - - " apply command to marked files. Substitute: filename -> % - " If no %, then append a space and the filename to the command - for fname in s:netrwmarkfilelist_{curbufnr} - if a:islocal - 1split - exe "sil! NetrwKeepj keepalt e ".fnameescape(fname) - exe cmd - exe "sil! keepalt wq!" - else - echo "sorry, \"mv\" not supported yet for remote files" + " get the command + call inputsave() + let cmd= input("Enter vim command: ","","file") + call inputrestore() + if cmd == "" + return endif - endfor - " unmark marked file list - call s:NetrwUnmarkList(curbufnr,curdir) + " apply command to marked files. Substitute: filename -> % + " If no %, then append a space and the filename to the command + for fname in s:netrwmarkfilelist_{curbufnr} + if a:islocal + 1split + exe "sil! NetrwKeepj keepalt e ".fnameescape(fname) + exe cmd + exe "sil! keepalt wq!" + else + echo "sorry, \"mv\" not supported yet for remote files" + endif + endfor + + " unmark marked file list + call s:NetrwUnmarkList(curbufnr,curdir) - " refresh the listing - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - NetrwKeepj call winrestview(svpos) + " refresh the listing + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + NetrwKeepj call winrestview(svpos) else - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif endfun @@ -7119,44 +7158,44 @@ fun! s:NetrwMarkHideSfx(islocal) " s:netrwmarkfilelist_{curbufnr}: the List of marked files if exists("s:netrwmarkfilelist_{curbufnr}") - for fname in s:netrwmarkfilelist_{curbufnr} - " construct suffix pattern - if fname =~ '\.' - let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','') - else - let sfxpat= '^\%(\%(\.\)\@!.\)*$' - endif - " determine if its in the hiding list or not - let inhidelist= 0 - if g:netrw_list_hide != "" - let itemnum = 0 - let hidelist= split(g:netrw_list_hide,',') - for hidepat in hidelist - if sfxpat == hidepat - let inhidelist= 1 - break - endif - let itemnum= itemnum + 1 - endfor - endif - if inhidelist - " remove sfxpat from list - call remove(hidelist,itemnum) - let g:netrw_list_hide= join(hidelist,",") - elseif g:netrw_list_hide != "" - " append sfxpat to non-empty list - let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat - else - " set hiding list to sfxpat - let g:netrw_list_hide= sfxpat - endif + for fname in s:netrwmarkfilelist_{curbufnr} + " construct suffix pattern + if fname =~ '\.' + let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','') + else + let sfxpat= '^\%(\%(\.\)\@!.\)*$' + endif + " determine if its in the hiding list or not + let inhidelist= 0 + if g:netrw_list_hide != "" + let itemnum = 0 + let hidelist= split(g:netrw_list_hide,',') + for hidepat in hidelist + if sfxpat == hidepat + let inhidelist= 1 + break + endif + let itemnum= itemnum + 1 + endfor + endif + if inhidelist + " remove sfxpat from list + call remove(hidelist,itemnum) + let g:netrw_list_hide= join(hidelist,",") + elseif g:netrw_list_hide != "" + " append sfxpat to non-empty list + let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat + else + " set hiding list to sfxpat + let g:netrw_list_hide= sfxpat + endif endfor - " refresh the listing - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - NetrwKeepj call winrestview(svpos) + " refresh the listing + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + NetrwKeepj call winrestview(svpos) else - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif endfun @@ -7164,63 +7203,63 @@ endfun " s:NetrwMarkFileGrep: (invoked by mg) This function applies vimgrep to marked files {{{2 " Uses the global markfilelist fun! s:NetrwMarkFileGrep(islocal) -" call Dfunc("s:NetrwMarkFileGrep(islocal=".a:islocal.")") + " call Dfunc("s:NetrwMarkFileGrep(islocal=".a:islocal.")") let svpos = winsaveview() -" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) + " call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) let curbufnr = bufnr("%") let curdir = s:NetrwGetCurdir(a:islocal) if exists("s:netrwmarkfilelist") -" call Decho("using s:netrwmarkfilelist".string(s:netrwmarkfilelist).">",'~'.expand("")) - let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) -" call Decho("keeping copy of s:netrwmarkfilelist in function-local variable,'~'.expand(""))" - call s:NetrwUnmarkAll() + " call Decho("using s:netrwmarkfilelist".string(s:netrwmarkfilelist).">",'~'.expand("")) + let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) + " call Decho("keeping copy of s:netrwmarkfilelist in function-local variable,'~'.expand(""))" + call s:NetrwUnmarkAll() else -" call Decho('no marked files, using "*"','~'.expand("")) - let netrwmarkfilelist= "*" + " call Decho('no marked files, using "*"','~'.expand("")) + let netrwmarkfilelist= "*" endif " ask user for pattern -" call Decho("ask user for search pattern",'~'.expand("")) + " call Decho("ask user for search pattern",'~'.expand("")) call inputsave() let pat= input("Enter pattern: ","") call inputrestore() let patbang = "" if pat =~ '^!' - let patbang = "!" - let pat = strpart(pat,2) + let patbang = "!" + let pat = strpart(pat,2) endif if pat =~ '^\i' - let pat = escape(pat,'/') - let pat = '/'.pat.'/' + let pat = escape(pat,'/') + let pat = '/'.pat.'/' else - let nonisi = pat[0] + let nonisi = pat[0] endif " use vimgrep for both local and remote -" call Decho("exe vimgrep".patbang." ".pat." ".netrwmarkfilelist,'~'.expand("")) + " call Decho("exe vimgrep".patbang." ".pat." ".netrwmarkfilelist,'~'.expand("")) try - exe "NetrwKeepj noautocmd vimgrep".patbang." ".pat." ".netrwmarkfilelist + exe "NetrwKeepj noautocmd vimgrep".patbang." ".pat." ".netrwmarkfilelist catch /^Vim\%((\a\+)\)\=:E480/ - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pat.">",76) -" call Dret("s:NetrwMarkFileGrep : unable to find pattern<".pat.">") - return + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pat.">",76) + " call Dret("s:NetrwMarkFileGrep : unable to find pattern<".pat.">") + return endtry echo "(use :cn, :cp to navigate, :Rex to return)" 2match none -" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("")) + " call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("")) NetrwKeepj call winrestview(svpos) if exists("nonisi") - " original, user-supplied pattern did not begin with a character from isident -" call Decho("looking for trailing nonisi<".nonisi."> followed by a j, gj, or jg",'~'.expand("")) - if pat =~# nonisi.'j$\|'.nonisi.'gj$\|'.nonisi.'jg$' - call s:NetrwMarkFileQFEL(a:islocal,getqflist()) - endif + " original, user-supplied pattern did not begin with a character from isident + " call Decho("looking for trailing nonisi<".nonisi."> followed by a j, gj, or jg",'~'.expand("")) + if pat =~# nonisi.'j$\|'.nonisi.'gj$\|'.nonisi.'jg$' + call s:NetrwMarkFileQFEL(a:islocal,getqflist()) + endif endif -" call Dret("s:NetrwMarkFileGrep") + " call Dret("s:NetrwMarkFileGrep") endfun " --------------------------------------------------------------------- @@ -7229,175 +7268,175 @@ endfun " s:netrwmfloc= 0: target directory is remote " = 1: target directory is local fun! s:NetrwMarkFileMove(islocal) -" call Dfunc("s:NetrwMarkFileMove(islocal=".a:islocal.")") + " call Dfunc("s:NetrwMarkFileMove(islocal=".a:islocal.")") let curdir = s:NetrwGetCurdir(a:islocal) let curbufnr = bufnr("%") " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) -" call Dret("s:NetrwMarkFileMove") - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + " call Dret("s:NetrwMarkFileMove") + return endif -" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) + " call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) if !exists("s:netrwmftgt") - NetrwKeepj call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67) -" call Dret("s:NetrwMarkFileCopy 0") - return 0 + NetrwKeepj call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67) + " call Dret("s:NetrwMarkFileCopy 0") + return 0 endif -" call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("")) + " call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("")) if a:islocal && s:netrwmftgt_islocal - " move: local -> local -" call Decho("move from local to local",'~'.expand("")) -" call Decho("local to local move",'~'.expand("")) - if !executable(g:netrw_localmovecmd) - call netrw#ErrorMsg(s:ERROR,"g:netrw_localmovecmd<".g:netrw_localmovecmd."> not executable on your system, aborting",90) -" call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!") - return - endif - let tgt = s:ShellEscape(s:netrwmftgt) -" call Decho("tgt<".tgt.">",'~'.expand("")) - if !g:netrw_cygwin && has("win32") - let tgt= substitute(tgt, '/','\\','g') -" call Decho("windows exception: tgt<".tgt.">",'~'.expand("")) - if g:netrw_localmovecmd =~ '\s' - let movecmd = substitute(g:netrw_localmovecmd,'\s.*$','','') - let movecmdargs = substitute(g:netrw_localmovecmd,'^.\{-}\(\s.*\)$','\1','') - let movecmd = netrw#WinPath(movecmd).movecmdargs -" call Decho("windows exception: movecmd<".movecmd."> (#1: had a space)",'~'.expand("")) - else - let movecmd = netrw#WinPath(g:netrw_localmovecmd) -" call Decho("windows exception: movecmd<".movecmd."> (#2: no space)",'~'.expand("")) - endif - else - let movecmd = netrw#WinPath(g:netrw_localmovecmd) -" call Decho("movecmd<".movecmd."> (#3 linux or cygwin)",'~'.expand("")) - endif - for fname in s:netrwmarkfilelist_{bufnr("%")} - if g:netrw_keepdir - " Jul 19, 2022: fixing file move when g:netrw_keepdir is 1 - let fname= b:netrw_curdir."/".fname + " move: local -> local + " call Decho("move from local to local",'~'.expand("")) + " call Decho("local to local move",'~'.expand("")) + if !executable(g:netrw_localmovecmd) + call netrw#ErrorMsg(s:ERROR,"g:netrw_localmovecmd<".g:netrw_localmovecmd."> not executable on your system, aborting",90) + " call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!") + return endif + let tgt = s:ShellEscape(s:netrwmftgt) + " call Decho("tgt<".tgt.">",'~'.expand("")) if !g:netrw_cygwin && has("win32") - let fname= substitute(fname,'/','\\','g') - endif -" call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("")) - let ret= system(movecmd.g:netrw_localmovecmdopt." ".s:ShellEscape(fname)." ".tgt) - if v:shell_error != 0 - if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir - call netrw#ErrorMsg(s:ERROR,"move failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",100) - else - call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localmovecmd<".g:netrw_localmovecmd.">; it doesn't work!",54) - endif - break + let tgt= substitute(tgt, '/','\\','g') + " call Decho("windows exception: tgt<".tgt.">",'~'.expand("")) + if g:netrw_localmovecmd =~ '\s' + let movecmd = substitute(g:netrw_localmovecmd,'\s.*$','','') + let movecmdargs = substitute(g:netrw_localmovecmd,'^.\{-}\(\s.*\)$','\1','') + let movecmd = netrw#WinPath(movecmd).movecmdargs + " call Decho("windows exception: movecmd<".movecmd."> (#1: had a space)",'~'.expand("")) + else + let movecmd = netrw#WinPath(g:netrw_localmovecmd) + " call Decho("windows exception: movecmd<".movecmd."> (#2: no space)",'~'.expand("")) + endif + else + let movecmd = netrw#WinPath(g:netrw_localmovecmd) + " call Decho("movecmd<".movecmd."> (#3 linux or cygwin)",'~'.expand("")) endif - endfor + for fname in s:netrwmarkfilelist_{bufnr("%")} + if g:netrw_keepdir + " Jul 19, 2022: fixing file move when g:netrw_keepdir is 1 + let fname= b:netrw_curdir."/".fname + endif + if !g:netrw_cygwin && has("win32") + let fname= substitute(fname,'/','\\','g') + endif + " call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("")) + let ret= system(movecmd.g:netrw_localmovecmdopt." ".s:ShellEscape(fname)." ".tgt) + if v:shell_error != 0 + if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir + call netrw#ErrorMsg(s:ERROR,"move failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",100) + else + call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localmovecmd<".g:netrw_localmovecmd.">; it doesn't work!",54) + endif + break + endif + endfor elseif a:islocal && !s:netrwmftgt_islocal - " move: local -> remote -" call Decho("move from local to remote",'~'.expand("")) -" call Decho("copy",'~'.expand("")) - let mflist= s:netrwmarkfilelist_{bufnr("%")} - NetrwKeepj call s:NetrwMarkFileCopy(a:islocal) -" call Decho("remove",'~'.expand("")) - for fname in mflist - let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') - let ok = s:NetrwLocalRmFile(b:netrw_curdir,barefname,1) - endfor - unlet mflist + " move: local -> remote + " call Decho("move from local to remote",'~'.expand("")) + " call Decho("copy",'~'.expand("")) + let mflist= s:netrwmarkfilelist_{bufnr("%")} + NetrwKeepj call s:NetrwMarkFileCopy(a:islocal) + " call Decho("remove",'~'.expand("")) + for fname in mflist + let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') + let ok = s:NetrwLocalRmFile(b:netrw_curdir,barefname,1) + endfor + unlet mflist elseif !a:islocal && s:netrwmftgt_islocal - " move: remote -> local -" call Decho("move from remote to local",'~'.expand("")) -" call Decho("copy",'~'.expand("")) - let mflist= s:netrwmarkfilelist_{bufnr("%")} - NetrwKeepj call s:NetrwMarkFileCopy(a:islocal) -" call Decho("remove",'~'.expand("")) - for fname in mflist - let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') - let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1) - endfor - unlet mflist + " move: remote -> local + " call Decho("move from remote to local",'~'.expand("")) + " call Decho("copy",'~'.expand("")) + let mflist= s:netrwmarkfilelist_{bufnr("%")} + NetrwKeepj call s:NetrwMarkFileCopy(a:islocal) + " call Decho("remove",'~'.expand("")) + for fname in mflist + let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') + let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1) + endfor + unlet mflist elseif !a:islocal && !s:netrwmftgt_islocal - " move: remote -> remote -" call Decho("move from remote to remote",'~'.expand("")) -" call Decho("copy",'~'.expand("")) - let mflist= s:netrwmarkfilelist_{bufnr("%")} - NetrwKeepj call s:NetrwMarkFileCopy(a:islocal) -" call Decho("remove",'~'.expand("")) - for fname in mflist - let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') - let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1) - endfor - unlet mflist + " move: remote -> remote + " call Decho("move from remote to remote",'~'.expand("")) + " call Decho("copy",'~'.expand("")) + let mflist= s:netrwmarkfilelist_{bufnr("%")} + NetrwKeepj call s:NetrwMarkFileCopy(a:islocal) + " call Decho("remove",'~'.expand("")) + for fname in mflist + let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') + let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1) + endfor + unlet mflist endif " ------- " cleanup " ------- -" call Decho("cleanup",'~'.expand("")) + " call Decho("cleanup",'~'.expand("")) " remove markings from local buffer call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer " refresh buffers if !s:netrwmftgt_islocal -" call Decho("refresh netrwmftgt<".s:netrwmftgt.">",'~'.expand("")) - NetrwKeepj call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt) + " call Decho("refresh netrwmftgt<".s:netrwmftgt.">",'~'.expand("")) + NetrwKeepj call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt) endif if a:islocal -" call Decho("refresh b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("")) - NetrwKeepj call s:NetrwRefreshDir(a:islocal,b:netrw_curdir) + " call Decho("refresh b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("")) + NetrwKeepj call s:NetrwRefreshDir(a:islocal,b:netrw_curdir) endif if g:netrw_fastbrowse <= 1 -" call Decho("since g:netrw_fastbrowse=".g:netrw_fastbrowse.", perform shell cmd refresh",'~'.expand("")) - NetrwKeepj call s:LocalBrowseRefresh() + " call Decho("since g:netrw_fastbrowse=".g:netrw_fastbrowse.", perform shell cmd refresh",'~'.expand("")) + NetrwKeepj call s:LocalBrowseRefresh() endif -" call Dret("s:NetrwMarkFileMove") + " call Dret("s:NetrwMarkFileMove") endfun " --------------------------------------------------------------------- " s:NetrwMarkFilePrint: (invoked by mp) This function prints marked files {{{2 " using the hardcopy command. Local marked-file list only. fun! s:NetrwMarkFilePrint(islocal) -" call Dfunc("s:NetrwMarkFilePrint(islocal=".a:islocal.")") + " call Dfunc("s:NetrwMarkFilePrint(islocal=".a:islocal.")") let curbufnr= bufnr("%") " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) -" call Dret("s:NetrwMarkFilePrint") - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + " call Dret("s:NetrwMarkFilePrint") + return endif -" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) + " call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) let curdir= s:NetrwGetCurdir(a:islocal) if exists("s:netrwmarkfilelist_{curbufnr}") - let netrwmarkfilelist = s:netrwmarkfilelist_{curbufnr} - call s:NetrwUnmarkList(curbufnr,curdir) - for fname in netrwmarkfilelist - if a:islocal - if g:netrw_keepdir - let fname= s:ComposePath(curdir,fname) - endif - else - let fname= curdir.fname - endif - 1split - " the autocmds will handle both local and remote files -" call Decho("exe sil e ".escape(fname,' '),'~'.expand("")) - exe "sil NetrwKeepj e ".fnameescape(fname) -" call Decho("hardcopy",'~'.expand("")) - hardcopy - q - endfor - 2match none + let netrwmarkfilelist = s:netrwmarkfilelist_{curbufnr} + call s:NetrwUnmarkList(curbufnr,curdir) + for fname in netrwmarkfilelist + if a:islocal + if g:netrw_keepdir + let fname= s:ComposePath(curdir,fname) + endif + else + let fname= curdir.fname + endif + 1split + " the autocmds will handle both local and remote files + " call Decho("exe sil e ".escape(fname,' '),'~'.expand("")) + exe "sil NetrwKeepj e ".fnameescape(fname) + " call Decho("hardcopy",'~'.expand("")) + hardcopy + q + endfor + 2match none endif -" call Dret("s:NetrwMarkFilePrint") + " call Dret("s:NetrwMarkFilePrint") endfun " --------------------------------------------------------------------- @@ -7405,7 +7444,7 @@ endfun " files when given a regexp (for which a prompt is " issued) (matches to name of files). fun! s:NetrwMarkFileRegexp(islocal) -" call Dfunc("s:NetrwMarkFileRegexp(islocal=".a:islocal.")") + " call Dfunc("s:NetrwMarkFileRegexp(islocal=".a:islocal.")") " get the regular expression call inputsave() @@ -7413,112 +7452,112 @@ fun! s:NetrwMarkFileRegexp(islocal) call inputrestore() if a:islocal - let curdir= s:NetrwGetCurdir(a:islocal) -" call Decho("curdir<".fnameescape(curdir).">") - " get the matching list of files using local glob() -" call Decho("handle local regexp",'~'.expand("")) - let dirname = escape(b:netrw_curdir,g:netrw_glob_escape) - if v:version > 704 || (v:version == 704 && has("patch656")) - let filelist= glob(s:ComposePath(dirname,regexp),0,1,1) - else - let files = glob(s:ComposePath(dirname,regexp),0,0) - let filelist= split(files,"\n") - endif -" call Decho("files<".string(filelist).">",'~'.expand("")) - - " mark the list of files - for fname in filelist - if fname =~ '^'.fnameescape(curdir) -" call Decho("fname<".substitute(fname,'^'.fnameescape(curdir).'/','','').">",'~'.expand("")) - NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^'.fnameescape(curdir).'/','','')) - else -" call Decho("fname<".fname.">",'~'.expand("")) - NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^.*/','','')) - endif - endfor + let curdir= s:NetrwGetCurdir(a:islocal) + " call Decho("curdir<".fnameescape(curdir).">") + " get the matching list of files using local glob() + " call Decho("handle local regexp",'~'.expand("")) + let dirname = escape(b:netrw_curdir,g:netrw_glob_escape) + if v:version > 704 || (v:version == 704 && has("patch656")) + let filelist= glob(s:ComposePath(dirname,regexp),0,1,1) + else + let files = glob(s:ComposePath(dirname,regexp),0,0) + let filelist= split(files,"\n") + endif + " call Decho("files<".string(filelist).">",'~'.expand("")) + + " mark the list of files + for fname in filelist + if fname =~ '^'.fnameescape(curdir) + " call Decho("fname<".substitute(fname,'^'.fnameescape(curdir).'/','','').">",'~'.expand("")) + NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^'.fnameescape(curdir).'/','','')) + else + " call Decho("fname<".fname.">",'~'.expand("")) + NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^.*/','','')) + endif + endfor else -" call Decho("handle remote regexp",'~'.expand("")) - - " convert displayed listing into a filelist - let eikeep = &ei - let areg = @a - sil NetrwKeepj %y a - setl ei=all ma -" call Decho("setl ei=all ma",'~'.expand("")) - 1split - NetrwKeepj call s:NetrwEnew() - NetrwKeepj call s:NetrwOptionsSafe(a:islocal) - sil NetrwKeepj norm! "ap - NetrwKeepj 2 - let bannercnt= search('^" =====','W') - exe "sil NetrwKeepj 1,".bannercnt."d" - setl bt=nofile - if g:netrw_liststyle == s:LONGLIST - sil NetrwKeepj %s/\s\{2,}\S.*$//e - call histdel("/",-1) - elseif g:netrw_liststyle == s:WIDELIST - sil NetrwKeepj %s/\s\{2,}/\r/ge - call histdel("/",-1) - elseif g:netrw_liststyle == s:TREELIST - exe 'sil NetrwKeepj %s/^'.s:treedepthstring.' //e' - sil! NetrwKeepj g/^ .*$/d - call histdel("/",-1) + " call Decho("handle remote regexp",'~'.expand("")) + + " convert displayed listing into a filelist + let eikeep = &ei + let areg = @a + sil NetrwKeepj %y a + setl ei=all ma + " call Decho("setl ei=all ma",'~'.expand("")) + 1split + NetrwKeepj call s:NetrwEnew() + NetrwKeepj call s:NetrwOptionsSafe(a:islocal) + sil NetrwKeepj norm! "ap + NetrwKeepj 2 + let bannercnt= search('^" =====','W') + exe "sil NetrwKeepj 1,".bannercnt."d" + setl bt=nofile + if g:netrw_liststyle == s:LONGLIST + sil NetrwKeepj %s/\s\{2,}\S.*$//e + call histdel("/",-1) + elseif g:netrw_liststyle == s:WIDELIST + sil NetrwKeepj %s/\s\{2,}/\r/ge + call histdel("/",-1) + elseif g:netrw_liststyle == s:TREELIST + exe 'sil NetrwKeepj %s/^'.s:treedepthstring.' //e' + sil! NetrwKeepj g/^ .*$/d + call histdel("/",-1) + call histdel("/",-1) + endif + " convert regexp into the more usual glob-style format + let regexp= substitute(regexp,'\*','.*','g') + " call Decho("regexp<".regexp.">",'~'.expand("")) + exe "sil! NetrwKeepj v/".escape(regexp,'/')."/d" call histdel("/",-1) - endif - " convert regexp into the more usual glob-style format - let regexp= substitute(regexp,'\*','.*','g') -" call Decho("regexp<".regexp.">",'~'.expand("")) - exe "sil! NetrwKeepj v/".escape(regexp,'/')."/d" - call histdel("/",-1) - let filelist= getline(1,line("$")) - q! - for filename in filelist - NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(filename,'^.*/','','')) - endfor - unlet filelist - let @a = areg - let &ei = eikeep + let filelist= getline(1,line("$")) + q! + for filename in filelist + NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(filename,'^.*/','','')) + endfor + unlet filelist + let @a = areg + let &ei = eikeep endif echo " (use me to edit marked files)" -" call Dret("s:NetrwMarkFileRegexp") + " call Dret("s:NetrwMarkFileRegexp") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileSource: (invoked by ms) This function sources marked files {{{2 " Uses the local marked file list. fun! s:NetrwMarkFileSource(islocal) -" call Dfunc("s:NetrwMarkFileSource(islocal=".a:islocal.")") + " call Dfunc("s:NetrwMarkFileSource(islocal=".a:islocal.")") let curbufnr= bufnr("%") " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) -" call Dret("s:NetrwMarkFileSource") - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + " call Dret("s:NetrwMarkFileSource") + return endif -" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) + " call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("")) let curdir= s:NetrwGetCurdir(a:islocal) if exists("s:netrwmarkfilelist_{curbufnr}") - let netrwmarkfilelist = s:netrwmarkfilelist_{bufnr("%")} - call s:NetrwUnmarkList(curbufnr,curdir) - for fname in netrwmarkfilelist - if a:islocal - if g:netrw_keepdir - let fname= s:ComposePath(curdir,fname) - endif - else - let fname= curdir.fname - endif - " the autocmds will handle sourcing both local and remote files -" call Decho("exe so ".fnameescape(fname),'~'.expand("")) - exe "so ".fnameescape(fname) - endfor - 2match none + let netrwmarkfilelist = s:netrwmarkfilelist_{bufnr("%")} + call s:NetrwUnmarkList(curbufnr,curdir) + for fname in netrwmarkfilelist + if a:islocal + if g:netrw_keepdir + let fname= s:ComposePath(curdir,fname) + endif + else + let fname= curdir.fname + endif + " the autocmds will handle sourcing both local and remote files + " call Decho("exe so ".fnameescape(fname),'~'.expand("")) + exe "so ".fnameescape(fname) + endfor + 2match none endif -" call Dret("s:NetrwMarkFileSource") + " call Dret("s:NetrwMarkFileSource") endfun " --------------------------------------------------------------------- @@ -7531,35 +7570,35 @@ fun! s:NetrwMarkFileTag(islocal) " sanity check if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr}) - NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) - return + NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + return endif if exists("s:netrwmarkfilelist") - let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "s:ShellEscape(v:val,".!a:islocal.")")) - call s:NetrwUnmarkAll() + let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "s:ShellEscape(v:val,".!a:islocal.")")) + call s:NetrwUnmarkAll() - if a:islocal + if a:islocal - call system(g:netrw_ctags." ".netrwmarkfilelist) - if v:shell_error - call netrw#ErrorMsg(s:ERROR,"g:netrw_ctags<".g:netrw_ctags."> is not executable!",51) - endif + call system(g:netrw_ctags." ".netrwmarkfilelist) + if v:shell_error + call netrw#ErrorMsg(s:ERROR,"g:netrw_ctags<".g:netrw_ctags."> is not executable!",51) + endif - else - let cmd = s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist) - call netrw#Obtain(a:islocal,"tags") - let curdir= b:netrw_curdir - 1split - NetrwKeepj e tags - let path= substitute(curdir,'^\(.*\)/[^/]*$','\1/','') - exe 'NetrwKeepj %s/\t\(\S\+\)\t/\t'.escape(path,"/\n\r\\").'\1\t/e' - call histdel("/",-1) - wq! - endif - 2match none - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - call winrestview(svpos) + else + let cmd = s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist) + call netrw#Obtain(a:islocal,"tags") + let curdir= b:netrw_curdir + 1split + NetrwKeepj e tags + let path= substitute(curdir,'^\(.*\)/[^/]*$','\1/','') + exe 'NetrwKeepj %s/\t\(\S\+\)\t/\t'.escape(path,"/\n\r\\").'\1\t/e' + call histdel("/",-1) + wq! + endif + 2match none + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + call winrestview(svpos) endif endfun @@ -7574,141 +7613,141 @@ fun! s:NetrwMarkFileTgt(islocal) let curdir = s:NetrwGetCurdir(a:islocal) let hadtgt = exists("s:netrwmftgt") if !exists("w:netrw_bannercnt") - let w:netrw_bannercnt= b:netrw_bannercnt + let w:netrw_bannercnt= b:netrw_bannercnt endif " set up target if line(".") < w:netrw_bannercnt - " if cursor in banner region, use b:netrw_curdir for the target unless its already the target - if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") && s:netrwmftgt == b:netrw_curdir - unlet s:netrwmftgt s:netrwmftgt_islocal - if g:netrw_fastbrowse <= 1 - call s:LocalBrowseRefresh() + " if cursor in banner region, use b:netrw_curdir for the target unless its already the target + if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") && s:netrwmftgt == b:netrw_curdir + unlet s:netrwmftgt s:netrwmftgt_islocal + if g:netrw_fastbrowse <= 1 + call s:LocalBrowseRefresh() + endif + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + call winrestview(svpos) + return + else + let s:netrwmftgt= b:netrw_curdir + endif + + else + " get word under cursor. + " * If directory, use it for the target. + " * If file, use b:netrw_curdir for the target + let curword= s:NetrwGetWord() + let tgtdir = s:ComposePath(curdir,curword) + if a:islocal && isdirectory(s:NetrwFile(tgtdir)) + let s:netrwmftgt = tgtdir + elseif !a:islocal && tgtdir =~ '/$' + let s:netrwmftgt = tgtdir + else + let s:netrwmftgt = curdir endif - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - call winrestview(svpos) - return - else - let s:netrwmftgt= b:netrw_curdir - endif - - else - " get word under cursor. - " * If directory, use it for the target. - " * If file, use b:netrw_curdir for the target - let curword= s:NetrwGetWord() - let tgtdir = s:ComposePath(curdir,curword) - if a:islocal && isdirectory(s:NetrwFile(tgtdir)) - let s:netrwmftgt = tgtdir - elseif !a:islocal && tgtdir =~ '/$' - let s:netrwmftgt = tgtdir - else - let s:netrwmftgt = curdir - endif endif if a:islocal - " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) - let s:netrwmftgt= simplify(s:netrwmftgt) + " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) + let s:netrwmftgt= simplify(s:netrwmftgt) endif if g:netrw_cygwin - let s:netrwmftgt= substitute(system("cygpath ".s:ShellEscape(s:netrwmftgt)),'\n$','','') - let s:netrwmftgt= substitute(s:netrwmftgt,'\n$','','') + let s:netrwmftgt= substitute(system("cygpath ".s:ShellEscape(s:netrwmftgt)),'\n$','','') + let s:netrwmftgt= substitute(s:netrwmftgt,'\n$','','') endif let s:netrwmftgt_islocal= a:islocal " need to do refresh so that the banner will be updated " s:LocalBrowseRefresh handles all local-browsing buffers when not fast browsing if g:netrw_fastbrowse <= 1 - call s:LocalBrowseRefresh() + call s:LocalBrowseRefresh() endif -" call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + " call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,w:netrw_treetop,0)) + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,w:netrw_treetop,0)) else - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) endif call winrestview(svpos) if !hadtgt - sil! NetrwKeepj norm! j + sil! NetrwKeepj norm! j endif endfun " --------------------------------------------------------------------- " s:NetrwGetCurdir: gets current directory and sets up b:netrw_curdir if necessary {{{2 fun! s:NetrwGetCurdir(islocal) -" call Dfunc("s:NetrwGetCurdir(islocal=".a:islocal.")") + " call Dfunc("s:NetrwGetCurdir(islocal=".a:islocal.")") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - let b:netrw_curdir = s:NetrwTreePath(w:netrw_treetop) -" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used s:NetrwTreeDir)",'~'.expand("")) + let b:netrw_curdir = s:NetrwTreePath(w:netrw_treetop) + " call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used s:NetrwTreeDir)",'~'.expand("")) elseif !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() -" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)",'~'.expand("")) + let b:netrw_curdir= getcwd() + " call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)",'~'.expand("")) endif -" call Decho("b:netrw_curdir<".b:netrw_curdir."> ".((b:netrw_curdir !~ '\<\a\{3,}://')? "does not match" : "matches")." url pattern",'~'.expand("")) + " call Decho("b:netrw_curdir<".b:netrw_curdir."> ".((b:netrw_curdir !~ '\<\a\{3,}://')? "does not match" : "matches")." url pattern",'~'.expand("")) if b:netrw_curdir !~ '\<\a\{3,}://' - let curdir= b:netrw_curdir -" call Decho("g:netrw_keepdir=".g:netrw_keepdir,'~'.expand("")) - if g:netrw_keepdir == 0 - call s:NetrwLcd(curdir) - endif + let curdir= b:netrw_curdir + " call Decho("g:netrw_keepdir=".g:netrw_keepdir,'~'.expand("")) + if g:netrw_keepdir == 0 + call s:NetrwLcd(curdir) + endif endif -" call Dret("s:NetrwGetCurdir <".curdir.">") + " call Dret("s:NetrwGetCurdir <".curdir.">") return b:netrw_curdir endfun " --------------------------------------------------------------------- " s:NetrwOpenFile: query user for a filename and open it {{{2 fun! s:NetrwOpenFile(islocal) -" call Dfunc("s:NetrwOpenFile(islocal=".a:islocal.")") + " call Dfunc("s:NetrwOpenFile(islocal=".a:islocal.")") let ykeep= @@ call inputsave() let fname= input("Enter filename: ") call inputrestore() -" call Decho("(s:NetrwOpenFile) fname<".fname.">",'~'.expand("")) + " call Decho("(s:NetrwOpenFile) fname<".fname.">",'~'.expand("")) " determine if Lexplore is in use if exists("t:netrw_lexbufnr") - " check if t:netrw_lexbufnr refers to a netrw window -" call Decho("(s:netrwOpenFile) ..t:netrw_lexbufnr=".t:netrw_lexbufnr,'~'.expand("")) - let lexwinnr = bufwinnr(t:netrw_lexbufnr) - if lexwinnr != -1 && exists("g:netrw_chgwin") && g:netrw_chgwin != -1 -" call Decho("(s:netrwOpenFile) ..Lexplore in use",'~'.expand("")) - exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w" - exe "NetrwKeepj e ".fnameescape(fname) - let @@= ykeep -" call Dret("s:NetrwOpenFile : creating a file with Lexplore mode") - endif + " check if t:netrw_lexbufnr refers to a netrw window + " call Decho("(s:netrwOpenFile) ..t:netrw_lexbufnr=".t:netrw_lexbufnr,'~'.expand("")) + let lexwinnr = bufwinnr(t:netrw_lexbufnr) + if lexwinnr != -1 && exists("g:netrw_chgwin") && g:netrw_chgwin != -1 + " call Decho("(s:netrwOpenFile) ..Lexplore in use",'~'.expand("")) + exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w" + exe "NetrwKeepj e ".fnameescape(fname) + let @@= ykeep + " call Dret("s:NetrwOpenFile : creating a file with Lexplore mode") + endif endif " Does the filename contain a path? if fname !~ '[/\\]' - if exists("b:netrw_curdir") - if exists("g:netrw_quiet") - let netrw_quiet_keep = g:netrw_quiet - endif - let g:netrw_quiet = 1 - " save position for benefit of Rexplore - let s:rexposn_{bufnr("%")}= winsaveview() -" call Decho("saving posn to s:rexposn_".bufnr("%")."<".string(s:rexposn_{bufnr("%")}).">",'~'.expand("")) - if b:netrw_curdir =~ '/$' - exe "NetrwKeepj e ".fnameescape(b:netrw_curdir.fname) - else - exe "e ".fnameescape(b:netrw_curdir."/".fname) - endif - if exists("netrw_quiet_keep") - let g:netrw_quiet= netrw_quiet_keep - else - unlet g:netrw_quiet + if exists("b:netrw_curdir") + if exists("g:netrw_quiet") + let netrw_quiet_keep = g:netrw_quiet + endif + let g:netrw_quiet = 1 + " save position for benefit of Rexplore + let s:rexposn_{bufnr("%")}= winsaveview() + " call Decho("saving posn to s:rexposn_".bufnr("%")."<".string(s:rexposn_{bufnr("%")}).">",'~'.expand("")) + if b:netrw_curdir =~ '/$' + exe "NetrwKeepj e ".fnameescape(b:netrw_curdir.fname) + else + exe "e ".fnameescape(b:netrw_curdir."/".fname) + endif + if exists("netrw_quiet_keep") + let g:netrw_quiet= netrw_quiet_keep + else + unlet g:netrw_quiet + endif endif - endif else - exe "NetrwKeepj e ".fnameescape(fname) + exe "NetrwKeepj e ".fnameescape(fname) endif let @@= ykeep -" call Dret("s:NetrwOpenFile") + " call Dret("s:NetrwOpenFile") endfun " --------------------------------------------------------------------- @@ -7717,48 +7756,48 @@ endfun " netrwPlugin, you'll need to have had " g:netrw_usetab set to non-zero. fun! netrw#Shrink() -" call Dfunc("netrw#Shrink() ft<".&ft."> winwidth=".winwidth(0)." lexbuf#".((exists("t:netrw_lexbufnr"))? t:netrw_lexbufnr : 'n/a')) + " call Dfunc("netrw#Shrink() ft<".&ft."> winwidth=".winwidth(0)." lexbuf#".((exists("t:netrw_lexbufnr"))? t:netrw_lexbufnr : 'n/a')) let curwin = winnr() let wiwkeep = &wiw set wiw=1 if &ft == "netrw" - if winwidth(0) > g:netrw_wiw - let t:netrw_winwidth= winwidth(0) - exe "vert resize ".g:netrw_wiw - wincmd l - if winnr() == curwin - wincmd h - endif -" call Decho("vert resize 0",'~'.expand("")) - else - exe "vert resize ".t:netrw_winwidth -" call Decho("vert resize ".t:netrw_winwidth,'~'.expand("")) - endif + if winwidth(0) > g:netrw_wiw + let t:netrw_winwidth= winwidth(0) + exe "vert resize ".g:netrw_wiw + wincmd l + if winnr() == curwin + wincmd h + endif + " call Decho("vert resize 0",'~'.expand("")) + else + exe "vert resize ".t:netrw_winwidth + " call Decho("vert resize ".t:netrw_winwidth,'~'.expand("")) + endif elseif exists("t:netrw_lexbufnr") - exe bufwinnr(t:netrw_lexbufnr)."wincmd w" - if winwidth(bufwinnr(t:netrw_lexbufnr)) > g:netrw_wiw - let t:netrw_winwidth= winwidth(0) - exe "vert resize ".g:netrw_wiw - wincmd l - if winnr() == curwin - wincmd h - endif -" call Decho("vert resize 0",'~'.expand("")) - elseif winwidth(bufwinnr(t:netrw_lexbufnr)) >= 0 - exe "vert resize ".t:netrw_winwidth -" call Decho("vert resize ".t:netrw_winwidth,'~'.expand("")) - else - call netrw#Lexplore(0,0) - endif + exe bufwinnr(t:netrw_lexbufnr)."wincmd w" + if winwidth(bufwinnr(t:netrw_lexbufnr)) > g:netrw_wiw + let t:netrw_winwidth= winwidth(0) + exe "vert resize ".g:netrw_wiw + wincmd l + if winnr() == curwin + wincmd h + endif + " call Decho("vert resize 0",'~'.expand("")) + elseif winwidth(bufwinnr(t:netrw_lexbufnr)) >= 0 + exe "vert resize ".t:netrw_winwidth + " call Decho("vert resize ".t:netrw_winwidth,'~'.expand("")) + else + call netrw#Lexplore(0,0) + endif else - call netrw#Lexplore(0,0) + call netrw#Lexplore(0,0) endif let wiw= wiwkeep -" call Dret("netrw#Shrink") + " call Dret("netrw#Shrink") endfun " --------------------------------------------------------------------- @@ -7782,45 +7821,45 @@ endfun " User access provided by the mapping. (see :help netrw-mF) " Used by many MarkFile functions. fun! s:NetrwUnmarkList(curbufnr,curdir) -" call Dfunc("s:NetrwUnmarkList(curbufnr=".a:curbufnr." curdir<".a:curdir.">)") + " call Dfunc("s:NetrwUnmarkList(curbufnr=".a:curbufnr." curdir<".a:curdir.">)") " remove all files in local marked-file list from global list if exists("s:netrwmarkfilelist") - for mfile in s:netrwmarkfilelist_{a:curbufnr} - let dfile = s:ComposePath(a:curdir,mfile) " prepend directory to mfile - let idx = index(s:netrwmarkfilelist,dfile) " get index in list of dfile - call remove(s:netrwmarkfilelist,idx) " remove from global list - endfor - if s:netrwmarkfilelist == [] - unlet s:netrwmarkfilelist - endif + for mfile in s:netrwmarkfilelist_{a:curbufnr} + let dfile = s:ComposePath(a:curdir,mfile) " prepend directory to mfile + let idx = index(s:netrwmarkfilelist,dfile) " get index in list of dfile + call remove(s:netrwmarkfilelist,idx) " remove from global list + endfor + if s:netrwmarkfilelist == [] + unlet s:netrwmarkfilelist + endif - " getting rid of the local marked-file lists is easy - unlet s:netrwmarkfilelist_{a:curbufnr} + " getting rid of the local marked-file lists is easy + unlet s:netrwmarkfilelist_{a:curbufnr} endif if exists("s:netrwmarkfilemtch_{a:curbufnr}") - unlet s:netrwmarkfilemtch_{a:curbufnr} + unlet s:netrwmarkfilemtch_{a:curbufnr} endif 2match none -" call Dret("s:NetrwUnmarkList") + " call Dret("s:NetrwUnmarkList") endfun " --------------------------------------------------------------------- " s:NetrwUnmarkAll: remove the global marked file list and all local ones {{{2 fun! s:NetrwUnmarkAll() -" call Dfunc("s:NetrwUnmarkAll()") + " call Dfunc("s:NetrwUnmarkAll()") if exists("s:netrwmarkfilelist") - unlet s:netrwmarkfilelist + unlet s:netrwmarkfilelist endif sil call s:NetrwUnmarkAll2() 2match none -" call Dret("s:NetrwUnmarkAll") + " call Dret("s:NetrwUnmarkAll") endfun " --------------------------------------------------------------------- " s:NetrwUnmarkAll2: unmark all files from all buffers {{{2 fun! s:NetrwUnmarkAll2() -" call Dfunc("s:NetrwUnmarkAll2()") + " call Dfunc("s:NetrwUnmarkAll2()") redir => netrwmarkfilelist_let let redir END @@ -7828,11 +7867,11 @@ fun! s:NetrwUnmarkAll2() call filter(netrwmarkfilelist_list,"v:val =~ '^s:netrwmarkfilelist_'") " retain only those vars that start as s:netrwmarkfilelist_ call map(netrwmarkfilelist_list,"substitute(v:val,'\\s.*$','','')") " remove what the entries are equal to for flist in netrwmarkfilelist_list - let curbufnr= substitute(flist,'s:netrwmarkfilelist_','','') - unlet s:netrwmarkfilelist_{curbufnr} - unlet s:netrwmarkfilemtch_{curbufnr} + let curbufnr= substitute(flist,'s:netrwmarkfilelist_','','') + unlet s:netrwmarkfilelist_{curbufnr} + unlet s:netrwmarkfilemtch_{curbufnr} endfor -" call Dret("s:NetrwUnmarkAll2") + " call Dret("s:NetrwUnmarkAll2") endfun " --------------------------------------------------------------------- @@ -7851,22 +7890,22 @@ fun! s:NetrwUnMarkFile(islocal) " unmark marked file list " (although I expect s:NetrwUpload() to do it, I'm just making sure) if exists("s:netrwmarkfilelist") -" " call Decho("unlet'ing: s:netrwmarkfilelist",'~'.expand("")) - unlet s:netrwmarkfilelist + " " call Decho("unlet'ing: s:netrwmarkfilelist",'~'.expand("")) + unlet s:netrwmarkfilelist endif let ibuf= 1 while ibuf < bufnr("$") - if exists("s:netrwmarkfilelist_".ibuf) - unlet s:netrwmarkfilelist_{ibuf} - unlet s:netrwmarkfilemtch_{ibuf} - endif - let ibuf = ibuf + 1 + if exists("s:netrwmarkfilelist_".ibuf) + unlet s:netrwmarkfilelist_{ibuf} + unlet s:netrwmarkfilemtch_{ibuf} + endif + let ibuf = ibuf + 1 endwhile 2match none -" call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) -call winrestview(svpos) + " call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + call winrestview(svpos) endfun " --------------------------------------------------------------------- @@ -7874,101 +7913,101 @@ endfun fun! s:NetrwMenu(domenu) if !exists("g:NetrwMenuPriority") - let g:NetrwMenuPriority= 80 + let g:NetrwMenuPriority= 80 endif if has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu -" call Dfunc("NetrwMenu(domenu=".a:domenu.")") - - if !exists("s:netrw_menu_enabled") && a:domenu -" call Decho("initialize menu",'~'.expand("")) - let s:netrw_menu_enabled= 1 - exe 'sil! menu '.g:NetrwMenuPriority.'.1 '.g:NetrwTopLvlMenu.'Help ' - exe 'sil! menu '.g:NetrwMenuPriority.'.5 '.g:NetrwTopLvlMenu.'-Sep1- :' - exe 'sil! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory- -' - exe 'sil! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewerx x' - if g:netrw_dirhistmax > 0 - exe 'sil! menu '.g:NetrwMenuPriority.'.8.1 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Current\ Directorymb mb' - exe 'sil! menu '.g:NetrwMenuPriority.'.8.4 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)u u' - exe 'sil! menu '.g:NetrwMenuPriority.'.8.5 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)U U' - exe 'sil! menu '.g:NetrwMenuPriority.'.8.6 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Listqb qb' - else - exe 'sil! menu '.g:NetrwMenuPriority.'.8 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History :echo "(disabled)"'."\" - endif - exe 'sil! menu '.g:NetrwMenuPriority.'.9.1 '.g:NetrwTopLvlMenu.'Browsing\ Control.Horizontal\ Splito o' - exe 'sil! menu '.g:NetrwMenuPriority.'.9.2 '.g:NetrwTopLvlMenu.'Browsing\ Control.Vertical\ Splitv v' - exe 'sil! menu '.g:NetrwMenuPriority.'.9.3 '.g:NetrwTopLvlMenu.'Browsing\ Control.New\ Tabt t' - exe 'sil! menu '.g:NetrwMenuPriority.'.9.4 '.g:NetrwTopLvlMenu.'Browsing\ Control.Previewp p' - exe 'sil! menu '.g:NetrwMenuPriority.'.9.5 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ File\ Hiding\ List'." \'" - exe 'sil! menu '.g:NetrwMenuPriority.'.9.6 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ Sorting\ SequenceS S' - exe 'sil! menu '.g:NetrwMenuPriority.'.9.7 '.g:NetrwTopLvlMenu.'Browsing\ Control.Quick\ Hide/Unhide\ Dot\ Files'."gh gh" - exe 'sil! menu '.g:NetrwMenuPriority.'.9.8 '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing'." \" - exe 'sil! menu '.g:NetrwMenuPriority.'.9.9 '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options:NetrwSettings '.":NetrwSettings\" - exe 'sil! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/DirectoryD D' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Create\ New\ File% %' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Current\ Window '."\" - exe 'sil! menu '.g:NetrwMenuPriority.'.11.2 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Preview\ File/Directoryp p' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.3 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Previous\ WindowP P' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.4 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Windowo o' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Tabt t' - exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Vertical\ Windowv v' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.1 '.g:NetrwTopLvlMenu.'Explore.Directory\ Name :Explore ' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (curdir\ only):Explore\ */ :Explore */' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (+subdirs):Explore\ **/ :Explore **/' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.3 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (curdir\ only):Explore\ *// :Explore *//' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (+subdirs):Explore\ **// :Explore **//' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Next\ Match:Nexplore :Nexplore' - exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Prev\ Match:Pexplore :Pexplore' - exe 'sil! menu '.g:NetrwMenuPriority.'.13 '.g:NetrwTopLvlMenu.'Make\ Subdirectoryd d' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.1 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Filemf mf' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.2 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Files\ by\ Regexpmr mr' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.3 '.g:NetrwTopLvlMenu.'Marked\ Files.Hide-Show-List\ Controla a' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.4 '.g:NetrwTopLvlMenu.'Marked\ Files.Copy\ To\ Targetmc mc' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.5 '.g:NetrwTopLvlMenu.'Marked\ Files.DeleteD D' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.6 '.g:NetrwTopLvlMenu.'Marked\ Files.Diffmd md' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.7 '.g:NetrwTopLvlMenu.'Marked\ Files.Editme me' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmdmx mx' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Targetmm mm' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.ObtainO O' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Printmp mp' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.ReplaceR R' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Targetmt mt' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.TagmT mT' - exe 'sil! menu '.g:NetrwMenuPriority.'.14.15 '.g:NetrwTopLvlMenu.'Marked\ Files.Zip/Unzip/Compress/Uncompressmz mz' - exe 'sil! menu '.g:NetrwMenuPriority.'.15 '.g:NetrwTopLvlMenu.'Obtain\ FileO O' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.thini :let w:netrw_liststyle=0' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.longi :let w:netrw_liststyle=1' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.widei :let w:netrw_liststyle=2' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.treei :let w:netrw_liststyle=3' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.1 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Show\ Alla :let g:netrw_hide=0' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.3 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Normala :let g:netrw_hide=1' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.2 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Hidden\ Onlya :let g:netrw_hide=2' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.3 '.g:NetrwTopLvlMenu.'Style.Reverse\ Sorting\ Order'."r r" - exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.1 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Names :let g:netrw_sort_by="name"' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.2 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Times :let g:netrw_sort_by="time"' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.3 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Sizes :let g:netrw_sort_by="size"' - exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.3 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Extens :let g:netrw_sort_by="exten"' - exe 'sil! menu '.g:NetrwMenuPriority.'.17 '.g:NetrwTopLvlMenu.'Rename\ File/DirectoryR R' - exe 'sil! menu '.g:NetrwMenuPriority.'.18 '.g:NetrwTopLvlMenu.'Set\ Current\ Directoryc c' - let s:netrw_menucnt= 28 - call s:NetrwBookmarkMenu() " provide some history! uses priorities 2,3, reserves 4, 8.2.x - call s:NetrwTgtMenu() " let bookmarks and history be easy targets - - elseif !a:domenu - let s:netrwcnt = 0 - let curwin = winnr() - windo if getline(2) =~# "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif - exe curwin."wincmd w" - - if s:netrwcnt <= 1 -" call Decho("clear menus",'~'.expand("")) - exe 'sil! unmenu '.g:NetrwTopLvlMenu -" call Decho('exe sil! unmenu '.g:NetrwTopLvlMenu.'*','~'.expand("")) - sil! unlet s:netrw_menu_enabled + " call Dfunc("NetrwMenu(domenu=".a:domenu.")") + + if !exists("s:netrw_menu_enabled") && a:domenu + " call Decho("initialize menu",'~'.expand("")) + let s:netrw_menu_enabled= 1 + exe 'sil! menu '.g:NetrwMenuPriority.'.1 '.g:NetrwTopLvlMenu.'Help ' + exe 'sil! menu '.g:NetrwMenuPriority.'.5 '.g:NetrwTopLvlMenu.'-Sep1- :' + exe 'sil! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory- -' + exe 'sil! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewerx x' + if g:netrw_dirhistmax > 0 + exe 'sil! menu '.g:NetrwMenuPriority.'.8.1 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Current\ Directorymb mb' + exe 'sil! menu '.g:NetrwMenuPriority.'.8.4 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)u u' + exe 'sil! menu '.g:NetrwMenuPriority.'.8.5 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)U U' + exe 'sil! menu '.g:NetrwMenuPriority.'.8.6 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Listqb qb' + else + exe 'sil! menu '.g:NetrwMenuPriority.'.8 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History :echo "(disabled)"'."\" + endif + exe 'sil! menu '.g:NetrwMenuPriority.'.9.1 '.g:NetrwTopLvlMenu.'Browsing\ Control.Horizontal\ Splito o' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.2 '.g:NetrwTopLvlMenu.'Browsing\ Control.Vertical\ Splitv v' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.3 '.g:NetrwTopLvlMenu.'Browsing\ Control.New\ Tabt t' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.4 '.g:NetrwTopLvlMenu.'Browsing\ Control.Previewp p' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.5 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ File\ Hiding\ List'." \'" + exe 'sil! menu '.g:NetrwMenuPriority.'.9.6 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ Sorting\ SequenceS S' + exe 'sil! menu '.g:NetrwMenuPriority.'.9.7 '.g:NetrwTopLvlMenu.'Browsing\ Control.Quick\ Hide/Unhide\ Dot\ Files'."gh gh" + exe 'sil! menu '.g:NetrwMenuPriority.'.9.8 '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing'." \" + exe 'sil! menu '.g:NetrwMenuPriority.'.9.9 '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options:NetrwSettings '.":NetrwSettings\" + exe 'sil! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/DirectoryD D' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Create\ New\ File% %' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Current\ Window '."\" + exe 'sil! menu '.g:NetrwMenuPriority.'.11.2 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Preview\ File/Directoryp p' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.3 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Previous\ WindowP P' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.4 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Windowo o' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Tabt t' + exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Vertical\ Windowv v' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.1 '.g:NetrwTopLvlMenu.'Explore.Directory\ Name :Explore ' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (curdir\ only):Explore\ */ :Explore */' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (+subdirs):Explore\ **/ :Explore **/' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.3 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (curdir\ only):Explore\ *// :Explore *//' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (+subdirs):Explore\ **// :Explore **//' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Next\ Match:Nexplore :Nexplore' + exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Prev\ Match:Pexplore :Pexplore' + exe 'sil! menu '.g:NetrwMenuPriority.'.13 '.g:NetrwTopLvlMenu.'Make\ Subdirectoryd d' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.1 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Filemf mf' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.2 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Files\ by\ Regexpmr mr' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.3 '.g:NetrwTopLvlMenu.'Marked\ Files.Hide-Show-List\ Controla a' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.4 '.g:NetrwTopLvlMenu.'Marked\ Files.Copy\ To\ Targetmc mc' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.5 '.g:NetrwTopLvlMenu.'Marked\ Files.DeleteD D' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.6 '.g:NetrwTopLvlMenu.'Marked\ Files.Diffmd md' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.7 '.g:NetrwTopLvlMenu.'Marked\ Files.Editme me' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmdmx mx' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Targetmm mm' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.ObtainO O' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Printmp mp' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.ReplaceR R' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Targetmt mt' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.TagmT mT' + exe 'sil! menu '.g:NetrwMenuPriority.'.14.15 '.g:NetrwTopLvlMenu.'Marked\ Files.Zip/Unzip/Compress/Uncompressmz mz' + exe 'sil! menu '.g:NetrwMenuPriority.'.15 '.g:NetrwTopLvlMenu.'Obtain\ FileO O' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.thini :let w:netrw_liststyle=0' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.longi :let w:netrw_liststyle=1' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.widei :let w:netrw_liststyle=2' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.treei :let w:netrw_liststyle=3' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.1 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Show\ Alla :let g:netrw_hide=0' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.3 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Normala :let g:netrw_hide=1' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.2 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Hidden\ Onlya :let g:netrw_hide=2' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.3 '.g:NetrwTopLvlMenu.'Style.Reverse\ Sorting\ Order'."r r" + exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.1 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Names :let g:netrw_sort_by="name"' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.2 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Times :let g:netrw_sort_by="time"' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.3 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Sizes :let g:netrw_sort_by="size"' + exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.3 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Extens :let g:netrw_sort_by="exten"' + exe 'sil! menu '.g:NetrwMenuPriority.'.17 '.g:NetrwTopLvlMenu.'Rename\ File/DirectoryR R' + exe 'sil! menu '.g:NetrwMenuPriority.'.18 '.g:NetrwTopLvlMenu.'Set\ Current\ Directoryc c' + let s:netrw_menucnt= 28 + call s:NetrwBookmarkMenu() " provide some history! uses priorities 2,3, reserves 4, 8.2.x + call s:NetrwTgtMenu() " let bookmarks and history be easy targets + + elseif !a:domenu + let s:netrwcnt = 0 + let curwin = winnr() + windo if getline(2) =~# "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif + exe curwin."wincmd w" + + if s:netrwcnt <= 1 + " call Decho("clear menus",'~'.expand("")) + exe 'sil! unmenu '.g:NetrwTopLvlMenu + " call Decho('exe sil! unmenu '.g:NetrwTopLvlMenu.'*','~'.expand("")) + sil! unlet s:netrw_menu_enabled + endif endif - endif -" call Dret("NetrwMenu") - return + " call Dret("NetrwMenu") + return endif endfun @@ -7977,19 +8016,19 @@ endfun " s:NetrwObtain: obtain file under cursor or from markfile list {{{2 " Used by the O maps (as NetrwObtain()) fun! s:NetrwObtain(islocal) -" call Dfunc("NetrwObtain(islocal=".a:islocal.")") + " call Dfunc("NetrwObtain(islocal=".a:islocal.")") let ykeep= @@ if exists("s:netrwmarkfilelist_{bufnr('%')}") - let islocal= s:netrwmarkfilelist_{bufnr('%')}[1] !~ '^\a\{3,}://' - call netrw#Obtain(islocal,s:netrwmarkfilelist_{bufnr('%')}) - call s:NetrwUnmarkList(bufnr('%'),b:netrw_curdir) + let islocal= s:netrwmarkfilelist_{bufnr('%')}[1] !~ '^\a\{3,}://' + call netrw#Obtain(islocal,s:netrwmarkfilelist_{bufnr('%')}) + call s:NetrwUnmarkList(bufnr('%'),b:netrw_curdir) else - call netrw#Obtain(a:islocal,s:NetrwGetWord()) + call netrw#Obtain(a:islocal,s:NetrwGetWord()) endif let @@= ykeep -" call Dret("NetrwObtain") + " call Dret("NetrwObtain") endfun " --------------------------------------------------------------------- @@ -8010,99 +8049,99 @@ fun! s:NetrwPrevWinOpen(islocal) let lastwinnr = winnr("$") let curword = s:NetrwGetWord() let choice = 0 - let s:prevwinopen= 1 " lets s:NetrwTreeDir() know that NetrwPrevWinOpen called it (s:NetrwTreeDir() will unlet s:prevwinopen) + let s:prevwinopen= 1 " lets s:NetrwTreeDir() know that NetrwPrevWinOpen called it (s:NetrwTreeDir() will unlet s:prevwinopen) let s:treedir = s:NetrwTreeDir(a:islocal) let curdir = s:treedir let didsplit = 0 if lastwinnr == 1 - " if only one window, open a new one first - " g:netrw_preview=0: preview window shown in a horizontally split window - " g:netrw_preview=1: preview window shown in a vertically split window - if g:netrw_preview - " vertically split preview window - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize - exe (g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s" - else - " horizontally split preview window - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize - exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" - endif - let didsplit = 1 - - else - NetrwKeepj call s:SaveBufVars() - let eikeep= &ei - setl ei=all - wincmd p - - if exists("s:lexplore_win") && s:lexplore_win == winnr() - " whoops -- user trying to open file in the Lexplore window. - " Use Lexplore's opening-file window instead. -" exe g:netrw_chgwin."wincmd w" - wincmd p - call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1)) - endif - - " prevwinnr: the window number of the "prev" window - " prevbufnr: the buffer number of the buffer in the "prev" window - " bnrcnt : the qty of windows open on the "prev" buffer - let prevwinnr = winnr() - let prevbufnr = bufnr("%") - let prevbufname = bufname("%") - let prevmod = &mod - let bnrcnt = 0 - NetrwKeepj call s:RestoreBufVars() - - " if the previous window's buffer has been changed (ie. its modified flag is set), - " and it doesn't appear in any other extant window, then ask the - " user if s/he wants to abandon modifications therein. - if prevmod - windo if winbufnr(0) == prevbufnr | let bnrcnt=bnrcnt+1 | endif - exe prevwinnr."wincmd w" - - if bnrcnt == 1 && &hidden == 0 - " only one copy of the modified buffer in a window, and - " hidden not set, so overwriting will lose the modified file. Ask first... - let choice = confirm("Save modified buffer<".prevbufname."> first?","&Yes\n&No\n&Cancel") - let &ei= eikeep - - if choice == 1 - " Yes -- write file & then browse - let v:errmsg= "" - sil w - if v:errmsg != "" - call netrw#ErrorMsg(s:ERROR,"unable to write <".(exists("prevbufname")? prevbufname : 'n/a').">!",30) - exe origwin."wincmd w" - let &ei = eikeep - let @@ = ykeep - return choice - endif - - elseif choice == 2 - " No -- don't worry about changed file, just browse anyway - echomsg "**note** changes to ".prevbufname." abandoned" - - else - " Cancel -- don't do this - exe origwin."wincmd w" - let &ei= eikeep - let @@ = ykeep - return choice - endif + " if only one window, open a new one first + " g:netrw_preview=0: preview window shown in a horizontally split window + " g:netrw_preview=1: preview window shown in a vertically split window + if g:netrw_preview + " vertically split preview window + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize + exe (g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s" + else + " horizontally split preview window + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize + exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" + endif + let didsplit = 1 + + else + NetrwKeepj call s:SaveBufVars() + let eikeep= &ei + setl ei=all + wincmd p + + if exists("s:lexplore_win") && s:lexplore_win == winnr() + " whoops -- user trying to open file in the Lexplore window. + " Use Lexplore's opening-file window instead. + " exe g:netrw_chgwin."wincmd w" + wincmd p + call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1)) + endif + + " prevwinnr: the window number of the "prev" window + " prevbufnr: the buffer number of the buffer in the "prev" window + " bnrcnt : the qty of windows open on the "prev" buffer + let prevwinnr = winnr() + let prevbufnr = bufnr("%") + let prevbufname = bufname("%") + let prevmod = &mod + let bnrcnt = 0 + NetrwKeepj call s:RestoreBufVars() + + " if the previous window's buffer has been changed (ie. its modified flag is set), + " and it doesn't appear in any other extant window, then ask the + " user if s/he wants to abandon modifications therein. + if prevmod + windo if winbufnr(0) == prevbufnr | let bnrcnt=bnrcnt+1 | endif + exe prevwinnr."wincmd w" + + if bnrcnt == 1 && &hidden == 0 + " only one copy of the modified buffer in a window, and + " hidden not set, so overwriting will lose the modified file. Ask first... + let choice = confirm("Save modified buffer<".prevbufname."> first?","&Yes\n&No\n&Cancel") + let &ei= eikeep + + if choice == 1 + " Yes -- write file & then browse + let v:errmsg= "" + sil w + if v:errmsg != "" + call netrw#ErrorMsg(s:ERROR,"unable to write <".(exists("prevbufname")? prevbufname : 'n/a').">!",30) + exe origwin."wincmd w" + let &ei = eikeep + let @@ = ykeep + return choice + endif + + elseif choice == 2 + " No -- don't worry about changed file, just browse anyway + echomsg "**note** changes to ".prevbufname." abandoned" + + else + " Cancel -- don't do this + exe origwin."wincmd w" + let &ei= eikeep + let @@ = ykeep + return choice + endif + endif endif - endif - let &ei= eikeep + let &ei= eikeep endif " restore b:netrw_curdir (window split/enew may have lost it) let b:netrw_curdir= curdir if a:islocal < 2 - if a:islocal - call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(a:islocal,curword,0)) - else - call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,curword,0)) - endif + if a:islocal + call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(a:islocal,curword,0)) + else + call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,curword,0)) + endif endif let @@= ykeep return choice @@ -8114,296 +8153,296 @@ endfun " call s:NetrwUpload(filename, target) " call s:NetrwUpload(filename, target, fromdirectory) fun! s:NetrwUpload(fname,tgt,...) -" call Dfunc("s:NetrwUpload(fname<".((type(a:fname) == 1)? a:fname : string(a:fname))."> tgt<".a:tgt.">) a:0=".a:0) + " call Dfunc("s:NetrwUpload(fname<".((type(a:fname) == 1)? a:fname : string(a:fname))."> tgt<".a:tgt.">) a:0=".a:0) if a:tgt =~ '^\a\{3,}://' - let tgtdir= substitute(a:tgt,'^\a\{3,}://[^/]\+/\(.\{-}\)$','\1','') + let tgtdir= substitute(a:tgt,'^\a\{3,}://[^/]\+/\(.\{-}\)$','\1','') else - let tgtdir= substitute(a:tgt,'^\(.*\)/[^/]*$','\1','') + let tgtdir= substitute(a:tgt,'^\(.*\)/[^/]*$','\1','') endif -" call Decho("tgtdir<".tgtdir.">",'~'.expand("")) + " call Decho("tgtdir<".tgtdir.">",'~'.expand("")) if a:0 > 0 - let fromdir= a:1 + let fromdir= a:1 else - let fromdir= getcwd() + let fromdir= getcwd() endif -" call Decho("fromdir<".fromdir.">",'~'.expand("")) + " call Decho("fromdir<".fromdir.">",'~'.expand("")) if type(a:fname) == 1 - " handle uploading a single file using NetWrite -" call Decho("handle uploading a single file via NetWrite",'~'.expand("")) - 1split -" call Decho("exe e ".fnameescape(s:NetrwFile(a:fname)),'~'.expand("")) - exe "NetrwKeepj e ".fnameescape(s:NetrwFile(a:fname)) -" call Decho("now locally editing<".expand("%").">, has ".line("$")." lines",'~'.expand("")) - if a:tgt =~ '/$' - let wfname= substitute(a:fname,'^.*/','','') -" call Decho("exe w! ".fnameescape(wfname),'~'.expand("")) - exe "w! ".fnameescape(a:tgt.wfname) - else -" call Decho("writing local->remote: exe w ".fnameescape(a:tgt),'~'.expand("")) - exe "w ".fnameescape(a:tgt) -" call Decho("done writing local->remote",'~'.expand("")) - endif - q! - - elseif type(a:fname) == 3 - " handle uploading a list of files via scp -" call Decho("handle uploading a list of files via scp",'~'.expand("")) - let curdir= getcwd() - if a:tgt =~ '^scp:' - if s:NetrwLcd(fromdir) -" call Dret("s:NetrwUpload : lcd failure") - return - endif - let filelist= deepcopy(s:netrwmarkfilelist_{bufnr('%')}) - let args = join(map(filelist,"s:ShellEscape(v:val, 1)")) - if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".g:netrw_port + " handle uploading a single file using NetWrite + " call Decho("handle uploading a single file via NetWrite",'~'.expand("")) + 1split + " call Decho("exe e ".fnameescape(s:NetrwFile(a:fname)),'~'.expand("")) + exe "NetrwKeepj e ".fnameescape(s:NetrwFile(a:fname)) + " call Decho("now locally editing<".expand("%").">, has ".line("$")." lines",'~'.expand("")) + if a:tgt =~ '/$' + let wfname= substitute(a:fname,'^.*/','','') + " call Decho("exe w! ".fnameescape(wfname),'~'.expand("")) + exe "w! ".fnameescape(a:tgt.wfname) else - let useport= "" - endif - let machine = substitute(a:tgt,'^scp://\([^/:]\+\).*$','\1','') - let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','') - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.s:ShellEscape(useport,1)." ".args." ".s:ShellEscape(machine.":".tgt,1)) - if s:NetrwLcd(curdir) -" call Dret("s:NetrwUpload : lcd failure") - return + " call Decho("writing local->remote: exe w ".fnameescape(a:tgt),'~'.expand("")) + exe "w ".fnameescape(a:tgt) + " call Decho("done writing local->remote",'~'.expand("")) endif + q! - elseif a:tgt =~ '^ftp:' - call s:NetrwMethod(a:tgt) + elseif type(a:fname) == 3 + " handle uploading a list of files via scp + " call Decho("handle uploading a list of files via scp",'~'.expand("")) + let curdir= getcwd() + if a:tgt =~ '^scp:' + if s:NetrwLcd(fromdir) + " call Dret("s:NetrwUpload : lcd failure") + return + endif + let filelist= deepcopy(s:netrwmarkfilelist_{bufnr('%')}) + let args = join(map(filelist,"s:ShellEscape(v:val, 1)")) + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " ".g:netrw_scpport." ".g:netrw_port + else + let useport= "" + endif + let machine = substitute(a:tgt,'^scp://\([^/:]\+\).*$','\1','') + let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','') + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.s:ShellEscape(useport,1)." ".args." ".s:ShellEscape(machine.":".tgt,1)) + if s:NetrwLcd(curdir) + " call Dret("s:NetrwUpload : lcd failure") + return + endif - if b:netrw_method == 2 - " handle uploading a list of files via ftp+.netrc - let netrw_fname = b:netrw_fname - sil NetrwKeepj new -" call Decho("filter input window#".winnr(),'~'.expand("")) + elseif a:tgt =~ '^ftp:' + call s:NetrwMethod(a:tgt) - NetrwKeepj put =g:netrw_ftpmode -" call Decho("filter input: ".getline('$'),'~'.expand("")) + if b:netrw_method == 2 + " handle uploading a list of files via ftp+.netrc + let netrw_fname = b:netrw_fname + sil NetrwKeepj new + " call Decho("filter input window#".winnr(),'~'.expand("")) - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif - - NetrwKeepj call setline(line("$")+1,'lcd "'.fromdir.'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) - - if tgtdir == "" - let tgtdir= '/' - endif - NetrwKeepj call setline(line("$")+1,'cd "'.tgtdir.'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) - - for fname in a:fname - NetrwKeepj call setline(line("$")+1,'put "'.s:NetrwFile(fname).'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endfor - - if exists("g:netrw_port") && g:netrw_port != "" - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)) - else -" call Decho("filter input window#".winnr(),'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)) - endif - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - sil NetrwKeepj g/Local directory now/d - call histdel("/",-1) - if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' - call netrw#ErrorMsg(s:ERROR,getline(1),14) - else - bw!|q - endif + NetrwKeepj put =g:netrw_ftpmode + " call Decho("filter input: ".getline('$'),'~'.expand("")) - elseif b:netrw_method == 3 - " upload with ftp + machine, id, passwd, and fname (ie. no .netrc) - let netrw_fname= b:netrw_fname - NetrwKeepj call s:SaveBufVars()|sil NetrwKeepj new|NetrwKeepj call s:RestoreBufVars() - let tmpbufnr= bufnr("%") - setl ff=unix + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif - if exists("g:netrw_port") && g:netrw_port != "" - NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline('$'),'~'.expand("")) - else - NetrwKeepj put ='open '.g:netrw_machine -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif + NetrwKeepj call setline(line("$")+1,'lcd "'.fromdir.'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) - if exists("g:netrw_uid") && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - NetrwKeepj put =g:netrw_uid -" call Decho("filter input: ".getline('$'),'~'.expand("")) - if exists("s:netrw_passwd") - NetrwKeepj call setline(line("$")+1,'"'.s:netrw_passwd.'"') - endif -" call Decho("filter input: ".getline('$'),'~'.expand("")) - elseif exists("s:netrw_passwd") - NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif - endif + if tgtdir == "" + let tgtdir= '/' + endif + NetrwKeepj call setline(line("$")+1,'cd "'.tgtdir.'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) + + for fname in a:fname + NetrwKeepj call setline(line("$")+1,'put "'.s:NetrwFile(fname).'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endfor + + if exists("g:netrw_port") && g:netrw_port != "" + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)) + else + " call Decho("filter input window#".winnr(),'~'.expand("")) + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)) + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + sil NetrwKeepj g/Local directory now/d + call histdel("/",-1) + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + call netrw#ErrorMsg(s:ERROR,getline(1),14) + else + bw!|q + endif - NetrwKeepj call setline(line("$")+1,'lcd "'.fromdir.'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) + elseif b:netrw_method == 3 + " upload with ftp + machine, id, passwd, and fname (ie. no .netrc) + let netrw_fname= b:netrw_fname + NetrwKeepj call s:SaveBufVars()|sil NetrwKeepj new|NetrwKeepj call s:RestoreBufVars() + let tmpbufnr= bufnr("%") + setl ff=unix + + if exists("g:netrw_port") && g:netrw_port != "" + NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port + " call Decho("filter input: ".getline('$'),'~'.expand("")) + else + NetrwKeepj put ='open '.g:netrw_machine + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif - if exists("b:netrw_fname") && b:netrw_fname != "" - NetrwKeepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif + if exists("g:netrw_uid") && g:netrw_uid != "" + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + NetrwKeepj put =g:netrw_uid + " call Decho("filter input: ".getline('$'),'~'.expand("")) + if exists("s:netrw_passwd") + NetrwKeepj call setline(line("$")+1,'"'.s:netrw_passwd.'"') + endif + " call Decho("filter input: ".getline('$'),'~'.expand("")) + elseif exists("s:netrw_passwd") + NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif + endif - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endif - - for fname in a:fname - NetrwKeepj call setline(line("$")+1,'put "'.fname.'"') -" call Decho("filter input: ".getline('$'),'~'.expand("")) - endfor - - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password - NetrwKeepj norm! 1G"_dd - call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) - " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) - sil NetrwKeepj g/Local directory now/d - call histdel("/",-1) - if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' - let debugkeep= &debug - setl debug=msg - call netrw#ErrorMsg(s:ERROR,getline(1),15) - let &debug = debugkeep - let mod = 1 - else - bw!|q - endif - elseif !exists("b:netrw_method") || b:netrw_method < 0 -" call Dret("s:#NetrwUpload : unsupported method") - return + NetrwKeepj call setline(line("$")+1,'lcd "'.fromdir.'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) + + if exists("b:netrw_fname") && b:netrw_fname != "" + NetrwKeepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif + + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endif + + for fname in a:fname + NetrwKeepj call setline(line("$")+1,'put "'.fname.'"') + " call Decho("filter input: ".getline('$'),'~'.expand("")) + endfor + + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + NetrwKeepj norm! 1G"_dd + call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + sil NetrwKeepj g/Local directory now/d + call histdel("/",-1) + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + let debugkeep= &debug + setl debug=msg + call netrw#ErrorMsg(s:ERROR,getline(1),15) + let &debug = debugkeep + let mod = 1 + else + bw!|q + endif + elseif !exists("b:netrw_method") || b:netrw_method < 0 + " call Dret("s:#NetrwUpload : unsupported method") + return + endif + else + call netrw#ErrorMsg(s:ERROR,"can't obtain files with protocol from<".a:tgt.">",63) endif - else - call netrw#ErrorMsg(s:ERROR,"can't obtain files with protocol from<".a:tgt.">",63) - endif endif -" call Dret("s:NetrwUpload") + " call Dret("s:NetrwUpload") endfun " --------------------------------------------------------------------- " s:NetrwPreview: supports netrw's "p" map {{{2 fun! s:NetrwPreview(path) range -" call Dfunc("NetrwPreview(path<".a:path.">)") -" call Decho("g:netrw_alto =".(exists("g:netrw_alto")? g:netrw_alto : 'n/a'),'~'.expand("")) -" call Decho("g:netrw_preview=".(exists("g:netrw_preview")? g:netrw_preview : 'n/a'),'~'.expand("")) + " call Dfunc("NetrwPreview(path<".a:path.">)") + " call Decho("g:netrw_alto =".(exists("g:netrw_alto")? g:netrw_alto : 'n/a'),'~'.expand("")) + " call Decho("g:netrw_preview=".(exists("g:netrw_preview")? g:netrw_preview : 'n/a'),'~'.expand("")) let ykeep= @@ NetrwKeepj call s:NetrwOptionsSave("s:") if a:path !~ '^\*\{1,2}/' && a:path !~ '^\a\{3,}://' - NetrwKeepj call s:NetrwOptionsSafe(1) + NetrwKeepj call s:NetrwOptionsSafe(1) else - NetrwKeepj call s:NetrwOptionsSafe(0) + NetrwKeepj call s:NetrwOptionsSafe(0) endif if has("quickfix") -" call Decho("has quickfix",'~'.expand("")) - if !isdirectory(s:NetrwFile(a:path)) -" call Decho("good; not previewing a directory",'~'.expand("")) - if g:netrw_preview - " vertical split - let pvhkeep = &pvh - let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize - let &pvh = winwidth(0) - winsz -" call Decho("g:netrw_preview: winsz=".winsz." &pvh=".&pvh." (temporarily) g:netrw_winsize=".g:netrw_winsize,'~'.expand("")) - else - " horizontal split - let pvhkeep = &pvh - let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize - let &pvh = winheight(0) - winsz -" call Decho("!g:netrw_preview: winsz=".winsz." &pvh=".&pvh." (temporarily) g:netrw_winsize=".g:netrw_winsize,'~'.expand("")) - endif - " g:netrw_preview g:netrw_alto - " 1 : vert 1: top -- preview window is vertically split off and on the left - " 1 : vert 0: bot -- preview window is vertically split off and on the right - " 0 : 1: top -- preview window is horizontally split off and on the top - " 0 : 0: bot -- preview window is horizontally split off and on the bottom - " - " Note that the file being previewed is already known to not be a directory, hence we can avoid doing a LocalBrowseCheck() check via - " the BufEnter event set up in netrwPlugin.vim -" call Decho("exe ".(g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path),'~'.expand("")) - let eikeep = &ei - set ei=BufEnter - exe (g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path) - let &ei= eikeep -" call Decho("winnr($)=".winnr("$"),'~'.expand("")) - if exists("pvhkeep") - let &pvh= pvhkeep + " call Decho("has quickfix",'~'.expand("")) + if !isdirectory(s:NetrwFile(a:path)) + " call Decho("good; not previewing a directory",'~'.expand("")) + if g:netrw_preview + " vertical split + let pvhkeep = &pvh + let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize + let &pvh = winwidth(0) - winsz + " call Decho("g:netrw_preview: winsz=".winsz." &pvh=".&pvh." (temporarily) g:netrw_winsize=".g:netrw_winsize,'~'.expand("")) + else + " horizontal split + let pvhkeep = &pvh + let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize + let &pvh = winheight(0) - winsz + " call Decho("!g:netrw_preview: winsz=".winsz." &pvh=".&pvh." (temporarily) g:netrw_winsize=".g:netrw_winsize,'~'.expand("")) + endif + " g:netrw_preview g:netrw_alto + " 1 : vert 1: top -- preview window is vertically split off and on the left + " 1 : vert 0: bot -- preview window is vertically split off and on the right + " 0 : 1: top -- preview window is horizontally split off and on the top + " 0 : 0: bot -- preview window is horizontally split off and on the bottom + " + " Note that the file being previewed is already known to not be a directory, hence we can avoid doing a LocalBrowseCheck() check via + " the BufEnter event set up in netrwPlugin.vim + " call Decho("exe ".(g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path),'~'.expand("")) + let eikeep = &ei + set ei=BufEnter + exe (g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path) + let &ei= eikeep + " call Decho("winnr($)=".winnr("$"),'~'.expand("")) + if exists("pvhkeep") + let &pvh= pvhkeep + endif + elseif !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"sorry, cannot preview a directory such as <".a:path.">",38) endif - elseif !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"sorry, cannot preview a directory such as <".a:path.">",38) - endif elseif !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39) + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39) endif NetrwKeepj call s:NetrwOptionsRestore("s:") let @@= ykeep -" call Dret("NetrwPreview") + " call Dret("NetrwPreview") endfun " --------------------------------------------------------------------- " s:NetrwRefresh: {{{2 fun! s:NetrwRefresh(islocal,dirname) -" call Dfunc("s:NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") g:netrw_hide=".g:netrw_hide." g:netrw_sort_direction=".g:netrw_sort_direction) + " call Dfunc("s:NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") g:netrw_hide=".g:netrw_hide." g:netrw_sort_direction=".g:netrw_sort_direction) " at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first. setl ma noro -" call Decho("setl ma noro",'~'.expand("")) -" call Decho("clear buffer<".expand("%")."> with :%d",'~'.expand("")) + " call Decho("setl ma noro",'~'.expand("")) + " call Decho("clear buffer<".expand("%")."> with :%d",'~'.expand("")) let ykeep = @@ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - if !exists("w:netrw_treetop") - if exists("b:netrw_curdir") - let w:netrw_treetop= b:netrw_curdir - else - let w:netrw_treetop= getcwd() + if !exists("w:netrw_treetop") + if exists("b:netrw_curdir") + let w:netrw_treetop= b:netrw_curdir + else + let w:netrw_treetop= getcwd() + endif endif - endif - NetrwKeepj call s:NetrwRefreshTreeDict(w:netrw_treetop) + NetrwKeepj call s:NetrwRefreshTreeDict(w:netrw_treetop) endif " save the cursor position before refresh. let screenposn = winsaveview() -" call Decho("saving posn to screenposn<".string(screenposn).">",'~'.expand("")) + " call Decho("saving posn to screenposn<".string(screenposn).">",'~'.expand("")) -" call Decho("win#".winnr().": ".winheight(0)."x".winwidth(0)." curfile<".expand("%").">",'~'.expand("")) -" call Decho("clearing buffer prior to refresh",'~'.expand("")) + " call Decho("win#".winnr().": ".winheight(0)."x".winwidth(0)." curfile<".expand("%").">",'~'.expand("")) + " call Decho("clearing buffer prior to refresh",'~'.expand("")) sil! NetrwKeepj %d _ if a:islocal - NetrwKeepj call netrw#LocalBrowseCheck(a:dirname) + NetrwKeepj call netrw#LocalBrowseCheck(a:dirname) else - NetrwKeepj call s:NetrwBrowse(a:islocal,a:dirname) + NetrwKeepj call s:NetrwBrowse(a:islocal,a:dirname) endif " restore position -" call Decho("restoring posn to screenposn<".string(screenposn).">",'~'.expand("")) + " call Decho("restoring posn to screenposn<".string(screenposn).">",'~'.expand("")) NetrwKeepj call winrestview(screenposn) " restore file marks if has("syntax") && exists("g:syntax_on") && g:syntax_on - if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" -" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/",'~'.expand("")) - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" - else -" " call Decho("2match none (bufnr(%)=".bufnr("%")."<".bufname("%").">)",'~'.expand("")) - 2match none - endif - endif + if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" + " " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/",'~'.expand("")) + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + else + " " call Decho("2match none (bufnr(%)=".bufnr("%")."<".bufname("%").">)",'~'.expand("")) + 2match none + endif + endif -" restore + " restore let @@= ykeep -" call Dret("s:NetrwRefresh") + " call Dret("s:NetrwRefresh") endfun " --------------------------------------------------------------------- @@ -8412,23 +8451,23 @@ endfun " Interfaces to s:NetrwRefresh() and s:LocalBrowseRefresh() fun! s:NetrwRefreshDir(islocal,dirname) if g:netrw_fastbrowse == 0 - " slowest mode (keep buffers refreshed, local or remote) - let tgtwin= bufwinnr(a:dirname) + " slowest mode (keep buffers refreshed, local or remote) + let tgtwin= bufwinnr(a:dirname) - if tgtwin > 0 - " tgtwin is being displayed, so refresh it - let curwin= winnr() - exe tgtwin."wincmd w" - NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - exe curwin."wincmd w" + if tgtwin > 0 + " tgtwin is being displayed, so refresh it + let curwin= winnr() + exe tgtwin."wincmd w" + NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + exe curwin."wincmd w" - elseif bufnr(a:dirname) > 0 - let bn= bufnr(a:dirname) - exe "sil keepj bd ".bn - endif + elseif bufnr(a:dirname) > 0 + let bn= bufnr(a:dirname) + exe "sil keepj bd ".bn + endif elseif g:netrw_fastbrowse <= 1 - NetrwKeepj call s:LocalBrowseRefresh() + NetrwKeepj call s:LocalBrowseRefresh() endif endfun @@ -8438,21 +8477,21 @@ endfun " Supports [count]C where the count, if present, is used to specify " a window to use for editing via the mapping. fun! s:NetrwSetChgwin(...) -" call Dfunc("s:NetrwSetChgwin() v:count=".v:count) + " call Dfunc("s:NetrwSetChgwin() v:count=".v:count) if a:0 > 0 -" call Decho("a:1<".a:1.">",'~'.expand("")) - if a:1 == "" " :NetrwC win# - let g:netrw_chgwin= winnr() - else " :NetrwC - let g:netrw_chgwin= a:1 - endif + " call Decho("a:1<".a:1.">",'~'.expand("")) + if a:1 == "" " :NetrwC win# + let g:netrw_chgwin= winnr() + else " :NetrwC + let g:netrw_chgwin= a:1 + endif elseif v:count > 0 " [count]C - let g:netrw_chgwin= v:count + let g:netrw_chgwin= v:count else " C - let g:netrw_chgwin= winnr() + let g:netrw_chgwin= winnr() endif echo "editing window now set to window#".g:netrw_chgwin -" call Dret("s:NetrwSetChgwin : g:netrw_chgwin=".g:netrw_chgwin) + " call Dret("s:NetrwSetChgwin : g:netrw_chgwin=".g:netrw_chgwin) endfun " --------------------------------------------------------------------- @@ -8462,58 +8501,58 @@ endfun " "files" that satisfy each pattern, putting the priority / in " front. An "*" pattern handles the default priority. fun! s:NetrwSetSort() -" call Dfunc("SetSort() bannercnt=".w:netrw_bannercnt) + " call Dfunc("SetSort() bannercnt=".w:netrw_bannercnt) let ykeep= @@ if w:netrw_liststyle == s:LONGLIST - let seqlist = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge') + let seqlist = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge') else - let seqlist = g:netrw_sort_sequence + let seqlist = g:netrw_sort_sequence endif " sanity check -- insure that * appears somewhere if seqlist == "" - let seqlist= '*' + let seqlist= '*' elseif seqlist !~ '\*' - let seqlist= seqlist.',*' + let seqlist= seqlist.',*' endif - let priority = 1 - while seqlist != "" - if seqlist =~ ',' - let seq = substitute(seqlist,',.*$','','e') - let seqlist = substitute(seqlist,'^.\{-},\(.*\)$','\1','e') - else - let seq = seqlist - let seqlist = "" - endif - if priority < 10 - let spriority= "00".priority.g:netrw_sepchr - elseif priority < 100 - let spriority= "0".priority.g:netrw_sepchr - else - let spriority= priority.g:netrw_sepchr - endif -" call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">",'~'.expand("")) - - " sanity check - if w:netrw_bannercnt > line("$") - " apparently no files were left after a Hiding pattern was used -" call Dret("SetSort : no files left after hiding") - return - endif - if seq == '*' - let starpriority= spriority - else - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/'.seq.'/s/^/'.spriority.'/' - call histdel("/",-1) - " sometimes multiple sorting patterns will match the same file or directory. - " The following substitute is intended to remove the excess matches. - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^\d\{3}'.g:netrw_sepchr.'\d\{3}\//s/^\d\{3}'.g:netrw_sepchr.'\(\d\{3}\/\).\@=/\1/e' - NetrwKeepj call histdel("/",-1) - endif - let priority = priority + 1 + let priority = 1 + while seqlist != "" + if seqlist =~ ',' + let seq = substitute(seqlist,',.*$','','e') + let seqlist = substitute(seqlist,'^.\{-},\(.*\)$','\1','e') + else + let seq = seqlist + let seqlist = "" + endif + if priority < 10 + let spriority= "00".priority.g:netrw_sepchr + elseif priority < 100 + let spriority= "0".priority.g:netrw_sepchr + else + let spriority= priority.g:netrw_sepchr + endif + " call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">",'~'.expand("")) + + " sanity check + if w:netrw_bannercnt > line("$") + " apparently no files were left after a Hiding pattern was used + " call Dret("SetSort : no files left after hiding") + return + endif + if seq == '*' + let starpriority= spriority + else + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/'.seq.'/s/^/'.spriority.'/' + call histdel("/",-1) + " sometimes multiple sorting patterns will match the same file or directory. + " The following substitute is intended to remove the excess matches. + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^\d\{3}'.g:netrw_sepchr.'\d\{3}\//s/^\d\{3}'.g:netrw_sepchr.'\(\d\{3}\/\).\@=/\1/e' + NetrwKeepj call histdel("/",-1) + endif + let priority = priority + 1 endwhile if exists("starpriority") - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v/^\d\{3}'.g:netrw_sepchr.'/s/^/'.starpriority.'/e' - NetrwKeepj call histdel("/",-1) + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v/^\d\{3}'.g:netrw_sepchr.'/s/^/'.starpriority.'/e' + NetrwKeepj call histdel("/",-1) endif " Following line associated with priority -- items that satisfy a priority @@ -8526,7 +8565,7 @@ fun! s:NetrwSetSort() NetrwKeepj call histdel("/",-1) let @@= ykeep -" call Dret("SetSort") + " call Dret("SetSort") endfun " --------------------------------------------------------------------- @@ -8535,35 +8574,35 @@ endfun " [count]Th (bookhist) " See :help netrw-qb for how to make the choice. fun! s:NetrwSetTgt(islocal,bookhist,choice) -" call Dfunc("s:NetrwSetTgt(islocal=".a:islocal." bookhist<".a:bookhist."> choice#".a:choice.")") + " call Dfunc("s:NetrwSetTgt(islocal=".a:islocal." bookhist<".a:bookhist."> choice#".a:choice.")") if a:bookhist == 'b' - " supports choosing a bookmark as a target using a qb-generated list - let choice= a:choice - 1 - if exists("g:netrw_bookmarklist[".choice."]") - call netrw#MakeTgt(g:netrw_bookmarklist[choice]) - else - echomsg "Sorry, bookmark#".a:choice." doesn't exist!" - endif + " supports choosing a bookmark as a target using a qb-generated list + let choice= a:choice - 1 + if exists("g:netrw_bookmarklist[".choice."]") + call netrw#MakeTgt(g:netrw_bookmarklist[choice]) + else + echomsg "Sorry, bookmark#".a:choice." doesn't exist!" + endif elseif a:bookhist == 'h' - " supports choosing a history stack entry as a target using a qb-generated list - let choice= (a:choice % g:netrw_dirhistmax) + 1 - if exists("g:netrw_dirhist_".choice) - let histentry = g:netrw_dirhist_{choice} - call netrw#MakeTgt(histentry) - else - echomsg "Sorry, history#".a:choice." not available!" - endif + " supports choosing a history stack entry as a target using a qb-generated list + let choice= (a:choice % g:netrw_dirhistmax) + 1 + if exists("g:netrw_dirhist_".choice) + let histentry = g:netrw_dirhist_{choice} + call netrw#MakeTgt(histentry) + else + echomsg "Sorry, history#".a:choice." not available!" + endif endif " refresh the display if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() + let b:netrw_curdir= getcwd() endif call s:NetrwRefresh(a:islocal,b:netrw_curdir) -" call Dret("s:NetrwSetTgt") + " call Dret("s:NetrwSetTgt") endfun " ===================================================================== @@ -8592,83 +8631,83 @@ fun! s:NetrwSplit(mode) call s:SaveWinVars() if a:mode == 0 - " remote and o - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize - if winsz == 0|let winsz= ""|endif - exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" - let s:didsplit= 1 - NetrwKeepj call s:RestoreWinVars() - NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1)) - unlet s:didsplit + " remote and o + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize + if winsz == 0|let winsz= ""|endif + exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" + let s:didsplit= 1 + NetrwKeepj call s:RestoreWinVars() + NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1)) + unlet s:didsplit elseif a:mode == 1 - " remote and t - let newdir = s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1) - tabnew - let s:didsplit= 1 - NetrwKeepj call s:RestoreWinVars() - NetrwKeepj call s:NetrwBrowse(0,newdir) - unlet s:didsplit + " remote and t + let newdir = s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1) + tabnew + let s:didsplit= 1 + NetrwKeepj call s:RestoreWinVars() + NetrwKeepj call s:NetrwBrowse(0,newdir) + unlet s:didsplit elseif a:mode == 2 - " remote and v - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize - if winsz == 0|let winsz= ""|endif - exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v" - let s:didsplit= 1 - NetrwKeepj call s:RestoreWinVars() - NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1)) - unlet s:didsplit + " remote and v + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize + if winsz == 0|let winsz= ""|endif + exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v" + let s:didsplit= 1 + NetrwKeepj call s:RestoreWinVars() + NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord(),1)) + unlet s:didsplit elseif a:mode == 3 - " local and o - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize - if winsz == 0|let winsz= ""|endif - exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" - let s:didsplit= 1 - NetrwKeepj call s:RestoreWinVars() - NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord(),1)) - unlet s:didsplit + " local and o + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize + if winsz == 0|let winsz= ""|endif + exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" + let s:didsplit= 1 + NetrwKeepj call s:RestoreWinVars() + NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord(),1)) + unlet s:didsplit elseif a:mode == 4 - " local and t - let cursorword = s:NetrwGetWord() - let eikeep = &ei - let netrw_winnr = winnr() - let netrw_line = line(".") - let netrw_col = virtcol(".") - NetrwKeepj norm! H0 - let netrw_hline = line(".") - setl ei=all - exe "NetrwKeepj norm! ".netrw_hline."G0z\" - exe "NetrwKeepj norm! ".netrw_line."G0".netrw_col."\" - let &ei = eikeep - let netrw_curdir = s:NetrwTreeDir(0) - tabnew - let b:netrw_curdir = netrw_curdir - let s:didsplit = 1 - NetrwKeepj call s:RestoreWinVars() - NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,cursorword,0)) - if &ft == "netrw" + " local and t + let cursorword = s:NetrwGetWord() + let eikeep = &ei + let netrw_winnr = winnr() + let netrw_line = line(".") + let netrw_col = virtcol(".") + NetrwKeepj norm! H0 + let netrw_hline = line(".") setl ei=all exe "NetrwKeepj norm! ".netrw_hline."G0z\" exe "NetrwKeepj norm! ".netrw_line."G0".netrw_col."\" - let &ei= eikeep - endif - unlet s:didsplit + let &ei = eikeep + let netrw_curdir = s:NetrwTreeDir(0) + tabnew + let b:netrw_curdir = netrw_curdir + let s:didsplit = 1 + NetrwKeepj call s:RestoreWinVars() + NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,cursorword,0)) + if &ft == "netrw" + setl ei=all + exe "NetrwKeepj norm! ".netrw_hline."G0z\" + exe "NetrwKeepj norm! ".netrw_line."G0".netrw_col."\" + let &ei= eikeep + endif + unlet s:didsplit elseif a:mode == 5 - " local and v - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize - if winsz == 0|let winsz= ""|endif - exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v" - let s:didsplit= 1 - NetrwKeepj call s:RestoreWinVars() - NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord(),1)) - unlet s:didsplit + " local and v + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize + if winsz == 0|let winsz= ""|endif + exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v" + let s:didsplit= 1 + NetrwKeepj call s:RestoreWinVars() + NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord(),1)) + unlet s:didsplit else - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"(NetrwSplit) unsupported mode=".a:mode,45) + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"(NetrwSplit) unsupported mode=".a:mode,45) endif let @@= ykeep @@ -8678,63 +8717,63 @@ endfun " s:NetrwTgtMenu: {{{2 fun! s:NetrwTgtMenu() if !exists("s:netrw_menucnt") - return + return endif -" call Dfunc("s:NetrwTgtMenu()") + " call Dfunc("s:NetrwTgtMenu()") " the following test assures that gvim is running, has menus available, and has menus enabled. if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu - if exists("g:NetrwTopLvlMenu") -" call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)",'~'.expand("")) - exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Targets' - endif - if !exists("s:netrw_initbookhist") - call s:NetrwBookHistRead() - endif - - " try to cull duplicate entries - let tgtdict={} - - " target bookmarked places - if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0 -" call Decho("installing bookmarks as easy targets",'~'.expand("")) - let cnt= 1 - for bmd in g:netrw_bookmarklist - if has_key(tgtdict,bmd) - let cnt= cnt + 1 - continue - endif - let tgtdict[bmd]= cnt - let ebmd= escape(bmd,g:netrw_menu_escape) - " show bookmarks for goto menu -" call Decho("menu: Targets: ".bmd,'~'.expand("")) - exe 'sil! menu '.g:NetrwMenuPriority.".19.1.".cnt." ".g:NetrwTopLvlMenu.'Targets.'.ebmd." :call netrw#MakeTgt('".bmd."')\" - let cnt= cnt + 1 - endfor - endif - - " target directory browsing history - if exists("g:netrw_dirhistmax") && g:netrw_dirhistmax > 0 -" call Decho("installing history as easy targets (histmax=".g:netrw_dirhistmax.")",'~'.expand("")) - let histcnt = 1 - while histcnt <= g:netrw_dirhistmax - let priority = g:netrw_dirhistcnt + histcnt - if exists("g:netrw_dirhist_{histcnt}") - let histentry = g:netrw_dirhist_{histcnt} - if has_key(tgtdict,histentry) - let histcnt = histcnt + 1 - continue - endif - let tgtdict[histentry] = histcnt - let ehistentry = escape(histentry,g:netrw_menu_escape) -" call Decho("menu: Targets: ".histentry,'~'.expand("")) - exe 'sil! menu '.g:NetrwMenuPriority.".19.2.".priority." ".g:NetrwTopLvlMenu.'Targets.'.ehistentry." :call netrw#MakeTgt('".histentry."')\" - endif - let histcnt = histcnt + 1 - endwhile - endif + if exists("g:NetrwTopLvlMenu") + " call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)",'~'.expand("")) + exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Targets' + endif + if !exists("s:netrw_initbookhist") + call s:NetrwBookHistRead() + endif + + " try to cull duplicate entries + let tgtdict={} + + " target bookmarked places + if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0 + " call Decho("installing bookmarks as easy targets",'~'.expand("")) + let cnt= 1 + for bmd in g:netrw_bookmarklist + if has_key(tgtdict,bmd) + let cnt= cnt + 1 + continue + endif + let tgtdict[bmd]= cnt + let ebmd= escape(bmd,g:netrw_menu_escape) + " show bookmarks for goto menu + " call Decho("menu: Targets: ".bmd,'~'.expand("")) + exe 'sil! menu '.g:NetrwMenuPriority.".19.1.".cnt." ".g:NetrwTopLvlMenu.'Targets.'.ebmd." :call netrw#MakeTgt('".bmd."')\" + let cnt= cnt + 1 + endfor + endif + + " target directory browsing history + if exists("g:netrw_dirhistmax") && g:netrw_dirhistmax > 0 + " call Decho("installing history as easy targets (histmax=".g:netrw_dirhistmax.")",'~'.expand("")) + let histcnt = 1 + while histcnt <= g:netrw_dirhistmax + let priority = g:netrw_dirhistcnt + histcnt + if exists("g:netrw_dirhist_{histcnt}") + let histentry = g:netrw_dirhist_{histcnt} + if has_key(tgtdict,histentry) + let histcnt = histcnt + 1 + continue + endif + let tgtdict[histentry] = histcnt + let ehistentry = escape(histentry,g:netrw_menu_escape) + " call Decho("menu: Targets: ".histentry,'~'.expand("")) + exe 'sil! menu '.g:NetrwMenuPriority.".19.2.".priority." ".g:NetrwTopLvlMenu.'Targets.'.ehistentry." :call netrw#MakeTgt('".histentry."')\" + endif + let histcnt = histcnt + 1 + endwhile + endif endif -" call Dret("s:NetrwTgtMenu") + " call Dret("s:NetrwTgtMenu") endfun " --------------------------------------------------------------------- @@ -8743,44 +8782,44 @@ endfun fun! s:NetrwTreeDir(islocal) if exists("s:treedir") && exists("s:prevwinopen") - " s:NetrwPrevWinOpen opens a "previous" window -- and thus needs to and does call s:NetrwTreeDir early - let treedir= s:treedir - unlet s:treedir - unlet s:prevwinopen - return treedir + " s:NetrwPrevWinOpen opens a "previous" window -- and thus needs to and does call s:NetrwTreeDir early + let treedir= s:treedir + unlet s:treedir + unlet s:prevwinopen + return treedir endif if exists("s:prevwinopen") - unlet s:prevwinopen + unlet s:prevwinopen endif if !exists("b:netrw_curdir") || b:netrw_curdir == "" - let b:netrw_curdir= getcwd() + let b:netrw_curdir= getcwd() endif let treedir = b:netrw_curdir let s:treecurpos= winsaveview() if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - " extract tree directory if on a line specifying a subdirectory (ie. ends with "/") - let curline= substitute(getline('.'),"\t -->.*$",'','') - if curline =~ '/$' - let treedir= substitute(getline('.'),'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e') - elseif curline =~ '@$' - let potentialdir= resolve(s:NetrwTreePath(w:netrw_treetop)) - else - let treedir= "" - endif + " extract tree directory if on a line specifying a subdirectory (ie. ends with "/") + let curline= substitute(getline('.'),"\t -->.*$",'','') + if curline =~ '/$' + let treedir= substitute(getline('.'),'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e') + elseif curline =~ '@$' + let potentialdir= resolve(s:NetrwTreePath(w:netrw_treetop)) + else + let treedir= "" + endif - " detect user attempting to close treeroot - if curline !~ '^'.s:treedepthstring && getline('.') != '..' - " now force a refresh - sil! NetrwKeepj %d _ - return b:netrw_curdir - endif + " detect user attempting to close treeroot + if curline !~ '^'.s:treedepthstring && getline('.') != '..' + " now force a refresh + sil! NetrwKeepj %d _ + return b:netrw_curdir + endif - " COMBAK: a symbolic link may point anywhere -- so it will be used to start a new treetop -" if a:islocal && curline =~ '@$' && isdirectory(s:NetrwFile(potentialdir)) -" let newdir = w:netrw_treetop.'/'.potentialdir + " COMBAK: a symbolic link may point anywhere -- so it will be used to start a new treetop + " if a:islocal && curline =~ '@$' && isdirectory(s:NetrwFile(potentialdir)) + " let newdir = w:netrw_treetop.'/'.potentialdir if a:islocal && curline =~ '@$' if isdirectory(s:NetrwFile(potentialdir)) let treedir = potentialdir @@ -8805,18 +8844,18 @@ fun! s:NetrwTreeDisplay(dir,depth) " install ../ and shortdir if a:depth == "" - call setline(line("$")+1,'../') + call setline(line("$")+1,'../') endif if a:dir =~ '^\a\{3,}://' - if a:dir == w:netrw_treetop - let shortdir= a:dir - else - let shortdir= substitute(a:dir,'^.*/\([^/]\+\)/$','\1/','e') - endif - call setline(line("$")+1,a:depth.shortdir) + if a:dir == w:netrw_treetop + let shortdir= a:dir + else + let shortdir= substitute(a:dir,'^.*/\([^/]\+\)/$','\1/','e') + endif + call setline(line("$")+1,a:depth.shortdir) else - let shortdir= substitute(a:dir,'^.*/','','e') - call setline(line("$")+1,a:depth.shortdir.'/') + let shortdir= substitute(a:dir,'^.*/','','e') + call setline(line("$")+1,a:depth.shortdir.'/') endif " append a / to dir if its missing one let dir= a:dir @@ -8826,49 +8865,49 @@ fun! s:NetrwTreeDisplay(dir,depth) " implement g:netrw_hide for tree listings (uses g:netrw_list_hide) if g:netrw_hide == 1 - " hide given patterns - let listhide= split(g:netrw_list_hide,',') - for pat in listhide - call filter(w:netrw_treedict[dir],'v:val !~ "'.escape(pat,'\\').'"') - endfor + " hide given patterns + let listhide= split(g:netrw_list_hide,',') + for pat in listhide + call filter(w:netrw_treedict[dir],'v:val !~ "'.escape(pat,'\\').'"') + endfor elseif g:netrw_hide == 2 - " show given patterns (only) - let listhide= split(g:netrw_list_hide,',') - let entries=[] - for entry in w:netrw_treedict[dir] - for pat in listhide - if entry =~ pat - call add(entries,entry) - break - endif + " show given patterns (only) + let listhide= split(g:netrw_list_hide,',') + let entries=[] + for entry in w:netrw_treedict[dir] + for pat in listhide + if entry =~ pat + call add(entries,entry) + break + endif + endfor endfor - endfor - let w:netrw_treedict[dir]= entries + let w:netrw_treedict[dir]= entries endif if depth != "" - " always remove "." and ".." entries when there's depth - call filter(w:netrw_treedict[dir],'v:val !~ "\\.\\.$"') - call filter(w:netrw_treedict[dir],'v:val !~ "\\.\\./$"') - call filter(w:netrw_treedict[dir],'v:val !~ "\\.$"') - call filter(w:netrw_treedict[dir],'v:val !~ "\\./$"') + " always remove "." and ".." entries when there's depth + call filter(w:netrw_treedict[dir],'v:val !~ "\\.\\.$"') + call filter(w:netrw_treedict[dir],'v:val !~ "\\.\\./$"') + call filter(w:netrw_treedict[dir],'v:val !~ "\\.$"') + call filter(w:netrw_treedict[dir],'v:val !~ "\\./$"') endif for entry in w:netrw_treedict[dir] - if dir =~ '/$' - let direntry= substitute(dir.entry,'[@/]$','','e') - else - let direntry= substitute(dir.'/'.entry,'[@/]$','','e') - endif - if entry =~ '/$' && has_key(w:netrw_treedict,direntry) - NetrwKeepj call s:NetrwTreeDisplay(direntry,depth) - elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/') - NetrwKeepj call s:NetrwTreeDisplay(direntry.'/',depth) - elseif entry =~ '@$' && has_key(w:netrw_treedict,direntry.'@') - NetrwKeepj call s:NetrwTreeDisplay(direntry.'@',depth) - else - sil! NetrwKeepj call setline(line("$")+1,depth.entry) - endif + if dir =~ '/$' + let direntry= substitute(dir.entry,'[@/]$','','e') + else + let direntry= substitute(dir.'/'.entry,'[@/]$','','e') + endif + if entry =~ '/$' && has_key(w:netrw_treedict,direntry) + NetrwKeepj call s:NetrwTreeDisplay(direntry,depth) + elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/') + NetrwKeepj call s:NetrwTreeDisplay(direntry.'/',depth) + elseif entry =~ '@$' && has_key(w:netrw_treedict,direntry.'@') + NetrwKeepj call s:NetrwTreeDisplay(direntry.'@',depth) + else + sil! NetrwKeepj call setline(line("$")+1,depth.entry) + endif endfor endfun @@ -8876,29 +8915,29 @@ endfun " s:NetrwRefreshTreeDict: updates the contents information for a tree (w:netrw_treedict) {{{2 fun! s:NetrwRefreshTreeDict(dir) if !exists("w:netrw_treedict") - return + return endif for entry in w:netrw_treedict[a:dir] - let direntry= substitute(a:dir.'/'.entry,'[@/]$','','e') + let direntry= substitute(a:dir.'/'.entry,'[@/]$','','e') - if entry =~ '/$' && has_key(w:netrw_treedict,direntry) - NetrwKeepj call s:NetrwRefreshTreeDict(direntry) - let filelist = s:NetrwLocalListingList(direntry,0) - let w:netrw_treedict[direntry] = sort(filelist) + if entry =~ '/$' && has_key(w:netrw_treedict,direntry) + NetrwKeepj call s:NetrwRefreshTreeDict(direntry) + let filelist = s:NetrwLocalListingList(direntry,0) + let w:netrw_treedict[direntry] = sort(filelist) - elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/') - NetrwKeepj call s:NetrwRefreshTreeDict(direntry.'/') - let filelist = s:NetrwLocalListingList(direntry.'/',0) - let w:netrw_treedict[direntry] = sort(filelist) + elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/') + NetrwKeepj call s:NetrwRefreshTreeDict(direntry.'/') + let filelist = s:NetrwLocalListingList(direntry.'/',0) + let w:netrw_treedict[direntry] = sort(filelist) - elseif entry =~ '@$' && has_key(w:netrw_treedict,direntry.'@') - NetrwKeepj call s:NetrwRefreshTreeDict(direntry.'/') - let liststar = s:NetrwGlob(direntry.'/','*',1) - let listdotstar= s:NetrwGlob(direntry.'/','.*',1) + elseif entry =~ '@$' && has_key(w:netrw_treedict,direntry.'@') + NetrwKeepj call s:NetrwRefreshTreeDict(direntry.'/') + let liststar = s:NetrwGlob(direntry.'/','*',1) + let listdotstar= s:NetrwGlob(direntry.'/','.*',1) - else - endif + else + endif endfor endfun @@ -8908,51 +8947,51 @@ endfun fun! s:NetrwTreeListing(dirname) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - " update the treetop - if !exists("w:netrw_treetop") - let w:netrw_treetop= a:dirname - let s:netrw_treetop= w:netrw_treetop - " use \V in case the directory contains specials chars like '$' or '~' - elseif (w:netrw_treetop =~ ('^'.'\V'.a:dirname) && s:Strlen(a:dirname) < s:Strlen(w:netrw_treetop)) - \ || a:dirname !~ ('^'.'\V'.w:netrw_treetop) - let w:netrw_treetop= a:dirname - let s:netrw_treetop= w:netrw_treetop - endif - if exists("w:netrw_treetop") - let s:netrw_treetop= w:netrw_treetop - else - let w:netrw_treetop= getcwd() - let s:netrw_treetop= w:netrw_treetop - endif + " update the treetop + if !exists("w:netrw_treetop") + let w:netrw_treetop= a:dirname + let s:netrw_treetop= w:netrw_treetop + " use \V in case the directory contains specials chars like '$' or '~' + elseif (w:netrw_treetop =~ ('^'.'\V'.a:dirname) && s:Strlen(a:dirname) < s:Strlen(w:netrw_treetop)) + \ || a:dirname !~ ('^'.'\V'.w:netrw_treetop) + let w:netrw_treetop= a:dirname + let s:netrw_treetop= w:netrw_treetop + endif + if exists("w:netrw_treetop") + let s:netrw_treetop= w:netrw_treetop + else + let w:netrw_treetop= getcwd() + let s:netrw_treetop= w:netrw_treetop + endif - if !exists("w:netrw_treedict") - " insure that we have a treedict, albeit empty - let w:netrw_treedict= {} - endif + if !exists("w:netrw_treedict") + " insure that we have a treedict, albeit empty + let w:netrw_treedict= {} + endif - " update the dictionary for the current directory - exe "sil! NetrwKeepj keepp ".w:netrw_bannercnt.',$g@^\.\.\=/$@d _' - let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$")) - exe "sil! NetrwKeepj ".w:netrw_bannercnt.",$d _" + " update the dictionary for the current directory + exe "sil! NetrwKeepj keepp ".w:netrw_bannercnt.',$g@^\.\.\=/$@d _' + let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$")) + exe "sil! NetrwKeepj ".w:netrw_bannercnt.",$d _" - " if past banner, record word - if exists("w:netrw_bannercnt") && line(".") > w:netrw_bannercnt - let fname= expand("") - else - let fname= "" - endif + " if past banner, record word + if exists("w:netrw_bannercnt") && line(".") > w:netrw_bannercnt + let fname= expand("") + else + let fname= "" + endif - " display from treetop on down - NetrwKeepj call s:NetrwTreeDisplay(w:netrw_treetop,"") + " display from treetop on down + NetrwKeepj call s:NetrwTreeDisplay(w:netrw_treetop,"") - " remove any blank line remaining as line#1 (happens in treelisting mode with banner suppressed) - while getline(1) =~ '^\s*$' && byte2line(1) > 0 - 1d - endwhile + " remove any blank line remaining as line#1 (happens in treelisting mode with banner suppressed) + while getline(1) =~ '^\s*$' && byte2line(1) > 0 + 1d + endwhile - exe "setl ".g:netrw_bufsettings + exe "setl ".g:netrw_bufsettings - return + return endif endfun @@ -8962,58 +9001,58 @@ endfun " user of the function ( netrw#SetTreetop() ) " wipes that out prior to calling this function fun! s:NetrwTreePath(treetop) -" call Dfunc("s:NetrwTreePath(treetop<".a:treetop.">) line#".line(".")."<".getline(".").">") + " call Dfunc("s:NetrwTreePath(treetop<".a:treetop.">) line#".line(".")."<".getline(".").">") if line(".") < w:netrw_bannercnt + 2 - let treedir= a:treetop - if treedir !~ '/$' - let treedir= treedir.'/' - endif -" call Dret("s:NetrwTreePath ".treedir." : line#".line(".")." ≤ ".(w:netrw_bannercnt+2)) - return treedir + let treedir= a:treetop + if treedir !~ '/$' + let treedir= treedir.'/' + endif + " call Dret("s:NetrwTreePath ".treedir." : line#".line(".")." ≤ ".(w:netrw_bannercnt+2)) + return treedir endif let svpos = winsaveview() -" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) + " call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) let depth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e') -" call Decho("depth<".depth."> 1st subst",'~'.expand("")) + " call Decho("depth<".depth."> 1st subst",'~'.expand("")) let depth = substitute(depth,'^'.s:treedepthstring,'','') -" call Decho("depth<".depth."> 2nd subst (first depth removed)",'~'.expand("")) + " call Decho("depth<".depth."> 2nd subst (first depth removed)",'~'.expand("")) let curline= getline('.') -" call Decho("curline<".curline.'>','~'.expand("")) + " call Decho("curline<".curline.'>','~'.expand("")) if curline =~ '/$' -" call Decho("extract tree directory from current line",'~'.expand("")) - let treedir= substitute(curline,'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e') -" call Decho("treedir<".treedir.">",'~'.expand("")) + " call Decho("extract tree directory from current line",'~'.expand("")) + let treedir= substitute(curline,'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e') + " call Decho("treedir<".treedir.">",'~'.expand("")) elseif curline =~ '@\s\+-->' -" call Decho("extract tree directory using symbolic link",'~'.expand("")) - let treedir= substitute(curline,'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e') - let treedir= substitute(treedir,'@\s\+-->.*$','','e') -" call Decho("treedir<".treedir.">",'~'.expand("")) + " call Decho("extract tree directory using symbolic link",'~'.expand("")) + let treedir= substitute(curline,'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e') + let treedir= substitute(treedir,'@\s\+-->.*$','','e') + " call Decho("treedir<".treedir.">",'~'.expand("")) else -" call Decho("do not extract tree directory from current line and set treedir to empty",'~'.expand("")) - let treedir= "" + " call Decho("do not extract tree directory from current line and set treedir to empty",'~'.expand("")) + let treedir= "" endif " construct treedir by searching backwards at correct depth -" call Decho("construct treedir by searching backwards for correct depth",'~'.expand("")) -" call Decho("initial treedir<".treedir."> depth<".depth.">",'~'.expand("")) + " call Decho("construct treedir by searching backwards for correct depth",'~'.expand("")) + " call Decho("initial treedir<".treedir."> depth<".depth.">",'~'.expand("")) while depth != "" && search('^'.depth.'[^'.s:treedepthstring.'].\{-}/$','bW') - let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e') - let treedir= dirname.treedir - let depth = substitute(depth,'^'.s:treedepthstring,'','') -" call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">",'~'.expand("")) + let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e') + let treedir= dirname.treedir + let depth = substitute(depth,'^'.s:treedepthstring,'','') + " call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">",'~'.expand("")) endwhile -" call Decho("treedir#1<".treedir.">",'~'.expand("")) + " call Decho("treedir#1<".treedir.">",'~'.expand("")) if a:treetop =~ '/$' - let treedir= a:treetop.treedir + let treedir= a:treetop.treedir else - let treedir= a:treetop.'/'.treedir + let treedir= a:treetop.'/'.treedir endif -" call Decho("treedir#2<".treedir.">",'~'.expand("")) + " call Decho("treedir#2<".treedir.">",'~'.expand("")) let treedir= substitute(treedir,'//$','/','') -" call Decho("treedir#3<".treedir.">",'~'.expand("")) -" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand(""))" + " call Decho("treedir#3<".treedir.">",'~'.expand("")) + " call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand(""))" call winrestview(svpos) -" call Dret("s:NetrwTreePath <".treedir.">") + " call Dret("s:NetrwTreePath <".treedir.">") return treedir endfun @@ -9022,119 +9061,119 @@ endfun fun! s:NetrwWideListing() if w:netrw_liststyle == s:WIDELIST -" call Dfunc("NetrwWideListing() w:netrw_liststyle=".w:netrw_liststyle.' fo='.&fo.' l:fo='.&l:fo) - " look for longest filename (cpf=characters per filename) - " cpf: characters per filename - " fpl: filenames per line - " fpc: filenames per column - setl ma noro - let dict={} - " save the unnamed register and register 0-9 and a - let dict.a=[getreg('a'), getregtype('a')] - for i in range(0, 9) - let dict[i] = [getreg(i), getregtype(i)] - endfor - let dict.unnamed = [getreg(''), getregtype('')] -" call Decho("setl ma noro",'~'.expand("")) - let b:netrw_cpf= 0 - if line("$") >= w:netrw_bannercnt - " determine the maximum filename size; use that to set cpf - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' + " call Dfunc("NetrwWideListing() w:netrw_liststyle=".w:netrw_liststyle.' fo='.&fo.' l:fo='.&l:fo) + " look for longest filename (cpf=characters per filename) + " cpf: characters per filename + " fpl: filenames per line + " fpc: filenames per column + setl ma noro + let dict={} + " save the unnamed register and register 0-9 and a + let dict.a=[getreg('a'), getregtype('a')] + for i in range(0, 9) + let dict[i] = [getreg(i), getregtype(i)] + endfor + let dict.unnamed = [getreg(''), getregtype('')] + " call Decho("setl ma noro",'~'.expand("")) + let b:netrw_cpf= 0 + if line("$") >= w:netrw_bannercnt + " determine the maximum filename size; use that to set cpf + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' + NetrwKeepj call histdel("/",-1) + else + " restore stored registers + call s:RestoreRegister(dict) + " call Dret("NetrwWideListing") + return + endif + " allow for two spaces to separate columns + let b:netrw_cpf= b:netrw_cpf + 2 + " call Decho("b:netrw_cpf=max_filename_length+2=".b:netrw_cpf,'~'.expand("")) + + " determine qty files per line (fpl) + let w:netrw_fpl= winwidth(0)/b:netrw_cpf + if w:netrw_fpl <= 0 + let w:netrw_fpl= 1 + endif + " call Decho("fpl= [winwidth=".winwidth(0)."]/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl,'~'.expand("")) + + " make wide display + " fpc: files per column of wide listing + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/^.*$/\=escape(printf("%-'.b:netrw_cpf.'S",submatch(0)),"\\")/' + NetrwKeepj call histdel("/",-1) + let fpc = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl + let newcolstart = w:netrw_bannercnt + fpc + let newcolend = newcolstart + fpc - 1 + " call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]",'~'.expand("")) + if has("clipboard") && g:netrw_clipboard + " call Decho("(s:NetrwWideListing) save @* and @+",'~'.expand("")) + sil! let keepregstar = @* + sil! let keepregplus = @+ + endif + while line("$") >= newcolstart + if newcolend > line("$") | let newcolend= line("$") | endif + let newcolqty= newcolend - newcolstart + exe newcolstart + " COMBAK: both of the visual-mode using lines below are problematic vis-a-vis @* + if newcolqty == 0 + exe "sil! NetrwKeepj norm! 0\$h\"ax".w:netrw_bannercnt."G$\"ap" + else + exe "sil! NetrwKeepj norm! 0\".newcolqty.'j$h"ax'.w:netrw_bannercnt.'G$"ap' + endif + exe "sil! NetrwKeepj ".newcolstart.','.newcolend.'d _' + exe 'sil! NetrwKeepj '.w:netrw_bannercnt + endwhile + if has("clipboard") + " call Decho("(s:NetrwWideListing) restore @* and @+",'~'.expand("")) + if @* != keepregstar | sil! let @* = keepregstar | endif + if @+ != keepregplus | sil! let @+ = keepregplus | endif + endif + exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$s/\s\+$//e' NetrwKeepj call histdel("/",-1) - else - " restore stored registers + exe 'nno w :call search(''^.\\|\s\s\zs\S'',''W'')'."\" + exe 'nno b :call search(''^.\\|\s\s\zs\S'',''bW'')'."\" + " call Decho("NetrwWideListing) setl noma nomod ro",'~'.expand("")) + exe "setl ".g:netrw_bufsettings call s:RestoreRegister(dict) -" call Dret("NetrwWideListing") + " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + " call Dret("NetrwWideListing") return - endif - " allow for two spaces to separate columns - let b:netrw_cpf= b:netrw_cpf + 2 -" call Decho("b:netrw_cpf=max_filename_length+2=".b:netrw_cpf,'~'.expand("")) - - " determine qty files per line (fpl) - let w:netrw_fpl= winwidth(0)/b:netrw_cpf - if w:netrw_fpl <= 0 - let w:netrw_fpl= 1 - endif -" call Decho("fpl= [winwidth=".winwidth(0)."]/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl,'~'.expand("")) - - " make wide display - " fpc: files per column of wide listing - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/^.*$/\=escape(printf("%-'.b:netrw_cpf.'S",submatch(0)),"\\")/' - NetrwKeepj call histdel("/",-1) - let fpc = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl - let newcolstart = w:netrw_bannercnt + fpc - let newcolend = newcolstart + fpc - 1 -" call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]",'~'.expand("")) - if has("clipboard") && g:netrw_clipboard -" call Decho("(s:NetrwWideListing) save @* and @+",'~'.expand("")) - sil! let keepregstar = @* - sil! let keepregplus = @+ - endif - while line("$") >= newcolstart - if newcolend > line("$") | let newcolend= line("$") | endif - let newcolqty= newcolend - newcolstart - exe newcolstart - " COMBAK: both of the visual-mode using lines below are problematic vis-a-vis @* - if newcolqty == 0 - exe "sil! NetrwKeepj norm! 0\$h\"ax".w:netrw_bannercnt."G$\"ap" - else - exe "sil! NetrwKeepj norm! 0\".newcolqty.'j$h"ax'.w:netrw_bannercnt.'G$"ap' - endif - exe "sil! NetrwKeepj ".newcolstart.','.newcolend.'d _' - exe 'sil! NetrwKeepj '.w:netrw_bannercnt - endwhile - if has("clipboard") -" call Decho("(s:NetrwWideListing) restore @* and @+",'~'.expand("")) - if @* != keepregstar | sil! let @* = keepregstar | endif - if @+ != keepregplus | sil! let @+ = keepregplus | endif - endif - exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$s/\s\+$//e' - NetrwKeepj call histdel("/",-1) - exe 'nno w :call search(''^.\\|\s\s\zs\S'',''W'')'."\" - exe 'nno b :call search(''^.\\|\s\s\zs\S'',''bW'')'."\" -" call Decho("NetrwWideListing) setl noma nomod ro",'~'.expand("")) - exe "setl ".g:netrw_bufsettings - call s:RestoreRegister(dict) -" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) -" call Dret("NetrwWideListing") - return else - if hasmapto("w","n") - sil! nunmap w - endif - if hasmapto("b","n") - sil! nunmap b - endif + if hasmapto("w","n") + sil! nunmap w + endif + if hasmapto("b","n") + sil! nunmap b + endif endif endfun " --------------------------------------------------------------------- " s:PerformListing: {{{2 fun! s:PerformListing(islocal) -" call Dfunc("s:PerformListing(islocal=".a:islocal.")") -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) -" call Decho("settings: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (enter)"." ei<".&ei.">",'~'.expand("")) + " call Dfunc("s:PerformListing(islocal=".a:islocal.")") + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) + " call Decho("settings: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (enter)"." ei<".&ei.">",'~'.expand("")) sil! NetrwKeepj %d _ -" call DechoBuf(bufnr("%")) + " call DechoBuf(bufnr("%")) " set up syntax highlighting {{{3 -" call Decho("--set up syntax highlighting (ie. setl ft=netrw)",'~'.expand("")) + " call Decho("--set up syntax highlighting (ie. setl ft=netrw)",'~'.expand("")) sil! setl ft=netrw NetrwKeepj call s:NetrwOptionsSafe(a:islocal) setl noro ma -" call Decho("setl noro ma bh=".&bh,'~'.expand("")) + " call Decho("setl noro ma bh=".&bh,'~'.expand("")) -" if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 " Decho -" call Decho("Processing your browsing request...",'~'.expand("")) -" endif " Decho + " if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 " Decho + " call Decho("Processing your browsing request...",'~'.expand("")) + " endif " Decho -" call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("")) + " call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("")) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") - " force a refresh for tree listings -" call Decho("force refresh for treelisting: clear buffer<".expand("%")."> with :%d",'~'.expand("")) - sil! NetrwKeepj %d _ + " force a refresh for tree listings + " call Decho("force refresh for treelisting: clear buffer<".expand("%")."> with :%d",'~'.expand("")) + sil! NetrwKeepj %d _ endif " save current directory on directory history list @@ -9142,305 +9181,305 @@ fun! s:PerformListing(islocal) " Set up the banner {{{3 if g:netrw_banner -" call Decho("--set up banner",'~'.expand("")) - NetrwKeepj call setline(1,'" ============================================================================') - if exists("g:netrw_pchk") - " this undocumented option allows pchk to run with different versions of netrw without causing spurious - " failure detections. - NetrwKeepj call setline(2,'" Netrw Directory Listing') - else - NetrwKeepj call setline(2,'" Netrw Directory Listing (netrw '.g:loaded_netrw.')') - endif - if exists("g:netrw_pchk") - let curdir= substitute(b:netrw_curdir,expand("$HOME"),'~','') - else - let curdir= b:netrw_curdir - endif - if exists("g:netrw_bannerbackslash") && g:netrw_bannerbackslash - NetrwKeepj call setline(3,'" '.substitute(curdir,'/','\\','g')) - else - NetrwKeepj call setline(3,'" '.curdir) - endif - let w:netrw_bannercnt= 3 - NetrwKeepj exe "sil! NetrwKeepj ".w:netrw_bannercnt - else -" call Decho("--no banner",'~'.expand("")) - NetrwKeepj 1 - let w:netrw_bannercnt= 1 - endif -" call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." win#".winnr(),'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) + " call Decho("--set up banner",'~'.expand("")) + NetrwKeepj call setline(1,'" ============================================================================') + if exists("g:netrw_pchk") + " this undocumented option allows pchk to run with different versions of netrw without causing spurious + " failure detections. + NetrwKeepj call setline(2,'" Netrw Directory Listing') + else + NetrwKeepj call setline(2,'" Netrw Directory Listing (netrw '.g:loaded_netrw.')') + endif + if exists("g:netrw_pchk") + let curdir= substitute(b:netrw_curdir,expand("$HOME"),'~','') + else + let curdir= b:netrw_curdir + endif + if exists("g:netrw_bannerbackslash") && g:netrw_bannerbackslash + NetrwKeepj call setline(3,'" '.substitute(curdir,'/','\\','g')) + else + NetrwKeepj call setline(3,'" '.curdir) + endif + let w:netrw_bannercnt= 3 + NetrwKeepj exe "sil! NetrwKeepj ".w:netrw_bannercnt + else + " call Decho("--no banner",'~'.expand("")) + NetrwKeepj 1 + let w:netrw_bannercnt= 1 + endif + " call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." win#".winnr(),'~'.expand("")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) " construct sortby string: [name|time|size|exten] [reversed] let sortby= g:netrw_sort_by if g:netrw_sort_direction =~# "^r" - let sortby= sortby." reversed" + let sortby= sortby." reversed" endif " Sorted by... {{{3 if g:netrw_banner -" call Decho("--handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("")) - if g:netrw_sort_by =~# "^n" -" call Decho("directories will be sorted by name",'~'.expand("")) - " sorted by name (also includes the sorting sequence in the banner) - NetrwKeepj put ='\" Sorted by '.sortby - NetrwKeepj put ='\" Sort sequence: '.g:netrw_sort_sequence - let w:netrw_bannercnt= w:netrw_bannercnt + 2 - else -" call Decho("directories will be sorted by size or time",'~'.expand("")) - " sorted by time, size, exten - NetrwKeepj put ='\" Sorted by '.sortby - let w:netrw_bannercnt= w:netrw_bannercnt + 1 - endif - exe "sil! NetrwKeepj ".w:netrw_bannercnt -" else " Decho -" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) + " call Decho("--handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("")) + if g:netrw_sort_by =~# "^n" + " call Decho("directories will be sorted by name",'~'.expand("")) + " sorted by name (also includes the sorting sequence in the banner) + NetrwKeepj put ='\" Sorted by '.sortby + NetrwKeepj put ='\" Sort sequence: '.g:netrw_sort_sequence + let w:netrw_bannercnt= w:netrw_bannercnt + 2 + else + " call Decho("directories will be sorted by size or time",'~'.expand("")) + " sorted by time, size, exten + NetrwKeepj put ='\" Sorted by '.sortby + let w:netrw_bannercnt= w:netrw_bannercnt + 1 + endif + exe "sil! NetrwKeepj ".w:netrw_bannercnt + " else " Decho + " call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) endif " show copy/move target, if any {{{3 if g:netrw_banner - if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") -" call Decho("--show copy/move target<".s:netrwmftgt.">",'~'.expand("")) - NetrwKeepj put ='' - if s:netrwmftgt_islocal - sil! NetrwKeepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (local)') + if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") + " call Decho("--show copy/move target<".s:netrwmftgt.">",'~'.expand("")) + NetrwKeepj put ='' + if s:netrwmftgt_islocal + sil! NetrwKeepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (local)') + else + sil! NetrwKeepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (remote)') + endif + let w:netrw_bannercnt= w:netrw_bannercnt + 1 else - sil! NetrwKeepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (remote)') + " call Decho("s:netrwmftgt does not exist, don't make Copy/Move Tgt",'~'.expand("")) endif - let w:netrw_bannercnt= w:netrw_bannercnt + 1 - else -" call Decho("s:netrwmftgt does not exist, don't make Copy/Move Tgt",'~'.expand("")) - endif - exe "sil! NetrwKeepj ".w:netrw_bannercnt + exe "sil! NetrwKeepj ".w:netrw_bannercnt endif " Hiding... -or- Showing... {{{3 if g:netrw_banner -" call Decho("--handle hiding/showing in banner (g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("")) - if g:netrw_list_hide != "" && g:netrw_hide - if g:netrw_hide == 1 - NetrwKeepj put ='\" Hiding: '.g:netrw_list_hide - else - NetrwKeepj put ='\" Showing: '.g:netrw_list_hide + " call Decho("--handle hiding/showing in banner (g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("")) + if g:netrw_list_hide != "" && g:netrw_hide + if g:netrw_hide == 1 + NetrwKeepj put ='\" Hiding: '.g:netrw_list_hide + else + NetrwKeepj put ='\" Showing: '.g:netrw_list_hide + endif + let w:netrw_bannercnt= w:netrw_bannercnt + 1 endif - let w:netrw_bannercnt= w:netrw_bannercnt + 1 - endif - exe "NetrwKeepj ".w:netrw_bannercnt + exe "NetrwKeepj ".w:netrw_bannercnt -" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) - let quickhelp = g:netrw_quickhelp%len(s:QuickHelp) -" call Decho("quickhelp =".quickhelp,'~'.expand("")) - NetrwKeepj put ='\" Quick Help: :help '.s:QuickHelp[quickhelp] -" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) - NetrwKeepj put ='\" ==============================================================================' - let w:netrw_bannercnt= w:netrw_bannercnt + 2 -" else " Decho -" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) + " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + let quickhelp = g:netrw_quickhelp%len(s:QuickHelp) + " call Decho("quickhelp =".quickhelp,'~'.expand("")) + NetrwKeepj put ='\" Quick Help: :help '.s:QuickHelp[quickhelp] + " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + NetrwKeepj put ='\" ==============================================================================' + let w:netrw_bannercnt= w:netrw_bannercnt + 2 + " else " Decho + " call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) endif " bannercnt should index the line just after the banner if g:netrw_banner - let w:netrw_bannercnt= w:netrw_bannercnt + 1 - exe "sil! NetrwKeepj ".w:netrw_bannercnt -" call Decho("--w:netrw_bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$"),'~'.expand("")) -" else " Decho -" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) + let w:netrw_bannercnt= w:netrw_bannercnt + 1 + exe "sil! NetrwKeepj ".w:netrw_bannercnt + " call Decho("--w:netrw_bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$"),'~'.expand("")) + " else " Decho + " call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) endif " get list of files -" call Decho("--Get list of files - islocal=".a:islocal,'~'.expand("")) + " call Decho("--Get list of files - islocal=".a:islocal,'~'.expand("")) if a:islocal - NetrwKeepj call s:LocalListing() + NetrwKeepj call s:LocalListing() else " remote - NetrwKeepj let badresult= s:NetrwRemoteListing() - if badresult -" call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">",'~'.expand("")) -" call Dret("s:PerformListing : error detected by NetrwRemoteListing") - return - endif + NetrwKeepj let badresult= s:NetrwRemoteListing() + if badresult + " call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">",'~'.expand("")) + " call Dret("s:PerformListing : error detected by NetrwRemoteListing") + return + endif endif " manipulate the directory listing (hide, sort) {{{3 if !exists("w:netrw_bannercnt") - let w:netrw_bannercnt= 0 + let w:netrw_bannercnt= 0 endif -" call Decho("--manipulate directory listing (hide, sort)",'~'.expand("")) -" call Decho("g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)",'~'.expand("")) -" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) + " call Decho("--manipulate directory listing (hide, sort)",'~'.expand("")) + " call Decho("g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)",'~'.expand("")) + " call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) if !g:netrw_banner || line("$") >= w:netrw_bannercnt -" call Decho("manipulate directory listing (support hide)",'~'.expand("")) -" call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("")) - if g:netrw_hide && g:netrw_list_hide != "" - NetrwKeepj call s:NetrwListHide() - endif - if !g:netrw_banner || line("$") >= w:netrw_bannercnt -" call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("")) + " call Decho("manipulate directory listing (support hide)",'~'.expand("")) + " call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("")) + if g:netrw_hide && g:netrw_list_hide != "" + NetrwKeepj call s:NetrwListHide() + endif + if !g:netrw_banner || line("$") >= w:netrw_bannercnt + " call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("")) + + if g:netrw_sort_by =~# "^n" + " sort by name + " call Decho("sort by name",'~'.expand("")) + NetrwKeepj call s:NetrwSetSort() + + if !g:netrw_banner || w:netrw_bannercnt < line("$") + " call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) + if g:netrw_sort_direction =~# 'n' + " name: sort by name of file + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options + else + " reverse direction sorting + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options + endif + endif - if g:netrw_sort_by =~# "^n" - " sort by name -" call Decho("sort by name",'~'.expand("")) - NetrwKeepj call s:NetrwSetSort() - - if !g:netrw_banner || w:netrw_bannercnt < line("$") -" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) - if g:netrw_sort_direction =~# 'n' - " name: sort by name of file - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options - else - " reverse direction sorting - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options - endif - endif - - " remove priority pattern prefix -" call Decho("remove priority pattern prefix",'~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{3}'.g:netrw_sepchr.'//e' - NetrwKeepj call histdel("/",-1) - - elseif g:netrw_sort_by =~# "^ext" - " exten: sort by extension - " The histdel(...,-1) calls remove the last search from the search history -" call Decho("sort by extension",'~'.expand("")) - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g+/+s/^/001'.g:netrw_sepchr.'/' - NetrwKeepj call histdel("/",-1) - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v+[./]+s/^/002'.g:netrw_sepchr.'/' - NetrwKeepj call histdel("/",-1) - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v+['.g:netrw_sepchr.'/]+s/^\(.*\.\)\(.\{-\}\)$/\2'.g:netrw_sepchr.'&/e' - NetrwKeepj call histdel("/",-1) - if !g:netrw_banner || w:netrw_bannercnt < line("$") -" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) - if g:netrw_sort_direction =~# 'n' - " normal direction sorting - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options - else - " reverse direction sorting - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options - endif - endif - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^.\{-}'.g:netrw_sepchr.'//e' - NetrwKeepj call histdel("/",-1) - - elseif a:islocal - if !g:netrw_banner || w:netrw_bannercnt < line("$") -" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction,'~'.expand("")) - if g:netrw_sort_direction =~# 'n' -" call Decho('exe sil NetrwKeepj '.w:netrw_bannercnt.',$sort','~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options - else -" call Decho('exe sil NetrwKeepj '.w:netrw_bannercnt.',$sort!','~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options + " remove priority pattern prefix + " call Decho("remove priority pattern prefix",'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{3}'.g:netrw_sepchr.'//e' + NetrwKeepj call histdel("/",-1) + + elseif g:netrw_sort_by =~# "^ext" + " exten: sort by extension + " The histdel(...,-1) calls remove the last search from the search history + " call Decho("sort by extension",'~'.expand("")) + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g+/+s/^/001'.g:netrw_sepchr.'/' + NetrwKeepj call histdel("/",-1) + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v+[./]+s/^/002'.g:netrw_sepchr.'/' + NetrwKeepj call histdel("/",-1) + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v+['.g:netrw_sepchr.'/]+s/^\(.*\.\)\(.\{-\}\)$/\2'.g:netrw_sepchr.'&/e' + NetrwKeepj call histdel("/",-1) + if !g:netrw_banner || w:netrw_bannercnt < line("$") + " call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) + if g:netrw_sort_direction =~# 'n' + " normal direction sorting + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options + else + " reverse direction sorting + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options + endif + endif + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^.\{-}'.g:netrw_sepchr.'//e' + NetrwKeepj call histdel("/",-1) + + elseif a:islocal + if !g:netrw_banner || w:netrw_bannercnt < line("$") + " call Decho("g:netrw_sort_direction=".g:netrw_sort_direction,'~'.expand("")) + if g:netrw_sort_direction =~# 'n' + " call Decho('exe sil NetrwKeepj '.w:netrw_bannercnt.',$sort','~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options + else + " call Decho('exe sil NetrwKeepj '.w:netrw_bannercnt.',$sort!','~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options + endif + " call Decho("remove leading digits/ (sorting) information from listing",'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{-}\///e' + NetrwKeepj call histdel("/",-1) + endif endif -" call Decho("remove leading digits/ (sorting) information from listing",'~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{-}\///e' - NetrwKeepj call histdel("/",-1) - endif - endif - elseif g:netrw_sort_direction =~# 'r' -" call Decho('(s:PerformListing) reverse the sorted listing','~'.expand("")) - if !g:netrw_banner || w:netrw_bannercnt < line('$') - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g/^/m '.w:netrw_bannercnt - call histdel("/",-1) + elseif g:netrw_sort_direction =~# 'r' + " call Decho('(s:PerformListing) reverse the sorted listing','~'.expand("")) + if !g:netrw_banner || w:netrw_bannercnt < line('$') + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g/^/m '.w:netrw_bannercnt + call histdel("/",-1) + endif endif - endif endif -" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) + " call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) " convert to wide/tree listing {{{3 -" call Decho("--modify display if wide/tree listing style",'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#1)",'~'.expand("")) + " call Decho("--modify display if wide/tree listing style",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#1)",'~'.expand("")) NetrwKeepj call s:NetrwWideListing() -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#2)",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#2)",'~'.expand("")) NetrwKeepj call s:NetrwTreeListing(b:netrw_curdir) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#3)",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#3)",'~'.expand("")) " resolve symbolic links if local and (thin or tree) if a:islocal && (w:netrw_liststyle == s:THINLIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST)) -" call Decho("--resolve symbolic links if local and thin|tree",'~'.expand("")) - sil! keepp g/@$/call s:ShowLink() + " call Decho("--resolve symbolic links if local and thin|tree",'~'.expand("")) + sil! keepp g/@$/call s:ShowLink() endif if exists("w:netrw_bannercnt") && (line("$") >= w:netrw_bannercnt || !g:netrw_banner) - " place cursor on the top-left corner of the file listing -" call Decho("--place cursor on top-left corner of file listing",'~'.expand("")) - exe 'sil! '.w:netrw_bannercnt - sil! NetrwKeepj norm! 0 -" call Decho(" tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) + " place cursor on the top-left corner of the file listing + " call Decho("--place cursor on top-left corner of file listing",'~'.expand("")) + exe 'sil! '.w:netrw_bannercnt + sil! NetrwKeepj norm! 0 + " call Decho(" tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) else -" call Decho("--did NOT place cursor on top-left corner",'~'.expand("")) -" call Decho(" w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a'),'~'.expand("")) -" call Decho(" line($)=".line("$"),'~'.expand("")) -" call Decho(" g:netrw_banner=".(exists("g:netrw_banner")? g:netrw_banner : 'n/a'),'~'.expand("")) + " call Decho("--did NOT place cursor on top-left corner",'~'.expand("")) + " call Decho(" w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a'),'~'.expand("")) + " call Decho(" line($)=".line("$"),'~'.expand("")) + " call Decho(" g:netrw_banner=".(exists("g:netrw_banner")? g:netrw_banner : 'n/a'),'~'.expand("")) endif " record previous current directory let w:netrw_prvdir= b:netrw_curdir -" call Decho("--record netrw_prvdir<".w:netrw_prvdir.">",'~'.expand("")) + " call Decho("--record netrw_prvdir<".w:netrw_prvdir.">",'~'.expand("")) " save certain window-oriented variables into buffer-oriented variables {{{3 -" call Decho("--save some window-oriented variables into buffer oriented variables",'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#4)",'~'.expand("")) + " call Decho("--save some window-oriented variables into buffer oriented variables",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#4)",'~'.expand("")) NetrwKeepj call s:SetBufWinVars() -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#5)",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#5)",'~'.expand("")) NetrwKeepj call s:NetrwOptionsRestore("w:") -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#6)",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#6)",'~'.expand("")) " set display to netrw display settings -" call Decho("--set display to netrw display settings (".g:netrw_bufsettings.")",'~'.expand("")) + " call Decho("--set display to netrw display settings (".g:netrw_bufsettings.")",'~'.expand("")) exe "setl ".g:netrw_bufsettings -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#7)",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#7)",'~'.expand("")) if g:netrw_liststyle == s:LONGLIST -" call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("")) - exe "setl ts=".(g:netrw_maxfilenamelen+1) + " call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("")) + exe "setl ts=".(g:netrw_maxfilenamelen+1) endif -" call Decho("PerformListing buffer:",'~'.expand("")) -" call DechoBuf(bufnr("%")) + " call Decho("PerformListing buffer:",'~'.expand("")) + " call DechoBuf(bufnr("%")) if exists("s:treecurpos") -" call Decho("s:treecurpos exists; restore posn",'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#8)",'~'.expand("")) -" call Decho("restoring posn to s:treecurpos<".string(s:treecurpos).">",'~'.expand("")) - NetrwKeepj call winrestview(s:treecurpos) - unlet s:treecurpos + " call Decho("s:treecurpos exists; restore posn",'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#8)",'~'.expand("")) + " call Decho("restoring posn to s:treecurpos<".string(s:treecurpos).">",'~'.expand("")) + NetrwKeepj call winrestview(s:treecurpos) + unlet s:treecurpos endif -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (return)",'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) -" call Dret("s:PerformListing : curpos<".string(getpos(".")).">") + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (return)",'~'.expand("")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) + " call Dret("s:PerformListing : curpos<".string(getpos(".")).">") endfun " --------------------------------------------------------------------- " s:SetupNetrwStatusLine: {{{2 fun! s:SetupNetrwStatusLine(statline) -" call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)") + " call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)") if !exists("s:netrw_setup_statline") - let s:netrw_setup_statline= 1 -" call Decho("do first-time status line setup",'~'.expand("")) - - if !exists("s:netrw_users_stl") - let s:netrw_users_stl= &stl - endif - if !exists("s:netrw_users_ls") - let s:netrw_users_ls= &laststatus - endif + let s:netrw_setup_statline= 1 + " call Decho("do first-time status line setup",'~'.expand("")) - " set up User9 highlighting as needed - let dict={} - let dict.a=[getreg('a'), getregtype('a')] - redir @a - try - hi User9 - catch /^Vim\%((\a\{3,})\)\=:E411/ - if &bg == "dark" - hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue - else - hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue + if !exists("s:netrw_users_stl") + let s:netrw_users_stl= &stl + endif + if !exists("s:netrw_users_ls") + let s:netrw_users_ls= &laststatus endif - endtry - redir END - call s:RestoreRegister(dict) + + " set up User9 highlighting as needed + let dict={} + let dict.a=[getreg('a'), getregtype('a')] + redir @a + try + hi User9 + catch /^Vim\%((\a\{3,})\)\=:E411/ + if &bg == "dark" + hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue + else + hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue + endif + endtry + redir END + call s:RestoreRegister(dict) endif " set up status line (may use User9 highlighting) @@ -9448,10 +9487,10 @@ fun! s:SetupNetrwStatusLine(statline) " make sure statusline is displayed let &l:stl=a:statline setl laststatus=2 -" call Decho("stl=".&stl,'~'.expand("")) + " call Decho("stl=".&stl,'~'.expand("")) redraw -" call Dret("SetupNetrwStatusLine : stl=".&stl) + " call Dret("SetupNetrwStatusLine : stl=".&stl) endfun " ========================================= @@ -9464,343 +9503,343 @@ endfun " and reverse sorts will be requested of the server but not otherwise " enforced here. fun! s:NetrwRemoteFtpCmd(path,listcmd) -" call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) w:netrw_method=".(exists("w:netrw_method")? w:netrw_method : (exists("b:netrw_method")? b:netrw_method : "???"))) -" call Decho("line($)=".line("$")." win#".winnr()." w:netrw_bannercnt=".w:netrw_bannercnt,'~'.expand("")) + " call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) w:netrw_method=".(exists("w:netrw_method")? w:netrw_method : (exists("b:netrw_method")? b:netrw_method : "???"))) + " call Decho("line($)=".line("$")." win#".winnr()." w:netrw_bannercnt=".w:netrw_bannercnt,'~'.expand("")) " sanity check: {{{3 if !exists("w:netrw_method") - if exists("b:netrw_method") - let w:netrw_method= b:netrw_method - else - call netrw#ErrorMsg(2,"(s:NetrwRemoteFtpCmd) internal netrw error",93) -" call Dret("NetrwRemoteFtpCmd") - return - endif + if exists("b:netrw_method") + let w:netrw_method= b:netrw_method + else + call netrw#ErrorMsg(2,"(s:NetrwRemoteFtpCmd) internal netrw error",93) + " call Dret("NetrwRemoteFtpCmd") + return + endif endif - " WinXX ftp uses unix style input, so set ff to unix " {{{3 + " WinXX ftp uses unix style input, so set ff to unix " {{{3 let ffkeep= &ff setl ma ff=unix noro -" call Decho("setl ma ff=unix noro",'~'.expand("")) + " call Decho("setl ma ff=unix noro",'~'.expand("")) - " clear off any older non-banner lines " {{{3 + " clear off any older non-banner lines " {{{3 " note that w:netrw_bannercnt indexes the line after the banner -" call Decho('exe sil! NetrwKeepj '.w:netrw_bannercnt.",$d _ (clear off old non-banner lines)",'~'.expand("")) + " call Decho('exe sil! NetrwKeepj '.w:netrw_bannercnt.",$d _ (clear off old non-banner lines)",'~'.expand("")) exe "sil! NetrwKeepj ".w:netrw_bannercnt.",$d _" "......................................... - if w:netrw_method == 2 || w:netrw_method == 5 " {{{3 - " ftp + <.netrc>: Method #2 - if a:path != "" - NetrwKeepj put ='cd \"'.a:path.'\"' - endif - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('.'),'~'.expand("")) - endif - NetrwKeepj call setline(line("$")+1,a:listcmd) -" exe "NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."),''~''.expand(""))' - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1),'~'.expand("")) - exe s:netrw_silentxfer." NetrwKeepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1) - else -" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1),'~'.expand("")) - exe s:netrw_silentxfer." NetrwKeepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1) - endif + if w:netrw_method == 2 || w:netrw_method == 5 " {{{3 + " ftp + <.netrc>: Method #2 + if a:path != "" + NetrwKeepj put ='cd \"'.a:path.'\"' + endif + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline('.'),'~'.expand("")) + endif + NetrwKeepj call setline(line("$")+1,a:listcmd) + " exe "NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."),''~''.expand(""))' + if exists("g:netrw_port") && g:netrw_port != "" + " call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1),'~'.expand("")) + exe s:netrw_silentxfer." NetrwKeepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1) + else + " call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1),'~'.expand("")) + exe s:netrw_silentxfer." NetrwKeepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1) + endif - "......................................... - elseif w:netrw_method == 3 " {{{3 - " ftp + machine,id,passwd,filename: Method #3 + "......................................... + elseif w:netrw_method == 3 " {{{3 + " ftp + machine,id,passwd,filename: Method #3 setl ff=unix if exists("g:netrw_port") && g:netrw_port != "" - NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port + NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port else - NetrwKeepj put ='open '.g:netrw_machine + NetrwKeepj put ='open '.g:netrw_machine endif " handle userid and password let host= substitute(g:netrw_machine,'\..*$','','') -" call Decho("host<".host.">",'~'.expand("")) + " call Decho("host<".host.">",'~'.expand("")) if exists("s:netrw_hup") && exists("s:netrw_hup[host]") - call NetUserPass("ftp:".host) + call NetUserPass("ftp:".host) endif if exists("g:netrw_uid") && g:netrw_uid != "" - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - NetrwKeepj put =g:netrw_uid - if exists("s:netrw_passwd") && s:netrw_passwd != "" - NetrwKeepj put ='\"'.s:netrw_passwd.'\"' - endif - elseif exists("s:netrw_passwd") - NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' - endif - endif - - if a:path != "" - NetrwKeepj put ='cd \"'.a:path.'\"' - endif - if exists("g:netrw_ftpextracmd") - NetrwKeepj put =g:netrw_ftpextracmd -" call Decho("filter input: ".getline('.'),'~'.expand("")) - endif - NetrwKeepj call setline(line("$")+1,a:listcmd) - - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password - if exists("w:netrw_bannercnt") -" exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."),''~''.expand(""))' - call s:NetrwExe(s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) -" else " Decho -" call Decho("WARNING: w:netrw_bannercnt doesn't exist!",'~'.expand("")) -" g/^./call Decho("SKIPPING ftp#".line(".").": ".getline("."),'~'.expand("")) - endif + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + NetrwKeepj put =g:netrw_uid + if exists("s:netrw_passwd") && s:netrw_passwd != "" + NetrwKeepj put ='\"'.s:netrw_passwd.'\"' + endif + elseif exists("s:netrw_passwd") + NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' + endif + endif - "......................................... - elseif w:netrw_method == 9 " {{{3 - " sftp username@machine: Method #9 - " s:netrw_sftp_cmd - setl ff=unix + if a:path != "" + NetrwKeepj put ='cd \"'.a:path.'\"' + endif + if exists("g:netrw_ftpextracmd") + NetrwKeepj put =g:netrw_ftpextracmd + " call Decho("filter input: ".getline('.'),'~'.expand("")) + endif + NetrwKeepj call setline(line("$")+1,a:listcmd) + + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + if exists("w:netrw_bannercnt") + " exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."),''~''.expand(""))' + call s:NetrwExe(s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) + " else " Decho + " call Decho("WARNING: w:netrw_bannercnt doesn't exist!",'~'.expand("")) + " g/^./call Decho("SKIPPING ftp#".line(".").": ".getline("."),'~'.expand("")) + endif - " restore settings - let &l:ff= ffkeep -" call Dret("NetrwRemoteFtpCmd") - return + "......................................... + elseif w:netrw_method == 9 " {{{3 + " sftp username@machine: Method #9 + " s:netrw_sftp_cmd + setl ff=unix - "......................................... - else " {{{3 - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . bufname("%") . ">",23) + " restore settings + let &l:ff= ffkeep + " call Dret("NetrwRemoteFtpCmd") + return + + "......................................... + else " {{{3 + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . bufname("%") . ">",23) endif " cleanup for Windows " {{{3 if has("win32") - sil! NetrwKeepj %s/\r$//e - NetrwKeepj call histdel("/",-1) + sil! NetrwKeepj %s/\r$//e + NetrwKeepj call histdel("/",-1) endif if a:listcmd == "dir" - " infer directory/link based on the file permission string - sil! NetrwKeepj g/d\%([-r][-w][-x]\)\{3}/NetrwKeepj s@$@/@e - sil! NetrwKeepj g/l\%([-r][-w][-x]\)\{3}/NetrwKeepj s/$/@/e - NetrwKeepj call histdel("/",-1) - NetrwKeepj call histdel("/",-1) - if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST) - exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e' + " infer directory/link based on the file permission string + sil! NetrwKeepj g/d\%([-r][-w][-x]\)\{3}/NetrwKeepj s@$@/@e + sil! NetrwKeepj g/l\%([-r][-w][-x]\)\{3}/NetrwKeepj s/$/@/e NetrwKeepj call histdel("/",-1) - endif + NetrwKeepj call histdel("/",-1) + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST) + exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e' + NetrwKeepj call histdel("/",-1) + endif endif " ftp's listing doesn't seem to include ./ or ../ " {{{3 if !search('^\.\/$\|\s\.\/$','wn') - exe 'NetrwKeepj '.w:netrw_bannercnt - NetrwKeepj put ='./' + exe 'NetrwKeepj '.w:netrw_bannercnt + NetrwKeepj put ='./' endif if !search('^\.\.\/$\|\s\.\.\/$','wn') - exe 'NetrwKeepj '.w:netrw_bannercnt - NetrwKeepj put ='../' + exe 'NetrwKeepj '.w:netrw_bannercnt + NetrwKeepj put ='../' endif " restore settings " {{{3 let &l:ff= ffkeep -" call Dret("NetrwRemoteFtpCmd") + " call Dret("NetrwRemoteFtpCmd") endfun " --------------------------------------------------------------------- " s:NetrwRemoteListing: {{{2 fun! s:NetrwRemoteListing() -" call Dfunc("s:NetrwRemoteListing() b:netrw_curdir<".b:netrw_curdir.">) win#".winnr()) + " call Dfunc("s:NetrwRemoteListing() b:netrw_curdir<".b:netrw_curdir.">) win#".winnr()) if !exists("w:netrw_bannercnt") && exists("s:bannercnt") - let w:netrw_bannercnt= s:bannercnt + let w:netrw_bannercnt= s:bannercnt endif if !exists("w:netrw_bannercnt") && exists("b:bannercnt") - let w:netrw_bannercnt= b:bannercnt + let w:netrw_bannercnt= b:bannercnt endif call s:RemotePathAnalysis(b:netrw_curdir) " sanity check: if exists("b:netrw_method") && b:netrw_method =~ '[235]' -" call Decho("b:netrw_method=".b:netrw_method,'~'.expand("")) - if !executable("ftp") -" call Decho("ftp is not executable",'~'.expand("")) - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18) + " call Decho("b:netrw_method=".b:netrw_method,'~'.expand("")) + if !executable("ftp") + " call Decho("ftp is not executable",'~'.expand("")) + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18) + endif + call s:NetrwOptionsRestore("w:") + " call Dret("s:NetrwRemoteListing -1") + return -1 endif - call s:NetrwOptionsRestore("w:") -" call Dret("s:NetrwRemoteListing -1") - return -1 - endif elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == '' -" call Decho("g:netrw_list_cmd<",(exists("g:netrw_list_cmd")? 'n/a' : "-empty-").">",'~'.expand("")) - if !exists("g:netrw_quiet") - if g:netrw_list_cmd == "" - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your g:netrw_list_cmd is empty; perhaps ".g:netrw_ssh_cmd." is not executable on your system",47) - else - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19) + " call Decho("g:netrw_list_cmd<",(exists("g:netrw_list_cmd")? 'n/a' : "-empty-").">",'~'.expand("")) + if !exists("g:netrw_quiet") + if g:netrw_list_cmd == "" + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your g:netrw_list_cmd is empty; perhaps ".g:netrw_ssh_cmd." is not executable on your system",47) + else + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19) + endif endif - endif - NetrwKeepj call s:NetrwOptionsRestore("w:") -" call Dret("s:NetrwRemoteListing -1") - return -1 + NetrwKeepj call s:NetrwOptionsRestore("w:") + " call Dret("s:NetrwRemoteListing -1") + return -1 endif " (remote handling sanity check) -" call Decho("passed remote listing sanity checks",'~'.expand("")) + " call Decho("passed remote listing sanity checks",'~'.expand("")) if exists("b:netrw_method") -" call Decho("setting w:netrw_method to b:netrw_method<".b:netrw_method.">",'~'.expand("")) - let w:netrw_method= b:netrw_method + " call Decho("setting w:netrw_method to b:netrw_method<".b:netrw_method.">",'~'.expand("")) + let w:netrw_method= b:netrw_method endif if s:method == "ftp" - " use ftp to get remote file listing {{{3 -" call Decho("use ftp to get remote file listing",'~'.expand("")) - let s:method = "ftp" - let listcmd = g:netrw_ftp_list_cmd - if g:netrw_sort_by =~# '^t' - let listcmd= g:netrw_ftp_timelist_cmd - elseif g:netrw_sort_by =~# '^s' - let listcmd= g:netrw_ftp_sizelist_cmd - endif -" call Decho("listcmd<".listcmd."> (using g:netrw_ftp_list_cmd)",'~'.expand("")) - call s:NetrwRemoteFtpCmd(s:path,listcmd) -" exe "sil! keepalt NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."),''~''.expand(""))' - - " report on missing file or directory messages - if search('[Nn]o such file or directory\|Failed to change directory') - let mesg= getline(".") - if exists("w:netrw_bannercnt") - setl ma - exe w:netrw_bannercnt.",$d _" - setl noma + " use ftp to get remote file listing {{{3 + " call Decho("use ftp to get remote file listing",'~'.expand("")) + let s:method = "ftp" + let listcmd = g:netrw_ftp_list_cmd + if g:netrw_sort_by =~# '^t' + let listcmd= g:netrw_ftp_timelist_cmd + elseif g:netrw_sort_by =~# '^s' + let listcmd= g:netrw_ftp_sizelist_cmd + endif + " call Decho("listcmd<".listcmd."> (using g:netrw_ftp_list_cmd)",'~'.expand("")) + call s:NetrwRemoteFtpCmd(s:path,listcmd) + " exe "sil! keepalt NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."),''~''.expand(""))' + + " report on missing file or directory messages + if search('[Nn]o such file or directory\|Failed to change directory') + let mesg= getline(".") + if exists("w:netrw_bannercnt") + setl ma + exe w:netrw_bannercnt.",$d _" + setl noma + endif + NetrwKeepj call s:NetrwOptionsRestore("w:") + call netrw#ErrorMsg(s:WARNING,mesg,96) + " call Dret("s:NetrwRemoteListing : -1") + return -1 endif - NetrwKeepj call s:NetrwOptionsRestore("w:") - call netrw#ErrorMsg(s:WARNING,mesg,96) -" call Dret("s:NetrwRemoteListing : -1") - return -1 - endif - - if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST) - " shorten the listing -" call Decho("generate short listing",'~'.expand("")) - exe "sil! keepalt NetrwKeepj ".w:netrw_bannercnt - " cleanup - if g:netrw_ftp_browse_reject != "" - exe "sil! keepalt NetrwKeepj g/".g:netrw_ftp_browse_reject."/NetrwKeepj d" - NetrwKeepj call histdel("/",-1) - endif - sil! NetrwKeepj %s/\r$//e - NetrwKeepj call histdel("/",-1) + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST) + " shorten the listing + " call Decho("generate short listing",'~'.expand("")) + exe "sil! keepalt NetrwKeepj ".w:netrw_bannercnt - " if there's no ../ listed, then put ../ in - let line1= line(".") - exe "sil! NetrwKeepj ".w:netrw_bannercnt - let line2= search('\.\.\/\%(\s\|$\)','cnW') -" call Decho("search(".'\.\.\/\%(\s\|$\)'."','cnW')=".line2." w:netrw_bannercnt=".w:netrw_bannercnt,'~'.expand("")) - if line2 == 0 -" call Decho("netrw is putting ../ into listing",'~'.expand("")) - sil! NetrwKeepj put='../' + " cleanup + if g:netrw_ftp_browse_reject != "" + exe "sil! keepalt NetrwKeepj g/".g:netrw_ftp_browse_reject."/NetrwKeepj d" + NetrwKeepj call histdel("/",-1) + endif + sil! NetrwKeepj %s/\r$//e + NetrwKeepj call histdel("/",-1) + + " if there's no ../ listed, then put ../ in + let line1= line(".") + exe "sil! NetrwKeepj ".w:netrw_bannercnt + let line2= search('\.\.\/\%(\s\|$\)','cnW') + " call Decho("search(".'\.\.\/\%(\s\|$\)'."','cnW')=".line2." w:netrw_bannercnt=".w:netrw_bannercnt,'~'.expand("")) + if line2 == 0 + " call Decho("netrw is putting ../ into listing",'~'.expand("")) + sil! NetrwKeepj put='../' + endif + exe "sil! NetrwKeepj ".line1 + sil! NetrwKeepj norm! 0 + + " call Decho("line1=".line1." line2=".line2." line(.)=".line("."),'~'.expand("")) + if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup + " call Decho("M$ ftp cleanup",'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(\|\d\+\)\s\+//' + NetrwKeepj call histdel("/",-1) + else " normal ftp cleanup + " call Decho("normal ftp cleanup",'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e' + exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e' + exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e' + NetrwKeepj call histdel("/",-1) + NetrwKeepj call histdel("/",-1) + NetrwKeepj call histdel("/",-1) + endif endif - exe "sil! NetrwKeepj ".line1 - sil! NetrwKeepj norm! 0 -" call Decho("line1=".line1." line2=".line2." line(.)=".line("."),'~'.expand("")) - if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup -" call Decho("M$ ftp cleanup",'~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(\|\d\+\)\s\+//' - NetrwKeepj call histdel("/",-1) - else " normal ftp cleanup -" call Decho("normal ftp cleanup",'~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e' - exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e' - exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e' - NetrwKeepj call histdel("/",-1) - NetrwKeepj call histdel("/",-1) - NetrwKeepj call histdel("/",-1) - endif - endif - - else - " use ssh to get remote file listing {{{3 -" call Decho("use ssh to get remote file listing: s:path<".s:path.">",'~'.expand("")) - let listcmd= s:MakeSshCmd(g:netrw_list_cmd) -" call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)",'~'.expand("")) - if g:netrw_scp_cmd =~ '^pscp' -" call Decho("1: exe r! ".s:ShellEscape(listcmd.s:path, 1),'~'.expand("")) - exe "NetrwKeepj r! ".listcmd.s:ShellEscape(s:path, 1) - " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like - sil! NetrwKeepj g/^Listing directory/NetrwKeepj d - sil! NetrwKeepj g/^d[-rwx][-rwx][-rwx]/NetrwKeepj s+$+/+e - sil! NetrwKeepj g/^l[-rwx][-rwx][-rwx]/NetrwKeepj s+$+@+e - NetrwKeepj call histdel("/",-1) - NetrwKeepj call histdel("/",-1) - NetrwKeepj call histdel("/",-1) - if g:netrw_liststyle != s:LONGLIST - sil! NetrwKeepj g/^[dlsp-][-rwx][-rwx][-rwx]/NetrwKeepj s/^.*\s\(\S\+\)$/\1/e - NetrwKeepj call histdel("/",-1) - endif - else - if s:path == "" -" call Decho("2: exe r! ".listcmd,'~'.expand("")) - exe "NetrwKeepj keepalt r! ".listcmd + else + " use ssh to get remote file listing {{{3 + " call Decho("use ssh to get remote file listing: s:path<".s:path.">",'~'.expand("")) + let listcmd= s:MakeSshCmd(g:netrw_list_cmd) + " call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)",'~'.expand("")) + if g:netrw_scp_cmd =~ '^pscp' + " call Decho("1: exe r! ".s:ShellEscape(listcmd.s:path, 1),'~'.expand("")) + exe "NetrwKeepj r! ".listcmd.s:ShellEscape(s:path, 1) + " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like + sil! NetrwKeepj g/^Listing directory/NetrwKeepj d + sil! NetrwKeepj g/^d[-rwx][-rwx][-rwx]/NetrwKeepj s+$+/+e + sil! NetrwKeepj g/^l[-rwx][-rwx][-rwx]/NetrwKeepj s+$+@+e + NetrwKeepj call histdel("/",-1) + NetrwKeepj call histdel("/",-1) + NetrwKeepj call histdel("/",-1) + if g:netrw_liststyle != s:LONGLIST + sil! NetrwKeepj g/^[dlsp-][-rwx][-rwx][-rwx]/NetrwKeepj s/^.*\s\(\S\+\)$/\1/e + NetrwKeepj call histdel("/",-1) + endif else -" call Decho("3: exe r! ".listcmd.' '.s:ShellEscape(fnameescape(s:path),1),'~'.expand("")) - exe "NetrwKeepj keepalt r! ".listcmd.' '.s:ShellEscape(fnameescape(s:path),1) -" call Decho("listcmd<".listcmd."> path<".s:path.">",'~'.expand("")) + if s:path == "" + " call Decho("2: exe r! ".listcmd,'~'.expand("")) + exe "NetrwKeepj keepalt r! ".listcmd + else + " call Decho("3: exe r! ".listcmd.' '.s:ShellEscape(fnameescape(s:path),1),'~'.expand("")) + exe "NetrwKeepj keepalt r! ".listcmd.' '.s:ShellEscape(fnameescape(s:path),1) + " call Decho("listcmd<".listcmd."> path<".s:path.">",'~'.expand("")) + endif endif - endif - " cleanup - if g:netrw_ssh_browse_reject != "" -" call Decho("cleanup: exe sil! g/".g:netrw_ssh_browse_reject."/NetrwKeepj d",'~'.expand("")) - exe "sil! g/".g:netrw_ssh_browse_reject."/NetrwKeepj d" - NetrwKeepj call histdel("/",-1) - endif + " cleanup + if g:netrw_ssh_browse_reject != "" + " call Decho("cleanup: exe sil! g/".g:netrw_ssh_browse_reject."/NetrwKeepj d",'~'.expand("")) + exe "sil! g/".g:netrw_ssh_browse_reject."/NetrwKeepj d" + NetrwKeepj call histdel("/",-1) + endif endif if w:netrw_liststyle == s:LONGLIST - " do a long listing; these substitutions need to be done prior to sorting {{{3 -" call Decho("fix long listing:",'~'.expand("")) + " do a long listing; these substitutions need to be done prior to sorting {{{3 + " call Decho("fix long listing:",'~'.expand("")) + + if s:method == "ftp" + " cleanup + exe "sil! NetrwKeepj ".w:netrw_bannercnt + while getline('.') =~# g:netrw_ftp_browse_reject + sil! NetrwKeepj d + endwhile + " if there's no ../ listed, then put ../ in + let line1= line(".") + sil! NetrwKeepj 1 + sil! NetrwKeepj call search('^\.\.\/\%(\s\|$\)','W') + let line2= line(".") + if line2 == 0 + if b:netrw_curdir != '/' + exe 'sil! NetrwKeepj '.w:netrw_bannercnt."put='../'" + endif + endif + exe "sil! NetrwKeepj ".line1 + sil! NetrwKeepj norm! 0 + endif - if s:method == "ftp" - " cleanup - exe "sil! NetrwKeepj ".w:netrw_bannercnt - while getline('.') =~# g:netrw_ftp_browse_reject - sil! NetrwKeepj d - endwhile - " if there's no ../ listed, then put ../ in - let line1= line(".") - sil! NetrwKeepj 1 - sil! NetrwKeepj call search('^\.\.\/\%(\s\|$\)','W') - let line2= line(".") - if line2 == 0 - if b:netrw_curdir != '/' - exe 'sil! NetrwKeepj '.w:netrw_bannercnt."put='../'" - endif - endif - exe "sil! NetrwKeepj ".line1 - sil! NetrwKeepj norm! 0 - endif - - if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup -" call Decho("M$ ftp site listing cleanup",'~'.expand("")) - exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(\|\d\+\)\s\+\)\(\w.*\)$/\2\t\1/' - elseif exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") -" call Decho("normal ftp site listing cleanup: bannercnt=".w:netrw_bannercnt." line($)=".line("$"),'~'.expand("")) - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/ -> .*$//e' - exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2 \t\1/e' - exe 'sil NetrwKeepj '.w:netrw_bannercnt - NetrwKeepj call histdel("/",-1) - NetrwKeepj call histdel("/",-1) - NetrwKeepj call histdel("/",-1) - endif + if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup + " call Decho("M$ ftp site listing cleanup",'~'.expand("")) + exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(\|\d\+\)\s\+\)\(\w.*\)$/\2\t\1/' + elseif exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") + " call Decho("normal ftp site listing cleanup: bannercnt=".w:netrw_bannercnt." line($)=".line("$"),'~'.expand("")) + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/ -> .*$//e' + exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2 \t\1/e' + exe 'sil NetrwKeepj '.w:netrw_bannercnt + NetrwKeepj call histdel("/",-1) + NetrwKeepj call histdel("/",-1) + NetrwKeepj call histdel("/",-1) + endif endif -" if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho -" exe "NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."),''~''.expand(""))' -" endif " Decho + " if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho + " exe "NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."),''~''.expand(""))' + " endif " Decho -" call Dret("s:NetrwRemoteListing 0") + " call Dret("s:NetrwRemoteListing 0") return 0 endfun @@ -9811,37 +9850,37 @@ fun! s:NetrwRemoteRm(usrhost,path) range let all= 0 if exists("s:netrwmarkfilelist_{bufnr('%')}") - " remove all marked files - for fname in s:netrwmarkfilelist_{bufnr("%")} - let ok= s:NetrwRemoteRmFile(a:path,fname,all) - if ok =~# 'q\%[uit]' - break - elseif ok =~# 'a\%[ll]' - let all= 1 - endif - endfor - call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + " remove all marked files + for fname in s:netrwmarkfilelist_{bufnr("%")} + let ok= s:NetrwRemoteRmFile(a:path,fname,all) + if ok =~# 'q\%[uit]' + break + elseif ok =~# 'a\%[ll]' + let all= 1 + endif + endfor + call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) else - " remove files specified by range + " remove files specified by range - " preparation for removing multiple files/directories - let keepsol = &l:sol - setl nosol - let ctr = a:firstline + " preparation for removing multiple files/directories + let keepsol = &l:sol + setl nosol + let ctr = a:firstline - " remove multiple files and directories - while ctr <= a:lastline - exe "NetrwKeepj ".ctr - let ok= s:NetrwRemoteRmFile(a:path,s:NetrwGetWord(),all) - if ok =~# 'q\%[uit]' - break - elseif ok =~# 'a\%[ll]' - let all= 1 - endif - let ctr= ctr + 1 - endwhile - let &l:sol = keepsol + " remove multiple files and directories + while ctr <= a:lastline + exe "NetrwKeepj ".ctr + let ok= s:NetrwRemoteRmFile(a:path,s:NetrwGetWord(),all) + if ok =~# 'q\%[uit]' + break + elseif ok =~# 'a\%[ll]' + let all= 1 + endif + let ctr= ctr + 1 + endwhile + let &l:sol = keepsol endif " refresh the (remote) directory listing @@ -9852,120 +9891,120 @@ endfun " --------------------------------------------------------------------- " s:NetrwRemoteRmFile: {{{2 fun! s:NetrwRemoteRmFile(path,rmfile,all) -" call Dfunc("s:NetrwRemoteRmFile(path<".a:path."> rmfile<".a:rmfile.">) all=".a:all) + " call Dfunc("s:NetrwRemoteRmFile(path<".a:path."> rmfile<".a:rmfile.">) all=".a:all) let all= a:all let ok = "" if a:rmfile !~ '^"' && (a:rmfile =~ '@$' || a:rmfile !~ '[\/]$') - " attempt to remove file -" call Decho("attempt to remove file (all=".all.")",'~'.expand("")) - if !all - echohl Statement -" call Decho("case all=0:",'~'.expand("")) - call inputsave() - let ok= input("Confirm deletion of file<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - echohl NONE - if ok == "" - let ok="no" - endif - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') - if ok =~# 'a\%[ll]' - let all= 1 - endif - endif - - if all || ok =~# 'y\%[es]' || ok == "" -" call Decho("case all=".all." or ok<".ok.">".(exists("w:netrw_method")? ': netrw_method='.w:netrw_method : ""),'~'.expand("")) - if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) -" call Decho("case ftp:",'~'.expand("")) - let path= a:path - if path =~ '^\a\{3,}://' - let path= substitute(path,'^\a\{3,}://[^/]\+/','','') - endif - sil! NetrwKeepj .,$d _ - call s:NetrwRemoteFtpCmd(path,"delete ".'"'.a:rmfile.'"') - else -" call Decho("case ssh: g:netrw_rm_cmd<".g:netrw_rm_cmd.">",'~'.expand("")) - let netrw_rm_cmd= s:MakeSshCmd(g:netrw_rm_cmd) -" call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("")) - if !exists("b:netrw_curdir") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53) - let ok="q" - else - let remotedir= substitute(b:netrw_curdir,'^.\{-}//[^/]\+/\(.*\)$','\1','') -" call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("")) -" call Decho("remotedir<".remotedir.">",'~'.expand("")) -" call Decho("rmfile<".a:rmfile.">",'~'.expand("")) - if remotedir != "" - let netrw_rm_cmd= netrw_rm_cmd." ".s:ShellEscape(fnameescape(remotedir.a:rmfile)) - else - let netrw_rm_cmd= netrw_rm_cmd." ".s:ShellEscape(fnameescape(a:rmfile)) + " attempt to remove file + " call Decho("attempt to remove file (all=".all.")",'~'.expand("")) + if !all + echohl Statement + " call Decho("case all=0:",'~'.expand("")) + call inputsave() + let ok= input("Confirm deletion of file<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + call inputrestore() + echohl NONE + if ok == "" + let ok="no" endif -" call Decho("call system(".netrw_rm_cmd.")",'~'.expand("")) - let ret= system(netrw_rm_cmd) - if v:shell_error != 0 - if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir - call netrw#ErrorMsg(s:ERROR,"remove failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",102) - else - call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60) - endif - elseif ret != 0 - call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60) + let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') + if ok =~# 'a\%[ll]' + let all= 1 endif -" call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("")) - endif endif - elseif ok =~# 'q\%[uit]' -" call Decho("ok==".ok,'~'.expand("")) - endif - else - " attempt to remove directory -" call Decho("attempt to remove directory",'~'.expand("")) - if !all - call inputsave() - let ok= input("Confirm deletion of directory<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - if ok == "" - let ok="no" - endif - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') - if ok =~# 'a\%[ll]' - let all= 1 + if all || ok =~# 'y\%[es]' || ok == "" + " call Decho("case all=".all." or ok<".ok.">".(exists("w:netrw_method")? ': netrw_method='.w:netrw_method : ""),'~'.expand("")) + if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) + " call Decho("case ftp:",'~'.expand("")) + let path= a:path + if path =~ '^\a\{3,}://' + let path= substitute(path,'^\a\{3,}://[^/]\+/','','') + endif + sil! NetrwKeepj .,$d _ + call s:NetrwRemoteFtpCmd(path,"delete ".'"'.a:rmfile.'"') + else + " call Decho("case ssh: g:netrw_rm_cmd<".g:netrw_rm_cmd.">",'~'.expand("")) + let netrw_rm_cmd= s:MakeSshCmd(g:netrw_rm_cmd) + " call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("")) + if !exists("b:netrw_curdir") + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53) + let ok="q" + else + let remotedir= substitute(b:netrw_curdir,'^.\{-}//[^/]\+/\(.*\)$','\1','') + " call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("")) + " call Decho("remotedir<".remotedir.">",'~'.expand("")) + " call Decho("rmfile<".a:rmfile.">",'~'.expand("")) + if remotedir != "" + let netrw_rm_cmd= netrw_rm_cmd." ".s:ShellEscape(fnameescape(remotedir.a:rmfile)) + else + let netrw_rm_cmd= netrw_rm_cmd." ".s:ShellEscape(fnameescape(a:rmfile)) + endif + " call Decho("call system(".netrw_rm_cmd.")",'~'.expand("")) + let ret= system(netrw_rm_cmd) + if v:shell_error != 0 + if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir + call netrw#ErrorMsg(s:ERROR,"remove failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",102) + else + call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60) + endif + elseif ret != 0 + call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60) + endif + " call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("")) + endif + endif + elseif ok =~# 'q\%[uit]' + " call Decho("ok==".ok,'~'.expand("")) endif - endif - if all || ok =~# 'y\%[es]' || ok == "" - if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) - NetrwKeepj call s:NetrwRemoteFtpCmd(a:path,"rmdir ".a:rmfile) - else - let rmfile = substitute(a:path.a:rmfile,'/$','','') - let netrw_rmdir_cmd = s:MakeSshCmd(netrw#WinPath(g:netrw_rmdir_cmd)).' '.s:ShellEscape(netrw#WinPath(rmfile)) -" call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")",'~'.expand("")) - let ret= system(netrw_rmdir_cmd) -" call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("")) - - if v:shell_error != 0 -" call Decho("v:shell_error not 0",'~'.expand("")) - let netrw_rmf_cmd= s:MakeSshCmd(netrw#WinPath(g:netrw_rmf_cmd)).' '.s:ShellEscape(netrw#WinPath(substitute(rmfile,'[\/]$','','e'))) -" call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")",'~'.expand("")) - let ret= system(netrw_rmf_cmd) -" call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("")) - - if v:shell_error != 0 && !exists("g:netrw_quiet") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",22) + else + " attempt to remove directory + " call Decho("attempt to remove directory",'~'.expand("")) + if !all + call inputsave() + let ok= input("Confirm deletion of directory<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + call inputrestore() + if ok == "" + let ok="no" + endif + let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') + if ok =~# 'a\%[ll]' + let all= 1 endif - endif endif - elseif ok =~# 'q\%[uit]' -" call Decho("ok==".ok,'~'.expand("")) - endif + if all || ok =~# 'y\%[es]' || ok == "" + if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) + NetrwKeepj call s:NetrwRemoteFtpCmd(a:path,"rmdir ".a:rmfile) + else + let rmfile = substitute(a:path.a:rmfile,'/$','','') + let netrw_rmdir_cmd = s:MakeSshCmd(netrw#WinPath(g:netrw_rmdir_cmd)).' '.s:ShellEscape(netrw#WinPath(rmfile)) + " call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")",'~'.expand("")) + let ret= system(netrw_rmdir_cmd) + " call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("")) + + if v:shell_error != 0 + " call Decho("v:shell_error not 0",'~'.expand("")) + let netrw_rmf_cmd= s:MakeSshCmd(netrw#WinPath(g:netrw_rmf_cmd)).' '.s:ShellEscape(netrw#WinPath(substitute(rmfile,'[\/]$','','e'))) + " call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")",'~'.expand("")) + let ret= system(netrw_rmf_cmd) + " call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("")) + + if v:shell_error != 0 && !exists("g:netrw_quiet") + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",22) + endif + endif + endif + + elseif ok =~# 'q\%[uit]' + " call Decho("ok==".ok,'~'.expand("")) + endif endif -" call Dret("s:NetrwRemoteRmFile ".ok) + " call Dret("s:NetrwRemoteRmFile ".ok) return ok endfun @@ -9975,62 +10014,62 @@ fun! s:NetrwRemoteRename(usrhost,path) range " preparation for removing multiple files/directories let svpos = winsaveview() -" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) + " call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) let ctr = a:firstline let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd) " rename files given by the markfilelist if exists("s:netrwmarkfilelist_{bufnr('%')}") - for oldname in s:netrwmarkfilelist_{bufnr("%")} - if exists("subfrom") - let newname= substitute(oldname,subfrom,subto,'') - else - call inputsave() - let newname= input("Moving ".oldname." to : ",oldname) - call inputrestore() - if newname =~ '^s/' - let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','') - let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','') - let newname = substitute(oldname,subfrom,subto,'') - endif - endif + for oldname in s:netrwmarkfilelist_{bufnr("%")} + if exists("subfrom") + let newname= substitute(oldname,subfrom,subto,'') + else + call inputsave() + let newname= input("Moving ".oldname." to : ",oldname) + call inputrestore() + if newname =~ '^s/' + let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','') + let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','') + let newname = substitute(oldname,subfrom,subto,'') + endif + endif - if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) - NetrwKeepj call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname) - else - let oldname= s:ShellEscape(a:path.oldname) - let newname= s:ShellEscape(a:path.newname) - let ret = system(netrw#WinPath(rename_cmd).' '.oldname.' '.newname) - endif + if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) + NetrwKeepj call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname) + else + let oldname= s:ShellEscape(a:path.oldname) + let newname= s:ShellEscape(a:path.newname) + let ret = system(netrw#WinPath(rename_cmd).' '.oldname.' '.newname) + endif - endfor - call s:NetrwUnMarkFile(1) + endfor + call s:NetrwUnMarkFile(1) else - " attempt to rename files/directories - let keepsol= &l:sol - setl nosol - while ctr <= a:lastline - exe "NetrwKeepj ".ctr + " attempt to rename files/directories + let keepsol= &l:sol + setl nosol + while ctr <= a:lastline + exe "NetrwKeepj ".ctr - let oldname= s:NetrwGetWord() + let oldname= s:NetrwGetWord() - call inputsave() - let newname= input("Moving ".oldname." to : ",oldname) - call inputrestore() + call inputsave() + let newname= input("Moving ".oldname." to : ",oldname) + call inputrestore() - if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) - call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname) - else - let oldname= s:ShellEscape(a:path.oldname) - let newname= s:ShellEscape(a:path.newname) - let ret = system(netrw#WinPath(rename_cmd).' '.oldname.' '.newname) - endif + if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) + call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname) + else + let oldname= s:ShellEscape(a:path.oldname) + let newname= s:ShellEscape(a:path.newname) + let ret = system(netrw#WinPath(rename_cmd).' '.oldname.' '.newname) + endif - let ctr= ctr + 1 - endwhile - let &l:sol= keepsol + let ctr= ctr + 1 + endwhile + let &l:sol= keepsol endif " refresh the directory @@ -10054,39 +10093,39 @@ endfun " file:///c:/foo.txt " and %XX (where X is [0-9a-fA-F] is converted into a character with the given hexadecimal value fun! netrw#FileUrlEdit(fname) -" call Dfunc("netrw#FileUrlEdit(fname<".a:fname.">)") + " call Dfunc("netrw#FileUrlEdit(fname<".a:fname.">)") let fname = a:fname if fname =~ '^file://localhost/' -" call Decho('converting file://localhost/ -to- file:///','~'.expand("")) - let fname= substitute(fname,'^file://localhost/','file:///','') -" call Decho("fname<".fname.">",'~'.expand("")) + " call Decho('converting file://localhost/ -to- file:///','~'.expand("")) + let fname= substitute(fname,'^file://localhost/','file:///','') + " call Decho("fname<".fname.">",'~'.expand("")) endif if has("win32") - if fname =~ '^file:///\=\a[|:]/' -" call Decho('converting file:///\a|/ -to- file://\a:/','~'.expand("")) - let fname = substitute(fname,'^file:///\=\(\a\)[|:]/','file://\1:/','') -" call Decho("fname<".fname.">",'~'.expand("")) - endif + if fname =~ '^file:///\=\a[|:]/' + " call Decho('converting file:///\a|/ -to- file://\a:/','~'.expand("")) + let fname = substitute(fname,'^file:///\=\(\a\)[|:]/','file://\1:/','') + " call Decho("fname<".fname.">",'~'.expand("")) + endif endif let fname2396 = netrw#RFC2396(fname) let fname2396e= fnameescape(fname2396) let plainfname= substitute(fname2396,'file://\(.*\)','\1',"") if has("win32") -" call Decho("windows exception for plainfname",'~'.expand("")) - if plainfname =~ '^/\+\a:' -" call Decho('removing leading "/"s','~'.expand("")) - let plainfname= substitute(plainfname,'^/\+\(\a:\)','\1','') - endif + " call Decho("windows exception for plainfname",'~'.expand("")) + if plainfname =~ '^/\+\a:' + " call Decho('removing leading "/"s','~'.expand("")) + let plainfname= substitute(plainfname,'^/\+\(\a:\)','\1','') + endif endif -" call Decho("fname2396<".fname2396.">",'~'.expand("")) -" call Decho("plainfname<".plainfname.">",'~'.expand("")) + " call Decho("fname2396<".fname2396.">",'~'.expand("")) + " call Decho("plainfname<".plainfname.">",'~'.expand("")) exe "sil doau BufReadPre ".fname2396e exe 'NetrwKeepj keepalt edit '.plainfname exe 'sil! NetrwKeepj keepalt bdelete '.fnameescape(a:fname) -" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) -" call Dret("netrw#FileUrlEdit") + " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + " call Dret("netrw#FileUrlEdit") exe "sil doau BufReadPost ".fname2396e endfun @@ -10104,56 +10143,56 @@ fun! netrw#LocalBrowseCheck(dirname) " The &ft == "netrw" test was installed because the BufEnter event " would hit when re-entering netrw windows, creating unexpected " refreshes (and would do so in the middle of NetrwSaveOptions(), too) -" call Dfunc("netrw#LocalBrowseCheck(dirname<".a:dirname.">)") -" call Decho("isdir<".a:dirname."> =".isdirectory(s:NetrwFile(a:dirname)).((exists("s:treeforceredraw")? " treeforceredraw" : "")).'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Dfunc("netrw#LocalBrowseCheck(dirname<".a:dirname.">)") + " call Decho("isdir<".a:dirname."> =".isdirectory(s:NetrwFile(a:dirname)).((exists("s:treeforceredraw")? " treeforceredraw" : "")).'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) " getting E930: Cannot use :redir inside execute -"" call Dredir("ls!","netrw#LocalBrowseCheck") -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) -" call Decho("current buffer#".bufnr("%")."<".bufname("%")."> ft=".&ft,'~'.expand("")) + "" call Dredir("ls!","netrw#LocalBrowseCheck") + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Decho("current buffer#".bufnr("%")."<".bufname("%")."> ft=".&ft,'~'.expand("")) let ykeep= @@ if isdirectory(s:NetrwFile(a:dirname)) -" call Decho("is-directory ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")." ft<".&ft."> g:netrw_fastbrowse=".g:netrw_fastbrowse,'~'.expand("")) + " call Decho("is-directory ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")." ft<".&ft."> g:netrw_fastbrowse=".g:netrw_fastbrowse,'~'.expand("")) - if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname) || g:netrw_fastbrowse <= 1 -" call Decho("case 1 : ft=".&ft,'~'.expand("")) -" call Decho("s:rexposn_".bufnr("%")."<".bufname("%")."> ".(exists("s:rexposn_".bufnr("%"))? "exists" : "does not exist"),'~'.expand("")) - sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname) + if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname) || g:netrw_fastbrowse <= 1 + " call Decho("case 1 : ft=".&ft,'~'.expand("")) + " call Decho("s:rexposn_".bufnr("%")."<".bufname("%")."> ".(exists("s:rexposn_".bufnr("%"))? "exists" : "does not exist"),'~'.expand("")) + sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname) - elseif &ft == "netrw" && line("$") == 1 -" call Decho("case 2 (ft≡netrw && line($)≡1)",'~'.expand("")) - sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname) + elseif &ft == "netrw" && line("$") == 1 + " call Decho("case 2 (ft≡netrw && line($)≡1)",'~'.expand("")) + sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname) - elseif exists("s:treeforceredraw") -" call Decho("case 3 (treeforceredraw)",'~'.expand("")) - unlet s:treeforceredraw - sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname) - endif -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) -" call Dret("netrw#LocalBrowseCheck") - return + elseif exists("s:treeforceredraw") + " call Decho("case 3 (treeforceredraw)",'~'.expand("")) + unlet s:treeforceredraw + sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname) + endif + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Dret("netrw#LocalBrowseCheck") + return endif " The following code wipes out currently unused netrw buffers " IF g:netrw_fastbrowse is zero (ie. slow browsing selected) " AND IF the listing style is not a tree listing if exists("g:netrw_fastbrowse") && g:netrw_fastbrowse == 0 && g:netrw_liststyle != s:TREELIST -" call Decho("wiping out currently unused netrw buffers",'~'.expand("")) - let ibuf = 1 - let buflast = bufnr("$") - while ibuf <= buflast - if bufwinnr(ibuf) == -1 && isdirectory(s:NetrwFile(bufname(ibuf))) - exe "sil! keepj keepalt ".ibuf."bw!" - endif - let ibuf= ibuf + 1 - endwhile + " call Decho("wiping out currently unused netrw buffers",'~'.expand("")) + let ibuf = 1 + let buflast = bufnr("$") + while ibuf <= buflast + if bufwinnr(ibuf) == -1 && isdirectory(s:NetrwFile(bufname(ibuf))) + exe "sil! keepj keepalt ".ibuf."bw!" + endif + let ibuf= ibuf + 1 + endwhile endif let @@= ykeep -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) " not a directory, ignore it -" call Dret("netrw#LocalBrowseCheck : not a directory, ignoring it; dirname<".a:dirname.">") + " call Dret("netrw#LocalBrowseCheck : not a directory, ignoring it; dirname<".a:dirname.">") endfun " --------------------------------------------------------------------- @@ -10164,27 +10203,27 @@ endfun fun! s:LocalBrowseRefresh() " determine which buffers currently reside in a tab if !exists("s:netrw_browselist") - return + return endif if !exists("w:netrw_bannercnt") - return + return endif if !empty(getcmdwintype()) " cannot move away from cmdline window, see :h E11 return endif if exists("s:netrw_events") && s:netrw_events == 1 - " s:LocalFastBrowser gets called (indirectly) from a - let s:netrw_events= 2 - return + " s:LocalFastBrowser gets called (indirectly) from a + let s:netrw_events= 2 + return endif let itab = 1 let buftablist = [] let ykeep = @@ while itab <= tabpagenr("$") - let buftablist = buftablist + tabpagebuflist() - let itab = itab + 1 - sil! tabn + let buftablist = buftablist + tabpagebuflist() + let itab = itab + 1 + sil! tabn endwhile " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): " | refresh any netrw window @@ -10192,27 +10231,27 @@ fun! s:LocalBrowseRefresh() let curwinid = win_getid(winnr()) let ibl = 0 for ibuf in s:netrw_browselist - if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 - " wipe out any non-displaying netrw buffer - " (ibuf not shown in a current window AND - " ibuf not in any tab) - exe "sil! keepj bd ".fnameescape(ibuf) - call remove(s:netrw_browselist,ibl) - continue - elseif index(tabpagebuflist(),ibuf) != -1 - " refresh any netrw buffer - exe bufwinnr(ibuf)."wincmd w" - if getline(".") =~# 'Quick Help' - " decrement g:netrw_quickhelp to prevent refresh from changing g:netrw_quickhelp - " (counteracts s:NetrwBrowseChgDir()'s incrementing) - let g:netrw_quickhelp= g:netrw_quickhelp - 1 - endif - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - NetrwKeepj call s:NetrwRefreshTreeDict(w:netrw_treetop) + if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 + " wipe out any non-displaying netrw buffer + " (ibuf not shown in a current window AND + " ibuf not in any tab) + exe "sil! keepj bd ".fnameescape(ibuf) + call remove(s:netrw_browselist,ibl) + continue + elseif index(tabpagebuflist(),ibuf) != -1 + " refresh any netrw buffer + exe bufwinnr(ibuf)."wincmd w" + if getline(".") =~# 'Quick Help' + " decrement g:netrw_quickhelp to prevent refresh from changing g:netrw_quickhelp + " (counteracts s:NetrwBrowseChgDir()'s incrementing) + let g:netrw_quickhelp= g:netrw_quickhelp - 1 + endif + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + NetrwKeepj call s:NetrwRefreshTreeDict(w:netrw_treetop) + endif + NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) endif - NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) - endif - let ibl= ibl + 1 + let ibl= ibl + 1 endfor call win_gotoid(curwinid) let @@= ykeep @@ -10240,12 +10279,12 @@ fun! s:LocalFastBrowser() " initialize browselist, a list of buffer numbers that the local browser has used if !exists("s:netrw_browselist") - let s:netrw_browselist= [] + let s:netrw_browselist= [] endif " append current buffer to fastbrowse list if empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1] - call add(s:netrw_browselist,bufnr("%")) + call add(s:netrw_browselist,bufnr("%")) endif " enable autocmd events to handle refreshing/removing local browser buffers @@ -10255,24 +10294,24 @@ fun! s:LocalFastBrowser() " =1 : medium speed, re-use directory listing for remote only " =2 : fast speed, always re-use directory listing when possible if g:netrw_fastbrowse <= 1 && !exists("#ShellCmdPost") && !exists("s:netrw_events") - let s:netrw_events= 1 - augroup AuNetrwEvent - au! - if has("win32") - au ShellCmdPost * call s:LocalBrowseRefresh() - else - au ShellCmdPost,FocusGained * call s:LocalBrowseRefresh() - endif - augroup END + let s:netrw_events= 1 + augroup AuNetrwEvent + au! + if has("win32") + au ShellCmdPost * call s:LocalBrowseRefresh() + else + au ShellCmdPost,FocusGained * call s:LocalBrowseRefresh() + endif + augroup END " user must have changed fastbrowse to its fast setting, so remove " the associated autocmd events elseif g:netrw_fastbrowse > 1 && exists("#ShellCmdPost") && exists("s:netrw_events") - unlet s:netrw_events - augroup AuNetrwEvent - au! - augroup END - augroup! AuNetrwEvent + unlet s:netrw_events + augroup AuNetrwEvent + au! + augroup END + augroup! AuNetrwEvent endif endfun @@ -10286,93 +10325,93 @@ fun! s:NetrwLocalListingList(dirname,setmaxfilenamelen) if g:netrw_cygwin == 0 && has("win32") elseif index(filelist,'..') == -1 && dirname !~ '/' " include ../ in the glob() entry if its missing - let filelist= filelist+[s:ComposePath(dirname,"../")] + let filelist= filelist+[s:ComposePath(dirname,"../")] endif if a:setmaxfilenamelen && get(g:, 'netrw_dynamic_maxfilenamelen', 0) - let filelistcopy = map(deepcopy(filelist),'fnamemodify(v:val, ":t")') - let g:netrw_maxfilenamelen = max(map(filelistcopy,'len(v:val)')) + 1 + let filelistcopy = map(deepcopy(filelist),'fnamemodify(v:val, ":t")') + let g:netrw_maxfilenamelen = max(map(filelistcopy,'len(v:val)')) + 1 endif let resultfilelist = [] for filename in filelist - if getftype(filename) == "link" - " indicate a symbolic link - let pfile= filename."@" + if getftype(filename) == "link" + " indicate a symbolic link + let pfile= filename."@" + + elseif getftype(filename) == "socket" + " indicate a socket + let pfile= filename."=" + + elseif getftype(filename) == "fifo" + " indicate a fifo + let pfile= filename."|" + + elseif isdirectory(s:NetrwFile(filename)) + " indicate a directory + let pfile= filename."/" + + elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(s:NetrwFile(filename)) + if has("win32") + if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$' + " indicate an executable + let pfile= filename."*" + else + " normal file + let pfile= filename + endif + elseif executable(filename) + " indicate an executable + let pfile= filename."*" + else + " normal file + let pfile= filename + endif + + else + " normal file + let pfile= filename + endif + + if pfile =~ '//$' + let pfile= substitute(pfile,'//$','/','e') + endif + let pfile= strpart(pfile,dirnamelen) + let pfile= substitute(pfile,'^[/\\]','','e') + + if w:netrw_liststyle == s:LONGLIST + let longfile = printf("%-".g:netrw_maxfilenamelen."S",pfile) + let sz = getfsize(filename) + let szlen = 15 - (strdisplaywidth(longfile) - g:netrw_maxfilenamelen) + let szlen = (szlen > 0) ? szlen : 0 - elseif getftype(filename) == "socket" - " indicate a socket - let pfile= filename."=" + if g:netrw_sizestyle =~# "[hH]" + let sz= s:NetrwHumanReadable(sz) + endif + let fsz = printf("%".szlen."S",sz) + let pfile= longfile." ".fsz." ".strftime(g:netrw_timefmt,getftime(filename)) + endif - elseif getftype(filename) == "fifo" - " indicate a fifo - let pfile= filename."|" + if g:netrw_sort_by =~# "^t" + " sort by time (handles time up to 1 quintillion seconds, US) + " Decorate listing by prepending a timestamp/ . Sorting will then be done based on time. + let t = getftime(filename) + let ft = printf("%018d",t) + let ftpfile= ft.'/'.pfile + let resultfilelist += [ftpfile] - elseif isdirectory(s:NetrwFile(filename)) - " indicate a directory - let pfile= filename."/" + elseif g:netrw_sort_by =~ "^s" + " sort by size (handles file sizes up to 1 quintillion bytes, US) + let sz = getfsize(filename) + let fsz = printf("%018d",sz) + let fszpfile= fsz.'/'.pfile + let resultfilelist += [fszpfile] - elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(s:NetrwFile(filename)) - if has("win32") - if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$' - " indicate an executable - let pfile= filename."*" - else - " normal file - let pfile= filename - endif - elseif executable(filename) - " indicate an executable - let pfile= filename."*" - else - " normal file - let pfile= filename - endif - - else - " normal file - let pfile= filename - endif - - if pfile =~ '//$' - let pfile= substitute(pfile,'//$','/','e') - endif - let pfile= strpart(pfile,dirnamelen) - let pfile= substitute(pfile,'^[/\\]','','e') - - if w:netrw_liststyle == s:LONGLIST - let longfile = printf("%-".g:netrw_maxfilenamelen."S",pfile) - let sz = getfsize(filename) - let szlen = 15 - (strdisplaywidth(longfile) - g:netrw_maxfilenamelen) - let szlen = (szlen > 0) ? szlen : 0 - - if g:netrw_sizestyle =~# "[hH]" - let sz= s:NetrwHumanReadable(sz) - endif - let fsz = printf("%".szlen."S",sz) - let pfile= longfile." ".fsz." ".strftime(g:netrw_timefmt,getftime(filename)) - endif - - if g:netrw_sort_by =~# "^t" - " sort by time (handles time up to 1 quintillion seconds, US) - " Decorate listing by prepending a timestamp/ . Sorting will then be done based on time. - let t = getftime(filename) - let ft = printf("%018d",t) - let ftpfile= ft.'/'.pfile - let resultfilelist += [ftpfile] - - elseif g:netrw_sort_by =~ "^s" - " sort by size (handles file sizes up to 1 quintillion bytes, US) - let sz = getfsize(filename) - let fsz = printf("%018d",sz) - let fszpfile= fsz.'/'.pfile - let resultfilelist += [fszpfile] - - else - " sort by name - let resultfilelist += [pfile] - endif + else + " sort by name + let resultfilelist += [pfile] + endif endfor return resultfilelist @@ -10397,20 +10436,20 @@ endfun " --------------------------------------------------------------------- " s:NetrwLocalExecute: uses system() to execute command under cursor ("X" command support) {{{2 fun! s:NetrwLocalExecute(cmd) -" call Dfunc("s:NetrwLocalExecute(cmd<".a:cmd.">)") + " call Dfunc("s:NetrwLocalExecute(cmd<".a:cmd.">)") let ykeep= @@ " sanity check if !executable(a:cmd) - call netrw#ErrorMsg(s:ERROR,"the file<".a:cmd."> is not executable!",89) - let @@= ykeep -" call Dret("s:NetrwLocalExecute") - return + call netrw#ErrorMsg(s:ERROR,"the file<".a:cmd."> is not executable!",89) + let @@= ykeep + " call Dret("s:NetrwLocalExecute") + return endif let optargs= input(":!".a:cmd,"","file") -" call Decho("optargs<".optargs.">",'~'.expand("")) + " call Decho("optargs<".optargs.">",'~'.expand("")) let result= system(a:cmd.optargs) -" call Decho("result,'~'.expand("")) + " call Decho("result,'~'.expand("")) " strip any ansi escape sequences off let result = substitute(result,"\e\\[[0-9;]*m","","g") @@ -10419,7 +10458,7 @@ fun! s:NetrwLocalExecute(cmd) echomsg result let @@= ykeep -" call Dret("s:NetrwLocalExecute") + " call Dret("s:NetrwLocalExecute") endfun " --------------------------------------------------------------------- @@ -10427,7 +10466,7 @@ endfun fun! s:NetrwLocalRename(path) range if !exists("w:netrw_bannercnt") - let w:netrw_bannercnt= b:netrw_bannercnt + let w:netrw_bannercnt= b:netrw_bannercnt endif " preparation for removing multiple files/directories @@ -10438,71 +10477,71 @@ fun! s:NetrwLocalRename(path) range " rename files given by the markfilelist if exists("s:netrwmarkfilelist_{bufnr('%')}") - for oldname in s:netrwmarkfilelist_{bufnr("%")} - if exists("subfrom") - let newname= substitute(oldname,subfrom,subto,'') - else - call inputsave() - let newname= input("Moving ".oldname." to : ",oldname,"file") - call inputrestore() - if newname =~ '' - " two ctrl-x's : ignore all of string preceding the ctrl-x's - let newname = substitute(newname,'^.*','','') - elseif newname =~ '' - " one ctrl-x : ignore portion of string preceding ctrl-x but after last / - let newname = substitute(newname,'[^/]*','','') - endif - if newname =~ '^s/' - let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','') - let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','') - let newname = substitute(oldname,subfrom,subto,'') - endif - endif - if !all && filereadable(newname) - call inputsave() - let response= input("File<".newname."> already exists; do you want to overwrite it? (y/all/n) ") - call inputrestore() - if response == "all" - let all= 1 - elseif response != "y" && response != "yes" - " refresh the directory - NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) - NetrwKeepj call winrestview(svpos) - let @@= ykeep - return - endif - endif - call rename(oldname,newname) - endfor - call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) + for oldname in s:netrwmarkfilelist_{bufnr("%")} + if exists("subfrom") + let newname= substitute(oldname,subfrom,subto,'') + else + call inputsave() + let newname= input("Moving ".oldname." to : ",oldname,"file") + call inputrestore() + if newname =~ '' + " two ctrl-x's : ignore all of string preceding the ctrl-x's + let newname = substitute(newname,'^.*','','') + elseif newname =~ '' + " one ctrl-x : ignore portion of string preceding ctrl-x but after last / + let newname = substitute(newname,'[^/]*','','') + endif + if newname =~ '^s/' + let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','') + let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','') + let newname = substitute(oldname,subfrom,subto,'') + endif + endif + if !all && filereadable(newname) + call inputsave() + let response= input("File<".newname."> already exists; do you want to overwrite it? (y/all/n) ") + call inputrestore() + if response == "all" + let all= 1 + elseif response != "y" && response != "yes" + " refresh the directory + NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) + NetrwKeepj call winrestview(svpos) + let @@= ykeep + return + endif + endif + call rename(oldname,newname) + endfor + call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) else - " attempt to rename files/directories - while ctr <= a:lastline - exe "NetrwKeepj ".ctr + " attempt to rename files/directories + while ctr <= a:lastline + exe "NetrwKeepj ".ctr - " sanity checks - if line(".") < w:netrw_bannercnt - let ctr= ctr + 1 - continue - endif - let curword= s:NetrwGetWord() - if curword == "./" || curword == "../" - let ctr= ctr + 1 - continue - endif + " sanity checks + if line(".") < w:netrw_bannercnt + let ctr= ctr + 1 + continue + endif + let curword= s:NetrwGetWord() + if curword == "./" || curword == "../" + let ctr= ctr + 1 + continue + endif - NetrwKeepj norm! 0 - let oldname= s:ComposePath(a:path,curword) + NetrwKeepj norm! 0 + let oldname= s:ComposePath(a:path,curword) - call inputsave() - let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e')) - call inputrestore() + call inputsave() + let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e')) + call inputrestore() - call rename(oldname,newname) - let ctr= ctr + 1 - endwhile + call rename(oldname,newname) + let ctr= ctr + 1 + endwhile endif " refresh the directory @@ -10515,7 +10554,7 @@ endfun " s:NetrwLocalRm: {{{2 fun! s:NetrwLocalRm(path) range if !exists("w:netrw_bannercnt") - let w:netrw_bannercnt= b:netrw_bannercnt + let w:netrw_bannercnt= b:netrw_bannercnt endif " preparation for removing multiple files/directories @@ -10525,51 +10564,51 @@ fun! s:NetrwLocalRm(path) range let svpos = winsaveview() if exists("s:netrwmarkfilelist_{bufnr('%')}") - " remove all marked files - for fname in s:netrwmarkfilelist_{bufnr("%")} - let ok= s:NetrwLocalRmFile(a:path,fname,all) - if ok =~# 'q\%[uit]' || ok == "no" - break - elseif ok =~# '^a\%[ll]$' - let all= 1 - endif - endfor - call s:NetrwUnMarkFile(1) + " remove all marked files + for fname in s:netrwmarkfilelist_{bufnr("%")} + let ok= s:NetrwLocalRmFile(a:path,fname,all) + if ok =~# 'q\%[uit]' || ok == "no" + break + elseif ok =~# '^a\%[ll]$' + let all= 1 + endif + endfor + call s:NetrwUnMarkFile(1) else - " remove (multiple) files and directories + " remove (multiple) files and directories - let keepsol= &l:sol - setl nosol - let ctr = a:firstline - while ctr <= a:lastline - exe "NetrwKeepj ".ctr + let keepsol= &l:sol + setl nosol + let ctr = a:firstline + while ctr <= a:lastline + exe "NetrwKeepj ".ctr - " sanity checks - if line(".") < w:netrw_bannercnt - let ctr= ctr + 1 - continue - endif - let curword= s:NetrwGetWord() - if curword == "./" || curword == "../" - let ctr= ctr + 1 - continue - endif - let ok= s:NetrwLocalRmFile(a:path,curword,all) - if ok =~# 'q\%[uit]' || ok == "no" - break - elseif ok =~# '^a\%[ll]$' - let all= 1 - endif - let ctr= ctr + 1 - endwhile - let &l:sol= keepsol + " sanity checks + if line(".") < w:netrw_bannercnt + let ctr= ctr + 1 + continue + endif + let curword= s:NetrwGetWord() + if curword == "./" || curword == "../" + let ctr= ctr + 1 + continue + endif + let ok= s:NetrwLocalRmFile(a:path,curword,all) + if ok =~# 'q\%[uit]' || ok == "no" + break + elseif ok =~# '^a\%[ll]$' + let all= 1 + endif + let ctr= ctr + 1 + endwhile + let &l:sol= keepsol endif " refresh the directory if bufname("%") != "NetrwMessage" - NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) - NetrwKeepj call winrestview(svpos) + NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0)) + NetrwKeepj call winrestview(svpos) endif let @@= ykeep endfun @@ -10578,64 +10617,64 @@ endfun " s:NetrwLocalRmFile: remove file fname given the path {{{2 " Give confirmation prompt unless all==1 fun! s:NetrwLocalRmFile(path,fname,all) -" call Dfunc("s:NetrwLocalRmFile(path<".a:path."> fname<".a:fname."> all=".a:all) + " call Dfunc("s:NetrwLocalRmFile(path<".a:path."> fname<".a:fname."> all=".a:all) let all= a:all let ok = "" NetrwKeepj norm! 0 let rmfile= s:NetrwFile(s:ComposePath(a:path,escape(a:fname, '\\'))) -" call Decho("rmfile<".rmfile.">",'~'.expand("")) + " call Decho("rmfile<".rmfile.">",'~'.expand("")) if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') - " attempt to remove file -" call Decho("attempt to remove file<".rmfile.">",'~'.expand("")) - if !all - echohl Statement - call inputsave() - let ok= input("Confirm deletion of file <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - echohl NONE - if ok == "" - let ok="no" - endif -" call Decho("response: ok<".ok.">",'~'.expand("")) - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') -" call Decho("response: ok<".ok."> (after sub)",'~'.expand("")) - if ok =~# '^a\%[ll]$' - let all= 1 + " attempt to remove file + " call Decho("attempt to remove file<".rmfile.">",'~'.expand("")) + if !all + echohl Statement + call inputsave() + let ok= input("Confirm deletion of file <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + call inputrestore() + echohl NONE + if ok == "" + let ok="no" + endif + " call Decho("response: ok<".ok.">",'~'.expand("")) + let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') + " call Decho("response: ok<".ok."> (after sub)",'~'.expand("")) + if ok =~# '^a\%[ll]$' + let all= 1 + endif endif - endif - if all || ok =~# '^y\%[es]$' || ok == "" - let ret= s:NetrwDelete(rmfile) -" call Decho("errcode=".v:shell_error." ret=".ret,'~'.expand("")) - endif + if all || ok =~# '^y\%[es]$' || ok == "" + let ret= s:NetrwDelete(rmfile) + " call Decho("errcode=".v:shell_error." ret=".ret,'~'.expand("")) + endif else - " attempt to remove directory - if !all - echohl Statement - call inputsave() - let ok= input("Confirm *recursive* deletion of directory <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') - if ok == "" - let ok="no" - endif - if ok =~# '^a\%[ll]$' - let all= 1 + " attempt to remove directory + if !all + echohl Statement + call inputsave() + let ok= input("Confirm *recursive* deletion of directory <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + call inputrestore() + let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') + if ok == "" + let ok="no" + endif + if ok =~# '^a\%[ll]$' + let all= 1 + endif endif - endif - let rmfile= substitute(rmfile,'[\/]$','','e') + let rmfile= substitute(rmfile,'[\/]$','','e') - if all || ok =~# '^y\%[es]$' || ok == "" - if delete(rmfile,"rf") - call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".rmfile.">!",103) + if all || ok =~# '^y\%[es]$' || ok == "" + if delete(rmfile,"rf") + call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".rmfile.">!",103) + endif endif - endif endif -" call Dret("s:NetrwLocalRmFile ".ok) + " call Dret("s:NetrwLocalRmFile ".ok) return ok endfun @@ -10648,13 +10687,13 @@ endfun " 1: marked file target fun! netrw#Access(ilist) if a:ilist == 0 - if exists("s:netrwmarkfilelist_".bufnr('%')) - return s:netrwmarkfilelist_{bufnr('%')} - else - return "no-list-buf#".bufnr('%') - endif + if exists("s:netrwmarkfilelist_".bufnr('%')) + return s:netrwmarkfilelist_{bufnr('%')} + else + return "no-list-buf#".bufnr('%') + endif elseif a:ilist == 1 - return s:netrwmftgt + return s:netrwmftgt endif endfun @@ -10670,48 +10709,48 @@ endfun " :PChkAssert netrw#Expose("netrwmarkfilelist") " for example. fun! netrw#Expose(varname) -" call Dfunc("netrw#Expose(varname<".a:varname.">)") + " call Dfunc("netrw#Expose(varname<".a:varname.">)") if exists("s:".a:varname) - exe "let retval= s:".a:varname -" call Decho("retval=".retval,'~'.expand("")) - if exists("g:netrw_pchk") -" call Decho("type(g:netrw_pchk=".g:netrw_pchk.")=".type(retval),'~'.expand("")) - if type(retval) == 3 - let retval = copy(retval) - let i = 0 - while i < len(retval) - let retval[i]= substitute(retval[i],expand("$HOME"),'~','') - let i = i + 1 - endwhile - endif -" call Dret("netrw#Expose ".string(retval)),'~'.expand("")) - return string(retval) - else -" call Decho("g:netrw_pchk doesn't exist",'~'.expand("")) - endif - else -" call Decho("s:".a:varname." doesn't exist",'~'.expand("")) - let retval= "n/a" - endif - -" call Dret("netrw#Expose ".string(retval)) + exe "let retval= s:".a:varname + " call Decho("retval=".retval,'~'.expand("")) + if exists("g:netrw_pchk") + " call Decho("type(g:netrw_pchk=".g:netrw_pchk.")=".type(retval),'~'.expand("")) + if type(retval) == 3 + let retval = copy(retval) + let i = 0 + while i < len(retval) + let retval[i]= substitute(retval[i],expand("$HOME"),'~','') + let i = i + 1 + endwhile + endif + " call Dret("netrw#Expose ".string(retval)),'~'.expand("")) + return string(retval) + else + " call Decho("g:netrw_pchk doesn't exist",'~'.expand("")) + endif + else + " call Decho("s:".a:varname." doesn't exist",'~'.expand("")) + let retval= "n/a" + endif + + " call Dret("netrw#Expose ".string(retval)) return retval endfun " --------------------------------------------------------------------- " netrw#Modify: allows UserMaps to set (modify) script-local variables {{{2 fun! netrw#Modify(varname,newvalue) -" call Dfunc("netrw#Modify(varname<".a:varname.">,newvalue<".string(a:newvalue).">)") + " call Dfunc("netrw#Modify(varname<".a:varname.">,newvalue<".string(a:newvalue).">)") exe "let s:".a:varname."= ".string(a:newvalue) -" call Dret("netrw#Modify") + " call Dret("netrw#Modify") endfun " --------------------------------------------------------------------- " netrw#RFC2396: converts %xx into characters {{{2 fun! netrw#RFC2396(fname) -" call Dfunc("netrw#RFC2396(fname<".a:fname.">)") + " call Dfunc("netrw#RFC2396(fname<".a:fname.">)") let fname = escape(substitute(a:fname,'%\(\x\x\)','\=printf("%c","0x".submatch(1))','ge')," \t") -" call Dret("netrw#RFC2396 ".fname) + " call Dret("netrw#RFC2396 ".fname) return fname endfun @@ -10723,8 +10762,8 @@ endfun " [[keymap sequence, function reference],...] " " The referenced function may return a string, -" refresh : refresh the display -" -other- : this string will be executed +" refresh : refresh the display +" -other- : this string will be executed " or it may return a List of strings. " " Each keymap-sequence will be set up with a nnoremap @@ -10734,52 +10773,52 @@ endfun " netrw#Modify(varname,newvalue) -- modify value of s:varname variable " netrw#Call(funcname,...) -- call internal netrw function with optional arguments fun! netrw#UserMaps(islocal) -" call Dfunc("netrw#UserMaps(islocal=".a:islocal.")") -" call Decho("g:Netrw_UserMaps ".(exists("g:Netrw_UserMaps")? "exists" : "does NOT exist"),'~'.expand("")) + " call Dfunc("netrw#UserMaps(islocal=".a:islocal.")") + " call Decho("g:Netrw_UserMaps ".(exists("g:Netrw_UserMaps")? "exists" : "does NOT exist"),'~'.expand("")) - " set up usermaplist - if exists("g:Netrw_UserMaps") && type(g:Netrw_UserMaps) == 3 -" call Decho("g:Netrw_UserMaps has type 3",'~'.expand("")) + " set up usermaplist + if exists("g:Netrw_UserMaps") && type(g:Netrw_UserMaps) == 3 + " call Decho("g:Netrw_UserMaps has type 3",'~'.expand("")) for umap in g:Netrw_UserMaps -" call Decho("type(umap[0]<".string(umap[0]).">)=".type(umap[0])." (should be 1=string)",'~'.expand("")) -" call Decho("type(umap[1])=".type(umap[1])." (should be 1=string)",'~'.expand("")) - " if umap[0] is a string and umap[1] is a string holding a function name - if type(umap[0]) == 1 && type(umap[1]) == 1 -" call Decho("nno ".umap[0]." :call s:UserMaps(".a:islocal.",".string(umap[1]).")",'~'.expand("")) - exe "nno ".umap[0]." :call UserMaps(".a:islocal.",'".umap[1]."')" + " call Decho("type(umap[0]<".string(umap[0]).">)=".type(umap[0])." (should be 1=string)",'~'.expand("")) + " call Decho("type(umap[1])=".type(umap[1])." (should be 1=string)",'~'.expand("")) + " if umap[0] is a string and umap[1] is a string holding a function name + if type(umap[0]) == 1 && type(umap[1]) == 1 + " call Decho("nno ".umap[0]." :call s:UserMaps(".a:islocal.",".string(umap[1]).")",'~'.expand("")) + exe "nno ".umap[0]." :call UserMaps(".a:islocal.",'".umap[1]."')" else - call netrw#ErrorMsg(s:WARNING,"ignoring usermap <".string(umap[0])."> -- not a [string,funcref] entry",99) - endif + call netrw#ErrorMsg(s:WARNING,"ignoring usermap <".string(umap[0])."> -- not a [string,funcref] entry",99) + endif endfor - endif -" call Dret("netrw#UserMaps") + endif + " call Dret("netrw#UserMaps") endfun " --------------------------------------------------------------------- " netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2 fun! netrw#WinPath(path) -" call Dfunc("netrw#WinPath(path<".a:path.">)") + " call Dfunc("netrw#WinPath(path<".a:path.">)") if (!g:netrw_cygwin || &shell !~ '\%(\\|\\)\%(\.exe\)\=$') && has("win32") - " remove cygdrive prefix, if present - let path = substitute(a:path,g:netrw_cygdrive.'/\(.\)','\1:','') - " remove trailing slash (Win95) - let path = substitute(path, '\(\\\|/\)$', '', 'g') - " remove escaped spaces - let path = substitute(path, '\ ', ' ', 'g') - " convert slashes to backslashes - let path = substitute(path, '/', '\', 'g') - else - let path= a:path - endif -" call Dret("netrw#WinPath <".path.">") + " remove cygdrive prefix, if present + let path = substitute(a:path,g:netrw_cygdrive.'/\(.\)','\1:','') + " remove trailing slash (Win95) + let path = substitute(path, '\(\\\|/\)$', '', 'g') + " remove escaped spaces + let path = substitute(path, '\ ', ' ', 'g') + " convert slashes to backslashes + let path = substitute(path, '/', '\', 'g') + else + let path= a:path + endif + " call Dret("netrw#WinPath <".path.">") return path endfun " --------------------------------------------------------------------- " s:StripTrailingSlash: removes trailing slashes from a path {{{2 fun! s:StripTrailingSlash(path) - " remove trailing slash - return substitute(a:path, '[/\\]$', '', 'g') + " remove trailing slash + return substitute(a:path, '[/\\]$', '', 'g') endfun " --------------------------------------------------------------------- @@ -10788,85 +10827,85 @@ endfun " cB : bl2mf=1 use bufferlist to mark files " (mnemonic: cb = copy (marked files) to buffer list) fun! s:NetrwBadd(islocal,bl2mf) -" " call Dfunc("s:NetrwBadd(islocal=".a:islocal." mf2bl=".mf2bl.")") + " " call Dfunc("s:NetrwBadd(islocal=".a:islocal." mf2bl=".mf2bl.")") if a:bl2mf - " cB: add buffer list to marked files - redir => bufl + " cB: add buffer list to marked files + redir => bufl ls - redir END - let bufl = map(split(bufl,"\n"),'substitute(v:val,''^.\{-}"\(.*\)".\{-}$'',''\1'','''')') - for fname in bufl - call s:NetrwMarkFile(a:islocal,fname) - endfor + redir END + let bufl = map(split(bufl,"\n"),'substitute(v:val,''^.\{-}"\(.*\)".\{-}$'',''\1'','''')') + for fname in bufl + call s:NetrwMarkFile(a:islocal,fname) + endfor else - " cb: add marked files to buffer list - for fname in s:netrwmarkfilelist_{bufnr("%")} -" " call Decho("badd ".fname,'~'.expand("")) - exe "badd ".fnameescape(fname) - endfor - let curbufnr = bufnr("%") - let curdir = s:NetrwGetCurdir(a:islocal) - call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer + " cb: add marked files to buffer list + for fname in s:netrwmarkfilelist_{bufnr("%")} + " " call Decho("badd ".fname,'~'.expand("")) + exe "badd ".fnameescape(fname) + endfor + let curbufnr = bufnr("%") + let curdir = s:NetrwGetCurdir(a:islocal) + call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer endif -" call Dret("s:NetrwBadd") + " call Dret("s:NetrwBadd") endfun " --------------------------------------------------------------------- " s:ComposePath: Appends a new part to a path taking different systems into consideration {{{2 fun! s:ComposePath(base,subdir) -" call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)") + " call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)") if has("amiga") -" call Decho("amiga",'~'.expand("")) - let ec = a:base[s:Strlen(a:base)-1] - if ec != '/' && ec != ':' - let ret = a:base."/" . a:subdir - else - let ret = a:base.a:subdir - endif - - " COMBAK: test on windows with changing to root directory: :e C:/ + " call Decho("amiga",'~'.expand("")) + let ec = a:base[s:Strlen(a:base)-1] + if ec != '/' && ec != ':' + let ret = a:base."/" . a:subdir + else + let ret = a:base.a:subdir + endif + + " COMBAK: test on windows with changing to root directory: :e C:/ elseif a:subdir =~ '^\a:[/\\]\([^/\\]\|$\)' && has("win32") -" call Decho("windows",'~'.expand("")) - let ret= a:subdir + " call Decho("windows",'~'.expand("")) + let ret= a:subdir elseif a:base =~ '^\a:[/\\]\([^/\\]\|$\)' && has("win32") -" call Decho("windows",'~'.expand("")) - if a:base =~ '[/\\]$' - let ret= a:base.a:subdir - else - let ret= a:base.'/'.a:subdir - endif + " call Decho("windows",'~'.expand("")) + if a:base =~ '[/\\]$' + let ret= a:base.a:subdir + else + let ret= a:base.'/'.a:subdir + endif elseif a:base =~ '^\a\{3,}://' -" call Decho("remote linux/macos",'~'.expand("")) - let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','') - let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','') - if a:subdir == '../' - if curpath =~ '[^/]/[^/]\+/$' - let curpath= substitute(curpath,'[^/]\+/$','','') - else - let curpath="" - endif - let ret= urlbase.curpath - else - let ret= urlbase.curpath.a:subdir - endif -" call Decho("urlbase<".urlbase.">",'~'.expand("")) -" call Decho("curpath<".curpath.">",'~'.expand("")) -" call Decho("ret<".ret.">",'~'.expand("")) - - else -" call Decho("local linux/macos",'~'.expand("")) - let ret = substitute(a:base."/".a:subdir,"//","/","g") - if a:base =~ '^//' - " keeping initial '//' for the benefit of network share listing support - let ret= '/'.ret - endif - let ret= simplify(ret) - endif - -" call Dret("s:ComposePath ".ret) + " call Decho("remote linux/macos",'~'.expand("")) + let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','') + let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','') + if a:subdir == '../' + if curpath =~ '[^/]/[^/]\+/$' + let curpath= substitute(curpath,'[^/]\+/$','','') + else + let curpath="" + endif + let ret= urlbase.curpath + else + let ret= urlbase.curpath.a:subdir + endif + " call Decho("urlbase<".urlbase.">",'~'.expand("")) + " call Decho("curpath<".curpath.">",'~'.expand("")) + " call Decho("ret<".ret.">",'~'.expand("")) + + else + " call Decho("local linux/macos",'~'.expand("")) + let ret = substitute(a:base."/".a:subdir,"//","/","g") + if a:base =~ '^//' + " keeping initial '//' for the benefit of network share listing support + let ret= '/'.ret + endif + let ret= simplify(ret) + endif + + " call Dret("s:ComposePath ".ret) return ret endfun @@ -10874,41 +10913,41 @@ endfun " s:DeleteBookmark: deletes a file/directory from Netrw's bookmark system {{{2 " Related Functions: s:MakeBookmark() s:NetrwBookHistHandler() s:NetrwBookmark() fun! s:DeleteBookmark(fname) -" call Dfunc("s:DeleteBookmark(fname<".a:fname.">)") + " call Dfunc("s:DeleteBookmark(fname<".a:fname.">)") call s:MergeBookmarks() if exists("g:netrw_bookmarklist") - let indx= index(g:netrw_bookmarklist,a:fname) - if indx == -1 - let indx= 0 - while indx < len(g:netrw_bookmarklist) - if g:netrw_bookmarklist[indx] =~ a:fname + let indx= index(g:netrw_bookmarklist,a:fname) + if indx == -1 + let indx= 0 + while indx < len(g:netrw_bookmarklist) + if g:netrw_bookmarklist[indx] =~ a:fname + call remove(g:netrw_bookmarklist,indx) + let indx= indx - 1 + endif + let indx= indx + 1 + endwhile + else + " remove exact match call remove(g:netrw_bookmarklist,indx) - let indx= indx - 1 - endif - let indx= indx + 1 - endwhile - else - " remove exact match - call remove(g:netrw_bookmarklist,indx) - endif + endif endif -" call Dret("s:DeleteBookmark") + " call Dret("s:DeleteBookmark") endfun " --------------------------------------------------------------------- " s:FileReadable: o/s independent filereadable {{{2 fun! s:FileReadable(fname) -" call Dfunc("s:FileReadable(fname<".a:fname.">)") + " call Dfunc("s:FileReadable(fname<".a:fname.">)") if g:netrw_cygwin - let ret= filereadable(s:NetrwFile(substitute(a:fname,g:netrw_cygdrive.'/\(.\)','\1:/',''))) + let ret= filereadable(s:NetrwFile(substitute(a:fname,g:netrw_cygdrive.'/\(.\)','\1:/',''))) else - let ret= filereadable(s:NetrwFile(a:fname)) + let ret= filereadable(s:NetrwFile(a:fname)) endif -" call Dret("s:FileReadable ".ret) + " call Dret("s:FileReadable ".ret) return ret endfun @@ -10917,68 +10956,68 @@ endfun " Places correct suffix on end of temporary filename, " using the suffix provided with fname fun! s:GetTempfile(fname) -" call Dfunc("s:GetTempfile(fname<".a:fname.">)") + " call Dfunc("s:GetTempfile(fname<".a:fname.">)") if !exists("b:netrw_tmpfile") - " get a brand new temporary filename - let tmpfile= tempname() -" call Decho("tmpfile<".tmpfile."> : from tempname()",'~'.expand("")) - - let tmpfile= substitute(tmpfile,'\','/','ge') -" call Decho("tmpfile<".tmpfile."> : chgd any \\ -> /",'~'.expand("")) - - " sanity check -- does the temporary file's directory exist? - if !isdirectory(s:NetrwFile(substitute(tmpfile,'[^/]\+$','','e'))) -" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2) -" call Dret("s:GetTempfile getcwd<".getcwd().">") - return "" - endif - - " let netrw#NetSource() know about the tmpfile - let s:netrw_tmpfile= tmpfile " used by netrw#NetSource() and netrw#BrowseX() -" call Decho("tmpfile<".tmpfile."> s:netrw_tmpfile<".s:netrw_tmpfile.">",'~'.expand("")) - - " o/s dependencies - if g:netrw_cygwin != 0 - let tmpfile = substitute(tmpfile,'^\(\a\):',g:netrw_cygdrive.'/\1','e') - elseif has("win32") - if !exists("+shellslash") || !&ssl - let tmpfile = substitute(tmpfile,'/','\','g') + " get a brand new temporary filename + let tmpfile= tempname() + " call Decho("tmpfile<".tmpfile."> : from tempname()",'~'.expand("")) + + let tmpfile= substitute(tmpfile,'\','/','ge') + " call Decho("tmpfile<".tmpfile."> : chgd any \\ -> /",'~'.expand("")) + + " sanity check -- does the temporary file's directory exist? + if !isdirectory(s:NetrwFile(substitute(tmpfile,'[^/]\+$','','e'))) + " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2) + " call Dret("s:GetTempfile getcwd<".getcwd().">") + return "" + endif + + " let netrw#NetSource() know about the tmpfile + let s:netrw_tmpfile= tmpfile " used by netrw#NetSource() and netrw#BrowseX() + " call Decho("tmpfile<".tmpfile."> s:netrw_tmpfile<".s:netrw_tmpfile.">",'~'.expand("")) + + " o/s dependencies + if g:netrw_cygwin != 0 + let tmpfile = substitute(tmpfile,'^\(\a\):',g:netrw_cygdrive.'/\1','e') + elseif has("win32") + if !exists("+shellslash") || !&ssl + let tmpfile = substitute(tmpfile,'/','\','g') + endif + else + let tmpfile = tmpfile endif - else - let tmpfile = tmpfile - endif - let b:netrw_tmpfile= tmpfile -" call Decho("o/s dependent fixed tempname<".tmpfile.">",'~'.expand("")) + let b:netrw_tmpfile= tmpfile + " call Decho("o/s dependent fixed tempname<".tmpfile.">",'~'.expand("")) else - " re-use temporary filename - let tmpfile= b:netrw_tmpfile -" call Decho("tmpfile<".tmpfile."> re-using",'~'.expand("")) + " re-use temporary filename + let tmpfile= b:netrw_tmpfile + " call Decho("tmpfile<".tmpfile."> re-using",'~'.expand("")) endif " use fname's suffix for the temporary file if a:fname != "" - if a:fname =~ '\.[^./]\+$' -" call Decho("using fname<".a:fname.">'s suffix",'~'.expand("")) - if a:fname =~ '\.tar\.gz$' || a:fname =~ '\.tar\.bz2$' || a:fname =~ '\.tar\.xz$' - let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') - elseif a:fname =~ '.txz$' - let suffix = ".txz".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') - else - let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') - endif -" call Decho("suffix<".suffix.">",'~'.expand("")) - let tmpfile= substitute(tmpfile,'\.tmp$','','e') -" call Decho("chgd tmpfile<".tmpfile."> (removed any .tmp suffix)",'~'.expand("")) - let tmpfile .= suffix -" call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">",'~'.expand("")) - let s:netrw_tmpfile= tmpfile " supports netrw#NetSource() - endif - endif - -" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) -" call Dret("s:GetTempfile <".tmpfile.">") + if a:fname =~ '\.[^./]\+$' + " call Decho("using fname<".a:fname.">'s suffix",'~'.expand("")) + if a:fname =~ '\.tar\.gz$' || a:fname =~ '\.tar\.bz2$' || a:fname =~ '\.tar\.xz$' + let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') + elseif a:fname =~ '.txz$' + let suffix = ".txz".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') + else + let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') + endif + " call Decho("suffix<".suffix.">",'~'.expand("")) + let tmpfile= substitute(tmpfile,'\.tmp$','','e') + " call Decho("chgd tmpfile<".tmpfile."> (removed any .tmp suffix)",'~'.expand("")) + let tmpfile .= suffix + " call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">",'~'.expand("")) + let s:netrw_tmpfile= tmpfile " supports netrw#NetSource() + endif + endif + + " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + " call Dret("s:GetTempfile <".tmpfile.">") return tmpfile endfun @@ -10986,167 +11025,167 @@ endfun " s:MakeSshCmd: transforms input command using USEPORT HOSTNAME into {{{2 " a correct command for use with a system() call fun! s:MakeSshCmd(sshcmd) -" call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">") + " call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">") if s:user == "" - let sshcmd = substitute(a:sshcmd,'\',s:machine,'') + let sshcmd = substitute(a:sshcmd,'\',s:machine,'') else - let sshcmd = substitute(a:sshcmd,'\',s:user."@".s:machine,'') + let sshcmd = substitute(a:sshcmd,'\',s:user."@".s:machine,'') endif if exists("g:netrw_port") && g:netrw_port != "" - let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.g:netrw_port,'') + let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.g:netrw_port,'') elseif exists("s:port") && s:port != "" - let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.s:port,'') + let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.s:port,'') else - let sshcmd= substitute(sshcmd,"USEPORT ",'','') + let sshcmd= substitute(sshcmd,"USEPORT ",'','') endif -" call Dret("s:MakeSshCmd <".sshcmd.">") + " call Dret("s:MakeSshCmd <".sshcmd.">") return sshcmd endfun " --------------------------------------------------------------------- " s:MakeBookmark: enters a bookmark into Netrw's bookmark system {{{2 fun! s:MakeBookmark(fname) -" call Dfunc("s:MakeBookmark(fname<".a:fname.">)") + " call Dfunc("s:MakeBookmark(fname<".a:fname.">)") if !exists("g:netrw_bookmarklist") - let g:netrw_bookmarklist= [] + let g:netrw_bookmarklist= [] endif if index(g:netrw_bookmarklist,a:fname) == -1 - " curdir not currently in g:netrw_bookmarklist, so include it - if isdirectory(s:NetrwFile(a:fname)) && a:fname !~ '/$' - call add(g:netrw_bookmarklist,a:fname.'/') - elseif a:fname !~ '/' - call add(g:netrw_bookmarklist,getcwd()."/".a:fname) - else - call add(g:netrw_bookmarklist,a:fname) - endif - call sort(g:netrw_bookmarklist) + " curdir not currently in g:netrw_bookmarklist, so include it + if isdirectory(s:NetrwFile(a:fname)) && a:fname !~ '/$' + call add(g:netrw_bookmarklist,a:fname.'/') + elseif a:fname !~ '/' + call add(g:netrw_bookmarklist,getcwd()."/".a:fname) + else + call add(g:netrw_bookmarklist,a:fname) + endif + call sort(g:netrw_bookmarklist) endif -" call Dret("s:MakeBookmark") + " call Dret("s:MakeBookmark") endfun " --------------------------------------------------------------------- " s:MergeBookmarks: merge current bookmarks with saved bookmarks {{{2 fun! s:MergeBookmarks() -" call Dfunc("s:MergeBookmarks() : merge current bookmarks into .netrwbook") + " call Dfunc("s:MergeBookmarks() : merge current bookmarks into .netrwbook") " get bookmarks from .netrwbook file let savefile= s:NetrwHome()."/.netrwbook" if filereadable(s:NetrwFile(savefile)) -" call Decho("merge bookmarks (active and file)",'~'.expand("")) - NetrwKeepj call s:NetrwBookHistSave() -" call Decho("bookmark delete savefile<".savefile.">",'~'.expand("")) - NetrwKeepj call delete(savefile) + " call Decho("merge bookmarks (active and file)",'~'.expand("")) + NetrwKeepj call s:NetrwBookHistSave() + " call Decho("bookmark delete savefile<".savefile.">",'~'.expand("")) + NetrwKeepj call delete(savefile) endif -" call Dret("s:MergeBookmarks") + " call Dret("s:MergeBookmarks") endfun " --------------------------------------------------------------------- " s:NetrwBMShow: {{{2 fun! s:NetrwBMShow() -" call Dfunc("s:NetrwBMShow()") + " call Dfunc("s:NetrwBMShow()") redir => bmshowraw - menu + menu redir END let bmshowlist = split(bmshowraw,'\n') if bmshowlist != [] - let bmshowfuncs= filter(bmshowlist,'v:val =~# "\\d\\+_BMShow()"') - if bmshowfuncs != [] - let bmshowfunc = substitute(bmshowfuncs[0],'^.*:\(call.*BMShow()\).*$','\1','') - if bmshowfunc =~# '^call.*BMShow()' - exe "sil! NetrwKeepj ".bmshowfunc + let bmshowfuncs= filter(bmshowlist,'v:val =~# "\\d\\+_BMShow()"') + if bmshowfuncs != [] + let bmshowfunc = substitute(bmshowfuncs[0],'^.*:\(call.*BMShow()\).*$','\1','') + if bmshowfunc =~# '^call.*BMShow()' + exe "sil! NetrwKeepj ".bmshowfunc + endif endif - endif endif -" call Dret("s:NetrwBMShow : bmshowfunc<".(exists("bmshowfunc")? bmshowfunc : 'n/a').">") + " call Dret("s:NetrwBMShow : bmshowfunc<".(exists("bmshowfunc")? bmshowfunc : 'n/a').">") endfun " --------------------------------------------------------------------- " s:NetrwCursor: responsible for setting cursorline/cursorcolumn based upon g:netrw_cursor {{{2 fun! s:NetrwCursor(editfile) if !exists("w:netrw_liststyle") - let w:netrw_liststyle= g:netrw_liststyle + let w:netrw_liststyle= g:netrw_liststyle endif -" call Dfunc("s:NetrwCursor() ft<".&ft."> liststyle=".w:netrw_liststyle." g:netrw_cursor=".g:netrw_cursor." s:netrw_usercuc=".s:netrw_usercuc." s:netrw_usercul=".s:netrw_usercul) + " call Dfunc("s:NetrwCursor() ft<".&ft."> liststyle=".w:netrw_liststyle." g:netrw_cursor=".g:netrw_cursor." s:netrw_usercuc=".s:netrw_usercuc." s:netrw_usercul=".s:netrw_usercul) -" call Decho("(s:NetrwCursor) COMBAK: cuc=".&l:cuc." cul=".&l:cul) + " call Decho("(s:NetrwCursor) COMBAK: cuc=".&l:cuc." cul=".&l:cul) if &ft != "netrw" - " if the current window isn't a netrw directory listing window, then use user cursorline/column - " settings. Affects when netrw is used to read/write a file using scp/ftp/etc. -" call Decho("case ft!=netrw: use user cul,cuc",'~'.expand("")) + " if the current window isn't a netrw directory listing window, then use user cursorline/column + " settings. Affects when netrw is used to read/write a file using scp/ftp/etc. + " call Decho("case ft!=netrw: use user cul,cuc",'~'.expand("")) elseif g:netrw_cursor == 8 - if w:netrw_liststyle == s:WIDELIST - setl cursorline - setl cursorcolumn - else - setl cursorline - endif + if w:netrw_liststyle == s:WIDELIST + setl cursorline + setl cursorcolumn + else + setl cursorline + endif elseif g:netrw_cursor == 7 setl cursorline elseif g:netrw_cursor == 6 - if w:netrw_liststyle == s:WIDELIST - setl cursorline - endif + if w:netrw_liststyle == s:WIDELIST + setl cursorline + endif elseif g:netrw_cursor == 4 - " all styles: cursorline, cursorcolumn -" call Decho("case g:netrw_cursor==4: setl cul cuc",'~'.expand("")) - setl cursorline - setl cursorcolumn - - elseif g:netrw_cursor == 3 - " thin-long-tree: cursorline, user's cursorcolumn - " wide : cursorline, cursorcolumn - if w:netrw_liststyle == s:WIDELIST -" call Decho("case g:netrw_cursor==3 and wide: setl cul cuc",'~'.expand("")) + " all styles: cursorline, cursorcolumn + " call Decho("case g:netrw_cursor==4: setl cul cuc",'~'.expand("")) setl cursorline setl cursorcolumn - else -" call Decho("case g:netrw_cursor==3 and not wide: setl cul (use user's cuc)",'~'.expand("")) - setl cursorline - endif + + elseif g:netrw_cursor == 3 + " thin-long-tree: cursorline, user's cursorcolumn + " wide : cursorline, cursorcolumn + if w:netrw_liststyle == s:WIDELIST + " call Decho("case g:netrw_cursor==3 and wide: setl cul cuc",'~'.expand("")) + setl cursorline + setl cursorcolumn + else + " call Decho("case g:netrw_cursor==3 and not wide: setl cul (use user's cuc)",'~'.expand("")) + setl cursorline + endif elseif g:netrw_cursor == 2 - " thin-long-tree: cursorline, user's cursorcolumn - " wide : cursorline, user's cursorcolumn -" call Decho("case g:netrw_cursor==2: setl cuc (use user's cul)",'~'.expand("")) - setl cursorline + " thin-long-tree: cursorline, user's cursorcolumn + " wide : cursorline, user's cursorcolumn + " call Decho("case g:netrw_cursor==2: setl cuc (use user's cul)",'~'.expand("")) + setl cursorline elseif g:netrw_cursor == 1 - " thin-long-tree: user's cursorline, user's cursorcolumn - " wide : cursorline, user's cursorcolumn - if w:netrw_liststyle == s:WIDELIST -" call Decho("case g:netrw_cursor==2 and wide: setl cul (use user's cuc)",'~'.expand("")) - setl cursorline - else -" call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)",'~'.expand("")) - endif + " thin-long-tree: user's cursorline, user's cursorcolumn + " wide : cursorline, user's cursorcolumn + if w:netrw_liststyle == s:WIDELIST + " call Decho("case g:netrw_cursor==2 and wide: setl cul (use user's cuc)",'~'.expand("")) + setl cursorline + else + " call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)",'~'.expand("")) + endif else - " all styles: user's cursorline, user's cursorcolumn -" call Decho("default: (use user's cul,cuc)",'~'.expand("")) - let &l:cursorline = s:netrw_usercul - let &l:cursorcolumn = s:netrw_usercuc + " all styles: user's cursorline, user's cursorcolumn + " call Decho("default: (use user's cul,cuc)",'~'.expand("")) + let &l:cursorline = s:netrw_usercul + let &l:cursorcolumn = s:netrw_usercuc endif -" call Decho("(s:NetrwCursor) COMBAK: cuc=".&l:cuc." cul=".&l:cul) -" call Dret("s:NetrwCursor : l:cursorline=".&l:cursorline." l:cursorcolumn=".&l:cursorcolumn) + " call Decho("(s:NetrwCursor) COMBAK: cuc=".&l:cuc." cul=".&l:cul) + " call Dret("s:NetrwCursor : l:cursorline=".&l:cursorline." l:cursorcolumn=".&l:cursorcolumn) endfun " --------------------------------------------------------------------- " s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2 fun! s:RestoreCursorline() -" call Dfunc("s:RestoreCursorline() currently, cul=".&l:cursorline." cuc=".&l:cursorcolumn." win#".winnr()." buf#".bufnr("%")) + " call Dfunc("s:RestoreCursorline() currently, cul=".&l:cursorline." cuc=".&l:cursorcolumn." win#".winnr()." buf#".bufnr("%")) if exists("s:netrw_usercul") - let &l:cursorline = s:netrw_usercul + let &l:cursorline = s:netrw_usercul endif if exists("s:netrw_usercuc") - let &l:cursorcolumn = s:netrw_usercuc + let &l:cursorcolumn = s:netrw_usercuc endif -" call Decho("(s:RestoreCursorline) COMBAK: cuc=".&l:cuc." cul=".&l:cul) -" call Dret("s:RestoreCursorline : restored cul=".&l:cursorline." cuc=".&l:cursorcolumn) + " call Decho("(s:RestoreCursorline) COMBAK: cuc=".&l:cuc." cul=".&l:cul) + " call Dret("s:RestoreCursorline : restored cul=".&l:cursorline." cuc=".&l:cursorcolumn) endfun " s:RestoreRegister: restores all registers given in the dict {{{2 @@ -11165,28 +11204,28 @@ endfun " acceptable. No effect on Unix paths. " Examples of use: let result= s:NetrwDelete(path) fun! s:NetrwDelete(path) -" call Dfunc("s:NetrwDelete(path<".a:path.">)") + " call Dfunc("s:NetrwDelete(path<".a:path.">)") let path = netrw#WinPath(a:path) if !g:netrw_cygwin && has("win32") - if exists("+shellslash") - let sskeep= &shellslash - setl noshellslash - let result = delete(path) - let &shellslash = sskeep - else -" call Decho("exe let result= ".a:cmd."('".path."')",'~'.expand("")) - let result= delete(path) - endif + if exists("+shellslash") + let sskeep= &shellslash + setl noshellslash + let result = delete(path) + let &shellslash = sskeep + else + " call Decho("exe let result= ".a:cmd."('".path."')",'~'.expand("")) + let result= delete(path) + endif else -" call Decho("let result= delete(".path.")",'~'.expand("")) - let result= delete(path) + " call Decho("let result= delete(".path.")",'~'.expand("")) + let result= delete(path) endif if result < 0 - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"delete(".path.") failed!",71) + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"delete(".path.") failed!",71) endif -" call Dret("s:NetrwDelete ".result) + " call Dret("s:NetrwDelete ".result) return result endfun @@ -11197,25 +11236,25 @@ endfun " is unnamed " does not appear in any window fun! s:NetrwBufRemover(bufid) -" call Dfunc("s:NetrwBufRemover(".a:bufid.")") -" call Decho("buf#".a:bufid." ".((a:bufid > 1)? ">" : "≯")." must be >1 for removal","~".expand("")) -" call Decho("buf#".a:bufid." is ".(buflisted(a:bufid)? "listed" : "unlisted"),"~".expand("")) -" call Decho("buf#".a:bufid." has name <".bufname(a:bufid).">","~".expand("")) -" call Decho("buf#".a:bufid." has winid#".bufwinid(a:bufid),"~".expand("")) + " call Dfunc("s:NetrwBufRemover(".a:bufid.")") + " call Decho("buf#".a:bufid." ".((a:bufid > 1)? ">" : "≯")." must be >1 for removal","~".expand("")) + " call Decho("buf#".a:bufid." is ".(buflisted(a:bufid)? "listed" : "unlisted"),"~".expand("")) + " call Decho("buf#".a:bufid." has name <".bufname(a:bufid).">","~".expand("")) + " call Decho("buf#".a:bufid." has winid#".bufwinid(a:bufid),"~".expand("")) if a:bufid > 1 && !buflisted(a:bufid) && bufloaded(a:bufid) && bufname(a:bufid) == "" && bufwinid(a:bufid) == -1 -" call Decho("(s:NetrwBufRemover) removing buffer#".a:bufid,"~".expand("")) - exe "sil! bd! ".a:bufid + " call Decho("(s:NetrwBufRemover) removing buffer#".a:bufid,"~".expand("")) + exe "sil! bd! ".a:bufid endif -" call Dret("s:NetrwBufRemover") + " call Dret("s:NetrwBufRemover") endfun " --------------------------------------------------------------------- " s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2 fun! s:NetrwEnew(...) -" call Dfunc("s:NetrwEnew() a:0=".a:0." win#".winnr()." winnr($)=".winnr("$")." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">") -" call Decho("curdir<".((a:0>0)? a:1 : "")."> buf#".bufnr("%")."<".bufname("%").">",'~'.expand("")) + " call Dfunc("s:NetrwEnew() a:0=".a:0." win#".winnr()." winnr($)=".winnr("$")." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">") + " call Decho("curdir<".((a:0>0)? a:1 : "")."> buf#".bufnr("%")."<".bufname("%").">",'~'.expand("")) " Clean out the last buffer: " Check if the last buffer has # > 1, is unlisted, is unnamed, and does not appear in a window @@ -11223,7 +11262,7 @@ fun! s:NetrwEnew(...) call s:NetrwBufRemover(bufnr("$")) " grab a function-local-variable copy of buffer variables -" call Decho("make function-local copy of netrw variables",'~'.expand("")) + " call Decho("make function-local copy of netrw variables",'~'.expand("")) if exists("b:netrw_bannercnt") |let netrw_bannercnt = b:netrw_bannercnt |endif if exists("b:netrw_browser_active") |let netrw_browser_active = b:netrw_browser_active |endif if exists("b:netrw_cpf") |let netrw_cpf = b:netrw_cpf |endif @@ -11242,19 +11281,19 @@ fun! s:NetrwEnew(...) if exists("b:netrw_prvdir") |let netrw_prvdir = b:netrw_prvdir |endif NetrwKeepj call s:NetrwOptionsRestore("w:") -" call Decho("generate a buffer with NetrwKeepj enew!",'~'.expand("")) + " call Decho("generate a buffer with NetrwKeepj enew!",'~'.expand("")) " when tree listing uses file TreeListing... a new buffer is made. " Want the old buffer to be unlisted. " COMBAK: this causes a problem, see P43 -" setl nobl + " setl nobl let netrw_keepdiff= &l:diff call s:NetrwEditFile("enew!","","") let &l:diff= netrw_keepdiff -" call Decho("bufnr($)=".bufnr("$")."<".bufname(bufnr("$"))."> winnr($)=".winnr("$"),'~'.expand("")) + " call Decho("bufnr($)=".bufnr("$")."<".bufname(bufnr("$"))."> winnr($)=".winnr("$"),'~'.expand("")) NetrwKeepj call s:NetrwOptionsSave("w:") " copy function-local-variables to buffer variable equivalents -" call Decho("copy function-local variables back to buffer netrw variables",'~'.expand("")) + " call Decho("copy function-local variables back to buffer netrw variables",'~'.expand("")) if exists("netrw_bannercnt") |let b:netrw_bannercnt = netrw_bannercnt |endif if exists("netrw_browser_active") |let b:netrw_browser_active = netrw_browser_active |endif if exists("netrw_cpf") |let b:netrw_cpf = netrw_cpf |endif @@ -11273,75 +11312,71 @@ fun! s:NetrwEnew(...) if exists("netrw_prvdir") |let b:netrw_prvdir = netrw_prvdir |endif if a:0 > 0 - let b:netrw_curdir= a:1 - if b:netrw_curdir =~ '/$' - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST - setl nobl - file NetrwTreeListing - setl nobl bt=nowrite bh=hide - nno [ :sil call TreeListMove('[') - nno ] :sil call TreeListMove(']') - else - call s:NetrwBufRename(b:netrw_curdir) + let b:netrw_curdir= a:1 + if b:netrw_curdir =~ '/$' + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + setl nobl + file NetrwTreeListing + setl nobl bt=nowrite bh=hide + nno [ :sil call TreeListMove('[') + nno ] :sil call TreeListMove(']') + else + call s:NetrwBufRename(b:netrw_curdir) + endif endif - endif endif if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on") - let &l:bexpr = "netrw#BalloonHelp()" + let &l:bexpr = "netrw#BalloonHelp()" endif -" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#")."> bh=".&bh." win#".winnr()." winnr($)#".winnr("$")) + " call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#")."> bh=".&bh." win#".winnr()." winnr($)#".winnr("$")) endfun " --------------------------------------------------------------------- " s:NetrwExe: executes a string using "!" {{{2 fun! s:NetrwExe(cmd) -" call Dfunc("s:NetrwExe(a:cmd<".a:cmd.">)") - if has("win32") -" call Decho("using win32:",expand("")) + if has("win32") && exepath(&shell) !~? '\v[\/]?(cmd|pwsh|powershell)(\.exe)?$' && !g:netrw_cygwin let savedShell=[&shell,&shellcmdflag,&shellxquote,&shellxescape,&shellquote,&shellpipe,&shellredir,&shellslash] set shell& shellcmdflag& shellxquote& shellxescape& set shellquote& shellpipe& shellredir& shellslash& try - exe a:cmd + exe a:cmd finally let [&shell,&shellcmdflag,&shellxquote,&shellxescape,&shellquote,&shellpipe,&shellredir,&shellslash] = savedShell endtry else -" call Decho("exe ".a:cmd,'~'.expand("")) - exe a:cmd + exe a:cmd endif if v:shell_error - call netrw#ErrorMsg(s:WARNING,"shell signalled an error",106) + call netrw#ErrorMsg(s:WARNING,"shell signalled an error",106) endif -" call Dret("s:NetrwExe : v:shell_error=".v:shell_error) endfun " --------------------------------------------------------------------- " s:NetrwInsureWinVars: insure that a netrw buffer has its w: variables in spite of a wincmd v or s {{{2 fun! s:NetrwInsureWinVars() if !exists("w:netrw_liststyle") -" call Dfunc("s:NetrwInsureWinVars() win#".winnr()) - let curbuf = bufnr("%") - let curwin = winnr() - let iwin = 1 - while iwin <= winnr("$") - exe iwin."wincmd w" - if winnr() != curwin && bufnr("%") == curbuf && exists("w:netrw_liststyle") - " looks like ctrl-w_s or ctrl-w_v was used to split a netrw buffer - let winvars= w: - break - endif - let iwin= iwin + 1 - endwhile - exe "keepalt ".curwin."wincmd w" - if exists("winvars") -" call Decho("copying w#".iwin." window variables to w#".curwin,'~'.expand("")) - for k in keys(winvars) - let w:{k}= winvars[k] - endfor - endif -" call Dret("s:NetrwInsureWinVars win#".winnr()) + " call Dfunc("s:NetrwInsureWinVars() win#".winnr()) + let curbuf = bufnr("%") + let curwin = winnr() + let iwin = 1 + while iwin <= winnr("$") + exe iwin."wincmd w" + if winnr() != curwin && bufnr("%") == curbuf && exists("w:netrw_liststyle") + " looks like ctrl-w_s or ctrl-w_v was used to split a netrw buffer + let winvars= w: + break + endif + let iwin= iwin + 1 + endwhile + exe "keepalt ".curwin."wincmd w" + if exists("winvars") + " call Decho("copying w#".iwin." window variables to w#".curwin,'~'.expand("")) + for k in keys(winvars) + let w:{k}= winvars[k] + endfor + endif + " call Dret("s:NetrwInsureWinVars win#".winnr()) endif endfun @@ -11350,46 +11385,46 @@ endfun " Returns: 0=success " -1=failed fun! s:NetrwLcd(newdir) -" call Dfunc("s:NetrwLcd(newdir<".a:newdir.">)") -" call Decho("changing local directory",'~'.expand("")) + " call Dfunc("s:NetrwLcd(newdir<".a:newdir.">)") + " call Decho("changing local directory",'~'.expand("")) let err472= 0 try - exe 'NetrwKeepj sil lcd '.fnameescape(a:newdir) + exe 'NetrwKeepj sil lcd '.fnameescape(a:newdir) catch /^Vim\%((\a\+)\)\=:E344/ - " Vim's lcd fails with E344 when attempting to go above the 'root' of a Windows share. - " Therefore, detect if a Windows share is present, and if E344 occurs, just settle at - " 'root' (ie. '\'). The share name may start with either backslashes ('\\Foo') or - " forward slashes ('//Foo'), depending on whether backslashes have been converted to - " forward slashes by earlier code; so check for both. - if has("win32") && !g:netrw_cygwin - if a:newdir =~ '^\\\\\w\+' || a:newdir =~ '^//\w\+' - let dirname = '\' - exe 'NetrwKeepj sil lcd '.fnameescape(dirname) - endif - endif + " Vim's lcd fails with E344 when attempting to go above the 'root' of a Windows share. + " Therefore, detect if a Windows share is present, and if E344 occurs, just settle at + " 'root' (ie. '\'). The share name may start with either backslashes ('\\Foo') or + " forward slashes ('//Foo'), depending on whether backslashes have been converted to + " forward slashes by earlier code; so check for both. + if has("win32") && !g:netrw_cygwin + if a:newdir =~ '^\\\\\w\+' || a:newdir =~ '^//\w\+' + let dirname = '\' + exe 'NetrwKeepj sil lcd '.fnameescape(dirname) + endif + endif catch /^Vim\%((\a\+)\)\=:E472/ - let err472= 1 + let err472= 1 endtry if err472 - call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".a:newdir."> (permissions?)",61) - if exists("w:netrw_prvdir") - let a:newdir= w:netrw_prvdir - else - call s:NetrwOptionsRestore("w:") -" call Decho("setl noma nomod nowrap",'~'.expand("")) - exe "setl ".g:netrw_bufsettings -" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) - let a:newdir= dirname - endif -" call Dret("s:NetrwBrowse -1 : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") - return -1 + call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".a:newdir."> (permissions?)",61) + if exists("w:netrw_prvdir") + let a:newdir= w:netrw_prvdir + else + call s:NetrwOptionsRestore("w:") + " call Decho("setl noma nomod nowrap",'~'.expand("")) + exe "setl ".g:netrw_bufsettings + " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) + let a:newdir= dirname + endif + " call Dret("s:NetrwBrowse -1 : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") + return -1 endif -" call Decho("getcwd <".getcwd().">") -" call Decho("b:netrw_curdir<".b:netrw_curdir.">") -" call Dret("s:NetrwLcd 0") + " call Decho("getcwd <".getcwd().">") + " call Decho("b:netrw_curdir<".b:netrw_curdir.">") + " call Dret("s:NetrwLcd 0") return 0 endfun @@ -11397,52 +11432,52 @@ endfun " s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2 " changed sorting, etc. Also see s:NetrwRestoreWordPosn(). fun! s:NetrwSaveWordPosn() -" call Dfunc("NetrwSaveWordPosn()") + " call Dfunc("NetrwSaveWordPosn()") let s:netrw_saveword= '^'.fnameescape(getline('.')).'$' -" call Dret("NetrwSaveWordPosn : saveword<".s:netrw_saveword.">") + " call Dret("NetrwSaveWordPosn : saveword<".s:netrw_saveword.">") endfun " --------------------------------------------------------------------- " s:NetrwHumanReadable: takes a number and makes it "human readable" {{{2 " 1000 -> 1K, 1000000 -> 1M, 1000000000 -> 1G fun! s:NetrwHumanReadable(sz) -" call Dfunc("s:NetrwHumanReadable(sz=".a:sz.") type=".type(a:sz)." style=".g:netrw_sizestyle ) + " call Dfunc("s:NetrwHumanReadable(sz=".a:sz.") type=".type(a:sz)." style=".g:netrw_sizestyle ) if g:netrw_sizestyle == 'h' - if a:sz >= 1000000000 - let sz = printf("%.1f",a:sz/1000000000.0)."g" - elseif a:sz >= 10000000 - let sz = printf("%d",a:sz/1000000)."m" - elseif a:sz >= 1000000 - let sz = printf("%.1f",a:sz/1000000.0)."m" - elseif a:sz >= 10000 - let sz = printf("%d",a:sz/1000)."k" - elseif a:sz >= 1000 - let sz = printf("%.1f",a:sz/1000.0)."k" - else - let sz= a:sz - endif + if a:sz >= 1000000000 + let sz = printf("%.1f",a:sz/1000000000.0)."g" + elseif a:sz >= 10000000 + let sz = printf("%d",a:sz/1000000)."m" + elseif a:sz >= 1000000 + let sz = printf("%.1f",a:sz/1000000.0)."m" + elseif a:sz >= 10000 + let sz = printf("%d",a:sz/1000)."k" + elseif a:sz >= 1000 + let sz = printf("%.1f",a:sz/1000.0)."k" + else + let sz= a:sz + endif elseif g:netrw_sizestyle == 'H' - if a:sz >= 1073741824 - let sz = printf("%.1f",a:sz/1073741824.0)."G" - elseif a:sz >= 10485760 - let sz = printf("%d",a:sz/1048576)."M" - elseif a:sz >= 1048576 - let sz = printf("%.1f",a:sz/1048576.0)."M" - elseif a:sz >= 10240 - let sz = printf("%d",a:sz/1024)."K" - elseif a:sz >= 1024 - let sz = printf("%.1f",a:sz/1024.0)."K" - else - let sz= a:sz - endif + if a:sz >= 1073741824 + let sz = printf("%.1f",a:sz/1073741824.0)."G" + elseif a:sz >= 10485760 + let sz = printf("%d",a:sz/1048576)."M" + elseif a:sz >= 1048576 + let sz = printf("%.1f",a:sz/1048576.0)."M" + elseif a:sz >= 10240 + let sz = printf("%d",a:sz/1024)."K" + elseif a:sz >= 1024 + let sz = printf("%.1f",a:sz/1024.0)."K" + else + let sz= a:sz + endif else - let sz= a:sz + let sz= a:sz endif -" call Dret("s:NetrwHumanReadable ".sz) + " call Dret("s:NetrwHumanReadable ".sz) return sz endfun @@ -11450,15 +11485,15 @@ endfun " s:NetrwRestoreWordPosn: used to keep cursor on same word after refresh, {{{2 " changed sorting, etc. Also see s:NetrwSaveWordPosn(). fun! s:NetrwRestoreWordPosn() -" call Dfunc("NetrwRestoreWordPosn()") + " call Dfunc("NetrwRestoreWordPosn()") sil! call search(s:netrw_saveword,'w') -" call Dret("NetrwRestoreWordPosn") + " call Dret("NetrwRestoreWordPosn") endfun " --------------------------------------------------------------------- " s:RestoreBufVars: {{{2 fun! s:RestoreBufVars() -" call Dfunc("s:RestoreBufVars()") + " call Dfunc("s:RestoreBufVars()") if exists("s:netrw_curdir") |let b:netrw_curdir = s:netrw_curdir |endif if exists("s:netrw_lastfile") |let b:netrw_lastfile = s:netrw_lastfile |endif @@ -11467,13 +11502,13 @@ fun! s:RestoreBufVars() if exists("s:netrw_machine") |let b:netrw_machine = s:netrw_machine |endif if exists("s:netrw_browser_active")|let b:netrw_browser_active = s:netrw_browser_active|endif -" call Dret("s:RestoreBufVars") + " call Dret("s:RestoreBufVars") endfun " --------------------------------------------------------------------- " s:RemotePathAnalysis: {{{2 fun! s:RemotePathAnalysis(dirname) -" call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)") + " call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)") " method :// user @ machine :port /path let dirpat = '^\(\w\{-}\)://\(\(\w\+\)@\)\=\([^/:#]\+\)\%([:#]\(\d\+\)\)\=/\(.*\)$' @@ -11484,19 +11519,19 @@ fun! s:RemotePathAnalysis(dirname) let s:path = substitute(a:dirname,dirpat,'\6','') let s:fname = substitute(s:path,'^.*/\ze.','','') if s:machine =~ '@' - let dirpat = '^\(.*\)@\(.\{-}\)$' - let s:user = s:user.'@'.substitute(s:machine,dirpat,'\1','') - let s:machine = substitute(s:machine,dirpat,'\2','') + let dirpat = '^\(.*\)@\(.\{-}\)$' + let s:user = s:user.'@'.substitute(s:machine,dirpat,'\1','') + let s:machine = substitute(s:machine,dirpat,'\2','') endif -" call Decho("set up s:method <".s:method .">",'~'.expand("")) -" call Decho("set up s:user <".s:user .">",'~'.expand("")) -" call Decho("set up s:machine<".s:machine.">",'~'.expand("")) -" call Decho("set up s:port <".s:port.">",'~'.expand("")) -" call Decho("set up s:path <".s:path .">",'~'.expand("")) -" call Decho("set up s:fname <".s:fname .">",'~'.expand("")) + " call Decho("set up s:method <".s:method .">",'~'.expand("")) + " call Decho("set up s:user <".s:user .">",'~'.expand("")) + " call Decho("set up s:machine<".s:machine.">",'~'.expand("")) + " call Decho("set up s:port <".s:port.">",'~'.expand("")) + " call Decho("set up s:path <".s:path .">",'~'.expand("")) + " call Decho("set up s:fname <".s:fname .">",'~'.expand("")) -" call Dret("s:RemotePathAnalysis") + " call Dret("s:RemotePathAnalysis") endfun " --------------------------------------------------------------------- @@ -11506,31 +11541,31 @@ endfun " [cd REMOTEDIRPATH;] a:cmd " Note that it doesn't do s:ShellEscape(a:cmd)! fun! s:RemoteSystem(cmd) -" call Dfunc("s:RemoteSystem(cmd<".a:cmd.">)") + " call Dfunc("s:RemoteSystem(cmd<".a:cmd.">)") if !executable(g:netrw_ssh_cmd) - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"g:netrw_ssh_cmd<".g:netrw_ssh_cmd."> is not executable!",52) + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"g:netrw_ssh_cmd<".g:netrw_ssh_cmd."> is not executable!",52) elseif !exists("b:netrw_curdir") - NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53) - else - let cmd = s:MakeSshCmd(g:netrw_ssh_cmd." USEPORT HOSTNAME") - let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','') - if remotedir != "" - let cmd= cmd.' cd '.s:ShellEscape(remotedir).";" - else - let cmd= cmd.' ' - endif - let cmd= cmd.a:cmd -" call Decho("call system(".cmd.")",'~'.expand("")) - let ret= system(cmd) - endif -" call Dret("s:RemoteSystem ".ret) + NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53) + else + let cmd = s:MakeSshCmd(g:netrw_ssh_cmd." USEPORT HOSTNAME") + let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','') + if remotedir != "" + let cmd= cmd.' cd '.s:ShellEscape(remotedir).";" + else + let cmd= cmd.' ' + endif + let cmd= cmd.a:cmd + " call Decho("call system(".cmd.")",'~'.expand("")) + let ret= system(cmd) + endif + " call Dret("s:RemoteSystem ".ret) return ret endfun " --------------------------------------------------------------------- " s:RestoreWinVars: (used by Explore() and NetrwSplit()) {{{2 fun! s:RestoreWinVars() -" call Dfunc("s:RestoreWinVars()") + " call Dfunc("s:RestoreWinVars()") if exists("s:bannercnt") |let w:netrw_bannercnt = s:bannercnt |unlet s:bannercnt |endif if exists("s:col") |let w:netrw_col = s:col |unlet s:col |endif if exists("s:curdir") |let w:netrw_curdir = s:curdir |unlet s:curdir |endif @@ -11549,7 +11584,7 @@ fun! s:RestoreWinVars() if exists("s:treedict") |let w:netrw_treedict = s:treedict |unlet s:treedict |endif if exists("s:treetop") |let w:netrw_treetop = s:treetop |unlet s:treetop |endif if exists("s:winnr") |let w:netrw_winnr = s:winnr |unlet s:winnr |endif -" call Dret("s:RestoreWinVars") + " call Dret("s:RestoreWinVars") endfun " --------------------------------------------------------------------- @@ -11563,22 +11598,22 @@ endfun " s:rexposn_BUFNR used to save/restore cursor position fun! s:NetrwRexplore(islocal,dirname) if exists("s:netrwdrag") - return + return endif -" call Dfunc("s:NetrwRexplore() w:netrw_rexlocal=".w:netrw_rexlocal." w:netrw_rexdir<".w:netrw_rexdir."> win#".winnr()) -" call Decho("currently in bufname<".bufname("%").">",'~'.expand("")) -" call Decho("ft=".&ft." win#".winnr()." w:netrw_rexfile<".(exists("w:netrw_rexfile")? w:netrw_rexfile : 'n/a').">",'~'.expand("")) + " call Dfunc("s:NetrwRexplore() w:netrw_rexlocal=".w:netrw_rexlocal." w:netrw_rexdir<".w:netrw_rexdir."> win#".winnr()) + " call Decho("currently in bufname<".bufname("%").">",'~'.expand("")) + " call Decho("ft=".&ft." win#".winnr()." w:netrw_rexfile<".(exists("w:netrw_rexfile")? w:netrw_rexfile : 'n/a').">",'~'.expand("")) if &ft == "netrw" && exists("w:netrw_rexfile") && w:netrw_rexfile != "" - " a :Rex while in a netrw buffer means: edit the file in w:netrw_rexfile -" call Decho("in netrw buffer, will edit file<".w:netrw_rexfile.">",'~'.expand("")) - exe "NetrwKeepj e ".w:netrw_rexfile - unlet w:netrw_rexfile -" call Dret("s:NetrwRexplore returning from netrw to buf#".bufnr("%")."<".bufname("%")."> (ft=".&ft.")") - return -" else " Decho -" call Decho("treating as not-netrw-buffer: ft=".&ft.((&ft == "netrw")? " == netrw" : "!= netrw"),'~'.expand("")) -" call Decho("treating as not-netrw-buffer: w:netrw_rexfile<".((exists("w:netrw_rexfile"))? w:netrw_rexfile : 'n/a').">",'~'.expand("")) + " a :Rex while in a netrw buffer means: edit the file in w:netrw_rexfile + " call Decho("in netrw buffer, will edit file<".w:netrw_rexfile.">",'~'.expand("")) + exe "NetrwKeepj e ".w:netrw_rexfile + unlet w:netrw_rexfile + " call Dret("s:NetrwRexplore returning from netrw to buf#".bufnr("%")."<".bufname("%")."> (ft=".&ft.")") + return + " else " Decho + " call Decho("treating as not-netrw-buffer: ft=".&ft.((&ft == "netrw")? " == netrw" : "!= netrw"),'~'.expand("")) + " call Decho("treating as not-netrw-buffer: w:netrw_rexfile<".((exists("w:netrw_rexfile"))? w:netrw_rexfile : 'n/a').">",'~'.expand("")) endif " --------------------------- @@ -11587,48 +11622,48 @@ fun! s:NetrwRexplore(islocal,dirname) " record current file so :Rex can return to it from netrw let w:netrw_rexfile= expand("%") -" call Decho("set w:netrw_rexfile<".w:netrw_rexfile."> (win#".winnr().")",'~'.expand("")) + " call Decho("set w:netrw_rexfile<".w:netrw_rexfile."> (win#".winnr().")",'~'.expand("")) if !exists("w:netrw_rexlocal") -" call Dret("s:NetrwRexplore w:netrw_rexlocal doesn't exist (".&ft." win#".winnr().")") - return + " call Dret("s:NetrwRexplore w:netrw_rexlocal doesn't exist (".&ft." win#".winnr().")") + return endif -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) if w:netrw_rexlocal - NetrwKeepj call netrw#LocalBrowseCheck(w:netrw_rexdir) + NetrwKeepj call netrw#LocalBrowseCheck(w:netrw_rexdir) else - NetrwKeepj call s:NetrwBrowse(0,w:netrw_rexdir) + NetrwKeepj call s:NetrwBrowse(0,w:netrw_rexdir) endif if exists("s:initbeval") - setl beval + setl beval endif if exists("s:rexposn_".bufnr("%")) -" call Decho("restore posn, then unlet s:rexposn_".bufnr('%')."<".bufname("%").">",'~'.expand("")) - " restore position in directory listing -" call Decho("restoring posn to s:rexposn_".bufnr('%')."<".string(s:rexposn_{bufnr('%')}).">",'~'.expand("")) - NetrwKeepj call winrestview(s:rexposn_{bufnr('%')}) - if exists("s:rexposn_".bufnr('%')) - unlet s:rexposn_{bufnr('%')} - endif + " call Decho("restore posn, then unlet s:rexposn_".bufnr('%')."<".bufname("%").">",'~'.expand("")) + " restore position in directory listing + " call Decho("restoring posn to s:rexposn_".bufnr('%')."<".string(s:rexposn_{bufnr('%')}).">",'~'.expand("")) + NetrwKeepj call winrestview(s:rexposn_{bufnr('%')}) + if exists("s:rexposn_".bufnr('%')) + unlet s:rexposn_{bufnr('%')} + endif else -" call Decho("s:rexposn_".bufnr('%')."<".bufname("%")."> doesn't exist",'~'.expand("")) + " call Decho("s:rexposn_".bufnr('%')."<".bufname("%")."> doesn't exist",'~'.expand("")) endif if has("syntax") && exists("g:syntax_on") && g:syntax_on - if exists("s:explore_match") - exe "2match netrwMarkFile /".s:explore_match."/" - endif + if exists("s:explore_match") + exe "2match netrwMarkFile /".s:explore_match."/" + endif endif -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Dret("s:NetrwRexplore : ft=".&ft) + " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + " call Dret("s:NetrwRexplore : ft=".&ft) endfun " --------------------------------------------------------------------- " s:SaveBufVars: save selected b: variables to s: variables {{{2 " use s:RestoreBufVars() to restore b: variables from s: variables fun! s:SaveBufVars() -" call Dfunc("s:SaveBufVars() buf#".bufnr("%")) + " call Dfunc("s:SaveBufVars() buf#".bufnr("%")) if exists("b:netrw_curdir") |let s:netrw_curdir = b:netrw_curdir |endif if exists("b:netrw_lastfile") |let s:netrw_lastfile = b:netrw_lastfile |endif @@ -11637,49 +11672,49 @@ fun! s:SaveBufVars() if exists("b:netrw_machine") |let s:netrw_machine = b:netrw_machine |endif if exists("b:netrw_browser_active")|let s:netrw_browser_active = b:netrw_browser_active|endif -" call Dret("s:SaveBufVars") + " call Dret("s:SaveBufVars") endfun " --------------------------------------------------------------------- " s:SavePosn: saves position associated with current buffer into a dictionary {{{2 fun! s:SavePosn(posndict) -" call Dfunc("s:SavePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">") + " call Dfunc("s:SavePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">") if !exists("a:posndict[bufnr('%')]") - let a:posndict[bufnr("%")]= [] + let a:posndict[bufnr("%")]= [] endif -" call Decho("before push: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) + " call Decho("before push: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) call add(a:posndict[bufnr("%")],winsaveview()) -" call Decho("after push: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) + " call Decho("after push: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) -" call Dret("s:SavePosn posndict") + " call Dret("s:SavePosn posndict") return a:posndict endfun " --------------------------------------------------------------------- " s:RestorePosn: restores position associated with current buffer using dictionary {{{2 fun! s:RestorePosn(posndict) -" call Dfunc("s:RestorePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">") + " call Dfunc("s:RestorePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">") if exists("a:posndict") - if has_key(a:posndict,bufnr("%")) -" call Decho("before pop: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) - let posnlen= len(a:posndict[bufnr("%")]) - if posnlen > 0 - let posnlen= posnlen - 1 -" call Decho("restoring posn posndict[".bufnr("%")."][".posnlen."]=".string(a:posndict[bufnr("%")][posnlen]),'~'.expand("")) - call winrestview(a:posndict[bufnr("%")][posnlen]) - call remove(a:posndict[bufnr("%")],posnlen) -" call Decho("after pop: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) + if has_key(a:posndict,bufnr("%")) + " call Decho("before pop: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) + let posnlen= len(a:posndict[bufnr("%")]) + if posnlen > 0 + let posnlen= posnlen - 1 + " call Decho("restoring posn posndict[".bufnr("%")."][".posnlen."]=".string(a:posndict[bufnr("%")][posnlen]),'~'.expand("")) + call winrestview(a:posndict[bufnr("%")][posnlen]) + call remove(a:posndict[bufnr("%")],posnlen) + " call Decho("after pop: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) + endif endif - endif endif -" call Dret("s:RestorePosn") + " call Dret("s:RestorePosn") endfun " --------------------------------------------------------------------- " s:SaveWinVars: (used by Explore() and NetrwSplit()) {{{2 fun! s:SaveWinVars() -" call Dfunc("s:SaveWinVars() win#".winnr()) + " call Dfunc("s:SaveWinVars() win#".winnr()) if exists("w:netrw_bannercnt") |let s:bannercnt = w:netrw_bannercnt |endif if exists("w:netrw_col") |let s:col = w:netrw_col |endif if exists("w:netrw_curdir") |let s:curdir = w:netrw_curdir |endif @@ -11698,7 +11733,7 @@ fun! s:SaveWinVars() if exists("w:netrw_treedict") |let s:treedict = w:netrw_treedict |endif if exists("w:netrw_treetop") |let s:treetop = w:netrw_treetop |endif if exists("w:netrw_winnr") |let s:winnr = w:netrw_winnr |endif -" call Dret("s:SaveWinVars") + " call Dret("s:SaveWinVars") endfun " --------------------------------------------------------------------- @@ -11709,7 +11744,7 @@ endfun " variables are not inherited by the new window. SetBufWinVars() and " UseBufWinVars() get around that. fun! s:SetBufWinVars() -" call Dfunc("s:SetBufWinVars() win#".winnr()) + " call Dfunc("s:SetBufWinVars() win#".winnr()) if exists("w:netrw_liststyle") |let b:netrw_liststyle = w:netrw_liststyle |endif if exists("w:netrw_bannercnt") |let b:netrw_bannercnt = w:netrw_bannercnt |endif if exists("w:netrw_method") |let b:netrw_method = w:netrw_method |endif @@ -11720,43 +11755,44 @@ fun! s:SetBufWinVars() if exists("w:netrw_explore_bufnr") |let b:netrw_explore_bufnr = w:netrw_explore_bufnr |endif if exists("w:netrw_explore_line") |let b:netrw_explore_line = w:netrw_explore_line |endif if exists("w:netrw_explore_list") |let b:netrw_explore_list = w:netrw_explore_list |endif -" call Dret("s:SetBufWinVars") + " call Dret("s:SetBufWinVars") endfun " --------------------------------------------------------------------- " s:SetRexDir: set directory for :Rexplore {{{2 fun! s:SetRexDir(islocal,dirname) -" call Dfunc("s:SetRexDir(islocal=".a:islocal." dirname<".a:dirname.">) win#".winnr()) + " call Dfunc("s:SetRexDir(islocal=".a:islocal." dirname<".a:dirname.">) win#".winnr()) let w:netrw_rexdir = a:dirname let w:netrw_rexlocal = a:islocal let s:rexposn_{bufnr("%")} = winsaveview() -" call Decho("setting w:netrw_rexdir =".w:netrw_rexdir,'~'.expand("")) -" call Decho("setting w:netrw_rexlocal=".w:netrw_rexlocal,'~'.expand("")) -" call Decho("saving posn to s:rexposn_".bufnr("%")."<".string(s:rexposn_{bufnr("%")}).">",'~'.expand("")) -" call Decho("setting s:rexposn_".bufnr("%")."<".bufname("%")."> to ".string(winsaveview()),'~'.expand("")) -" call Dret("s:SetRexDir : win#".winnr()." ".(a:islocal? "local" : "remote")." dir: ".a:dirname) + " call Decho("setting w:netrw_rexdir =".w:netrw_rexdir,'~'.expand("")) + " call Decho("setting w:netrw_rexlocal=".w:netrw_rexlocal,'~'.expand("")) + " call Decho("saving posn to s:rexposn_".bufnr("%")."<".string(s:rexposn_{bufnr("%")}).">",'~'.expand("")) + " call Decho("setting s:rexposn_".bufnr("%")."<".bufname("%")."> to ".string(winsaveview()),'~'.expand("")) + " call Dret("s:SetRexDir : win#".winnr()." ".(a:islocal? "local" : "remote")." dir: ".a:dirname) endfun " --------------------------------------------------------------------- " s:ShowLink: used to modify thin and tree listings to show links {{{2 fun! s:ShowLink() if exists("b:netrw_curdir") - norm! $?\a - if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treetop") - let basedir = s:NetrwTreePath(w:netrw_treetop) - else - let basedir = b:netrw_curdir.'/' - endif - let fname = basedir.s:NetrwGetWord() - let resname = resolve(fname) - if resname =~ '^\M'.basedir - let dirlen = strlen(basedir) - let resname = strpart(resname,dirlen) - endif - let modline = getline(".")."\t --> ".resname - setl noro ma - call setline(".",modline) - setl ro noma nomod + keepp :norm! $?\a + "call histdel("/",-1) + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treetop") + let basedir = s:NetrwTreePath(w:netrw_treetop) + else + let basedir = b:netrw_curdir.'/' + endif + let fname = basedir.s:NetrwGetWord() + let resname = resolve(fname) + if resname =~ '^\M'.basedir + let dirlen = strlen(basedir) + let resname = strpart(resname,dirlen) + endif + let modline = getline(".")."\t --> ".resname + setl noro ma + call setline(".",modline) + setl ro noma nomod endif endfun @@ -11764,20 +11800,20 @@ endfun " s:ShowStyle: {{{2 fun! s:ShowStyle() if !exists("w:netrw_liststyle") - let liststyle= g:netrw_liststyle + let liststyle= g:netrw_liststyle else - let liststyle= w:netrw_liststyle + let liststyle= w:netrw_liststyle endif if liststyle == s:THINLIST - return s:THINLIST.":thin" + return s:THINLIST.":thin" elseif liststyle == s:LONGLIST - return s:LONGLIST.":long" + return s:LONGLIST.":long" elseif liststyle == s:WIDELIST - return s:WIDELIST.":wide" + return s:WIDELIST.":wide" elseif liststyle == s:TREELIST - return s:TREELIST.":tree" + return s:TREELIST.":tree" else - return 'n/a' + return 'n/a' endif endfun @@ -11786,44 +11822,44 @@ endfun " Solution from Nicolai Weibull, vim docs (:help strlen()), " Tony Mechelynck, and my own invention. fun! s:Strlen(x) -" "" call Dfunc("s:Strlen(x<".a:x."> g:Align_xstrlen=".g:Align_xstrlen.")") + " "" call Dfunc("s:Strlen(x<".a:x."> g:Align_xstrlen=".g:Align_xstrlen.")") if v:version >= 703 && exists("*strdisplaywidth") - let ret= strdisplaywidth(a:x) + let ret= strdisplaywidth(a:x) elseif type(g:Align_xstrlen) == 1 - " allow user to specify a function to compute the string length (ie. let g:Align_xstrlen="mystrlenfunc") - exe "let ret= ".g:Align_xstrlen."('".substitute(a:x,"'","''","g")."')" + " allow user to specify a function to compute the string length (ie. let g:Align_xstrlen="mystrlenfunc") + exe "let ret= ".g:Align_xstrlen."('".substitute(a:x,"'","''","g")."')" elseif g:Align_xstrlen == 1 - " number of codepoints (Latin a + combining circumflex is two codepoints) - " (comment from TM, solution from NW) - let ret= strlen(substitute(a:x,'.','c','g')) + " number of codepoints (Latin a + combining circumflex is two codepoints) + " (comment from TM, solution from NW) + let ret= strlen(substitute(a:x,'.','c','g')) elseif g:Align_xstrlen == 2 - " number of spacing codepoints (Latin a + combining circumflex is one spacing - " codepoint; a hard tab is one; wide and narrow CJK are one each; etc.) - " (comment from TM, solution from TM) - let ret=strlen(substitute(a:x, '.\Z', 'x', 'g')) + " number of spacing codepoints (Latin a + combining circumflex is one spacing + " codepoint; a hard tab is one; wide and narrow CJK are one each; etc.) + " (comment from TM, solution from TM) + let ret=strlen(substitute(a:x, '.\Z', 'x', 'g')) elseif g:Align_xstrlen == 3 - " virtual length (counting, for instance, tabs as anything between 1 and - " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately - " preceded by lam, one otherwise, etc.) - " (comment from TM, solution from me) - let modkeep= &l:mod - exe "norm! o\" - call setline(line("."),a:x) - let ret= virtcol("$") - 1 - d - NetrwKeepj norm! k - let &l:mod= modkeep - - else - " at least give a decent default + " virtual length (counting, for instance, tabs as anything between 1 and + " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately + " preceded by lam, one otherwise, etc.) + " (comment from TM, solution from me) + let modkeep= &l:mod + exe "norm! o\" + call setline(line("."),a:x) + let ret= virtcol("$") - 1 + d + NetrwKeepj norm! k + let &l:mod= modkeep + + else + " at least give a decent default let ret= strlen(a:x) endif -" "" call Dret("s:Strlen ".ret) + " "" call Dret("s:Strlen ".ret) return ret endfun @@ -11840,7 +11876,7 @@ endfun " --------------------------------------------------------------------- " s:TreeListMove: supports [[, ]], [], and ][ in tree mode {{{2 fun! s:TreeListMove(dir) -" call Dfunc("s:TreeListMove(dir<".a:dir.">)") + " call Dfunc("s:TreeListMove(dir<".a:dir.">)") let curline = getline('.') let prvline = (line(".") > 1)? getline(line(".")-1) : '' let nxtline = (line(".") < line("$"))? getline(line(".")+1) : '' @@ -11848,32 +11884,32 @@ fun! s:TreeListMove(dir) let indentm1 = substitute(curindent,'^'.s:treedepthstring,'','') let treedepthchr = substitute(s:treedepthstring,' ','','g') let stopline = exists("w:netrw_bannercnt")? w:netrw_bannercnt : 1 -" call Decho("prvline <".prvline."> #".(line(".")-1), '~'.expand("")) -" call Decho("curline <".curline."> #".line(".") , '~'.expand("")) -" call Decho("nxtline <".nxtline."> #".(line(".")+1), '~'.expand("")) -" call Decho("curindent<".curindent.">" , '~'.expand("")) -" call Decho("indentm1 <".indentm1.">" , '~'.expand("")) + " call Decho("prvline <".prvline."> #".(line(".")-1), '~'.expand("")) + " call Decho("curline <".curline."> #".line(".") , '~'.expand("")) + " call Decho("nxtline <".nxtline."> #".(line(".")+1), '~'.expand("")) + " call Decho("curindent<".curindent.">" , '~'.expand("")) + " call Decho("indentm1 <".indentm1.">" , '~'.expand("")) " COMBAK : need to handle when on a directory " COMBAK : need to handle ]] and ][. In general, needs work!!! if curline !~ '/$' - if a:dir == '[[' && prvline != '' - NetrwKeepj norm! 0 - let nl = search('^'.indentm1.'\%('.s:treedepthstring.'\)\@!','bWe',stopline) " search backwards -" call Decho("regfile srch back: ".nl,'~'.expand("")) - elseif a:dir == '[]' && nxtline != '' - NetrwKeepj norm! 0 -" call Decho('srchpat<'.'^\%('.curindent.'\)\@!'.'>','~'.expand("")) - let nl = search('^\%('.curindent.'\)\@!','We') " search forwards - if nl != 0 - NetrwKeepj norm! k - else - NetrwKeepj norm! G + if a:dir == '[[' && prvline != '' + NetrwKeepj norm! 0 + let nl = search('^'.indentm1.'\%('.s:treedepthstring.'\)\@!','bWe',stopline) " search backwards + " call Decho("regfile srch back: ".nl,'~'.expand("")) + elseif a:dir == '[]' && nxtline != '' + NetrwKeepj norm! 0 + " call Decho('srchpat<'.'^\%('.curindent.'\)\@!'.'>','~'.expand("")) + let nl = search('^\%('.curindent.'\)\@!','We') " search forwards + if nl != 0 + NetrwKeepj norm! k + else + NetrwKeepj norm! G + endif + " call Decho("regfile srch fwd: ".nl,'~'.expand("")) endif -" call Decho("regfile srch fwd: ".nl,'~'.expand("")) - endif endif -" call Dret("s:TreeListMove") + " call Dret("s:TreeListMove") endfun " --------------------------------------------------------------------- @@ -11882,23 +11918,23 @@ endfun " can't be called except via emenu. But due to locale, that menu line may not be called " Buffers.Refresh; hence, s:NetrwBMShow() utilizes a "cheat" to call that function anyway. fun! s:UpdateBuffersMenu() -" call Dfunc("s:UpdateBuffersMenu()") + " call Dfunc("s:UpdateBuffersMenu()") if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu - try - sil emenu Buffers.Refresh\ menu - catch /^Vim\%((\a\+)\)\=:E/ - let v:errmsg= "" - sil NetrwKeepj call s:NetrwBMShow() - endtry + try + sil emenu Buffers.Refresh\ menu + catch /^Vim\%((\a\+)\)\=:E/ + let v:errmsg= "" + sil NetrwKeepj call s:NetrwBMShow() + endtry endif -" call Dret("s:UpdateBuffersMenu") + " call Dret("s:UpdateBuffersMenu") endfun " --------------------------------------------------------------------- " s:UseBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck() {{{2 " Matching function to s:SetBufWinVars() fun! s:UseBufWinVars() -" call Dfunc("s:UseBufWinVars()") + " call Dfunc("s:UseBufWinVars()") if exists("b:netrw_liststyle") && !exists("w:netrw_liststyle") |let w:netrw_liststyle = b:netrw_liststyle |endif if exists("b:netrw_bannercnt") && !exists("w:netrw_bannercnt") |let w:netrw_bannercnt = b:netrw_bannercnt |endif if exists("b:netrw_method") && !exists("w:netrw_method") |let w:netrw_method = b:netrw_method |endif @@ -11909,7 +11945,7 @@ fun! s:UseBufWinVars() if exists("b:netrw_explore_bufnr") && !exists("w:netrw_explore_bufnr") |let w:netrw_explore_bufnr = b:netrw_explore_bufnr |endif if exists("b:netrw_explore_line") && !exists("w:netrw_explore_line") |let w:netrw_explore_line = b:netrw_explore_line |endif if exists("b:netrw_explore_list") && !exists("w:netrw_explore_list") |let w:netrw_explore_list = b:netrw_explore_list |endif -" call Dret("s:UseBufWinVars") + " call Dret("s:UseBufWinVars") endfun " --------------------------------------------------------------------- @@ -11919,28 +11955,28 @@ endfun " See netrw#UserMaps() fun! s:UserMaps(islocal,funcname) if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() + let b:netrw_curdir= getcwd() endif let Funcref = function(a:funcname) let result = Funcref(a:islocal) if type(result) == 1 - " if result from user's funcref is a string... - if result == "refresh" - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - elseif result != "" - exe result - endif + " if result from user's funcref is a string... + if result == "refresh" + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + elseif result != "" + exe result + endif elseif type(result) == 3 - " if result from user's funcref is a List... - for action in result - if action == "refresh" - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) - elseif action != "" - exe action - endif - endfor + " if result from user's funcref is a List... + for action in result + if action == "refresh" + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) + elseif action != "" + exe action + endif + endfor endif endfun @@ -11953,4 +11989,4 @@ unlet s:keepcpo " =============== " Modelines: {{{1 " =============== -" vim:ts=8 fdm=marker +" vim:ts=8 sts=2 sw=2 et fdm=marker diff --git a/usr/share/vim/vim91/autoload/spotbugs.vim b/usr/share/vim/vim91/autoload/spotbugs.vim new file mode 100644 index 00000000000..e2262074ed4 --- /dev/null +++ b/usr/share/vim/vim91/autoload/spotbugs.vim @@ -0,0 +1,352 @@ +" Default pre- and post-compiler actions and commands for SpotBugs +" Maintainers: @konfekt and @zzzyxwvut +" Last Change: 2024 Dec 08 + +let s:save_cpo = &cpo +set cpo&vim + +" Look for the setting of "g:spotbugs#state" in "ftplugin/java.vim". +let s:state = get(g:, 'spotbugs#state', {}) +let s:commands = get(s:state, 'commands', {}) +let s:compiler = get(s:state, 'compiler', '') +let s:readable = filereadable($VIMRUNTIME . '/compiler/' . s:compiler . '.vim') + +if has_key(s:commands, 'DefaultPreCompilerCommand') + let g:SpotBugsPreCompilerCommand = s:commands.DefaultPreCompilerCommand +else + + function! s:DefaultPreCompilerCommand(arguments) abort + execute 'make ' . a:arguments + cc + endfunction + + let g:SpotBugsPreCompilerCommand = function('s:DefaultPreCompilerCommand') +endif + +if has_key(s:commands, 'DefaultPreCompilerTestCommand') + let g:SpotBugsPreCompilerTestCommand = s:commands.DefaultPreCompilerTestCommand +else + + function! s:DefaultPreCompilerTestCommand(arguments) abort + execute 'make ' . a:arguments + cc + endfunction + + let g:SpotBugsPreCompilerTestCommand = function('s:DefaultPreCompilerTestCommand') +endif + +if has_key(s:commands, 'DefaultPostCompilerCommand') + let g:SpotBugsPostCompilerCommand = s:commands.DefaultPostCompilerCommand +else + + function! s:DefaultPostCompilerCommand(arguments) abort + execute 'make ' . a:arguments + endfunction + + let g:SpotBugsPostCompilerCommand = function('s:DefaultPostCompilerCommand') +endif + +if v:version > 900 + + function! spotbugs#DeleteClassFiles() abort + if !exists('b:spotbugs_class_files') + return + endif + + for pathname in b:spotbugs_class_files + let classname = pathname =~# "^'.\\+\\.class'$" + \ ? eval(pathname) + \ : pathname + + if classname =~# '\.class$' && filereadable(classname) + " Since v9.0.0795. + let octad = readblob(classname, 0, 8) + + " Test the magic number and the major version number (45 for v1.0). + " Since v9.0.2027. + if len(octad) == 8 && octad[0 : 3] == 0zcafe.babe && + \ or((octad[6] << 8), octad[7]) >= 45 + echomsg printf('Deleting %s: %d', classname, delete(classname)) + endif + endif + endfor + + let b:spotbugs_class_files = [] + endfunction + +else + + function! s:DeleteClassFilesWithNewLineCodes(classname) abort + " The distribution of "0a"s in class file versions 2560 and 2570: + " + " 0zca.fe.ba.be.00.00.0a.00 0zca.fe.ba.be.00.00.0a.0a + " 0zca.fe.ba.be.00.0a.0a.00 0zca.fe.ba.be.00.0a.0a.0a + " 0zca.fe.ba.be.0a.00.0a.00 0zca.fe.ba.be.0a.00.0a.0a + " 0zca.fe.ba.be.0a.0a.0a.00 0zca.fe.ba.be.0a.0a.0a.0a + let numbers = [0, 0, 0, 0, 0, 0, 0, 0] + let offset = 0 + let lines = readfile(a:classname, 'b', 4) + + " Track NL byte counts to handle files of less than 8 bytes. + let nl_cnt = len(lines) + " Track non-NL byte counts for "0zca.fe.ba.be.0a.0a.0a.0a". + let non_nl_cnt = 0 + + for line in lines + for idx in range(strlen(line)) + " Remap NLs to Nuls. + let numbers[offset] = (line[idx] == "\n") ? 0 : char2nr(line[idx]) % 256 + let non_nl_cnt += 1 + let offset += 1 + + if offset > 7 + break + endif + endfor + + let nl_cnt -= 1 + + if offset > 7 || (nl_cnt < 1 && non_nl_cnt > 4) + break + endif + + " Reclaim NLs. + let numbers[offset] = 10 + let offset += 1 + + if offset > 7 + break + endif + endfor + + " Test the magic number and the major version number (45 for v1.0). + if offset > 7 && numbers[0] == 0xca && numbers[1] == 0xfe && + \ numbers[2] == 0xba && numbers[3] == 0xbe && + \ (numbers[6] * 256 + numbers[7]) >= 45 + echomsg printf('Deleting %s: %d', a:classname, delete(a:classname)) + endif + endfunction + + function! spotbugs#DeleteClassFiles() abort + if !exists('b:spotbugs_class_files') + return + endif + + let encoding = &encoding + + try + set encoding=latin1 + + for pathname in b:spotbugs_class_files + let classname = pathname =~# "^'.\\+\\.class'$" + \ ? eval(pathname) + \ : pathname + + if classname =~# '\.class$' && filereadable(classname) + let line = get(readfile(classname, 'b', 1), 0, '') + let length = strlen(line) + + " Test the magic number and the major version number (45 for v1.0). + if length > 3 && line[0 : 3] == "\xca\xfe\xba\xbe" + if length > 7 && ((line[6] == "\n" ? 0 : char2nr(line[6]) % 256) * 256 + + \ (line[7] == "\n" ? 0 : char2nr(line[7]) % 256)) >= 45 + echomsg printf('Deleting %s: %d', classname, delete(classname)) + else + call s:DeleteClassFilesWithNewLineCodes(classname) + endif + endif + endif + endfor + finally + let &encoding = encoding + endtry + + let b:spotbugs_class_files = [] + endfunction + +endif + +function! spotbugs#DefaultPostCompilerAction() abort + " Since v7.4.191. + call call(g:SpotBugsPostCompilerCommand, ['%:S']) +endfunction + +if s:readable && s:compiler ==# 'maven' && executable('mvn') + + function! spotbugs#DefaultPreCompilerAction() abort + call spotbugs#DeleteClassFiles() + compiler maven + call call(g:SpotBugsPreCompilerCommand, ['compile']) + endfunction + + function! spotbugs#DefaultPreCompilerTestAction() abort + call spotbugs#DeleteClassFiles() + compiler maven + call call(g:SpotBugsPreCompilerTestCommand, ['test-compile']) + endfunction + + function! spotbugs#DefaultProperties() abort + return { + \ 'PreCompilerAction': + \ function('spotbugs#DefaultPreCompilerAction'), + \ 'PreCompilerTestAction': + \ function('spotbugs#DefaultPreCompilerTestAction'), + \ 'PostCompilerAction': + \ function('spotbugs#DefaultPostCompilerAction'), + \ 'sourceDirPath': ['src/main/java'], + \ 'classDirPath': ['target/classes'], + \ 'testSourceDirPath': ['src/test/java'], + \ 'testClassDirPath': ['target/test-classes'], + \ } + endfunction + + unlet s:readable s:compiler +elseif s:readable && s:compiler ==# 'ant' && executable('ant') + + function! spotbugs#DefaultPreCompilerAction() abort + call spotbugs#DeleteClassFiles() + compiler ant + call call(g:SpotBugsPreCompilerCommand, ['compile']) + endfunction + + function! spotbugs#DefaultPreCompilerTestAction() abort + call spotbugs#DeleteClassFiles() + compiler ant + call call(g:SpotBugsPreCompilerTestCommand, ['compile-test']) + endfunction + + function! spotbugs#DefaultProperties() abort + return { + \ 'PreCompilerAction': + \ function('spotbugs#DefaultPreCompilerAction'), + \ 'PreCompilerTestAction': + \ function('spotbugs#DefaultPreCompilerTestAction'), + \ 'PostCompilerAction': + \ function('spotbugs#DefaultPostCompilerAction'), + \ 'sourceDirPath': ['src'], + \ 'classDirPath': ['build/classes'], + \ 'testSourceDirPath': ['test'], + \ 'testClassDirPath': ['build/test/classes'], + \ } + endfunction + + unlet s:readable s:compiler +elseif s:readable && s:compiler ==# 'javac' && executable('javac') + let s:filename = tempname() + + function! spotbugs#DefaultPreCompilerAction() abort + call spotbugs#DeleteClassFiles() + compiler javac + + if get(b:, 'javac_makeprg_params', get(g:, 'javac_makeprg_params', '')) =~ '\s@\S' + " Only read options and filenames from @options [@sources ...] and do + " not update these files when filelists change. + call call(g:SpotBugsPreCompilerCommand, ['']) + else + " Collect filenames so that Javac can figure out what to compile. + let filelist = [] + + for arg_num in range(argc(-1)) + let arg_name = argv(arg_num) + + if arg_name =~# '\.java\=$' + call add(filelist, fnamemodify(arg_name, ':p:S')) + endif + endfor + + for buf_num in range(1, bufnr('$')) + if !buflisted(buf_num) + continue + endif + + let buf_name = bufname(buf_num) + + if buf_name =~# '\.java\=$' + let buf_name = fnamemodify(buf_name, ':p:S') + + if index(filelist, buf_name) < 0 + call add(filelist, buf_name) + endif + endif + endfor + + noautocmd call writefile(filelist, s:filename) + call call(g:SpotBugsPreCompilerCommand, [shellescape('@' . s:filename)]) + endif + endfunction + + function! spotbugs#DefaultPreCompilerTestAction() abort + call spotbugs#DefaultPreCompilerAction() + endfunction + + function! spotbugs#DefaultProperties() abort + return { + \ 'PreCompilerAction': + \ function('spotbugs#DefaultPreCompilerAction'), + \ 'PostCompilerAction': + \ function('spotbugs#DefaultPostCompilerAction'), + \ } + endfunction + + unlet s:readable s:compiler g:SpotBugsPreCompilerTestCommand + delfunction! s:DefaultPreCompilerTestCommand +else + + function! spotbugs#DefaultPreCompilerAction() abort + echomsg printf('Not supported: "%s"', s:compiler) + endfunction + + function! spotbugs#DefaultPreCompilerTestAction() abort + call spotbugs#DefaultPreCompilerAction() + endfunction + + function! spotbugs#DefaultProperties() abort + return {} + endfunction + + " XXX: Keep "s:compiler" around for "spotbugs#DefaultPreCompilerAction()", + " "s:DefaultPostCompilerCommand" -- "spotbugs#DefaultPostCompilerAction()". + unlet s:readable g:SpotBugsPreCompilerCommand g:SpotBugsPreCompilerTestCommand + delfunction! s:DefaultPreCompilerCommand + delfunction! s:DefaultPreCompilerTestCommand +endif + +function! s:DefineBufferAutocmd(event, ...) abort + if !exists('#java_spotbugs#User') + return 1 + endif + + for l:event in insert(copy(a:000), a:event) + if l:event != 'User' + execute printf('silent! autocmd! java_spotbugs %s ', l:event) + execute printf('autocmd java_spotbugs %s doautocmd User', l:event) + endif + endfor + + return 0 +endfunction + +function! s:RemoveBufferAutocmd(event, ...) abort + if !exists('#java_spotbugs') + return 1 + endif + + for l:event in insert(copy(a:000), a:event) + if l:event != 'User' + execute printf('silent! autocmd! java_spotbugs %s ', l:event) + endif + endfor + + return 0 +endfunction + +" Documented in ":help compiler-spotbugs". +command! -bar -nargs=+ -complete=event SpotBugsDefineBufferAutocmd + \ call s:DefineBufferAutocmd() +command! -bar -nargs=+ -complete=event SpotBugsRemoveBufferAutocmd + \ call s:RemoveBufferAutocmd() + +let &cpo = s:save_cpo +unlet s:commands s:state s:save_cpo + +" vim: set foldmethod=syntax shiftwidth=2 expandtab: diff --git a/usr/share/vim/vim91/autoload/typst.vim b/usr/share/vim/vim91/autoload/typst.vim index 6d097dd922e..362da3f45e5 100644 --- a/usr/share/vim/vim91/autoload/typst.vim +++ b/usr/share/vim/vim91/autoload/typst.vim @@ -1,6 +1,7 @@ " Language: Typst -" Maintainer: Gregory Anders -" Last Change: 2024 Nov 02 +" Previous Maintainer: Gregory Anders +" Maintainer: Luca Saccarola +" Last Change: 2024 Dec 09 " Based on: https://github.com/kaarmu/typst.vim function! typst#indentexpr() abort diff --git a/usr/share/vim/vim91/compiler/bash.vim b/usr/share/vim/vim91/compiler/bash.vim new file mode 100644 index 00000000000..cbd76ae410a --- /dev/null +++ b/usr/share/vim/vim91/compiler/bash.vim @@ -0,0 +1,12 @@ +" Vim compiler file +" Compiler: Bash Syntax Checker +" Maintainer: @konfekt +" Last Change: 2024 Dec 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "bash" + +CompilerSet makeprg=bash\ -n +CompilerSet errorformat=%f:\ line\ %l:\ %m diff --git a/usr/share/vim/vim91/compiler/cppcheck.vim b/usr/share/vim/vim91/compiler/cppcheck.vim index 4df12d1714f..033613c091a 100644 --- a/usr/share/vim/vim91/compiler/cppcheck.vim +++ b/usr/share/vim/vim91/compiler/cppcheck.vim @@ -1,7 +1,7 @@ " vim compiler file " Compiler: cppcheck (C++ static checker) " Maintainer: Vincent B. (twinside@free.fr) -" Last Change: 2024 Nov 08 by @Konfekt +" Last Change: 2024 Nov 19 by @Konfekt if exists("current_compiler") | finish | endif let current_compiler = "cppcheck" @@ -25,7 +25,7 @@ let &l:makeprg = 'cppcheck --quiet' \ (filereadable('compile_commands.json') ? '--project=compile_commands.json' : \ (!empty(glob('*'..s:slash..'compile_commands.json', 1, 1)) ? '--project='..glob('*'..s:slash..'compile_commands.json', 1, 1)[0] : \ (empty(&path) ? '' : '-I')..join(map(filter(split(&path, ','), 'isdirectory(v:val)'),'shellescape(v:val)'), ' -I'))))) -exe 'CompilerSet makeprg='..escape(&l:makeprg, ' "') +exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') CompilerSet errorformat= \%f:%l:%c:\ %tarning:\ %m, diff --git a/usr/share/vim/vim91/compiler/eslint.vim b/usr/share/vim/vim91/compiler/eslint.vim index db7a665991e..04148179005 100644 --- a/usr/share/vim/vim91/compiler/eslint.vim +++ b/usr/share/vim/vim91/compiler/eslint.vim @@ -1,13 +1,12 @@ " Vim compiler file " Compiler: ESLint for JavaScript " Maintainer: Romain Lafourcade -" Last Change: 2020 August 20 -" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) +" Last Change: 2024 Nov 30 if exists("current_compiler") finish endif let current_compiler = "eslint" -CompilerSet makeprg=npx\ eslint\ --format\ compact -CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m,%-G%.%# +CompilerSet makeprg=npx\ eslint\ --format\ stylish +CompilerSet errorformat=%-P%f,\%\\s%#%l:%c\ %#\ %trror\ \ %m,\%\\s%#%l:%c\ %#\ %tarning\ \ %m,\%-Q,\%-G%.%#, diff --git a/usr/share/vim/vim91/compiler/groff.vim b/usr/share/vim/vim91/compiler/groff.vim index 640146d6a13..3e9ae0488fc 100644 --- a/usr/share/vim/vim91/compiler/groff.vim +++ b/usr/share/vim/vim91/compiler/groff.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Groff " Maintainer: Konfekt -" Last Change: 2024 Sep 8 +" Last Change: 2024 Nov 19 " " Expects output file extension, say `:make html` or `:make pdf`. " Supported devices as of Sept 2024 are: (x)html, pdf, ps, dvi, lj4, lbp ... @@ -30,7 +30,7 @@ execute 'CompilerSet makeprg=groff'..escape( \ ' '..s:groff_compiler_lang().. \ ' -K'..get(b:, 'groff_compiler_encoding', get(g:, 'groff_compiler_encoding', 'utf8')).. \ ' '..get(b:, 'groff_compiler_args', get(g:, 'groff_compiler_args', '')).. - \ ' -mom -T$* -- %:S > %:r:S.$*', ' ') + \ ' -mom -T$* -- %:S > %:r:S.$*', ' \|"') " From Gavin Freeborn's https://github.com/Gavinok/vim-troff under Vim License " https://github.com/Gavinok/vim-troff/blob/91017b1423caa80aba541c997909a4f810edd275/compiler/troff.vim#L39 CompilerSet errorformat=%o:\ (%f):%l:%m, diff --git a/usr/share/vim/vim91/compiler/javac.vim b/usr/share/vim/vim91/compiler/javac.vim index 9bd4cdf270f..53cd772ed8a 100644 --- a/usr/share/vim/vim91/compiler/javac.vim +++ b/usr/share/vim/vim91/compiler/javac.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Java Development Kit Compiler " Maintainer: Doug Kearns -" Last Change: 2024 Jun 14 +" Last Change: 2024 Nov 19 (enable local javac_makeprg_params) if exists("current_compiler") finish @@ -11,11 +11,7 @@ let current_compiler = "javac" let s:cpo_save = &cpo set cpo&vim -if exists("g:javac_makeprg_params") - execute $'CompilerSet makeprg=javac\ {escape(g:javac_makeprg_params, ' \|"')}' -else - CompilerSet makeprg=javac -endif +execute $'CompilerSet makeprg=javac\ {escape(get(b:, 'javac_makeprg_params', get(g:, 'javac_makeprg_params', '')), ' \|"')}' CompilerSet errorformat=%E%f:%l:\ error:\ %m, \%W%f:%l:\ warning:\ %m, diff --git a/usr/share/vim/vim91/compiler/maven.vim b/usr/share/vim/vim91/compiler/maven.vim index ef8d8a6fb29..72e74e301da 100644 --- a/usr/share/vim/vim91/compiler/maven.vim +++ b/usr/share/vim/vim91/compiler/maven.vim @@ -14,7 +14,7 @@ if exists("current_compiler") endif let current_compiler = "maven" -CompilerSet makeprg=mvn\ --batch-mode +execute $'CompilerSet makeprg=mvn\ --batch-mode\ {escape(get(b:, 'maven_makeprg_params', get(g:, 'maven_makeprg_params', '')), ' \|"')}' " Error message for POM CompilerSet errorformat=[FATAL]\ Non-parseable\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#, diff --git a/usr/share/vim/vim91/compiler/mypy.vim b/usr/share/vim/vim91/compiler/mypy.vim index 891488626a9..907b98b777e 100644 --- a/usr/share/vim/vim91/compiler/mypy.vim +++ b/usr/share/vim/vim91/compiler/mypy.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Mypy (Python static checker) " Maintainer: @Konfekt -" Last Change: 2024 Nov 07 +" Last Change: 2024 Nov 19 if exists("current_compiler") | finish | endif let current_compiler = "mypy" @@ -12,7 +12,7 @@ set cpo&vim " CompilerSet makeprg=mypy let &l:makeprg = 'mypy --show-column-numbers ' \ ..get(b:, 'mypy_makeprg_params', get(g:, 'mypy_makeprg_params', '--strict --ignore-missing-imports')) -exe 'CompilerSet makeprg='..escape(&l:makeprg, ' "') +exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') CompilerSet errorformat=%f:%l:%c:\ %t%*[^:]:\ %m let &cpo = s:cpo_save diff --git a/usr/share/vim/vim91/compiler/pandoc.vim b/usr/share/vim/vim91/compiler/pandoc.vim index 6c15e104c3f..5d90a518c98 100644 --- a/usr/share/vim/vim91/compiler/pandoc.vim +++ b/usr/share/vim/vim91/compiler/pandoc.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Pandoc " Maintainer: Konfekt -" Last Change: 2024 Sep 8 +" Last Change: 2024 Nov 19 " " Expects output file extension, say `:make html` or `:make pdf`. " Passes additional arguments to pandoc, say `:make html --self-contained`. @@ -56,7 +56,7 @@ execute 'CompilerSet makeprg=pandoc'..escape( \ ' '..s:PandocLang().. \ ' --from='..s:PandocFiletype(&filetype).. \ ' '..get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', '')).. - \ ' --output %:r:S.$* -- %:S', ' ') + \ ' --output %:r:S.$* -- %:S', ' \|"') CompilerSet errorformat=\"%f\",\ line\ %l:\ %m let &cpo = s:keepcpo diff --git a/usr/share/vim/vim91/compiler/powershell.vim b/usr/share/vim/vim91/compiler/powershell.vim index 821fea40859..3d37d7c8477 100644 --- a/usr/share/vim/vim91/compiler/powershell.vim +++ b/usr/share/vim/vim91/compiler/powershell.vim @@ -3,8 +3,9 @@ " URL: https://github.com/PProvost/vim-ps1 " Contributors: Enno Nagel " Last Change: 2024 Mar 29 -" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) -" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg) +" 2024 Apr 03 by the Vim Project (removed :CompilerSet definition) +" 2024 Apr 05 by the Vim Project (avoid leaving behind g:makeprg) +" 2024 Nov 19 by the Vim Project (properly escape makeprg setting) if exists("current_compiler") finish @@ -49,7 +50,7 @@ let s:makeprg = g:ps1_makeprg_cmd .. ' %:p:S' " + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException " + FullyQualifiedErrorId : CommandNotFoundException -execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ') +execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' \|"') " Showing error in context with underlining. CompilerSet errorformat=%+G+%m diff --git a/usr/share/vim/vim91/compiler/pylint.vim b/usr/share/vim/vim91/compiler/pylint.vim index 4c9c23e125b..96abf315ab7 100644 --- a/usr/share/vim/vim91/compiler/pylint.vim +++ b/usr/share/vim/vim91/compiler/pylint.vim @@ -2,6 +2,7 @@ " Compiler: Pylint for Python " Maintainer: Daniel Moch " Last Change: 2024 Nov 07 by The Vim Project (added params variable) +" 2024 Nov 19 by the Vim Project (properly escape makeprg setting) if exists("current_compiler") | finish | endif let current_compiler = "pylint" @@ -13,7 +14,7 @@ set cpo&vim let &l:makeprg = 'pylint ' . \ '--output-format=text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" --reports=no ' . \ get(b:, "pylint_makeprg_params", get(g:, "pylint_makeprg_params", '--jobs=0')) -exe 'CompilerSet makeprg='..escape(&l:makeprg, ' "') +exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# let &cpo = s:cpo_save diff --git a/usr/share/vim/vim91/compiler/pytest.vim b/usr/share/vim/vim91/compiler/pytest.vim new file mode 100644 index 00000000000..7fc189932c0 --- /dev/null +++ b/usr/share/vim/vim91/compiler/pytest.vim @@ -0,0 +1,103 @@ +" Vim compiler file +" Compiler: Pytest (Python testing framework) +" Maintainer: @Konfekt and @mgedmin +" Last Change: 2024 Nov 28 + +if exists("current_compiler") | finish | endif +let current_compiler = "pytest" + +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=pytest +if has('unix') + execute $'CompilerSet makeprg=/usr/bin/env\ PYTHONWARNINGS=ignore\ pytest\ {escape(get(b:, 'pytest_makeprg_params', get(g:, 'pytest_makeprg_params', '--tb=short --quiet')), ' \|"')}' +elseif has('win32') + execute $'CompilerSet makeprg=set\ PYTHONWARNINGS=ignore\ &&\ pytest\ {escape(get(b:, 'pytest_makeprg_params', get(g:, 'pytest_makeprg_params', '--tb=short --quiet')), ' \|"')}' +else + CompilerSet makeprg=pytest\ --tb=short\ --quiet + execute $'CompilerSet makeprg=pytest\ {escape(get(b:, 'pytest_makeprg_params', get(g:, 'pytest_makeprg_params', '--tb=short --quiet')), ' \|"')}' +endif + +" Pytest syntax errors {{{2 + +" Reset error format so that sourcing .vimrc again and again doesn't grow it +" without bounds +setlocal errorformat& + +" For the record, the default errorformat is this: +" +" %*[^"]"%f"%*\D%l: %m +" "%f"%*\D%l: %m +" %-G%f:%l: (Each undeclared identifier is reported only once +" %-G%f:%l: for each function it appears in.) +" %-GIn file included from %f:%l:%c: +" %-GIn file included from %f:%l:%c\, +" %-GIn file included from %f:%l:%c +" %-GIn file included from %f:%l +" %-G%*[ ]from %f:%l:%c +" %-G%*[ ]from %f:%l: +" %-G%*[ ]from %f:%l\, +" %-G%*[ ]from %f:%l +" %f:%l:%c:%m +" %f(%l):%m +" %f:%l:%m +" "%f"\, line %l%*\D%c%*[^ ] %m +" %D%*\a[%*\d]: Entering directory %*[`']%f' +" %X%*\a[%*\d]: Leaving directory %*[`']%f' +" %D%*\a: Entering directory %*[`']%f' +" %X%*\a: Leaving directory %*[`']%f' +" %DMaking %*\a in %f +" %f|%l| %m +" +" and sometimes it misfires, so let's fix it up a bit +" (TBH I don't even know what compiler produces filename(lineno) so why even +" have it?) +setlocal errorformat-=%f(%l):%m + +" Sometimes Vim gets confused about ISO-8601 timestamps and thinks they're +" filenames; this is a big hammer that ignores anything filename-like on lines +" that start with at least two spaces, possibly preceded by a number and +" optional punctuation +setlocal errorformat^=%+G%\\d%#%.%\\=\ \ %.%# + +" Similar, but when the entire line starts with a date +setlocal errorformat^=%+G\\d\\d\\d\\d-\\d\\d-\\d\\d\ \\d\\d:\\d\\d%.%# + +" make: *** [Makefile:14: target] Error 1 +setlocal errorformat^=%+Gmake:\ ***\ %.%# + +" FAILED tests.py::test_with_params[YYYY-MM-DD:HH:MM:SS] - Exception: bla bla +setlocal errorformat^=%+GFAILED\ %.%# + +" AssertionError: assert ...YYYY-MM-DD:HH:MM:SS... +setlocal errorformat^=%+GAssertionError:\ %.%# + +" --- /path/to/file:before YYYY-MM-DD HH:MM:SS.ssssss +setlocal errorformat^=---%f:%m + +" +++ /path/to/file:before YYYY-MM-DD HH:MM:SS.ssssss +setlocal errorformat^=+++%f:%m + +" Sometimes pytest prepends an 'E' marker at the beginning of a traceback line +setlocal errorformat+=E\ %#File\ \"%f\"\\,\ line\ %l%.%# + +" Python tracebacks (unittest + doctest output) {{{2 + +" This collapses the entire traceback into just the last file+lineno, +" which is convenient when you want to jump to the line that failed (and not +" the top-level entry point), but it makes it impossible to see the full +" traceback, which sucks. +""setlocal errorformat+= +"" \File\ \"%f\"\\,\ line\ %l%.%#, +"" \%C\ %.%#, +"" \%-A\ \ File\ \"unittest%.py\"\\,\ line\ %.%#, +"" \%-A\ \ File\ \"%f\"\\,\ line\ 0%.%#, +"" \%A\ \ File\ \"%f\"\\,\ line\ %l%.%#, +"" \%Z%[%^\ ]%\\@=%m +setlocal errorformat+=File\ \"%f\"\\,\ line\ %l\\,%#%m + +exe 'CompilerSet errorformat='..escape(&l:errorformat, ' \|"') + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/usr/share/vim/vim91/compiler/ruff.vim b/usr/share/vim/vim91/compiler/ruff.vim index 11a69740d8f..318f4fe5cbd 100644 --- a/usr/share/vim/vim91/compiler/ruff.vim +++ b/usr/share/vim/vim91/compiler/ruff.vim @@ -2,6 +2,7 @@ " Compiler: Ruff (Python linter) " Maintainer: @pbnj-dragon " Last Change: 2024 Nov 07 +" 2024 Nov 19 by the Vim Project (properly escape makeprg setting) if exists("current_compiler") | finish | endif let current_compiler = "ruff" @@ -12,7 +13,7 @@ set cpo&vim " CompilerSet makeprg=ruff let &l:makeprg= 'ruff check --output-format=concise ' \ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview')) -exe 'CompilerSet makeprg='..escape(&l:makeprg, ' "') +exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f: let &cpo = s:cpo_save diff --git a/usr/share/vim/vim91/compiler/spotbugs.vim b/usr/share/vim/vim91/compiler/spotbugs.vim new file mode 100644 index 00000000000..8ed45f8ee09 --- /dev/null +++ b/usr/share/vim/vim91/compiler/spotbugs.vim @@ -0,0 +1,254 @@ +" Vim compiler file +" Compiler: Spotbugs (Java static checker; needs javac compiled classes) +" Maintainers: @konfekt and @zzzyxwvut +" Last Change: 2024 Dec 20 + +if exists('g:current_compiler') || bufname() !~# '\.java\=$' || wordcount().chars < 9 + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Unfortunately Spotbugs does not output absolute paths, so you need to +" pass the directory of the files being checked as `-sourcepath` parameter. +" The regex, auxpath and glob try to include all dependent classes of the +" current buffer. See https://github.com/spotbugs/spotbugs/issues/856 + +" FIXME: When "search()" is used with the "e" flag, it makes no _further_ +" progress after claiming an EOL match (i.e. "\_" or "\n", but not "$"). +" XXX: Omit anonymous class declarations +let s:keywords = '\C\<\%(\.\@1' +" Capture ";" for counting a class file directory (see s:package_dir_heads below) +let s:package_names = '\C\ 0 + let name_attr = synIDattr(synID(lnum, (col('.') - 1), 0), 'name') + if name_attr ==# 'javaClassDecl' + let tokens = matchlist(getline(lnum)..getline(lnum + 1), s:type_names) + if !empty(tokens) | call add(type_names, tokens[1]) | endif + elseif name_attr ==# 'javaExternal' + let tokens = matchlist(getline(lnum)..getline(lnum + 1), s:package_names) + if !empty(tokens) | let s:package = tokens[1] | endif + endif + let lnum = search(s:keywords, 'eW') + endwhile + return type_names + endfunction + +else + function! s:GetDeclaredTypeNames() abort + if bufname() =~# '\<\%(module\|package\)-info\.java\=$' + return [expand('%:t:r')] + endif + " Undo the unsetting of &hls, see below + if &hls + defer execute('set hls') + endif + " Possibly restore the current values for registers '"' and "y", see below + defer call('setreg', ['"', getreg('"'), getregtype('"')]) + defer call('setreg', ['y', getreg('y'), getregtype('y')]) + defer execute('silent bwipeout') + " Copy buffer contents for modification + silent %y y + new + " Apply ":help scratch-buffer" effects and match "$" in Java (generated) + " type names (see s:type_names) + setlocal iskeyword+=$ buftype=nofile bufhidden=hide noswapfile nohls + 0put y + " Discard text blocks and strings + silent keeppatterns %s/\\\@ 0 + let line = getline(lnum) + if line =~# '\' + let tokens = matchlist(line..getline(lnum + 1), s:package_names) + if !empty(tokens) | let s:package = tokens[1] | endif + else + let tokens = matchlist(line..getline(lnum + 1), s:type_names) + if !empty(tokens) | call add(type_names, tokens[1]) | endif + endif + let lnum = search(s:keywords, 'eW') + endwhile + return type_names + endfunction +endif + +if has('win32') + + function! s:GlobClassFiles(src_type_name) abort + return glob(a:src_type_name..'$*.class', 1, 1) + endfunction + +else + function! s:GlobClassFiles(src_type_name) abort + return glob(a:src_type_name..'\$*.class', 1, 1) + endfunction +endif + +if exists('b:spotbugs_properties') + " Let "ftplugin/java.vim" merge global entries, if any, in buffer-local + " entries + + function! s:GetProperty(name, default) abort + return get(b:spotbugs_properties, a:name, a:default) + endfunction + +elseif exists('g:spotbugs_properties') + + function! s:GetProperty(name, default) abort + return get(g:spotbugs_properties, a:name, a:default) + endfunction + +else + function! s:GetProperty(dummy, default) abort + return a:default + endfunction +endif + +if (exists('g:spotbugs_properties') || exists('b:spotbugs_properties')) && + \ ((!empty(s:GetProperty('sourceDirPath', [])) && + \ !empty(s:GetProperty('classDirPath', []))) || + \ (!empty(s:GetProperty('testSourceDirPath', [])) && + \ !empty(s:GetProperty('testClassDirPath', [])))) + + function! s:CommonIdxsAndDirs() abort + let src_dir_path = s:GetProperty('sourceDirPath', []) + let bin_dir_path = s:GetProperty('classDirPath', []) + let test_src_dir_path = s:GetProperty('testSourceDirPath', []) + let test_bin_dir_path = s:GetProperty('testClassDirPath', []) + let dir_cnt = min([len(src_dir_path), len(bin_dir_path)]) + let test_dir_cnt = min([len(test_src_dir_path), len(test_bin_dir_path)]) + " Do not break up path pairs with filtering! + return [[range(dir_cnt), + \ src_dir_path[0 : dir_cnt - 1], + \ bin_dir_path[0 : dir_cnt - 1]], + \ [range(test_dir_cnt), + \ test_src_dir_path[0 : test_dir_cnt - 1], + \ test_bin_dir_path[0 : test_dir_cnt - 1]]] + endfunction + + let s:common_idxs_and_dirs = s:CommonIdxsAndDirs() + delfunction s:CommonIdxsAndDirs + + function! s:FindClassFiles(src_type_name) abort + let class_files = [] + " Match pairwise the components of source and class pathnames + for [idxs, src_dirs, bin_dirs] in s:common_idxs_and_dirs + " Do not use "fnamemodify(a:src_type_name, ':p:s?src?bin?')" because + " only the rightmost "src" is looked for + for idx in idxs + let tail_idx = strridx(a:src_type_name, src_dirs[idx]) + " No such directory or no such inner type (i.e. without "$") + if tail_idx < 0 | continue | endif + " Substitute "bin_dirs[idx]" for the rightmost "src_dirs[idx]" + let candidate_type_name = strpart(a:src_type_name, 0, tail_idx).. + \ bin_dirs[idx].. + \ strpart(a:src_type_name, (tail_idx + strlen(src_dirs[idx]))) + for candidate in insert(s:GlobClassFiles(candidate_type_name), + \ candidate_type_name..'.class') + if filereadable(candidate) | call add(class_files, shellescape(candidate)) | endif + endfor + if !empty(class_files) | break | endif + endfor + if !empty(class_files) | break | endif + endfor + return class_files + endfunction + +else + function! s:FindClassFiles(src_type_name) abort + let class_files = [] + for candidate in insert(s:GlobClassFiles(a:src_type_name), + \ a:src_type_name..'.class') + if filereadable(candidate) | call add(class_files, shellescape(candidate)) | endif + endfor + return class_files + endfunction +endif + +if exists('g:spotbugs_alternative_path') && + \ !empty(get(g:spotbugs_alternative_path, 'fromPath', '')) && + \ !empty(get(g:spotbugs_alternative_path, 'toPath', '')) + + " See https://github.com/spotbugs/spotbugs/issues/909 + function! s:ResolveAbsolutePathname() abort + let pathname = expand('%:p') + let head_idx = stridx(pathname, g:spotbugs_alternative_path.toPath) + " No such file: a mismatched path request for a project + if head_idx < 0 | return pathname | endif + " Settle for failure with file readability tests _in s:FindClassFiles()_ + return strpart(pathname, 0, head_idx).. + \ g:spotbugs_alternative_path.fromPath.. + \ strpart(pathname, (head_idx + strlen(g:spotbugs_alternative_path.toPath))) + endfunction + +else + function! s:ResolveAbsolutePathname() abort + return expand('%:p') + endfunction +endif + +function! s:CollectClassFiles() abort + " Possibly obtain a symlinked path for an unsupported directory name + let pathname = s:ResolveAbsolutePathname() + " Get a platform-independent pathname prefix, cf. "expand('%:p:h')..'/'" + let tail_idx = strridx(pathname, expand('%:t')) + let src_pathname = strpart(pathname, 0, tail_idx) + let all_class_files = [] + " Get all type names in the current buffer and let the filename globbing + " discover inner type names from arbitrary type names + for type_name in s:GetDeclaredTypeNames() + call extend(all_class_files, s:FindClassFiles(src_pathname..type_name)) + endfor + return all_class_files +endfunction + +" Expose class files for removal etc. +let b:spotbugs_class_files = s:CollectClassFiles() +let s:package_dir_heads = repeat(':h', (1 + strlen(substitute(s:package, '[^.;]', '', 'g')))) +let s:package_root_dir = fnamemodify(s:ResolveAbsolutePathname(), s:package_dir_heads..':S') +let g:current_compiler = 'spotbugs' +" CompilerSet makeprg=spotbugs +let &l:makeprg = 'spotbugs'..(has('win32') ? '.bat' : '')..' '.. + \ get(b:, 'spotbugs_makeprg_params', get(g:, 'spotbugs_makeprg_params', '-workHard -experimental')).. + \ ' -textui -emacs -auxclasspath '..s:package_root_dir..' -sourcepath '..s:package_root_dir..' '.. + \ join(b:spotbugs_class_files, ' ') +" Emacs expects doubled line numbers +setlocal errorformat=%f:%l:%*[0-9]\ %m,%f:-%*[0-9]:-%*[0-9]\ %m + +" " This compiler is meant to be used for a single buffer only +" exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') +" exe 'CompilerSet errorformat='..escape(&l:errorformat, ' \|"') + +delfunction s:CollectClassFiles +delfunction s:ResolveAbsolutePathname +delfunction s:FindClassFiles +delfunction s:GetProperty +delfunction s:GlobClassFiles +delfunction s:GetDeclaredTypeNames +let &cpo = s:cpo_save +unlet! s:package_root_dir s:package_dir_heads s:common_idxs_and_dirs s:package +unlet! s:package_names s:type_names s:keywords s:cpo_save + +" vim: set foldmethod=syntax shiftwidth=2 expandtab: diff --git a/usr/share/vim/vim91/compiler/tex.vim b/usr/share/vim/vim91/compiler/tex.vim index 282b3a0588e..bc1623729ab 100644 --- a/usr/share/vim/vim91/compiler/tex.vim +++ b/usr/share/vim/vim91/compiler/tex.vim @@ -3,8 +3,9 @@ " Maintainer: Artem Chuprina " Contributors: Enno Nagel " Last Change: 2024 Mar 29 -" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) -" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg) +" 2024 Apr 03 by the Vim Project (removed :CompilerSet definition) +" 2024 Apr 05 by the Vim Project (avoid leaving behind g:makeprg) +" 2024 Nov 19 by the Vim Project (properly escape makeprg setting) if exists("current_compiler") finish @@ -27,7 +28,7 @@ if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') || let current_compiler = "latex" endif let s:makeprg=current_compiler .. ' -interaction=nonstopmode' - execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ') + execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' \|"') else let current_compiler = 'make' endif diff --git a/usr/share/vim/vim91/compiler/typst.vim b/usr/share/vim/vim91/compiler/typst.vim index 33e55818e9a..13699f46750 100644 --- a/usr/share/vim/vim91/compiler/typst.vim +++ b/usr/share/vim/vim91/compiler/typst.vim @@ -1,7 +1,8 @@ " Vim compiler file " Language: Typst -" Maintainer: Gregory Anders -" Last Change: 2024-07-14 +" Previous Maintainer: Gregory Anders +" Maintainer: Luca Saccarola +" Last Change: 2024 Dec 09 " Based on: https://github.com/kaarmu/typst.vim if exists('current_compiler') diff --git a/usr/share/vim/vim91/defaults.vim b/usr/share/vim/vim91/defaults.vim index 953cec700cc..38b03da11d7 100644 --- a/usr/share/vim/vim91/defaults.vim +++ b/usr/share/vim/vim91/defaults.vim @@ -1,7 +1,7 @@ " The default vimrc file. " " Maintainer: The Vim Project -" Last Change: 2024 Nov 14 +" Last Change: 2024 Dec 01 " Former Maintainer: Bram Moolenaar " " This is loaded if no vimrc file was found. @@ -33,10 +33,6 @@ silent! while 0 set nocompatible silent! endwhile -" Allow backspacing over everything in insert mode. -set backspace=indent,eol,start - -set history=200 " keep 200 lines of command line history set ruler " show the cursor position all the time set showcmd " display incomplete commands diff --git a/usr/share/vim/vim91/doc/autocmd.txt b/usr/share/vim/vim91/doc/autocmd.txt index 6ca00a6e1ef..8a653f2be7e 100644 --- a/usr/share/vim/vim91/doc/autocmd.txt +++ b/usr/share/vim/vim91/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2024 Oct 27 +*autocmd.txt* For Vim version 9.1. Last change: 2024 Dec 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -702,6 +702,12 @@ CompleteDone After Insert mode completion is done. Either The |v:completed_item| variable contains information about the completed item. + Sets these |v:event| keys: + complete_word The word that was + selected, empty if + abandoned complete. + complete_type |complete_info_mode| + *CursorHold* CursorHold When the user doesn't press a key for the time specified with 'updatetime'. Not triggered diff --git a/usr/share/vim/vim91/doc/builtin.txt b/usr/share/vim/vim91/doc/builtin.txt index ab63681980f..a34c63aebc4 100644 --- a/usr/share/vim/vim91/doc/builtin.txt +++ b/usr/share/vim/vim91/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Nov 14 +*builtin.txt* For Vim version 9.1. Last change: 2025 Jan 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -67,6 +67,8 @@ autocmd_get([{opts}]) List return a list of autocmds balloon_gettext() String current text in the balloon balloon_show({expr}) none show {expr} inside the balloon balloon_split({msg}) List split {msg} as used for a balloon +base64_decode({string}) Blob base64 decode {string} characters +base64_encode({blob}) String base64 encode the bytes in {blob} bindtextdomain({package}, {path}) Bool bind text domain to specified path blob2list({blob}) List convert {blob} into a list of numbers @@ -277,6 +279,7 @@ getregionpos({pos1}, {pos2} [, {opts}]) List get a list of positions for a region getregtype([{regname}]) String type of a register getscriptinfo([{opts}]) List list of sourced scripts +getstacktrace() List get current stack trace of Vim scripts gettabinfo([{expr}]) List list of tab pages gettabvar({nr}, {varname} [, {def}]) any variable {varname} in tab {nr} or {def} @@ -1225,6 +1228,43 @@ balloon_split({msg}) *balloon_split()* Return type: list or list +base64_decode({string}) *base64_decode()* + Return a Blob containing the bytes decoded from the base64 + encoded characters in {string}. + + The {string} argument should contain only base64-encoded + characters and should have a length that is a multiple of 4. + + Returns an empty blob on error. + + Examples: > + " Write the decoded contents to a binary file + call writefile(base64_decode(s), 'tools.bmp') + " Decode a base64-encoded string + echo list2str(blob2list(base64_decode(encodedstr))) +< + Can also be used as a |method|: > + GetEncodedString()->base64_decode() +< + Return type: |Blob| + + +base64_encode({blob}) *base64_encode()* + Return a base64-encoded String representing the bytes in + {blob}. The base64 alphabet defined in RFC 4648 is used. + + Examples: > + " Encode the contents of a binary file + echo base64_encode(readblob('somefile.bin')) + " Encode a string + echo base64_encode(list2blob(str2list(somestr))) +< + Can also be used as a |method|: > + GetBinaryData()->base64_encode() +< + Return type: |String| + + bindtextdomain({package}, {path}) *bindtextdomain()* Bind a specific {package} to a {path} so that the |gettext()| function can be used to get language-specific @@ -1857,10 +1897,15 @@ complete_info([{what}]) *complete_info()* See |complete_info_mode| for the values. pum_visible |TRUE| if popup menu is visible. See |pumvisible()|. - items List of completion matches. Each item is a - dictionary containing the entries "word", + items List of all completion candidates. Each item + is a dictionary containing the entries "word", "abbr", "menu", "kind", "info" and "user_data". See |complete-items|. + matches Same as "items", but only returns items that + are matching current query. If both "matches" + and "items" are in "what", the returned list + will still be named "items", but each item + will have an additional "match" field. selected Selected item index. First index is zero. Index is -1 if no item is selected (showing typed text only, or the last completion after @@ -3789,9 +3834,14 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()* getcellpixels() *getcellpixels()* Returns a |List| of terminal cell pixel size. - List format is [xpixels, ypixels]. - Only works on (terminal) Unix. For gVim, on other systems and - on failure returns []. + List format is [xpixel, ypixel]. + + Only works on Unix (terminal and gVim) and Windows (gVim only). + Returns [] on other systems or on failure. + Note that there could be variations across different terminals. + On macOS, system Terminal.app returns sizes in points (before + Retina scaling), whereas third-party terminals return raw pixel + sizes (post Retina scaling). Return type: list @@ -4948,6 +4998,21 @@ getscriptinfo([{opts}]) *getscriptinfo()* Return type: list> +getstacktrace() *getstacktrace()* + Returns the current stack trace of Vim scripts. + Stack trace is a |List|, of which each item is a |Dictionary| + with the following items: + funcref The funcref if the stack is at a function, + otherwise this item is omitted. + event The string of the event description if the + stack is at an autocmd event, otherwise this + item is omitted. + lnum The line number in the script on the stack. + filepath The file path of the script on the stack. + + Return type: list> + + gettabinfo([{tabnr}]) *gettabinfo()* If {tabnr} is not specified, then information about all the tab pages is returned as a |List|. Each List item is a @@ -5081,6 +5146,8 @@ getwininfo([{winid}]) *getwininfo()* botline last complete displayed buffer line bufnr number of buffer in the window height window height (excluding winbar) + leftcol first column displayed; only used when + 'wrap' is off loclist 1 if showing a location list {only with the +quickfix feature} quickfix 1 if quickfix or location list window @@ -8971,7 +9038,7 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) 's' Set the ' mark at the previous location of the cursor 'w' Wrap around the end of the file 'W' don't Wrap around the end of the file - 'z' start searching at the cursor column instead of zero + 'z' start searching at the cursor column instead of Zero If neither 'w' or 'W' is given, the 'wrapscan' option applies. If the 's' flag is supplied, the ' mark is set, only if the diff --git a/usr/share/vim/vim91/doc/change.txt b/usr/share/vim/vim91/doc/change.txt index e4366551d68..301eacee26e 100644 --- a/usr/share/vim/vim91/doc/change.txt +++ b/usr/share/vim/vim91/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 9.1. Last change: 2024 Nov 12 +*change.txt* For Vim version 9.1. Last change: 2024 Dec 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1512,18 +1512,17 @@ since formatting is highly dependent on the type of file. It makes sense to use an |autoload| script, so the corresponding script is only loaded when actually needed and the script should be called format.vim. -For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME -directory, sets the 'formatexpr' option to: > +For example, the XML filetype plugin distributed with Vim in the +$VIMRUNTIME/ftplugin directory, sets the 'formatexpr' option to: > setlocal formatexpr=xmlformat#Format() That means, you will find the corresponding script, defining the -xmlformat#Format() function, in the directory: -`$VIMRUNTIME/autoload/xmlformat.vim` +xmlformat#Format() function, in the file `$VIMRUNTIME/autoload/xmlformat.vim` Here is an example script that removes trailing whitespace from the selected -text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: > - +text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: +>vim func! format#Format() " only reformat on explicit gq command if mode() != 'n' @@ -1556,7 +1555,7 @@ debugging it helps to set the 'debug' option. *right-justify* There is no command in Vim to right justify text. You can do it with -an external command, like "par" (e.g.: "!}par" to format until the end of the +an external command, like "par" (e.g.: `:.,}!par` to format until the end of the paragraph) or set 'formatprg' to "par". *format-comments* @@ -1622,7 +1621,7 @@ type of comment string. A part consists of: some indent for the start or end part that can be removed. When a string has none of the 'f', 's', 'm' or 'e' flags, Vim assumes the -comment string repeats at the start of each line. The flags field may be +comment string repeats at the start of each line. The {flags} field may be empty. Any blank space in the text before and after the {string} is part of the diff --git a/usr/share/vim/vim91/doc/develop.txt b/usr/share/vim/vim91/doc/develop.txt index 84aa53dc8c3..d97d230e9f3 100644 --- a/usr/share/vim/vim91/doc/develop.txt +++ b/usr/share/vim/vim91/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 9.1. Last change: 2024 Nov 11 +*develop.txt* For Vim version 9.1. Last change: 2024 Dec 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -191,6 +191,12 @@ The basic steps to make changes to the code: For any non-trivial change, please always create a pull request on github, since this triggers the test suite. + *style-clang-format* +sound.c and sign.c can be (semi-) automatically formated using the +`clang-format` formatter according to the distributed .clang-format file. +Other source files do not yet correspond to the .clang-format file. This may +change in the future and they may be reformatted as well. + C COMPILER *style-compiler* *ANSI-C* *C89* *C99* diff --git a/usr/share/vim/vim91/doc/eval.txt b/usr/share/vim/vim91/doc/eval.txt index b2fb93c8f8c..744c616cbf2 100644 --- a/usr/share/vim/vim91/doc/eval.txt +++ b/usr/share/vim/vim91/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.1. Last change: 2024 Nov 02 +*eval.txt* For Vim version 9.1. Last change: 2025 Jan 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -797,7 +797,7 @@ length minus one is used: > Blob modification ~ - *blob-modification* *E1182* *E1184* + *blob-modification* *E1184* To change a specific byte of a blob use |:let| this way: > :let blob[4] = 0x44 @@ -1953,7 +1953,8 @@ variables for each buffer. Use local buffer variables instead |b:var|. PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:* *E963* *E1063* -Some variables can be set by the user, but the type cannot be changed. +Most variables are read-only, when a variable can be set by the user, it will +be mentioned at the variable description below. The type cannot be changed. *v:argv* *argv-variable* v:argv The command line arguments Vim was invoked with. This is a @@ -2172,7 +2173,8 @@ v:event Dictionary containing information about the current < *v:exception* *exception-variable* v:exception The value of the exception most recently caught and not - finished. See also |v:throwpoint| and |throw-variables|. + finished. See also |v:stacktrace|, |v:throwpoint|, and + |throw-variables|. Example: > :try : throw "oops" @@ -2548,6 +2550,12 @@ v:sizeofpointer Number of bytes in a pointer. Depends on how Vim was compiled. This is only useful for deciding whether a test will give the expected result. + *v:stacktrace* *stacktrace-variable* +v:stacktrace The stack trace of the exception most recently caught and + not finished. Refer to |getstacktrace()| for the structure of + stack trace. See also |v:exception|, |v:throwpoint|, and + |throw-variables|. + *v:statusmsg* *statusmsg-variable* v:statusmsg Last given status message. It's allowed to set this variable. @@ -2676,7 +2684,7 @@ v:this_session Full filename of the last loaded or saved session file. See *v:throwpoint* *throwpoint-variable* v:throwpoint The point where the exception most recently caught and not finished was thrown. Not set when commands are typed. See - also |v:exception| and |throw-variables|. + also |v:exception|, |v:stacktrace|, and |throw-variables|. Example: > :try : throw "oops" @@ -3856,7 +3864,8 @@ in the variable |v:exception|: > : echo "Number thrown. Value is" v:exception You may also be interested where an exception was thrown. This is stored in -|v:throwpoint|. Note that "v:exception" and "v:throwpoint" are valid for the +|v:throwpoint|. And you can obtain the stack trace from |v:stacktrace|. +Note that "v:exception", "v:stacktrace" and "v:throwpoint" are valid for the exception most recently caught as long it is not finished. Example: > diff --git a/usr/share/vim/vim91/doc/filetype.txt b/usr/share/vim/vim91/doc/filetype.txt index 06fc8292356..cbf038afd36 100644 --- a/usr/share/vim/vim91/doc/filetype.txt +++ b/usr/share/vim/vim91/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 9.1. Last change: 2024 Nov 14 +*filetype.txt* For Vim version 9.1. Last change: 2024 Dec 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -634,7 +634,7 @@ To disable this behavior, set the following variable in your vimrc: > let g:gdscript_recommended_style = 0 -GIT COMMIT *ft-gitcommit-plugin* +GIT COMMIT *ft-gitcommit-plugin* One command, :DiffGitCached, is provided to show a diff of the current commit in the preview window. It is equivalent to calling "git diff --cached" plus @@ -733,7 +733,6 @@ To enable the recognition of Markdown comments each time after removing re-source "javaformat.vim" for Vim versions greater than `8.2.1397`: > runtime autoload/javaformat.vim < - JSON-FORMAT *ft-json-plugin* JSON filetype can be extended to use 'formatexpr' and "json.FormatExpr()" @@ -745,6 +744,11 @@ Add following lines to $HOME/.vim/ftplugin/json.vim: > import autoload 'dist/json.vim' setl formatexpr=json.FormatExpr() +LUA *ft-lua-plugin* + +You can enable folding of Lua functions using |fold-expr| by: > + + let g:lua_folding = 1 MAIL *ft-mail-plugin* @@ -816,7 +820,7 @@ page in a Vim window: > set keywordprg=:Man -MANPAGER *manpager.vim* +MANPAGER *manpager.vim* The |:Man| command allows you to turn Vim into a manpager (that syntax highlights manpages and follows linked manpages on hitting CTRL-]). @@ -834,7 +838,7 @@ For fish, add to the config file set -x MANPAGER "vim +MANPAGER --not-a-term -" -MARKDOWN *ft-markdown-plugin* +MARKDOWN *ft-markdown-plugin* To enable folding use this: > let g:markdown_folding = 1 @@ -913,7 +917,7 @@ To enable this behavior, set the following variable in your vimrc: > let g:rst_style = 1 -RNOWEB *ft-rnoweb-plugin* +RNOWEB *ft-rnoweb-plugin* The 'formatexpr' option is set dynamically with different values for R code and for LaTeX code. If you prefer that 'formatexpr' is not set, add to your diff --git a/usr/share/vim/vim91/doc/fold.txt b/usr/share/vim/vim91/doc/fold.txt index b2904920505..b6cb2a44091 100644 --- a/usr/share/vim/vim91/doc/fold.txt +++ b/usr/share/vim/vim91/doc/fold.txt @@ -1,4 +1,4 @@ -*fold.txt* For Vim version 9.1. Last change: 2023 Mar 24 +*fold.txt* For Vim version 9.1. Last change: 2024 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -87,9 +87,11 @@ The most efficient is to call a compiled function without arguments: > The function must use v:lnum. See |expr-option-function|. These are the conditions with which the expression is evaluated: + - The current buffer and window are set for the line. - The variable "v:lnum" is set to the line number. -- The result is used for the fold level in this way: + +The result of foldexpr then determines the fold level as follows: value meaning ~ 0 the line is not in a fold 1, 2, .. the line is in a fold with this level @@ -104,6 +106,9 @@ These are the conditions with which the expression is evaluated: "<1", "<2", .. a fold with this level ends at this line ">1", ">2", .. a fold with this level starts at this line +The result values "=", "s" and "a" are more expensive, please see +|fold-expr-slow|. + It is not required to mark the start (end) of a fold with ">1" ("<1"), a fold will also start (end) when the fold level is higher (lower) than the fold level of the previous line. @@ -117,14 +122,8 @@ recognized, there is no error message and the fold level will be zero. For debugging the 'debug' option can be set to "msg", the error messages will be visible then. -Note: Since the expression has to be evaluated for every line, this fold -method can be very slow! - -Try to avoid the "=", "a" and "s" return values, since Vim often has to search -backwards for a line for which the fold level is defined. This can be slow. - If the 'foldexpr' expression starts with s: or ||, then it is replaced -with the script ID (|local-function|). Examples: > +with the script ID (|local-function|). Examples: > set foldexpr=s:MyFoldExpr() set foldexpr=SomeFoldExpr() < @@ -148,6 +147,39 @@ end in that line. It may happen that folds are not updated properly. You can use |zx| or |zX| to force updating folds. +MINIMIZING COMPUTATIONAL COST *fold-expr-slow* + +Due to its computational cost, this fold method can make Vim unresponsive, +especially when the fold level of all lines have to be initially computed. +Afterwards, after each change, Vim restricts the computation of foldlevels +to those lines whose fold level was affected by it (and reuses the known +foldlevels of all the others). + +The fold expression should therefore strive to minimize the number of +dependent lines needed for the computation of a given line: For example, try +to avoid the "=", "a" and "s" return values, because these will require the +evaluation of the fold levels on previous lines until an independent fold +level is found. + +If this proves difficult, the next best thing could be to cache all fold +levels in a buffer-local variable (b:foldlevels) that is only updated on +|b:changedtick|: +>vim + vim9script + def MyFoldFunc(): number + if b:lasttick == b:changedtick + return b:foldlevels[v:lnum - 1] + endif + b:lasttick = b:changedtick + b:foldlevels = [] + # compute foldlevels ... + return b:foldlevels[v:lnum - 1] + enddef + set foldexpr=s:MyFoldFunc() +< +In above example further speedup was gained by using a precompiled Vim9 script +function without arguments (that must still use v:lnum). See +|expr-option-function|. SYNTAX *fold-syntax* @@ -384,8 +416,8 @@ zX Undo manually opened and closed folds: re-apply 'foldlevel'. Also forces recomputing folds, like |zx|. *zm* -zm Fold more: Subtract |v:count1| from 'foldlevel'. If 'foldlevel' was - already zero nothing happens. +zm Fold more: Subtract |v:count1| from 'foldlevel'. If + 'foldlevel' was already zero nothing happens. 'foldenable' will be set. *zM* @@ -449,7 +481,7 @@ zk Move upwards to the end of the previous fold. A closed fold EXECUTING COMMANDS ON FOLDS ~ -:[range]foldd[oopen] {cmd} *:foldd* *:folddo* *:folddoopen* +:[range]foldd[oopen] {cmd} *:foldd* *:folddo* *:folddoopen* Execute {cmd} on all lines that are not in a closed fold. When [range] is given, only these lines are used. Each time {cmd} is executed the cursor is positioned on the @@ -539,7 +571,7 @@ When there is room after the text, it is filled with the character specified by 'fillchars'. If the 'foldtext' expression starts with s: or ||, then it is replaced -with the script ID (|local-function|). Examples: > +with the script ID (|local-function|). Examples: > set foldtext=s:MyFoldText() set foldtext=SomeFoldText() < diff --git a/usr/share/vim/vim91/doc/gui.txt b/usr/share/vim/vim91/doc/gui.txt index 4fdfc0f05a7..76d851dc5d8 100644 --- a/usr/share/vim/vim91/doc/gui.txt +++ b/usr/share/vim/vim91/doc/gui.txt @@ -1,4 +1,4 @@ -*gui.txt* For Vim version 9.1. Last change: 2024 Nov 07 +*gui.txt* For Vim version 9.1. Last change: 2024 Nov 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -474,7 +474,7 @@ When the "unnamed" string is included in the 'clipboard' option, the unnamed register is the same as the "* register. Thus you can yank to and paste the selection without prepending "* to commands. -See also |W23|. +See also |W23| and |W24|. ============================================================================== 5. Menus *menus* diff --git a/usr/share/vim/vim91/doc/gui_x11.txt b/usr/share/vim/vim91/doc/gui_x11.txt index 0658bfab983..4a0d04c8867 100644 --- a/usr/share/vim/vim91/doc/gui_x11.txt +++ b/usr/share/vim/vim91/doc/gui_x11.txt @@ -1,4 +1,4 @@ -*gui_x11.txt* For Vim version 9.1. Last change: 2024 Nov 11 +*gui_x11.txt* For Vim version 9.1. Last change: 2024 Nov 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -716,6 +716,25 @@ output a warning: Warning: Clipboard register not available, using register 0 ~ + *W24* +Vim comes in different flavors, from a tiny build, that just tries to be +compatible to original Vi, to enhanced builds which include many improvements +(like a GUI). However, on servers and embedded systems, Vim is typically +compiled without clipboard support, since this feature requires X11 libraries +to be present. Check the ":version" output for the flag |+clipboard| or +-clipboard. The former means clipboard support is present while the latter +means your Vim does not contain clipboard support. + +In the case when you are trying to access the "* or "+ register and Vim has +no clipboard support, you will see this warning: + + Warning: Clipboard register not available. See :h W24~ + +If you have a vim with no clipboard support but would like to use the +clipboard, try to install a more enhanced Vim package like vim-enhanced or +vim-gtk3 (the gui packages usually also come with a terminal Vim that has +clipboard support included). + *x11-cut-buffer* There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7. Vim only uses CUT_BUFFER0, which is the one that xterm uses by default. diff --git a/usr/share/vim/vim91/doc/help.txt b/usr/share/vim/vim91/doc/help.txt index 77ea273ec6b..a7986851e3b 100644 --- a/usr/share/vim/vim91/doc/help.txt +++ b/usr/share/vim/vim91/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 9.1. Last change: 2024 Nov 07 +*help.txt* For Vim version 9.1. Last change: 2024 Dec 06 VIM - main help file k @@ -180,6 +180,7 @@ Language support ~ |hebrew.txt| Hebrew language support and editing |russian.txt| Russian language support and editing |hangulin.txt| Hangul (Korean) input mode +|vietnamese.txt| Vietnamese language support and editing GUI ~ |gui.txt| Graphical User Interface (GUI) diff --git a/usr/share/vim/vim91/doc/helphelp.txt b/usr/share/vim/vim91/doc/helphelp.txt index 8ade446e6ec..7b9dd7671c6 100644 --- a/usr/share/vim/vim91/doc/helphelp.txt +++ b/usr/share/vim/vim91/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 9.1. Last change: 2024 Nov 03 +*helphelp.txt* For Vim version 9.1. Last change: 2025 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -247,10 +247,10 @@ command: > (requires write permission there): > :helptags $VIMRUNTIME/doc < - *help-TOC* *help-toc-install* + *:HelpToc* *help-TOC* *help-toc-install* *package-helptoc* If you want to access an interactive table of contents, from any position in -the file, you can use the helptoc plugin. Load the plugin with: > +the file, you can use the helptoc plugin. Load the plugin with: >vim packadd helptoc @@ -433,11 +433,31 @@ To quote a block of ex-commands verbatim, place a greater than (>) character at the end of the line before the block and a less than (<) character as the first non-blank on a line following the block. Any line starting in column 1 also implicitly stops the block of ex-commands before it. E.g. > - function Example_Func() - echo "Example" - endfunction + function Example_Func() + echo "Example" + endfunction < - +To enable syntax highlighting for a block of code, place a language name +annotation (e.g. "vim") after a greater than (>) character. E.g. >vim + function Example_Func() + echo "Example" + endfunction +< + *g:help_example_languages* +By default, help files only support Vim script highlighting. If you need +syntax highlighting for other languages, add to your |vimrc|: > + :let g:help_example_languages = { "vim": "vim", "sh": "bash" } +The key represents the annotation marker name, and the value is the 'syntax' +name. + +Note: If you do not include "vim" in "g:help_example_languages", its syntax +highlighting will not be enabled. If you set "g:help_example_languages" to an +empty value, syntax highlighting for embedded languages will be disabled. + +Further note: Including arbitrary syntax languages into help files may not +always work perfectly, if the included 'syntax' script does not account for +such an import. + *help-notation* The following are highlighted differently in a Vim help file: - a special key name expressed either in <> notation as in , or as a Ctrl character as in CTRL-X @@ -454,15 +474,15 @@ You can find the details in $VIMRUNTIME/syntax/help.vim GENDER NEUTRAL LANGUAGE *gender-neutral* *inclusion* -Vim is for everybody, no matter race, gender or anything. For new or updated -help text, gender neutral language is recommended. Some of the help text is -many years old and there is no need to change it. We do not make any +Vim is for everybody, no matter race, gender or anything. For new or updated +help text, gender neutral language is recommended. Some of the help text is +many years old and there is no need to change it. We do not make any assumptions about the gender of the user, no matter how the text is phrased. The goal is that the reader understands how Vim works, the exact wording is secondary. Many online technical style guides include sections about gender neutral -language. Here are a few: > +language. Here are a few: > https://developers.google.com/style/pronouns https://techwhirl.com/gender-neutral-technical-writing/ diff --git a/usr/share/vim/vim91/doc/indent.txt b/usr/share/vim/vim91/doc/indent.txt index 8f347d7d942..5f0893feecf 100644 --- a/usr/share/vim/vim91/doc/indent.txt +++ b/usr/share/vim/vim91/doc/indent.txt @@ -1,4 +1,4 @@ -*indent.txt* For Vim version 9.1. Last change: 2024 Nov 12 +*indent.txt* For Vim version 9.1. Last change: 2024 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/usr/share/vim/vim91/doc/index.txt b/usr/share/vim/vim91/doc/index.txt index c595d9d2a90..079f9ea3901 100644 --- a/usr/share/vim/vim91/doc/index.txt +++ b/usr/share/vim/vim91/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 9.1. Last change: 2023 Jul 14 +*index.txt* For Vim version 9.1. Last change: 2025 Jan 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1185,6 +1185,7 @@ tag command action ~ |:abbreviate| :ab[breviate] enter abbreviation |:abclear| :abc[lear] remove all abbreviations |:aboveleft| :abo[veleft] make split window appear left or above +|:abstract| :abstract declare a Vim9 abstract class |:all| :al[l] open a window for each file in the argument list |:amenu| :am[enu] enter new menu item for all modes @@ -1224,7 +1225,7 @@ tag command action ~ |:breakdel| :breakd[el] delete a debugger breakpoint |:breaklist| :breakl[ist] list debugger breakpoints |:browse| :bro[wse] use file selection dialog -|:bufdo| :bufdo execute command in each listed buffer +|:bufdo| :bufd[o] execute command in each listed buffer |:buffers| :buffers list all files in the buffer list |:bunload| :bun[load] unload a specific buffer |:bwipeout| :bw[ipeout] really delete a buffer @@ -1240,7 +1241,7 @@ tag command action ~ |:cafter| :caf[ter] go to error after current cursor |:call| :cal[l] call a function |:catch| :cat[ch] part of a :try command -|:cbefore| :cbef[ore] go to error before current cursor +|:cbefore| :cbe[fore] go to error before current cursor |:cbelow| :cbel[ow] go to error below current line |:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window |:cbuffer| :cb[uffer] parse error messages and jump to first error @@ -1261,7 +1262,7 @@ tag command action ~ |:checkpath| :che[ckpath] list included files |:checktime| :checkt[ime] check timestamp of loaded buffers |:chistory| :chi[story] list the error lists -|:class| :class start of a class specification +|:class| :class start of a class declaration |:clast| :cla[st] go to the specified error, default last one |:clearjumps| :cle[arjumps] clear the jump list |:clist| :cl[ist] list all errors @@ -1300,7 +1301,7 @@ tag command action ~ |:debuggreedy| :debugg[reedy] read debug mode commands from normal input |:def| :def define a Vim9 user function |:defcompile| :defc[ompile] compile Vim9 user functions in current script -|:defer| :defer call function when current function is done +|:defer| :defe[r] call function when current function is done |:delcommand| :delc[ommand] delete user-defined command |:delfunction| :delf[unction] delete a user function |:delmarks| :delm[arks] delete marks @@ -1310,7 +1311,7 @@ tag command action ~ |:diffpatch| :diffp[atch] apply a patch and show differences |:diffput| :diffpu[t] remove differences in other buffer |:diffsplit| :diffs[plit] show differences with another file -|:diffthis| :diffthis make current window a diff window +|:diffthis| :difft[his] make current window a diff window |:digraphs| :dig[raphs] show or enter digraphs |:display| :di[splay] display registers |:disassemble| :disa[ssemble] disassemble Vim9 user function @@ -1336,14 +1337,17 @@ tag command action ~ |:else| :el[se] part of an :if command |:elseif| :elsei[f] part of an :if command |:emenu| :em[enu] execute a menu by name -|:endclass| :endclass end of a class specification +|:endclass| :endclass end of a class declaration |:enddef| :enddef end of a user function started with :def +|:endenum| :endenum end of an enum declaration |:endif| :en[dif] end previous :if +|:endinterface| :endinterface end of an interface declaration |:endfor| :endfo[r] end previous :for |:endfunction| :endf[unction] end of a user function started with :function |:endtry| :endt[ry] end previous :try |:endwhile| :endw[hile] end previous :while |:enew| :ene[w] edit a new, unnamed buffer +|:enum| :enum start of an enum declaration |:eval| :ev[al] evaluate an expression and discard the result |:ex| :ex same as ":edit" |:execute| :exe[cute] execute result of expressions @@ -1397,6 +1401,7 @@ tag command action ~ |:inoreabbrev| :inorea[bbrev] like ":noreabbrev" but for Insert mode |:inoremenu| :inoreme[nu] like ":noremenu" but for Insert mode |:intro| :int[ro] print the introductory message +|:interface| :interface start of an interface declaration |:isearch| :is[earch] list one line where identifier matches |:isplit| :isp[lit] split window and jump to definition of identifier @@ -1421,7 +1426,7 @@ tag command action ~ |:last| :la[st] go to the last file in the argument list |:language| :lan[guage] set the language (locale) |:later| :lat[er] go to newer change, redo -|:lbefore| :lbef[ore] go to location before current cursor +|:lbefore| :lbe[fore] go to location before current cursor |:lbelow| :lbel[ow] go to location below current line |:lbottom| :lbo[ttom] scroll to the bottom of the location window |:lbuffer| :lb[uffer] parse locations and jump to first location @@ -1461,7 +1466,7 @@ tag command action ~ |:lockmarks| :loc[kmarks] following command keeps marks where they are |:lockvar| :lockv[ar] lock variables |:lolder| :lol[der] go to older location list -|:lopen| :lope[n] open location window +|:lopen| :lop[en] open location window |:lprevious| :lp[revious] go to previous location |:lpfile| :lpf[ile] go to last location in previous file |:lrewind| :lr[ewind] go to the specified location, default first one @@ -1496,7 +1501,7 @@ tag command action ~ |:mzfile| :mzf[ile] execute MzScheme script file |:nbclose| :nbc[lose] close the current Netbeans session |:nbkey| :nb[key] pass a key to Netbeans -|:nbstart| :nbs[art] start a new Netbeans session +|:nbstart| :nbs[tart] start a new Netbeans session |:next| :n[ext] go to next file in the argument list |:new| :new create a new empty window |:nmap| :nm[ap] like ":map" but for Normal mode @@ -1529,6 +1534,7 @@ tag command action ~ |:ownsyntax| :ow[nsyntax] set new local syntax highlight for this window |:packadd| :pa[ckadd] add a plugin from 'packpath' |:packloadall| :packl[oadall] load all packages under 'packpath' +|:pbuffer| :pb[uffer] edit buffer in the preview window |:pclose| :pc[lose] close preview window |:pedit| :ped[it] edit file in the preview window |:perl| :pe[rl] execute Perl command @@ -1681,7 +1687,7 @@ tag command action ~ |:tNext| :tN[ext] jump to previous matching tag |:tabNext| :tabN[ext] go to previous tab page |:tabclose| :tabc[lose] close current tab page -|:tabdo| :tabdo execute command in each tab page +|:tabdo| :tabd[o] execute command in each tab page |:tabedit| :tabe[dit] edit a file in a new tab page |:tabfind| :tabf[ind] find file in 'path', edit it in a new tab page |:tabfirst| :tabfir[st] go to first tab page @@ -1705,6 +1711,8 @@ tag command action ~ |:terminal| :ter[minal] open a terminal window |:tfirst| :tf[irst] jump to first matching tag |:throw| :th[row] throw an exception +|:this| :this prefix for an object member during + initialization (e.g. on |new()|) |:tjump| :tj[ump] like ":tselect", but jump directly when there is only one match |:tlast| :tl[ast] jump to last matching tag @@ -1723,6 +1731,7 @@ tag command action ~ |:tselect| :ts[elect] list matching tags and select one |:tunmap| :tunma[p] like ":unmap" but for Terminal-Job mode |:tunmenu| :tu[nmenu] remove menu tooltip +|:type| :type create a type alias |:undo| :u[ndo] undo last change(s) |:undojoin| :undoj[oin] join next change with previous undo block |:undolist| :undol[ist] list leafs of the undo tree @@ -1756,7 +1765,7 @@ tag command action ~ |:vsplit| :vs[plit] split current window vertically |:vunmap| :vu[nmap] like ":unmap" but for Visual+Select mode |:vunmenu| :vunme[nu] remove menu for Visual+Select mode -|:windo| :windo execute command in each window +|:windo| :wind[o] execute command in each window |:write| :w[rite] write to a file |:wNext| :wN[ext] write to a file and go to previous file in argument list diff --git a/usr/share/vim/vim91/doc/insert.txt b/usr/share/vim/vim91/doc/insert.txt index 839d17a64d1..a5d245f50de 100644 --- a/usr/share/vim/vim91/doc/insert.txt +++ b/usr/share/vim/vim91/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 9.1. Last change: 2024 Oct 08 +*insert.txt* For Vim version 9.1. Last change: 2024 Dec 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1195,6 +1195,7 @@ items: |hl-PmenuKind| highlight group, allowing for the customization of ctermfg and guifg properties for the completion kind + match See "matches" in |complete_info()|. All of these except "icase", "equal", "dup" and "empty" must be a string. If an item does not meet these requirements then an error message is given and @@ -2090,7 +2091,7 @@ the cursor is, or below the specified line. To insert text above the first line use the command ":0r {name}". After the ":read" command, the cursor is left on the first non-blank in the -first new line. Unless in Ex mode, then the cursor is left on the last new +first new line. If in Ex mode, then the cursor is left on the last new line (sorry, this is Vi compatible). If a file name is given with ":r", it becomes the alternate file. This can be diff --git a/usr/share/vim/vim91/doc/message.txt b/usr/share/vim/vim91/doc/message.txt index 69d8bc7c6ff..3fcbd95706d 100644 --- a/usr/share/vim/vim91/doc/message.txt +++ b/usr/share/vim/vim91/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 9.1. Last change: 2024 Nov 14 +*message.txt* For Vim version 9.1. Last change: 2024 Dec 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -29,7 +29,7 @@ depends on the 'shortmess' option. Clear messages, keeping only the {count} most recent ones. -The number of remembered messages is determined by the 'msghistory' option. +The number of remembered messages is determined by the 'messagesopt' option. *g<* The "g<" command can be used to see the last page of previous command output. @@ -837,6 +837,7 @@ If you accidentally hit or and you want to see the displayed text then use |g<|. This only works when 'more' is set. To reduce the number of hit-enter prompts: +- Set 'messagesopt'. - Set 'cmdheight' to 2 or higher. - Add flags to 'shortmess'. - Reset 'showcmd' and/or 'ruler'. diff --git a/usr/share/vim/vim91/doc/motion.txt b/usr/share/vim/vim91/doc/motion.txt index 2637480ae9b..4e57797a54c 100644 --- a/usr/share/vim/vim91/doc/motion.txt +++ b/usr/share/vim/vim91/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 9.1. Last change: 2024 Oct 06 +*motion.txt* For Vim version 9.1. Last change: 2024 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -122,6 +122,12 @@ This cannot be repeated: > endif Note that when using ":" any motion becomes characterwise exclusive. + *inclusive-motion-selection-exclusive* +When 'selection' is "exclusive", |Visual| mode is active and an inclusive +motion has been used, the cursor position will be adjusted by another +character to the right, so that the Visual selection includes the expected +text and can be acted upon. + *forced-motion* FORCING A MOTION TO BE LINEWISE, CHARACTERWISE OR BLOCKWISE diff --git a/usr/share/vim/vim91/doc/options.txt b/usr/share/vim/vim91/doc/options.txt index 1aa5cccf7d7..780db60aba4 100644 --- a/usr/share/vim/vim91/doc/options.txt +++ b/usr/share/vim/vim91/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2024 Nov 14 +*options.txt* For Vim version 9.1. Last change: 2025 Jan 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1069,8 +1069,8 @@ A jump table for the options with a short description can be found at |Q_op|. done with ":syntax on". *'backspace'* *'bs'* -'backspace' 'bs' string (default "", set to "indent,eol,start" - in |defaults.vim|) +'backspace' 'bs' string (Vim default: "indent,eol,start", + Vi default: "") global Influences the working of , , CTRL-W and CTRL-U in Insert mode. This is a list of items, separated by commas. Each item allows @@ -2155,9 +2155,9 @@ A jump table for the options with a short description can be found at |Q_op|. a match from the menu. Only works in combination with "menu" or "menuone". No effect if "longest" is present. - noselect Do not select a match in the menu, force the user to - select one from the menu. Only works in combination with - "menu" or "menuone". + noselect Same as "noinsert", except that no menu item is + pre-selected. If both "noinsert" and "noselect" are + present, "noselect" has precedence. fuzzy Enable |fuzzy-matching| for completion candidates. This allows for more flexible and intuitive matching, where @@ -4348,7 +4348,7 @@ A jump table for the options with a short description can be found at |Q_op|. #:TabLineSel,_:TabLineFill,!:CursorColumn, .:CursorLine,o:ColorColumn,q:QuickFixLine, z:StatusLineTerm,Z:StatusLineTermNC, - g:MsgArea") + g:MsgArea,h:ComplMatchIns") global This option can be used to set highlighting mode for various occasions. It is a comma-separated list of character pairs. The @@ -4368,6 +4368,7 @@ A jump table for the options with a short description can be found at |Q_op|. |hl-MoreMsg| m |more-prompt| |hl-ModeMsg| M Mode (e.g., "-- INSERT --") |hl-MsgArea| g |Command-line| and message area + |hl-ComplMatchIns| h matched text of currently inserted completion |hl-LineNr| n line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. |hl-LineNrAbove| a line number above the cursor for when the @@ -4435,12 +4436,11 @@ A jump table for the options with a short description can be found at |Q_op|. See |highlight-default| for the default highlight groups. *'history'* *'hi'* -'history' 'hi' number (Vim default: 50, Vi default: 0, - set to 200 in |defaults.vim|) +'history' 'hi' number (Vim default: 200, Vi default: 0) global A history of ":" commands, and a history of previous search patterns is remembered. This option decides how many entries may be stored in - each of these histories (see |cmdline-editing| and 'msghistory' for + each of these histories (see |cmdline-editing| and 'messagesopt' for the number of messages to remember). The maximum value is 10000. NOTE: This option is set to the Vi default value when 'compatible' is @@ -5073,11 +5073,12 @@ A jump table for the options with a short description can be found at |Q_op|. a pattern that is matched against the 'term' option, a colon and the protocol name to be used. To illustrate this, the default value would be set with: > - set keyprotocol=kitty:kitty,foot:kitty,wezterm:kitty,xterm:mok2 + set keyprotocol=kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty + set keyprotocol+=xterm:mok2 -< This means that when 'term' contains "kitty, "foot" or "wezterm" - somewhere then the "kitty" protocol is used. When 'term' contains - "xterm" somewhere, then the "mok2" protocol is used. +< This means that when 'term' contains "kitty, "foot", "ghostty" or + "wezterm" somewhere, then the "kitty" protocol is used. When 'term' + contains "xterm" somewhere, then the "mok2" protocol is used. The first match is used, thus if you want to have "kitty" use the kitty protocol, but "badkitty" not, then you should match "badkitty" @@ -5635,6 +5636,29 @@ A jump table for the options with a short description can be found at |Q_op|. generated from a list of items, e.g., the Buffers menu. Changing this option has no direct effect, the menu must be refreshed first. + *'messagesopt'* *'mopt'* +'messagesopt' 'mopt' string (default "hit-enter,history:500") + global + + Option settings for outputting messages. It can consist of the + following items. Items must be separated by a comma. + + hit-enter Use a |hit-enter| prompt when the message is longer than + 'cmdheight' size. + + wait:{n} Instead of using a |hit-enter| prompt, simply wait for + {n} milliseconds so that the user has a chance to read + the message. The maximum value of {n} is 10000. Use + 0 to disable the wait (but then the user may miss an + important message). + This item is ignored when "hit-enter" is present, but + required when "hit-enter" is not present. + + history:{n} Determines how many entries are remembered in the + |:messages| history. The maximum value is 10000. + Setting it to zero clears the message history. + This item must always be present. + *'mkspellmem'* *'msm'* 'mkspellmem' 'msm' string (default "460000,2000,500") global @@ -5918,11 +5942,6 @@ A jump table for the options with a short description can be found at |Q_op|. time in msec between two mouse clicks for the second click to be recognized as a multi click. - *'msghistory'* *'mhi'* -'msghistory' 'mhi' number (default 500) - global - Determines how many entries are remembered in the |:messages| history. - The maximum value is 10000. *'mzquantum'* *'mzq'* 'mzquantum' 'mzq' number (default 100) @@ -7001,6 +7020,8 @@ A jump table for the options with a short description can be found at |Q_op|. selection. When "old" is used and 'virtualedit' allows the cursor to move past the end of line the line break still isn't included. + When "exclusive" is used, cursor position in visual mode will be + adjusted for inclusive motions |inclusive-motion-selection-exclusive|. Note that when "exclusive" is used and selecting from the end backwards, you cannot include the last character of a line, when starting in Normal mode and 'virtualedit' empty. @@ -7868,6 +7889,7 @@ A jump table for the options with a short description can be found at |Q_op|. All fields except the {item} are optional. A single percent sign can be given as "%%". + *stl-%!* When the option starts with "%!" then it is used as an expression, evaluated and the result is used as the option value. Example: > :set statusline=%!MyStatusLine() diff --git a/usr/share/vim/vim91/doc/os_dos.txt b/usr/share/vim/vim91/doc/os_dos.txt index 96ef39d6fdf..03c88dc4745 100644 --- a/usr/share/vim/vim91/doc/os_dos.txt +++ b/usr/share/vim/vim91/doc/os_dos.txt @@ -1,4 +1,4 @@ -*os_dos.txt* For Vim version 9.1. Last change: 2024 Sep 24 +*os_dos.txt* For Vim version 9.1. Last change: 2024 Dec 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -292,9 +292,9 @@ should be: 'shellquote' " 'shellxquote' " -For Dos 16 bit this starts the shell as: +For Dos 16 bit this starts the shell as: > -c "command name" >file -For Win32 as: +For Win32 as: > -c "command name >file" For DOS 32 bit, DJGPP does this internally somehow. diff --git a/usr/share/vim/vim91/doc/pattern.txt b/usr/share/vim/vim91/doc/pattern.txt index 6ebef9e44f9..39eb5442b21 100644 --- a/usr/share/vim/vim91/doc/pattern.txt +++ b/usr/share/vim/vim91/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 9.1. Last change: 2024 Nov 09 +*pattern.txt* For Vim version 9.1. Last change: 2024 Dec 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1504,6 +1504,7 @@ criteria: - Matches at a camel case character (e.g. Case in CamelCase) - Matches after a path separator or a hyphen. - The number of unmatched characters in a string. + - A full/exact match is preferred. The matching string with the highest score is returned first. For example, when you search for the "get pat" string using fuzzy matching, it diff --git a/usr/share/vim/vim91/doc/pi_netrw.txt b/usr/share/vim/vim91/doc/pi_netrw.txt index a783fe9ac30..c22aad35445 100644 --- a/usr/share/vim/vim91/doc/pi_netrw.txt +++ b/usr/share/vim/vim91/doc/pi_netrw.txt @@ -1,10 +1,9 @@ -*pi_netrw.txt* For Vim version 9.1. Last change: 2024 Nov 12 +*pi_netrw.txt* For Vim version 9.1. Last change: 2024 Nov 23 ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell ------------------------------------------------ -Author: Charles E. Campbell - (remove NOSPAM from Campbell's email first) +Original Author: Charles E. Campbell Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright* The VIM LICENSE applies to the files in this package, including @@ -2659,10 +2658,34 @@ your browsing preferences. (see also: |netrw-settings|) netrw last saw |g:netrw_cursor| >= 5 or when netrw was initially run. - *g:netrw_decompress* = { ".gz" : "gunzip" , - ".bz2" : "bunzip2" , - ".zip" : "unzip" , - ".tar" : "tar -xf"} + *g:netrw_decompress* = { '.lz4': 'lz4 -d', + '.lzo': 'lzop -d', + '.lz': 'lzip -dk', + '.7z': '7za x', + '.001': '7za x', + '.tar.bz': 'tar -xvjf', + '.tar.bz2': 'tar -xvjf', + '.tbz': 'tar -xvjf', + '.tbz2': 'tar -xvjf', + '.tar.gz': 'tar -xvzf', + '.tgz': 'tar -xvzf', + '.tar.zst': 'tar --use-compress-program=unzstd -xvf', + '.tzst': 'tar --use-compress-program=unzstd -xvf', + '.tar': 'tar -xvf', + '.zip': 'unzip', + '.bz': 'bunzip2 -k', + '.bz2': 'bunzip2 -k', + '.gz': 'gunzip -k', + '.lzma': 'unlzma -T0 -k', + '.xz': 'unxz -T0 -k', + '.zst': 'zstd -T0 -d', + '.Z': 'uncompress -k', + '.rar': 'unrar x -ad', + '.tar.lzma': 'tar --lzma -xvf', + '.tlz': 'tar --lzma -xvf', + '.tar.xz': 'tar -xvJf', + '.txz': 'tar -xvJf'} + A dictionary mapping suffices to decompression programs. diff --git a/usr/share/vim/vim91/doc/pi_tutor.txt b/usr/share/vim/vim91/doc/pi_tutor.txt index 618fe745ac4..590d2e4b4b4 100644 --- a/usr/share/vim/vim91/doc/pi_tutor.txt +++ b/usr/share/vim/vim91/doc/pi_tutor.txt @@ -1,4 +1,4 @@ -*pi_tutor.txt* For Vim version 9.1. Last change: 2024 Nov 09 +*pi_tutor.txt* For Vim version 9.1. Last change: 2024 Dec 17 INTERACTIVE TUTORIALS FOR VIM *vim-tutor-mode* @@ -16,21 +16,28 @@ by double-clicking them. 1.1 Commands ------------ *:Tutor* -:Tutor {tutorial} Opens a tutorial. Command-line completion for - {tutorial} is provided, the candidates are a list of - '.tutor' files found in the 'tutor/' folder in - the 'runtimepath'. Tutorials prefixed with 'vim-' +:Tutor [tutorial] Opens a tutorial. Command-line completion for + [tutorial] is provided, the candidates are a list of + ".tutor" files found in the "tutor//" folder in + the 'runtimepath'. Tutorials prefixed with "vim-" will always be shown first. - If no {tutorial} is provided, the command starts the - 'vim-01-beginner' tutorial, which is equivalent to - Vim's `vimtutor`. + If no [tutorial] is provided, the command starts the + "vim-01-beginner" tutorial, which is equivalent to + Vim's `vimtutor`, chapter 1. + Uses the translated tutorial for the current message + language if possible (|v:lang|), e.g. to open the + chapter 1 of the Italian tutor, use: > + + :lang it_IT.UTF-8 + :Tutor +< ============================================================================= 2. Creating tutorials *vim-tutor-create* Writing vim-tutor-mode tutorials is easy. For an overview of the format used, -please consult the 'tutor.tutor' file: > +please consult the "tutor.tutor" file: > :Tutor tutor < diff --git a/usr/share/vim/vim91/doc/popup.txt b/usr/share/vim/vim91/doc/popup.txt index b9e992b04cc..06acf3918b9 100644 --- a/usr/share/vim/vim91/doc/popup.txt +++ b/usr/share/vim/vim91/doc/popup.txt @@ -1,4 +1,4 @@ -*popup.txt* For Vim version 9.1. Last change: 2024 Jun 16 +*popup.txt* For Vim version 9.1. Last change: 2025 Jan 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -257,8 +257,8 @@ popup_clear([{force}]) popup_close({id} [, {result}]) *popup_close()* - Close popup {id}. The window and the associated buffer will - be deleted. + Close popup {id}. The window will be deleted. The associated + buffer will be deleted, if the popup created a new buffer. If the popup has a callback it will be called just before the popup window is deleted. If the optional {result} is present @@ -705,7 +705,6 @@ The second argument of |popup_create()| is a dictionary with options: present. Use zero to reset. fixed When FALSE (the default), and: - "pos" is "botleft" or "topleft", and - - "wrap" is off, and - the popup would be truncated at the right edge of the screen, then the popup is moved to the left so as to fit the diff --git a/usr/share/vim/vim91/doc/quickfix.txt b/usr/share/vim/vim91/doc/quickfix.txt index 671630d6678..834f0e1b6ee 100644 --- a/usr/share/vim/vim91/doc/quickfix.txt +++ b/usr/share/vim/vim91/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2024 Nov 12 +*quickfix.txt* For Vim version 9.1. Last change: 2025 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -550,9 +550,9 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: < Otherwise it works the same as `:ldo`. FILTERING A QUICKFIX OR LOCATION LIST: - *cfilter-plugin* *:Cfilter* *:Lfilter* + *cfilter-plugin* *:Cfilter* *:Lfilter* *package-cfilter* If you have too many entries in a quickfix list, you can use the cfilter -plugin to reduce the number of entries. Load the plugin with: > +plugin to reduce the number of entries. Load the plugin with: >vim packadd cfilter @@ -1331,10 +1331,235 @@ g:compiler_gcc_ignore_unmatched_lines JAVAC *compiler-javac* Commonly used compiler options can be added to 'makeprg' by setting the -g:javac_makeprg_params variable. For example: > +b/g:javac_makeprg_params variable. For example: > let g:javac_makeprg_params = "-Xlint:all -encoding utf-8" -< + +MAVEN *compiler-maven* + +Commonly used compiler options can be added to 'makeprg' by setting the +b/g:maven_makeprg_params variable. For example: > + + let g:maven_makeprg_params = "-DskipTests -U -X" + +SPOTBUGS *compiler-spotbugs* + +SpotBugs is a static analysis tool that can be used to find bugs in Java. +It scans the Java bytecode of all classes in the currently open buffer. +(Therefore, `:compiler! spotbugs` is not supported.) + +Commonly used compiler options can be added to 'makeprg' by setting the +"b:" or "g:spotbugs_makeprg_params" variable. For example: >vim + + let b:spotbugs_makeprg_params = "-longBugCodes -effort:max -low" + +The global default is "-workHard -experimental". + +By default, the class files are searched in the directory where the source +files are placed. However, typical Java projects use distinct directories +for source files and class files. To make both known to SpotBugs, assign +their paths (distinct and relative to their common root directory) to the +following properties (using the example of a common Maven project): >vim + + let g:spotbugs_properties = { + \ 'sourceDirPath': ['src/main/java'], + \ 'classDirPath': ['target/classes'], + \ 'testSourceDirPath': ['src/test/java'], + \ 'testClassDirPath': ['target/test-classes'], + \ } + +Note that source and class path entries are expected to come in pairs: define +both "sourceDirPath" and "classDirPath" when you are considering at least one, +and apply the same logic to "testSourceDirPath" and "testClassDirPath". +Note that values for the path keys describe only for SpotBugs where to look +for files; refer to the documentation for particular compiler plugins for more +information. + +The default pre- and post-compiler actions are provided for Ant, Maven, and +Javac compiler plugins and can be selected by assigning the name of a compiler +plugin (`ant`, `maven`, or `javac`) to the "compiler" key: >vim + + let g:spotbugs_properties = { + \ 'compiler': 'maven', + \ } + +This single setting is essentially equivalent to all the settings below, with +the exception made for the "PreCompilerAction" and "PreCompilerTestAction" +values: their listed |Funcref|s will obtain no-op implementations whereas the +implicit Funcrefs of the "compiler" key will obtain the requested defaults if +available. >vim + + let g:spotbugs_properties = { + \ 'PreCompilerAction': + \ function('spotbugs#DefaultPreCompilerAction'), + \ 'PreCompilerTestAction': + \ function('spotbugs#DefaultPreCompilerTestAction'), + \ 'PostCompilerAction': + \ function('spotbugs#DefaultPostCompilerAction'), + \ 'sourceDirPath': ['src/main/java'], + \ 'classDirPath': ['target/classes'], + \ 'testSourceDirPath': ['src/test/java'], + \ 'testClassDirPath': ['target/test-classes'], + \ } + +With default actions, the compiler of choice will attempt to rebuild the class +files for the buffer (and possibly for the whole project) as soon as a Java +syntax file is loaded; then, `spotbugs` will attempt to analyze the quality of +the compilation unit of the buffer. + +Vim commands proficient in 'makeprg' [0] can be composed with default actions. +Begin by considering which of the supported keys, "DefaultPreCompilerCommand", +"DefaultPreCompilerTestCommand", or "DefaultPostCompilerCommand", you need to +write an implementation for, observing that each of these keys corresponds to +a particular "*Action" key. Follow it by defining a new function that always +declares an only parameter of type string and puts to use a command equivalent +of |:make|, and assigning its |Funcref| to the selected key. For example: +>vim + function! GenericPostCompilerCommand(arguments) abort + execute 'make ' . a:arguments + endfunction + + let g:spotbugs_properties = { + \ 'DefaultPostCompilerCommand': + \ function('GenericPostCompilerCommand'), + \ } + +When "PostCompilerAction" is available, "PostCompilerActionExecutor" is also +supported. Its value must be a Funcref pointing to a function that always +declares a single parameter of type string and decides whether |:execute| can +be dispatched on its argument, containing a pending post-compiler action, +after ascertaining the current status of |:cc| (or |:ll|): >vim + + function! GenericPostCompilerActionExecutor(action) abort + try + cc + catch /\vim + + function! GenericPreCompilerCommand(arguments) abort + if !exists('g:spotbugs_compilation_done') + doautocmd java_spotbugs_post User + execute 'make ' . a:arguments + " only run doautocmd when :make was synchronous + " see note below + doautocmd java_spotbugs_post ShellCmdPost " XXX: (a) + let g:spotbugs_compilation_done = 1 + else + cc + endif + endfunction + + function! GenericPreCompilerTestCommand(arguments) abort + if !exists('g:spotbugs_test_compilation_done') + doautocmd java_spotbugs_post User + execute 'make ' . a:arguments + " only run doautocmd when :make was synchronous + " see note below + doautocmd java_spotbugs_post ShellCmdPost " XXX: (b) + let g:spotbugs_test_compilation_done = 1 + else + cc + endif + endfunction + + let g:spotbugs_properties = { + \ 'compiler': 'maven', + \ 'DefaultPreCompilerCommand': + \ function('GenericPreCompilerCommand'), + \ 'DefaultPreCompilerTestCommand': + \ function('GenericPreCompilerTestCommand'), + \ 'PostCompilerActionExecutor': + \ function('GenericPostCompilerActionExecutor'), + \ } + +If a command equivalent of `:make` is capable of asynchronous execution and +consuming `ShellCmdPost` events, `:doautocmd java_spotbugs_post ShellCmdPost` +must be removed from such "*Action" (or "*Command") implementations (i.e. the +lines `(a)` and `(b)` in the listed examples) to retain a sequential order for +non-blocking execution, and any notification (see below) must be suppressed. +A `ShellCmdPost` `:autocmd` can be associated with any |:augroup| by assigning +its name to the "augroupForPostCompilerAction" key. + +When default actions are not suited to a desired workflow, proceed by writing +arbitrary functions yourself and matching their Funcrefs to the supported +keys: "PreCompilerAction", "PreCompilerTestAction", and "PostCompilerAction". + +The next example re-implements the default pre-compiler actions for a Maven +project and requests other default Maven settings with the "compiler" entry: +>vim + function! MavenPreCompilerAction() abort + call spotbugs#DeleteClassFiles() + compiler maven + make compile + cc + endfunction + + function! MavenPreCompilerTestAction() abort + call spotbugs#DeleteClassFiles() + compiler maven + make test-compile + cc + endfunction + + let g:spotbugs_properties = { + \ 'compiler': 'maven', + \ 'PreCompilerAction': + \ function('MavenPreCompilerAction'), + \ 'PreCompilerTestAction': + \ function('MavenPreCompilerTestAction'), + \ } + +Note that all entered custom settings will take precedence over the matching +default settings in "g:spotbugs_properties". +Note that it is necessary to notify the plugin of the result of a pre-compiler +action before further work can be undertaken. Using |:cc| after |:make| (or +|:ll| after |:lmake|) as the last command of an action is the supported means +of such communication. + +Two commands, "SpotBugsRemoveBufferAutocmd" and "SpotBugsDefineBufferAutocmd", +are provided to toggle actions for buffer-local autocommands. For example, to +also run actions on any |BufWritePost| and |SigUSR1| event, add these lines to +`~/.vim/after/ftplugin/java.vim`: >vim + + if exists(':SpotBugsDefineBufferAutocmd') == 2 + SpotBugsDefineBufferAutocmd BufWritePost SigUSR1 + endif + +Otherwise, you can turn to `:doautocmd java_spotbugs User` at any time. + +The "g:spotbugs_properties" variable is consulted by the Java filetype plugin +(|ft-java-plugin|) to arrange for the described automation, and, therefore, it +must be defined before |FileType| events can take place for the buffers loaded +with Java source files. It could, for example, be set in a project-local +|vimrc| loaded by [1]. + +Both "g:spotbugs_properties" and "b:spotbugs_properties" are recognized and +must be modifiable (|:unlockvar|). The "*Command" entries are always treated +as global functions to be shared among all Java buffers. + +The SpotBugs Java library and, by extension, its distributed shell scripts do +not support in the `-textui` mode listed pathnames with directory filenames +that contain blank characters [2]. To work around this limitation, consider +making a symbolic link to such a directory from a directory that does not have +blank characters in its name and passing this information to SpotBugs: >vim + + let g:spotbugs_alternative_path = { + \ 'fromPath': 'path/to/dir_without_blanks', + \ 'toPath': 'path/to/dir with blanks', + \ } + +[0] https://github.com/Konfekt/vim-compilers +[1] https://github.com/MarcWeber/vim-addon-local-vimrc +[2] https://github.com/spotbugs/spotbugs/issues/909 + GNU MAKE *compiler-make* Since the default make program is "make", the compiler plugin for make, @@ -1450,6 +1675,14 @@ Useful values for the 'makeprg' options therefore are: Also see http://vim.sourceforge.net/tip_view.php?tip_id=280. +PYTEST COMPILER *compiler-pytest* + +Commonly used compiler options can be added to 'makeprg' by setting the +b/g:pytest_makeprg_params variable. For example: > + + let b:pytest_makeprg_params = "--verbose --no-summary --disable-warnings" + +The global default is "--tb=short --quiet"; Python warnings are suppressed. TEX COMPILER *compiler-tex* diff --git a/usr/share/vim/vim91/doc/starting.txt b/usr/share/vim/vim91/doc/starting.txt index 7ce4d6f163b..94ed836fcfd 100644 --- a/usr/share/vim/vim91/doc/starting.txt +++ b/usr/share/vim/vim91/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 9.1. Last change: 2024 Oct 05 +*starting.txt* For Vim version 9.1. Last change: 2024 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -976,6 +976,7 @@ accordingly. Vim proceeds in this order: The $MYVIMRC or $MYGVIMRC environment variable will be set to the first found vimrc and/or gvimrc file while $MYVIMDIR is set to the users personal runtime directory 'rtp' (typically the first entry in 'runtimepath'). +Note: These environment variables resolve symbolic links, but 'rtp' does not. Some hints on using initializations ~ diff --git a/usr/share/vim/vim91/doc/syntax.txt b/usr/share/vim/vim91/doc/syntax.txt index b0c77db1d4f..2fb320efcbe 100644 --- a/usr/share/vim/vim91/doc/syntax.txt +++ b/usr/share/vim/vim91/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2024 Nov 10 +*syntax.txt* For Vim version 9.1. Last change: 2025 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -883,12 +883,15 @@ There are many types of assembly languages that all use the same file name extensions. Therefore you will have to select the type yourself, or add a line in the assembly file that Vim will recognize. Currently these syntax files are included: - asm GNU assembly (the default) + asm GNU assembly (usually have .s or .S extension and were + already built using C compiler such as GCC or CLANG) asm68k Motorola 680x0 assembly asmh8300 Hitachi H-8300 version of GNU assembly ia64 Intel Itanium 64 fasm Flat assembly (http://flatassembler.net) - masm Microsoft assembly (probably works for any 80x86) + masm Microsoft assembly (.masm files are compiled with + Microsoft's Macro Assembler. This is only supported + for x86, x86_64, ARM and AARCH64 CPU families) nasm Netwide assembly tasm Turbo Assembly (with opcodes 80x86 up to Pentium, and MMX) @@ -5851,9 +5854,13 @@ PmenuSbar Popup menu: Scrollbar. *hl-PmenuThumb* PmenuThumb Popup menu: Thumb of the scrollbar. *hl-PmenuMatch* -PmenuMatch Popup menu: Matched text in normal item. +PmenuMatch Popup menu: Matched text in normal item. Applied in + combination with |hl-Pmenu|. *hl-PmenuMatchSel* -PmenuMatchSel Popup menu: Matched text in selected item. +PmenuMatchSel Popup menu: Matched text in selected item. Applied in + combination with |hl-PmenuSel|. + *hl-ComplMatchIns* +ComplMatchIns Matched text of the currently inserted completion. *hl-PopupNotification* PopupNotification Popup window created with |popup_notification()|. If not diff --git a/usr/share/vim/vim91/doc/tags b/usr/share/vim/vim91/doc/tags index d61bdc7e208..2fc28d72416 100644 --- a/usr/share/vim/vim91/doc/tags +++ b/usr/share/vim/vim91/doc/tags @@ -499,9 +499,9 @@ $quote eval.txt /*$quote* 'menc' options.txt /*'menc'* 'menuitems' options.txt /*'menuitems'* 'mesg' vi_diff.txt /*'mesg'* +'messagesopt' options.txt /*'messagesopt'* 'mfd' options.txt /*'mfd'* 'mh' options.txt /*'mh'* -'mhi' options.txt /*'mhi'* 'mis' options.txt /*'mis'* 'mkspellmem' options.txt /*'mkspellmem'* 'ml' options.txt /*'ml'* @@ -517,6 +517,7 @@ $quote eval.txt /*$quote* 'modelines' options.txt /*'modelines'* 'modifiable' options.txt /*'modifiable'* 'modified' options.txt /*'modified'* +'mopt' options.txt /*'mopt'* 'more' options.txt /*'more'* 'mouse' options.txt /*'mouse'* 'mousef' options.txt /*'mousef'* @@ -532,7 +533,6 @@ $quote eval.txt /*$quote* 'mousetime' options.txt /*'mousetime'* 'mp' options.txt /*'mp'* 'mps' options.txt /*'mps'* -'msghistory' options.txt /*'msghistory'* 'msm' options.txt /*'msm'* 'mzq' options.txt /*'mzq'* 'mzquantum' options.txt /*'mzquantum'* @@ -2127,7 +2127,9 @@ $quote eval.txt /*$quote* :GnatFind ft_ada.txt /*:GnatFind* :GnatPretty ft_ada.txt /*:GnatPretty* :GnatTags ft_ada.txt /*:GnatTags* +:HelpToc helphelp.txt /*:HelpToc* :Hexplore pi_netrw.txt /*:Hexplore* +:Justify usr_25.txt /*:Justify* :LP pi_logipat.txt /*:LP* :LPE pi_logipat.txt /*:LPE* :LPF pi_logipat.txt /*:LPF* @@ -3025,6 +3027,8 @@ $quote eval.txt /*$quote* :packadd repeat.txt /*:packadd* :packl repeat.txt /*:packl* :packloadall repeat.txt /*:packloadall* +:pb windows.txt /*:pb* +:pbuffer windows.txt /*:pbuffer* :pc windows.txt /*:pc* :pclose windows.txt /*:pclose* :pe if_perl.txt /*:pe* @@ -3055,9 +3059,9 @@ $quote eval.txt /*$quote* :promptrepl change.txt /*:promptrepl* :ps windows.txt /*:ps* :psearch windows.txt /*:psearch* +:pt windows.txt /*:pt* :ptN tagsrch.txt /*:ptN* :ptNext tagsrch.txt /*:ptNext* -:pta windows.txt /*:pta* :ptag windows.txt /*:ptag* :ptf tagsrch.txt /*:ptf* :ptfirst tagsrch.txt /*:ptfirst* @@ -4289,7 +4293,7 @@ E1179 options.txt /*E1179* E118 eval.txt /*E118* E1180 vim9.txt /*E1180* E1181 vim9.txt /*E1181* -E1182 eval.txt /*E1182* +E1182 vim9.txt /*E1182* E1183 eval.txt /*E1183* E1184 eval.txt /*E1184* E1185 various.txt /*E1185* @@ -5564,6 +5568,7 @@ J change.txt /*J* Japanese mbyte.txt /*Japanese* Job eval.txt /*Job* Jobs eval.txt /*Jobs* +Justify() usr_25.txt /*Justify()* K various.txt /*K* KDE gui_x11.txt /*KDE* KVim gui_x11.txt /*KVim* @@ -5785,6 +5790,7 @@ V visual.txt /*V* VIMINIT starting.txt /*VIMINIT* VMS os_vms.txt /*VMS* Vi intro.txt /*Vi* +Vietnamese vietnamese.txt /*Vietnamese* View starting.txt /*View* Vim9 vim9.txt /*Vim9* Vim9-abstract-class vim9class.txt /*Vim9-abstract-class* @@ -5821,6 +5827,7 @@ W20 if_pyth.txt /*W20* W21 if_pyth.txt /*W21* W22 userfunc.txt /*W22* W23 gui_x11.txt /*W23* +W24 gui_x11.txt /*W24* WORD motion.txt /*WORD* WSL os_win32.txt /*WSL* WWW intro.txt /*WWW* @@ -6159,6 +6166,8 @@ balloon_show() builtin.txt /*balloon_show()* balloon_split() builtin.txt /*balloon_split()* bar motion.txt /*bar* bars help.txt /*bars* +base64_decode() builtin.txt /*base64_decode()* +base64_encode() builtin.txt /*base64_encode()* base_font_name_list mbyte.txt /*base_font_name_list* basic.vim syntax.txt /*basic.vim* beep options.txt /*beep* @@ -6563,13 +6572,16 @@ compiler-hpada ft_ada.txt /*compiler-hpada* compiler-javac quickfix.txt /*compiler-javac* compiler-make quickfix.txt /*compiler-make* compiler-manx quickfix.txt /*compiler-manx* +compiler-maven quickfix.txt /*compiler-maven* compiler-mypy quickfix.txt /*compiler-mypy* compiler-pandoc quickfix.txt /*compiler-pandoc* compiler-perl quickfix.txt /*compiler-perl* compiler-pylint quickfix.txt /*compiler-pylint* +compiler-pytest quickfix.txt /*compiler-pytest* compiler-pyunit quickfix.txt /*compiler-pyunit* compiler-ruff quickfix.txt /*compiler-ruff* compiler-select quickfix.txt /*compiler-select* +compiler-spotbugs quickfix.txt /*compiler-spotbugs* compiler-tex quickfix.txt /*compiler-tex* compiler-typst quickfix.txt /*compiler-typst* compiler-vaxada ft_ada.txt /*compiler-vaxada* @@ -7212,6 +7224,7 @@ fold-create-marker fold.txt /*fold-create-marker* fold-delete-marker fold.txt /*fold-delete-marker* fold-diff fold.txt /*fold-diff* fold-expr fold.txt /*fold-expr* +fold-expr-slow fold.txt /*fold-expr-slow* fold-foldcolumn fold.txt /*fold-foldcolumn* fold-foldlevel fold.txt /*fold-foldlevel* fold-foldtext fold.txt /*fold-foldtext* @@ -7352,6 +7365,7 @@ ft-lifelines-syntax syntax.txt /*ft-lifelines-syntax* ft-lisp-syntax syntax.txt /*ft-lisp-syntax* ft-lite-syntax syntax.txt /*ft-lite-syntax* ft-lpc-syntax syntax.txt /*ft-lpc-syntax* +ft-lua-plugin filetype.txt /*ft-lua-plugin* ft-lua-syntax syntax.txt /*ft-lua-syntax* ft-mail-plugin filetype.txt /*ft-mail-plugin* ft-mail.vim syntax.txt /*ft-mail.vim* @@ -7573,6 +7587,7 @@ g:gzip_exec pi_gzip.txt /*g:gzip_exec* g:hare_recommended_style ft_hare.txt /*g:hare_recommended_style* g:hare_space_error ft_hare.txt /*g:hare_space_error* g:haredoc_search_depth ft_hare.txt /*g:haredoc_search_depth* +g:help_example_languages helphelp.txt /*g:help_example_languages* g:html_charset_override syntax.txt /*g:html_charset_override* g:html_diff_one_file syntax.txt /*g:html_diff_one_file* g:html_dynamic_folds syntax.txt /*g:html_dynamic_folds* @@ -7895,6 +7910,7 @@ getscript-history pi_getscript.txt /*getscript-history* getscript-plugins pi_getscript.txt /*getscript-plugins* getscript-start pi_getscript.txt /*getscript-start* getscriptinfo() builtin.txt /*getscriptinfo()* +getstacktrace() builtin.txt /*getstacktrace()* gettabinfo() builtin.txt /*gettabinfo()* gettabvar() builtin.txt /*gettabvar()* gettabwinvar() builtin.txt /*gettabwinvar()* @@ -8076,6 +8092,7 @@ help-TOC helphelp.txt /*help-TOC* help-buffer-options helphelp.txt /*help-buffer-options* help-context help.txt /*help-context* help-curwin tips.txt /*help-curwin* +help-notation helphelp.txt /*help-notation* help-summary usr_02.txt /*help-summary* help-tags tags 1 help-toc-install helphelp.txt /*help-toc-install* @@ -8126,6 +8143,7 @@ hit-return message.txt /*hit-return* hitest.vim syntax.txt /*hitest.vim* hjkl usr_02.txt /*hjkl* hl-ColorColumn syntax.txt /*hl-ColorColumn* +hl-ComplMatchIns syntax.txt /*hl-ComplMatchIns* hl-Conceal syntax.txt /*hl-Conceal* hl-CurSearch syntax.txt /*hl-CurSearch* hl-Cursor syntax.txt /*hl-Cursor* @@ -8397,6 +8415,7 @@ inactive-buffer windows.txt /*inactive-buffer* include-search tagsrch.txt /*include-search* inclusion helphelp.txt /*inclusion* inclusive motion.txt /*inclusive* +inclusive-motion-selection-exclusive motion.txt /*inclusive-motion-selection-exclusive* incomp-small-6 version6.txt /*incomp-small-6* incompatible-5 version5.txt /*incompatible-5* incompatible-6 version6.txt /*incompatible-6* @@ -8521,6 +8540,7 @@ jump-motions motion.txt /*jump-motions* jumplist motion.txt /*jumplist* jumplist-stack motion.txt /*jumplist-stack* jumpto-diffs diff.txt /*jumpto-diffs* +justify usr_25.txt /*justify* k motion.txt /*k* kcc uganda.txt /*kcc* kde gui_x11.txt /*kde* @@ -9367,9 +9387,17 @@ out_name channel.txt /*out_name* out_timeout channel.txt /*out_timeout* p change.txt /*p* pack-add repeat.txt /*pack-add* +package-cfilter quickfix.txt /*package-cfilter* +package-comment usr_05.txt /*package-comment* package-create repeat.txt /*package-create* package-doc repeat.txt /*package-doc* package-documentation repeat.txt /*package-documentation* +package-editorconfig usr_05.txt /*package-editorconfig* +package-helptoc helphelp.txt /*package-helptoc* +package-justify usr_25.txt /*package-justify* +package-matchit usr_05.txt /*package-matchit* +package-nohlsearch usr_05.txt /*package-nohlsearch* +package-termdebug terminal.txt /*package-termdebug* package-translate_example repeat.txt /*package-translate_example* package-translation repeat.txt /*package-translation* packages repeat.txt /*packages* @@ -10202,6 +10230,7 @@ sqrt() builtin.txt /*sqrt()* squirrel.vim syntax.txt /*squirrel.vim* srand() builtin.txt /*srand()* sscanf eval.txt /*sscanf* +stacktrace-variable eval.txt /*stacktrace-variable* standard-plugin usr_05.txt /*standard-plugin* standard-plugin-list help.txt /*standard-plugin-list* standout syntax.txt /*standout* @@ -10220,6 +10249,7 @@ state() builtin.txt /*state()* static-tag tagsrch.txt /*static-tag* status-line windows.txt /*status-line* statusmsg-variable eval.txt /*statusmsg-variable* +stl-%! options.txt /*stl-%!* stl-%{ options.txt /*stl-%{* str2float() builtin.txt /*str2float()* str2list() builtin.txt /*str2list()* @@ -10253,6 +10283,7 @@ strutf16len() builtin.txt /*strutf16len()* strwidth() builtin.txt /*strwidth()* style-braces develop.txt /*style-braces* style-changes develop.txt /*style-changes* +style-clang-format develop.txt /*style-clang-format* style-comments develop.txt /*style-comments* style-common-functions develop.txt /*style-common-functions* style-compiler develop.txt /*style-compiler* @@ -10641,6 +10672,7 @@ template autocmd.txt /*template* tempname() builtin.txt /*tempname()* term++close terminal.txt /*term++close* term++open terminal.txt /*term++open* +term++shell terminal.txt /*term++shell* term-dependent-settings term.txt /*term-dependent-settings* term-list syntax.txt /*term-list* term.txt term.txt /*term.txt* @@ -10687,6 +10719,7 @@ termdebug-starting terminal.txt /*termdebug-starting* termdebug-stepping terminal.txt /*termdebug-stepping* termdebug-timeout terminal.txt /*termdebug-timeout* termdebug-variables terminal.txt /*termdebug-variables* +termdebug_contributing terminal.txt /*termdebug_contributing* termdebug_disasm_window terminal.txt /*termdebug_disasm_window* termdebug_evaluate_in_popup terminal.txt /*termdebug_evaluate_in_popup* termdebug_map_K terminal.txt /*termdebug_map_K* @@ -10720,6 +10753,7 @@ terminal-job-index index.txt /*terminal-job-index* terminal-key-codes term.txt /*terminal-key-codes* terminal-mouse term.txt /*terminal-mouse* terminal-ms-windows terminal.txt /*terminal-ms-windows* +terminal-nospecial terminal.txt /*terminal-nospecial* terminal-options term.txt /*terminal-options* terminal-output-codes term.txt /*terminal-output-codes* terminal-resizing terminal.txt /*terminal-resizing* @@ -11017,6 +11051,7 @@ v:shell_error eval.txt /*v:shell_error* v:sizeofint eval.txt /*v:sizeofint* v:sizeoflong eval.txt /*v:sizeoflong* v:sizeofpointer eval.txt /*v:sizeofpointer* +v:stacktrace eval.txt /*v:stacktrace* v:statusmsg eval.txt /*v:statusmsg* v:swapchoice eval.txt /*v:swapchoice* v:swapcommand eval.txt /*v:swapcommand* @@ -11232,6 +11267,15 @@ vi-features vi_diff.txt /*vi-features* vi: options.txt /*vi:* vi_diff.txt vi_diff.txt /*vi_diff.txt* vib motion.txt /*vib* +vietnamese vietnamese.txt /*vietnamese* +vietnamese-ime_diff vietnamese.txt /*vietnamese-ime_diff* +vietnamese-intro vietnamese.txt /*vietnamese-intro* +vietnamese-keymap vietnamese.txt /*vietnamese-keymap* +vietnamese-l10n vietnamese.txt /*vietnamese-l10n* +vietnamese-telex_utf-8 vietnamese.txt /*vietnamese-telex_utf-8* +vietnamese-viqr_utf-8 vietnamese.txt /*vietnamese-viqr_utf-8* +vietnamese-vni_utf-8 vietnamese.txt /*vietnamese-vni_utf-8* +vietnamese.txt vietnamese.txt /*vietnamese.txt* view starting.txt /*view* view-diffs diff.txt /*view-diffs* view-file starting.txt /*view-file* diff --git a/usr/share/vim/vim91/doc/term.txt b/usr/share/vim/vim91/doc/term.txt index d930dd33e07..f56dbd4b6da 100644 --- a/usr/share/vim/vim91/doc/term.txt +++ b/usr/share/vim/vim91/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 9.1. Last change: 2024 Oct 05 +*term.txt* For Vim version 9.1. Last change: 2024 Dec 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -688,10 +688,11 @@ The default values are set like this: > let &t_8f = "\[38;2;%lu;%lu;%lum" let &t_8b = "\[48;2;%lu;%lu;%lum" -Some terminals accept the same sequences, but with all semicolons replaced by -colons (this is actually more compatible, but less widely supported): > - let &t_8f = "\[38:2:%lu:%lu:%lum" - let &t_8b = "\[48:2:%lu:%lu:%lum" +Some terminals accept similar sequences, with semicolons replaced by colons +and an extra colon after the number 2 (this is conformant to the ISO 8613-6 +standard, but less widely supported): > + let &t_8f = "\[38:2::%lu:%lu:%lum" + let &t_8b = "\[48:2::%lu:%lu:%lum" These options contain printf strings, with |printf()| (actually, its C equivalent hence `l` modifier) invoked with the t_ option value and three diff --git a/usr/share/vim/vim91/doc/terminal.txt b/usr/share/vim/vim91/doc/terminal.txt index 637277ab592..1fcc470db8a 100644 --- a/usr/share/vim/vim91/doc/terminal.txt +++ b/usr/share/vim/vim91/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 9.1. Last change: 2024 Nov 10 +*terminal.txt* For Vim version 9.1. Last change: 2025 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -197,6 +197,16 @@ Command syntax ~ if [command] is NONE no job is started, the pty of the terminal can be used by a command like gdb. + If [command] outputs NUL bytes, those will be + converted to new lines |NL-used-for-Nul|. + + *terminal-nospecial* + Vim itself only recognizes |cmdline-special| + characters inside [command]. Everything else will be + passed untouched. When needed to expand wildcards, + environment variables or other shell specials consider + |term++shell| option. + If [command] is missing the default behavior is to close the terminal when the shell exits. This can be changed with the ++noclose argument. @@ -241,10 +251,16 @@ Command syntax ~ no window will be used. ++norestore Do not include this terminal window in a session file. + + *term++shell* ++shell Instead of executing {command} directly, use a shell, like with `:!command` *E279* {only works on Unix and MS-Windows} + The resulting command will look like + 'shell' 'shellcmdflag' [command] + Other options related to `:!command` + have no effect. ++kill={how} When trying to close the terminal window kill the job with {how}. See |term_setkill()| for the values. @@ -1238,7 +1254,7 @@ Alternatively, press "s" to swap the first and second dump. Do this several times so that you can spot the difference in the context of the text. ============================================================================== -6. Debugging *terminal-debug* *terminal-debugger* +6. Debugging *terminal-debug* *terminal-debugger* *package-termdebug* The Terminal debugging plugin can be used to debug a program with gdb and view the source code in a Vim window. Since this is completely contained inside @@ -1737,4 +1753,23 @@ This can also be used in a "one-shot" manner: > let g:termdebug_config['evaluate_in_popup'] = v:false endfunc < + +Contributing ~ + *termdebug_contributing* +Contributions for termdebug improvements are welcome. +However, it is fairly common that during the development process you need some +mechanisms like `echo` statements (or similar) to help you in your job. +For this reason, you can set: > + let g:termdebug_config['debug'] = true +< +This sets the `DEBUG` variable to `true`, which can be referenced in the +source code. An example of its usage follows: > + if exists('g:termdebug_loaded') + if DEBUG + Echoerr('Termdebug already loaded.') + endif + finish + endif +< + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/usr/share/vim/vim91/doc/todo.txt b/usr/share/vim/vim91/doc/todo.txt index 2f186548282..48937b10414 100644 --- a/usr/share/vim/vim91/doc/todo.txt +++ b/usr/share/vim/vim91/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 9.1. Last change: 2024 Oct 27 +*todo.txt* For Vim version 9.1. Last change: 2024 Dec 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1093,9 +1093,6 @@ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313) MS-Windows: buffer completion doesn't work when using backslash (or slash) for a path separator. (xtal8, #2201) -Would be nice for Insert mode completion to highlight the text that was added -(and may change when picking another completion). - Test more runtime files. Window not closed when deleting buffer. (Harm te Hennepe, 2017 Aug 27, #2029) @@ -4201,8 +4198,6 @@ Vim script language: char2hex() convert char string to hex string. crypt() encrypt string decrypt() decrypt string - base64enc() base 64 encoding - base64dec() base 64 decoding attributes() return file protection flags "drwxrwxrwx" shorten(fname) shorten a file name, like home_replace() perl(cmd) call Perl and return string @@ -4749,13 +4744,9 @@ Insert mode completion/expansion: (Prabir Shrestha, 2017 May 19, #1713) - When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017 Apr 23, #1653) -- Can 'completeopt' be made buffer-local? (#5487) - When complete() first argument is before where insert started and 'backspace' is Vi compatible, the completion fails. (Hirohito Higashi, 2015 Feb 19) -- The CompleteDone autocommand needs some info passed to it: - - The word that was selected (empty if abandoned complete) - - Type of completion: tag, omnifunc, user func. - When a:base in 'completefunc' starts with a number it's passed as a number, not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a string value. diff --git a/usr/share/vim/vim91/doc/usr_01.txt b/usr/share/vim/vim91/doc/usr_01.txt index 604e26bfec4..556774e142e 100644 --- a/usr/share/vim/vim91/doc/usr_01.txt +++ b/usr/share/vim/vim91/doc/usr_01.txt @@ -1,4 +1,4 @@ -*usr_01.txt* For Vim version 9.1. Last change: 2024 Nov 03 +*usr_01.txt* For Vim version 9.1. Last change: 2024 Dec 17 VIM USER MANUAL - by Bram Moolenaar @@ -110,15 +110,16 @@ For more info see |vimrc| and |compatible-default|. For the interactive tutor, see |vim-tutor-mode| Instead of reading the text (boring!) you can use the vimtutor to learn your -first Vim commands. This is a 30-minute tutorial that teaches the most basic -Vim functionality hands-on. +first Vim commands. This is a 30-minute tutorial provided in 2 chapters, that +teaches the most basic Vim functionality hands-on. On Unix, if Vim has been properly installed, you can start it from the shell: > vimtutor -On MS-Windows you can find it in the Program/Vim menu. Or execute -vimtutor.bat in the $VIMRUNTIME directory. +On MS-Windows you can find it in the "Program/Vim 9.1" menu. Or execute +vimtutor.bat from the installation directory (You can use `:echo $VIMRUNTIME` +from within Vim to find this directory). This will make a copy of chapter 1 tutor file, so that you can edit it without the risk of damaging the original. To continue with chapter 2, you can use @@ -145,13 +146,13 @@ On other systems, you have to do a little work: 1. Copy the tutor file. You can do this with Vim (it knows where to find it): > - vim --clean -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! TUTORCOPY' -c 'q' + vim --clean -c 'e $VIMRUNTIME/tutor/tutor1' -c 'w! TUTORCOPY' -c 'q' < This will write the file "TUTORCOPY" in the current directory. To use a translated version of the tutor, append the two-letter language code to the filename. For French: > - vim --clean -c 'e $VIMRUNTIME/tutor/tutor.fr' -c 'w! TUTORCOPY' -c 'q' + vim --clean -c 'e $VIMRUNTIME/tutor/tutor1.fr' -c 'w! TUTORCOPY' -c 'q' < 2. Edit the copied file with Vim: > diff --git a/usr/share/vim/vim91/doc/usr_02.txt b/usr/share/vim/vim91/doc/usr_02.txt index 70d24d3dd94..a02835d86be 100644 --- a/usr/share/vim/vim91/doc/usr_02.txt +++ b/usr/share/vim/vim91/doc/usr_02.txt @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim version 9.1. Last change: 2024 Oct 05 +*usr_02.txt* For Vim version 9.1. Last change: 2025 Jan 11 VIM USER MANUAL - by Bram Moolenaar @@ -694,6 +694,13 @@ Summary: *help-summary* > :help E128 < takes you to the |:function| command +27) Documenction for packages distributed with Vim have the form package-. + So > + :help package-comment +< + will bring you to the help section for the included comment plugin and how to + enable it. + ============================================================================== diff --git a/usr/share/vim/vim91/doc/usr_05.txt b/usr/share/vim/vim91/doc/usr_05.txt index ca6b910754e..93231f6cd18 100644 --- a/usr/share/vim/vim91/doc/usr_05.txt +++ b/usr/share/vim/vim91/doc/usr_05.txt @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim version 9.1. Last change: 2024 Oct 05 +*usr_05.txt* For Vim version 9.1. Last change: 2025 Jan 11 VIM USER MANUAL - by Bram Moolenaar @@ -392,7 +392,7 @@ The ":map" command (with no arguments) lists your current mappings. At least the ones for Normal mode. More about mappings in section |40.1|. ============================================================================== -*05.5* Adding a package *add-package* *matchit-install* +*05.5* Adding a package *add-package* *matchit-install* *package-matchit* A package is a set of files that you can add to Vim. There are two kinds of packages: optional and automatically loaded on startup. @@ -427,7 +427,7 @@ an archive or as a repository. For an archive you can follow these steps: Here "fancytext" is the name of the package, it can be anything else. -Adding the editorconfig package *editorconfig-install* +Adding the editorconfig package *editorconfig-install* *package-editorconfig* Similar to the matchit package, to load the distributed editorconfig plugin when Vim starts, add the following line to your vimrc file: > @@ -437,7 +437,7 @@ After restarting your Vim, the plugin is active and you can read about it at: > :h editorconfig.txt -Adding comment package *comment-install* +Adding comment package *comment-install* *package-comment* Load the plugin with this command: > packadd comment @@ -450,7 +450,7 @@ the package loaded. Once the package is loaded, read about it at: > :h comment.txt -Adding nohlsearch package *nohlsearch-install* +Adding nohlsearch package *nohlsearch-install* *package-nohlsearch* Load the plugin with this command: > packadd nohlsearch diff --git a/usr/share/vim/vim91/doc/usr_25.txt b/usr/share/vim/vim91/doc/usr_25.txt index af013bcfe77..5b4df0d0e6c 100644 --- a/usr/share/vim/vim91/doc/usr_25.txt +++ b/usr/share/vim/vim91/doc/usr_25.txt @@ -1,4 +1,4 @@ -*usr_25.txt* For Vim version 9.1. Last change: 2016 Mar 28 +*usr_25.txt* For Vim version 9.1. Last change: 2025 Jan 11 VIM USER MANUAL - by Bram Moolenaar @@ -190,15 +190,15 @@ This results in the following: story. ~ -JUSTIFYING TEXT +JUSTIFYING TEXT *justify* *:Justify* *Justify()* *package-justify* Vim has no built-in way of justifying text. However, there is a neat macro package that does the job. To use this package, execute the following -command: > +command: >vim :packadd justify -Or put this line in your |vimrc|: > +Or put this line in your |vimrc|: >vim packadd! justify diff --git a/usr/share/vim/vim91/doc/usr_41.txt b/usr/share/vim/vim91/doc/usr_41.txt index 36907d249ca..ded30e35d46 100644 --- a/usr/share/vim/vim91/doc/usr_41.txt +++ b/usr/share/vim/vim91/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 9.1. Last change: 2024 Nov 11 +*usr_41.txt* For Vim version 9.1. Last change: 2025 Jan 02 VIM USER MANUAL - by Bram Moolenaar @@ -1263,6 +1263,8 @@ Inter-process communication: *channel-functions* json_decode() decode a JSON string to Vim types js_encode() encode an expression to a JSON string js_decode() decode a JSON string to Vim types + base64_encode() encode a blob into a base64 string + base64_decode() decode a base64 string into a blob err_teapot() give error 418 or 503 Jobs: *job-functions* @@ -1397,7 +1399,8 @@ Various: *various-functions* eventhandler() check if invoked by an event handler getcellpixels() get List of cell pixel size getpid() get process ID of Vim - getscriptinfo() get list of sourced vim scripts + getscriptinfo() get list of sourced Vim scripts + getstacktrace() get current stack trace of Vim scripts getimstatus() check if IME status is active interrupt() interrupt script execution windowsversion() get MS-Windows version diff --git a/usr/share/vim/vim91/doc/various.txt b/usr/share/vim/vim91/doc/various.txt index 5f0ad0635ce..440a6656290 100644 --- a/usr/share/vim/vim91/doc/various.txt +++ b/usr/share/vim/vim91/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 9.1. Last change: 2024 Nov 12 +*various.txt* For Vim version 9.1. Last change: 2024 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -256,6 +256,17 @@ g8 Print the hex values of the bytes used in the :!{cmd} Execute {cmd} with the shell. See also the 'shell' and 'shelltype' option. For the filter command, see |:range!|. + + Vim builds command line using options 'shell', 'shcf', + 'sxq' and 'shq' in the following order: + `&sh &shcf &sxq &shq {cmd} &shq &sxq` + So setting both 'sxq' and 'shq' is possible but rarely + useful. Additional escaping inside `{cmd}` may also + be due to 'sxe' option. + + Also, all |cmdline-special| characters in {cmd} are + replaced by Vim before passing them to shell. + *E34* Any '!' in {cmd} is replaced with the previous external command (see also 'cpoptions'). But not when @@ -306,7 +317,10 @@ g8 Print the hex values of the bytes used in the CTRL-L or ":redraw!" if the command did display something. However, this depends on what the |t_ti| and |t_te| termcap entries are set to. - Also see |shell-window|. + + Hint: use |:terminal| command if you want to run {cmd} + in Vim window. `:term ++shell ++close {cmd}` could + serve as close approximation to what `:!{cmd}` does. *:!!* :!! Repeat last ":!{cmd}". diff --git a/usr/share/vim/vim91/doc/version9.txt b/usr/share/vim/vim91/doc/version9.txt index 10e13f846ac..bcb0b78f7b9 100644 --- a/usr/share/vim/vim91/doc/version9.txt +++ b/usr/share/vim/vim91/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.1. Last change: 2024 Nov 14 +*version9.txt* For Vim version 9.1. Last change: 2025 Jan 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -31849,14 +31849,14 @@ Autocommands: ~ Commands: ~ -|:abstract| define a Vim9 abstract class -|:class| start of a class specification +|:abstract| declare a Vim9 abstract class +|:class| start of a class declaration |:defer| call function when current function is done |:echowindow| same as :echomsg, but use a popup window -|:endinterface| end of an interface specification -|:endclass| end of a class specification +|:endinterface| end of an interface declaration +|:endclass| end of a class declaration |:horizontal| following window command works horizontally -|:interface| start of an interface specification +|:interface| start of an interface declaration |:public| prefix for a class or object member |:static| prefix for a class member or function |:this| prefix for an object member @@ -41607,6 +41607,24 @@ Changed~ started via |:Tutor| - improve the |vimtutor| and add a second chapter for more advanced tips - allow to pass local Vim script variables to python interpreter |py3eval()| +- |getwininfo()| now also returns the "leftcol" property for a window +- 'rulerformat' now supports the |stl-%!| item +- the default 'history' option value has been increased to 200 and removed + from |defaults.vim| +- the default 'backspace' option for Vim has been set to "indent,eol,start" + and removed from |defaults.vim| +- the completed word and completion type are provided when handling the + |CompleteDone| autocommand in the |v:event| dictionary +- the default fontsize for the GTK builds of Vim (Windows and Unix) has been + increased to 12pt to accomodate modern high-dpi monitors +- filetype detection now detects bash scripts as a separate "bash" filetype + instead of the "sh" filetype +- the default value of the 'keyprotocol' option has been updated by support + for the ghostty terminal emulator (using kitty protocol) +- |complete_info()| returns the list of matches shown in the poppu menu via + the "matches" key +- |v:stacktrace| The stack trace of the exception most recently caught and + not finished *added-9.2* Added ~ @@ -41615,15 +41633,18 @@ Various syntax, indent and other plugins were added. Functions: ~ +|base64_decode()| decode a base64 string into a blob +|base64_encode()| encode a blob into a base64 string |bindtextdomain()| set message lookup translation base path |diff()| diff two Lists of strings |filecopy()| copy a file {from} to {to} |foreach()| apply function to List items +|getcellpixels()| get List of terminal cell pixel size |getcmdcomplpat()| Shell command line completion |getcmdprompt()| get prompt for input()/confirm() -|getcellpixels()| get List of terminal cell pixel size |getregion()| get a region of text from a buffer |getregionpos()| get a list of positions for a region +|getstacktrace()| get current stack trace of Vim scripts |id()| get unique identifier for a Dict, List, Object, Channel or Blob variable |matchbufline()| all the matches of a pattern in a buffer @@ -41643,6 +41664,7 @@ Autocommands: ~ Highlighting: ~ +|hl-ComplMatchIns| matched text of the currently inserted completion. |hl-MsgArea| highlighting of the Command-line and messages area |hl-PmenuMatch| Popup menu: highlighting of matched text |hl-PmenuMatchSel| Popup menu: highlighting of matched text in selected @@ -41651,7 +41673,8 @@ Highlighting: ~ Commands: ~ |[r| and |]r| to move the cursor to previous/next rare word - +|:pbuffer| Edit buffer [N] from the buffer list in the preview + window Options: ~ @@ -41659,7 +41682,7 @@ Options: ~ popup 'findfunc' Vim function to obtain the results for a |:find| command -'msghistory' Max number of messages to remember +'messagesopt' configure |:messages| and |hit-enter| prompt 'winfixbuf' Keep buffer focused in a window 'tabclose' Which tab page to focus after closing a tab page 't_xo' Terminal uses XON/XOFF handshaking (e.g. vt420) @@ -41709,4 +41732,4 @@ features, but does not include runtime file changes (syntax, indent, ftplugin, documentation, etc.) - vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual: + vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual:nofoldenable diff --git a/usr/share/vim/vim91/doc/vietnamese.txt b/usr/share/vim/vim91/doc/vietnamese.txt new file mode 100644 index 00000000000..ff4f4641cf4 --- /dev/null +++ b/usr/share/vim/vim91/doc/vietnamese.txt @@ -0,0 +1,82 @@ +*vietnamese.txt* For Vim version 9.1. Last change: 2024 Dec 04 + + + VIM REFERENCE MANUAL by Phạm Bình An + + +Vietnamese language support in Vim *vietnamese* *Vietnamese* + +1. Introduction |vietnamese-intro| +2. Vietnamese keymaps |vietnamese-keymap| +3. Localization |vietnamese-l10n| + +=============================================================================== +1. Introduction + *vietnamese-intro* +Vim supports Vietnamese language in the following ways: + +- Built-in |vietnamese-keymap|, which allows you to type Vietnamese characters + in |Insert-mode| and |search-commands| using US keyboard layout. +- Localization in Vietnamese. See |vietnamese-l10n| + +=============================================================================== +2. Vietnamese keymaps + *vietnamese-keymap* +To switch between languages you can use your system native keyboard switcher, +or use one of the Vietnamese keymaps included in the Vim distribution, like +below > + :set keymap=vietnamese-telex_utf-8 +< +See |'keymap'| for more information. + +In the latter case, you can type Vietnamese even if you do not have a +Vietnamese input method engine (IME) or you want Vim to be independent from a +system-wide keyboard settings (when |'imdisable'| is set). You can also |:map| +a key to switch between keyboards. + +Vim comes with the following Vietnamese keymaps: +- *vietnamese-telex_utf-8* Telex input method, |UTF-8| encoding. +- *vietnamese-viqr_utf-8* VIQR input method, |UTF-8| encoding. +- *vietnamese-vni_utf-8* VNI input method, |UTF-8| encoding. + + *vietnamese-ime_diff* +Since these keymaps were designed to be minimalistic, they do not support all +features of the corresponding input methods. The differences are described +below: + +- You can only type each character individually, entering the base letter first + and then the diacritics later. For example, to type the word `nến` using + |vietnamese-vni_utf-8|, you must type `ne61n`, not `nen61` or `ne6n1` +- For characters with more than 1 diacritic, you need to type vowel mark before + tone mark. For example, to type `ồ` using |vietnamese-telex_utf-8|, you need + to type `oof`, not `ofo`. +- With |vietnamese-telex_utf-8|, you need to type all uppercase letters to + produce uppercase characters with diacritics. For example, `Ừ` must be typed + as `UWF`. +- With |vietnamese-telex_utf-8|, the escape character `\` from VNI is added, + hence the confusing `ooo` input to type `oo` is removed, which could lead to + ambiguities. For example, to type the word `Đoòng`, you would type + `DDo\ofng`. +- Simple Telex (both v1 and v2), including the `w[]{}` style, is not + supported. +- Removing diacritics using `z` in Telex or `0` in VNI and VIQR is not supported. + +=============================================================================== +3. Localization + *vietnamese-l10n* +Vim |messages| are also available in Vietnamese. If you wish to see messages +in Vietnamese, you can run the command |:language| with an argument being the +name of the Vietnamese locale. For example, > + :language vi_VN +< or > + :language vi_VN.utf-8 +< +Note that the name of the Vietnamese locale may vary depending on your system. +See |mbyte-first| for details. + +|vimtutor| is also available in Vietnamese. To start Vimtutor in Vietnamese, +run the following command in terminal: > + vimtutor vi +< +=============================================================================== +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/usr/share/vim/vim91/doc/vim9.txt b/usr/share/vim/vim91/doc/vim9.txt index 68e5d997ff9..a978ea36930 100644 --- a/usr/share/vim/vim91/doc/vim9.txt +++ b/usr/share/vim/vim91/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 9.1. Last change: 2024 May 31 +*vim9.txt* For Vim version 9.1. Last change: 2024 Dec 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -193,7 +193,7 @@ created yet. In this case you can call `execute()` to invoke it at runtime. > "closure". A `:def` function always aborts on an error (unless `:silent!` was used for the command or the error was caught a `:try` block), does not get a range passed, cannot be a "dict" function, and can always be a closure. - *vim9-no-dict-function* + *vim9-no-dict-function* *E1182* You can use a Vim9 Class (|Vim9-class|) instead of a "dict function". You can also pass the dictionary explicitly: > def DictFunc(self: dict, arg: string) diff --git a/usr/share/vim/vim91/doc/vim9class.txt b/usr/share/vim/vim91/doc/vim9class.txt index a06c2c6e082..9aab6c74a06 100644 --- a/usr/share/vim/vim91/doc/vim9class.txt +++ b/usr/share/vim/vim91/doc/vim9class.txt @@ -1,4 +1,4 @@ -*vim9class.txt* For Vim version 9.1. Last change: 2024 Nov 11 +*vim9class.txt* For Vim version 9.1. Last change: 2024 Dec 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -951,11 +951,11 @@ aliased: > *enum* *E1418* *E1419* *E1420* An enum is a type that can have one of a list of values. Example: > - :enum Color + enum Color White, Red, Green, Blue, Black - :endenum + endenum < *enumvalue* *E1422* The enum values are separated by commas. More than one enum value can be diff --git a/usr/share/vim/vim91/doc/windows.txt b/usr/share/vim/vim91/doc/windows.txt index 915db37e9ee..db24e519160 100644 --- a/usr/share/vim/vim91/doc/windows.txt +++ b/usr/share/vim/vim91/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 9.1. Last change: 2024 Sep 08 +*windows.txt* For Vim version 9.1. Last change: 2025 Jan 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -968,8 +968,8 @@ A few peculiarities: trigger the ATTENTION and responding "A" for Abort, the preview window will become empty. - *:pta* *:ptag* -:pta[g][!] [tagname] + *:pt* *:ptag* +:pt[ag][!] [tagname] Does ":tag[!] [tagname]" and shows the found tag in a "Preview" window without changing the current buffer or cursor position. If a "Preview" window already exists, it is re-used @@ -1005,6 +1005,16 @@ CTRL-W g } *CTRL-W_g}* it. Make the new Preview window (if required) N high. If N is not given, 'previewheight' is used. + *:pb* *:pbuffer* +:[N]pb[uffer][!] [+cmd] [N] + Edit buffer [N] from the buffer list in the preview window. + If [N] is not given, the current buffer remains being edited. + See |:buffer-!| for [!]. This will also edit a buffer that is + not in the buffer list, without setting the 'buflisted' flag. + The notation with single quotes does not work here, + `:pbuffer 12'345'` uses 12'345' as a buffer name. + Also see |+cmd|. + *:ped* *:pedit* :ped[it][!] [++opt] [+cmd] {file} Edit {file} in the preview window. The preview window is @@ -1012,6 +1022,8 @@ CTRL-W g } *CTRL-W_g}* position isn't changed. Useful example: > :pedit +/fputc /usr/include/stdio.h < + Also see |++opt| and |+cmd|. + *:ps* *:psearch* :[range]ps[earch][!] [count] [/]pattern[/] Works like |:ijump| but shows the found match in the preview @@ -1269,7 +1281,7 @@ list of buffers. |unlisted-buffer| [!]. This will also edit a buffer that is not in the buffer list, without setting the 'buflisted' flag. The notation with single quotes does not work here, - `:buf 12'345'` uses 12'345 as a buffer name. + `:buf 12'345'` uses 12'345' as a buffer name. Also see |+cmd|. :[N]b[uffer][!] [+cmd] {bufname} *{bufname}* diff --git a/usr/share/vim/vim91/filetype.vim b/usr/share/vim/vim91/filetype.vim index 0c51bb09a11..49e63ab7824 100644 --- a/usr/share/vim/vim91/filetype.vim +++ b/usr/share/vim/vim91/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: The Vim Project -" Last Change: 2024 May 31 +" Last Change: 2025 Jan 08 " Former Maintainer: Bram Moolenaar " Listen very carefully, I will say this only once @@ -183,8 +183,15 @@ au BufNewFile,BufRead *.demo,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima " Assembly (all kinds) " *.lst is not pure assembly, it has two extra columns (address, byte codes) +" *.[sS], *.[aA] usually Assembly - GNU au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm() +" Assembly - Netwide +au BufNewFile,BufRead *.nasm setf nasm + +" Assembly - Microsoft +au BufNewFile,BufRead *.masm setf masm + " Assembly - Macro (VAX) au BufNewFile,BufRead *.mar setf vmasm @@ -233,9 +240,17 @@ au BufNewFile,BufRead *.fb setf freebasic " Batch file for MSDOS. See dist#ft#FTsys for *.sys au BufNewFile,BufRead *.bat setf dosbatch -" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. +" *.cmd is close to a Batch file, but on OS/2 Rexx files and TI linker command files also use *.cmd. +" lnk: `/* comment */`, `// comment`, and `--linker-option=value` +" rexx: `/* comment */`, `-- comment` au BufNewFile,BufRead *.cmd - \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif + \ if join(getline(1, 20), "\n") =~ 'MEMORY\|SECTIONS\|\%(^\|\n\)--\S\|\%(^\|\n\)//' + \| setf lnk + \| elseif getline(1) =~ '^/\*' + \| setf rexx + \| else + \| setf dosbatch + \| endif " ABB RAPID or Batch file for MSDOS. au BufNewFile,BufRead *.sys call dist#ft#FTsys() if has("fname_case") @@ -311,6 +326,9 @@ au BufNewFile,BufRead */.bundle/config setf yaml au BufNewFile,BufRead *.c call dist#ft#FTlpc() au BufNewFile,BufRead *.lpc,*.ulpc setf lpc +" C3 +au BufNewFile,BufRead *.c3,*.c3i,*.c3t setf c3 + " Cairo au BufNewFile,BufRead *.cairo setf cairo @@ -324,7 +342,7 @@ au BufNewFile,BufRead *.capnp setf capnp au BufNewFile,BufRead cgdbrc setf cgdbrc " C# -au BufNewFile,BufRead *.cs,*.csx setf cs +au BufNewFile,BufRead *.cs,*.csx,*.cake setf cs " CSDL au BufNewFile,BufRead *.csdl setf csdl @@ -449,6 +467,9 @@ au BufNewFile,BufRead .clang-format setf yaml " Clang-tidy au BufNewFile,BufRead .clang-tidy setf yaml +" Conda configuration file +au BufNewFile,BufRead .condarc,condarc setf yaml + " Matplotlib au BufNewFile,BufRead *.mplstyle,matplotlibrc setf yaml @@ -643,9 +664,9 @@ au BufNewFile,BufRead *.dfy setf dafny au BufRead,BufNewfile *.dart,*.drt setf dart " Debian Control -au BufNewFile,BufRead */debian/control setf debcontrol +au BufNewFile,BufRead */{debian,DEBIAN}/control setf debcontrol au BufNewFile,BufRead control - \ if getline(1) =~ '^Source:' + \ if getline(1) =~ '^Source:\|^Package:' \| setf debcontrol \| endif @@ -831,7 +852,7 @@ au BufNewFile,BufRead *.fan,*.fwt setf fan au BufNewFile,BufRead *.factor setf factor " Fennel -autocmd BufRead,BufNewFile *.fnl setf fennel +autocmd BufRead,BufNewFile *.fnl,{,.}fennelrc setf fennel " Fetchmail RC file au BufNewFile,BufRead .fetchmailrc setf fetchmail @@ -1065,6 +1086,9 @@ au BufRead,BufNewFile *.hws setf hollywood " Hoon au BufRead,BufNewFile *.hoon setf hoon +" TI Code Composer Studio General Extension Language +au BufNewFile,BufRead *.gel setf gel + " Tilde (must be before HTML) au BufNewFile,BufRead *.t.html setf tilde @@ -1096,11 +1120,14 @@ au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess " Hurl au BufRead,BufNewFile *.hurl setf hurl +" Hy +au BufRead,BufNewFile *.hy,.hy-history setf hy + " Hyper Builder au BufNewFile,BufRead *.hb setf hb -" Hyprlang -au BufNewFile,BufRead hypr\(land\|paper\|idle\|lock\).conf setf hyprlang +" Hyprland Configuration language +au BufNewFile,BufRead */hypr/*.conf,hypr\(land\|paper\|idle\|lock\).conf setf hyprlang " Httest au BufNewFile,BufRead *.htt,*.htb setf httest @@ -1187,7 +1214,7 @@ au BufNewFile,BufRead *.jpl,*.jpr setf jam au BufNewFile,BufRead *.janet setf janet " Java -au BufNewFile,BufRead *.java,*.jav setf java +au BufNewFile,BufRead *.java,*.jav,*.jsh setf java " JavaCC au BufNewFile,BufRead *.jj,*.jjt setf javacc @@ -1217,7 +1244,7 @@ au BufNewFile,BufRead *.jgr setf jgraph au BufNewFile,BufRead *.jinja setf jinja " Jujutsu -au BufNewFile,BufRead *.jjdescription setf jj +au BufNewFile,BufRead *.jjdescription setf jjdescription " Jovial au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial @@ -1244,7 +1271,7 @@ au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace s au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock setf json " JSONC (JSON with comments) -au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc +au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc,bun.lock setf jsonc au BufNewFile,BufRead .jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json setf jsonc " JSON @@ -1262,6 +1289,12 @@ au BufNewFile,BufRead *.jl setf julia " Just au BufNewFile,BufRead [jJ]ustfile,.justfile,*.just setf just +" KAREL +au BufNewFile,BufRead *.kl setf karel +if has("fname_case") + au BufNewFile,BufRead *.KL setf karel +endif + " KDL au BufNewFile,BufRead *.kdl setf kdl @@ -1296,6 +1329,9 @@ au BufNewFile,BufRead Kconfig,Kconfig.debug,Config.in setf kconfig " Lace (ISE) au BufNewFile,BufRead *.ace,*.ACE setf lace +" Lalrpop +au BufNewFile,Bufread *.lalrpop setf lalrpop + " Larch Shared Language au BufNewFile,BufRead .lsl call dist#ft#FTlsl() @@ -1359,14 +1395,17 @@ au BufNewFile,BufRead lilo.conf setf lilo " Lilypond au BufNewFile,BufRead *.ly,*.ily setf lilypond -" Lisp (*.el = ELisp, *.cl = Common Lisp) +" Lisp (*.el = ELisp) " *.jl was removed, it's also used for Julia, better skip than guess wrong. if has("fname_case") - au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp + au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.L,.emacs,.sawfishrc setf lisp else - au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp + au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,.emacs,.sawfishrc setf lisp endif +" *.cl = Common Lisp or OpenCL +au BufNewFile,BufRead *.cl call dist#ft#FTcl() + " SBCL implementation of Common Lisp au BufNewFile,BufRead sbclrc,.sbclrc setf lisp @@ -1462,7 +1501,12 @@ au BufNewFile,BufRead */etc/man.conf,man.config setf manconf au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple " Map (UMN mapserver config file) -au BufNewFile,BufRead *.map setf map +au BufNewFile,BufRead *.map + \ if getline(1) =~ '^\*\+$' | + \ setf lnkmap | + \ else | + \ setf map | + \ endif " Markdown au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md @@ -1472,9 +1516,6 @@ au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md \ setf markdown | \ endif -" Org (Emacs' org-mode) -au BufNewFile,BufRead *.org setf org - " Mason (it used to include *.comp, are those Mason files?) au BufNewFile,BufRead *.mason,*.mhtml setf mason @@ -1726,7 +1767,7 @@ au BufNewFile,BufRead *.scad setf openscad " Oracle config file au BufNewFile,BufRead *.ora setf ora -" Org +" Org (Emacs' org-mode) au BufNewFile,BufRead *.org,*.org_archive setf org " Packet filter conf @@ -1854,6 +1895,9 @@ au BufNewFile,BufRead requires/*.txt setf requirements au BufNewFile,BufRead Pipfile setf toml au BufNewFile,BufRead Pipfile.lock setf json +" Pixi lock +au BufNewFile,BufRead pixi.lock setf yaml + " PL/1, PL/I au BufNewFile,BufRead *.pli,*.pl1 setf pli @@ -1964,6 +2008,10 @@ au BufNewFile,BufRead *.pk setf poke " Protocols au BufNewFile,BufRead */etc/protocols setf protocols +" Nvidia PTX (Parallel Thread Execution) +" See https://docs.nvidia.com/cuda/parallel-thread-execution/ +au BufNewFile,BufRead *.ptx setf ptx + " Purescript au BufNewFile,BufRead *.purs setf purescript @@ -1973,8 +2021,8 @@ au BufNewFile,BufRead MANIFEST.in setf pymanifest " Pyret au BufNewFile,BufRead *.arr setf pyret -" Pyrex -au BufNewFile,BufRead *.pyx,*.pxd setf pyrex +" Pyrex/Cython +au BufNewFile,BufRead *.pyx,*.pyx+,*.pxd,*.pxi setf pyrex " Python, Python Shell Startup and Python Stub Files " Quixote (Python-based web framework) @@ -2137,7 +2185,7 @@ au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby au BufNewFile,BufRead *.rs setf rust au BufNewFile,BufRead Cargo.lock,*/.cargo/config,*/.cargo/credentials setf toml -" S-lang (or shader language, or SmallLisp) +" S-lang au BufNewFile,BufRead *.sl setf slang " Sage @@ -2152,8 +2200,8 @@ au BufNewFile,BufRead *.sas setf sas " Sass au BufNewFile,BufRead *.sass setf sass -" Sather -au BufNewFile,BufRead *.sa setf sather +" Sather, TI linear assembly +au BufNewFile,BufRead *.sa call dist#ft#FTsa() " Scala au BufNewFile,BufRead *.scala setf scala @@ -2161,6 +2209,9 @@ au BufNewFile,BufRead *.scala setf scala " SBT - Scala Build Tool au BufNewFile,BufRead *.sbt setf sbt +" Slang Shading Language +au BufNewFile,BufRead *.slang setf shaderslang + " Slint au BufNewFile,BufRead *.slint setf slint @@ -2244,12 +2295,13 @@ au BufNewFile,BufRead *.decl,*.dcl,*.dec au BufNewFile,BufRead catalog setf catalog " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. -" Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually -" bash scripts. +" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts. " NOTE: Patterns ending in a star are further down, these have lower priority. -au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,.bash[_-]history,bash-fc[-.],*.ebuild,PKGBUILD*,*.install,*.bash,*.eclass,PKGBUILD,APKBUILD,*.bats,*.cygport call dist#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,.bash[_-]history,bash-fc[-.],*.ebuild,PKGBUILD*,*.install,*.bash,*.eclass,PKGBUILD,*.bats,*.cygport call dist#ft#SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh") au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env{rc,} call dist#ft#SetFileTypeSH(getline(1)) +" Alpine Linux APKBUILDs are actually POSIX sh scripts with special treatment. +au BufNewFile,BufRead APKBUILD setf apkbuild " Shell script (Arch Linux) or PHP file (Drupal) au BufNewFile,BufRead *.install @@ -2284,8 +2336,8 @@ au BufNewFile,BufRead *.zsh,*.zsh-theme,*.zunit setf zsh " Salt state files au BufNewFile,BufRead *.sls setf salt -" Scheme ("racket" patterns are now separate, see above) -au BufNewFile,BufRead *.scm,*.ss,*.sld setf scheme +" Scheme, Supertux configuration, Lips.js history ("racket" patterns are now separate, see above) +au BufNewFile,BufRead *.scm,*.ss,*.sld,*.stsg,*/supertux2/config,.lips_repl_history setf scheme " Screen RC au BufNewFile,BufRead .screenrc,screenrc setf screen @@ -2378,6 +2430,7 @@ au BufNewFile,BufRead *.ice setf slice " Microsoft Visual Studio Solution au BufNewFile,BufRead *.sln setf solution au BufNewFile,BufRead *.slnf setf json +au BufNewFile,BufRead *.slnx setf xml " Spice au BufNewFile,BufRead *.sp,*.spice setf spice @@ -2843,6 +2896,7 @@ au BufNewFile,BufRead */etc/xinetd.conf setf xinetd " Xilinx Vivado/Vitis project files and block design files au BufNewFile,BufRead *.xpr,*.xpfm,*.spfm,*.bxml,*.mmi setf xml au BufNewFile,BufRead *.bd,*.bda,*.xci setf json +au BufNewFile,BufRead *.mss setf mss " XS Perl extension interface language au BufNewFile,BufRead *.xs setf xs @@ -2873,6 +2927,9 @@ au BufNewFile,BufRead *.fsproj,*.fsproj.user setf xml " VBPROJ files are Visual Studio.NET's XML-based Visual Basic project config files au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml +" MSBUILD configuration files are also XML +au BufNewFile,BufRead Directory.Packages.props,Directory.Build.targets,Directory.Build.props setf xml + " Unison Language au BufNewFile,BufRead *.u,*.uu setf unison diff --git a/usr/share/vim/vim91/ftplugin/c3.vim b/usr/share/vim/vim91/ftplugin/c3.vim new file mode 100644 index 00000000000..6db665a03aa --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/c3.vim @@ -0,0 +1,14 @@ +" Vim filetype plugin +" Language: C3 +" Maintainer: Turiiya <34311583+ttytm@users.noreply.github.com> +" Last Change: 2024 Nov 24 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// +setl commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/usr/share/vim/vim91/ftplugin/dockerfile.vim b/usr/share/vim/vim91/ftplugin/dockerfile.vim index 2e3c447b595..e45bf4c1d86 100644 --- a/usr/share/vim/vim91/ftplugin/dockerfile.vim +++ b/usr/share/vim/vim91/ftplugin/dockerfile.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Dockerfile " Maintainer: Honza Pokorny -" Last Change: 2014 Aug 29 +" Last Change: 2024 Dec 20 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -11,6 +11,6 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl commentstring<" - setlocal commentstring=#\ %s + +let b:undo_ftplugin = "setl commentstring<" diff --git a/usr/share/vim/vim91/ftplugin/editorconfig.vim b/usr/share/vim/vim91/ftplugin/editorconfig.vim index 6d437351eb0..1693a95c0b3 100644 --- a/usr/share/vim/vim91/ftplugin/editorconfig.vim +++ b/usr/share/vim/vim91/ftplugin/editorconfig.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: EditorConfig " Maintainer: Riley Bruins -" Last Change: 2024 Jul 06 +" Last Change: 2025 Jan 10 if exists('b:did_ftplugin') finish @@ -10,4 +10,6 @@ let b:did_ftplugin = 1 setl comments=:#,:; commentstring=#\ %s -let b:undo_ftplugin = 'setl com< cms<' +setl omnifunc=syntaxcomplete#Complete + +let b:undo_ftplugin = 'setl com< cms< ofu<' diff --git a/usr/share/vim/vim91/ftplugin/gel.vim b/usr/share/vim/vim91/ftplugin/gel.vim new file mode 100644 index 00000000000..b1f4def2b87 --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/gel.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin file +" Language: TI Code Composer Studio General Extension Language +" Document: https://downloads.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html +" Maintainer: Wu, Zhenyu +" Last Change: 2024 Dec 25 + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// +setlocal commentstring=/*\ %s\ */ + +let b:undo_ftplugin = "setl commentstring< comments<" diff --git a/usr/share/vim/vim91/ftplugin/graphql.vim b/usr/share/vim/vim91/ftplugin/graphql.vim index 56f6e36e20b..1717ebf2ccc 100644 --- a/usr/share/vim/vim91/ftplugin/graphql.vim +++ b/usr/share/vim/vim91/ftplugin/graphql.vim @@ -1,13 +1,22 @@ " Vim filetype plugin " Language: graphql -" Maintainer: Riley Bruins -" Last Change: 2024 May 18 +" Maintainer: Jon Parise +" Filenames: *.graphql *.graphqls *.gql +" URL: https://github.com/jparise/vim-graphql +" License: MIT +" Last Change: 2024 Dec 21 if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 -setl comments=:# commentstring=#\ %s +setlocal comments=:# +setlocal commentstring=#\ %s +setlocal formatoptions-=t +setlocal iskeyword+=$,@-@ +setlocal softtabstop=2 +setlocal shiftwidth=2 +setlocal expandtab -let b:undo_ftplugin = 'setl com< cms<' +let b:undo_ftplugin = 'setlocal com< cms< fo< isk< sts< sw< et<' diff --git a/usr/share/vim/vim91/ftplugin/java.vim b/usr/share/vim/vim91/ftplugin/java.vim index 55b358374fc..cfd25bce6c2 100644 --- a/usr/share/vim/vim91/ftplugin/java.vim +++ b/usr/share/vim/vim91/ftplugin/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Dan Sharp " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2024 Sep 26 +" Last Change: 2024 Dec 25 " 2024 Jan 14 by Vim Project (browsefilter) " 2024 May 23 by Riley Bruins ('commentstring') @@ -90,10 +90,269 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") endif endif +"""" Support pre- and post-compiler actions for SpotBugs. +if (!empty(get(g:, 'spotbugs_properties', {})) || + \ !empty(get(b:, 'spotbugs_properties', {}))) && + \ filereadable($VIMRUNTIME . '/compiler/spotbugs.vim') + + function! s:SpotBugsGetProperty(name, default) abort + return get( + \ {s:spotbugs_properties_scope}spotbugs_properties, + \ a:name, + \ a:default) + endfunction + + function! s:SpotBugsHasProperty(name) abort + return has_key( + \ {s:spotbugs_properties_scope}spotbugs_properties, + \ a:name) + endfunction + + function! s:SpotBugsGetProperties() abort + return {s:spotbugs_properties_scope}spotbugs_properties + endfunction + + " Work around ":bar"s and ":autocmd"s. + function! JavaFileTypeExecuteActionOnce(cleanup_cmd, action_cmd) abort + try + execute a:cleanup_cmd + finally + execute a:action_cmd + endtry + endfunction + + if exists("b:spotbugs_properties") + let s:spotbugs_properties_scope = 'b:' + + " Merge global entries, if any, in buffer-local entries, favouring + " defined buffer-local ones. + call extend( + \ b:spotbugs_properties, + \ get(g:, 'spotbugs_properties', {}), + \ 'keep') + elseif exists("g:spotbugs_properties") + let s:spotbugs_properties_scope = 'g:' + endif + + let s:commands = {} + + for s:name in ['DefaultPreCompilerCommand', + \ 'DefaultPreCompilerTestCommand', + \ 'DefaultPostCompilerCommand'] + if s:SpotBugsHasProperty(s:name) + let s:commands[s:name] = remove( + \ s:SpotBugsGetProperties(), + \ s:name) + endif + endfor + + if s:SpotBugsHasProperty('compiler') + " XXX: Postpone loading the script until all state, if any, has been + " collected. + if !empty(s:commands) + let g:spotbugs#state = { + \ 'compiler': remove(s:SpotBugsGetProperties(), 'compiler'), + \ 'commands': copy(s:commands), + \ } + else + let g:spotbugs#state = { + \ 'compiler': remove(s:SpotBugsGetProperties(), 'compiler'), + \ } + endif + + " Merge default entries in global (or buffer-local) entries, favouring + " defined global (or buffer-local) ones. + call extend( + \ {s:spotbugs_properties_scope}spotbugs_properties, + \ spotbugs#DefaultProperties(), + \ 'keep') + elseif !empty(s:commands) + " XXX: Postpone loading the script until all state, if any, has been + " collected. + let g:spotbugs#state = {'commands': copy(s:commands)} + endif + + unlet s:commands s:name + let s:request = 0 + + if s:SpotBugsHasProperty('PostCompilerAction') + let s:request += 4 + endif + + if s:SpotBugsHasProperty('PreCompilerTestAction') + let s:dispatcher = printf('call call(%s, [])', + \ string(s:SpotBugsGetProperties().PreCompilerTestAction)) + let s:request += 2 + endif + + if s:SpotBugsHasProperty('PreCompilerAction') + let s:dispatcher = printf('call call(%s, [])', + \ string(s:SpotBugsGetProperties().PreCompilerAction)) + let s:request += 1 + endif + + " Adapt the tests for "s:FindClassFiles()" from "compiler/spotbugs.vim". + if (s:request == 3 || s:request == 7) && + \ (!empty(s:SpotBugsGetProperty('sourceDirPath', [])) && + \ !empty(s:SpotBugsGetProperty('classDirPath', [])) && + \ !empty(s:SpotBugsGetProperty('testSourceDirPath', [])) && + \ !empty(s:SpotBugsGetProperty('testClassDirPath', []))) + function! s:DispatchAction(paths_action_pairs) abort + let name = expand('%:p') + + for [paths, Action] in a:paths_action_pairs + for path in paths + if name =~# (path . '.\{-}\.java\=$') + call Action() + return + endif + endfor + endfor + endfunction + + let s:dir_cnt = min([ + \ len(s:SpotBugsGetProperties().sourceDirPath), + \ len(s:SpotBugsGetProperties().classDirPath)]) + let s:test_dir_cnt = min([ + \ len(s:SpotBugsGetProperties().testSourceDirPath), + \ len(s:SpotBugsGetProperties().testClassDirPath)]) + + " Do not break up path pairs with filtering! + let s:dispatcher = printf('call s:DispatchAction(%s)', + \ string([[s:SpotBugsGetProperties().sourceDirPath[0 : s:dir_cnt - 1], + \ s:SpotBugsGetProperties().PreCompilerAction], + \ [s:SpotBugsGetProperties().testSourceDirPath[0 : s:test_dir_cnt - 1], + \ s:SpotBugsGetProperties().PreCompilerTestAction]])) + unlet s:test_dir_cnt s:dir_cnt + endif + + if exists("s:dispatcher") + function! s:ExecuteActions(pre_action, post_action) abort + try + execute a:pre_action + catch /\ + silent! autocmd! java_spotbugs Syntax + + for s:action in s:actions + if has_key(s:action, 'once') + execute printf('autocmd java_spotbugs %s ' . + \ 'call JavaFileTypeExecuteActionOnce(%s, %s)', + \ s:action.event, + \ string(printf('autocmd! java_spotbugs %s ', + \ s:action.event)), + \ string(s:action.cmd)) + else + execute printf('autocmd java_spotbugs %s %s', + \ s:action.event, + \ s:action.cmd) + endif + endfor + + if s:SpotBugsHasProperty('PostCompilerActionExecutor') && + \ (s:request == 7 || s:request == 6 || + \ s:request == 5 || s:request == 4) + let s:augroup = s:SpotBugsGetProperty( + \ 'augroupForPostCompilerAction', + \ 'java_spotbugs_post') + let s:augroup = !empty(s:augroup) ? s:augroup : 'java_spotbugs_post' + + for s:candidate in ['java_spotbugs_post', s:augroup] + if !exists("#" . s:candidate) + execute printf('augroup %s | augroup END', s:candidate) + endif + endfor + + silent! autocmd! java_spotbugs_post User + + " Define a User ":autocmd" to define a once-only ShellCmdPost + " ":autocmd" that will invoke "PostCompilerActionExecutor" and let + " it decide whether to proceed with ":compiler spotbugs" etc.; and + " seek explicit synchronisation with ":doautocmd ShellCmdPost" by + " omitting "nested" for "java_spotbugs_post" and "java_spotbugs". + execute printf('autocmd java_spotbugs_post User ' . + \ 'call JavaFileTypeExecuteActionOnce(%s, %s)', + \ string(printf('autocmd! %s ShellCmdPost ', s:augroup)), + \ string(printf('autocmd %s ShellCmdPost ' . + \ 'call JavaFileTypeExecuteActionOnce(%s, %s)', + \ s:augroup, + \ string(printf('autocmd! %s ShellCmdPost ', s:augroup)), + \ string(printf('call call(%s, [%s])', + \ string(s:SpotBugsGetProperties().PostCompilerActionExecutor), + \ string(printf('compiler spotbugs | call call(%s, [])', + \ string(s:SpotBugsGetProperties().PostCompilerAction)))))))) + endif + + unlet! s:candidate s:augroup s:action s:actions s:idx s:dispatcher + endif + + delfunction s:SpotBugsGetProperties + delfunction s:SpotBugsHasProperty + delfunction s:SpotBugsGetProperty + unlet! s:request s:spotbugs_properties_scope +endif + +function! JavaFileTypeCleanUp() abort + setlocal suffixes< suffixesadd< formatoptions< comments< commentstring< path< includeexpr< + unlet! b:browsefilter + + " The concatenated ":autocmd" removals may be misparsed as an ":autocmd". + " A _once-only_ ShellCmdPost ":autocmd" is always a call-site definition. + silent! autocmd! java_spotbugs User + silent! autocmd! java_spotbugs Syntax + silent! autocmd! java_spotbugs_post User +endfunction + " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" . - \ " formatoptions< comments< commentstring< path< includeexpr<" . - \ " | unlet! b:browsefilter" +let b:undo_ftplugin = 'call JavaFileTypeCleanUp() | delfunction JavaFileTypeCleanUp' " See ":help vim9-mix". if !has("vim9script") @@ -114,6 +373,21 @@ if exists("s:zip_func_upgradable") setlocal suffixesadd< endif +if exists("*s:DispatchAction") + def! s:DispatchAction(paths_action_pairs: list>) + const name: string = expand('%:p') + + for [paths: list, Action: func: any] in paths_action_pairs + for path in paths + if name =~# (path .. '.\{-}\.java\=$') + Action() + return + endif + endfor + endfor + enddef +endif + " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo diff --git a/usr/share/vim/vim91/ftplugin/jj.vim b/usr/share/vim/vim91/ftplugin/jjdescription.vim similarity index 100% rename from usr/share/vim/vim91/ftplugin/jj.vim rename to usr/share/vim/vim91/ftplugin/jjdescription.vim diff --git a/usr/share/vim/vim91/ftplugin/karel.vim b/usr/share/vim/vim91/ftplugin/karel.vim new file mode 100644 index 00000000000..8ccc2b32ceb --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/karel.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: KAREL +" Last Change: 2024-11-18 +" Maintainer: Kirill Morozov +" Credits: Patrick Meiser-Knosowski for the initial implementation. + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=:-- +setlocal commentstring=--\ %s +setlocal suffixesadd+=.kl,.KL + +let b:undo_ftplugin = "setlocal com< cms< sua<" diff --git a/usr/share/vim/vim91/ftplugin/lnk.vim b/usr/share/vim/vim91/ftplugin/lnk.vim new file mode 100644 index 00000000000..8b280d98365 --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/lnk.vim @@ -0,0 +1,14 @@ +" Vim filetype plugin file +" Language: TI linker command file +" Document: https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html +" Maintainer: Wu, Zhenyu +" Last Change: 2024 Dec 31 + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// +setlocal commentstring=/*\ %s\ */ +setlocal iskeyword+=. + +let b:undo_ftplugin = "setl commentstring< comments< iskeyword<" diff --git a/usr/share/vim/vim91/ftplugin/lnkmap.vim b/usr/share/vim/vim91/ftplugin/lnkmap.vim new file mode 100644 index 00000000000..46fb070e71d --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/lnkmap.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: TI Linker map +" Document: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html +" Maintainer: Wu, Zhenyu +" Last Change: 2024 Dec 25 + +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl iskeyword<" + +setl iskeyword+=. diff --git a/usr/share/vim/vim91/ftplugin/lua.vim b/usr/share/vim/vim91/ftplugin/lua.vim index 80cbba78a23..22b99862741 100644 --- a/usr/share/vim/vim91/ftplugin/lua.vim +++ b/usr/share/vim/vim91/ftplugin/lua.vim @@ -5,7 +5,7 @@ " Contributor: Dorai Sitaram " C.D. MacEachern " Tyler Miller -" Last Change: 2024 Jan 14 +" Last Change: 2024 Dec 03 if exists("b:did_ftplugin") finish @@ -48,6 +48,64 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:undo_ftplugin ..= " | unlet! b:browsefilter" endif +if has("folding") && get(g:, "lua_folding", 0) + setlocal foldmethod=expr + setlocal foldexpr=LuaFold(v:lnum) + let b:lua_lasttick = -1 + let b:undo_ftplugin ..= "|setl foldexpr< foldmethod< | unlet! b:lua_lasttick b:lua_foldlists" +endif + + +" The rest of the file needs to be :sourced only once per Vim session +if exists('s:loaded_lua') || &cp + let &cpo = s:cpo_save + unlet s:cpo_save + finish +endif +let s:loaded_lua = 1 + +let s:patterns = [ + \ ['do', 'end'], + \ ['if\s+.+\s+then', 'end'], + \ ['repeat', 'until\s+.+'], + \ ['for\s+.+\s+do', 'end'], + \ ['while\s+.+\s+do', 'end'], + \ ['function.+', 'end'], + \ ['return\s+function.+', 'end'], + \ ['local\s+function\s+.+', 'end'], + \ ] + +function! LuaFold(lnum) abort + if b:lua_lasttick == b:changedtick + return b:lua_foldlists[a:lnum-1] + endif + let b:lua_lasttick = b:changedtick + + let b:lua_foldlists = [] + let foldlist = [] + let buf = getline(1, '$') + for line in buf + for t in s:patterns + let tagopen = '\v^\s*'..t[0]..'\s*$' + let tagclose = '\v^\s*'..t[1]..'\s*$' + if line =~# tagopen + call add(foldlist, t) + break + elseif line =~# tagclose + if len(foldlist) > 0 && line =~# foldlist[-1][1] + call remove(foldlist, -1) + else + let foldlist = [] + endif + break + endif + endfor + call add(b:lua_foldlists, len(foldlist)) + endfor + + return lua_foldlists[a:lnum-1] +endfunction + let &cpo = s:cpo_save unlet s:cpo_save diff --git a/usr/share/vim/vim91/ftplugin/mss.vim b/usr/share/vim/vim91/ftplugin/mss.vim new file mode 100644 index 00000000000..de2f8791ec2 --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/mss.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: Vivado mss file +" Last Change: 2024 Oct 22 +" Document: https://docs.amd.com/r/2020.2-English/ug1400-vitis-embedded/Microprocessor-Software-Specification-MSS +" Maintainer: Wu, Zhenyu + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=b:#,fb:- +setlocal commentstring=#\ %s + +let b:match_words = '\:\' +let b:undo_ftplugin = "setl com< cms< | unlet b:match_words" diff --git a/usr/share/vim/vim91/ftplugin/opencl.vim b/usr/share/vim/vim91/ftplugin/opencl.vim new file mode 100644 index 00000000000..e8570fbe95d --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/opencl.vim @@ -0,0 +1,12 @@ +" Vim filetype plugin file +" Language: OpenCL +" Maintainer: Wu, Zhenyu +" Last Change: 2024 Nov 19 + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// +setlocal commentstring=/*\ %s\ */ define& include& + +let b:undo_ftplugin = "setl commentstring< comments<" diff --git a/usr/share/vim/vim91/ftplugin/proto.vim b/usr/share/vim/vim91/ftplugin/proto.vim new file mode 100644 index 00000000000..585f4461d33 --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/proto.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin +" Language: Protobuf +" Maintainer: David Pedersen +" Last Change: 2024 Dec 09 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setlocal formatoptions-=t formatoptions+=croql + +setlocal comments=s1:/*,mb:*,ex:*/,:// +setlocal commentstring=//\ %s + +let b:undo_ftplugin = "setlocal formatoptions< comments< commentstring<" + +" vim: sw=2 sts=2 et diff --git a/usr/share/vim/vim91/ftplugin/ptx.vim b/usr/share/vim/vim91/ftplugin/ptx.vim new file mode 100644 index 00000000000..12b127c8fc3 --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/ptx.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: Nvidia PTX (Parellel Thread Execution) +" Maintainer: Yinzuo Jiang +" Last Change: 2024-12-05 + +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 + +" Comments in PTX follow C/C++ syntax +" See: https://docs.nvidia.com/cuda/parallel-thread-execution/#syntax +setlocal commentstring=//\ %s + +let b:undo_ftplugin = 'setl commentstring<' diff --git a/usr/share/vim/vim91/ftplugin/python.vim b/usr/share/vim/vim91/ftplugin/python.vim index c000296726c..6f204688966 100644 --- a/usr/share/vim/vim91/ftplugin/python.vim +++ b/usr/share/vim/vim91/ftplugin/python.vim @@ -3,8 +3,9 @@ " Maintainer: Tom Picton " Previous Maintainer: James Sully " Previous Maintainer: Johannes Zellner -" Last Change: 2024/05/13 -" https://github.com/tpict/vim-ftplugin-python +" Repository: https://github.com/tpict/vim-ftplugin-python +" Last Change: 2024/05/13 +" 2024 Nov 30 use pytest compiler (#16130) if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 @@ -134,6 +135,11 @@ elseif executable('python') setlocal keywordprg=python\ -m\ pydoc endif +if expand('%:t') =~# '\v^test_.*\.py$|_test\.py$' && executable('pytest') + compiler pytest + let &l:makeprg .= ' %:S' +endif + " Script for filetype switching to undo the local stuff we may have changed let b:undo_ftplugin = 'setlocal cinkeys<' \ . '|setlocal comments<' @@ -148,6 +154,7 @@ let b:undo_ftplugin = 'setlocal cinkeys<' \ . '|setlocal softtabstop<' \ . '|setlocal suffixesadd<' \ . '|setlocal tabstop<' + \ . '|setlocal makeprg<' \ . '|silent! nunmap [M' \ . '|silent! nunmap [[' \ . '|silent! nunmap []' diff --git a/usr/share/vim/vim91/ftplugin/sh.vim b/usr/share/vim/vim91/ftplugin/sh.vim index 4c7695dcc6f..54ae73b6755 100644 --- a/usr/share/vim/vim91/ftplugin/sh.vim +++ b/usr/share/vim/vim91/ftplugin/sh.vim @@ -5,6 +5,7 @@ " Contributor: Enno Nagel " Eisuke Kawashima " Last Change: 2024 Sep 19 by Vim Project (compiler shellcheck) +" 2024 Dec 29 by Vim Project (improve setting shellcheck compiler) if exists("b:did_ftplugin") finish @@ -44,7 +45,11 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:undo_ftplugin ..= " | unlet! b:browsefilter" endif -if get(b:, "is_bash", 0) +let s:is_sh = get(b:, "is_sh", get(g:, "is_sh", 0)) +let s:is_bash = get(b:, "is_bash", get(g:, "is_bash", 0)) +let s:is_kornshell = get(b:, "is_kornshell", get(g:, "is_kornshell", 0)) + +if s:is_bash if exists(':terminal') == 2 command! -buffer -nargs=1 ShKeywordPrg silent exe ':term bash -c "help "" 2>/dev/null || man """' else @@ -52,14 +57,21 @@ if get(b:, "is_bash", 0) endif setlocal keywordprg=:ShKeywordPrg let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer ShKeywordPrg" +endif +if (s:is_sh || s:is_bash || s:is_kornshell) && executable('shellcheck') if !exists('current_compiler') compiler shellcheck + let b:undo_ftplugin ..= ' | compiler make' + endif +elseif s:is_bash + if !exists('current_compiler') + compiler bash + let b:undo_ftplugin ..= ' | compiler make' endif - let b:undo_ftplugin .= ' | compiler make' endif let &cpo = s:save_cpo -unlet s:save_cpo +unlet s:save_cpo s:is_sh s:is_bash s:is_kornshell " vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/usr/share/vim/vim91/ftplugin/shaderslang.vim b/usr/share/vim/vim91/ftplugin/shaderslang.vim new file mode 100644 index 00000000000..f3d1ab8c1cb --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/shaderslang.vim @@ -0,0 +1,54 @@ +" Vim filetype plugin file +" Language: Slang +" Maintainer: Austin Shijo +" Last Change: 2025 Jan 05 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Using line continuation here. +let s:cpo_save = &cpo +set cpo-=C + +let b:undo_ftplugin = "setl fo< com< cms< inc<" + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +" Set comment string (Slang uses C-style comments) +setlocal commentstring=//\ %s + +" Set 'comments' to format dashed lists in comments +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// + +" When the matchit plugin is loaded, this makes the % command skip parens and +" braces in comments properly, and adds support for shader-specific keywords +if exists("loaded_matchit") + " Add common shader control structures + let b:match_words = '{\|^\s*\<\(if\|for\|while\|switch\|struct\|class\)\>:}\|^\s*\,' .. + \ '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>,' .. + \ '\[:\]' + let b:match_skip = 's:comment\|string\|character\|special' + let b:match_ignorecase = 0 + let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words b:match_ignorecase" +endif + +" Win32 and GTK can filter files in the browse dialog +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Slang Source Files (*.slang)\t*.slang\n" + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" + endif + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/usr/share/vim/vim91/ftplugin/tiasm.vim b/usr/share/vim/vim91/ftplugin/tiasm.vim new file mode 100644 index 00000000000..13a3dc64f7c --- /dev/null +++ b/usr/share/vim/vim91/ftplugin/tiasm.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin file +" Language: TI linear assembly language +" Maintainer: Wu, Zhenyu +" Last Change: 2025 Jan 08 + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +setlocal comments=:; +setlocal commentstring=;\ %s + +let b:undo_ftplugin = "setl commentstring< comments<" + +if exists("loaded_matchit") + let b:match_words = '^\s\+\.if\>:^\s\+\.elseif:^\s\+\.else\>:^\s\+\.endif\>,^\s\+\.group:^\s\+\.gmember:^\s\+\.endgroup,^\s\+\.loop:^\s\+\.break:^\s\+\.endloop,^\s\+\.macro:^\s\+\.mexit:^\s\+\.endm,^\s\+\.asmfunc:^\s\+\.endasmfunc,^\s\+\.c\?struct:^\s\+\.endstruct,^\s\+\.c\?union:^\s\+\.endunion,^\s\+\.c\?proc:^\s\+\.return:^\s\+\.endproc' + let b:match_ignorecase = 1 + let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words" +endif diff --git a/usr/share/vim/vim91/ftplugin/typst.vim b/usr/share/vim/vim91/ftplugin/typst.vim index 3841e427f30..08929bbdbe0 100644 --- a/usr/share/vim/vim91/ftplugin/typst.vim +++ b/usr/share/vim/vim91/ftplugin/typst.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file " Language: Typst -" Maintainer: Gregory Anders -" Last Change: 2024 Oct 21 +" Previous Maintainer: Gregory Anders +" Maintainer: Luca Saccarola +" Last Change: 2024 Dec 09 " Based on: https://github.com/kaarmu/typst.vim if exists('b:did_ftplugin') @@ -11,10 +12,14 @@ let b:did_ftplugin = 1 setlocal commentstring=//\ %s setlocal comments=s1:/*,mb:*,ex:*/,:// -setlocal formatoptions+=croq +setlocal formatoptions+=croqn +" Numbered Lists +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +" Unordered (-), Ordered (+) and definition (/) Lists +setlocal formatlistpat+=\\\|^\\s*[-+/\]\\s\\+ setlocal suffixesadd=.typ -let b:undo_ftplugin = 'setl cms< com< fo< sua<' +let b:undo_ftplugin = 'setl cms< com< fo< flp< sua<' if get(g:, 'typst_conceal', 0) setlocal conceallevel=2 diff --git a/usr/share/vim/vim91/ftplugin/vim.vim b/usr/share/vim/vim91/ftplugin/vim.vim index 11c05d192b2..2c883a537a4 100644 --- a/usr/share/vim/vim91/ftplugin/vim.vim +++ b/usr/share/vim/vim91/ftplugin/vim.vim @@ -1,9 +1,9 @@ " Vim filetype plugin " Language: Vim " Maintainer: Doug Kearns -" Last Change: 2024 Apr 13 -" 2024 May 23 by Riley Bruins ('commentstring') +" Last Change: 2025 Jan 06 " Former Maintainer: Bram Moolenaar +" Contributors: Riley Bruins ('commentstring') " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -108,8 +108,8 @@ if exists("loaded_matchit") \ '\:\%(\%(^\||\)\s*\)\@<=\:\%(\%(^\||\)\s*\)\@<=\:\%(\%(^\||\)\s*\)\@<=\,' .. \ '\\)\@!\S:\,' .. \ '\:\,' .. - \ '\:\,' .. - \ '\:\,' + \ '\:\,' .. + \ '\:\' " Ignore syntax region commands and settings, any 'en*' would clobber " if-endif. diff --git a/usr/share/vim/vim91/indent/graphql.vim b/usr/share/vim/vim91/indent/graphql.vim new file mode 100644 index 00000000000..dc0769b9a81 --- /dev/null +++ b/usr/share/vim/vim91/indent/graphql.vim @@ -0,0 +1,92 @@ +" Vim indent file +" Language: graphql +" Maintainer: Jon Parise +" Filenames: *.graphql *.graphqls *.gql +" URL: https://github.com/jparise/vim-graphql +" License: MIT +" Last Change: 2024 Dec 21 + +" Set our local options if indentation hasn't already been set up. +" This generally means we've been detected as the primary filetype. +if !exists('b:did_indent') + setlocal autoindent + setlocal nocindent + setlocal nolisp + setlocal nosmartindent + + setlocal indentexpr=GetGraphQLIndent() + setlocal indentkeys=0{,0},0),0[,0],0#,!^F,o,O + + let b:did_indent = 1 +endif + +" If our indentation function already exists, we have nothing more to do. +if exists('*GetGraphQLIndent') + finish +endif + +let s:cpo_save = &cpoptions +set cpoptions&vim + +" searchpair() skip expression that matches in comments and strings. +let s:pair_skip_expr = + \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "comment\\|string"' + +" Check if the character at lnum:col is inside a string. +function s:InString(lnum, col) + return synIDattr(synID(a:lnum, a:col, 1), 'name') ==# 'graphqlString' +endfunction + +function GetGraphQLIndent() + " If this is the first non-blank line, we have nothing more to do because + " all of our indentation rules are based on matching against earlier lines. + let l:prevlnum = prevnonblank(v:lnum - 1) + if l:prevlnum == 0 + return 0 + endif + + " If the previous line isn't GraphQL, assume we're part of a template + " string and indent this new line within it. + let l:stack = map(synstack(l:prevlnum, 1), "synIDattr(v:val, 'name')") + if get(l:stack, -1) !~# '^graphql' + return indent(l:prevlnum) + shiftwidth() + endif + + let l:line = getline(v:lnum) + + " If this line contains just a closing bracket, find its matching opening + " bracket and indent the closing bracket to match. + let l:col = matchend(l:line, '^\s*[]})]') + if l:col > 0 && !s:InString(v:lnum, l:col) + call cursor(v:lnum, l:col) + + let l:bracket = l:line[l:col - 1] + if l:bracket ==# '}' + let l:matched = searchpair('{', '', '}', 'bW', s:pair_skip_expr) + elseif l:bracket ==# ']' + let l:matched = searchpair('\[', '', '\]', 'bW', s:pair_skip_expr) + elseif l:bracket ==# ')' + let l:matched = searchpair('(', '', ')', 'bW', s:pair_skip_expr) + else + let l:matched = -1 + endif + + return l:matched > 0 ? indent(l:matched) : virtcol('.') - 1 + endif + + " If we're inside of a multiline string, continue with the same indentation. + if s:InString(v:lnum, matchend(l:line, '^\s*') + 1) + return indent(v:lnum) + endif + + " If the previous line ended with an opening bracket, indent this line. + if getline(l:prevlnum) =~# '\%(#.*\)\@ -" Last Change: 2024-07-14 +" Previous Maintainer: Gregory Anders +" Maintainer: Luca Saccarola +" Last Change: 2024 Dec 09 " Based on: https://github.com/kaarmu/typst.vim if exists('b:did_indent') diff --git a/usr/share/vim/vim91/lang/menu_fi_fi.latin1.vim b/usr/share/vim/vim91/lang/menu_fi_fi.latin1.vim index 654b837fb99..3ad1066d440 100644 --- a/usr/share/vim/vim91/lang/menu_fi_fi.latin1.vim +++ b/usr/share/vim/vim91/lang/menu_fi_fi.latin1.vim @@ -1,6 +1,6 @@ " Menu Translations: Finnish " Maintainer: Flammie Pirinen -" Last Change: 2020 Apr 23 +" Last Change: 2024 Dec 23 " Original translations " Quit when menu translations have already been done. @@ -88,7 +88,7 @@ menutrans Toggle\ &Left\ Scrollbar Vasen\ &pystyvierityspalkki menutrans Toggle\ &Right\ Scrollbar Oikea\ pystyvie&rityspalkki let g:menutrans_path_dialog = "Anna tiedostojen hakupolku.\nErota hakemistot pilkuin." -let g:menutrans_tags_dialog = "Anna tgitiedostojen nimet.\nErota tidostot pilkuin." +let g:menutrans_tags_dialog = "Anna tgitiedostojen nimet.\nErota tiedostot pilkuin." menutrans F&ile\ Settings Tiedostoasetu&kset " Submenu: @@ -107,7 +107,7 @@ menutrans Te&xt\ Width\.\.\. Tekstinl&eveys\.\.\. menutrans &File\ Format\.\.\. Tiedosto&muoto\.\.\. let g:menutrans_textwidth_dialog = "Anna uusi tekstin leveys\n(0 poistaa kytst)" -let g:menutrans_fileformat_dialog = "Anaa tiedoston kirjoitusmuoto." +let g:menutrans_fileformat_dialog = "Anna tiedoston kirjoitusmuoto." let g:menutrans_fileformat_choices = " &Unix \n &Dos \n &Mac \n &Peru " menutrans C&olor\ Scheme &Vriteema diff --git a/usr/share/vim/vim91/lang/ru.cp1251/LC_MESSAGES/vim.mo b/usr/share/vim/vim91/lang/ru.cp1251/LC_MESSAGES/vim.mo index 46dde149d41..3367c011648 100644 Binary files a/usr/share/vim/vim91/lang/ru.cp1251/LC_MESSAGES/vim.mo and b/usr/share/vim/vim91/lang/ru.cp1251/LC_MESSAGES/vim.mo differ diff --git a/usr/share/vim/vim91/lang/ru/LC_MESSAGES/vim.mo b/usr/share/vim/vim91/lang/ru/LC_MESSAGES/vim.mo index 5f32489d4b7..b74faf45551 100644 Binary files a/usr/share/vim/vim91/lang/ru/LC_MESSAGES/vim.mo and b/usr/share/vim/vim91/lang/ru/LC_MESSAGES/vim.mo differ diff --git a/usr/share/vim/vim91/lang/sv/LC_MESSAGES/vim.mo b/usr/share/vim/vim91/lang/sv/LC_MESSAGES/vim.mo index 726c38a202f..b572b2adbcc 100644 Binary files a/usr/share/vim/vim91/lang/sv/LC_MESSAGES/vim.mo and b/usr/share/vim/vim91/lang/sv/LC_MESSAGES/vim.mo differ diff --git a/usr/share/vim/vim91/lang/vi/LC_MESSAGES/vim.mo b/usr/share/vim/vim91/lang/vi/LC_MESSAGES/vim.mo index e60969c0365..eb7428f7181 100644 Binary files a/usr/share/vim/vim91/lang/vi/LC_MESSAGES/vim.mo and b/usr/share/vim/vim91/lang/vi/LC_MESSAGES/vim.mo differ diff --git a/usr/share/vim/vim91/optwin.vim b/usr/share/vim/vim91/optwin.vim index c8170da71d0..2b12f55901f 100644 --- a/usr/share/vim/vim91/optwin.vim +++ b/usr/share/vim/vim91/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: The Vim Project -" Last Change: 2024 Jul 12 +" Last Change: 2024 Dec 07 " Former Maintainer: Bram Moolenaar " If there already is an option window, jump to that one. @@ -749,8 +749,8 @@ call AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show se call BinOptionG("terse", &terse) call AddOption("shortmess", gettext("list of flags to make messages shorter")) call OptionG("shm", &shm) -call AddOption("msghistory", gettext("how many messages are remembered")) -call append("$", " \tset mhi=" . &mhi) +call AddOption("messagesopt", gettext("options for outputting messages")) +call OptionG("mopt", &mopt) call AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'")) let &sc = s:old_sc call BinOptionG("sc", &sc) diff --git a/usr/share/vim/vim91/pack/dist/opt/helptoc/autoload/helptoc.vim b/usr/share/vim/vim91/pack/dist/opt/helptoc/autoload/helptoc.vim index 087da798e9f..c0d86a4e630 100644 --- a/usr/share/vim/vim91/pack/dist/opt/helptoc/autoload/helptoc.vim +++ b/usr/share/vim/vim91/pack/dist/opt/helptoc/autoload/helptoc.vim @@ -2,9 +2,20 @@ vim9script noclear # Config {{{1 -const SHELL_PROMPT: string = g: - ->get('helptoc', {}) - ->get('shell_prompt', '^\w\+@\w\+:\f\+\$\s') +var SHELL_PROMPT: string = '' + +def UpdateUserSettings() #{{{2 + var new_prompt: string = g: + ->get('helptoc', {}) + ->get('shell_prompt', '^\w\+@\w\+:\f\+\$\s') + if new_prompt != SHELL_PROMPT + SHELL_PROMPT = new_prompt + # invalidate cache: user config has changed + unlet! b:toc + endif +enddef + +UpdateUserSettings() # Init {{{1 @@ -141,6 +152,8 @@ export def Open() #{{{2 return endif + UpdateUserSettings() + # invalidate the cache if the buffer's contents has changed if exists('b:toc') && &filetype != 'man' if b:toc.changedtick != b:changedtick diff --git a/usr/share/vim/vim91/pack/dist/opt/termdebug/plugin/termdebug.vim b/usr/share/vim/vim91/pack/dist/opt/termdebug/plugin/termdebug.vim index 6f1f4b5227a..9fbf3b7f69e 100644 --- a/usr/share/vim/vim91/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/usr/share/vim/vim91/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -4,7 +4,7 @@ vim9script # Author: Bram Moolenaar # Copyright: Vim license applies, see ":help license" -# Last Change: 2024 Jul 04 +# Last Change: 2024 Nov 19 # Converted to Vim9: Ubaldo Tiberi # WORK IN PROGRESS - The basics works stable, more to come @@ -38,6 +38,11 @@ vim9script # The communication with gdb uses GDB/MI. See: # https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI.html +var DEBUG = false +if exists('g:termdebug_config') + DEBUG = get(g:termdebug_config, 'debug', false) +endif + def Echoerr(msg: string) echohl ErrorMsg | echom $'[termdebug] {msg}' | echohl None enddef @@ -49,7 +54,9 @@ enddef # Variables to keep their status among multiple instances of Termdebug # Avoid to source the script twice. if exists('g:termdebug_loaded') - Echoerr('Termdebug already loaded.') + if DEBUG + Echoerr('Termdebug already loaded.') + endif finish endif g:termdebug_loaded = true diff --git a/usr/share/vim/vim91/plugin/netrwPlugin.vim b/usr/share/vim/vim91/plugin/netrwPlugin.vim index 775b650e719..d534b36966a 100644 --- a/usr/share/vim/vim91/plugin/netrwPlugin.vim +++ b/usr/share/vim/vim91/plugin/netrwPlugin.vim @@ -1,12 +1,13 @@ " netrwPlugin.vim: Handles file transfer and remote directory listing across a network " PLUGIN SECTION -" Maintainer: This runtime file is looking for a new maintainer. -" Date: Sep 09, 2021 +" Maintainer: This runtime file is looking for a new maintainer. +" Date: Sep 09, 2021 " Last Change: " 2024 May 08 by Vim Project: cleanup legacy Win9X checks " 2024 Oct 27 by Vim Project: cleanup gx mapping " 2024 Oct 28 by Vim Project: further improvements " 2024 Oct 31 by Vim Project: use autoloaded functions +" 2024 Dec 19 by Vim Project: change style (#16248) " Former Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2021 Charles E. Campbell {{{1 @@ -24,7 +25,7 @@ " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- " Load Once: {{{1 if &cp || exists("g:loaded_netrwPlugin") - finish + finish endif let g:loaded_netrwPlugin = "v173" let s:keepcpo = &cpo @@ -40,71 +41,71 @@ command -complete=file -nargs=1 Open call netrw#Open(trim()) " " }}} " Local Browsing Autocmds: {{{2 augroup FileExplorer - au! - au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif - au BufEnter * sil call s:LocalBrowse(expand("")) - au VimEnter * sil call s:VimEnter(expand("")) - if has("win32") - au BufEnter .* sil call s:LocalBrowse(expand("")) - endif + au! + au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif + au BufEnter * sil call s:LocalBrowse(expand("")) + au VimEnter * sil call s:VimEnter(expand("")) + if has("win32") + au BufEnter .* sil call s:LocalBrowse(expand("")) + endif augroup END " Network Browsing Reading Writing: {{{2 augroup Network - au! - au BufReadCmd file://* call netrw#FileUrlEdit(expand("")) - au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand(""))|call netrw#Nread(2,expand(""))|exe "sil doau BufReadPost ".fnameescape(expand("")) - au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand(""))|call netrw#Nread(1,expand(""))|exe "sil doau FileReadPost ".fnameescape(expand("")) - au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand(""))|exe 'Nwrite '.fnameescape(expand(""))|exe "sil doau BufWritePost ".fnameescape(expand("")) - au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand(""))|exe "'[,']".'Nwrite '.fnameescape(expand(""))|exe "sil doau FileWritePost ".fnameescape(expand("")) - try - au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("")) - catch /^Vim\%((\a\+)\)\=:E216/ - au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("")) - endtry + au! + au BufReadCmd file://* call netrw#FileUrlEdit(expand("")) + au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand(""))|call netrw#Nread(2,expand(""))|exe "sil doau BufReadPost ".fnameescape(expand("")) + au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand(""))|call netrw#Nread(1,expand(""))|exe "sil doau FileReadPost ".fnameescape(expand("")) + au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand(""))|exe 'Nwrite '.fnameescape(expand(""))|exe "sil doau BufWritePost ".fnameescape(expand("")) + au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand(""))|exe "'[,']".'Nwrite '.fnameescape(expand(""))|exe "sil doau FileWritePost ".fnameescape(expand("")) + try + au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("")) + catch /^Vim\%((\a\+)\)\=:E216/ + au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("")) + endtry augroup END " Commands: :Nread, :Nwrite, :NetUserPass {{{2 -com! -count=1 -nargs=* Nread let s:svpos= winsaveview()call netrw#NetRead(,)call winrestview(s:svpos) -com! -range=% -nargs=* Nwrite let s:svpos= winsaveview(),call netrw#NetWrite()call winrestview(s:svpos) -com! -nargs=* NetUserPass call NetUserPass() -com! -nargs=* Nsource let s:svpos= winsaveview()call netrw#NetSource()call winrestview(s:svpos) -com! -nargs=? Ntree call netrw#SetTreetop(1,) +com! -count=1 -nargs=* Nread let s:svpos= winsaveview()call netrw#NetRead(,)call winrestview(s:svpos) +com! -range=% -nargs=* Nwrite let s:svpos= winsaveview(),call netrw#NetWrite()call winrestview(s:svpos) +com! -nargs=* NetUserPass call NetUserPass() +com! -nargs=* Nsource let s:svpos= winsaveview()call netrw#NetSource()call winrestview(s:svpos) +com! -nargs=? Ntree call netrw#SetTreetop(1,) " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2 -com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(,0,0+0,) -com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(,1,0+0,) -com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(,1,2+0,) -com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(,1,4+0,) -com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(,0,6 ,) -com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,) -com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,) -com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(,0,) +com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(,0,0+0,) +com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(,1,0+0,) +com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(,1,2+0,) +com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(,1,4+0,) +com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(,0,6 ,) +com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,) +com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,) +com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(,0,) " Commands: NetrwSettings {{{2 -com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings() -com! -bang NetrwClean call netrw#Clean(0) +com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings() +com! -bang NetrwClean call netrw#Clean(0) " Maps: if !exists("g:netrw_nogx") - if maparg('gx','n') == "" - if !hasmapto('NetrwBrowseX') - nmap gx NetrwBrowseX + if maparg('gx','n') == "" + if !hasmapto('NetrwBrowseX') + nmap gx NetrwBrowseX + endif + nno NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX())) endif - nno NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX())) - endif - if maparg('gx','x') == "" - if !hasmapto('NetrwBrowseXVis') - xmap gx NetrwBrowseXVis + if maparg('gx','x') == "" + if !hasmapto('NetrwBrowseXVis') + xmap gx NetrwBrowseXVis + endif + xno NetrwBrowseXVis :call netrw#BrowseXVis() endif - xno NetrwBrowseXVis :call netrw#BrowseXVis() - endif endif if exists("g:netrw_usetab") && g:netrw_usetab - if maparg('','n') == "" - nmap NetrwShrink - endif - nno NetrwShrink :call netrw#Shrink() + if maparg('','n') == "" + nmap NetrwShrink + endif + nno NetrwShrink :call netrw#Shrink() endif " --------------------------------------------------------------------- @@ -115,43 +116,43 @@ fun! s:LocalBrowse(dirname) " the DBG buffer are made. if !exists("s:vimentered") - " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will, - " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined. -" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)") -" call Dret("s:LocalBrowse") - return + " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will, + " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined. + " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)") + " call Dret("s:LocalBrowse") + return endif -" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")") + " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")") if has("amiga") - " The check against '' is made for the Amiga, where the empty - " string is the current directory and not checking would break - " things such as the help command. -" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)") - if a:dirname != '' && isdirectory(a:dirname) - sil! call netrw#LocalBrowseCheck(a:dirname) - if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt - exe w:netrw_bannercnt + " The check against '' is made for the Amiga, where the empty + " string is the current directory and not checking would break + " things such as the help command. + " call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)") + if a:dirname != '' && isdirectory(a:dirname) + sil! call netrw#LocalBrowseCheck(a:dirname) + if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt + exe w:netrw_bannercnt + endif endif - endif elseif isdirectory(a:dirname) -" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)") -" call Dredir("LocalBrowse ft last set: ","verbose set ft") - " Jul 13, 2021: for whatever reason, preceding the following call with - " a sil! causes an unbalanced if-endif vim error - call netrw#LocalBrowseCheck(a:dirname) - if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt - exe w:netrw_bannercnt - endif + " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)") + " call Dredir("LocalBrowse ft last set: ","verbose set ft") + " Jul 13, 2021: for whatever reason, preceding the following call with + " a sil! causes an unbalanced if-endif vim error + call netrw#LocalBrowseCheck(a:dirname) + if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt + exe w:netrw_bannercnt + endif else - " not a directory, ignore it -" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") + " not a directory, ignore it + " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") endif -" call Dret("s:LocalBrowse") + " call Dret("s:LocalBrowse") endfun " --------------------------------------------------------------------- @@ -162,72 +163,72 @@ endfun " It also sets s:vimentered, letting s:LocalBrowse() know that s:VimEnter() " has already been called. fun! s:VimEnter(dirname) -" call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">") + " call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">") if has('nvim') || v:version < 802 - " Johann Höchtl: reported that the call range... line causes an E488: Trailing characters - " error with neovim. I suspect its because neovim hasn't updated with recent - " vim patches. As is, this code will have problems with popup terminals - " instantiated before the VimEnter event runs. - " Ingo Karkat : E488 also in Vim 8.1.1602 - let curwin = winnr() - let s:vimentered = 1 - windo call s:LocalBrowse(expand("%:p")) - exe curwin."wincmd w" - else - " the following complicated expression comes courtesy of lacygoill; largely does the same thing as the windo and - " wincmd which are commented out, but avoids some side effects. Allows popup terminal before VimEnter. - let s:vimentered = 1 - call range(1, winnr('$'))->map({_, v -> win_execute(win_getid(v), 'call expand("%:p")->s:LocalBrowse()')}) - endif -" call Dret("s:VimEnter") + " Johann Höchtl: reported that the call range... line causes an E488: Trailing characters + " error with neovim. I suspect its because neovim hasn't updated with recent + " vim patches. As is, this code will have problems with popup terminals + " instantiated before the VimEnter event runs. + " Ingo Karkat : E488 also in Vim 8.1.1602 + let curwin = winnr() + let s:vimentered = 1 + windo call s:LocalBrowse(expand("%:p")) + exe curwin."wincmd w" + else + " the following complicated expression comes courtesy of lacygoill; largely does the same thing as the windo and + " wincmd which are commented out, but avoids some side effects. Allows popup terminal before VimEnter. + let s:vimentered = 1 + call range(1, winnr('$'))->map({_, v -> win_execute(win_getid(v), 'call expand("%:p")->s:LocalBrowse()')}) + endif + " call Dret("s:VimEnter") endfun " --------------------------------------------------------------------- " NetrwStatusLine: {{{1 fun! NetrwStatusLine() -" let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".") + " let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".") if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") - let &stl= s:netrw_explore_stl - if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif - if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif - return "" + let &stl= s:netrw_explore_stl + if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif + if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif + return "" else - return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen + return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen endif endfun " ------------------------------------------------------------------------ " NetUserPass: set username and password for subsequent ftp transfer {{{1 -" Usage: :call NetUserPass() -- will prompt for userid and password -" :call NetUserPass("uid") -- will prompt for password -" :call NetUserPass("uid","password") -- sets global userid and password +" Usage: :call NetUserPass() -- will prompt for userid and password +" :call NetUserPass("uid") -- will prompt for password +" :call NetUserPass("uid","password") -- sets global userid and password fun! NetUserPass(...) - " get/set userid - if a:0 == 0 -" call Dfunc("NetUserPass(a:0<".a:0.">)") - if !exists("g:netrw_uid") || g:netrw_uid == "" - " via prompt - let g:netrw_uid= input('Enter username: ') + " get/set userid + if a:0 == 0 + " call Dfunc("NetUserPass(a:0<".a:0.">)") + if !exists("g:netrw_uid") || g:netrw_uid == "" + " via prompt + let g:netrw_uid= input('Enter username: ') + endif + else " from command line + " call Dfunc("NetUserPass(a:1<".a:1.">) {") + let g:netrw_uid= a:1 + endif + + " get password + if a:0 <= 1 " via prompt + " call Decho("a:0=".a:0." case <=1:") + let g:netrw_passwd= inputsecret("Enter Password: ") + else " from command line + " call Decho("a:0=".a:0." case >1: a:2<".a:2.">") + let g:netrw_passwd=a:2 endif - else " from command line -" call Dfunc("NetUserPass(a:1<".a:1.">) {") - let g:netrw_uid= a:1 - endif - - " get password - if a:0 <= 1 " via prompt -" call Decho("a:0=".a:0." case <=1:") - let g:netrw_passwd= inputsecret("Enter Password: ") - else " from command line -" call Decho("a:0=".a:0." case >1: a:2<".a:2.">") - let g:netrw_passwd=a:2 - endif -" call Dret("NetUserPass") + " call Dret("NetUserPass") endfun " ------------------------------------------------------------------------ " Modelines And Restoration: {{{1 let &cpo= s:keepcpo unlet s:keepcpo -" vim:ts=8 fdm=marker +" vim:ts=8 sts=2 sw=2 et fdm=marker diff --git a/usr/share/vim/vim91/syntax/apache.vim b/usr/share/vim/vim91/syntax/apache.vim index e73045e4c82..65317fd36a1 100644 --- a/usr/share/vim/vim91/syntax/apache.vim +++ b/usr/share/vim/vim91/syntax/apache.vim @@ -3,8 +3,8 @@ " Maintainer: David Necas (Yeti) " License: This file can be redistribued and/or modified under the same terms " as Vim itself. -" Last Change: 2022 Apr 25 -" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported +" Last Change: 2024 Nov 24 +" Notes: Last synced with apache-2.4.62, version 1.x is no longer supported " TODO: see particular FIXME's scattered through the file " make it really linewise? " + add `display' where appropriate @@ -14,6 +14,7 @@ if exists("b:current_syntax") finish endif +syn iskeyword @,48-57,_,192-255,- syn case ignore " Base constructs @@ -45,9 +46,9 @@ syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH P " Added as suggested by Mikko Koivunalho syn keyword apacheMethodOption BASELINE-CONTROL CHECKIN CHECKOUT LABEL MERGE MKACTIVITY MKWORKSPACE REPORT UNCHECKOUT UPDATE VERSION-CONTROL contained syn case ignore -syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything +syn match apacheSection "<\/\=\(Directory\|Files\|If\|Else\|Location\|VirtualHost\)[^>]*>" contains=apacheAnything syn match apacheSection "<\/\=\(RequireAll\|RequireAny\|RequireNone\)>" contains=apacheAnything -syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError +syn match apacheLimitSection "<\/\=Limit[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError syn keyword apacheLimitSectionKeyword Limit LimitExcept contained syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue syn keyword apacheAuthTypeValue Basic Digest @@ -68,7 +69,7 @@ syn keyword apacheDeclaration AuthAuthoritative AuthGroupFile AuthUserFile syn keyword apacheDeclaration AuthBasicAuthoritative AuthBasicProvider syn keyword apacheDeclaration AuthDigestAlgorithm AuthDigestDomain AuthDigestNcCheck AuthDigestNonceFormat AuthDigestNonceLifetime AuthDigestProvider AuthDigestQop AuthDigestShmemSize syn keyword apacheOption none auth auth-int MD5 MD5-sess -syn match apacheSection "<\/\=\(]*>" contains=apacheAnything +syn match apacheSection "<\/\=Auth[ntz]ProviderAlias[^>]*>" contains=apacheAnything syn keyword apacheDeclaration Anonymous Anonymous_Authoritative Anonymous_LogEmail Anonymous_MustGiveEmail Anonymous_NoUserID Anonymous_VerifyEmail syn keyword apacheDeclaration AuthDBDUserPWQuery AuthDBDUserRealmQuery syn keyword apacheDeclaration AuthDBMGroupFile AuthDBMAuthoritative @@ -155,7 +156,7 @@ syn keyword apacheDeclaration PerlCleanupHandler PerlChildInitHandler PerlChildE syn keyword apacheDeclaration PerlRestartHandler PerlDispatchHandler syn keyword apacheDeclaration PerlFreshRestart PerlSendHeader syn keyword apacheDeclaration php_value php_flag php_admin_value php_admin_flag -syn match apacheSection "<\/\=\(Proxy\|ProxyMatch\)[^>]*>" contains=apacheAnything +syn match apacheSection "<\/\=\(Macro\|MDomain\|Proxy\)[^>]*>" contains=apacheAnything syn keyword apacheDeclaration AllowCONNECT NoProxy ProxyBadHeader ProxyBlock ProxyDomain ProxyErrorOverride ProxyIOBufferSize ProxyMaxForwards ProxyPass ProxyPassMatch ProxyPassReverse ProxyPassReverseCookieDomain ProxyPassReverseCookiePath ProxyPreserveHost ProxyReceiveBufferSize ProxyRemote ProxyRemoteMatch ProxyRequests ProxyTimeout ProxyVia syn keyword apacheDeclaration RewriteBase RewriteCond RewriteEngine RewriteLock RewriteLog RewriteLogLevel RewriteMap RewriteOptions RewriteRule syn keyword apacheOption inherit @@ -173,8 +174,8 @@ syn keyword apacheDeclaration SuexecUserGroup syn keyword apacheDeclaration UserDir syn keyword apacheDeclaration CookieDomain CookieExpires CookieName CookieStyle CookieTracking syn keyword apacheOption Netscape Cookie Cookie2 RFC2109 RFC2965 -syn match apacheSection "<\/\=\(]*>" contains=apacheAnything syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP +syn keyword apacheDeclaration AcceptErrorsNonFatal AsyncFilter AsyncRequestWorkerFactor AuthBasicFake AuthBasicUseDigestAlgorithm AuthBearerAuthoritative AuthBearerProvider AuthBearerProxy AuthDBMType AuthDBMUserFile AuthFormAuthoritative AuthFormBody AuthFormDisableNoStore AuthFormFakeBasicAuth AuthFormLocation AuthFormLoginRequiredLocation AuthFormLoginSuccessLocation AuthFormLogoutLocation AuthFormMethod AuthFormMimetype AuthFormPassword AuthFormProvider AuthFormSitePassphrase AuthFormSize AuthFormUsername AuthLDAPAuthorizePrefix AuthLDAPBindAuthoritative AuthLDAPCompareAsUser AuthLDAPInitialBindAsUser AuthLDAPInitialBindPattern AuthLDAPMaxSubGroupDepth AuthLDAPRemoteUserAttribute AuthLDAPSearchAsUser AuthLDAPSubGroupAttribute AuthLDAPSubGroupClass AuthLDAPURL AuthMerging AuthnCacheContext AuthnCacheEnable AuthnCacheProvideFor AuthnCacheSOCache AuthnCacheTimeout AuthnzFcgiCheckAuthnProvider AuthnzFcgiDefineProvider AuthtJwtClaim AuthtJwtDriver AuthtJwtSign AuthtJwtVerify AuthzDBDLoginToReferer AuthzDBDQuery AuthzDBDRedirectQuery AuthzSendForbiddenOnFailure BalancerGrowth BalancerInherit BalancerMember BalancerPersist BrotliAlterETag BrotliCompressionMaxInputBlock BrotliCompressionQuality BrotliCompressionWindow BrotliFilterNote BufferSize CacheDetailHeader CacheHeader CacheIgnoreQueryString CacheIgnoreURLSessionIdentifiers CacheKeyBaseURL CacheLock CacheLockMaxAge CacheLockPath CacheMinExpire CacheQuickHandler CacheReadSize CacheReadTime CacheSocache CacheSocacheMaxSize CacheSocacheMaxTime CacheSocacheMinTime CacheSocacheReadSize CacheSocacheReadTime CacheStaleOnError CacheStoreExpired CGIDScriptTimeout CGIPassAuth CGIScriptTimeout CGIVar CheckBasenameMatch ChrootDir CookieHTTPOnly CookieSameSite CookieSecure CryptoCipher CryptoDriver CryptoIV CryptoKey CryptoSize CTAuditStorage CTLogClient CTLogConfigDB CTMaxSCTAge CTProxyAwareness CTSCTStorage CTServerHelloSCTLimit CTStaticLogConfig CTStaticSCTs DBDInitSQL DefaultRuntimeDir DefaultStateDir DeflateAlterETag DeflateInflateLimitRequestBody DeflateInflateRatioBurst DeflateInflateRatioLimit DirectoryCheckHandler DTracePrivileges FallbackResource Files FilesMatch FirehoseConnectionInput FirehoseConnectionOutput FirehoseProxyConnectionInput FirehoseProxyConnectionOutput FirehoseRequestInput FirehoseRequestOutput FlushMaxPipelined FlushMaxThreshold GlobalLog GprofDir H2CopyFiles H2Direct H2EarlyHint H2EarlyHints H2MaxDataFrameLen H2MaxSessionStreams H2MaxWorkerIdleSeconds H2MaxWorkers H2MinWorkers H2ModernTLSOnly H2OutputBuffering H2Padding H2ProxyRequests H2Push H2PushDiarySize H2PushPriority H2PushResource H2SerializeHeaders H2StreamMaxMemSize H2StreamTimeout H2TLSCoolDownSecs H2TLSWarmUpSize H2Upgrade H2WebSockets H2WindowSize HeartbeatAddress HeartbeatListen HeartbeatMaxServers HeartbeatStorage HeartbeatStorage HostnameLookups HttpProtocolOptions IndexForbiddenReturn404 IndexHeadInsert InputSed ISAPIFakeAsync KeptBodySize LDAPConnectionPoolTTL LDAPLibraryDebug LDAPReferralHopLimit LDAPReferrals LDAPRetries LDAPRetryDelay LDAPTimeout Location LocationMatch LogIOTrackTTFB LogIOTrackTTFU LogMessage LuaAuthzProvider LuaCodeCache LuaHookAccessChecker LuaHookAuthChecker LuaHookCheckUserID LuaHookFixups LuaHookInsertFilter LuaHookLog LuaHookMapToStorage LuaHookPreTranslate LuaHookTranslateName LuaHookTypeChecker LuaInherit LuaInputFilter LuaMapHandler LuaOutputFilter LuaPackageCPath LuaPackagePath LuaQuickHandler LuaRoot LuaScope MacroIgnoreBadNesting MacroIgnoreEmptyArgs MaxConnectionsPerChild MaxRangeOverlaps MaxRangeReversals MaxRanges MaxRequestWorkers MDActivationDelay MDBaseServer MDCAChallenges MDCertificateAgreement MDCertificateAuthority MDCertificateCheck MDCertificateFile MDCertificateKeyFile MDCertificateMonitor MDCertificateProtocol MDCertificateStatus MDChallengeDns01 MDChallengeDns01Version MDCheckInterval MDContactEmail MDDriveMode MDExternalAccountBinding MDHttpProxy MDMatchNames MDMember MDMembers MDMessageCmd MDMustStaple MDNotifyCmd MDomain MDPortMap MDPrivateKeys MDRenewMode MDRenewWindow MDRequireHttps MDRetryDelay MDRetryFailover MDServerStatus MDStapleOthers MDStapling MDStaplingKeepResponse MDStaplingRenewWindow MDStoreDir MDStoreLocks MDWarnWindow MemcacheConnTTL MergeSlashes MergeTrailers MimeOptions ModemStandard Mutex Order OutputSed PolicyConditional PolicyConditionalURL PolicyEnvironment PolicyFilter PolicyKeepalive PolicyKeepaliveURL PolicyLength PolicyLengthURL PolicyMaxage PolicyMaxageURL PolicyNocache PolicyNocacheURL PolicyType PolicyTypeURL PolicyValidation PolicyValidationURL PolicyVary PolicyVaryURL PolicyVersion PolicyVersionURL PrivilegesMode Protocol Protocols ProtocolsHonorOrder Proxy100Continue ProxyAddHeaders ProxyExpressDBMFile ProxyExpressDBMType ProxyExpressEnable ProxyFCGIBackendType ProxyFCGISetEnvIf ProxyFtpDirCharset ProxyFtpEscapeWildcards ProxyFtpListOnWildcard ProxyHCExpr ProxyHCTemplate ProxyHCTPsize ProxyHTMLBufSize ProxyHTMLCharsetOut ProxyHTMLDocType ProxyHTMLEnable ProxyHTMLEvents ProxyHTMLExtended ProxyHTMLFixups ProxyHTMLInterp ProxyHTMLLinks ProxyHTMLMeta ProxyHTMLStripComments ProxyHTMLURLMap ProxySCGIInternalRedirect ProxySCGISendfile ProxySet ProxySourceAddress ProxyStatus ProxyWebsocketAsync ProxyWebsocketAsyncDelay ProxyWebsocketFallbackToProxyHttp ProxyWebsocketIdleTimeout QualifyRedirectURL ReadBufferSize ReceiveBufferSize RedisConnPoolTTL RedisTimeout ReflectorHeader RegexDefaultOptions RegisterHttpMethod RemoteIPHeader RemoteIPInternalProxy RemoteIPInternalProxyList RemoteIPProxiesHeader RemoteIPProxyProtocol RemoteIPProxyProtocolExceptions RemoteIPTrustedProxy RemoteIPTrustedProxyList RemoveLanguage RequestReadTimeout SeeRequestTail Session SessionCookieMaxAge SessionCookieName SessionCookieName2 SessionCookieRemove SessionCryptoCipher SessionCryptoDriver SessionCryptoPassphrase SessionCryptoPassphraseFile SessionDBDCookieName SessionDBDCookieName2 SessionDBDCookieRemove SessionDBDDeleteLabel SessionDBDInsertLabel SessionDBDPerUser SessionDBDSelectLabel SessionDBDUpdateLabel SessionEnv SessionExclude SessionExpiryUpdateInterval SessionHeader SessionInclude SessionMaxAge SSIETag SSILastModified SSILegacyExprParser SSLCARevocationCheck SSLClientHelloVars SSLOCSPDefaultResponder SSLOCSPEnable SSLOCSPNoverify SSLOCSPOverrideResponder SSLOCSPProxyURL SSLOCSPResponderCertificateFile SSLOCSPResponderTimeout SSLOCSPResponseMaxAge SSLOCSPResponseTimeSkew SSLOCSPUseRequestNonce SSLOpenSSLConfCmd SSLPolicy SSLProxyCARevocationCheck SSLProxyCheckPeerName SSLSRPUnknownUserSeed SSLSRPVerifierFile SSLStaplingCache SSLStaplingErrorCacheTimeout SSLStaplingFakeTryLater SSLStaplingForceURL SSLStaplingResponderTimeout SSLStaplingResponseMaxAge SSLStaplingResponseTimeSkew SSLStaplingReturnResponderErrors SSLStaplingStandardCacheTimeout SSLUseStapling StrictHostCheck Substitute SubstituteInheritBefore SubstituteMaxLineLength Suexec UNCList UnDefine UndefMacro Use UseCanonicalPhysicalPort VHostCGIMode VHostCGIPrivs VHostGroup VHostPrivs VHostSecure VHostUser Warning WatchdogInterval xml2EncAlias xml2EncDefault xml2StartParse " Define the default highlighting diff --git a/usr/share/vim/vim91/syntax/apkbuild.vim b/usr/share/vim/vim91/syntax/apkbuild.vim new file mode 100644 index 00000000000..f969ff0e2ec --- /dev/null +++ b/usr/share/vim/vim91/syntax/apkbuild.vim @@ -0,0 +1,17 @@ +" Vim syntax file +" Language: apkbuild +" Maintainer: The Vim Project +" Last Change: 2024 Dec 22 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" The actual syntax is in sh.vim and controlled by buffer-local variables. +unlet! b:is_bash b:is_kornshell +let b:is_sh = 1 + +runtime! syntax/sh.vim + +let b:current_syntax = 'apkbuild' diff --git a/usr/share/vim/vim91/syntax/cfg.vim b/usr/share/vim/vim91/syntax/cfg.vim index f347b1379ff..4b5ebf5c25c 100644 --- a/usr/share/vim/vim91/syntax/cfg.vim +++ b/usr/share/vim/vim91/syntax/cfg.vim @@ -2,6 +2,7 @@ " Language: Good old CFG files " Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru) " Last change: 2012 Aug 11 +" 2024 Nov 14 by Vim project: // only denotes a comment when starting a line (#16051) " quit when a syntax file was already loaded if exists ("b:current_syntax") @@ -27,17 +28,17 @@ syn match CfgSection "{.*}" syn match CfgString "\".*\"" contained syn match CfgString "'.*'" contained -" Comments (Everything before '#' or '//' or ';') +" Comments (Everything before '#' or ';' or leading '//') syn match CfgComment "#.*" syn match CfgComment ";.*" -syn match CfgComment "\/\/.*" +syn match CfgComment "^\s*\/\/.*" " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link CfgOnOff Label -hi def link CfgComment Comment -hi def link CfgSection Type -hi def link CfgString String +hi def link CfgComment Comment +hi def link CfgSection Type +hi def link CfgString String hi def link CfgParams Keyword hi def link CfgValues Constant hi def link CfgDirectory Directory diff --git a/usr/share/vim/vim91/syntax/chordpro.vim b/usr/share/vim/vim91/syntax/chordpro.vim index 41a0a1e9d16..02c34b84662 100644 --- a/usr/share/vim/vim91/syntax/chordpro.vim +++ b/usr/share/vim/vim91/syntax/chordpro.vim @@ -2,6 +2,7 @@ " Language: ChordPro 6 (https://www.chordpro.org) " Maintainer: Niels Bo Andersen " Last Change: 2022-04-15 +" 2024 Dec 31: add "keys" as syntax keyword (via: https://groups.google.com/g/vim_dev/c/vP4epus0euM/m/mNoDY6hsCQAJ) " Quit when a syntax file was already loaded if exists("b:current_syntax") @@ -104,7 +105,7 @@ syn match chordproStandardMetadata /instrument\.description/ contained syn match chordproStandardMetadata /user\.name/ contained syn match chordproStandardMetadata /user\.fullname/ contained -syn keyword chordproDefineKeyword contained frets fingers +syn keyword chordproDefineKeyword contained frets fingers keys syn match chordproDefineKeyword /base-fret/ contained syn match chordproArgumentsNumber /\d\+/ contained diff --git a/usr/share/vim/vim91/syntax/cmacro.vim b/usr/share/vim/vim91/syntax/cmacro.vim new file mode 100644 index 00000000000..1d448f0d1b7 --- /dev/null +++ b/usr/share/vim/vim91/syntax/cmacro.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: C macro for C preprocessor +" Maintainer: Wu, Zhenyu +" Last Change: 2024 Dec 31 +" modified from syntax/c.vim + +" C compiler has a preprocessor: `cpp -P test.txt` +" test.txt doesn't need to be a C file +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Accept %: for # (C99) +syn region cmacroPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cmacroCppParen,cmacroNumbers +syn match cmacroPreConditMatch display "^\s*\zs\%(%:\|#\)\s*\%(else\|endif\)\>" +if !exists("c_no_if0") + syn cluster cmacroCppOutInGroup contains=cmacroCppInIf,cmacroCppInElse,cmacroCppInElse2,cmacroCppOutIf,cmacroCppOutIf2,cmacroCppOutElse,cmacroCppInSkip,cmacroCppOutSkip + syn region cmacroCppOutWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0\+\s*\%($\|//\|/\*\|&\)" end=".\@=\|$" contains=cmacroCppOutIf,cmacroCppOutElse,@NoSpell fold + syn region cmacroCppOutIf contained start="0\+" matchgroup=cmacroCppOutWrapper end="^\s*\%(%:\|#\)\s*endif\>" contains=cmacroCppOutIf2,cmacroCppOutElse + if !exists("c_no_if0_fold") + syn region cmacroCppOutIf2 contained matchgroup=cmacroCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cmacroCppOutSkip,@Spell fold + else + syn region cmacroCppOutIf2 contained matchgroup=cmacroCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cmacroCppOutSkip,@Spell + endif + syn region cmacroCppOutElse contained matchgroup=cmacroCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cmacroPreCondit + syn region cmacroCppInWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\%($\|//\|/\*\||\)" end=".\@=\|$" contains=cmacroCppInIf,cmacroCppInElse fold + syn region cmacroCppInIf contained matchgroup=cmacroCppInWrapper start="\d\+" end="^\s*\%(%:\|#\)\s*endif\>" contains=TOP,cmacroPreCondit + if !exists("c_no_if0_fold") + syn region cmacroCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cmacroCppInIf contains=cmacroCppInElse2 fold + else + syn region cmacroCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cmacroCppInIf contains=cmacroCppInElse2 + endif + syn region cmacroCppInElse2 contained matchgroup=cmacroCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cmacroCppOutSkip,@Spell + syn region cmacroCppOutSkip contained start="^\s*\%(%:\|#\)\s*\%(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" contains=cmacroCppOutSkip + syn region cmacroCppInSkip contained matchgroup=cmacroCppInWrapper start="^\s*\%(%:\|#\)\s*\%(if\s\+\%(\d\+\s*\%($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" containedin=cmacroCppOutElse,cmacroCppInIf,cmacroCppInSkip contains=TOP,cmacroPreProc +endif +syn region cmacroIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match cmacroIncluded display contained "<[^>]*>" +syn match cmacroInclude display "^\s*\zs\%(%:\|#\)\s*include\>\s*["<]" contains=cmacroIncluded +"syn match cmacroLineSkip "\\$" +syn cluster cmacroPreProcmacroGroup contains=cmacroPreCondit,cmacroIncluded,cmacroInclude,cmacroDefine,cmacroCppOutWrapper,cmacroCppInWrapper,@cmacroCppOutInGroup,cmacroNumbersCom,@cmacroCommentGroup,cmacroParen,cmacroBracket,cmacroMulti,cmacroBadBlock +syn region cmacroDefine start="^\s*\zs\%(%:\|#\)\s*\%(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cmacroPreProcmacroGroup,@Spell +syn region cmacroPreProc start="^\s*\zs\%(%:\|#\)\s*\%(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cmacroPreProcmacroGroup,@Spell + +" be able to fold #pragma regions +syn region cmacroPragma start="^\s*#pragma\s\+region\>" end="^\s*#pragma\s\+endregion\>" transparent keepend extend fold + +syn keyword cmacroTodo contained TODO FIXME XXX NOTE +syn region cmacroComment start='/\*' end='\*/' contains=cmacroTodo,@Spell +syn match cmacroCommentError "\*/" +syn region cmacroComment start='//' end='$' contains=cmacroTodo,@Spell + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link cmacroInclude Include +hi def link cmacroPreProc PreProc +hi def link cmacroDefine Macro +hi def link cmacroIncluded cmacroString +hi def link cmacroCppInWrapper cmacroCppOutWrapper +hi def link cmacroCppOutWrapper cmacroPreCondit +hi def link cmacroPreConditMatch cmacroPreCondit +hi def link cmacroPreCondit PreCondit +hi def link cmacroCppOutSkip cmacroCppOutIf2 +hi def link cmacroCppInElse2 cmacroCppOutIf2 +hi def link cmacroCppOutIf2 cmacroCppOut +hi def link cmacroCppOut Comment +hi def link cmacroTodo Todo +hi def link cmacroComment Comment +hi def link cmacroCommentError Error + +let b:current_syntax = "cmacro" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/usr/share/vim/vim91/syntax/dockerfile.vim b/usr/share/vim/vim91/syntax/dockerfile.vim index 6ec71fcdb61..f1d612f4add 100644 --- a/usr/share/vim/vim91/syntax/dockerfile.vim +++ b/usr/share/vim/vim91/syntax/dockerfile.vim @@ -1,6 +1,6 @@ " dockerfile.vim - Syntax highlighting for Dockerfiles " Maintainer: Honza Pokorny -" Last Change: 2024 Jul 03 +" Last Change: 2024 Dec 20 " License: BSD " https://docs.docker.com/engine/reference/builder/ @@ -35,7 +35,6 @@ syntax region dockerfileShell contained keepend start=/\v/ skip=/\v\\\_./ end=/ syntax region dockerfileValue contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=dockerfileString syntax region dockerfileComment start=/\v^\s*#/ end=/\v$/ contains=@Spell -set commentstring=#\ %s hi def link dockerfileString String hi def link dockerfileKeyword Keyword diff --git a/usr/share/vim/vim91/syntax/gel.vim b/usr/share/vim/vim91/syntax/gel.vim new file mode 100644 index 00000000000..5f3800273c8 --- /dev/null +++ b/usr/share/vim/vim91/syntax/gel.vim @@ -0,0 +1,19 @@ +" Vim syntax file +" Language: TI Code Composer Studio General Extension Language +" Document: https://downloads.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html +" Maintainer: Wu, Zhenyu +" Last Change: 2024 Dec 25 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/cpp.vim + +syn keyword gelStatement StartUp GEL_AddInputFile GEL_AddOutputFile GEL_AdvancedReset GEL_AsmStepInto GEL_AsmStepOver GEL_BreakPtAdd GEL_BreakPtDel GEL_BreakPtDisable GEL_BreakPtReset GEL_CancelTimer GEL_Connect GEL_Dialog GEL_DisableFileOutput GEL_DisableRealtime GEL_Disconnect GEL_EnableClock GEL_EnableFileOutput GEL_EnableRealtime GEL_EnableZeroFill GEL_EvalOnTarget GEL_GetBoolDebugProperty GEL_GetBoolDriverProperty GEL_GetBoolTargetDbProperty GEL_GetNumericDebugProperty GEL_GetNumericDriverProperty GEL_GetNumericTargetDbProperty GEL_GetStringDebugProperty GEL_GetStringDriverProperty GEL_GetStringTargetDbProperty GEL_Go GEL_Halt GEL_HandleTargetError GEL_HWBreakPtAdd GEL_HWBreakPtDel GEL_HWBreakPtDisable GEL_HWBreakPtReset GEL_IsConnected GEL_IsHalted GEL_IsInRealtimeMode GEL_IsResetSupported GEL_IsTimerSet GEL_Load GEL_LoadBin GEL_LoadGel GEL_LoadProgramOnly GEL_MapAdd GEL_MapAddStr GEL_MapDelete GEL_MapOff GEL_MapOn GEL_MapReset GEL_MatchesConnection GEL_MemoryFill GEL_MemoryListSupportedTypes GEL_MemoryLoad GEL_MemoryLoadData GEL_MemorySave GEL_MemorySaveBin GEL_MemorySaveCoff GEL_MemorySaveData GEL_MemorySaveHex GEL_PatchAssembly GEL_ProbePtAdd GEL_ProbePtDel GEL_ProbePtDisable GEL_ProbePtReset GEL_ReConnect GEL_RefreshWindows GEL_Reload GEL_RemoveDebugState GEL_RemoveInputFile GEL_RemoveOutputFile GEL_Reset GEL_Restart GEL_RestoreDebugState GEL_Run GEL_RunF GEL_SetBlockResetMode GEL_SetBoolDebugProperty GEL_SetClockEvent GEL_SetNumericDebugProperty GEL_SetSemihostingMainArgs GEL_SetStringDebugProperty GEL_SetTimer GEL_SetWaitInResetMode GEL_SrcStepInto GEL_SrcStepOver GEL_StepInto GEL_StepOut GEL_StepOver GEL_StrCat GEL_StrLen GEL_SubStr GEL_SymbolAdd GEL_SymbolAddOffset GEL_SymbolAddRel GEL_SymbolDisable GEL_SymbolEnable GEL_SymbolHideSection GEL_SymbolLoad GEL_SymbolLoadOffset GEL_SymbolLoadRel GEL_SymbolRemove GEL_SymbolShowSection GEL_SyncHalt GEL_SyncRun GEL_SyncStepInto GEL_SyncStepOut GEL_SyncStepOver GEL_System GEL_TargetTextOut GEL_TextOut GEL_Trace GEL_UnloadAllGels GEL_UnloadAllSymbols GEL_UnloadGel GEL_VerifyBinProgram GEL_VerifyProgram OnChildRunning OnFileLoaded OnHalt OnPreFileLoaded OnPreReset OnPreTargetConnect OnReset OnResetDetected OnRestart OnTargetConnect +syn keyword gelModifier hotmenu menuitem + +hi def link gelStatement Statement +hi def link gelModifier Type + +let b:current_syntax = "gel" diff --git a/usr/share/vim/vim91/syntax/graphql.vim b/usr/share/vim/vim91/syntax/graphql.vim new file mode 100644 index 00000000000..01d5ca25ffc --- /dev/null +++ b/usr/share/vim/vim91/syntax/graphql.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" Language: graphql +" Maintainer: Jon Parise +" Filenames: *.graphql *.graphqls *.gql +" URL: https://github.com/jparise/vim-graphql +" License: MIT +" Last Change: 2024 Dec 21 + +if !exists('main_syntax') + if exists('b:current_syntax') + finish + endif + let main_syntax = 'graphql' +endif + +syn case match + +syn match graphqlComment "#.*$" contains=@Spell + +syn match graphqlOperator "=" display +syn match graphqlOperator "!" display +syn match graphqlOperator "|" display +syn match graphqlOperator "&" display +syn match graphqlOperator "\M..." display + +syn keyword graphqlBoolean true false +syn keyword graphqlNull null +syn match graphqlNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" display +syn region graphqlString start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ +syn region graphqlString start=+"""+ skip=+\\"""+ end=+"""+ + +syn keyword graphqlKeyword repeatable nextgroup=graphqlKeyword skipwhite +syn keyword graphqlKeyword on nextgroup=graphqlType,graphqlDirectiveLocation skipwhite + +syn keyword graphqlStructure enum scalar type union nextgroup=graphqlType skipwhite +syn keyword graphqlStructure input interface subscription nextgroup=graphqlType skipwhite +syn keyword graphqlStructure implements nextgroup=graphqlType skipwhite +syn keyword graphqlStructure query mutation fragment nextgroup=graphqlName skipwhite +syn keyword graphqlStructure directive nextgroup=graphqlDirective skipwhite +syn keyword graphqlStructure extend nextgroup=graphqlStructure skipwhite +syn keyword graphqlStructure schema nextgroup=graphqlFold skipwhite + +syn match graphqlDirective "\<@\h\w*\>" display +syn match graphqlVariable "\<\$\h\w*\>" display +syn match graphqlName "\<\h\w*\>" display +syn match graphqlType "\<_*\u\w*\>" display + +" https://spec.graphql.org/October2021/#ExecutableDirectiveLocation +syn keyword graphqlDirectiveLocation QUERY MUTATION SUBSCRIPTION FIELD +syn keyword graphqlDirectiveLocation FRAGMENT_DEFINITION FRAGMENT_SPREAD +syn keyword graphqlDirectiveLocation INLINE_FRAGMENT VARIABLE_DEFINITION +" https://spec.graphql.org/October2021/#TypeSystemDirectiveLocation +syn keyword graphqlDirectiveLocation SCHEMA SCALAR OBJECT FIELD_DEFINITION +syn keyword graphqlDirectiveLocation ARGUMENT_DEFINITION INTERFACE UNION +syn keyword graphqlDirectiveLocation ENUM ENUM_VALUE INPUT_OBJECT +syn keyword graphqlDirectiveLocation INPUT_FIELD_DEFINITION + +syn keyword graphqlMetaFields __schema __type __typename + +syn region graphqlFold matchgroup=graphqlBraces start="{" end="}" transparent fold contains=ALLBUT,graphqlStructure +syn region graphqlList matchgroup=graphqlBraces start="\[" end="]" transparent contains=ALLBUT,graphqlDirective,graphqlStructure + +if main_syntax ==# 'graphql' + syn sync minlines=500 +endif + +hi def link graphqlComment Comment +hi def link graphqlOperator Operator + +hi def link graphqlBraces Delimiter + +hi def link graphqlBoolean Boolean +hi def link graphqlNull Keyword +hi def link graphqlNumber Number +hi def link graphqlString String + +hi def link graphqlDirective PreProc +hi def link graphqlDirectiveLocation Special +hi def link graphqlName Identifier +hi def link graphqlMetaFields Special +hi def link graphqlKeyword Keyword +hi def link graphqlStructure Structure +hi def link graphqlType Type +hi def link graphqlVariable Identifier + +let b:current_syntax = 'graphql' + +if main_syntax ==# 'graphql' + unlet main_syntax +endif diff --git a/usr/share/vim/vim91/syntax/help.vim b/usr/share/vim/vim91/syntax/help.vim index ae7e3bc6a7c..ec5739faa42 100644 --- a/usr/share/vim/vim91/syntax/help.vim +++ b/usr/share/vim/vim91/syntax/help.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Vim help file " Maintainer: The Vim Project -" Last Change: 2024 Oct 16 +" Last Change: 2024 Dec 25 " Former Maintainer: Bram Moolenaar " Quit when a (custom) syntax file was already loaded @@ -12,14 +12,36 @@ endif let s:cpo_save = &cpo set cpo&vim +if !exists('g:help_example_languages') + let g:help_example_languages = #{ vim: 'vim' } +endif + syn match helpHeadline "^[A-Z.][-A-Z0-9 .,()_']*?\=\ze\(\s\+\*\|$\)" syn match helpSectionDelim "^===.*===$" syn match helpSectionDelim "^---.*--$" + if has("conceal") - syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" concealends -else - syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" + syn region helpExample matchgroup=helpIgnore + \ start="\%(^\| \)>[a-z0-9]*$" end="^[^ \t]"me=e-1 end="^<" concealends + else + syn region helpExample matchgroup=helpIgnore + \ start="\%(^\| \)>[a-z0-9]*$" end="^[^ \t]"me=e-1 end="^<" endif + +for [s:lang, s:syntax] in g:help_example_languages->items() + unlet! b:current_syntax + " silent! to prevent E403 + execute 'silent! syn include' $'@helpExampleHighlight_{s:lang}' + \ $'syntax/{s:syntax}.vim' + + execute $'syn region helpExampleHighlight_{s:lang} matchgroup=helpIgnore' + \ $'start=/\%(^\| \)>{s:lang}$/' + \ 'end=/^[^ \t]/me=e-1 end=/^ +" Last Change: 2024 nov 15 + +if exists("b:current_syntax") + finish +endif +let b:current_syntax = "hyprlang" + +syn case ignore + +syn match hyprCommand '^\s*\zs\S\+\ze\s*=' contains=hyprVariable +syn match hyprValue '=\s*\zs.\+\ze$' contains=hyprNumber,hyprFloat,hyprBoolean,hyprString,hyprColor,hyprModifier,hyprVariable,hyprComment + +syn match hyprVariable '\$\w\+' contained + +" Category +syn region hyprCategory matchgroup=hyprCategoryD start='^\s*\k\+\s*{' end='^\s*}' contains=hyprCommand,hyprValue,hyprComment,hyprCategory,hyprCategoryD + +" Variables Types +syn match hyprNumber '\%[-+]\<\d\+\>\%[%]' contained +syn match hyprFloat '\%[-+]\<\d\+\.\d\+\>\%[%]' contained +syn match hyprString '["\'].*["\']' contained +syn match hyprColor 'rgb(\(\w\|\d\)\{6})' contained +syn match hyprColor 'rgba(\(\w\|\d\)\{8})' contained +syn match hyprColor '0x\(\w\|\d\)\{8}' contained +syn keyword hyprBoolean true false yes no on off contained + +" Super Shift Alt Ctrl Control +syn keyword hyprModifier contained + \ super supershift superalt superctrl supercontrol + \ super_shift super_alt super_ctrl super_control + \ shift shiftsuper shiftalt shiftctrl shiftcontrol + \ shift_super shift_alt shift_ctrl shift_control + \ alt altsuper altshift altctrl altcontrol + \ alt_super alt_shift alt_ctrl alt_control + \ ctrl ctrlsuper ctrlshift ctrlalt ctrlcontrol + \ ctrl_super ctrl_shift ctrl_alt ctrl_control + \ control controlsuper controlshift controlalt controlctrl + \ control_super control_shift control_alt control_ctrl + +" Comments +syn match hyprComment '#.*$' + +" Link to default groups +hi def link hyprVariable Identifier +hi def link hyprCategoryD Special +hi def link hyprComment Comment +hi def link hyprNumber Constant +hi def link hyprModifier Constant +hi def link hyprFloat hyprNumber +hi def link hyprBoolean Boolean +hi def link hyprString String +hi def link hyprColor Structure +hi def link hyprCommand Keyword + +" vim: ts=8 sts=2 sw=2 et diff --git a/usr/share/vim/vim91/syntax/java.vim b/usr/share/vim/vim91/syntax/java.vim index b3e17b55f61..9b38ccd4dc7 100644 --- a/usr/share/vim/vim91/syntax/java.vim +++ b/usr/share/vim/vim91/syntax/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Claudio Fleiner " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2024 Oct 10 +" Last Change: 2025 Jan 02 " Please check ":help java.vim" for comments on some of the options " available. @@ -391,18 +391,32 @@ if !exists("g:java_ignore_javadoc") && (s:with_html || s:with_markdown) && g:mai if s:with_markdown try syntax include @javaMarkdown syntax/markdown.vim - let s:ff.WithMarkdown = s:ff.LeftConstant + + try + syn clear markdownId markdownLineStart markdownH1 markdownH2 markdownHeadingRule markdownRule markdownCode markdownCodeBlock markdownIdDeclaration + let s:ff.WithMarkdown = s:ff.LeftConstant + catch /\ +" Credits: Jay Strybis for the initial implementation and Patrick Knosowski +" for a couple of fixes. + +if exists("b:current_syntax") + finish +endif + +" KAREL is case-insensitive +syntax case ignore + +" Identifiers +syn match karelIdentifier /[a-zA-Z0-9_]\+/ +hi def link karelIdentifier Identifier + +" Constants +syn keyword karelConstant CR +syn region karelString start="'" end="'" +syn match karelReal /\d\+\.\d\+/ +syn match karelInteger /\d\+/ +syn keyword karelBoolean true false +hi def link karelConstant Constant +hi def link karelString String +hi def link karelInteger Number +hi def link karelReal Float +hi def link karelBoolean Boolean + +" Directives +syn match karelDirective /%[a-zA-Z]\+/ +hi def link karelDirective PreProc + +" Operators +syn keyword karelOperator AND OR NOT DIV MOD +syn match karelOperator /[\+\-\*\/\<\=\>\:\#\@]/ +syn match karelOperator /<=/ +syn match karelOperator />=/ +syn match karelOperator /<>/ +syn match karelOperator />= +" Last Change: 2024 Dec 31 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/cmacro.vim + +syn case ignore +syn match lnkNumber "0x[0-9a-f]\+" +" Linker command files are ASCII files that contain one or more of the following: +" Input filenames, which specify object files, archive libraries, or other command files. +" Linker options, which can be used in the command file in the same manner that they are used on the command line +syn match lnkOption "^[-+][-_a-zA-Z#@]\+" +syn match lnkOption "^--[^ \t$=`'"|);]\+" +syn match lnkFile '[^ =]\+\%(\.\S\+\)\+\>' +syn match lnkLibFile '[^ =]\+\.lib\>' +" The MEMORY and SECTIONS linker directives. The MEMORY directive defines the target memory configuration (see Section 8.5.4). The SECTIONS directive controls how sections are built and allocated (see Section 8.5.5.) +syn keyword lnkKeyword ADDRESS_MASK f LOAD ORIGIN START ALGORITHM FILL LOAD_END PAGE TABLE ALIGN GROUP LOAD_SIZE PALIGN TYPE ATTR HAMMING_MASK LOAD_START PARITY_MASK UNION BLOCK HIGH MEMORY RUN UNORDERED COMPRESSION INPUT_PAGE MIRRORING RUN_END VFILL COPY INPUT_RANGE NOINIT RUN_SIZE DSECT l NOLOAD RUN_START ECC LEN o SECTIONS END LENGTH ORG SIZE +syn region lnkLibrary start=+<+ end=+>+ +syn match lnkAttrib '\<[RWXI]\+\>' +syn match lnkSections '\<\.\k\+' +" Assignment statements, which define and assign values to global symbols +syn case match + +hi def link lnkNumber Number +hi def link lnkOption Special +hi def link lnkKeyword Keyword +hi def link lnkLibrary String +hi def link lnkFile String +hi def link lnkLibFile Special +hi def link lnkAttrib Type +hi def link lnkSections Macro + +let b:current_syntax = "lnk" diff --git a/usr/share/vim/vim91/syntax/lnkmap.vim b/usr/share/vim/vim91/syntax/lnkmap.vim new file mode 100644 index 00000000000..dc097f412ff --- /dev/null +++ b/usr/share/vim/vim91/syntax/lnkmap.vim @@ -0,0 +1,35 @@ +" Vim syntax file +" Language: TI Linker map +" Document: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html +" Maintainer: Wu, Zhenyu +" Last Change: 2024 Dec 30 + +if exists("b:current_syntax") + finish +endif + +syn match lnkmapTime ">> .*$" +syn region lnkmapHeadline start="^\*\+$" end="^\*\+$" +syn match lnkmapHeadline "^[A-Z][-A-Z0-9 ']*\ze\%(:\|$\)" +syn match lnkmapSectionDelim "^=\+$" +syn match lnkmapTableDelim "\%(^\|\s\)\zs---*\ze\%($\|\s\)" +syn match lnkmapNumber "\%(^\|\s\)\zs[0-9a-f]\+\ze\%($\|\s\)" +syn match lnkmapSections '\<\.\k\+\>' +syn match lnkmapFile '[^ =]\+\%(\.\S\+\)\+\>' +syn match lnkmapLibFile '[^ =]\+\.lib\>' +syn match lnkmapAttrib '\<[RWIX]\+\>' +syn match lnkmapAttrib '\s\zs--HOLE--\ze\%\(\s\|$\)' +syn keyword lnkmapAttrib UNINITIALIZED DESCT + + +hi def link lnkmapTime Comment +hi def link lnkmapHeadline Title +hi def link lnkmapSectionDelim PreProc +hi def link lnkmapTableDelim PreProc +hi def link lnkmapNumber Number +hi def link lnkmapSections Macro +hi def link lnkmapFile String +hi def link lnkmapLibFile Special +hi def link lnkmapAttrib Type + +let b:current_syntax = "lnkmap" diff --git a/usr/share/vim/vim91/syntax/mss.vim b/usr/share/vim/vim91/syntax/mss.vim new file mode 100644 index 00000000000..de95d1d2add --- /dev/null +++ b/usr/share/vim/vim91/syntax/mss.vim @@ -0,0 +1,23 @@ +" Vim syntax file +" Language: Vivado mss file +" Maintainer: The Vim Project +" Last Change: 2024 Oct 22 +" Document: https://docs.amd.com/r/2020.2-English/ug1400-vitis-embedded/Microprocessor-Software-Specification-MSS +" Maintainer: Wu, Zhenyu + +if exists("b:current_syntax") + finish +endif + +syn case ignore +syn match mssComment "#.*$" contains=@Spell +syn keyword mssKeyword BEGIN END PARAMETER +syn keyword mssType OS PROCESSOR DRIVER LIBRARY +syn keyword mssConstant VERSION PROC_INSTANCE HW_INSTANCE OS_NAME OS_VER DRIVER_NAME DRIVER_VER LIBRARY_NAME LIBRARY_VER STDIN STDOUT XMDSTUB_PERIPHERAL ARCHIVER COMPILER COMPILER_FLAGS EXTRA_COMPILER_FLAGS + +hi def link mssComment Comment +hi def link mssKeyword Keyword +hi def link mssType Type +hi def link mssConstant Constant + +let b:current_syntax = "mss" diff --git a/usr/share/vim/vim91/syntax/opencl.vim b/usr/share/vim/vim91/syntax/opencl.vim new file mode 100644 index 00000000000..c237aa30f95 --- /dev/null +++ b/usr/share/vim/vim91/syntax/opencl.vim @@ -0,0 +1,13 @@ +" Vim syntax file +" Language: OpenCL +" Last Change: 2024 Nov 19 +" Maintainer: Wu, Zhenyu + +if exists("b:current_syntax") + finish +endif + +" TODO: support openCL specific keywords +runtime! syntax/c.vim + +let current_syntax = "opencl" diff --git a/usr/share/vim/vim91/syntax/po.vim b/usr/share/vim/vim91/syntax/po.vim index 08d6baec27d..6da27f639dd 100644 --- a/usr/share/vim/vim91/syntax/po.vim +++ b/usr/share/vim/vim91/syntax/po.vim @@ -1,10 +1,11 @@ " Vim syntax file " Language: po (gettext) " Maintainer: Dwayne Bailey -" Last Change: 2015 Jun 07 +" Last Change: 2024 Nov 28 " Contributors: Dwayne Bailey (Most advanced syntax highlighting) " Leonardo Fontenelle (Spell checking) " Nam SungHyun (Original maintainer) +" Eisuke Kawashima (add format-flags: #16132) " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -32,9 +33,9 @@ syn region poMsgCTxt matchgroup=poStatementMsgCTxt start=+^msgctxt "+rs=e-1 syn region poMsgID matchgroup=poStatementMsgid start=+^msgid "+rs=e-1 matchgroup=poStringID end=+^msgstr\(\|\[[\]0\[]\]\) "+me=s-1 contains=poStringID,poStatementMsgidplural,poStatementMsgid syn region poMsgSTR matchgroup=poStatementMsgstr start=+^msgstr\(\|\[[\]0\[]\]\) "+rs=e-1 matchgroup=poStringSTR end=+\n\n+me=s-1 contains=poStringSTR,poStatementMsgstr syn region poStringCTxt start=+"+ skip=+\\\\\|\\"+ end=+"+ -syn region poStringID start=+"+ skip=+\\\\\|\\"+ end=+"+ contained +syn region poStringID start=+"+ skip=+\\\\\|\\"+ end=+"+ contained \ contains=poSpecial,poFormat,poCommentKDE,poPluralKDE,poKDEdesktopFile,poHtml,poAcceleratorId,poHtmlNot,poVariable -syn region poStringSTR start=+"+ skip=+\\\\\|\\"+ end=+"+ contained +syn region poStringSTR start=+"+ skip=+\\\\\|\\"+ end=+"+ contained \ contains=@Spell,poSpecial,poFormat,poHeaderItem,poCommentKDEError,poHeaderUndefined,poPluralKDEError,poMsguniqError,poKDEdesktopFile,poHtml,poAcceleratorStr,poHtmlNot,poVariable " Header and Copyright @@ -45,13 +46,43 @@ syn match poCopyrightUnset "SOME DESCRIPTIVE TITLE\|FIRST AUTHOR / contained +syn match poFlagFormat /\<\%(no-\)\?boost-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?c++-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?c-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?csharp-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?elisp-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?gcc-internal-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?gfc-internal-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?java-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?java-printf-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?javascript-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?kde-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?librep-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?lisp-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?lua-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?objc-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?object-pascal-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?perl-brace-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?perl-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?php-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?python-brace-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?python-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?qt-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?qt-plural-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?ruby-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?scheme-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?sh-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?smalltalk-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?tcl-format\>/ contained +syn match poFlagFormat /\<\%(no-\)\?ycp-format\>/ contained + syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset -syn match poCommentAutomatic "^#\..*$" +syn match poCommentAutomatic "^#\..*$" syn match poCommentSources "^#:.*$" -syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy -syn match poDiffOld '\(^#| "[^{]*+}\|{+[^}]*+}\|{+[^}]*\|"$\)' contained -syn match poDiffNew '\(^#| "[^{]*-}\|{-[^}]*-}\|{-[^}]*\|"$\)' contained -syn match poCommentDiff "^#|.*$" contains=poDiffOld,poDiffNew +syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy,poFlagFormat +syn match poCommentPrevious "^#|.*$" " Translations (also includes header fields as they appear in a translation msgstr) syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained @@ -66,13 +97,13 @@ syn match poFormat "%%" contained syn region poMsguniqError matchgroup=poMsguniqErrorMarkers start="#-#-#-#-#" end='#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)\\n' contained " Obsolete messages -syn match poObsolete "^#\~.*$" +syn match poObsolete "^#\~.*$" " KDE Name= handling syn match poKDEdesktopFile "\"\(Name\|Comment\|GenericName\|Description\|Keywords\|About\)="ms=s+1,me=e-1 " Accelerator keys - this messes up if the preceding or following char is a multibyte unicode char -syn match poAcceleratorId contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 +syn match poAcceleratorId contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 syn match poAcceleratorStr contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 contains=@Spell " Variables simple @@ -86,11 +117,10 @@ hi def link poComment Comment hi def link poCommentAutomatic Comment hi def link poCommentTranslator Comment hi def link poCommentFlags Special -hi def link poCommentDiff Comment +hi def link poCommentPrevious Comment hi def link poCopyrightUnset Todo hi def link poFlagFuzzy Todo -hi def link poDiffOld Todo -hi def link poDiffNew Special +hi def link poFlagFormat Todo hi def link poObsolete Comment hi def link poStatementMsgid Statement diff --git a/usr/share/vim/vim91/syntax/ptx.vim b/usr/share/vim/vim91/syntax/ptx.vim new file mode 100644 index 00000000000..98de4ff6d3e --- /dev/null +++ b/usr/share/vim/vim91/syntax/ptx.vim @@ -0,0 +1,52 @@ +" Vim syntax file +" Language: Nvidia PTX (Parallel Thread Execution) +" Maintainer: Yinzuo Jiang +" Latest Revision: 2024-12-05 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syntax iskeyword .,_,a-z,48-57 + +" https://docs.nvidia.com/cuda/parallel-thread-execution/#directives +syntax keyword ptxFunction .entry .func +syntax keyword ptxDirective .branchtargets .file .loc .secion .maxnctapersm .maxnreg .minnctapersm .noreturn .pragma .reqntid .target .version .weak +syntax keyword ptxOperator .address_size .alias .align .callprototype .calltargets +syntax keyword ptxStorageClass .common .const .extern .global .local .param .reg .sreg .shared .tex .visible +syntax keyword ptxType .explicitcluster .maxclusterrank .reqnctapercluster + +" https://docs.nvidia.com/cuda/parallel-thread-execution/#fundamental-types +" signed integer +syntax keyword ptxType .s8 .s16 .s32 .s64 +" unsigned integer +syntax keyword ptxType .u8 .u16 .u32 .u64 +" floating-point +syntax keyword ptxType .f16 .f16x2 .f32 .f64 +" bits (untyped) +syntax keyword ptxType .b8 .b16 .b32 .b64 .b128 +" predicate +syntax keyword ptxType .pred + +" https://docs.nvidia.com/cuda/parallel-thread-execution/#instruction-statements +syntax keyword ptxStatement ret + +syntax region ptxCommentL start="//" skip="\\$" end="$" keepend +syntax region ptxComment matchgroup=ptxCommentStart start="/\*" end="\*/" extend + +hi def link ptxFunction Function +hi def link ptxDirective Keyword +hi def link ptxOperator Operator +hi def link ptxStorageClass StorageClass +hi def link ptxType Type +hi def link ptxStatement Statement + +hi def link ptxCommentL ptxComment +hi def link ptxCommentStart ptxComment +hi def link ptxComment Comment + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/usr/share/vim/vim91/syntax/sh.vim b/usr/share/vim/vim91/syntax/sh.vim index 97e74d205f4..d71a966553c 100644 --- a/usr/share/vim/vim91/syntax/sh.vim +++ b/usr/share/vim/vim91/syntax/sh.vim @@ -4,6 +4,8 @@ " Previous Maintainers: Charles E. Campbell " Lennart Schultz " Last Change: 2024 Mar 04 by Vim Project +" 2024 Nov 03 by Aliaksei Budavei <0x000c70 AT gmail DOT com> (improved bracket expressions, #15941) +" 2025 Jan 06 add $PS0 to bashSpecialVariables (#16394) " Version: 208 " Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax @@ -127,6 +129,50 @@ else com! -nargs=* ShFoldIfDoFor endif +" Generate bracket expression items {{{1 +" ================================= +" Note that the following function can be invoked as many times as necessary +" provided that these constraints hold for the passed dictionary argument: +" - every time a unique group-name value is assigned to the "itemGroup" key; +" - only ONCE either the "extraArgs" key is not entered or it is entered and +" its value does not have "contained" among other optional arguments (":help +" :syn-arguments"). +fun! s:GenerateBracketExpressionItems(dict) abort + let itemGroup = a:dict.itemGroup + let bracketGroup = a:dict.bracketGroup + let invGroup = itemGroup . 'Inv' + let skipLeftBracketGroup = itemGroup . 'SkipLeftBracket' + let skipRightBracketGroup = itemGroup . 'SkipRightBracket' + let extraArgs = has_key(a:dict, 'extraArgs') ? a:dict.extraArgs : '' + + " Make the leading "[!^]" stand out in a NON-matching expression. + exec 'syn match ' . invGroup . ' contained "\[\@<=[!^]"' + + " Set up indirections for unbalanced-bracket highlighting. + exec 'syn region ' . skipRightBracketGroup . ' contained matchgroup=' . bracketGroup . ' start="\[\%([!^]\=\\\=\]\)\@=" matchgroup=shCollSymb end="\[\.[^]]\{-}\][^]]\{-}\.\]" matchgroup=' . itemGroup . ' end="\]" contains=@shBracketExprList,shDoubleQuote,' . invGroup + exec 'syn region ' . skipLeftBracketGroup . ' contained matchgroup=' . bracketGroup . ' start="\[\%([!^]\=\\\=\]\)\@=" skip="[!^]\=\\\=\]\%(\[[^]]\+\]\|[^]]\)\{-}\%(\[[:.=]\@!\)\@=" matchgroup=' . itemGroup . ' end="\[[:.=]\@!" contains=@shBracketExprList,shDoubleQuote,' . invGroup + + " Look for a general matching expression. + exec 'syn region ' . itemGroup . ' matchgroup=' . bracketGroup . ' start="\[\S\@=" end="\]" contains=@shBracketExprList,shDoubleQuote ' . extraArgs + " Look for a general NON-matching expression. + exec 'syn region ' . itemGroup . ' matchgroup=' . bracketGroup . ' start="\[[!^]\@=" end="\]" contains=@shBracketExprList,shDoubleQuote,' . invGroup . ' ' . extraArgs + + " Accommodate unbalanced brackets in bracket expressions. The supported + " syntax for a plain "]" can be: "[]ws]" and "[^]ws]"; or, "[ws[.xs]ys.]zs]" + " and "[^ws[.xs]ys.]zs]"; see §9.3.5 RE Bracket Expression (in XBD). + exec 'syn region ' . itemGroup . ' matchgroup=NONE start="\[[!^]\=\\\=\]" matchgroup=' . bracketGroup . ' end="\]" contains=@shBracketExprList,shDoubleQuote,' . skipRightBracketGroup . ' ' . extraArgs + " Strive to handle "[]...[]" etc. + exec 'syn region ' . itemGroup . ' matchgroup=NONE start="\[[!^]\=\\\=\]\%(\[[^]]\+\]\|[^]]\)\{-}\[[:.=]\@!" matchgroup=' . bracketGroup . ' end="\]" contains=@shBracketExprList,shDoubleQuote,' . skipLeftBracketGroup . ' ' . extraArgs + + if !exists("g:skip_sh_syntax_inits") + exec 'hi def link ' . skipLeftBracketGroup . ' ' . itemGroup + exec 'hi def link ' . skipRightBracketGroup . ' ' . itemGroup + exec 'hi def link ' . invGroup . ' Underlined' + endif +endfun + +call s:GenerateBracketExpressionItems({'itemGroup': 'shBracketExpr', 'bracketGroup': 'shBracketExprDelim'}) + " sh syntax is case sensitive {{{1 syn case match @@ -136,23 +182,24 @@ syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsa if exists("b:is_kornshell") || exists("b:is_bash") syn cluster ErrorList add=shDTestError endif -syn cluster shArithParenList contains=shArithmetic,shArithParen,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor,shFunctionKey,shFunctionOne,shFunctionTwo +syn cluster shArithParenList contains=shArithmetic,shArithParen,shCaseEsac,shComment,shDeref,shDerefVarArray,shDo,shDerefSimple,shEcho,shEscape,shExpr,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shArithList contains=@shArithParenList,shParenError +syn cluster shBracketExprList contains=shCharClassOther,shCharClass,shCollSymb,shEqClass syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shComment,shDblBrace,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shCaseList add=shForPP,shDblParen endif -syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable +syn cluster shCommandSubList contains=shAlias,shArithmetic,shBracketExpr,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial " COMBAK: removing shEscape from shDblQuoteList fails ksh04:43 -- Jun 09, 2022: I don't see the problem with ksh04, so am reinstating shEscape syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDerefOpError -syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote -syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq +syn cluster shEchoList contains=shArithmetic,shBracketExpr,shCommandSub,shCommandSubBQ,shDerefVarArray,shSubshare,shValsub,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote +syn cluster shExprList1 contains=shBracketExpr,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest -syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq +syn cluster shFunctionList contains=shBracketExpr,@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shFunctionList add=shRepeat,shDblBrace,shDblParen,shForPP syn cluster shDerefList add=shCommandSubList,shEchoDeref @@ -160,16 +207,16 @@ endif syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload -syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr +syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDerefVarArray,shSubshare,shValsub,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shLoopList add=shForPP,shDblParen endif -syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable +syn cluster shPPSLeftList contains=shAlias,shArithmetic,shBracketExpr,shCmdParenRegion,shCommandSub,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm -syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shSubshare,shValsub,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator -syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr +syn cluster shSubShList contains=shBracketExpr,@shCommandSubList,shCommandSubBQ,shSubshare,shValsub,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator +syn cluster shTestList contains=shArithmetic,shBracketExpr,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr syn cluster shNoZSList contains=shSpecialNoZS syn cluster shForList contains=shTestOpr,shNumber,shDerefSimple,shDeref,shCommandSub,shCommandSubBQ,shSubshare,shValsub,shArithmetic @@ -190,7 +237,7 @@ endif syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]' " This must be after the strings, so that ... \" will be correct -syn region shEmbeddedEcho contained matchgroup=shStatement start="\" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq +syn region shEmbeddedEcho contained matchgroup=shStatement start="\" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shBracketExpr,shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCtrlSeq " Alias: {{{1 " ===== @@ -240,7 +287,6 @@ syn match shRedir "\d<<-\=" " ========== syn match shOperator "<<\|>>" contained syn match shOperator "[!&;|]" contained -syn match shOperator "\[[[^:]\|\]]" contained syn match shOperator "[-=/*+%]\==" skipwhite nextgroup=shPattern syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref @@ -251,9 +297,9 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" " Tests: {{{1 "======= -syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial +syn region shExpr matchgroup=shRange start="\[\s\@=" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial syn region shTest transparent matchgroup=shStatement start="\" " ===================== if !exists("skip_sh_syntax_inits") hi def link shArithRegion shShellVariables + hi def link shArrayValue shDeref hi def link shAstQuote shDoubleQuote hi def link shAtExpr shSetList hi def link shBkslshSnglQuote shSingleQuote @@ -764,7 +827,10 @@ if !exists("skip_sh_syntax_inits") endif hi def link shArithmetic Special + hi def link shBracketExprDelim Delimiter hi def link shCharClass Identifier + hi def link shCollSymb shCharClass + hi def link shEqClass shCharClass hi def link shSnglCase Statement hi def link shCommandSub Special hi def link shCommandSubBQ shCommandSub @@ -814,6 +880,10 @@ delc ShFoldFunctions delc ShFoldHereDoc delc ShFoldIfDoFor +" Delete the bracket expression function {{{1 +" ====================================== +delfun s:GenerateBracketExpressionItems + " Set Current Syntax: {{{1 " =================== if exists("b:is_bash") diff --git a/usr/share/vim/vim91/syntax/shaderslang.vim b/usr/share/vim/vim91/syntax/shaderslang.vim new file mode 100644 index 00000000000..1cae202b043 --- /dev/null +++ b/usr/share/vim/vim91/syntax/shaderslang.vim @@ -0,0 +1,360 @@ +" Vim syntax file +" Language: Slang +" Maintainer: Austin Shijo +" Last Change: 2024 Jan 05 + +if exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +runtime! syntax/c.vim +unlet b:current_syntax + +" Annotations +syn match shaderslangAnnotation /<.*;>/ + +" Attributes +syn match shaderslangAttribute /^\s*\[maxvertexcount(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[domain(\s*"\(tri\|quad\|isoline\)"\s*)\]/ +syn match shaderslangAttribute /^\s*\[earlydepthstencil\]/ +syn match shaderslangAttribute /^\s*\[instance(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[maxtessfactor(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[numthreads(\s*\w\+\s*,\s*\w\+\s*,\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[outputcontrolpoints(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[outputtopology(\s*"\(point\|line\|triangle_cw\|triangle_ccw\|triangle\)"\s*)\]/ +syn match shaderslangAttribute /^\s*\[partitioning(\s*"\(integer\|fractional_even\|fractional_odd\|pow2\)"\s*)\]/ +syn match shaderslangAttribute /^\s*\[patchconstantfunc(\s*"\(\d\|\w\|_\)\+"\s*)\]/ +syn match shaderslangAttribute /^\s*\[WaveSize(\s*\w\+\(\s*,\s*\w\+\(\s*,\s*\w\+\)\?\)\?\s*)\]/ +syn match shaderslangAttribute /^\s*\[shader(\s*"\(anyhit\|callable\|closesthit\|intersection\|miss\|raygeneration\)"\s*)\]/ + +syn match shaderslangAttribute /^\s*\[fastopt\]/ +syn match shaderslangAttribute /^\s*\[loop\]/ +syn match shaderslangAttribute /^\s*\[unroll\]/ +syn match shaderslangAttribute /^\s*\[allow_uav_condition\]/ +syn match shaderslangAttribute /^\s*\[branch\]/ +syn match shaderslangAttribute /^\s*\[flatten\]/ +syn match shaderslangAttribute /^\s*\[forcecase\]/ +syn match shaderslangAttribute /^\s*\[call\]/ +syn match shaderslangAttribute /^\s*\[WaveOpsIncludeHelperLanes\]/ + +syn match shaderslangAttribute /\[raypayload\]/ + +" Work graph shader target attributes +syn match shaderslangAttribute /^\s*\[Shader(\s*"\(\d\|\w\|_\)\+"\s*)\]/ + +" Work graph shader function attributes +syn match shaderslangAttribute /^\s*\[NodeLaunch(\s*"\(broadcasting\|coalescing\|thread\)"\s*)\]/ +syn match shaderslangAttribute /^\s*\[NodeIsProgramEntry\]/ +syn match shaderslangAttribute /^\s*\[NodeLocalRootArgumentsTableIndex(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[NumThreads(\s*\w\+\s*,\s*\w\+\s*,\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[NodeShareInputOf(\s*"\w\+"\(\s*,\s*\w\+\)\?\s*)\]/ +syn match shaderslangAttribute /^\s*\[NodeDispatchGrid(\s*\w\+\s*,\s*\w\+\s*,\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[NodeMaxDispatchGrid(\s*\w\+\s*,\s*\w\+\s*,\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[NodeMaxRecursionDepth(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /^\s*\[NodeMaxInputRecordsPerGraphEntryRecord(\s*\w\+\s*,\s*\(true\|false\)\s*)\]/ + +" Work graph record attributes +syn match shaderslangAttribute /\[NodeTrackRWInputSharing\]/ +syn match shaderslangAttribute /\[MaxRecords(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /\[NodeID(\s*"\w\+"\(\s*,\s*\w\+\)\?\s*)\]/ +syn match shaderslangAttribute /\[MaxRecordsSharedWith(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /\[AllowSparseNodes\]/ +syn match shaderslangAttribute /\[NodeArraySize(\s*\w\+\s*)\]/ +syn match shaderslangAttribute /\[UnboundedSparseNodes\]/ + +" Intrinsic functions +syn keyword shaderslangFunc abs acos acosh asin asinh atan atanh cos cosh exp exp2 floor log log10 log2 round rsqrt sin sincos sinh sqrt tan tanh trunc +syn keyword shaderslangFunc AllMemoryBarrier AllMemoryBarrierWithGroupSync DeviceMemoryBarrier DeviceMemoryBarrierWithGroupSync GroupMemoryBarrier GroupMemoryBarrierWithGroupSync +syn keyword shaderslangFunc abort clip errorf printf +syn keyword shaderslangFunc all any countbits faceforward firstbithigh firstbitlow isfinite isinf isnan max min noise pow reversebits sign +syn keyword shaderslangFunc asdouble asfloat asint asuint D3DCOLORtoUBYTE4 f16tof32 f32tof16 +syn keyword shaderslangFunc ceil clamp degrees fma fmod frac frexp ldexp lerp mad modf radiants saturate smoothstep step +syn keyword shaderslangFunc cross determinant distance dot dst length lit msad4 mul normalize rcp reflect refract transpose +syn keyword shaderslangFunc ddx ddx_coarse ddx_fine ddy ddy_coarse ddy_fine fwidth +syn keyword shaderslangFunc EvaluateAttributeAtCentroid EvaluateAttributeAtSample EvaluateAttributeSnapped +syn keyword shaderslangFunc GetRenderTargetSampleCount GetRenderTargetSamplePosition +syn keyword shaderslangFunc InterlockedAdd InterlockedAnd InterlockedCompareExchange InterlockedCompareStore InterlockedExchange InterlockedMax InterlockedMin InterlockedOr InterlockedXor +syn keyword shaderslangFunc InterlockedCompareStoreFloatBitwise InterlockedCompareExchangeFloatBitwise +syn keyword shaderslangFunc Process2DQuadTessFactorsAvg Process2DQuadTessFactorsMax Process2DQuadTessFactorsMin ProcessIsolineTessFactors +syn keyword shaderslangFunc ProcessQuadTessFactorsAvg ProcessQuadTessFactorsMax ProcessQuadTessFactorsMin ProcessTriTessFactorsAvg ProcessTriTessFactorsMax ProcessTriTessFactorsMin +syn keyword shaderslangFunc tex1D tex1Dbias tex1Dgrad tex1Dlod tex1Dproj +syn keyword shaderslangFunc tex2D tex2Dbias tex2Dgrad tex2Dlod tex2Dproj +syn keyword shaderslangFunc tex3D tex3Dbias tex3Dgrad tex3Dlod tex3Dproj +syn keyword shaderslangFunc texCUBE texCUBEbias texCUBEgrad texCUBElod texCUBEproj +syn keyword shaderslangFunc WaveIsFirstLane WaveGetLaneCount WaveGetLaneIndex +syn keyword shaderslangFunc IsHelperLane +syn keyword shaderslangFunc WaveActiveAnyTrue WaveActiveAllTrue WaveActiveBallot +syn keyword shaderslangFunc WaveReadLaneFirst WaveReadLaneAt +syn keyword shaderslangFunc WaveActiveAllEqual WaveActiveAllEqualBool WaveActiveCountBits +syn keyword shaderslangFunc WaveActiveSum WaveActiveProduct WaveActiveBitAnd WaveActiveBitOr WaveActiveBitXor WaveActiveMin WaveActiveMax +syn keyword shaderslangFunc WavePrefixCountBits WavePrefixProduct WavePrefixSum +syn keyword shaderslangFunc QuadReadAcrossX QuadReadAcrossY QuadReadAcrossDiagonal QuadReadLaneAt +syn keyword shaderslangFunc QuadAny QuadAll +syn keyword shaderslangFunc WaveMatch WaveMultiPrefixSum WaveMultiPrefixProduct WaveMultiPrefixCountBits WaveMultiPrefixAnd WaveMultiPrefixOr WaveMultiPrefixXor +syn keyword shaderslangFunc NonUniformResourceIndex +syn keyword shaderslangFunc DispatchMesh SetMeshOutputCounts +syn keyword shaderslangFunc dot4add_u8packed dot4add_i8packed dot2add + +syn keyword shaderslangFunc RestartStrip +syn keyword shaderslangFunc CalculateLevelOfDetail CalculateLevelOfDetailUnclamped Gather GetDimensions GetSamplePosition Load Sample SampleBias SampleCmp SampleCmpLevelZero SampleGrad SampleLevel GatherRaw SampleCmpLevel +syn keyword shaderslangFunc SampleCmpBias SampleCmpGrad +syn keyword shaderslangFunc WriteSamplerFeedback WriteSamplerFeedbackBias WriteSamplerFeedbackGrad WriteSamplerFeedbackLevel +syn keyword shaderslangFunc Append Consume DecrementCounter IncrementCounter +syn keyword shaderslangFunc Load2 Load3 Load4 Store Store2 Store3 Store4 +syn keyword shaderslangFunc GatherRed GatherGreen GatherBlue GatherAlpha GatherCmp GatherCmpRed GatherCmpGreen GatherCmpBlue GatherCmpAlpha +syn match shaderslangFunc /\.mips\[\d\+\]\[\d\+\]/ +syn match shaderslangFunc /\.sample\[\d\+\]\[\d\+\]/ + +" Ray intrinsics +syn keyword shaderslangFunc AcceptHitAndEndSearch CallShader IgnoreHit ReportHit TraceRay +syn keyword shaderslangFunc DispatchRaysIndex DispatchRaysDimensions +syn keyword shaderslangFunc WorldRayOrigin WorldRayDirection RayTMin RayTCurrent RayFlags +syn keyword shaderslangFunc InstanceIndex InstanceID GeometryIndex PrimitiveIndex ObjectRayOrigin ObjectRayDirection ObjectToWorld3x4 ObjectToWorld4x3 WorldToObject3x4 WorldToObject4x3 +syn keyword shaderslangFunc HitKind + +" RayQuery intrinsics +syn keyword shaderslangFunc TraceRayInline Proceed Abort CommittedStatus +syn keyword shaderslangFunc CandidateType CandidateProceduralPrimitiveNonOpaque CandidateTriangleRayT CandidateInstanceIndex CandidateInstanceID CandidateInstanceContributionToHitGroupIndex CandidateGeometryIndex +syn keyword shaderslangFunc CandidatePrimitiveIndex CandidateObjectRayOrigin CandidateObjectRayDirection CandidateObjectToWorld3x4 CandidateObjectToWorld4x3 CandidateWorldToObject3x4 CandidateWorldToObject4x3 +syn keyword shaderslangFunc CommitNonOpaqueTriangleHit CommitProceduralPrimitiveHit CommittedStatus CommittedRayT CommittedInstanceIndex CommittedInstanceID CommittedInstanceContributionToHitGroupIndex +syn keyword shaderslangFunc CommittedGeometryIndex CommittedPrimitiveIndex CommittedObjectRayOrigin CommittedObjectRayDirection CommittedObjectToWorld3x4 CommittedObjectToWorld4x3 CommittedWorldToObject3x4 +syn keyword shaderslangFunc CommittedWorldToObject4x3 CandidateTriangleBarycentrics CandidateTriangleFrontFace CommittedTriangleBarycentrics CommittedTriangleFrontFace + +" Pack/unpack math intrinsics +syn keyword shaderslangFunc unpack_s8s16 unpack_u8u16 unpack_s8s32 unpack_u8u32 +syn keyword shaderslangFunc pack_u8 pack_s8 pack_clamp_u8 pack_clamp_s8 + +" Work graph object methods +syn keyword shaderslangFunc Get FinishedCrossGroupSharing Count GetThreadNodeOutputRecords GetGroupNodeOutputRecords IsValid GroupIncrementOutputCount ThreadIncrementOutputCount OutputComplete + +" Work graph free intrinsics +syn keyword shaderslangFunc GetRemainingRecursionLevels Barrier + +" Layout Qualifiers +syn keyword shaderslangLayoutQual const row_major column_major +syn keyword shaderslangLayoutQual point line triangle lineadj triangleadj +syn keyword shaderslangLayoutQual InputPatch OutputPatch +syn match shaderslangLayoutQual /PointStream<\s*\w\+\s*>/ +syn match shaderslangLayoutQual /LineStream<\s*\w\+\s*>/ +syn match shaderslangLayoutQual /TriangleStream<\s*\w\+\s*>/ + +" User defined Semantics +syn match shaderslangSemantic /:\s*[A-Z]\w*/ +syn match shaderslangSemantic /:\s*packoffset(\s*c\d\+\(\.[xyzw]\)\?\s*)/ " packoffset +syn match shaderslangSemantic /:\s*register(\s*\(r\|x\|v\|t\|s\|cb\|icb\|b\|c\|u\)\d\+\s*)/ " register +syn match shaderslangSemantic /:\s*read(\s*\(\(anyhit\|closesthit\|miss\|caller\)\s*,\s*\)*\(anyhit\|closesthit\|miss\|caller\)\?\s*)/ " read +syn match shaderslangSemantic /:\s*write(\s*\(\(anyhit\|closesthit\|miss\|caller\)\s*,\s*\)*\(anyhit\|closesthit\|miss\|caller\)\?\s*)/ " write + +" System-Value Semantics +" Vertex Shader +syn match shaderslangSemantic /SV_ClipDistance\d\+/ +syn match shaderslangSemantic /SV_CullDistance\d\+/ +syn keyword shaderslangSemantic SV_Position SV_InstanceID SV_PrimitiveID SV_VertexID +syn keyword shaderslangSemantic SV_StartVertexLocation SV_StartInstanceLocation +" Tessellation pipeline +syn keyword shaderslangSemantic SV_DomainLocation SV_InsideTessFactor SV_OutputControlPointID SV_TessFactor +" Geometry Shader +syn keyword shaderslangSemantic SV_GSInstanceID SV_RenderTargetArrayIndex +" Pixel Shader - MSAA +syn keyword shaderslangSemantic SV_Coverage SV_Depth SV_IsFrontFace SV_SampleIndex +syn match shaderslangSemantic /SV_Target[0-7]/ +syn keyword shaderslangSemantic SV_ShadingRate SV_ViewID +syn match shaderslangSemantic /SV_Barycentrics[0-1]/ +" Compute Shader +syn keyword shaderslangSemantic SV_DispatchThreadID SV_GroupID SV_GroupIndex SV_GroupThreadID +" Mesh shading pipeline +syn keyword shaderslangSemantic SV_CullPrimitive +" Work graph record system values +syn keyword shaderslangSemantic SV_DispatchGrid + +" slang structures +syn keyword shaderslangStructure cbuffer + +" Shader profiles +" Cg profiles +syn keyword shaderslangProfile arbfp1 arbvp1 fp20 vp20 fp30 vp30 ps_1_1 ps_1_2 ps_1_3 +" Shader Model 1 +syn keyword shaderslangProfile vs_1_1 +" Shader Model 2 +syn keyword shaderslangProfile ps_2_0 ps_2_x vs_2_0 vs_2_x +" Shader Model 3 +syn keyword shaderslangProfile ps_3_0 vs_3_0 +" Shader Model 4 +syn keyword shaderslangProfile gs_4_0 ps_4_0 vs_4_0 gs_4_1 ps_4_1 vs_4_1 +" Shader Model 5 +syn keyword shaderslangProfile cs_4_0 cs_4_1 cs_5_0 ds_5_0 gs_5_0 hs_5_0 ps_5_0 vs_5_0 +" Shader Model 6 +syn keyword shaderslangProfile cs_6_0 ds_6_0 gs_6_0 hs_6_0 ps_6_0 vs_6_0 lib_6_0 + +" Swizzling +syn match shaderslangSwizzle /\.[xyzw]\{1,4\}\>/ +syn match shaderslangSwizzle /\.[rgba]\{1,4\}\>/ +syn match shaderslangSwizzle /\.\(_m[0-3]\{2}\)\{1,4\}/ +syn match shaderslangSwizzle /\.\(_[1-4]\{2}\)\{1,4\}/ + +" Other Statements +syn keyword shaderslangStatement discard + +" Storage class +syn match shaderslangStorageClass /\/ +syn match shaderslangStorageClass /\/ +syn keyword shaderslangStorageClass inout +syn keyword shaderslangStorageClass extern nointerpolation precise shared groupshared static uniform volatile +syn keyword shaderslangStorageClass snorm unorm +syn keyword shaderslangStorageClass linear centroid nointerpolation noperspective sample +syn keyword shaderslangStorageClass globallycoherent + +" Types +" Buffer types +syn keyword shaderslangType ConstantBuffer Buffer ByteAddressBuffer ConsumeStructuredBuffer StructuredBuffer +syn keyword shaderslangType AppendStructuredBuffer RWBuffer RWByteAddressBuffer RWStructuredBuffer +syn keyword shaderslangType RasterizerOrderedBuffer RasterizerOrderedByteAddressBuffer RasterizerOrderedStructuredBuffer + +" Scalar types +syn keyword shaderslangType bool int uint dword half float double +syn keyword shaderslangType min16float min10float min16int min12int min16uint +syn keyword shaderslangType float16_t float32_t float64_t + +" Vector types +syn match shaderslangType /vector<\s*\w\+,\s*[1-4]\s*>/ +syn keyword shaderslangType bool1 bool2 bool3 bool4 +syn keyword shaderslangType int1 int2 int3 int4 +syn keyword shaderslangType uint1 uint2 uint3 uint4 +syn keyword shaderslangType dword1 dword2 dword3 dword4 +syn keyword shaderslangType half1 half2 half3 half4 +syn keyword shaderslangType float1 float2 float3 float4 +syn keyword shaderslangType double1 double2 double3 double4 +syn keyword shaderslangType min16float1 min16float2 min16float3 min16float4 +syn keyword shaderslangType min10float1 min10float2 min10float3 min10float4 +syn keyword shaderslangType min16int1 min16int2 min16int3 min16int4 +syn keyword shaderslangType min12int1 min12int2 min12int3 min12int4 +syn keyword shaderslangType min16uint1 min16uint2 min16uint3 min16uint4 +syn keyword shaderslangType float16_t1 float16_t2 float16_t3 float16_t4 +syn keyword shaderslangType float32_t1 float32_t2 float32_t3 float32_t4 +syn keyword shaderslangType float64_t1 float64_t2 float64_t3 float64_t4 +syn keyword shaderslangType int16_t1 int16_t2 int16_t3 int16_t4 +syn keyword shaderslangType int32_t1 int32_t2 int32_t3 int32_t4 +syn keyword shaderslangType int64_t1 int64_t2 int64_t3 int64_t4 +syn keyword shaderslangType uint16_t1 uint16_t2 uint16_t3 uint16_t4 +syn keyword shaderslangType uint32_t1 uint32_t2 uint32_t3 uint32_t4 +syn keyword shaderslangType uint64_t1 uint64_t2 uint64_t3 uint64_t4 + +" Packed types +syn keyword shaderslangType uint8_t4_packed int8_t4_packed + +" Matrix types +syn match shaderslangType /matrix<\s*\w\+\s*,\s*[1-4]\s*,\s*[1-4]\s*>/ +syn keyword shaderslangType bool1x1 bool2x1 bool3x1 bool4x1 bool1x2 bool2x2 bool3x2 bool4x2 bool1x3 bool2x3 bool3x3 bool4x3 bool1x4 bool2x4 bool3x4 bool4x4 +syn keyword shaderslangType int1x1 int2x1 int3x1 int4x1 int1x2 int2x2 int3x2 int4x2 int1x3 int2x3 int3x3 int4x3 int1x4 int2x4 int3x4 int4x4 +syn keyword shaderslangType uint1x1 uint2x1 uint3x1 uint4x1 uint1x2 uint2x2 uint3x2 uint4x2 uint1x3 uint2x3 uint3x3 uint4x3 uint1x4 uint2x4 uint3x4 uint4x4 +syn keyword shaderslangType dword1x1 dword2x1 dword3x1 dword4x1 dword1x2 dword2x2 dword3x2 dword4x2 dword1x3 dword2x3 dword3x3 dword4x3 dword1x4 dword2x4 dword3x4 dword4x4 +syn keyword shaderslangType half1x1 half2x1 half3x1 half4x1 half1x2 half2x2 half3x2 half4x2 half1x3 half2x3 half3x3 half4x3 half1x4 half2x4 half3x4 half4x4 +syn keyword shaderslangType float1x1 float2x1 float3x1 float4x1 float1x2 float2x2 float3x2 float4x2 float1x3 float2x3 float3x3 float4x3 float1x4 float2x4 float3x4 float4x4 +syn keyword shaderslangType double1x1 double2x1 double3x1 double4x1 double1x2 double2x2 double3x2 double4x2 double1x3 double2x3 double3x3 double4x3 double1x4 double2x4 double3x4 double4x4 +syn keyword shaderslangType min16float1x1 min16float2x1 min16float3x1 min16float4x1 min16float1x2 min16float2x2 min16float3x2 min16float4x2 min16float1x3 min16float2x3 min16float3x3 min16float4x3 min16float1x4 min16float2x4 min16float3x4 min16float4x4 +syn keyword shaderslangType min10float1x1 min10float2x1 min10float3x1 min10float4x1 min10float1x2 min10float2x2 min10float3x2 min10float4x2 min10float1x3 min10float2x3 min10float3x3 min10float4x3 min10float1x4 min10float2x4 min10float3x4 min10float4x4 +syn keyword shaderslangType min16int1x1 min16int2x1 min16int3x1 min16int4x1 min16int1x2 min16int2x2 min16int3x2 min16int4x2 min16int1x3 min16int2x3 min16int3x3 min16int4x3 min16int1x4 min16int2x4 min16int3x4 min16int4x4 +syn keyword shaderslangType min12int1x1 min12int2x1 min12int3x1 min12int4x1 min12int1x2 min12int2x2 min12int3x2 min12int4x2 min12int1x3 min12int2x3 min12int3x3 min12int4x3 min12int1x4 min12int2x4 min12int3x4 min12int4x4 +syn keyword shaderslangType min16uint1x1 min16uint2x1 min16uint3x1 min16uint4x1 min16uint1x2 min16uint2x2 min16uint3x2 min16uint4x2 min16uint1x3 min16uint2x3 min16uint3x3 min16uint4x3 min16uint1x4 min16uint2x4 min16uint3x4 min16uint4x4 +syn keyword shaderslangType float16_t1x1 float16_t2x1 float16_t3x1 float16_t4x1 float16_t1x2 float16_t2x2 float16_t3x2 float16_t4x2 float16_t1x3 float16_t2x3 float16_t3x3 float16_t4x3 float16_t1x4 float16_t2x4 float16_t3x4 float16_t4x4 +syn keyword shaderslangType float32_t1x1 float32_t2x1 float32_t3x1 float32_t4x1 float32_t1x2 float32_t2x2 float32_t3x2 float32_t4x2 float32_t1x3 float32_t2x3 float32_t3x3 float32_t4x3 float32_t1x4 float32_t2x4 float32_t3x4 float32_t4x4 +syn keyword shaderslangType float64_t1x1 float64_t2x1 float64_t3x1 float64_t4x1 float64_t1x2 float64_t2x2 float64_t3x2 float64_t4x2 float64_t1x3 float64_t2x3 float64_t3x3 float64_t4x3 float64_t1x4 float64_t2x4 float64_t3x4 float64_t4x4 +syn keyword shaderslangType int16_t1x1 int16_t2x1 int16_t3x1 int16_t4x1 int16_t1x2 int16_t2x2 int16_t3x2 int16_t4x2 int16_t1x3 int16_t2x3 int16_t3x3 int16_t4x3 int16_t1x4 int16_t2x4 int16_t3x4 int16_t4x4 +syn keyword shaderslangType int32_t1x1 int32_t2x1 int32_t3x1 int32_t4x1 int32_t1x2 int32_t2x2 int32_t3x2 int32_t4x2 int32_t1x3 int32_t2x3 int32_t3x3 int32_t4x3 int32_t1x4 int32_t2x4 int32_t3x4 int32_t4x4 +syn keyword shaderslangType int64_t1x1 int64_t2x1 int64_t3x1 int64_t4x1 int64_t1x2 int64_t2x2 int64_t3x2 int64_t4x2 int64_t1x3 int64_t2x3 int64_t3x3 int64_t4x3 int64_t1x4 int64_t2x4 int64_t3x4 int64_t4x4 +syn keyword shaderslangType uint16_t1x1 uint16_t2x1 uint16_t3x1 uint16_t4x1 uint16_t1x2 uint16_t2x2 uint16_t3x2 uint16_t4x2 uint16_t1x3 uint16_t2x3 uint16_t3x3 uint16_t4x3 uint16_t1x4 uint16_t2x4 uint16_t3x4 uint16_t4x4 +syn keyword shaderslangType uint32_t1x1 uint32_t2x1 uint32_t3x1 uint32_t4x1 uint32_t1x2 uint32_t2x2 uint32_t3x2 uint32_t4x2 uint32_t1x3 uint32_t2x3 uint32_t3x3 uint32_t4x3 uint32_t1x4 uint32_t2x4 uint32_t3x4 uint32_t4x4 +syn keyword shaderslangType uint64_t1x1 uint64_t2x1 uint64_t3x1 uint64_t4x1 uint64_t1x2 uint64_t2x2 uint64_t3x2 uint64_t4x2 uint64_t1x3 uint64_t2x3 uint64_t3x3 uint64_t4x3 uint64_t1x4 uint64_t2x4 uint64_t3x4 uint64_t4x4 + +" Sampler types +syn keyword shaderslangType SamplerState SamplerComparisonState +syn keyword shaderslangType sampler sampler1D sampler2D sampler3D samplerCUBE sampler_state + +" Texture types +syn keyword shaderslangType Texture1D Texture1DArray Texture2D Texture2DArray Texture2DMS Texture2DMSArray Texture3D TextureCube TextureCubeArray +syn keyword shaderslangType RWTexture1D RWTexture2D RWTexture2DArray RWTexture3D RWTextureCubeArray RWTexture2DMS RWTexture2DMSArray +syn keyword shaderslangType FeedbackTexture2D FeedbackTexture2DArray +syn keyword shaderslangType RasterizerOrderedTexture1D RasterizerOrderedTexture1DArray RasterizerOrderedTexture2D RasterizerOrderedTexture2DArray RasterizerOrderedTexture3D +syn keyword shaderslangTypeDeprec texture texture1D texture2D texture3D + +" Raytracing types +syn keyword shaderslangType RaytracingAccelerationStructure RayDesc RayQuery BuiltInTriangleIntersectionAttributes + +" Work graph input record objects +syn keyword shaderslangType DispatchNodeInputRecord RWDispatchNodeInputRecord GroupNodeInputRecords RWGroupNodeInputRecords ThreadNodeInputRecord RWThreadNodeInputRecord EmptyNodeInput + +" Work graph output node objects +syn keyword shaderslangType NodeOutput NodeOutputArray EmptyNodeOutput EmptyNodeOutputArray + +" Work graph output record objects +syn keyword shaderslangType ThreadNodeOutputRecords GroupNodeOutputRecords + +" State Groups args +syn case ignore " This section case insensitive + +" Blend state group +syn keyword shaderslangStateGroupArg AlphaToCoverageEnable BlendEnable SrcBlend DestBlend BlendOp SrcBlendAlpha DestBlendAlpha BlendOpAlpha RenderTargetWriteMask +syn keyword shaderslangStateGroupVal ZERO ONE SRC_COLOR INV_SRC_COLOR SRC_ALPHA INV_SRC_ALPHA DEST_ALPHA INV_DEST_ALPHA DEST_COLOR INV_DEST_COLOR SRC_ALPHA_SAT BLEND_FACTOR INV_BLEND_FACTOR SRC1_COLOR INV_SRC1_COLOR SRC1_ALPHA INV_SRC1_ALPHA +syn keyword shaderslangStateGroupVal ADD SUBSTRACT REV_SUBSTRACT MIN MAX + +" Rasterizer state group +syn keyword shaderslangStateGroupArg FillMode CullMode FrontCounterClockwise DepthBias DepthBiasClamp SlopeScaledDepthBias ZClipEnable DepthClipEnable ScissorEnable MultisampleEnable AntialiasedLineEnable +syn keyword shaderslangStateGroupVal SOLID WIREFRAME +syn keyword shaderslangStateGroupVal NONE FRONT BACK + +" Sampler state group +syn keyword shaderslangStateGroupArg Filter AddressU AddressV AddressW MipLODBias MaxAnisotropy ComparisonFunc BorderColor MinLOD MaxLOD ComparisonFilter +syn keyword shaderslangStateGroupVal MIN_MAG_MIP_POINT MIN_MAG_POINT_MIP_LINEAR MIN_POINT_MAG_LINEAR_MIP_POINT MIN_POINT_MAG_MIP_LINEAR MIN_LINEAR_MAG_MIP_POINT MIN_LINEAR_MAG_POINT_MIP_LINEAR MIN_MAG_LINEAR_MIP_POINT MIN_MAG_MIP_LINEAR ANISOTROPIC +syn keyword shaderslangStateGroupVal COMPARISON_MIN_MAG_MIP_POINT COMPARISON_MIN_MAG_POINT_MIP_LINEAR COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT COMPARISON_MIN_POINT_MAG_MIP_LINEAR COMPARISON_MIN_LINEAR_MAG_MIP_POINT +syn keyword shaderslangStateGroupVal COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR COMPARISON_MIN_MAG_LINEAR_MIP_POINT COMPARISON_MIN_MAG_MIP_LINEAR COMPARISON_ANISOTROPIC +syn keyword shaderslangStateGroupVal COMPARISON_NEVER COMPARISON_LESS COMPARISON_EQUAL COMPARISON_LESS_EQUAL COMPARISON_GREATER COMPARISON_NOT_EQUAL COMPARISON_GREATER_EQUAL COMPARISON_ALWAYS +syn keyword shaderslangStateGroupVal WRAP MIRROR CLAMP BORDER MIRROR_ONCE +syn keyword shaderslangStateGroupVal SAMPLER_FEEDBACK_MIN_MIP SAMPLER_FEEDBACK_MIP_REGION_USED + +" Ray flags +syn keyword shaderslangStateGroupVal RAY_FLAG_NONE RAY_FLAG_FORCE_OPAQUE RAY_FLAG_FORCE_NON_OPAQUE RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH RAY_FLAG_SKIP_CLOSEST_HIT_SHADER +syn keyword shaderslangStateGroupVal RAY_FLAG_CULL_BACK_FACING_TRIANGLES RAY_FLAG_CULL_FRONT_FACING_TRIANGLES RAY_FLAG_CULL_OPAQUE RAY_FLAG_CULL_NON_OPAQUE +syn keyword shaderslangStateGroupVal RAY_FLAG_SKIP_TRIANGLES RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES + +" HitKind enum +syn keyword shaderslangStateGroupVal HIT_KIND_TRIANGLE_FRONT_FACE HIT_KIND_TRIANGLE_BACK_FACE + +" RayQuery enums +syn keyword shaderslangStateGroupVal COMMITTED_NOTHING COMMITTED_TRIANGLE_HIT COMMITTED_PROCEDURAL_PRIMITIVE_HIT +syn keyword shaderslangStateGroupVal CANDIDATE_NON_OPAQUE_TRIANGLE CANDIDATE_PROCEDURAL_PRIMITIVE + +" Heap objects +syn keyword shaderslangStateGroupVal ResourceDescriptorHeap SamplerDescriptorHeap + +" Work graph constants +syn keyword shaderslangStateGroupVal UAV_MEMORY GROUP_SHARED_MEMORY NODE_INPUT_MEMORY NODE_OUTPUT_MEMORY ALL_MEMORY GROUP_SYNC GROUP_SCOPE DEVICE_SCOPE + +syn case match " Case sensitive from now on + +" Effect files declarations and functions +" Effect groups, techniques passes +syn keyword shaderslangEffectGroup fxgroup technique11 pass +" Effect functions +syn keyword shaderslangEffectFunc SetBlendState SetDepthStencilState SetRasterizerState SetVertexShader SetHullShader SetDomainShader SetGeometryShader SetPixelShader SetComputeShader CompileShader ConstructGSWithSO SetRenderTargets + +" Default highlighting +hi def link shaderslangProfile shaderslangStatement +hi def link shaderslangStateGroupArg shaderslangStatement +hi def link shaderslangStateGroupVal Number +hi def link shaderslangStatement Statement +hi def link shaderslangType Type +hi def link shaderslangTypeDeprec WarningMsg +hi def link shaderslangStorageClass StorageClass +hi def link shaderslangSemantic PreProc +hi def link shaderslangFunc shaderslangStatement +hi def link shaderslangLayoutQual shaderslangFunc +hi def link shaderslangAnnotation PreProc +hi def link shaderslangStructure Structure +hi def link shaderslangSwizzle SpecialChar +hi def link shaderslangAttribute Statement + +hi def link shaderslangEffectGroup Type +hi def link shaderslangEffectFunc Statement + +let b:current_syntax = "shaderslang" diff --git a/usr/share/vim/vim91/syntax/tiasm.vim b/usr/share/vim/vim91/syntax/tiasm.vim new file mode 100644 index 00000000000..c79596bdfe0 --- /dev/null +++ b/usr/share/vim/vim91/syntax/tiasm.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: TI linear assembly language +" Document: https://downloads.ti.com/docs/esd/SPRUI03B/#SPRUI03B_HTML/assembler-description.html +" Maintainer: Wu, Zhenyu +" Last Change: 2025 Jan 08 + +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" storage types +syn match tiasmType "\.bits" +syn match tiasmType "\.byte" +syn match tiasmType "\.char" +syn match tiasmType "\.cstring" +syn match tiasmType "\.double" +syn match tiasmType "\.field" +syn match tiasmType "\.float" +syn match tiasmType "\.half" +syn match tiasmType "\.int" +syn match tiasmType "\.long" +syn match tiasmType "\.short" +syn match tiasmType "\.string" +syn match tiasmType "\.ubyte" +syn match tiasmType "\.uchar" +syn match tiasmType "\.uhalf" +syn match tiasmType "\.uint" +syn match tiasmType "\.ulong" +syn match tiasmType "\.ushort" +syn match tiasmType "\.uword" +syn match tiasmType "\.word" + +syn match tiasmIdentifier "[a-z_][a-z0-9_]*" + +syn match tiasmDecimal "\<[1-9]\d*\>" display +syn match tiasmOctal "\<0[0-7][0-7]\+\>\|\<[0-7]\+[oO]\>" display +syn match tiasmHexadecimal "\<0[xX][0-9a-fA-F]\+\>\|\<[0-9][0-9a-fA-F]*[hH]\>" display +syn match tiasmBinary "\<0[bB][0-1]\+\>\|\<[01]\+[bB]\>" display + +syn match tiasmFloat "\<\d\+\.\d*\%(e[+-]\=\d\+\)\=\>" display +syn match tiasmFloat "\<\d\%(e[+-]\=\d\+\)\>" display + +syn match tiasmCharacter "'.'\|''\|'[^']'" + +syn region tiasmString start="\"" end="\"" skip="\"\"" + +syn match tiasmFunction "\$[a-zA-Z_][a-zA-Z_0-9]*\ze(" + +syn keyword tiasmTodo contained TODO FIXME XXX NOTE +syn region tiasmComment start=";" end="$" keepend contains=tiasmTodo,@Spell +syn match tiasmComment "^[*!].*" contains=tiasmTodo,@Spell +syn match tiasmLabel "^[^ *!;][^ :]*" + +syn match tiasmInclude "\.include" +syn match tiasmCond "\.if" +syn match tiasmCond "\.else" +syn match tiasmCond "\.endif" +syn match tiasmMacro "\.macro" +syn match tiasmMacro "\.endm" + +syn match tiasmDirective "\.[A-Za-z][0-9A-Za-z-_]*" + +syn case match + +hi def link tiasmLabel Label +hi def link tiasmComment Comment +hi def link tiasmTodo Todo +hi def link tiasmDirective Statement + +hi def link tiasmInclude Include +hi def link tiasmCond PreCondit +hi def link tiasmMacro Macro + +if exists('g:tiasm_legacy_syntax_groups') + hi def link hexNumber Number + hi def link decNumber Number + hi def link octNumber Number + hi def link binNumber Number + hi def link tiasmHexadecimal hexNumber + hi def link tiasmDecimal decNumber + hi def link tiasmOctal octNumber + hi def link tiasmBinary binNumber +else + hi def link tiasmHexadecimal Number + hi def link tiasmDecimal Number + hi def link tiasmOctal Number + hi def link tiasmBinary Number +endif +hi def link tiasmFloat Float + +hi def link tiasmString String +hi def link tiasmStringEscape Special +hi def link tiasmCharacter Character +hi def link tiasmCharacterEscape Special + +hi def link tiasmIdentifier Identifier +hi def link tiasmType Type +hi def link tiasmFunction Function + +let b:current_syntax = "tiasm" diff --git a/usr/share/vim/vim91/syntax/typst.vim b/usr/share/vim/vim91/syntax/typst.vim index dae14247802..b1f05ec8539 100644 --- a/usr/share/vim/vim91/syntax/typst.vim +++ b/usr/share/vim/vim91/syntax/typst.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: Typst -" Maintainer: Gregory Anders -" Last Change: 2024 Nov 02 +" Previous Maintainer: Gregory Anders +" Maintainer: Luca Saccarola +" Last Change: 2024 Dec 09 " Based on: https://github.com/kaarmu/typst.vim if exists('b:current_syntax') diff --git a/usr/share/vim/vim91/syntax/vim.vim b/usr/share/vim/vim91/syntax/vim.vim index eea6e82a89f..04fc8c1fad6 100644 --- a/usr/share/vim/vim91/syntax/vim.vim +++ b/usr/share/vim/vim91/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2024 Oct 08 +" Last Change: 2025 Jan 09 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -26,13 +26,13 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 -" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='' -syn keyword vimCommand contained abo[veleft] abs[tract] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear] comp[iler] con[tinue] -syn keyword vimCommand contained conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] em[enu] en[dif] endfo[r] endt[ry] endw[hile] ene[w] ev[al] ex exi[t] exu[sage] f[ile] files filet[ype] filt[er] fin[d] finall[y] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpg[rep] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] ij[ump] il[ist] imp[ort] -syn keyword vimCommand contained int[ro] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile] lv[imgrep] lvimgrepa[dd] lw[indow] ls m[ove] ma[rk] mak[e] marks menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile] -syn keyword vimCommand contained n[ext] nb[key] nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pc[lose] pe[rl] perld[o] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redi[r] redr[aw] redraws[tatus] redrawt[abline] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas] sb[uffer] -syn keyword vimCommand contained sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] sc[riptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] si[malt] sig[n] sil[ent] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sr[ewind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] tcl tcld[o] tclf[ile] te[aroff] ter[minal] tf[irst] -syn keyword vimCommand contained tj[ump] tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim[grep] vimgrepa[dd] vim9[cmd] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] winc[md] wind[o] winp[os] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i +" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang' +syn keyword vimCommand contained abo[veleft] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear] comp[iler] con[tinue] conf[irm] nextgroup=vimBang +syn keyword vimCommand contained cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] em[enu] en[dif] endfo[r] endt[ry] endw[hile] ene[w] ev[al] ex exi[t] exu[sage] f[ile] files filet[ype] filt[er] fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpg[rep] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] hor[izontal] ij[ump] il[ist] imp[ort] int[ro] is[earch] nextgroup=vimBang +syn keyword vimCommand contained isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile] lv[imgrep] lvimgrepa[dd] lw[indow] ls m[ove] ma[rk] mak[e] marks menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile] n[ext] nb[key] nextgroup=vimBang +syn keyword vimCommand contained nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] pe[rl] perld[o] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redi[r] redr[aw] redraws[tatus] redrawt[abline] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas] sb[uffer] sbN[ext] nextgroup=vimBang +syn keyword vimCommand contained sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sil[ent] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] tcl tcld[o] tclf[ile] te[aroff] ter[minal] tf[irst] tj[ump] nextgroup=vimBang +syn keyword vimCommand contained tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim[grep] vimgrepa[dd] vim9[cmd] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] winc[md] wind[o] winp[os] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang " Lower priority for _new_ to distinguish constructors from the command. syn match vimCommand contained "\(\@!" @@ -43,12 +43,12 @@ syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue Di " GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' syn keyword vimOption contained al aleph ari allowrevins ambw ambiwidth arab arabic arshape arabicshape acd autochdir ai autoindent ar autoread asd autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw cinwords cb clipboard ch cmdheight cwh cmdwinheight cc colorcolumn co columns com comments cms commentstring cp compatible cpt complete cfu completefunc skipwhite nextgroup=vimSetEqual,vimSetMod syn keyword vimOption contained cia completeitemalign cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore et expandtab ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats skipwhite nextgroup=vimSetEqual,vimSetMod -syn keyword vimOption contained fic fileignorecase ft filetype fcs fillchars fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch skipwhite nextgroup=vimSetEqual,vimSetMod -syn keyword vimOption contained imsf imstatusfunc imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot mis menuitems msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse skipwhite nextgroup=vimSetEqual,vimSetMod -syn keyword vimOption contained mousef mousefocus mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pw pumwidth pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber skipwhite nextgroup=vimSetEqual,vimSetMod -syn keyword vimOption contained remap rop renderoptions report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode stal showtabline ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck skipwhite nextgroup=vimSetEqual,vimSetMod -syn keyword vimOption contained spf spellfile spl spelllang spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse skipwhite nextgroup=vimSetEqual,vimSetMod -syn keyword vimOption contained tsl ttyscroll tty ttytype udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight wmw winminwidth winptydll wiw winwidth wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained fic fileignorecase ft filetype fcs fillchars ffu findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained ims imsearch imsf imstatusfunc imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot mis menuitems mopt messagesopt msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained mod modified more mouse mousef mousefocus mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pw pumwidth pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained rnu relativenumber remap rop renderoptions report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode stal showtabline ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained spc spellcapcheck spf spellfile spl spelllang spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight wmw winminwidth winptydll wiw winwidth wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes skipwhite nextgroup=vimSetEqual,vimSetMod " vimOptions: These are the turn-off setting variants {{{2 " GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR='' @@ -95,21 +95,21 @@ syn keyword vimGroup contained Comment Constant String Character Number Boolean " Default highlighting groups {{{2 " GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR='' -syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText PmenuSbar TabLineSel TabLineFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuMatch PmenuMatchSel PmenuExtra PmenuExtraSel Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn MatchParen StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton Menu Tooltip Scrollbar CursorIM LineNrAbove LineNrBelow +syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText PmenuSbar TabLineSel TabLineFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuMatch PmenuMatchSel PmenuExtra PmenuExtraSel ComplMatchIns Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn MatchParen StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton Menu Tooltip Scrollbar CursorIM LineNrAbove LineNrBelow syn match vimHLGroup contained "\" syn case match " Function Names {{{2 " GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR='' -syn keyword vimFuncName contained abs acos add and append appendbufline argc argidx arglistid argv asin assert_beeps assert_equal assert_equalfile assert_exception assert_fails assert_false assert_inrange assert_match assert_nobeep assert_notequal assert_notmatch assert_report assert_true atan atan2 autocmd_add autocmd_delete autocmd_get balloon_gettext balloon_show balloon_split bindtextdomain blob2list browse browsedir bufadd bufexists buflisted bufload bufloaded bufname bufnr bufwinid bufwinnr byte2line byteidx byteidxcomp call ceil ch_canread ch_close ch_close_in ch_evalexpr ch_evalraw ch_getbufnr ch_getjob ch_info ch_log ch_logfile ch_open ch_read ch_readblob ch_readraw ch_sendexpr ch_sendraw ch_setoptions ch_status changenr char2nr charclass charcol charidx -syn keyword vimFuncName contained chdir cindent clearmatches col complete complete_add complete_check complete_info confirm copy cos cosh count cscope_connection cursor debugbreak deepcopy delete deletebufline did_filetype diff diff_filler diff_hlID digraph_get digraph_getlist digraph_set digraph_setlist echoraw empty environ err_teapot escape eval eventhandler executable execute exepath exists exists_compiled exp expand expandcmd extend extendnew feedkeys filecopy filereadable filewritable filter finddir findfile flatten flattennew float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreach foreground fullcommand funcref function garbagecollect get getbufinfo getbufline getbufoneline getbufvar getcellwidths getchangelist -syn keyword vimFuncName contained getchar getcharmod getcharpos getcharsearch getcharstr getcmdcomplpat getcmdcompltype getcmdline getcmdpos getcmdprompt getcmdscreenpos getcmdtype getcmdwintype getcompletion getcurpos getcursorcharpos getcwd getenv getfontname getfperm getfsize getftime getftype getimstatus getjumplist getline getloclist getmarklist getmatches getmousepos getmouseshape getpid getpos getqflist getreg getreginfo getregion getregionpos getregtype getscriptinfo gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlID hlexists hlget hlset hostname iconv id indent index indexof input inputdialog inputlist -syn keyword vimFuncName contained inputrestore inputsave inputsecret insert instanceof interrupt invert isabsolutepath isdirectory isinf islocked isnan items job_getchannel job_info job_setoptions job_start job_status job_stop join js_decode js_encode json_decode json_encode keys keytrans len libcall libcallnr line line2byte lispindent list2blob list2str listener_add listener_flush listener_remove localtime log log10 luaeval map maparg mapcheck maplist mapnew mapset match matchadd matchaddpos matcharg matchbufline matchdelete matchend matchfuzzy matchfuzzypos matchlist matchstr matchstrlist matchstrpos max menu_info min mkdir mode mzeval nextnonblank nr2char or pathshorten perleval popup_atcursor popup_beval popup_clear popup_close popup_create popup_dialog popup_filter_menu -syn keyword vimFuncName contained popup_filter_yesno popup_findecho popup_findinfo popup_findpreview popup_getoptions popup_getpos popup_hide popup_list popup_locate popup_menu popup_move popup_notification popup_setbuf popup_setoptions popup_settext popup_show pow prevnonblank printf prompt_getprompt prompt_setcallback prompt_setinterrupt prompt_setprompt prop_add prop_add_list prop_clear prop_find prop_list prop_remove prop_type_add prop_type_change prop_type_delete prop_type_get prop_type_list pum_getpos pumvisible py3eval pyeval pyxeval rand range readblob readdir readdirex readfile reduce reg_executing reg_recording reltime reltimefloat reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remote_startserver remove rename repeat resolve -syn keyword vimFuncName contained reverse round rubyeval screenattr screenchar screenchars screencol screenpos screenrow screenstring search searchcount searchdecl searchpair searchpairpos searchpos server2client serverlist setbufline setbufvar setcellwidths setcharpos setcharsearch setcmdline setcmdpos setcursorcharpos setenv setfperm setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar settagstack setwinvar sha256 shellescape shiftwidth sign_define sign_getdefined sign_getplaced sign_jump sign_place sign_placelist sign_undefine sign_unplace sign_unplacelist simplify sin sinh slice sort sound_clear sound_playevent sound_playfile sound_stop soundfold spellbadword spellsuggest split sqrt srand state str2float str2list str2nr strcharlen strcharpart -syn keyword vimFuncName contained strchars strdisplaywidth strftime strgetchar stridx string strlen strpart strptime strridx strtrans strutf16len strwidth submatch substitute swapfilelist swapinfo swapname synID synIDattr synIDtrans synconcealed synstack system systemlist tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname term_dumpdiff term_dumpload term_dumpwrite term_getaltscreen term_getansicolors term_getattr term_getcursor term_getjob term_getline term_getscrolled term_getsize term_getstatus term_gettitle term_gettty term_list term_scrape term_sendkeys term_setansicolors term_setapi term_setkill term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail test_autochdir test_feedinput test_garbagecollect_now test_garbagecollect_soon -syn keyword vimFuncName contained test_getvalue test_gui_event test_ignore_error test_mswin_event test_null_blob test_null_channel test_null_dict test_null_function test_null_job test_null_list test_null_partial test_null_string test_option_not_set test_override test_refcount test_setmouse test_settime test_srand_seed test_unknown test_void timer_info timer_pause timer_start timer_stop timer_stopall tolower toupper tr trim trunc type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol windowsversion winheight winlayout winline winnr winrestcmd winrestview winsaveview -syn keyword vimFuncName contained winwidth wordcount writefile xor +syn keyword vimFuncName contained abs acos add and append appendbufline argc argidx arglistid argv asin assert_beeps assert_equal assert_equalfile assert_exception assert_fails assert_false assert_inrange assert_match assert_nobeep assert_notequal assert_notmatch assert_report assert_true atan atan2 autocmd_add autocmd_delete autocmd_get balloon_gettext balloon_show balloon_split base64_decode base64_encode bindtextdomain blob2list browse browsedir bufadd bufexists buflisted bufload bufloaded bufname bufnr bufwinid bufwinnr byte2line byteidx byteidxcomp call ceil ch_canread ch_close ch_close_in ch_evalexpr ch_evalraw ch_getbufnr ch_getjob ch_info ch_log ch_logfile ch_open ch_read ch_readblob ch_readraw ch_sendexpr ch_sendraw ch_setoptions ch_status changenr char2nr +syn keyword vimFuncName contained charclass charcol charidx chdir cindent clearmatches col complete complete_add complete_check complete_info confirm copy cos cosh count cscope_connection cursor debugbreak deepcopy delete deletebufline did_filetype diff diff_filler diff_hlID digraph_get digraph_getlist digraph_set digraph_setlist echoraw empty environ err_teapot escape eval eventhandler executable execute exepath exists exists_compiled exp expand expandcmd extend extendnew feedkeys filecopy filereadable filewritable filter finddir findfile flatten flattennew float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreach foreground fullcommand funcref function garbagecollect get getbufinfo getbufline getbufoneline +syn keyword vimFuncName contained getbufvar getcellpixels getcellwidths getchangelist getchar getcharmod getcharpos getcharsearch getcharstr getcmdcomplpat getcmdcompltype getcmdline getcmdpos getcmdprompt getcmdscreenpos getcmdtype getcmdwintype getcompletion getcurpos getcursorcharpos getcwd getenv getfontname getfperm getfsize getftime getftype getimstatus getjumplist getline getloclist getmarklist getmatches getmousepos getmouseshape getpid getpos getqflist getreg getreginfo getregion getregionpos getregtype getscriptinfo getstacktrace gettabinfo gettabvar gettabwinvar gettagstack gettext getwininfo getwinpos getwinposx getwinposy getwinvar glob glob2regpat globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlID hlexists hlget hlset hostname +syn keyword vimFuncName contained iconv id indent index indexof input inputdialog inputlist inputrestore inputsave inputsecret insert instanceof interrupt invert isabsolutepath isdirectory isinf islocked isnan items job_getchannel job_info job_setoptions job_start job_status job_stop join js_decode js_encode json_decode json_encode keys keytrans len libcall libcallnr line line2byte lispindent list2blob list2str listener_add listener_flush listener_remove localtime log log10 luaeval map maparg mapcheck maplist mapnew mapset match matchadd matchaddpos matcharg matchbufline matchdelete matchend matchfuzzy matchfuzzypos matchlist matchstr matchstrlist matchstrpos max menu_info min mkdir mode mzeval nextnonblank nr2char or pathshorten perleval popup_atcursor popup_beval +syn keyword vimFuncName contained popup_clear popup_close popup_create popup_dialog popup_filter_menu popup_filter_yesno popup_findecho popup_findinfo popup_findpreview popup_getoptions popup_getpos popup_hide popup_list popup_locate popup_menu popup_move popup_notification popup_setbuf popup_setoptions popup_settext popup_show pow prevnonblank printf prompt_getprompt prompt_setcallback prompt_setinterrupt prompt_setprompt prop_add prop_add_list prop_clear prop_find prop_list prop_remove prop_type_add prop_type_change prop_type_delete prop_type_get prop_type_list pum_getpos pumvisible py3eval pyeval pyxeval rand range readblob readdir readdirex readfile reduce reg_executing reg_recording reltime reltimefloat reltimestr remote_expr remote_foreground remote_peek +syn keyword vimFuncName contained remote_read remote_send remote_startserver remove rename repeat resolve reverse round rubyeval screenattr screenchar screenchars screencol screenpos screenrow screenstring search searchcount searchdecl searchpair searchpairpos searchpos server2client serverlist setbufline setbufvar setcellwidths setcharpos setcharsearch setcmdline setcmdpos setcursorcharpos setenv setfperm setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar settagstack setwinvar sha256 shellescape shiftwidth sign_define sign_getdefined sign_getplaced sign_jump sign_place sign_placelist sign_undefine sign_unplace sign_unplacelist simplify sin sinh slice sort sound_clear sound_playevent sound_playfile sound_stop soundfold spellbadword spellsuggest +syn keyword vimFuncName contained split sqrt srand state str2float str2list str2nr strcharlen strcharpart strchars strdisplaywidth strftime strgetchar stridx string strlen strpart strptime strridx strtrans strutf16len strwidth submatch substitute swapfilelist swapinfo swapname synID synIDattr synIDtrans synconcealed synstack system systemlist tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname term_dumpdiff term_dumpload term_dumpwrite term_getaltscreen term_getansicolors term_getattr term_getcursor term_getjob term_getline term_getscrolled term_getsize term_getstatus term_gettitle term_gettty term_list term_scrape term_sendkeys term_setansicolors term_setapi term_setkill term_setrestore term_setsize term_start term_wait terminalprops test_alloc_fail +syn keyword vimFuncName contained test_autochdir test_feedinput test_garbagecollect_now test_garbagecollect_soon test_getvalue test_gui_event test_ignore_error test_mswin_event test_null_blob test_null_channel test_null_dict test_null_function test_null_job test_null_list test_null_partial test_null_string test_option_not_set test_override test_refcount test_setmouse test_settime test_srand_seed test_unknown test_void timer_info timer_pause timer_start timer_stop timer_stopall tolower toupper tr trim trunc type typename undofile undotree uniq utf16idx values virtcol virtcol2col visualmode wildmenumode win_execute win_findbuf win_getid win_gettype win_gotoid win_id2tabwin win_id2win win_move_separator win_move_statusline win_screenpos win_splitmove winbufnr wincol +syn keyword vimFuncName contained windowsversion winheight winlayout winline winnr winrestcmd winrestview winsaveview winwidth wordcount writefile xor "--- syntax here and above generated by mkvimvim --- " Special Vim Highlighting (not automatic) {{{1 @@ -241,9 +241,9 @@ syn case match " All vimCommands are contained by vimIsCommand. {{{2 syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList -syn cluster vim9CmdList contains=vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var +syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1 -syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand +syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" nextgroup=vimBang contains=vimCommand syn match vimBang contained "!" syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" @@ -252,7 +252,6 @@ syn match vimVar "\s\zs&t_\S[a-zA-Z0-9]\>" syn match vimVar "\s\zs&t_k;" syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" syn keyword vimCommand contained in -syn match vimBang contained "!" syn cluster vimExprList contains=vimEnvvar,vimFunc,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar,@vim9ExprList syn cluster vim9ExprList contains=vim9Boolean,vim9Null @@ -320,7 +319,8 @@ syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBan " Operators: {{{2 " ========= syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar,vimBoolean,vimNull -syn match vimOper "||\|&&\|[-+*/%.!]" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "\a\@=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "\(\" skipwhite nextgroup=vimString,vimSpecFile syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup @@ -354,8 +354,8 @@ syn match vimFuncSID contained "\<[sg]:" syn keyword vimFuncKey contained fu[nction] syn keyword vimDefKey contained def -syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipempty nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError contains=vimFuncParam,@vimContinue -syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError contains=vimDefParam,vim9Comment,vimFuncParamEquals +syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipempty nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError contains=vimFuncParam,vimOperParen,@vimContinue +syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError contains=vimDefParam,vim9Comment,vimFuncParamEquals,vimOperParen syn match vimFuncParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFuncParamEquals syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFuncParamEquals @@ -598,19 +598,21 @@ syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\ syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline syn match vimNotPatSep contained "\\\\" syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell -syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ contains=@vimStringGroup extend -syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+ extend +syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ contains=@vimStringGroup extend +syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ contains=vimQuoteEscape extend "syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ + syn match vimEscape contained "\\." " syn match vimEscape contained +\\[befnrt\"]+ syn match vimEscape contained "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}" syn match vimEscape contained "\\<" contains=vimNotation syn match vimEscape contained "\\<\*[^>]*>\=>" +syn match vimQuoteEscape contained "''" -syn region vimString oneline start=+$'+ skip=+''+ end=+'+ contains=@vimStringInterpolation extend -syn region vimString oneline start=+$"+ end=+"+ contains=@vimStringGroup,@vimStringInterpolation extend +syn region vimString oneline matchgroup=vimString start=+$'+ skip=+''+ end=+'+ contains=vimQuoteEscape,@vimStringInterpolation extend +syn region vimString oneline matchgroup=vimString start=+$"+ end=+"+ contains=@vimStringGroup,@vimStringInterpolation extend syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList syn match vimStringInterpolationBrace contained "{{" syn match vimStringInterpolationBrace contained "}}" @@ -723,10 +725,12 @@ syn keyword vimAbb abc[lear] cabc[lear] iabc[lear] skipwhite nextgroup=vimMapMod " Autocmd: {{{2 " ======= -syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace +syn match vimAutoCmdBang contained "\a\@1<=!" skipwhite nextgroup=vimAutoEventList +syn match vimAutoEventList contained "\%(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod,vimAutoCmdBlock -syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList +syn keyword vimAutoCmd au[tocmd] skipwhite nextgroup=vimAutoCmdBang,vimAutoEventList +syn keyword vimAutoCmd do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" skipwhite nextgroup=vimAutoCmdBlock syn region vimAutoCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList @@ -1315,6 +1319,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimAugroupError vimError hi def link vimAugroupKey vimCommand hi def link vimAutoCmd vimCommand + hi def link vimAutoCmdBang vimBang hi def link vimAutoEvent Type hi def link vimAutoCmdMod Special hi def link vimBang vimOper @@ -1435,6 +1440,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimPattern Type hi def link vimPlainMark vimMark hi def link vimPlainRegister vimRegister + hi def link vimQuoteEscape vimEscape hi def link vimRegister SpecialChar hi def link vimScriptDelim Comment hi def link vimSearchDelim Statement diff --git a/usr/share/vim/vim91/syntax/xf86conf.vim b/usr/share/vim/vim91/syntax/xf86conf.vim index e8162f3a35e..0f4e5036ffd 100644 --- a/usr/share/vim/vim91/syntax/xf86conf.vim +++ b/usr/share/vim/vim91/syntax/xf86conf.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: XF86Config (XFree86 configuration file) +" Maintainer: This runtime file is looking for a new maintainer. +" Last Change: 2025 Jan 06 by Jan-Arvid Harrach (#16397) " Former Maintainer: David Ne\v{c}as (Yeti) " Last Change By David: 2010 Nov 01 -" Last Change: 2023 Jan 23 -" Required Vim Version: 6.0 " " Options: let xf86conf_xfree86_version = 3 or 4 " to force XFree86 3.x or 4.x XF86Config syntax @@ -58,7 +58,7 @@ syn match xf86confModeLineValue "\"[^\"]\+\"\(\_s\+[0-9.]\+\)\{9}" nextgroup=xf8 " Sections and subsections if b:xf86conf_xfree86_version >= 4 - syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError + syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\|OutputClass\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError syn region xf86confSectionModule matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Module\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOption,xf86confKeyword syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment @@ -162,7 +162,7 @@ syn match xf86confSync "\(\s\+[+-][CHV]_*Sync\)\+" contained " Synchronization if b:xf86conf_xfree86_version >= 4 - syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\"" + syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\|OutputClass\)\"" syn sync match xf86confSyncSectionModule grouphere xf86confSectionModule "^\s*Section\s\+\"Module\"" syn sync match xf86confSyncSectionModes groupthere xf86confSectionModes "^\s*Section\s\+\"Modes\"" else diff --git a/usr/share/vim/vim91/syntax/zsh.vim b/usr/share/vim/vim91/syntax/zsh.vim index 084f8cdb41d..04b39aeac07 100644 --- a/usr/share/vim/vim91/syntax/zsh.vim +++ b/usr/share/vim/vim91/syntax/zsh.vim @@ -2,7 +2,7 @@ " Language: Zsh shell script " Maintainer: Christian Brabandt " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2022-07-26 +" Latest Revision: 2024 Jan 04 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh @@ -48,8 +48,9 @@ syn match zshPOSIXQuoted '\\u[0-9a-fA-F]\{1,4}' syn match zshPOSIXQuoted '\\U[1-9a-fA-F]\{1,8}' syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+ - \ contains=zshQuoted,@zshDerefs,@zshSubstQuoted fold + \ contains=@Spell,zshQuoted,@zshDerefs,@zshSubstQuoted fold syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold + \ contains=@Spell syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+ \ skip=+\\[\\']+ end=+'+ contains=zshPOSIXQuoted,zshQuoted syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)' @@ -68,7 +69,7 @@ syn keyword zshConditional if then elif else fi esac select syn keyword zshCase case nextgroup=zshCaseWord skipwhite syn match zshCaseWord /\S\+/ nextgroup=zshCaseIn skipwhite contained transparent -syn keyword zshCaseIn in nextgroup=zshCasePattern skipwhite skipnl contained +syn keyword zshCaseIn in nextgroup=zshComment,zshCasePattern skipwhite skipnl contained syn match zshCasePattern /\S[^)]*)/ contained syn keyword zshRepeat while until repeat @@ -94,22 +95,24 @@ syn match zshRedir '|\@1' - \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString + \ end='^\z1$' + \ contains=@Spell,@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString syn region zshHereDoc matchgroup=zshRedir \ start='<\@' - \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString + \ end='^\z1$' + \ contains=@Spell syn region zshHereDoc matchgroup=zshRedir \ start='<\@' - \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString + \ end='^\t*\z1$' + \ contains=@Spell syn region zshHereDoc matchgroup=zshRedir \ start=+<\@' + \ end='^\z1$' + \ contains=@Spell syn region zshHereDoc matchgroup=zshRedir \ start=+<\@' + \ end='^\t*\z1$' + \ contains=@Spell syn match zshVariable '\<\h\w*' contained diff --git a/usr/share/vim/vim91/tutor/README.ru.utf-8.txt b/usr/share/vim/vim91/tutor/README.ru.utf-8.txt index 58be0d5270d..60ac961d480 100644 --- a/usr/share/vim/vim91/tutor/README.ru.utf-8.txt +++ b/usr/share/vim/vim91/tutor/README.ru.utf-8.txt @@ -5,7 +5,7 @@ операции над текстом с помощью редактора Vim. Файл, содержащий обучающие уроки, называется «tutor». Чтобы начать с ним -работать, просто наберите команду "vim tutor" и следуйте инструкциям, +работать, просто наберите команду "vim tutor1" и следуйте инструкциям, преведённым в уроках. Задания в учебнике предполагают редактирование файла, поэтому НЕ ДЕЛАЙТЕ ЭТОГО В ОРИГИНАЛЬНОЙ КОПИИ ФАЙЛА. @@ -20,20 +20,27 @@ (303) 273-3987 bware@mines.colorado.edu bware@slate.mines.colorado.edu bware@mines.bitnet +Все вышесказанное, касающееся первой главы учебника, также относится ко +второй главе учебника. За исключением того, что для открытия второй главы +необходимо воспользоваться командой "vim tutor2". + +Вторая глава учебника была написана Полом Д. Паркером (Paul D. Parker). Переводы ----------- -Файлы tutor.xx и tutor.xx.utf-8 являются переводами учебника (где xx — код -языка). Кодировка текста в файлах tutor.xx может быть latin1 или другая -традиционная кодировка. Если не требуется перевод в такой традиционной -кодировке, вам нужно просто подготовить файл tutor.xx.utf-8. -Если необходима другая кодировка текста, вы также можете сделать такой файл, -его наименование должно быть tutor.xx.enc (замените «enc» на фактическое -название кодировки). Возможно, что для этого потребуется настроить файл -«tutor.vim». -Для создания файла tutor.xx из tutor.xx.utf-8 можно использовать команду "make". -Посмотрите файл «Makefile», чтобы получить подробной информации. (Для некоторых -языков файл tutor.xx.utf-8 создаётся из tutor.xx в силу сложившихся причин). +Файлы tutor1.xx и tutor1.xx.utf-8 для первой главыи, и tutor2.xx и +tutor2.xx.utf-8 для второй главы, являются переводами учебника (где xx — код +языка). Кодировка текста в файлах tutor1.xx или tutor2.xx может быть latin1 или +другая традиционная кодировка. Если не требуется перевод в такой традиционной +кодировке, вам нужно просто подготовить файл tutor1.xx.utf-8 tutor2.xx.utf-8. +Если необходима другая кодировка текста, вы также можете сделать такой файл, его +наименование должно быть tutor1.xx.enc tutor1.xx.enc (замените «enc» на +фактическое название кодировки). Возможно, что для этого потребуется настроить +файл «tutor.vim». +Для создания файла tutor1.xx или tutor2.xx из tutor1.xx.utf-8 или +tutor2.xx.utf-8 соответственно, можно использовать команду "make". Посмотрите +файл «Makefile», чтобы получить подробную информацию. (Для некоторых языков файл +tutor1.xx.utf-8 создаётся из tutor1.xx в силу исторических причин). [Брам Моленар (Bram Moolenaar) и др. изменили этот файл для редактора Vim] diff --git a/usr/share/vim/vim91/tutor/README.txt b/usr/share/vim/vim91/tutor/README.txt index 060268e3032..a8b48a4058f 100644 --- a/usr/share/vim/vim91/tutor/README.txt +++ b/usr/share/vim/vim91/tutor/README.txt @@ -4,12 +4,12 @@ Most new users can get through it in less than one hour. The result is that you can do a simple editing task using the Vim editor. Tutor is a file that contains the tutorial lessons. You can simply -execute "vim tutor" and then follow the instructions in the lessons. +execute "vim tutor1" and then follow the instructions in the lessons. The lessons tell you to modify the file, so DON'T DO THIS ON YOUR ORIGINAL COPY. -On Unix you can also use the "vimtutor" program. It will make a -scratch copy of the tutor first. +On UNIX-like systems you can also use the "vimtutor" program. +It will make a scratch copy of the tutor first. I have considered adding more advanced lessons but have not found the time. Please let me know how you like it and send any improvements you @@ -19,19 +19,26 @@ Bob Ware, Colorado School of Mines, Golden, Co 80401, USA (303) 273-3987 bware@mines.colorado.edu bware@slate.mines.colorado.edu bware@mines.bitnet +All of the above regarding chapter one of the tutorial also applies to chapter +two of the tutorial. Except that you must use the command “vim tutor2” to open +chapter two. + +The chapter two of the tutorial was written by Paul D. Parker. Translation ----------- - -The tutor.xx and tutor.xx.utf-8 files are translated files (where xx is the -language code). The encoding of tutor.xx might be latin1 or other traditional +The files tutor1.xx and tutor1.xx.utf-8 for chapter one and tutor2.xx and +tutor2.xx.utf-8 for chapter two of the tutorial are translated files (where xx +is the language code). +The encoding of tutor1.xx or tutor2.xx might be latin1 or other traditional encoding. If you don't need a translation with such traditional encoding, -you just need to prepare the tutor.xx.utf-8 file. -If you need another encoding, you can also prepare a file named tutor.xx.enc -(replace enc with the actual encoding name). You might also need to adjust the -tutor.vim file. -The "make" command can be used for creating tutor.xx from tutor.xx.utf-8. -See the Makefile for detail. (For some languages, tutor.xx.utf-8 is created -from tutor.xx for historical reasons.) +you just need to prepare the tutor1.xx.utf-8 or tutor2.xx.utf-8 file. +If you need another encoding, you can also prepare a file named tutor1.xx.enc or +tutor2.xx.enc (replace enc with the actual encoding name). You might also need +to adjust the tutor.vim file. +The "make" command can be used for creating tutor1.xx or tutor2.xx from +tutor.xx.utf-8 or tutor2.xx.utf-8, respectively. +See the Makefile for detail. (For some languages, tutor1.xx.utf-8 is created +from tutor1.xx for historical reasons.) [This file was modified for Vim by Bram Moolenaar et al.] diff --git a/usr/share/vim/vim91/tutor/it/vim-01-beginner.tutor b/usr/share/vim/vim91/tutor/it/vim-01-beginner.tutor new file mode 100644 index 00000000000..bb8787aaafe --- /dev/null +++ b/usr/share/vim/vim91/tutor/it/vim-01-beginner.tutor @@ -0,0 +1,1029 @@ +# Benvenuto alla guida introduttiva VIM + +Vim è un editor molto potente, che ha molti comandi, troppi per poterli +spiegare in una guida introduttiva come questa. Questa guida introduttiva è +stata preparata per descrivere i comandi che servono a poter usare facilmente +Vim come editor di uso generale. È IMPORTANTE ricordarsi che questa guida è +stata preparata per apprendere facendo pratica. Ciò significa che occorre fare +gli esercizi, per poter apprendere davvero. Limitandosi a leggere il testo, si +finirebbe per dimenticare presto le cose più importanti! + +Per iniziare, assicuratevi che il tasto di blocco maiuscole NON sia premuto e +premete ripetutamente il tasto `j`{normal} per muovere il cursore, finché la +Lezione 0 riempia completamente lo schermo. + +# Lezione 0 + +NOTA: I comandi dati durante le lezioni modificheranno il testo, ma le +modifiche da voi effettuate non saranno salvate. Quindi non preoccupatevi +se fate pasticci; ricordate che premendo il tasto []() e poi +[u](u) verrà annullata l'ultima modifica. + +Questa guida è interattiva, e ci sono alcune cose che dovreste sapere. +- Battete []() sui link [come questo](holy-grail ) per aprire la parte di help relativa. +- O semplicemente battete [K](K) su una parola qualsiasi per trovare la relativa + documentazione! +- Talvolta vi viene richiesto di modificare righe di testo come +questa qui +Una volta fatte correttamente le modifiche richieste, il segno ✗ a sinistra +della riga diverrà ✓. Penso iniziate a intuire quanto Vim sia bello. ;) +Altre volte vi viene richiesto di eseguire un comando (vedere più sotto): +~~~ cmd + :help +~~~ +o di battere una sequenza di tasti +~~~ normal + 0fd3wP$P +~~~ + +I testi racchiusi tra i segni '<' e '>' (come ``{normal}) indicano un tasto +da premere, invece di un testo da immettere. + +Ora, avanziamo verso la prossima Lezione (usa il tasto `j`{normal} per scorrere +verso il basso). + +# Lezione 1.1: SPOSTARE IL CURSORE + +** Per spostare il cursore, premete i tasti `h`, `j`, `k`, `l` come indicato. + + ↑ + k Nota: Il tasto `h`{normal} è a sinistra e sposta a sinistra. + ← h l → Il tasto `l`{normal} è a destra e sposta a destra. + j Il tasto `j`{normal} assomiglia a una freccia in giù. + ↓ + + 1. Muovete il cursore sullo schermo, finché vi sentite a vostro agio. + + 2. Tenete schiacciato il tasto "giù" (`j`{normal}) per far ripetere l'azione. + Adesso sapete come andare alla prossima Lezione. + + 3. Usando il tasto "giù", passate alla Lezione 1.2. + +NOTA: Se non siete sicuri di aver usato i tasti giusti, premete per + tornare al modo Normal. Poi immettete ancora il comando che volevate. + +NOTA: I tasti del cursore hanno lo steso effetto. Ma usando hjkl sarete in grado + di spostarvi molto più velocemente, dopo che vi siete abituati. Davvero! + +# Lezione 1.2: USCIRE DA VIM + +!! NOTA: Prima di eseguire i passi elencati sotto, +leggetevi l'intera Lezione !! + + 1. Premete il tasto (per accertarvi di essere nel modo Normal). + + 2. Battete: + + `:q!`{vim} ``{normal}. + + Così si esce dall'editor, SCARTANDO qualsiasi modifica fatta. + + 3. Aprite vim e tornate qui eseguendo il comando che vi ha portato a questa + guida. Potrebbe essere: + + :Tutor + + 4. Se siete sicuri di aver memorizzato questi passi, eseguite i passi + dall'1 al 3 per uscire dall'editor e rientrarvi. + +NOTA: [:q!](:q) SCARTA qualsiasi modifica fatta. Tra qualche Lezione + vedremo come salvare le modifiche su un file. + + 5. Spostatevi in giù col cursore, alla Lezione 1.3. + +# Lezione 1.3: MODIFICARE TESTO - CANCELLARE + +** Premete `x`{normal} per cancellare il carattere sotto il cursore. ** + + 1. Portatevi col cursore alla riga qui sotto marcata ✗. + + 2. Per correggere, spostate il cursore posizionandolo sopra il + carattere da cancellare. + + 3. Premete [il tasto x](x) per cancellare il carattere di troppo. + + 4. Ripetete i passi da 2 a 4 finché la frase è corretta. + +La mmucca saltòò soppra lla luuna. + + 5. Ora che la riga è corretta, passate alla Lezione 1.4. + +NOTA: Nel seguire questa guida, non tentate di memorizzare, è + meglio imparare facendo pratica. + +# Lezione 1.4: EDITARE UN TESTO: INSERIMENTI + +** Premete `i`{normal} per inserire del testo. ** + + 1. Portatevi col cursore alla prima riga sotto, marcata ✗. + + 2. Per rendere la riga uguale alla seguente, spostate il cursore fino + a sovrapporvi al print carattere DOPO il testo che va inserito. + + 3. Premete `i`{normal} e immettete le aggiunte richieste. + + 4. Dopo aver corretto ogni siingolo errore premete ``{normal} + per ritornare al modo Normal. + Ripetete i passi da 2 a 4 per correggere la frase. + +Un po' testo mca questa . +Un po' di testo manca da questa riga. + + 5. Quando vi sentite a vostro agio nell'inserire del testo, passate alla + Lezione 1.5. + +# Lezione 1.5: EDITARE UN TESTO: AGGIUNGERE A FINE RIGA + +** Premete `A`{normal} per aggiungere del testo a fine riga. ** + + 1. Portatevi col cursore alla prima riga sotto marcata ✗. + Non importa su che carattere sta il cursore nella riga. + + 2. Premete [A](A) e aggiungete quanto manca. + + 3. Una volta finito di aggiungere testo, premete ``{normal} + per ritornare al modo Normal. + + 4. Portatevi col cursore alla seconda riga marcata ✗ e ripetete + i passi 2 e 3 per correggere la frase. + +Un po' di testo manca da que +Un po' di testo manca da questa riga. +Un po' di testo man +Un po' di testo manca anche qui. + + 5. Quando vi sentite a vostro agio nell'aggiungere del testo in fondo + alla riga, passate alla Lezione 1.6. + +# Lezione 1.6: EDITARE UN FILE + +** Usate `:wq`{vim} per salvare un file e uscire da Vim. ** + +!! NOTA: Prima di eseguire i passi elencati sotto, +leggetevi l'intera Lezione !! + + 1. Uscite da questa guida come avete fatto nella Lezione 1.2: `:q!`{vim} + O, se avete accesso a un altro terminale, digitate quel che segue in + quel terminale. + + 2. Dal prompt della shell battete questo comando: +~~~ sh + $ vim tutor +~~~ + 'vim' è il comando che fa partire l'editor Vim, 'tutor' è il nome + del file che desiderate editare. Usate un file che siete in grado di + modificare. + + 3. Inserite e cancellate del testo, come visto nella Lezione precedente. + + 4. Salvate il file con le modifiche da voi fatte e uscite da Vim immettendo: +~~~ cmd + :wq +~~~ + + Notate che occorre premete `` perché il comando sia eseguito. + + 5. Se siete usciti dalla guida Vim nel Passo 1, fate ripartire la guida Vim + e posizionatevi sul sommario qui sotto. + + 6. Dopo aver letto e capito tutti i passi visti qui sopra: metteteli in pratica. + +# Lezione 1 SOMMARIO + + 1. Il cursore su muove usando i tasti freccia o i tasti h j k l. + h (sinistra) j (giù) k (sù) l (destra) + + 2. Per far partire Vim dal prompt della shell immettete: + +~~~ sh + $ vim NOME-DI-FILE +~~~ + + 3. Per uscire da Vim battete: ``{normal} `:q!`{vim} ``{normal} + per buttar via tutte le modifiche. + OPPURE battete: ``{normal} `:wq`{vim} ``{normal} + per salvare le modifiche fatte. + + 4. Per cancellare il carattere sotto il cursore battete: `x`{normal} + + 5. Per inserire o aggiungere in fondo del testo battete: + `i`{normal} inserire testo ``{normal} inserire prima del cursore. + `A`{normal} aggiungere testo ``{normal} aggiungere a fine riga. + +NOTA: Premendo ``{normal} si entra nel modo Normal e, se del caso, si + annulla un comando parzialmente immesso, che non volete eseguire. + +Ora continuate con la Lezione 2. + +# Lezione 2.1: COMANDI PER CANCELLARE + +** Battete `dw`{normal} per cancellare una parola. ** + + 1. Premete ``{normal} per assicurarvi di essere nel modo Normal. + + 2. Portatevi col cursore alla riga qui sotto marcata ✗. + + 3. Portatevi col cursore all'inizio di una parola che va cancellata + + 4. Battete [d](d)[w](w) per cancellare la parola. + +Ci sono penna alcune parole matita che non appartengono carta a questa frase. + + 5. Ripetete i passi 3 e 4 finché la frase è corretta e andate alla Lezione 2.2. + +# Lezione 2.2: ANCORA COMANDI PER CANCELLARE + +** Battete `d$`{normal} per cancellare fino a fine riga. ** + + 1. Premete ``{normal} per assicurarvi di essere nel modo Normal. + + 2. Portatevi col cursore alla riga qui sotto marcata ✗. + + 3. Portatevi col cursore alla fine della riga corretta (DOPO il primo . ). + + 4. Battete `d$`{normal} per cancellare fino a fine riga. + +Qualcuno ha scritto due volte la fine di questa riga. fine di questa riga. + + 5. Passate alla Lezione 2.3 per capire cosa sta accadendo. + +# Lezione 2.3: OPERATORI E MOVIMENTI + +Molti comandi che modificano del testo sono composti da un [operatore](operator) e +da un [movimento](navigation). +Il formato di un comando delete con l'operatore [d](d) è il seguente: + + d movimento + + Dove: + d - è l'operatore per "delete" (cancella) + movimento - indice dove l'operatore agisce (vedere sotto). + + Una breve lista di movimenti: + [w](w) - fino a inizio prossima parola, ESCLUSO il carattere iniziale. + [e](e) - fino alla fine della parola corrente, INCLUSO l'ultimo carattere. + [$]($) - fino a fine riga, INCLUSO l'ultimo carattere. + + Quindi battendo `de`{normal} cancella dalla posizione del cursore a fine parola. + +NOTA: Premendo solo il carattere di movimento in modo Normal, senza un operatore + sposterà il cursore come specificato. + +# Lezione 2.4: USARE UN CONTATORE PER UN MOVIMENTO + +** Un numero prima di un movimento lo ripete altrettante volte. ** + + 1. Portatevi col cursore all'inizio della riga qui sotto, marcata ✓ . + + 2. Battete `2w`{normal} per spostare il cursore due parole in avanti. + + 3. Battete `3e`{normal} per spostare il cursore alla fine della terza parola + in avanti. + + 4. Battete `0`{normal} ([zero](0)) per andare all'inizio della riga. + + 5. Ripetete i passi 2 e 3 con numeri differenti. + +Questa è solo una riga con delle parole per imparare a muovere il cursore. + + 6. Passate alla Lezione 2.5. + +# Lezione 2.5: USARE UN CONTATORE PER CANCELLARE DI PIÙ + +** Un numero prima di un operatore lo ripete altrettante volte. ** + +Usando l'operatore delete con un movimento di quelli visti sopra, si può +inserire un contatore prima del movimento, per cancellare di più + d numero movimento + + 1. Portatevi col cursore alla prima parola MAIUSCOLA sulla riga marcata ✗. + + 2. Battete `d2w`{normal} per cancellare le due parole MAIUSCOLE. + + 3. Ripetete i passi 1 e 2 con un contatore differente per cancellare tutte + le parole MAIUSCOLE consecutive, con un solo comando. + +Questa ABC DE riga FGHI JK LMN OP di parole è stata Q RS TUV pulita. + +# Lezione 2.6: AGIRE SU INTERE RIGHE + +** Battete `dd`{normal} per cancellare un'intera riga. ** + +A causa della frequenza con cui capita di cancellare intere righe, +chi ha progettato Vim ha deciso che sarebbe stato più semplice battere +due volte la lettera d per cancellare una riga. + + 1. Portatevi col cursore alla seconda riga nella frase sotto. + 2. Battete [dd](dd) per cancellare la riga. + 3. Poi spostatevi alla riga numero 4. + 4. Battete `2dd`{normal} per cancellare due righe. + +1) Le rose sono rosse, +2) Il fango è divertente, +3) Le viole sono blu, +4) Io ho un'automobile, +5) Gli orologi ti dicono l'ora, +6) Dolce è lo zucchero, +7) Ma non quanto sei tu. + +# Lezione 2.7: IL COMANDO UNDO + +** Premete `u`{normal} per annullare l'ultimo comando, `U`{normal} per farlo su un'intera riga. ** + + 1. Portatevi col cursore alla riga qui sotto marcata ✗ e posizionatelo + sul primo errore. + 2. Battete `x`{normal} per cancellare il primo carattere indesiderato. + 3. Poi battete `u`{normal} per annullare l'ultimo comando eseguito. + 4. Poi correggete tutti gli errori sulla riga con il comando `x`{normal}. + 5. Poi battete `U`{normal} per riportare la riga a come era all'inizio. + 6. Poi battete `u`{normal} più volte per annullare l'effetto di `U`{normal} + e i comandi precedenti. + 7. Ora battete ``{normal} (Control + R) più volte per rieseguire i comandi + (annullare gli annullamenti). + +Corregggete gli errori ssu queesta riga e rimettetelli usanndo undo. + + 8. Questi comandi sono molto utili. Potete procedere al Sommario della Lezione 2. + +# Lezione 2 SOMMARIO + + 1. Per cancellare dal cursore fino alla parola seguente battete: `dw`{normal} + 2. Per cancellare dal cursore a fine riga battete: `d$`{normal} + 3. Per cancellare un'intera riga battete: `dd`{normal} + 4. Per ripetere un movimento metteteci davanti un numero: `2w`{normal} + + 5. Il formato di un comando di modifica è: + operatore [numero] movimento + dove: + operatore - indica l'azione, come [d](d) per cancellare (delete) + [numero] - è un contatore opzionale per ripetere il movimento + movimento - indica quanto esteso è il campo su cui operare, come: + [w](w) (parola, word), + [$]($) (fine della riga), etc. + + 6. Per spostarsi a inizio riga si usa uno zero: [0](0) + + 7. Per annullare azioni precedenti, battete: `u`{normal} (u minuscolo) + Per annullare tutte le modifiche a una riga, battete: `U`{normal} (U maiuscolo) + Per annullare gli annulli, battete: ``{normal} + +# Lezione 3.1: IL COMANDO PUT + +** Battete `p`{normal} per inserire il testo appena cancellato dopo il cursore. ** + + 1. Portatevi col cursore alla prima riga marcata ✓ sotto. + + 2. Battete `dd`{normal} per cancellare la riga e metterla in un registro Vim. + + 3. Portatevi col cursore alla riga c), SOPRA dove va messa la riga cancellata. + + 4. Battete `p`{normal} per inserire la riga sotto quella dove è il cursore. + + 5. Ripetete i passi da 2 a 4 per inserire tutte le righe nell'ordine corretto. + +d) Puoi impararla anche tu? +b) Le viole sono blu, +c) L'intelligenza si impara. +a) Le rose sono rosse, + +# Lezione 3.2: IL COMANDO RIMPIAZZA + +** Battete `rx`{normal} per rimpiazzare il carattere sotto il cursore con x. ** + + 1. Portatevi col cursore alla prima riga sotto marcata ✗. + + 2. Spostate il cursore fino a posizionarlo sopra al primo errore. + + 3. Battete `r`{normal} e poi il carattere "giusto". + + 4. Ripetete i passi 2 e 3 finché la prima riga è uguale alla seconda. + +Quwndo questa riga è stata imbessa, qualcuno ha premato i tasti sballiati! +Quando questa riga è stata immessa, qualcuno ha premuto i tasti sbagliati! + + 5. Ora passate alla Lezione 3.3. + +NOTA: Non dimenticate è meglio imparare provando, e non memorizzando. + +# Lezione 3.3: L'OPERATORE CAMBIA `c`{normal} + +** Per cambiare fino alla fine di una parola, battete `ce`{normal}. ** + + 1. Portatevi col cursore alla prima riga sotto marcata ✗. + + 2. Posizionate il cursore sulla prima "a" di "rana". + + 3. Battete `ce`{normal} e la parola corretta (in questo caso, battete "iga" ). + + 4. Premete ``{normal} e posizionatevi sul successivo carattere da + cambiare. + + 5. Ripetete i passi 3 e 4 finché la prima frase è uguale alla seconda. + +Questa rana ha alcune papere che vanga cambiate uscita il comando change. +Questa riga ha alcune parole che vanno cambiate usando il comando change. + +Notare che [c](c)e cancella la parole e vi mette in modo Insert. + +# Lezione 3.4: ALTRE MODIFICHE USANDO `c`{normal} + +** L'operatore cambia si usa con gli stessi movimenti di cancella. ** + + 1. L'operatore cambia funziona come l'operatore cancella. Il formato è: + + c [numero] movimento + + 2. I movimenti sono gli stessi, come `w`{normal} (parola) e `$`{normal} (fine-riga). + + 3. Spostatevi alla prima riga sotto marcata ✗. + + 4. Portatevi col cursore alla prima parola errata. + + 5. Battete `c$`{normal} e battete il resto della riga come la seguente + e premete ``{normal}. + +La fine di questa riga ha bisogno di aiuto per divenire uguale alla seguente. +La fine di questa riga va corretta usando il comando `c$`. + +NOTA: Si può usare il tasto Backspace per correggere errori di battitura. + +# Lezione 3 SOMMARIO + + 1. Per reinserire del testo che è stato appena cancellato, battete [p](p). + Questo comando mette il testo appena cancellato DOPO il cursore + (se una riga intera era stata cancellata, questa diverrà la riga SOTTO + il cursore). + + 2. Per rimpiazzare il carattere sotto il cursore, battete [r](r) e poi il + carattere che volete sostituire a quello. + + 3. Il comando [change](c) consente di cambiare il testo dalla posizione + del cursore fino a dove il movimento lo porta. Battete `ce`{normal} + per cambiare dalla posizione del cursore alla fine della parola, e + `c$`{normal} per cambiare il testo fino alla fine della riga. + + 4. Il formato per il comando che cambia del testo è: + + c [numero] movimento + +Adesso passate alla prossima Lezione. + +# Lezione 4.1: POSIZIONE DEL CURSORE E STATO DEL FILE + +** Battete ``{normal} per visualizzare la vostra posizione + all'interno del file, e lo stato del file. + Battete `G`{normal} per andare a una data riga nel file. ** + +!! NOTA: Prima di eseguire i passi elencati sotto, +leggetevi l'intera Lezione !! + + 1. Tenendo premuto il tasto ``{normal} premete `g`{normal}. Questo si indica + scrivendo ``{normal}. Un messaggio apparirà in fondo alla pagina + con il nome del file e la posizione all'interno del file. Memorizzate + il numero di riga per il Passo 3 sotto. + +NOTA: La posizione del cursore si può vedere nell'angolo in basso a destra + dello schermo. Ciò accada se è stata specificata l'opzione ['ruler']('ruler'). + 2. Battete [G](G) per portarvi in fondo al file. + Battete [gg](gg) per portarvi in cima al file. + + 3. Battete il numero della riga in cui eravate e poi `G`{normal}. In questo modo + tornerete alla riga in cui eravate al momento di battere ``{normal}. + + 4. Se vi sentite sicuri del fatto vostro, eseguite i passi da 1 a 3. + +# Lezione 4.2: IL COMANDO CERCA + +** Battete `/`{normal} seguito da una frase, per cercare quella frase. ** + + 1. In modo Normal battete il carattere `/`{normal}. Notate che il carattere + stesso e il cursore sono in fondo alla schermo, dove vengono anche + visualizzati i comandi che iniziano per `:`{normal}. + + 2. Ora battete 'errroore' ``{normal}. Questa è la parola che volete + cercare. + + 3. Per cercare ancora la stessa frase, simply battete [n](n). + Per cercare la stessa frase nella direzione opposta, battete [N](N). + + 4. Per cerca una frase all'indietro, usate [?](?) invece che `/`{normal}. + + 5. Per tornare dove eravate prima premete ``{normal} (tenendo premuto + il tasto ``{normal} premete la lettera `o`{normal}). Ripetete + per tornare ancora più indietro. ``{normal} per andare in avanti. + +"errroore" non è il modo giusto di scrivere errore; errroore è un errore. + +NOTA: Quando la ricerca arriva a fine file, ricomincia dall'inizio, a meno + che l'opzione ['wrapscan']('wrapscan') sia inattiva. + +# Lezione 4.3: CERCARE PARENTESI CORRISPONDENTI + +** Battete `%`{normal} per trovare una corrispondenza a ),], o }. ** + + 1. Posizionate il cursore su una qualsiasi (, [, o { nella riga sotto + marcata ✓. + + 2. Ora battete il carattere [%](%). + + 3. Il cursore si sposterà sulla parentesi corrispondente. + + 4. Battete `%`{normal} per spostare il cursore sull'altra parentesi + corrispondente. + + 5. Portatevi col cursore su un'altra (,),[,],{ o } e guardate cosa fa + il comando `%`{normal}. + +Questa ( è una riga di test che contiene (, [, ] e { } al suo interno. )) + +NOTA: Questo comando è molto utile per correggere un programma con qualche + parentesi mancante o posizionata male! + +# Lezione 4.4: IL COMANDO SOSTITUISCI + +** Battete `:s/vecchio/nuovo/g` per sostituire "nuovo" a "vecchio". ** + + 1. Portatevi col cursore alla riga qui sotto marcata ✗. + + 2. Battete +~~~ cmd + :s/laa/la/ +~~~ + + NOTATE che il comando [:s](:s) la cambiato solo il primo "laa" della riga. + + 3. Adesso battete +~~~ cmd + :s/laa/la/g +~~~ + + Aggiungendo il flag [flag](:s_flags) si chiede di sostituire globalmente + sulla riga, ossia di cambiare tutte le occorrenze di "laa" della riga. + +Di solito laa stagione migliore per ammirare i fiori è laa primavera. + + 4. Per cambiare ogni occorrenza di una stringa in un gruppo di righe + battete +~~~ cmd + :#,#s/vecchio/nuovo/g +~~~ + Dove #,# sono i numeri iniziale e finale del gruppo di righe dove va + fatta la sostituzione. + + Battete +~~~ cmd + :%s/vecchio/nuovo/g +~~~ + per cambiare ogni occorrenza di una stringa nell'intero file. + + Battete +~~~ cmd + :%s/vecchio/nuovo/gc +~~~ + per trovare ogni occorrenza di una stringa nell'intero file, e ricevere + la richiesta se cambiare oppure no ogni particolare occorrenza. + +# Lezione 4 SOMMARIO + + 1. ``{normal} visualizza posizione e stato del file. + `G`{normal} va all'ultima riga del file. + numero `G`{normal} va al numero di riga specificato. + `gg`{normal} va alla prima riga del file. + + 2. Battendo `/`{normal} seguito da una frase cerca la frase in AVANTI. + Battendo `?`{normal} seguito da una frase cerca la frase all'INDIETRO. + Dopo aver trovato una corrispondenza battete `n`{normal} per cercare la + corrispondenza successiva nella stessa direzione, oppure `N`{normal} + per cercarla nella direzione opposta. + ``{normal} vi riposta indietro a posizioni precedenti, + ``{normal} vi riporta avanti verso le posizioni più recenti. + + 3. Battendo `%`{normal} mentre il cursore è su (,),[,],{, o } sposta il + cursore alla parentesi corrispondente. + + 4. Per sostituire "nuovo" alla prima occorrenza di "vecchio" in una riga + battete +~~~ cmd + :s/vecchio/nuovo +~~~ + Per sostituire "nuovo" per tutti i "vecchio" di una riga battete +~~~ cmd + :s/vecchio/nuovo/g +~~~ + Per sostituire frasi nell'intervallo di righe da "#" a "#" battete +~~~ cmd + :#,#s/vecchio/nuovo/g +~~~ + Per sostituire tutte le occorrenze nel file battete +~~~ cmd + :%s/vecchio/nuovo/g +~~~ + Per chiedere conferma per ogni possibile modifica, aggiungete il flag 'c' +~~~ cmd + :%s/vecchio/nuovo/gc +~~~ +%%%% +# Lezione 5.1: COME ESEGUIRE UN COMANDO ESTERNO + +** Battete `:!`{vim} seguito da un comando esterno, per eseguire quel comando. ** + + 1. Battete il familiare comando `:`{normal} per portare il cursore in fondo allo + schermo. Ciò vi consente di immettere un comando dalla riga-di-comando. + + 2. Ora battete il carattere [!](!cmd) (punto esclamativo). Questo permette di + eseguire qualsiasi comando esterno della shell. + + 3. Come esempio battete "ls" dopo il "!" e poi date ``{normal}. + Ciò vi mostrerà una lista dei file nella vostra directory, proprio come se + deste il comando dalla shell. + +NOTA: Si può eseguire qualsiasi comando esterno in questo modo, si possono + anche specificare degli argomenti per il comando. + +NOTA: Tutti il comandi `:`{vim} vanno completati battendo ``{normal}. + Da qui in poi non lo ricorderemo tutte le volte. + +# Lezione 5.2: RISCRIVERE I FILE + +** Per salvare le modifiche fatte al testo, battete `:w`{vim} NOME-FILE. ** + + 1. Battete `:!ls`{vim} per ottenere la lista dei file nella vostra directory. + Già sapete di dover battere ``{normal} per far eseguire il comando. + + 2. Scegliete un nome-file che ancora non esiste, come TEST. + + 3. Poi battete: +~~~ cmd + :w TEST +~~~ + (dove TEST indica il nome-file da voi scelto.) + + 4. Questo comando salva l'intero file (il file Vim Tutor) con il nome TEST. + Per verificarlo, battete `:!ls`{vim} ancora per vedere i file nella + vostra directory. + +NOTA: Se uscite da Vim e chiamate Vim di nuovo battendo `vim TEST`, il file + in edit è una copia esatta del file di guida, quando è stato salvato. + + 5. Ora cancellate il file battendo: +~~~ cmd + :!rm TEST +~~~ + +# Lezione 5.3: SCRIVERE SOLO PARTE DEL TESTO + +** Per salvare solo una parte del file, battete `v`{normal} movimento + `:w NOME-FILE`{vim}. ** + + 1. Portatevi col cursore su questa riga. + + 2. Premete [v](v) e spostate il cursore alla riga marcata 5. qui sotto. + Notate che il testo selezionato è evidenziato. + + 3. Premete il tasto `:`{normal}. A fondo schermo apparirà + + :'<,'> + + 4. Battete + + `:w TEST`{vim} + + dove TEST è un nome-file non ancora esistente. Verificate di vedere + + `:'<,'>w TEST`{vim} + + prima di premere ``{normal}. + + 5. Vim scriverà le righe selezionate al file TEST. Usate `:!ls`{vim} per + controllare. + Non cancellate subito il file! Sarà usato nella prossima Lezione. + +NOTA: Premendo [v](v) iniziate il modo [selezione Visuale](visual-mode). Potete + usare il cursore per rendere la selezione più piccola o più grande. + Poi potete usare un operatore per fare qualcosa col testo così + selezionato. Per esempio, `d`{normal} cancella tutto il testo. + +# Lezione 5.4: AGGIUNGERE INTERI FILE E UNIRE FILE + +** Per inserire il contenuto di un file, battete `:r NOME-FILE`{vim}. ** + + 1. Posizionate il cursore sopra questa riga. + +NOTA: Dopo aver eseguito il Passo 2 vedrete del testo dalla Lezione 5.3. + Quindi, spostatevi in GIÙ per vedere di nuovo questa Lezione. + + 2. A questo punto, inserite il vostro file TEST usando il comando + + `:r TEST`{vim} + + dove TEST è il nome del file che avete usato più sopra. + Il file da voi letto viene inserito sotto la riga del cursore. + + 3. Per verificare che è stato inserito un file, portatevi indietro col + cursore e vedrete che ci sono ora due copie della Lezione 5.3, quella + originale e quella inserita da voi, prendendola dal file. + +NOTA: Si può anche leggere l'output prodotto da un comando esterno. + Per esempio, + + `:r !ls`{vim} + + mette l'output del comando `ls` a partire dalla riga sotto il cursore. + +# Lezione 5 SOMMARIO + + 1. [:!comando](:!cmd) esegue un comando esterno. + + Alcune esempi utili sono: + `:!ls`{vim} - mostra i file di una directory + `:!rm NOME-FILE`{vim} - cancella il file NOME-FILE + + 2. [:w](:w) NOME-FILE scrive il file in edit su disco con il nome + NOME-FILE. + + 3. [v](v) movimento :w NOME-FILE salva le righe selezionate in + modo Visual nel file chiamato NOME-FILE. + + 4. [:r](:r) NOME-FILE legge da disco il file NOME-FILE e lo + inserisce nella riga sotto il cursore. + + 5. [:r !dir](:r!) legge l'output del comando dir e lo + inserisce nella riga sotto il cursore. + +# Lezione 6.1: IL COMANDO OPEN + +** Battete `o`{normal} per aprire una nuova riga sotto a quella del cursore + e per mettervi in modo Insert sulla riga. ** + + 1. Portatevi col cursore alla riga qui sotto marcata ✓. + + 2. Battete la lettera minuscola `o`{normal} per [aprire](o) una riga sotto il + cursore e mettervi in modo Insert. + + 3. Ora battete del testo e premete ``{normal} per uscire dal modo Insert. + +Dopo battuto `o`{normal} il cursore si sposta sulla riga nuova in modo Insert. + + 4. Per aprire una riga SOPRA il cursore, semplicemente battete una + [O maiuscola](O), invece che una `o`{normal} minuscola. + Provate a farlo con la riga sotto. + +Aprite una riga sopra questa battendo O mentre il cursore è su questa riga. + +# Lezione 6.2: IL COMANDO AGGIUNGI + +** Battete `a`{normal} per inserire del testo DOPO il cursore. ** + + 1. Portatevi col cursore all'inizio della riga sotto marcata ✗. + + 2. Premete `e`{normal} fino a che il cursore sia alla fine di "ri". + + 3. Battete la lettera minuscola `a`{normal} per [aggiungere](a) testo DOPO + il cursore. + + 4. Completate la parole come nella riga sotto. Premete ``{normal} per + uscire dal modo Insert. + + 5. Usate `e`{normal} per spostarvi sulla parola incompleta seguente e + ripetete i passi 3 e 4. + +Questa ri serve per far prat ad aggiungere testo a una riga. +Questa riga serve per far pratica ad aggiungere testo a una riga. + +NOTA: I comandi [a](a), [i](i) e [A](A) fanno tutti andate al modo Insert, + la sola differenza è dove vengono inseriti i caratteri. + +# Lezione 6.3: UN ALTRO MODO PER RIMPIAZZARE + +** Battete una `R`{normal} maiuscola per rimpiazzare più caratteri. ** + + 1. Portatevi col cursore alla prima riga sotto marcata ✗. Portatevi col + cursore all'inizio del primo "xxx". + + 2. Poi premete `R`{normal} ([R maiuscolo](R)) e inserite il numero che + vedete sulla riga seguente, in modo da rimpiazzare "xxx". + + 3. Premete ``{normal} per uscire dal [modo Replace](mode-replace). + Notate che il resto della riga non viene cambiato. + + 4. Ripetete i passi per rimpiazzare l'altro "xxx". + +Sommando 123 a xxx si ottiene xxx. +Sommando 123 a 456 si ottiene 579. + +NOTA: Il modo Replace è come il modo Insert, ma ogni carattere immesso cancella + un carattere del testo. + +# Lezione 6.4: COPIARE E INCOLLARE TESTO + +** Usare l'operatore `y`{normal} per copiare testo e `p`{normal} per incollarlo. ** + + 1. Andate alla riga marcata con ✓ sotto e posizionate il cursore dopo "a)". + + 2. Entrate in mod Visual con `v`{normal} e spostate il cursore subito prima + di "primo". + + 3. Battete `y`{normal} per [copiare](yank) (copy) il testo evidenziato. + + 4. Portatevi col cursore alla fine delle riga seguente: `j$`{normal} + + 5. Battete `p`{normal} per [incollare](put) il testo. + + 6. Premete `a`{normal} e poi battete "secondo". Premete ``{normal} per + uscire dal modo Insert. + + 7. Usate il modo Visual per selezionare "elemento.", copiatelo con `y`{normal}, + andate alla fine della riga seguente con `j$`{normal} e incollate lì il + testo con `p`{normal} + +a) Questo è il primo elemento. +b) + +NOTA: SI può usare `y`{normal} come un operatore: `yw`{normal} copia una parola. + +# Lezione 6.5: IMPOSTARE UN'OPZIONE + +** Impostare un'opzione per ignorare la distinzione maiuscolo/minuscolo + quando si cerca o si sostituisce. ** + + 1. Cercate la parola 'premete' col comando: `/premete` + ripetete più volte premendo `n`{normal}. + + 2. Impostate l'opzione the 'ic' (Ignora MAIUSCOLO/minuscolo) battendo: +~~~ cmd + :set ic +~~~ + 3. Poi cercate ancora 'ignore' premendo `n`{normal}. + Notate che ora vengono trovate anche le parole Premete e PREMETE. + + 4. Impostate le opzioni 'hlsearch' e 'incsearch': +~~~ cmd + :set hls is +~~~ + 5. Ora battete il comando di ricerca e guardate cosa succede: + /premete + + 6. Per tornare a distinguere MAIUSCOLO/minuscolo battete: +~~~ cmd + :set noic +~~~ + 7. Per invertire il valore di un'opzione, metteteci davanti "inv": +~~~ cmd + :set invic +~~~ +NOTA: Per rimuovere l'evidenziazione delle corrispondenze battete: +~~~ cmd + :nohlsearch +~~~ +NOTA: Se volete ignorare la distinzione MAIUSCOLO/minuscolo solo una volta, + usate [\c](/\c) nel comando: /premete\c + +# Lezione 6 SOMMARIO + + 1. Battete `o`{normal} per aprire una riga sotto il cursore e entrare + in modo Insert. + Battete `O`{normal} per aprire una riga SOPRA il cursore. + + 2. Battete `a`{normal} per inserire del testo DOPO il cursore. + Battete `A`{normal} per aggiungere del testo a fine riga. + + 3. Il comando `e`{normal} sposta il cursore a fine parola. + + 4. Il comando `y`{normal} copia del testo, `p`{normal} lo incolla. + + 5. Battendo `R`{normal} maiuscola si entra nel modo Replace + fino a quando non si preme il tasto ``{normal}. + + 6. Battendo "[:set](:set) xxx" imposta l'opzione "xxx". + Alcune opzioni sono: + + 'ic' 'ignorecase' ignorare MAIUSCOLO/minuscole nella ricerca + 'is' 'incsearch' mostra corrispondenze parziali in ricerca + 'hls' 'hlsearch' evidenzia tutte le corrispondenze trovate + + Si può usare sia il nome lungo di un'opzione, che quello corto. + + 7. Premettete "no" per annullare un'opzione: +~~~ cmd + :set noic +~~~ + 8. Premettete "inv" per invertire un'opzione: +~~~ cmd + :set invic +~~~ + +# Lezione 7.1: OTTENERE AIUTO + +** Usate il sistema di aiuto on-line. ** + +Vim ha un ampio sistema di aiuto on-line. Per iniziare, provate una +di queste alternative: + - premete il taso ``{normal} (se disponibile) + - premete il taso ``{normal} (se disponibile) + - Battete + `:help`{vim} + +Leggete il testo nella finestra di help per vedere come funziona. +Battete ``{normal} per passare da una finestra all'altra. +Battete `:q`{vim} per chiudere la finestra di aiuto. + +Potete trovare aiuto su quasi tutto, fornendo un argomento al comando +":help". Potete provare questi (non dimenticatevi di battere ): +~~~ cmd + :help w + :help c_CTRL-D + :help insert-index + :help user-manual +~~~ +# Lezione 7.2: CREARE UNO SCRIPT INIZIALE + +** Abilitare funzionalità di Vim. ** + +Vim ha molte più funzionalità rispetto a Vi, ma molte di esse sono +disabilitate per default. Per iniziare a usare più funzionalità occorre +creare un file "vimrc". + + 1. Iniziate a editare il file "vimrc" con: + `:call mkdir(stdpath('config'),'p')`{vim} + `:exe 'edit' stdpath('config').'/init.vim'`{vim} + + 2. Salvate il file con: + `:w`{vim} + + Potete aggiungere a questo file "vimrc" tutte le vostre impostazioni + preferite. Per maggiori informazioni battete `:help vimrc-intro`{vim}. + +# Lezione 7.3: COMPLETAMENTI + +** Completamenti nella riga-di-comando con ``{normal} e ``{normal}. ** + + 1. Guardate i file che esistono nella directory corrente: `:!ls`{vim} + + 2. Battete l'inizio di un comando: `:e`{vim} + + 3. Premete ``{normal} e Vim vi mostra una lista di tutti i comandi che + iniziano con la lettera "e". + + 4. Premete ``{normal} e Vim completerà il nome comando a ":edit". + + 5. Ora aggiungete uno spazio e la lettera iniziale di un file nella vostra + directory: `:edit FIL`{vim} + + 6. Premete ``{normal}. Vim completerà il nome (se è il solo possibile + completamento). + +NOTA: Il completamento è disponibile in parecchi comandi. È particolarmente + utile per il comando `:help`{vim}. + +# Lezione 7 SOMMARIO + + 1. Battete `:help`{vim} + o premete il tasto ``{normal} o ``{normal} per aprire una + finestra di aiuto. + + 2. Battete `:help ARGOMENTO`{vim} per trovare aiuto su ARGOMENTO. + + 3. Battete ``{normal} per saltare da una finestra all'altra. + + 4. Battete `:q`{vim} per chiudere la finestra di help. + + 5. Create uno script iniziale vimrc mettendoci le vostre impostazioni + preferite. + + 6. Mentre immettete un comando, premete ``{normal} per vedere i + completamenti possibili. + Premete ``{normal} per usare uno dei completamenti visualizzati. + +# CONCLUSIONE + +Lo scopo di questa guida era di dare una breve panoramica sull'editor Vim, +che fosse sufficiente a permettervi di usare l'editore abbastanza facilmente. +La guida è tutt'altro che completa, Vim ha molti altri comandi. +Consultate spesso l''help. + +Ci sono molte risorse on-line (in inglese) per saperne di più riguardo a Vim. +Qui sotto potete trovare un breve elenco: + +- *Learn Vim Progressively*: http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/ +- *Learning Vim in 2014*: http://benmccormick.org/learning-vim-in-2014/ +- *Vimcasts*: http://vimcasts.org/ +- *Vim Video-Tutorials by Derek Wyatt*: http://derekwyatt.org/vim/tutorials/ +- *Learn Vimscript the Hard Way*: http://learnvimscriptthehardway.stevelosh.com/ +- *7 Habits of Effective testo Editing*: http://www.moolenaar.net/habits.html +- *vim-galore*: https://github.com/mhinz/vim-galore + +Se preferite un libro (sempre in inglese), *Practical Vim* e il suo seguito +*Modern Vim* di Drew Neil sono spesso raccomandati. + +Le parti più importanti dell'help di Vim (inclusa una traduzione completa +della "User Guide") sono disponibili anche in italiano. +Per procurarsi la versione italiana, vedere: +https://sites.google.com/view/vimdoc-it + +Questa guida è stata scritta di Michael C. Pierce e Robert K. Ware, Colorado +School of Mines usando idee fornite da Charles Smith, Colorado State +University. E-mail: bware@mines.colorado.edu. + +Modificato per Vim da Bram Moolenaar. +Modificato per vim-tutor-mode da Felipe Morales. +Tradotto in italiano da Antonio Colombo. diff --git a/usr/share/vim/vim91/tutor/it/vim-01-beginner.tutor.json b/usr/share/vim/vim91/tutor/it/vim-01-beginner.tutor.json new file mode 100644 index 00000000000..48b7743fc4f --- /dev/null +++ b/usr/share/vim/vim91/tutor/it/vim-01-beginner.tutor.json @@ -0,0 +1,45 @@ +{ + "expect": { + "27": -1, + "107": "La mucca saltò sopra la luna.", + "129": "Un po' di testo manca da questa riga.", + "130": "Un po' di testo manca da questa riga.", + "150": "Un po' di testo manca da questa riga.", + "151": "Un po' di testo manca da questa riga.", + "152": "Un po' di testo manca anche qui.", + "153": "Un po' di testo manca anche qui.", + "230": "Ci sono alcune parole che non appartengono a questa frase.", + "246": "Qualcuno ha scritto due volte la fine di questa riga.", + "287": -1, + "306": "Questa riga di parole è stata pulita.", + "321": -1, + "322": -1, + "323": -1, + "324": -1, + "325": -1, + "326": -1, + "327": -1, + "344": "Correggete gli errori su questa riga e rimetteteli usando undo.", + "384": -1, + "385": -1, + "386": -1, + "387": -1, + "401": "Quando questa riga è stata immessa, qualcuno ha premuto i tasti sbagliati!", + "402": "Quando questa riga è stata immessa, qualcuno ha premuto i tasti sbagliati!", + "423": "Questa riga ha alcune parole che vanno cambiate usando il comando change.", + "424": "Questa riga ha alcune parole che vanno cambiate usando il comando change.", + "445": "La fine di questa riga va corretta usando il comando `c$`.", + "446": "La fine di questa riga va corretta usando il comando `c$`.", + "515": -1, + "537": -1, + "563": "Di solito la stagione migliore per ammirare i fiori è la primavera.", + "765": -1, + "771": -1, + "790": "Questa riga serve per far pratica ad aggiungere testo a una riga.", + "791": "Questa riga serve per far pratica ad aggiungere testo a una riga.", + "811": "Sommando 123 a 456 si ottiene 579.", + "812": "Sommando 123 a 456 si ottiene 579.", + "839": "a) Questo è il primo elemento.", + "840": "b) Questo è il secondo elemento." + } +} diff --git a/usr/share/vim/vim91/tutor/tutor.vim b/usr/share/vim/vim91/tutor/tutor.vim index 551231ab425..1ca4b2d9d39 100644 --- a/usr/share/vim/vim91/tutor/tutor.vim +++ b/usr/share/vim/vim91/tutor/tutor.vim @@ -1,7 +1,7 @@ " Vim tutor support file " Author: Eduardo F. Amatria " Maintainer: The·Vim·Project· -" Last Change: 2023 Aug 13 +" Last Change: 2024 Nov 17 " This Vim script is used for detecting if a translation of the " tutor file exist, i.e., a tutor.xx file, where xx is the language. @@ -13,7 +13,7 @@ " 1. Build the extension of the file, if any: let s:ext = "" if strlen($xx) > 1 - let s:ext = "." . $xx + let s:ext = "." .. $xx else let s:lang = "" " Check that a potential value has at least two letters. @@ -51,7 +51,7 @@ else elseif s:lang =~ "Bulgarian" let s:ext = ".bg" else - let s:ext = "." . strpart(s:lang, 0, 2) + let s:ext = "." .. strpart(s:lang, 0, 2) endif endif endif @@ -177,28 +177,25 @@ endif " If 'encoding' is utf-8 s:ext must end in utf-8. if &enc == 'utf-8' && s:ext !~ '\.utf-8' - let s:ext .= '.utf-8' + let s:ext ..= '.utf-8' endif " 2. Build the name of the file and chapter -let s:chapter = exists("$CHAPTER") ? $CHAPTER : '' -if s:chapter == "1" - let s:chapter = '' -endif +let s:chapter = exists("$CHAPTER") ? $CHAPTER : 1 -let s:tutorfile = "/tutor/tutor" . s:chapter -let s:tutorxx = $VIMRUNTIME . s:tutorfile . s:ext +let s:tutorfile = "/tutor/tutor" .. s:chapter +let s:tutorxx = $VIMRUNTIME .. s:tutorfile .. s:ext " 3. Finding the file: if filereadable(s:tutorxx) let $TUTOR = s:tutorxx -elseif s:ext !~ '\.utf-8' && filereadable(s:tutorxx . ".utf-8") +elseif s:ext !~ '\.utf-8' && filereadable(s:tutorxx .. ".utf-8") " Fallback to utf-8 if available. - let $TUTOR = s:tutorxx . ".utf-8" + let $TUTOR = s:tutorxx .. ".utf-8" else - let $TUTOR = $VIMRUNTIME . s:tutorfile - echo "The file " . s:tutorxx . " does not exist.\n" - echo "Copying English version: " . $TUTOR + let $TUTOR = $VIMRUNTIME .. s:tutorfile + echo "The file " .. s:tutorxx .. " does not exist.\n" + echo "Copying English version: " .. $TUTOR 4sleep endif diff --git a/usr/share/vim/vim91/tutor/tutor b/usr/share/vim/vim91/tutor/tutor1 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor rename to usr/share/vim/vim91/tutor/tutor1 index 3ddcda1614b..04b490f0c90 100644 --- a/usr/share/vim/vim91/tutor/tutor +++ b/usr/share/vim/vim91/tutor/tutor1 @@ -1,12 +1,13 @@ =============================================================================== = W e l c o m e t o t h e V I M T u t o r - Version 1.7 = +=============================================================================== += C H A P T E R ONE = =============================================================================== Vim is a very powerful editor that has many commands, too many to explain in a tutor such as this. This tutor is designed to describe enough of the commands that you will be able to easily use Vim as an all-purpose editor. - The approximate time required to complete the tutor is 30 minutes, depending upon how much time is spent with experimentation. @@ -17,12 +18,11 @@ It is important to remember that this tutor is set up to teach by use. That means that you need to execute the commands to learn them properly. If you only read the text, you will forget the commands! - Now, make sure that your Caps-Lock key is NOT depressed and press - the j key enough times to move the cursor so that lesson 1.1 + the j key enough times to move the cursor so that lesson 1.1.1 completely fills the screen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.1: MOVING THE CURSOR + Lesson 1.1.1: MOVING THE CURSOR ** To move the cursor, press the h,j,k,l keys as indicated. ** @@ -36,7 +36,7 @@ 2. Hold down the down key (j) until it repeats. Now you know how to move to the next lesson. - 3. Using the down key, move to lesson 1.2. + 3. Using the down key, move to lesson 1.1.2. NOTE: If you are ever unsure about something you typed, press to place you in Normal mode. Then retype the command you wanted. @@ -45,7 +45,7 @@ NOTE: The cursor keys should also work. But using hjkl you will be able to move around much faster, once you get used to it. Really! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.2: EXITING VIM + Lesson 1.1.2: EXITING VIM !! NOTE: Before executing any of the steps below, read this entire lesson!! @@ -64,11 +64,11 @@ NOTE: The cursor keys should also work. But using hjkl you will be able to NOTE: :q! discards any changes you made. In a few lessons you will learn how to save the changes to a file. - 5. Move the cursor down to lesson 1.3. + 5. Move the cursor down to lesson 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.3: TEXT EDITING - DELETION + Lesson 1.1.3: TEXT EDITING - DELETION ** Press x to delete the character under the cursor. ** @@ -84,14 +84,14 @@ NOTE: :q! discards any changes you made. In a few lessons you ---> The ccow jumpedd ovverr thhe mooon. - 5. Now that the line is correct, go on to lesson 1.4. + 5. Now that the line is correct, go on to lesson 1.1.4. NOTE: As you go through this tutor, do not try to memorize, learn by usage. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.4: TEXT EDITING - INSERTION + Lesson 1.1.4: TEXT EDITING - INSERTION ** Press i to insert text. ** @@ -109,12 +109,12 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage. ---> There is text misng this . ---> There is some text missing from this line. - 5. When you are comfortable inserting text move to lesson 1.5. + 5. When you are comfortable inserting text move to lesson 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.5: TEXT EDITING - APPENDING + Lesson 1.1.5: TEXT EDITING - APPENDING ** Press A to append text. ** @@ -134,17 +134,17 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage. ---> There is also some text miss There is also some text missing here. - 5. When you are comfortable appending text move to lesson 1.6. + 5. When you are comfortable appending text move to lesson 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.6: EDITING A FILE + Lesson 1.1.6: EDITING A FILE ** Use :wq to save a file and exit. ** !! NOTE: Before executing any of the steps below, read this entire lesson!! 1. If you have access to another terminal, do the following there. - Otherwise, exit this tutor as you did in lesson 1.2: :q! + Otherwise, exit this tutor as you did in lesson 1.1.2: :q! 2. At the shell prompt type this command: vim file.txt 'vim' is the command to start the Vim editor, 'file.txt' is the name of @@ -160,7 +160,7 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage. 6. After reading the above steps and understanding them: do it. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1 SUMMARY + Lesson 1.1 SUMMARY 1. The cursor is moved using either the arrow keys or the hjkl keys. @@ -180,10 +180,10 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage. NOTE: Pressing will place you in Normal mode or will cancel an unwanted and partially completed command. -Now continue with lesson 2. +Now continue with lesson 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.1: DELETION COMMANDS + Lesson 1.2.1: DELETION COMMANDS ** Type dw to delete a word. ** @@ -202,11 +202,11 @@ Now continue with lesson 2. ---> There are a some words fun that don't belong paper in this sentence. - 5. Repeat steps 3 and 4 until the sentence is correct and go to lesson 2.2. + 5. Repeat steps 3 and 4 until the sentence is correct and go to lesson 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.2: MORE DELETION COMMANDS + Lesson 1.2.2: MORE DELETION COMMANDS ** Type d$ to delete to the end of the line. ** @@ -222,14 +222,14 @@ Now continue with lesson 2. ---> Somebody typed the end of this line twice. end of this line twice. - 5. Move on to lesson 2.3 to understand what is happening. + 5. Move on to lesson 1.2.3 to understand what is happening. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.3: ON OPERATORS AND MOTIONS + Lesson 1.2.3: ON OPERATORS AND MOTIONS Many commands that change text are made from an operator and a motion. @@ -252,7 +252,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will move the cursor as specified. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.4: USING A COUNT FOR A MOTION + Lesson 1.2.4: USING A COUNT FOR A MOTION ** Typing a number before a motion repeats it that many times. ** @@ -269,13 +269,13 @@ NOTE: Pressing just the motion while in Normal mode without an operator will ---> This is just a line with words you can move around in. - 6. Move on to lesson 2.5. + 6. Move on to lesson 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.5: USING A COUNT TO DELETE MORE + Lesson 1.2.5: USING A COUNT TO DELETE MORE ** Typing a number with an operator repeats it that many times. ** @@ -298,7 +298,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.6: OPERATING ON LINES + Lesson 1.2.6: OPERATING ON LINES ** Type dd to delete a whole line. ** @@ -320,9 +320,8 @@ NOTE: Pressing just the motion while in Normal mode without an operator will ---> 7) And so are you. Doubling to operate on a line also works for operators mentioned below. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.7: THE UNDO COMMAND + Lesson 1.2.7: THE UNDO COMMAND ** Press u to undo the last commands, U to fix a whole line. ** @@ -339,13 +338,13 @@ Doubling to operate on a line also works for operators mentioned below. ---> Fiix the errors oon thhis line and reeplace them witth undo. - 8. These are very useful commands. Now move on to the lesson 2 Summary. + 8. These are very useful commands. Now move on to the lesson 1.2 Summary. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2 SUMMARY + Lesson 1.2 SUMMARY 1. To delete from the cursor up to the next word type: dw 2. To delete from the cursor up to the end of the word type: de @@ -368,7 +367,7 @@ Doubling to operate on a line also works for operators mentioned below. To undo the undos, type: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.1: THE PUT COMMAND + Lesson 1.3.1: THE PUT COMMAND ** Type p to put previously deleted text after the cursor. ** @@ -391,7 +390,7 @@ Doubling to operate on a line also works for operators mentioned below. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.2: THE REPLACE COMMAND + Lesson 1.3.2: THE REPLACE COMMAND ** Type rx to replace the character at the cursor with x . ** @@ -407,14 +406,14 @@ Doubling to operate on a line also works for operators mentioned below. ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ---> When this line was typed in, someone pressed some wrong keys! - 5. Now move on to lesson 3.3. + 5. Now move on to lesson 1.3.3. NOTE: Remember that you should be learning by doing, not memorization. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.3: THE CHANGE OPERATOR + Lesson 1.3.3: THE CHANGE OPERATOR ** To change until the end of a word, type ce . ** @@ -437,7 +436,7 @@ Notice that ce deletes the word and places you in Insert mode. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.4: MORE CHANGES USING c + Lesson 1.3.4: MORE CHANGES USING c ** The change operator is used with the same motions as delete. ** @@ -460,7 +459,7 @@ Notice that ce deletes the word and places you in Insert mode. NOTE: You can use the Backspace key to correct mistakes while typing. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3 SUMMARY + Lesson 1.3 SUMMARY 1. To put back text that has just been deleted, type p . This puts the @@ -483,7 +482,7 @@ Now go on to the next lesson. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.1: CURSOR LOCATION AND FILE STATUS + Lesson 1.4.1: CURSOR LOCATION AND FILE STATUS ** Type CTRL-G to show your location in the file and the file status. Type G to move to a line in the file. ** @@ -506,7 +505,7 @@ NOTE: You may see the cursor position in the lower right corner of the screen 4. If you feel confident to do this, execute steps 1 through 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.2: THE SEARCH COMMAND + Lesson 1.4.2: THE SEARCH COMMAND ** Type / followed by a phrase to search for the phrase. ** @@ -529,7 +528,7 @@ NOTE: When the search reaches the end of the file it will continue at the start, unless the 'wrapscan' option has been reset. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.3: MATCHING PARENTHESES SEARCH + Lesson 1.4.3: MATCHING PARENTHESES SEARCH ** Type % to find a matching ),], or } . ** @@ -552,7 +551,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.4: THE SUBSTITUTE COMMAND + Lesson 1.4.4: THE SUBSTITUTE COMMAND ** Type :s/old/new/g to substitute 'new' for 'old'. ** @@ -575,7 +574,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses! with a prompt whether to substitute or not. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4 SUMMARY + Lesson 1.4 SUMMARY 1. CTRL-G displays your location in the file and the file status. @@ -598,7 +597,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses! To ask for confirmation each time add 'c' :%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.1: HOW TO EXECUTE AN EXTERNAL COMMAND + Lesson 1.5.1: HOW TO EXECUTE AN EXTERNAL COMMAND ** Type :! followed by an external command to execute that command. ** @@ -621,7 +620,7 @@ NOTE: All : commands must be finished by hitting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.2: MORE ON WRITING FILES + Lesson 1.5.2: MORE ON WRITING FILES ** To save the changes made to the text, type :w FILENAME ** @@ -644,7 +643,7 @@ NOTE: If you were to exit Vim and start it again with vim TEST , the file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.3: SELECTING TEXT TO WRITE + Lesson 1.5.3: SELECTING TEXT TO WRITE ** To save part of the file, type v motion :w FILENAME ** @@ -667,14 +666,14 @@ NOTE: Pressing v starts Visual selection. You can move the cursor around to do something with the text. For example, d deletes the text. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.4: RETRIEVING AND MERGING FILES + Lesson 1.5.4: RETRIEVING AND MERGING FILES ** To insert the contents of a file, type :r FILENAME ** 1. Place the cursor just above this line. -NOTE: After executing Step 2 you will see text from lesson 5.3. Then move +NOTE: After executing Step 2 you will see text from lesson 1.5.3. Then move DOWN to see this lesson again. 2. Now retrieve your TEST file using the command :r TEST where TEST is @@ -682,7 +681,7 @@ NOTE: After executing Step 2 you will see text from lesson 5.3. Then move The file you retrieve is placed below the cursor line. 3. To verify that a file was retrieved, cursor back and notice that there - are now two copies of lesson 5.3, the original and the file version. + are now two copies of lesson 1.5.3, the original and the file version. NOTE: You can also read the output of an external command. For example, :r !ls reads the output of the ls command and puts it below the @@ -690,7 +689,7 @@ NOTE: You can also read the output of an external command. For example, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5 SUMMARY + Lesson 1.5 SUMMARY 1. :!command executes an external command. @@ -713,7 +712,7 @@ NOTE: You can also read the output of an external command. For example, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.1: THE OPEN COMMAND + Lesson 1.6.1: THE OPEN COMMAND ** Type o to open a line below the cursor and place you in Insert mode. ** @@ -736,7 +735,7 @@ NOTE: You can also read the output of an external command. For example, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.2: THE APPEND COMMAND + Lesson 1.6.2: THE APPEND COMMAND ** Type a to insert text AFTER the cursor. ** @@ -759,7 +758,7 @@ NOTE: a, i and A all go to the same Insert mode, the only difference is where the characters are inserted. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.3: ANOTHER WAY TO REPLACE + Lesson 1.6.3: ANOTHER WAY TO REPLACE ** Type a capital R to replace more than one character. ** @@ -782,8 +781,7 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an existing character. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.4: COPY AND PASTE TEXT - + Lesson 1.6.4: COPY AND PASTE TEXT ** Use the y operator to copy text and p to paste it ** @@ -806,7 +804,7 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an NOTE: You can also use y as an operator: yw yanks one word, yy yanks the whole line, then p puts that line. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.5: SET OPTION + Lesson 1.6.5: SET OPTION ** Set an option so a search or substitute ignores case ** @@ -829,7 +827,7 @@ NOTE: To remove the highlighting of matches enter: :nohlsearch NOTE: If you want to ignore case for just one search command, use \c in the phrase: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6 SUMMARY + Lesson 1.6 SUMMARY 1. Type o to open a line BELOW the cursor and start Insert mode. Type O to open a line ABOVE the cursor. @@ -852,7 +850,7 @@ NOTE: If you want to ignore case for just one search command, use \c 7. Prepend "no" to switch an option off: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.1: GETTING HELP + Lesson 1.7.1: GETTING HELP ** Use the on-line help system ** @@ -875,7 +873,7 @@ NOTE: If you want to ignore case for just one search command, use \c :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.2: CREATE A STARTUP SCRIPT + Lesson 1.7.2: CREATE A STARTUP SCRIPT ** Enable Vim features ** @@ -898,7 +896,7 @@ NOTE: If you want to ignore case for just one search command, use \c For more information type :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.3: COMPLETION + Lesson 1.7.3: COMPLETION ** Command line completion with CTRL-D and ** @@ -921,7 +919,7 @@ NOTE: Completion works for many commands. Just try pressing CTRL-D and . It is especially useful for :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7 SUMMARY + Lesson 1.7 SUMMARY 1. Type :help or press or to open a help window. @@ -945,7 +943,8 @@ NOTE: Completion works for many commands. Just try pressing CTRL-D and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - This concludes Chapter 1 of the Vim Tutor. Consider continuing with Chapter 2. + This concludes Chapter 1 of the Vim Tutor. Consider continuing with + Chapter 2. It was intended to give a brief overview of the Vim editor, just enough to allow you to use the editor fairly easily. It is far from complete as Vim diff --git a/usr/share/vim/vim91/tutor/tutor.bar b/usr/share/vim/vim91/tutor/tutor1.bar similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.bar rename to usr/share/vim/vim91/tutor/tutor1.bar index ec30eddaf17..a8a9c8a9954 100644 --- a/usr/share/vim/vim91/tutor/tutor.bar +++ b/usr/share/vim/vim91/tutor/tutor1.bar @@ -1,5 +1,7 @@ =============================================================================== = G o t i k a m i n n W I M M - S c h a i n e r - Fassung 1.7 = +=============================================================================== += C H A P T E R - 1 = =============================================================================== Dyr Wimm ist ayn gro mchtigs Blat, ds was mit aynn Wsn Befelh aufwartt; z @@ -20,9 +22,9 @@ Ietz schaust grad non, d dein Fststlltastn nit druckt ist; und aft geest glei aynmaal mit dyr j-Tastn abwrts (yso laaufft ds nmlich), hinst dst - de gantze Letzn 1.1 auf n Bildschirm haast. + de gantze Letzn 1.1.1 auf n Bildschirm haast. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.1: MIT N MRKL UMAYNANDFARN + Letzn 1.1.1: MIT N MRKL UMAYNANDFARN ** Dyrmitst mit n Mrkl umaynandkimmst, druck h, j, k und l wie unt zaigt. ** ^ Ayn slsbrugg: @@ -35,7 +37,7 @@ 2. Halt d Abhin-Tastn (j) druckt; aft rumplt s ainfach weiter. Netty yso kimmst gan dyr naehstn Letzn. - 3. Wie gsait, ietz bewgst di also mit derer Tastn gan dyr Letzn 1.2. + 3. Wie gsait, ietz bewgst di also mit derer Tastn gan dyr Letzn 1.1.2. Non bbs: Allweil, wenn dyr niemer ganz wol ist, wasst bbenn druckt haast, aft zipfst ; naacher bist wider ganz gwon in dyr Befelhs-Artweis. @@ -45,7 +47,7 @@ Non hjkl seind z haissn s Wimm-Urgstain; und de "Hrtn" seind ganz dyr- fr, d myn bei +dene bleibt. Prblt s ainfach aus! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.2: NN WIMM AUSSCHALTTN + Letzn 1.1.2: NN WIMM AUSSCHALTTN ALSO, EE WENNST BBS VON DAA UNT AUSFERST, LIS LIEBER ZEERST DE GANTZE LET- @@ -68,7 +70,7 @@ Anm Dautticht speichertst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.3: GWORT BARECHTN - LSCHN + Letzn 1.1.3: GWORT BARECHTN - LSCHN ** Druck x , dyrmitst ds Zaichen unter n Mrkl lschst. ** @@ -84,14 +86,14 @@ Anm ---> De Kkuue sprangg bber nn Maanad. - 5. Wenn ietz de Zeil verbssert ist, geest gan dyr Letzn 1.4. weiter. + 5. Wenn ietz de Zeil verbssert ist, geest gan dyr Letzn 1.1.4. weiter. Und ganz wichtig: Dyrweilst dnn Schainer durcharechtst, versuech nit bbenn, allss auswendig z lernen; nn, lern ainfach mit n Anwenddn! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.4: GWORT BARECHTN - EINFEGN + Letzn 1.1.4: GWORT BARECHTN - EINFEGN ** Druck i , dyrmitst bbs einfegst. ** @@ -110,11 +112,11 @@ Und ganz wichtig: Dyrweilst d ---> Daader gt dd bbs b. ---> Daader geet diend bbs ab. - 5. Balst mainst, dst ys Gwort-Einfegn kanst, aft geest gan dyr Letzn 1.5. + 5. Balst mainst, dst ys Gwort-Einfegn kanst, aft geest gan dyr Letzn 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.5: GWORT BARECHTN - ANFEGN + Letzn 1.1.5: GWORT BARECHTN - ANFEGN ** Druck A gan n Gwort Anfegn. ** @@ -135,9 +137,9 @@ Und ganz wichtig: Dyrweilst d ---> Aau daader stee Aau daader steet bbs Unvollstndigs. - 5. Wennst s Anfegn von Gwort drauf haast, naacherd gee gan dyr Letzn 1.6. + 5. Wennst s Anfegn von Gwort drauf haast, naacherd gee gan dyr Letzn 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.6: AYN DAUTTICHT BARECHTN + Letzn 1.1.6: AYN DAUTTICHT BARECHTN ** Mit :wq speichertst ayn Dautticht und verlaasst nn Wimm ganz. ** @@ -145,7 +147,7 @@ Und ganz wichtig: Dyrweilst d !! OBACHT: Ee wennst mit dnn alln daa unt weitertuest, lis zeerst de gantze Letzn durch!! - 1. Verlaa also s Blat, wie s in dyr Letzn 1.2. haisst, mit :q! ! + 1. Verlaa also s Blat, wie s in dyr Letzn 1.1.2. haisst, mit :q! ! 2. Gib d Faudung eyn n Eingib ein: vim Schainer . 'vim' ruefft s Blat auf, und 'Schainer' haisst de Dautticht, wost barechtn willst. Dyrmit @@ -160,7 +162,7 @@ Und ganz wichtig: Dyrweilst d 6. Aft dst de obignen Schritt glsn und kppt haast, kanst ys durchfern. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 1 + ZAMMENFASSUNG VON DYR LETZN 1.1 1. Dyr Mrkl werd mit de Tastnen hjkl older aau mit de Pfeiltastnen gsteuert. @@ -181,9 +183,9 @@ Und ganz wichtig: Dyrweilst d Anmrkung: Druckst , kimmst eyn de Befelhsartweis zrugg older brichst ayn Faudung ab, d wo dyr schiefgangen ist. - Ietz tue mit dyr Letzn 2 weiter. + Ietz tue mit dyr Letzn 1.2 weiter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.1.: LSHFAUDUNGEN + Letzn 1.2.1: LSHFAUDUNGEN ** Demmlt dw , dyrmitst ayn Wort lschst. ** @@ -204,9 +206,9 @@ Anm ---> Ayn ttlych Wrter lustig ghoernd nit Fisper eyn dnn Saz einhin. 5. fert d Schritt 3 und 4, hinst d dyr Saz psst, und gee aft gan dyr - Letzn 2.2. + Letzn 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.2.: NON MEERER LSHFAUDUNGEN + Letzn 1.2.2: NON MEERER LSHFAUDUNGEN ** Gib d$ ein, dst hinst eyn s Zeilnend lschst. ** @@ -222,14 +224,14 @@ Anm ---> bber haat s End von dyr Zeil doplt eingbn. doplt eingbn. - 5. Gee weiter gan dyr Letzn 2.3, dyrmitst versteest, was daader ablaaufft. + 5. Gee weiter gan dyr Letzn 1.2.3, dyrmitst versteest, was daader ablaaufft. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.3: PFEMERER UND WOLENDER + Letzn 1.2.3: PFEMERER UND WOLENDER Vil Faudungen, wo s Gwort ndernd, stznd si aus aynn Pfemerer und aynn Wo- @@ -252,7 +254,7 @@ Anm entsprchet weiter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.4: MIT AYNN ZLER D WOLENDER FERN + Letzn 1.2.4: MIT AYNN ZLER D WOLENDER FERN ** Gib i ayn Zal vor aynn Wolend ein, werd ds Sel entsprchet oft gangen. ** @@ -269,13 +271,13 @@ Anm ---> Ds ist ietz grad ayn Zeil zo n drinn Umaynanderruedern. - 6. Gee weiter gan dyr Letzn 2.5. + 6. Gee weiter gan dyr Letzn 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.5: DURCH AYNN ZLER GLEI MEERER LSCHN + Letzn 1.2.5: DURCH AYNN ZLER GLEI MEERER LSCHN ** Ayn Zal vor aynn Pfemerer fert dnn entsprchet oft aus. ** @@ -298,7 +300,7 @@ Anm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.6: ARECHTN AUF ZEILN + Letzn 1.2.6: ARECHTN AUF ZEILN ** Zipf dd , um ayn gantze Zeil z lschn. ** @@ -321,7 +323,7 @@ Anm ---> 7) Dirndl, dein Gschau. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.7: RUGGGNGIG MACHEN (RUGGLN) + Letzn 1.2.7: RUGGGNGIG MACHEN (RUGGLN) ** Zipf u , dyrmitst de lsstn Faudungen ruggltst ** @@ -342,9 +344,9 @@ Anm ---> Beerichtig d Faeller voon dehrer Zeiil und sttll s mitt n Ruggruggln wi- der her. 8. Die Faudungen seind gro wichtig; s helffend ainn nrrisch weiter. - Ietz gee weiter gan dyr Zammenfassung von dyr Letzn 2. + Ietz gee weiter gan dyr Zammenfassung von dyr Letzn 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 2 + ZAMMENFASSUNG VON DYR LETZN 1.2 1. Um von n Mrkl aus hinst eyn s naehste Wort zo n Lschn, zipf: dw @@ -367,7 +369,7 @@ Anm Um "rugg-z-ruggln", also allss wider herzstlln, zipf: r ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 3.1: ANFEGN (put) + Letzn 1.3.1: ANFEGN (put) ** Zipf p , dyrmitst bbs gnetty Glschts naach n Mrkl anfegst. ** @@ -390,7 +392,7 @@ Anm ---> c) Bedachtn kan myn lernen. ---> a) Roosn seind root. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 3.2: ERSTZN (replace) + Letzn 1.3.2: ERSTZN (replace) ** Zipf rx , um ds Zaichen unter n Mrkl durch x z erstzn. ** @@ -406,14 +408,14 @@ Anm ---> Wie d Zeit eingobn wurd, wurdnd ainike falsche Zastnen zipft! ---> Wie d Zeil eingbn wurd, wurdnd ainige falsche Tastnen zipft! - 5. Ietz tue mit dyr Letzn 3.3 weiter. + 5. Ietz tue mit dyr Letzn 1.3.3 weiter. Anmrkung: Vergi nit drauf, dst mit n Anwenddn lernen solltst und nit bbenn mit n Auswendiglernen! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 3.3: NDERN (change) + Letzn 1.3.3: NDERN (change) ** Um hinst eyn s Wortend z ndern, zipf ce . ** @@ -459,7 +461,7 @@ ce l Denk allweil dran, dst iederzeit mit dyr Ruggtastn Faeler ausbssern kanst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 3 + ZAMMENFASSUNG VON DYR LETZN 1.3 1. Um ayn vorher glschts Gwort anzfegn, zipf p . Daa dyrmit werd ds @@ -482,7 +484,7 @@ Ietz tue mit dyr naehstn Letzn weiter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 4.1: MRKLSTLLUNG UND DAUTTICHTDARSTAND + Letzn 1.4.1: MRKLSTLLUNG UND DAUTTICHTDARSTAND ** Demmlt g, dst nn Befand und Darstand von dyr Dautticht anzaigst. ** ** Zipf G , dyrmitst auf ayn bestimmte Zeil in dyr Dautticht hinkimmst. ** @@ -505,7 +507,7 @@ Anm 4. Wennst di sicher gnueg felst, aft fer d Schritt 1 hinst 3 aus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 4.2: DYR BEFELH ZO N SUECHEN + Letzn 1.4.2: DYR BEFELH ZO N SUECHEN ** Zipf / und dyrnaach aynn Ausdruk, um selbignen zo n Suechen. ** @@ -528,7 +530,7 @@ Anm Anmrkung: Wenn d Suech s Dauttichtend dyrraicht haat, geet s eyn n Anfang wi- der weiter dyrmit, men Sach dyr Schaltter 'wrapscan' wr auf aus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 4.3: DE GGNKLAMMERN FINDDN + Letzn 1.4.3: DE GGNKLAMMERN FINDDN ** Zipf % , um de entsprchete Klammer ) , ] older } z finddn. ** @@ -551,7 +553,7 @@ Anm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 4.4: D ERSTZUNGSFAUDUNG (substitute) + Letzn 1.4.4: D ERSTZUNGSFAUDUNG (substitute) ** Zipf :s/alt/neu/g , um 'alt' durch 'neu' zo n Erstzn. ** @@ -574,7 +576,7 @@ Anm Mit :%s/alt/neu/gc finddst allsand Vrkemmen in dyr gsamtn Dautticht; daa werst aber zeerst non gfraagt, obst ys erstzn willst older nity. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 4 + ZAMMENFASSUNG VON DYR LETZN 1.4 1. g zaigt dnn ietzundn Dauttichtbefand und nn Darstand dyrvon an. G bringt di an s End von dyr Dautticht. @@ -597,7 +599,7 @@ Anm Mechst allss in dyr gantzn Dautticht erstzn, gib ein: :%s/alt/neu/g . Willst ayn ieds Maal bstaetln, hng 'c' wie confirm hint anhin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 5.1: ZWISCHNDRINN AYNN AUSSERIGNEN BEFELH AUSFERN + Letzn 1.5.1: ZWISCHNDRINN AYNN AUSSERIGNEN BEFELH AUSFERN ** Willst ayn Gffaudung ausfern, gib ainfach d sel naach :! ein. ** @@ -620,7 +622,7 @@ Und wolgm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 5.2: NON MEERER DRBER, WIE MYN DAUTTICHTN SCHREIBT + Letzn 1.5.2: NON MEERER DRBER, WIE MYN DAUTTICHTN SCHREIBT ** Um bbs Gnderts neu z speichern, zipf :w NEUER_DAUTTICHTNAM . ** @@ -643,7 +645,7 @@ Anm 5. Ietz verweitert d Dautticht - fallsst s Fenstl haast - , mit :!del POCH beziehungsweis bei aynn Unixgebu mit :!rm POCH . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 5.3: AYNN TAIL VON N GWORT ZO N SPEICHERN AUSWALN + Letzn 1.5.3: AYNN TAIL VON N GWORT ZO N SPEICHERN AUSWALN ** Um aynn Tail von dyr Dautticht z speichern, zipf v [Wolend] :w DAUTTICHT ** @@ -666,7 +668,7 @@ Anm Pfemerer mit dnn Gwort bbs machen. Zo n Beispil lscht d ds Gwort. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 5.4: EINLSN UND ZAMMENFERN VON DAUTTICHTN + Letzn 1.5.4: EINLSN UND ZAMMENFERN VON DAUTTICHTN ** Um nn Inhalt von ayner Dautticht einzlsn, zipf :r DAUTTICHTNAM ** @@ -674,14 +676,14 @@ Anm 1. Stz nn Mrkl ber d Zeil daader. OBACHT: Aft dst nn Schrit 2 ausgfert haast, seghst auf aynmaal bbs aus - dyr Letzn 5.3. Bewg di naacherd wider abwrts, dyrmitst d Letzn wi- + dyr Letzn 1.5.3. Bewg di naacherd wider abwrts, dyrmitst d Letzn wi- derfinddst. 2. Ietz lis dein Dautticht POCH ein, indem dst d Faudung :r POCH aus- ferst, wobei wie gsait POCH fr dnn von dir ausgsuechtn Dauttichtnam steet. De einglsne Dautticht werd unterhalb dyr Mrklzeil eingfegt. 3. Um zo n berpreffen, ob de Dautticht aau gwi einglsn ist, gee zrugg; - und du seghst, d s ietz zwo Ausfrtigungen von dyr Letzn 5.3. geit, s + und du seghst, d s ietz zwo Ausfrtigungen von dyr Letzn 1.5.3. geit, s Urniss und de eingfegte Dauttichtfassung. Anmrkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlsn. Zo n Bei- @@ -689,7 +691,7 @@ Anm unterhalb n Mrkl ein. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 5 + ZAMMENFASSUNG VON DYR LETZN 1.5 1. :!FAUDUNG fert aynn ausserignen Befelh aus. @@ -712,7 +714,7 @@ Anm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.1: ZEIL FFNEN (open) + Letzn 1.6.1: ZEIL FFNEN (open) ** Zipf o , um ayn Zeil unterhalb n Mrkl z ffnen und eyn d ** @@ -735,7 +737,7 @@ Anm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.2: GWORT ANFEGN (append) + Letzn 1.6.2: GWORT ANFEGN (append) ** Zipf a , um bbs NAACH n Mrkl einzfegn. ** @@ -758,7 +760,7 @@ Anm Anmrkung: a , i und A bringend ainn gleichermaan eyn d Einfegartweis; dyr ainzige Unterschaid ist, WO mit n Einfegn angfangt werd. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.3: AYN ANDERNE WEIS ZO N ERSTZN (replace) + Letzn 1.6.3: AYN ANDERNE WEIS ZO N ERSTZN (replace) ** Demmlt ayn groosss R , um meerer als wie grad ain Zaichen z erstzn. ** @@ -781,7 +783,7 @@ Anm mlte Zaichen lscht ayn vorhanddns. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.4: GWORT AAMEN UND EINFEGN + Letzn 1.6.4: GWORT AAMEN UND EINFEGN ** Benutz nn Pfemerer y , um bbs z aamen, und p , um bbs einzfegn. ** @@ -804,7 +806,7 @@ Anm Anmrkung: Du kanst y aau als Pfemerer verwenddn; yw zo n Beispil aamt hinst eyn n naehstn Wortanfang (aane dnn selber). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.5: SCHALTTER STZN + Letzn 1.6.5: SCHALTTER STZN ** Stz aynn Schaltter yso, d ayn Suech older Erstzung Groo- und Klain- ** ** schreibung bergeet. ** @@ -827,7 +829,7 @@ Anm Anmrkung: Sollt klain/groo bei ayner ainzignen Suech wurst sein, benutz \c in n Suechausdruk: /bergee\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 6 + ZAMMENFASSUNG VON DYR LETZN 1.6 1. Zipf o , um ayn Zeil UNTERHALB n Mrkl z ffnen und d Einfegartweis z ginnen. @@ -850,7 +852,7 @@ Anm 7. Stll yn ayner Zwisl "no" voran, dst ys abschalttst: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 7.1: AYN HILFGWORT AUFRUEFFEN + Letzn 1.7.1: AYN HILFGWORT AUFRUEFFEN ** Nutz ds einbaute Hilfgebu, de "Betribsanlaittung". ** @@ -873,7 +875,7 @@ Anm :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 7.2: ERSTLL AYN GIN-SCHRIPF + Letzn 1.7.2: ERSTLL AYN GIN-SCHRIPF ** Mutz nn Wimm mit de einbautn Faehigkeitn auf. ** @@ -896,7 +898,7 @@ Anm Du kanst dyr allss eyn d Dautticht einhinschreibn, wasst bstndig habn willst. Meerer dyrzue erfarst unter: :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 7.3: VERGNTZN + Letzn 1.7.3: VERGNTZN ** Befelhszeilnvergntzung mit d und ** @@ -919,7 +921,7 @@ Anm Anmrkung: D Vergntzung geit s fr aynn Hauffen Faudungen. Versuech ainfach d und . Bsunders ntzlich ist ds bei :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 7 + ZAMMENFASSUNG VON DYR LETZN 1.7 1. Zipf :help oder druck oder , um ayn Hilffenster z ffnen. diff --git a/usr/share/vim/vim91/tutor/tutor.bar.utf-8 b/usr/share/vim/vim91/tutor/tutor1.bar.utf-8 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.bar.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.bar.utf-8 index 42bea0eac2c..74c3889d67b 100644 --- a/usr/share/vim/vim91/tutor/tutor.bar.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.bar.utf-8 @@ -1,5 +1,7 @@ =============================================================================== = G o t i k a m i n n W I M M - S c h a i n e r - Fassung 1.7 = +=============================================================================== += C H A P T E R - 1 = =============================================================================== Dyr Wimm ist ayn gro mächtigs Blat, dös was mit aynn Wösn Befelh aufwartt; z @@ -20,9 +22,9 @@ Ietz schaust grad non, däß dein Föststölltastn nit druckt ist; und aft geest glei aynmaal mit dyr j-Tastn abwärts (yso laaufft dös nömlich), hinst däßst - de gantze Letzn 1.1 auf n Bildschirm haast. + de gantze Letzn 1.1.1 auf n Bildschirm haast. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.1: MIT N MÖRKL UMAYNANDFARN + Letzn 1.1.1: MIT N MÖRKL UMAYNANDFARN ** Dyrmitst mit n Mörkl umaynandkimmst, druck h, j, k und l wie unt zaigt. ** ^ Ayn Öslsbrugg: @@ -35,7 +37,7 @@ 2. Halt d Abhin-Tastn (j) druckt; aft rumplt s ainfach weiter. Netty yso kimmst gan dyr naehstn Letzn. - 3. Wie gsait, ietz bewögst di also mit derer Tastn gan dyr Letzn 1.2. + 3. Wie gsait, ietz bewögst di also mit derer Tastn gan dyr Letzn 1.1.2. Non öbbs: Allweil, wenn dyr niemer ganz wol ist, wasst öbbenn druckt haast, aft zipfst ; naacher bist wider ganz gwon in dyr Befelhs-Artweis. @@ -45,7 +47,7 @@ Non öbbs: Allweil, wenn dyr niemer ganz wol ist, wasst öbbenn druckt haast, af hjkl seind z haissn s Wimm-Urgstain; und de "Hörtn" seind ganz dyr- für, däß myn bei +dene bleibt. Pröblt s ainfach aus! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.2: ÖNN WIMM AUSSCHALTTN + Letzn 1.1.2: ÖNN WIMM AUSSCHALTTN ALSO, EE WENNST ÖBBS VON DAA UNT AUSFÜERST, LIS LIEBER ZEERST DE GANTZE LET- @@ -68,7 +70,7 @@ Anmörkung: Mit :q! verwirffst allss, wasst göndert older enther gschrib Dautticht speichertst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.3: GWORT BARECHTN - LÖSCHN + Letzn 1.1.3: GWORT BARECHTN - LÖSCHN ** Druck x , dyrmitst dös Zaichen unter n Mörkl löschst. ** @@ -84,14 +86,14 @@ Anmörkung: Mit :q! verwirffst allss, wasst göndert older enther gschrib ---> De Kkuue sprangg übber nn Maanad. - 5. Wenn ietz de Zeil verbössert ist, geest gan dyr Letzn 1.4. weiter. + 5. Wenn ietz de Zeil verbössert ist, geest gan dyr Letzn 1.1.4. weiter. Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn, allss auswendig z lernen; nän, lern ainfach mit n Anwenddn! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.4: GWORT BARECHTN - EINFÜEGN + Letzn 1.1.4: GWORT BARECHTN - EINFÜEGN ** Druck i , dyrmitst öbbs einfüegst. ** @@ -110,11 +112,11 @@ Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn ---> Daader gt dd öbbs b. ---> Daader geet diend öbbs ab. - 5. Balst mainst, däßst ys Gwort-Einfüegn kanst, aft geest gan dyr Letzn 1.5. + 5. Balst mainst, däßst ys Gwort-Einfüegn kanst, aft geest gan dyr Letzn 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.5: GWORT BARECHTN - ANFÜEGN + Letzn 1.1.5: GWORT BARECHTN - ANFÜEGN ** Druck A gan n Gwort Anfüegn. ** @@ -135,9 +137,9 @@ Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn ---> Aau daader stee Aau daader steet öbbs Unvollstöndigs. - 5. Wennst s Anfüegn von Gwort drauf haast, naacherd gee gan dyr Letzn 1.6. + 5. Wennst s Anfüegn von Gwort drauf haast, naacherd gee gan dyr Letzn 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 1.6: AYN DAUTTICHT BARECHTN + Letzn 1.1.6: AYN DAUTTICHT BARECHTN ** Mit :wq speichertst ayn Dautticht und verlaasst önn Wimm ganz. ** @@ -145,7 +147,7 @@ Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn !! OBACHT: Ee wennst mit dönn alln daa unt weitertuest, lis zeerst de gantze Letzn durch!! - 1. Verlaaß also s Blat, wie s in dyr Letzn 1.2. haisst, mit :q! ! + 1. Verlaaß also s Blat, wie s in dyr Letzn 1.1.2. haisst, mit :q! ! 2. Gib dö Faudung eyn n Eingib ein: vim Schainer . 'vim' ruefft s Blat auf, und 'Schainer' haisst de Dautticht, wost barechtn willst. Dyrmit @@ -160,7 +162,7 @@ Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn 6. Aft däßst de obignen Schritt glösn und käppt haast, kanst ys durchfüern. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 1 + ZAMMENFASSUNG VON DYR LETZN 1.1 1. Dyr Mörkl werd mit de Tastnen hjkl older aau mit de Pfeiltastnen gsteuert. @@ -181,9 +183,9 @@ Und ganz wichtig: Dyrweilst dönn Schainer durcharechtst, versuech nit öbbenn Anmörkung: Druckst , kimmst eyn de Befelhsartweis zrugg older brichst ayn Faudung ab, dö wo dyr schiefgangen ist. - Ietz tue mit dyr Letzn 2 weiter. + Ietz tue mit dyr Letzn 1.2 weiter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.1.: LÖSHFAUDUNGEN + Letzn 1.2.1: LÖSHFAUDUNGEN ** Demmlt dw , dyrmitst ayn Wort löschst. ** @@ -204,9 +206,9 @@ Anmörkung: Druckst , kimmst eyn de Befelhsartweis zrugg older brichst ---> Ayn Öttlych Wörter lustig ghoernd nit Fisper eyn dönn Saz einhin. 5. Äfert d Schritt 3 und 4, hinst däß dyr Saz pässt, und gee aft gan dyr - Letzn 2.2. + Letzn 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.2.: NON MEERER LÖSHFAUDUNGEN + Letzn 1.2.2: NON MEERER LÖSHFAUDUNGEN ** Gib d$ ein, däßst hinst eyn s Zeilnend löschst. ** @@ -222,14 +224,14 @@ Anmörkung: Druckst , kimmst eyn de Befelhsartweis zrugg older brichst ---> Öbber haat s End von dyr Zeil doplt eingöbn. doplt eingöbn. - 5. Gee weiter gan dyr Letzn 2.3, dyrmitst versteest, was daader ablaaufft. + 5. Gee weiter gan dyr Letzn 1.2.3, dyrmitst versteest, was daader ablaaufft. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.3: PFEMERER UND WOLENDER + Letzn 1.2.3: PFEMERER UND WOLENDER Vil Faudungen, wo s Gwort öndernd, sötznd si aus aynn Pfemerer und aynn Wo- @@ -252,7 +254,7 @@ Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mör entspröchet weiter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.4: MIT AYNN ZÖLER D WOLENDER ÄFERN + Letzn 1.2.4: MIT AYNN ZÖLER D WOLENDER ÄFERN ** Gib i ayn Zal vor aynn Wolend ein, werd dös Sel entspröchet oft gangen. ** @@ -269,13 +271,13 @@ Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mör ---> Dös ist ietz grad ayn Zeil zo n drinn Umaynanderruedern. - 6. Gee weiter gan dyr Letzn 2.5. + 6. Gee weiter gan dyr Letzn 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.5: DURCH AYNN ZÖLER GLEI MEERER LÖSCHN + Letzn 1.2.5: DURCH AYNN ZÖLER GLEI MEERER LÖSCHN ** Ayn Zal vor aynn Pfemerer füert dönn entspröchet oft aus. ** @@ -298,7 +300,7 @@ Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mör ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.6: ARECHTN AUF ZEILN + Letzn 1.2.6: ARECHTN AUF ZEILN ** Zipf dd , um ayn gantze Zeil z löschn. ** @@ -321,7 +323,7 @@ Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mör ---> 7) Dirndl, dein Gschau. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 2.7: RUGGGÖNGIG MACHEN (RUGGLN) + Letzn 1.2.7: RUGGGÖNGIG MACHEN (RUGGLN) ** Zipf u , dyrmitst de lösstn Faudungen ruggltst ** @@ -342,9 +344,9 @@ Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mör ---> Beerichtig d Faeller voon dehrer Zeiil und sttöll s mitt n Ruggruggln wi- der her. 8. Die Faudungen seind gro wichtig; sö helffend ainn närrisch weiter. - Ietz gee weiter gan dyr Zammenfassung von dyr Letzn 2. + Ietz gee weiter gan dyr Zammenfassung von dyr Letzn 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 2 + ZAMMENFASSUNG VON DYR LETZN 1.2 1. Um von n Mörkl aus hinst eyn s naehste Wort zo n Löschn, zipf: dw @@ -367,7 +369,7 @@ Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mör Um "rugg-z-ruggln", also allss wider herzstölln, zipf: r ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 3.1: ANFÜEGN (»put«) + Letzn 1.3.1: ANFÜEGN (»put«) ** Zipf p , dyrmitst öbbs gnetty Glöschts naach n Mörkl anfüegst. ** @@ -390,7 +392,7 @@ Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mör ---> c) Bedachtn kan myn lernen. ---> a) Roosn seind root. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 3.2: ERSÖTZN (»replace«) + Letzn 1.3.2: ERSÖTZN (»replace«) ** Zipf rx , um dös Zaichen unter n Mörkl durch x z ersötzn. ** @@ -406,14 +408,14 @@ Anmörkung: Gib i grad dös zwaitte Zaichen yllain ein, ruckt halt dyr Mör ---> Wie dö Zeit eingobn wurd, wurdnd ainike falsche Zastnen zipft! ---> Wie dö Zeil eingöbn wurd, wurdnd ainige falsche Tastnen zipft! - 5. Ietz tue mit dyr Letzn 3.3 weiter. + 5. Ietz tue mit dyr Letzn 1.3.3 weiter. Anmörkung: Vergiß nit drauf, däßst mit n Anwenddn lernen solltst und nit öbbenn mit n Auswendiglernen! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 3.3: ÖNDERN (»change«) + Letzn 1.3.3: ÖNDERN (»change«) ** Um hinst eyn s Wortend z öndern, zipf ce . ** @@ -459,7 +461,7 @@ ce löscht also s Wort und schlaaufft di eyn d Eingaab-Artweis. Denk allweil dran, däßst iederzeit mit dyr Ruggtastn Faeler ausbössern kanst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 3 + ZAMMENFASSUNG VON DYR LETZN 1.3 1. Um ayn vorher glöschts Gwort anzfüegn, zipf p . Daa dyrmit werd dös @@ -482,7 +484,7 @@ Ietz tue mit dyr naehstn Letzn weiter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 4.1: MÖRKLSTÖLLUNG UND DAUTTICHTDARSTAND + Letzn 1.4.1: MÖRKLSTÖLLUNG UND DAUTTICHTDARSTAND ** Demmlt g, däßst önn Befand und Darstand von dyr Dautticht anzaigst. ** ** Zipf G , dyrmitst auf ayn bestimmte Zeil in dyr Dautticht hinkimmst. ** @@ -505,7 +507,7 @@ Anmörkung: Müglicherweis seghst aau önn Mörklbefand in n zesmen untern Bi 4. Wennst di sicher gnueg füelst, aft füer d Schritt 1 hinst 3 aus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 4.2: DYR BEFELH ZO N SUECHEN + Letzn 1.4.2: DYR BEFELH ZO N SUECHEN ** Zipf / und dyrnaach aynn Ausdruk, um selbignen zo n Suechen. ** @@ -528,7 +530,7 @@ Anmörkung: Müglicherweis seghst aau önn Mörklbefand in n zesmen untern Bi Anmörkung: Wenn d Suech s Dauttichtend dyrraicht haat, geet s eyn n Anfang wi- der weiter dyrmit, men Sach dyr Schaltter 'wrapscan' wär auf aus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 4.3: DE GÖGNKLAMMERN FINDDN + Letzn 1.4.3: DE GÖGNKLAMMERN FINDDN ** Zipf % , um de entspröchete Klammer ) , ] older } z finddn. ** @@ -551,7 +553,7 @@ Anmörkung: Um dö Müglichkeit gaast bsunders froo sein, wennst aynmaal in ay ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 4.4: D ERSÖTZUNGSFAUDUNG (»substitute«) + Letzn 1.4.4: D ERSÖTZUNGSFAUDUNG (»substitute«) ** Zipf :s/alt/neu/g , um 'alt' durch 'neu' zo n Ersötzn. ** @@ -574,7 +576,7 @@ Anmörkung: Um dö Müglichkeit gaast bsunders froo sein, wennst aynmaal in ay Mit :%s/alt/neu/gc finddst allsand Vürkemmen in dyr gsamtn Dautticht; daa werst aber zeerst non gfraagt, obst ys ersötzn willst older nity. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 4 + ZAMMENFASSUNG VON DYR LETZN 1.4 1. g zaigt dönn ietzundn Dauttichtbefand und önn Darstand dyrvon an. G bringt di an s End von dyr Dautticht. @@ -597,7 +599,7 @@ Anmörkung: Um dö Müglichkeit gaast bsunders froo sein, wennst aynmaal in ay Mechst allss in dyr gantzn Dautticht ersötzn, gib ein: :%s/alt/neu/g . Willst ayn ieds Maal bstaetln, höng 'c' wie »confirm« hint anhin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 5.1: ZWISCHNDRINN AYNN AUSSERIGNEN BEFELH AUSFÜERN + Letzn 1.5.1: ZWISCHNDRINN AYNN AUSSERIGNEN BEFELH AUSFÜERN ** Willst ayn Gfäßfaudung ausfüern, gib ainfach dö sel naach :! ein. ** @@ -620,7 +622,7 @@ Und wolgmörkt: Alle Befelh, wo mit : angeend, müessend mit bst ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 5.2: NON MEERER DRÜBER, WIE MYN DAUTTICHTN SCHREIBT + Letzn 1.5.2: NON MEERER DRÜBER, WIE MYN DAUTTICHTN SCHREIBT ** Um öbbs Gönderts neu z speichern, zipf :w NEUER_DAUTTICHTNAM . ** @@ -643,7 +645,7 @@ Anmörkung: Stigst ietz aus n Wimm aus und gännst n aft wider mit vim POCH 5. Ietz verweitert dö Dautticht - fallsst s Fenstl haast - , mit :!del POCH beziehungsweis bei aynn Unixgebäu mit :!rm POCH . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 5.3: AYNN TAIL VON N GWORT ZO N SPEICHERN AUSWALN + Letzn 1.5.3: AYNN TAIL VON N GWORT ZO N SPEICHERN AUSWALN ** Um aynn Tail von dyr Dautticht z speichern, zipf v [Wolend] :w DAUTTICHT ** @@ -666,7 +668,7 @@ Anmörkung: Druckt myn v , ginnt d Sichtisch-Auswal. Du kanst mit n Mörkl um Pfemerer mit dönn Gwort öbbs machen. Zo n Beispil löscht d dös Gwort. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 5.4: EINLÖSN UND ZAMMENFÜERN VON DAUTTICHTN + Letzn 1.5.4: EINLÖSN UND ZAMMENFÜERN VON DAUTTICHTN ** Um önn Inhalt von ayner Dautticht einzlösn, zipf :r DAUTTICHTNAM ** @@ -674,14 +676,14 @@ Anmörkung: Druckt myn v , ginnt d Sichtisch-Auswal. Du kanst mit n Mörkl um 1. Sötz önn Mörkl über dö Zeil daader. OBACHT: Aft däßst önn Schrit 2 ausgfüert haast, seghst auf aynmaal öbbs aus - dyr Letzn 5.3. Bewög di naacherd wider abwärts, dyrmitst dö Letzn wi- + dyr Letzn 1.5.3. Bewög di naacherd wider abwärts, dyrmitst dö Letzn wi- derfinddst. 2. Ietz lis dein Dautticht POCH ein, indem däßst d Faudung :r POCH aus- füerst, wobei wie gsait POCH für dönn von dir ausgsuechtn Dauttichtnam steet. De einglösne Dautticht werd unterhalb dyr Mörklzeil eingfüegt. 3. Um zo n Überprüeffen, ob de Dautticht aau gwiß einglösn ist, gee zrugg; - und du seghst, däß s ietz zwo Ausförtigungen von dyr Letzn 5.3. geit, s + und du seghst, däß s ietz zwo Ausförtigungen von dyr Letzn 1.5.3. geit, s Urniss und de eingfüegte Dauttichtfassung. Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei- @@ -689,7 +691,7 @@ Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei unterhalb n Mörkl ein. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 5 + ZAMMENFASSUNG VON DYR LETZN 1.5 1. :!FAUDUNG füert aynn ausserignen Befelh aus. @@ -712,7 +714,7 @@ Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.1: ZEIL ÖFFNEN (»open«) + Letzn 1.6.1: ZEIL ÖFFNEN (»open«) ** Zipf o , um ayn Zeil unterhalb n Mörkl z öffnen und eyn d ** @@ -735,7 +737,7 @@ Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.2: GWORT ANFÜEGN (»append«) + Letzn 1.6.2: GWORT ANFÜEGN (»append«) ** Zipf a , um öbbs NAACH n Mörkl einzfüegn. ** @@ -758,7 +760,7 @@ Anmörkung: Du kanst aau d Ausgaab von aynn Ausserigbefelh einlösn. Zo n Bei Anmörkung: a , i und A bringend ainn gleichermaaßn eyn d Einfüegartweis; dyr ainzige Unterschaid ist, WO mit n Einfüegn angfangt werd. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.3: AYN ANDERNE WEIS ZO N ERSÖTZN (»replace«) + Letzn 1.6.3: AYN ANDERNE WEIS ZO N ERSÖTZN (»replace«) ** Demmlt ayn groosss R , um meerer als wie grad ain Zaichen z ersötzn. ** @@ -781,7 +783,7 @@ Anmörkung: D Ersötzungsartweis ist wie d Einfüegartweis, aber ayn ieds einde mlte Zaichen löscht ayn vorhanddns. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.4: GWORT AAMEN UND EINFÜEGN + Letzn 1.6.4: GWORT AAMEN UND EINFÜEGN ** Benutz önn Pfemerer y , um öbbs z aamen, und p , um öbbs einzfüegn. ** @@ -804,7 +806,7 @@ Anmörkung: D Ersötzungsartweis ist wie d Einfüegartweis, aber ayn ieds einde Anmörkung: Du kanst y aau als Pfemerer verwenddn; yw zo n Beispil aamt hinst eyn n naehstn Wortanfang (aane dönn selber). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 6.5: SCHALTTER SÖTZN + Letzn 1.6.5: SCHALTTER SÖTZN ** Sötz aynn Schaltter yso, däß ayn Suech older Ersötzung Grooß- und Klain- ** ** schreibung übergeet. ** @@ -827,7 +829,7 @@ Anmörkung: Mechst de Tröffer niemer vürherghöbt seghn, gib ein: :nohlsea Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \c in n Suechausdruk: /übergee\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 6 + ZAMMENFASSUNG VON DYR LETZN 1.6 1. Zipf o , um ayn Zeil UNTERHALB n Mörkl z öffnen und d Einfüegartweis z ginnen. @@ -850,7 +852,7 @@ Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \ 7. Stöll yn ayner Zwisl "no" voran, däßst ys abschalttst: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 7.1: AYN HILFGWORT AUFRUEFFEN + Letzn 1.7.1: AYN HILFGWORT AUFRUEFFEN ** Nutz dös einbaute Hilfgebäu, de "Betribsanlaittung". ** @@ -873,7 +875,7 @@ Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \ :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 7.2: ERSTÖLL AYN GIN-SCHRIPF + Letzn 1.7.2: ERSTÖLL AYN GIN-SCHRIPF ** Mutz önn Wimm mit de einbautn Faehigkeitn auf. ** @@ -896,7 +898,7 @@ Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \ Du kanst dyr allss eyn dö Dautticht einhinschreibn, wasst bständig habn willst. Meerer dyrzue erfarst unter: :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Letzn 7.3: VERGÖNTZN + Letzn 1.7.3: VERGÖNTZN ** Befelhszeilnvergöntzung mit d und ** @@ -919,7 +921,7 @@ Anmörkung: Sollt klain/grooß bei ayner ainzignen Suech wurst sein, benutz \ Anmörkung: D Vergöntzung geit s für aynn Hauffen Faudungen. Versuech ainfach d und . Bsunders nützlich ist dös bei :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZAMMENFASSUNG VON DYR LETZN 7 + ZAMMENFASSUNG VON DYR LETZN 1.7 1. Zipf :help oder druck oder , um ayn Hilffenster z öffnen. diff --git a/usr/share/vim/vim91/tutor/tutor.bg.utf-8 b/usr/share/vim/vim91/tutor/tutor1.bg.utf-8 similarity index 96% rename from usr/share/vim/vim91/tutor/tutor.bg.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.bg.utf-8 index 325ed784e58..0426291e074 100644 --- a/usr/share/vim/vim91/tutor/tutor.bg.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.bg.utf-8 @@ -23,7 +23,7 @@ j няколко пъти, така че Урок 1.1 да се побере на екрана. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.1: ПРИДВИЖВАНЕ НА ПОКАЗАЛЕЦА + Урок 1.1.1: ПРИДВИЖВАНЕ НА ПОКАЗАЛЕЦА ** За да преместите показалеца, натискайте клавишите h,j,k,l както е указано. ** @@ -46,7 +46,7 @@ hjkl ще можете да се придвижвате по-бързо, след като свикнете. Наистина! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.2: Излизане от VIM (quit) + Урок 1.1.2: Излизане от VIM (quit) Важно!!! Преди да изпълните която и да е от стъпките по-долу, прочетете @@ -70,7 +70,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.3: ПРОМЯНА НА ТЕКСТ - ИЗТРИВАНЕ (DELETE) + Урок 1.1.3: ПРОМЯНА НА ТЕКСТ - ИЗТРИВАНЕ (DELETE) ** Натиснете x , за да изтриете буквата под показалеца. ** @@ -93,7 +93,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.4: ПРОМЯНА НА ТЕКСТ - ВЪВЕЖДАНЕ (INSERT) + Урок 1.1.4: ПРОМЯНА НА ТЕКСТ - ВЪВЕЖДАНЕ (INSERT) ** Бележка на преводача ** @@ -133,7 +133,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.5: ПРОМЯНА НА ТЕКСТ - ДОБАВЯНЕ (APPEND) + Урок 1.1.5: ПРОМЯНА НА ТЕКСТ - ДОБАВЯНЕ (APPEND) ** Натиснете A (SHIFT+a) , за да добавите текст. ** @@ -157,14 +157,14 @@ 5. След като овладеете добавянето на текст, отидете на Урок 1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.6: ПРОМЯНА НА ФАЙЛ + Урок 1.1.6: ПРОМЯНА НА ФАЙЛ ** Използвайте :wq (write and quit), за да запишете файла и излезете. ** Внимание! Преди да изпълните която и да е от стъпките долу, прочетете целия урок!! - 1. Излезте от самоучителя, както направихте в Урок 1.2: :q! + 1. Излезте от самоучителя, както направихте в Урок 1.1.2: :q! Или, ако имате достъп до друг терминал, направете следното там. 2. На командния ред напишете следното и натиснете : vim tutor @@ -205,7 +205,7 @@ Сега продължете с Урок 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.1: КОМАНДИ ЗА ИЗТРИВАНЕ + Урок 1.2.1: КОМАНДИ ЗА ИЗТРИВАНЕ ** Въведете dw , за да изтриете дума. ** @@ -229,7 +229,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.2: ОЩЕ КОМАНДИ ЗА ИЗТРИВАНЕ + Урок 1.2.2: ОЩЕ КОМАНДИ ЗА ИЗТРИВАНЕ ** Въведете d$ , за да изтриете всичко до края на реда. ** @@ -252,7 +252,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.3: ЗА ОПЕРАТОРИТЕ И ДВИЖЕНИЯТА + Урок 1.2.3: ЗА ОПЕРАТОРИТЕ И ДВИЖЕНИЯТА Много команди, които променят текст, се състоят от оператор и движение. @@ -276,7 +276,7 @@ съответното място. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.4: ИЗПОЛЗВАНЕ НА БРОЯЧ ПРИ ДВИЖЕНИЕ + Урок 1.2.4: ИЗПОЛЗВАНЕ НА БРОЯЧ ПРИ ДВИЖЕНИЕ ** Ако въведете число преди движението, то се повтаря толкова пъти @@ -300,7 +300,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.5: ИЗПОЛЗВАЙТЕ БРОЯЧ, ЗА ДА ТРИЕТЕ ПОВЕЧЕ + Урок 1.2.5: ИЗПОЛЗВАЙТЕ БРОЯЧ, ЗА ДА ТРИЕТЕ ПОВЕЧЕ ** Ако въведете число преди оператор, действието се повтаря толкова пъти @@ -325,7 +325,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.6: РАБОТА С РЕДОВЕ + Урок 1.2.6: РАБОТА С РЕДОВЕ ** Въведете dd , за да изтриете цял ред. ** @@ -348,7 +348,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.7: ОТМЯНА + Урок 1.2.7: ОТМЯНА ** Натиснете u , за да отмените (undo) последната команда; U , за @@ -396,7 +396,7 @@ За да отмените отмените, натиснете CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.1: КОМАНДАТА ЗА ПОСТАВЯНЕ (PUT) + Урок 1.3.1: КОМАНДАТА ЗА ПОСТАВЯНЕ (PUT) ** Въведете p , за да поставите изтрит преди това текст след @@ -421,7 +421,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.2: КОМАНДАТА ЗА ЗАМЕСТВАНЕ (REPLACE) + Урок 1.3.2: КОМАНДАТА ЗА ЗАМЕСТВАНЕ (REPLACE) ** Въведете rx , за да заместите буквата под показалеца с x . ** @@ -445,7 +445,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.3: ОПЕРАТОРЪТ ЗА ПРОМЯНА (CHANGE) + Урок 1.3.3: ОПЕРАТОРЪТ ЗА ПРОМЯНА (CHANGE) ** За да промените от мястото на показалеца до края на дума, въведете ce . ** @@ -468,7 +468,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.4: ОЩЕ ПРОМЕНИ С ИЗПОЛЗВАНЕ НА c + Урок 1.3.4: ОЩЕ ПРОМЕНИ С ИЗПОЛЗВАНЕ НА c ** Операторът за промяна се използва със същите движения както при триене ** @@ -517,7 +517,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.1: МЕСТОПОЛОЖЕНИЕ НА ПОКАЗАЛЕЦА И СЪСТОЯНИЕ НА ФАЙЛА + Урок 1.4.1: МЕСТОПОЛОЖЕНИЕ НА ПОКАЗАЛЕЦА И СЪСТОЯНИЕ НА ФАЙЛА ** Въведете CTRL-G, за да видите къде се намирате във файла и неговото състояние. Въведете G , за да отидете на някой ред. ** @@ -540,7 +540,7 @@ 4. Ако вече се чувствате уверени, изпълнете стъпките от 1 до 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.2: КОМАНДАТА ЗА ТЪРСЕНЕ + Урок 1.4.2: КОМАНДАТА ЗА ТЪРСЕНЕ ** Въведете / , последвана от фраза, за да потърсите фразата. ** @@ -565,7 +565,7 @@ началото на файла, освен ако настройката 'wrapscan' е била нулирана. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.3: ТЪРСЕНЕ НА СЪОТВЕТСТВАЩИ СКОБИ + Урок 1.4.3: ТЪРСЕНЕ НА СЪОТВЕТСТВАЩИ СКОБИ ** Въведете % , за да на мерите съответната ),], или } . ** @@ -589,7 +589,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.4: КОМАНДАТА ЗА ЗАМЕСТВАНЕ (SUBSTITUTE) + Урок 1.4.4: КОМАНДАТА ЗА ЗАМЕСТВАНЕ (SUBSTITUTE) ** Въведете :s/старо/ново/g за да заместите 'старо' със 'ново'. ** @@ -640,7 +640,7 @@ За да бъдете питани при всяко съвпадение, добавете 'c' :%s/низ/друг/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.1: КАК ДА ИЗПЪЛНИМ ВЪНШНА КОМАНДА + Урок 1.5.1: КАК ДА ИЗПЪЛНИМ ВЪНШНА КОМАНДА ** Въведете :! , последвано от външна команда, за да я изпълните. ** @@ -662,7 +662,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.2: ПОВЕЧЕ ЗА ЗАПИСВАНЕТО НА ФАЙЛОВЕ + Урок 1.5.2: ПОВЕЧЕ ЗА ЗАПИСВАНЕТО НА ФАЙЛОВЕ ** За да запишете промените, направени в текста въведете :w ИМЕНАФАЙЛ. ** @@ -687,7 +687,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.3: ИЗБОР НА ТЕКСТ ЗА ЗАПИС + Урок 1.5.3: ИЗБОР НА ТЕКСТ ЗА ЗАПИС ** За да запишете част от файла, натиснете v , следвано от движение :w FILENAME ** @@ -711,7 +711,7 @@ за да направите нещо с текста. Например, d изтрива текста. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.4: ИЗВЛИЧАНЕ И СЛИВАНЕ НА ФАЙЛОВЕ + Урок 1.5.4: ИЗВЛИЧАНЕ И СЛИВАНЕ НА ФАЙЛОВЕ ** За да вмъкнете съдържание на файл в текущия, въведете :r ИМЕНАФАЙЛ ** @@ -757,7 +757,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.1: КОМАНДАТА ЗА ОТВАРЯНЕ (OPEN) + Урок 1.6.1: КОМАНДАТА ЗА ОТВАРЯНЕ (OPEN) ** Натиснете o , за да отворите ред под показалеца и да преминете в @@ -784,7 +784,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.2: КОМАНДАТА ЗА ДОБАВЯНЕ (APPEND) + Урок 1.6.2: КОМАНДАТА ЗА ДОБАВЯНЕ (APPEND) ** Натиснете a , за да въведете текст СЛЕД показалеца. ** @@ -808,7 +808,7 @@ разлика е в това, къде се въвеждат знаците. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.3: ДРУГ НАЧИН ЗА ЗАМЕСТВАНЕ + Урок 1.6.3: ДРУГ НАЧИН ЗА ЗАМЕСТВАНЕ ** Натиснете главно R , за да заместите повече от един знак. ** @@ -830,7 +830,7 @@ знак изтрива съществуващ знак. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.4: КОПИРАНЕ И ЗАМЕСТВАНЕ + Урок 1.6.4: КОПИРАНЕ И ЗАМЕСТВАНЕ ** Използвайте операторът y (yank), за да копирате текст и p (paste), @@ -855,7 +855,7 @@ Важно! Можете да използвате y също и като оператор. yw взима цяла дума. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.5: ЗАДАВАНЕ НА НАСТРОЙКА + Урок 1.6.5: ЗАДАВАНЕ НА НАСТРОЙКА ** Задайте настройка, та при търсене и заместване, да не се различават @@ -911,7 +911,7 @@ 7. Поставете "no" отпред за да изключите настройка: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 7.1: КАК ДА НАМЕРИМ ПОМОЩ + Урок 1.7.1: КАК ДА НАМЕРИМ ПОМОЩ ** Ползвайте наличната система за помощ ** @@ -934,7 +934,7 @@ :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 7.2: СЪЗДАЙТЕ СКРИПТ ЗА СТАРТИРАНЕ + Урок 1.7.2: СЪЗДАЙТЕ СКРИПТ ЗА СТАРТИРАНЕ ** Включване на възможностите на Vim ** @@ -959,7 +959,7 @@ :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 7.3: ДОВЪРШВАНЕ + Урок 1.7.3: ДОВЪРШВАНЕ ** Довършване на команди с CTRL-D и ** diff --git a/usr/share/vim/vim91/tutor/tutor.ca b/usr/share/vim/vim91/tutor/tutor1.ca similarity index 91% rename from usr/share/vim/vim91/tutor/tutor.ca rename to usr/share/vim/vim91/tutor/tutor1.ca index 808a87d61bf..6ff996c2b2c 100644 --- a/usr/share/vim/vim91/tutor/tutor.ca +++ b/usr/share/vim/vim91/tutor/tutor1.ca @@ -19,10 +19,10 @@ Ara assegureu-vos que la tecla de bloqueig de majscules no est activada i premeu la tecla j per a moure el cursor avall, fins que la - lli 1.1 ocupi completament la pantalla. + lli 1.1.1 ocupi completament la pantalla. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 1.1: MOURE EL CURSOR + Lli 1.1.1: MOURE EL CURSOR ** Per a moure el cursor premeu les tecles h, j, k, l tal com s'indica. ** @@ -36,7 +36,7 @@ 2. Mantingueu premuda la tecla avall (j) una estona. ---> Ara ja sabeu com moure-us fins a la segent lli. - 3. Usant la tecla avall, aneu a la lli 1.2. + 3. Usant la tecla avall, aneu a la lli 1.1.2. Nota: Si no esteu segurs de la tecla que heu premut, premeu per a tornar al mode Normal. Llavors torneu a teclejar l'ordre que voleu. @@ -45,7 +45,7 @@ Nota: Les tecles de moviment del cursor (fletxes) tamb usant hjkl anireu ms rpid un cop us hi hagueu acostumant. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 1.2: ENTRAR I SORTIR DEL VIM + Lli 1.1.2: ENTRAR I SORTIR DEL VIM !! NOTA: Abans de seguir els passos segents llegiu *tota* la lli!! @@ -66,9 +66,9 @@ Nota: Les tecles de moviment del cursor (fletxes) tamb 4. Si heu memoritzat les ordres, feu els passos anteriors, de l'1 al 3, per a sortir i tornar a entrar a l'editor. Llavors moveu el cursor - avall fins a la lli 1.3. + avall fins a la lli 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 1.3: EDITAR TEXT - ESBORRAR + Lli 1.1.3: EDITAR TEXT - ESBORRAR ** En mode Normal premeu x per a esborrar el carcter sota el cursor. ** @@ -84,14 +84,14 @@ Nota: Les tecles de moviment del cursor (fletxes) tamb ---> Unna vaaca vva salttar perr sobbree la llluna. - 5. Ara que la lnia s correcta, aneu a la lli 1.4. + 5. Ara que la lnia s correcta, aneu a la lli 1.1.4. NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 1.4: EDITAR TEXT - INSERIR + Lli 1.1.4: EDITAR TEXT - INSERIR ** En mode Normal premeu i per a inserir text. ** @@ -114,7 +114,7 @@ NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLI 1 SUMARI + LLI 1.1 SUMARI 1. El cursor es mou amb les fletxes o b amb les tecles hjkl. @@ -133,11 +133,11 @@ NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou. NOTA: La tecla us porta al mode Normal o cancella una ordre que estigui a mitges. -Ara continueu a la lli 2. +Ara continueu a la lli 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 2.1: ORDRES PER ESBORRAR + Lli 1.2.1: ORDRES PER ESBORRAR ** Teclegeu dw per a esborrar fins al final d'una paraula. ** @@ -156,11 +156,11 @@ NOTA: Les lletres dw apareixeran a la l ---> Hi ha algunes paraules divertit que no pertanyen paper a aquesta frase. 5. Repetiu el passos 3 i 4 fins que la frase sigui correcta i continueu - a la lli 2.2. + a la lli 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 2.2: MS ORDRES PER ESBORRAR + Lli 1.2.2: MS ORDRES PER ESBORRAR ** Escriviu d$ per a esborrar fins al final de la lnia. ** @@ -176,14 +176,14 @@ NOTA: Les lletres dw apareixeran a la l ---> Alg ha escrit el final d'aquesta lnia dos cops. lnia dos cops. - 5. Aneu a la lli 2.3 per a entendre qu est passant. + 5. Aneu a la lli 1.2.3 per a entendre qu est passant. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 2.3: SOBRE ORDRES I OBJECTES + Lli 1.2.3: SOBRE ORDRES I OBJECTES El format de l'ordre d'esborrar d s el segent: @@ -206,7 +206,7 @@ NOTA: Per als aventurers: si teclegeu nom ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 2.4: UNA EXCEPCI A 'ORDRE-OBJECTE' + Lli 1.2.4: UNA EXCEPCI A 'ORDRE-OBJECTE' ** Teclegeu dd per a esborrar tota la lnia. ** @@ -229,7 +229,7 @@ NOTA: Per als aventurers: si teclegeu nom 7) Igual que tu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 2.5: L'ORDRE DESFER + Lli 1.2.5: L'ORDRE DESFER ** Premeu u per a desfer els canvis, U per a restaurar tota la lnia. ** @@ -245,14 +245,14 @@ NOTA: Per als aventurers: si teclegeu nom ---> Correegiu els errors d'aqquesta lnia i dessfeu-los aamb desfer. - 8. Aquestes ordres sn molt tils. Ara aneu al sumari de la lli 2. + 8. Aquestes ordres sn molt tils. Ara aneu al sumari de la lli 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLI 2 SUMARI + LLI 1.2 SUMARI 1. Per a esborrar del cursor al final de la paraula teclegeu: dw @@ -275,7 +275,7 @@ NOTA: Per als aventurers: si teclegeu nom Per a desfer l'ordre desfer premeu: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 3.1: L'ORDRE 'POSAR' + Lli 1.3.1: L'ORDRE 'POSAR' ** Premeu p per a inserir l'ltima cosa que heu esborrat @@ -298,7 +298,7 @@ NOTA: Per als aventurers: si teclegeu nom a) Les roses sn vermelles, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 3.2: L'ORDRE SUBSTITUIR + Lli 1.3.2: L'ORDRE SUBSTITUIR ** Premeu r i un carcter per a substituir el carcter @@ -315,13 +315,13 @@ NOTA: Per als aventurers: si teclegeu nom ---> Quen van escroure aquerta lnia, algh va prmer tikles equivocades! ---> Quan van escriure aquesta lnia, alg va prmer tecles equivocades! - 5. Ara continueu a la lli 3.2. + 5. Ara continueu a la lli 1.3.2. NOTA: Recordeu que heu de practicar, no memoritzar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 3.3: L'ORDRE CANVIAR + Lli 1.3.3: L'ORDRE CANVIAR ** Per a canviar una part o tota la paraula, escriviu cw . ** @@ -344,7 +344,7 @@ Noteu que cw no nom ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 3.4: MS CANVIS AMB c + Lli 1.3.4: MS CANVIS AMB c ** L'ordre canviar s'usa amb els mateixos objectes que l'ordre esborrar. ** @@ -367,7 +367,7 @@ Noteu que cw no nom ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLI 3 SUMARI + LLI 1.3 SUMARI 1. Per a tornar a posar el text que heu esborrat, premeu p . Aix posa @@ -390,7 +390,7 @@ Ara aneu a la seg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 4.1: SITUACI I ESTAT DEL FITXER + Lli 1.4.1: SITUACI I ESTAT DEL FITXER ** Premeu CTRL-g per a veure la situaci dins del fitxer i el seu estat. @@ -413,7 +413,7 @@ Ara aneu a la seg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 4.2: L'ORDRE CERCAR + Lli 1.4.2: L'ORDRE CERCAR ** Premeu / seguit de la frase que vulgueu cercar. ** @@ -436,7 +436,7 @@ Nota: Quan la cerca arribi al final del fitxer continuar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 4.3: CERCA DE PARNTESIS + Lli 1.4.3: CERCA DE PARNTESIS ** Premeu % per cercar el ), ], o } corresponent. ** @@ -459,7 +459,7 @@ Nota: Aix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 4.4: UNA MANERA DE CORREGIR ERRORS + Lli 1.4.4: UNA MANERA DE CORREGIR ERRORS ** Escriviu :s/vell/nou/g per a substituir 'vell' per 'nou'. ** @@ -482,7 +482,7 @@ Nota: Aix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLI 4 SUMARI + LLI 1.4 SUMARI 1. Ctrl-g mostra la posici dins del fitxer i l'estat del mateix. @@ -505,7 +505,7 @@ Nota: Aix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 5.1: COM EXECUTAR UNA ORDRE EXTERNA + Lli 1.5.1: COM EXECUTAR UNA ORDRE EXTERNA ** Teclegeu :! seguit d'una ordre externa per a executar-la. ** @@ -528,7 +528,7 @@ Nota: Totes les ordres : s'han d'acabar amb la tecla ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 5.2: MS SOBRE L'ESCRIPTURA DE FITXERS + Lli 1.5.2: MS SOBRE L'ESCRIPTURA DE FITXERS ** Per a desar els canvis fets, escriviu :w FITXER. ** @@ -551,7 +551,7 @@ Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 5.3: UNA ORDRE SELECTIVA PER A DESAR + Lli 1.5.3: UNA ORDRE SELECTIVA PER A DESAR ** Per a desar una part del fitxer, escriviu :#,# w FITXER ** @@ -574,7 +574,7 @@ Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 5.4: OBTENIR I AJUNTAR FITXERS + Lli 1.5.4: OBTENIR I AJUNTAR FITXERS ** Per a inserir el contingut d'un fitxer, feu :r FITXER ** @@ -583,7 +583,7 @@ Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el 2. Situeu el cursor a dalt de tot d'aquesta pgina. -NOTA: Desprs d'executar el Pas 3 veureu la lli 5.3. Tireu cap avall +NOTA: Desprs d'executar el Pas 3 veureu la lli 1.5.3. Tireu cap avall fins a aquesta lli un altre cop. 3. Ara obtingueu el fitxer PROVA amb l'ordre :r PROVA on PROVA s el @@ -592,12 +592,12 @@ NOTA: Despr NOTA: El fitxer que obtingueu s'insereix en el lloc on hi hagi el cursor. 4. Per a comprovar que s'ha obtingut el fitxer tireu enrere i mireu com - ara hi ha dues cpies de la lli 5.3, l'original i la del fitxer. + ara hi ha dues cpies de la lli 1.5.3, l'original i la del fitxer. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLI 5 SUMARI + LLI 1.5 SUMARI 1. :!ordre executa una ordre externa. @@ -620,7 +620,7 @@ NOTA: El fitxer que obtingueu s'insereix en el lloc on hi hagi el cursor. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 6.1: L'ORDRE OBRIR + Lli 1.6.1: L'ORDRE OBRIR ** Premeu o per a obrir una lnia i entrar en mode inserci. ** @@ -643,7 +643,7 @@ Obriu una l ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 6.2: L'ORDRE AFEGIR + Lli 1.6.2: L'ORDRE AFEGIR ** Premeu a per a afegir text DESPRS del cursor. ** @@ -666,7 +666,7 @@ Nota: Aix ---> Aquesta lnia us permetr practicar afegir text a final de lnia. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 6.3: UNA ALTRA MANERA DE SUBSTITUIR + Lli 1.6.3: UNA ALTRA MANERA DE SUBSTITUIR ** Teclegeu una R majscula per a substituir ms d'un carcter. ** @@ -689,7 +689,7 @@ Nota: Aix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lli 6.4: ESTABLIR OPCIONS + Lli 1.6.4: ESTABLIR OPCIONS ** Feu que les ordres cercar o substituir ignorin les diferncies entre majscules i minscules ** @@ -712,7 +712,7 @@ Nota: Aix 6. Per a treure el ressaltat dels resultats, feu: :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLI 6 SUMARI + LLI 1.6 SUMARI 1. L'ordre o obre una lnia a SOTA la del cursor i mou el cursor a la nova @@ -735,7 +735,7 @@ Nota: Aix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLI 7: ORDRES D'AJUDA + LLI 1.7: ORDRES D'AJUDA ** Utilitzeu el sistema intern d'ajuda ** @@ -758,7 +758,7 @@ Nota: Aix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLI 8: CREAR UN SCRIPT D'INICI + LLI 1.8: CREAR UN SCRIPT D'INICI ** Activeu funcions automticament ** diff --git a/usr/share/vim/vim91/tutor/tutor.ca.utf-8 b/usr/share/vim/vim91/tutor/tutor1.ca.utf-8 similarity index 91% rename from usr/share/vim/vim91/tutor/tutor.ca.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.ca.utf-8 index f39154b8039..98bda7e6c1c 100644 --- a/usr/share/vim/vim91/tutor/tutor.ca.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.ca.utf-8 @@ -19,10 +19,10 @@ Ara assegureu-vos que la tecla de bloqueig de majúscules no està activada i premeu la tecla j per a moure el cursor avall, fins que la - lliçó 1.1 ocupi completament la pantalla. + lliçó 1.1.1 ocupi completament la pantalla. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 1.1: MOURE EL CURSOR + Lliçó 1.1.1: MOURE EL CURSOR ** Per a moure el cursor premeu les tecles h, j, k, l tal com s'indica. ** @@ -36,7 +36,7 @@ 2. Mantingueu premuda la tecla avall (j) una estona. ---> Ara ja sabeu com moure-us fins a la següent lliçó. - 3. Usant la tecla avall, aneu a la lliçó 1.2. + 3. Usant la tecla avall, aneu a la lliçó 1.1.2. Nota: Si no esteu segurs de la tecla que heu premut, premeu per a tornar al mode Normal. Llavors torneu a teclejar l'ordre que volíeu. @@ -45,7 +45,7 @@ Nota: Les tecles de moviment del cursor (fletxes) també funcionen. Però usant hjkl anireu més ràpid un cop us hi hagueu acostumant. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 1.2: ENTRAR I SORTIR DEL VIM + Lliçó 1.1.2: ENTRAR I SORTIR DEL VIM !! NOTA: Abans de seguir els passos següents llegiu *tota* la lliçó!! @@ -66,9 +66,9 @@ Nota: Les tecles de moviment del cursor (fletxes) també funcionen. Però 4. Si heu memoritzat les ordres, feu els passos anteriors, de l'1 al 3, per a sortir i tornar a entrar a l'editor. Llavors moveu el cursor - avall fins a la lliçó 1.3. + avall fins a la lliçó 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 1.3: EDITAR TEXT - ESBORRAR + Lliçó 1.1.3: EDITAR TEXT - ESBORRAR ** En mode Normal premeu x per a esborrar el caràcter sota el cursor. ** @@ -84,14 +84,14 @@ Nota: Les tecles de moviment del cursor (fletxes) també funcionen. Però ---> Unna vaaca vva salttar perr sobbree la llluna. - 5. Ara que la línia és correcta, aneu a la lliçó 1.4. + 5. Ara que la línia és correcta, aneu a la lliçó 1.1.4. NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 1.4: EDITAR TEXT - INSERIR + Lliçó 1.1.4: EDITAR TEXT - INSERIR ** En mode Normal premeu i per a inserir text. ** @@ -114,7 +114,7 @@ NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLIÇÓ 1 SUMARI + LLIÇÓ 1.1 SUMARI 1. El cursor es mou amb les fletxes o bé amb les tecles hjkl. @@ -133,11 +133,11 @@ NOTA: Mentre aneu fent no tracteu de memoritzar, practiqueu i prou. NOTA: La tecla us porta al mode Normal o cancel·la una ordre que estigui a mitges. -Ara continueu a la lliçó 2. +Ara continueu a la lliçó 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 2.1: ORDRES PER ESBORRAR + Lliçó 1.2.1: ORDRES PER ESBORRAR ** Teclegeu dw per a esborrar fins al final d'una paraula. ** @@ -156,11 +156,11 @@ NOTA: Les lletres dw apareixeran a la línia de baix de la pantalla mentre ---> Hi ha algunes paraules divertit que no pertanyen paper a aquesta frase. 5. Repetiu el passos 3 i 4 fins que la frase sigui correcta i continueu - a la lliçó 2.2. + a la lliçó 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 2.2: MÉS ORDRES PER ESBORRAR + Lliçó 1.2.2: MÉS ORDRES PER ESBORRAR ** Escriviu d$ per a esborrar fins al final de la línia. ** @@ -176,14 +176,14 @@ NOTA: Les lletres dw apareixeran a la línia de baix de la pantalla mentre ---> Algú ha escrit el final d'aquesta línia dos cops. línia dos cops. - 5. Aneu a la lliçó 2.3 per a entendre què està passant. + 5. Aneu a la lliçó 1.2.3 per a entendre què està passant. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 2.3: SOBRE ORDRES I OBJECTES + Lliçó 1.2.3: SOBRE ORDRES I OBJECTES El format de l'ordre d'esborrar d és el següent: @@ -206,7 +206,7 @@ NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 2.4: UNA EXCEPCIÓ A 'ORDRE-OBJECTE' + Lliçó 1.2.4: UNA EXCEPCIÓ A 'ORDRE-OBJECTE' ** Teclegeu dd per a esborrar tota la línia. ** @@ -229,7 +229,7 @@ NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal, 7) Igual que tu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 2.5: L'ORDRE DESFER + Lliçó 1.2.5: L'ORDRE DESFER ** Premeu u per a desfer els canvis, U per a restaurar tota la línia. ** @@ -245,14 +245,14 @@ NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal, ---> Correegiu els errors d'aqquesta línia i dessfeu-los aamb desfer. - 8. Aquestes ordres són molt útils. Ara aneu al sumari de la lliçó 2. + 8. Aquestes ordres són molt útils. Ara aneu al sumari de la lliçó 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLIÇÓ 2 SUMARI + LLIÇÓ 1.2 SUMARI 1. Per a esborrar del cursor al final de la paraula teclegeu: dw @@ -275,7 +275,7 @@ NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal, Per a desfer l'ordre desfer premeu: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 3.1: L'ORDRE 'POSAR' + Lliçó 1.3.1: L'ORDRE 'POSAR' ** Premeu p per a inserir l'última cosa que heu esborrat @@ -298,7 +298,7 @@ NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal, a) Les roses són vermelles, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 3.2: L'ORDRE SUBSTITUIR + Lliçó 1.3.2: L'ORDRE SUBSTITUIR ** Premeu r i un caràcter per a substituir el caràcter @@ -315,13 +315,13 @@ NOTA: Per als aventurers: si teclegeu només l'objecte, en el mode Normal, ---> Quen van escroure aquerta línia, algh va prémer tikles equivocades! ---> Quan van escriure aquesta línia, algú va prémer tecles equivocades! - 5. Ara continueu a la lliçó 3.2. + 5. Ara continueu a la lliçó 1.3.2. NOTA: Recordeu que heu de practicar, no memoritzar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 3.3: L'ORDRE CANVIAR + Lliçó 1.3.3: L'ORDRE CANVIAR ** Per a canviar una part o tota la paraula, escriviu cw . ** @@ -344,7 +344,7 @@ Noteu que cw no només canvia la paraula, també us posa en mode d'inserció. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 3.4: MÉS CANVIS AMB c + Lliçó 1.3.4: MÉS CANVIS AMB c ** L'ordre canviar s'usa amb els mateixos objectes que l'ordre esborrar. ** @@ -367,7 +367,7 @@ Noteu que cw no només canvia la paraula, també us posa en mode d'inserció. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLIÇÓ 3 SUMARI + LLIÇÓ 1.3 SUMARI 1. Per a tornar a posar el text que heu esborrat, premeu p . Això posa @@ -390,7 +390,7 @@ Ara aneu a la següent lliçó. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 4.1: SITUACIÓ I ESTAT DEL FITXER + Lliçó 1.4.1: SITUACIÓ I ESTAT DEL FITXER ** Premeu CTRL-g per a veure la situació dins del fitxer i el seu estat. @@ -413,7 +413,7 @@ Ara aneu a la següent lliçó. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 4.2: L'ORDRE CERCAR + Lliçó 1.4.2: L'ORDRE CERCAR ** Premeu / seguit de la frase que vulgueu cercar. ** @@ -436,7 +436,7 @@ Nota: Quan la cerca arribi al final del fitxer continuarà a l'inici. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 4.3: CERCA DE PARÈNTESIS + Lliçó 1.4.3: CERCA DE PARÈNTESIS ** Premeu % per cercar el ), ], o } corresponent. ** @@ -459,7 +459,7 @@ Nota: Això és molt útil per a trobar errors en programes informàtics! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 4.4: UNA MANERA DE CORREGIR ERRORS + Lliçó 1.4.4: UNA MANERA DE CORREGIR ERRORS ** Escriviu :s/vell/nou/g per a substituir 'vell' per 'nou'. ** @@ -482,7 +482,7 @@ Nota: Això és molt útil per a trobar errors en programes informàtics! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLIÇÓ 4 SUMARI + LLIÇÓ 1.4 SUMARI 1. Ctrl-g mostra la posició dins del fitxer i l'estat del mateix. @@ -505,7 +505,7 @@ Nota: Això és molt útil per a trobar errors en programes informàtics! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 5.1: COM EXECUTAR UNA ORDRE EXTERNA + Lliçó 1.5.1: COM EXECUTAR UNA ORDRE EXTERNA ** Teclegeu :! seguit d'una ordre externa per a executar-la. ** @@ -528,7 +528,7 @@ Nota: Totes les ordres : s'han d'acabar amb la tecla ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 5.2: MÉS SOBRE L'ESCRIPTURA DE FITXERS + Lliçó 1.5.2: MÉS SOBRE L'ESCRIPTURA DE FITXERS ** Per a desar els canvis fets, escriviu :w FITXER. ** @@ -551,7 +551,7 @@ Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 5.3: UNA ORDRE SELECTIVA PER A DESAR + Lliçó 1.5.3: UNA ORDRE SELECTIVA PER A DESAR ** Per a desar una part del fitxer, escriviu :#,# w FITXER ** @@ -574,7 +574,7 @@ Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 5.4: OBTENIR I AJUNTAR FITXERS + Lliçó 1.5.4: OBTENIR I AJUNTAR FITXERS ** Per a inserir el contingut d'un fitxer, feu :r FITXER ** @@ -583,7 +583,7 @@ Note: Si sortiu del Vim i entreu una altra vegada amb el fitxer PROVA, el 2. Situeu el cursor a dalt de tot d'aquesta pàgina. -NOTA: Després d'executar el Pas 3 veureu la lliçó 5.3. Tireu cap avall +NOTA: Després d'executar el Pas 3 veureu la lliçó 1.5.3. Tireu cap avall fins a aquesta lliçó un altre cop. 3. Ara obtingueu el fitxer PROVA amb l'ordre :r PROVA on PROVA és el @@ -592,12 +592,12 @@ NOTA: Després d'executar el Pas 3 veureu la lliçó 5.3. Tireu cap avall NOTA: El fitxer que obtingueu s'insereix en el lloc on hi hagi el cursor. 4. Per a comprovar que s'ha obtingut el fitxer tireu enrere i mireu com - ara hi ha dues còpies de la lliçó 5.3, l'original i la del fitxer. + ara hi ha dues còpies de la lliçó 1.5.3, l'original i la del fitxer. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLIÇÓ 5 SUMARI + LLIÇÓ 1.5 SUMARI 1. :!ordre executa una ordre externa. @@ -620,7 +620,7 @@ NOTA: El fitxer que obtingueu s'insereix en el lloc on hi hagi el cursor. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 6.1: L'ORDRE OBRIR + Lliçó 1.6.1: L'ORDRE OBRIR ** Premeu o per a obrir una línia i entrar en mode inserció. ** @@ -643,7 +643,7 @@ Obriu una línia sobre aquesta prement Shift-o amb el cursor en aquesta línia. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 6.2: L'ORDRE AFEGIR + Lliçó 1.6.2: L'ORDRE AFEGIR ** Premeu a per a afegir text DESPRÉS del cursor. ** @@ -666,7 +666,7 @@ Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir, ---> Aquesta línia us permetrà practicar afegir text a final de línia. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 6.3: UNA ALTRA MANERA DE SUBSTITUIR + Lliçó 1.6.3: UNA ALTRA MANERA DE SUBSTITUIR ** Teclegeu una R majúscula per a substituir més d'un caràcter. ** @@ -689,7 +689,7 @@ Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lliçó 6.4: ESTABLIR OPCIONS + Lliçó 1.6.4: ESTABLIR OPCIONS ** Feu que les ordres cercar o substituir ignorin les diferències entre majúscules i minúscules ** @@ -712,7 +712,7 @@ Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir, 6. Per a treure el ressaltat dels resultats, feu: :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLIÇÓ 6 SUMARI + LLIÇÓ 1.6 SUMARI 1. L'ordre o obre una línia a SOTA la del cursor i mou el cursor a la nova @@ -735,7 +735,7 @@ Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLIÇÓ 7: ORDRES D'AJUDA + LLIÇÓ 1.7: ORDRES D'AJUDA ** Utilitzeu el sistema intern d'ajuda ** @@ -758,7 +758,7 @@ Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LLIÇÓ 8: CREAR UN SCRIPT D'INICI + LLIÇÓ 1.8: CREAR UN SCRIPT D'INICI ** Activeu funcions automàticament ** @@ -767,8 +767,8 @@ Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir, fitxer "vimrc". 1. Comenceu a editar el fitxer "vimrc", depenent del sistema - :edit ~/.vimrc per Unix - :edit ~/_vimrc per MS-Windows + :edit ~/.vimrc per Unix + :edit ~/_vimrc per MS-Windows 2. Llegiu el fitxer "vimrc" d'exemple: diff --git a/usr/share/vim/vim91/tutor/tutor.cs b/usr/share/vim/vim91/tutor/tutor1.cs similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.cs rename to usr/share/vim/vim91/tutor/tutor1.cs index 6d62bb58385..981001cdf3d 100644 --- a/usr/share/vim/vim91/tutor/tutor.cs +++ b/usr/share/vim/vim91/tutor/tutor1.cs @@ -18,10 +18,10 @@ nauen. Pokud si jen te text, pkazy zapomene! Nyn se pesvdte, e Caps-Lock NEN stlaen a nkolikrt stisknte - klvesu j aby se kurzor posunul natolik, e lekce 1.1 zapln celou + klvesu j aby se kurzor posunul natolik, e lekce 1.1.1 zapln celou obrazovku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.1: POHYB KURZORU + Lekce 1.1.1: POHYB KURZORU ** Pro pohyb kurzoru pouvej klvesy h,j,k,l jak je znzornno ne. ** @@ -35,7 +35,7 @@ 2. Dr klvesu pro pohyb dolu (j), dokud se jej funkce nezopakuje. ---> Te v jak se pesunout na nsledujc lekci. - 3. Pouitm klvesy dolu pejdi na lekci 1.2. + 3. Pouitm klvesy dolu pejdi na lekci 1.1.2. Poznmka: Pokud si nkdy nejsi jist nm, co jsi napsal, stla pro pechod do Normlnho mdu. Pot pepi poadovan pkaz. @@ -44,7 +44,7 @@ jakmile si na nj zvykne. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.2: SPUTN A UKONEN VIM + Lekce 1.1.2: SPUTN A UKONEN VIM !! POZNMKA: Ped vykonnm tchto krok si peti celou lekci!! @@ -64,10 +64,10 @@ ---> 'vim' znamen sputn editoru, 'tutor' je soubor k editaci. 4. Pokud si tyto kroky spolehliv pamatuje, vykonej kroky 1 a 3, m - ukon a znovu spust editor. Potom pesu kurzor dolu na lekci 1.3. + ukon a znovu spust editor. Potom pesu kurzor dolu na lekci 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.3: PRAVA TEXTU - MAZN + Lekce 1.1.3: PRAVA TEXTU - MAZN ** Stisknutm klvesy x v Normlnm mdu smae znak na mst kurzoru. ** @@ -82,7 +82,7 @@ ---> Krva skoilla pess mssc. - 5. Pokud je vta sprvn, pejdi na lekci 1.4. + 5. Pokud je vta sprvn, pejdi na lekci 1.1.4. POZNMKA: Nesna se pouze zapamatovat pedvdn pkazy, u se je pouvnm. @@ -90,7 +90,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.4: PRAVA TEXTU - VKLDN + Lekce 1.1.4: PRAVA TEXTU - VKLDN ** Stlaen klvesy i v Normlnm mdu umouje vkldn textu. ** @@ -113,7 +113,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 1 + SHRNUT LEKCE 1.1 1. Kurzorem se pohybuje pomoc ipek nebo klvesami hjkl. @@ -136,7 +136,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.1: PKAZY MAZN + Lekce 1.2.1: PKAZY MAZN ** Pkaz dw smae znaky do konce slova. ** @@ -154,12 +154,12 @@ ---> Jsou tu njak slova zbava, kter nepat list do tto vty. - 5. Opakuj kroky 3 a 4 dokud nen vta sprvn a pejdi na lekci 2.2. + 5. Opakuj kroky 3 a 4 dokud nen vta sprvn a pejdi na lekci 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.2: VCE PKAZ MAZN + Lekce 1.2.2: VCE PKAZ MAZN ** Napsn pkazu d$ smae ve a do konce dky. ** @@ -175,14 +175,14 @@ ---> Nkdo napsal konec tto vty dvakrt. konec tto vty dvakrt. - 5. Pejdi na lekci 2.3 pro pochopen toho, co se stalo. + 5. Pejdi na lekci 1.2.3 pro pochopen toho, co se stalo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.3: ROZIOVAC PKAZY A OBJEKTY + Lekce 1.2.3: ROZIOVAC PKAZY A OBJEKTY Formt mazacho pkazu d je nsledujc: @@ -205,7 +205,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.4: VJIMKA Z 'PKAZ-OBJEKT' + Lekce 1.2.4: VJIMKA Z 'PKAZ-OBJEKT' ** Napsnm dd smae cel dek. ** @@ -228,7 +228,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.5: PKAZ UNDO + Lekce 1.2.5: PKAZ UNDO ** Stla u pro vrcen poslednho pkazu, U pro celou dku. ** @@ -244,14 +244,14 @@ ---> Opprav chybby nna toomto dku a nahra je pommoc undo. - 8. Toto jsou velmi uiten pkazy. Nyn pejdi na souhrn Lekce 2. + 8. Toto jsou velmi uiten pkazy. Nyn pejdi na souhrn Lekce 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 2 + SHRNUT LEKCE 1.2 1. Pro smazn znak od kurzoru do konce slova napi: dw @@ -274,7 +274,7 @@ Pro vrcen vrcench prav (redo) napi: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.1: PKAZ VLOIT + Lekce 1.3.1: PKAZ VLOIT ** Pka p vlo posledn vymazan text za kurzor. ** @@ -297,7 +297,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.2: PKAZ NAHRAZEN + Lekce 1.3.2: PKAZ NAHRAZEN ** Napsnm r a znaku se nahrad znak pod kurzorem. ** @@ -313,14 +313,14 @@ ---> Kdi byl pzn tento deg, nkdu stlail paqn klvesy! ---> Kdy byl psn tento dek, nkdo stlal patn klvesy! - 5. Nyn pejdi na Lekci 3.2. + 5. Nyn pejdi na Lekci 1.3.2. POZNMKA: Zapamatuj si, e by ses ml uit pouvnm, ne zapamatovnm. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.3: PKAZ PRAVY + Lekce 1.3.3: PKAZ PRAVY ** Pokud chce zmnit st nebo cel slovo, napi cw . ** @@ -343,7 +343,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.4: VCE ZMN POUITM c + Lekce 1.3.4: VCE ZMN POUITM c ** Pkaz pro pravu se dru se stejnmi objekty jako ten pro mazn. ** @@ -366,7 +366,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 3 + SHRNUT LEKCE 1.3 1. Pro vloen textu, kter byl smazn, napi p . To vlo smazan text @@ -389,7 +389,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.1: POZICE A STATUS SOUBORU + Lekce 1.4.1: POZICE A STATUS SOUBORU ** Stla CTRL-g pro zobrazen sv pozice v souboru a statusu souboru. @@ -412,7 +412,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.2: PKAZ VYHLEDVN + Lekce 1.4.2: PKAZ VYHLEDVN ** Napi / nsledovan etzcem pro vyhledn onoho etzce. ** @@ -435,7 +435,7 @@ zatku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.3: VYHLEDVN PROV ZVORKY + Lekce 1.4.3: VYHLEDVN PROV ZVORKY ** Napi % pro nalezen prov ),], nebo } . ** @@ -458,7 +458,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.4: ZPSOB JAK ZMNIT CHYBY + Lekce 1.4.4: ZPSOB JAK ZMNIT CHYBY ** Napi :s/star/nov/g pro nahrazen slova 'nov' za 'star'. ** @@ -481,7 +481,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 4 + SHRNUT LEKCE 1.4 1. Ctrl-g vype tvou pozici v souboru a status souboru. @@ -504,7 +504,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.1: JAK VYKONAT VNJ PKAZ + Lekce 1.5.1: JAK VYKONAT VNJ PKAZ ** Napi :! nsledovan vnjm pkazem pro sputn pkazu. ** @@ -527,7 +527,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.2: VCE O UKLDN SOUBOR + Lekce 1.5.2: VCE O UKLDN SOUBOR ** Pro uloen zmn v souboru napi :w SOUBOR. ** @@ -550,7 +550,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.3: VBROV PKAZ ULOEN + Lekce 1.5.3: VBROV PKAZ ULOEN ** Pro uloen sti souboru napi :#,# w SOUBOR ** @@ -573,7 +573,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.4: SLUOVN SOUBOR + Lekce 1.5.4: SLUOVN SOUBOR ** K vloen obsahu souboru napi :r NZEV_SOUBORU ** @@ -582,7 +582,7 @@ 2. Pesu kurzor na vrch tto strnky. -POZNMKA: Po vykonn kroku 3 uvid lekci 5.3. Potom se opt pesu dol +POZNMKA: Po vykonn kroku 3 uvid lekci 1.5.3. Potom se opt pesu dol na tuto lekci. 3. Nyn vlo soubor TEST pouitm pkazu :r TEST kde TEST je nzev @@ -591,12 +591,12 @@ na tuto lekci. POZNMKA: Soubor, kter vkld se vlo od msta, kde se nachz kurzor. 4. Pro potvrzen vloen souboru, pesu kurzor zpt a vimni si, e te - m dv kopie lekce 5.3, originl a souborovou verzi. + m dv kopie lekce 1.5.3, originl a souborovou verzi. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 5 + SHRNUT LEKCE 1.5 1. :!pkaz vykon vnj pkaz. @@ -619,7 +619,7 @@ za pozici kurzoru. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.1: PKAZ OTEVT + Lekce 1.6.1: PKAZ OTEVT ** Napi o pro vloen dku pod kurzor a pepnut do Vkldacho mdu. ** @@ -642,7 +642,7 @@ za pozici kurzoru. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.2: PKAZ PIDAT + Lekce 1.6.2: PKAZ PIDAT ** Stiskni a pro vloen textu ZA kurzor. ** @@ -665,7 +665,7 @@ za pozici kurzoru. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.3: JIN ZPSOB NAHRAZOVN + Lekce 1.6.3: JIN ZPSOB NAHRAZOVN ** Napi velk R pro nahrazen vc ne jednoho znaku. ** @@ -688,7 +688,7 @@ za pozici kurzoru. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.4: NASTAVEN MONOST + Lekce 1.6.4: NASTAVEN MONOST ** Nastav monost, e vyhledvn anebo nahrazovn nedb velikosti psmen ** @@ -711,7 +711,7 @@ za pozici kurzoru. 6. Pro vypnut zvrazovn vsledk napi: :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRHNUT LEKCE 6 + SHRHNUT LEKCE 1.6 1. Stisknut o oteve nov dek POD kurzorem a umst kurzor na vloen @@ -734,7 +734,7 @@ za pozici kurzoru. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCE 7: PKAZY ON-LINE NPOVDY + LEKCE 1.7: PKAZY ON-LINE NPOVDY ** Pouvej on-line systm npovdy ** @@ -757,7 +757,7 @@ za pozici kurzoru. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCE 8: VYTVOEN INICIALIZANHO SKRIPTU + LEKCE 1.8: VYTVOEN INICIALIZANHO SKRIPTU ** Zapni funkce editoru Vim ** diff --git a/usr/share/vim/vim91/tutor/tutor.cs.cp1250 b/usr/share/vim/vim91/tutor/tutor1.cs.cp1250 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.cs.cp1250 rename to usr/share/vim/vim91/tutor/tutor1.cs.cp1250 index 26567db91cf..a8d701f59e4 100644 --- a/usr/share/vim/vim91/tutor/tutor.cs.cp1250 +++ b/usr/share/vim/vim91/tutor/tutor1.cs.cp1250 @@ -18,10 +18,10 @@ nauen. Pokud si jen te text, pkazy zapomene! Nyn se pesvdte, e Caps-Lock NEN stlaen a nkolikrt stisknte - klvesu j aby se kurzor posunul natolik, e lekce 1.1 zapln celou + klvesu j aby se kurzor posunul natolik, e lekce 1.1.1 zapln celou obrazovku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.1: POHYB KURZORU + Lekce 1.1.1: POHYB KURZORU ** Pro pohyb kurzoru pouvej klvesy h,j,k,l jak je znzornno ne. ** @@ -35,7 +35,7 @@ 2. Dr klvesu pro pohyb dolu (j), dokud se jej funkce nezopakuje. ---> Te v jak se pesunout na nsledujc lekci. - 3. Pouitm klvesy dolu pejdi na lekci 1.2. + 3. Pouitm klvesy dolu pejdi na lekci 1.1.2. Poznmka: Pokud si nkdy nejsi jist nm, co jsi napsal, stla pro pechod do Normlnho mdu. Pot pepi poadovan pkaz. @@ -44,7 +44,7 @@ Pozn jakmile si na nj zvykne. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.2: SPUTN A UKONEN VIM + Lekce 1.1.2: SPUTN A UKONEN VIM !! POZNMKA: Ped vykonnm tchto krok si peti celou lekci!! @@ -64,10 +64,10 @@ Pozn ---> 'vim' znamen sputn editoru, 'tutor' je soubor k editaci. 4. Pokud si tyto kroky spolehliv pamatuje, vykonej kroky 1 a 3, m - ukon a znovu spust editor. Potom pesu kurzor dolu na lekci 1.3. + ukon a znovu spust editor. Potom pesu kurzor dolu na lekci 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.3: PRAVA TEXTU - MAZN + Lekce 1.1.3: PRAVA TEXTU - MAZN ** Stisknutm klvesy x v Normlnm mdu smae znak na mst kurzoru. ** @@ -82,7 +82,7 @@ Pozn ---> Krva skoilla pess mssc. - 5. Pokud je vta sprvn, pejdi na lekci 1.4. + 5. Pokud je vta sprvn, pejdi na lekci 1.1.4. POZNMKA: Nesna se pouze zapamatovat pedvdn pkazy, u se je pouvnm. @@ -90,7 +90,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.4: PRAVA TEXTU - VKLDN + Lekce 1.1.4: PRAVA TEXTU - VKLDN ** Stlaen klvesy i v Normlnm mdu umouje vkldn textu. ** @@ -113,7 +113,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 1 + SHRNUT LEKCE 1.1 1. Kurzorem se pohybuje pomoc ipek nebo klvesami hjkl. @@ -136,7 +136,7 @@ Nyn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.1: PKAZY MAZN + Lekce 1.2.1: PKAZY MAZN ** Pkaz dw smae znaky do konce slova. ** @@ -154,12 +154,12 @@ POZN ---> Jsou tu njak slova zbava, kter nepat list do tto vty. - 5. Opakuj kroky 3 a 4 dokud nen vta sprvn a pejdi na lekci 2.2. + 5. Opakuj kroky 3 a 4 dokud nen vta sprvn a pejdi na lekci 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.2: VCE PKAZ MAZN + Lekce 1.2.2: VCE PKAZ MAZN ** Napsn pkazu d$ smae ve a do konce dky. ** @@ -175,14 +175,14 @@ POZN ---> Nkdo napsal konec tto vty dvakrt. konec tto vty dvakrt. - 5. Pejdi na lekci 2.3 pro pochopen toho, co se stalo. + 5. Pejdi na lekci 1.2.3 pro pochopen toho, co se stalo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.3: ROZIOVAC PKAZY A OBJEKTY + Lekce 1.2.3: ROZIOVAC PKAZY A OBJEKTY Formt mazacho pkazu d je nsledujc: @@ -205,7 +205,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.4: VJIMKA Z 'PKAZ-OBJEKT' + Lekce 1.2.4: VJIMKA Z 'PKAZ-OBJEKT' ** Napsnm dd smae cel dek. ** @@ -228,7 +228,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.5: PKAZ UNDO + Lekce 1.2.5: PKAZ UNDO ** Stla u pro vrcen poslednho pkazu, U pro celou dku. ** @@ -244,14 +244,14 @@ POZN ---> Opprav chybby nna toomto dku a nahra je pommoc undo. - 8. Toto jsou velmi uiten pkazy. Nyn pejdi na souhrn Lekce 2. + 8. Toto jsou velmi uiten pkazy. Nyn pejdi na souhrn Lekce 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 2 + SHRNUT LEKCE 1.2 1. Pro smazn znak od kurzoru do konce slova napi: dw @@ -274,7 +274,7 @@ POZN Pro vrcen vrcench prav (redo) napi: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.1: PKAZ VLOIT + Lekce 1.3.1: PKAZ VLOIT ** Pka p vlo posledn vymazan text za kurzor. ** @@ -297,7 +297,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.2: PKAZ NAHRAZEN + Lekce 1.3.2: PKAZ NAHRAZEN ** Napsnm r a znaku se nahrad znak pod kurzorem. ** @@ -313,14 +313,14 @@ POZN ---> Kdi byl pzn tento deg, nkdu stlail paqn klvesy! ---> Kdy byl psn tento dek, nkdo stlal patn klvesy! - 5. Nyn pejdi na Lekci 3.2. + 5. Nyn pejdi na Lekci 1.3.2. POZNMKA: Zapamatuj si, e by ses ml uit pouvnm, ne zapamatovnm. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.3: PKAZ PRAVY + Lekce 1.3.3: PKAZ PRAVY ** Pokud chce zmnit st nebo cel slovo, napi cw . ** @@ -343,7 +343,7 @@ V ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.4: VCE ZMN POUITM c + Lekce 1.3.4: VCE ZMN POUITM c ** Pkaz pro pravu se dru se stejnmi objekty jako ten pro mazn. ** @@ -366,7 +366,7 @@ V ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 3 + SHRNUT LEKCE 1.3 1. Pro vloen textu, kter byl smazn, napi p . To vlo smazan text @@ -389,7 +389,7 @@ Nyn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.1: POZICE A STATUS SOUBORU + Lekce 1.4.1: POZICE A STATUS SOUBORU ** Stla CTRL-g pro zobrazen sv pozice v souboru a statusu souboru. @@ -412,7 +412,7 @@ Nyn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.2: PKAZ VYHLEDVN + Lekce 1.4.2: PKAZ VYHLEDVN ** Napi / nsledovan etzcem pro vyhledn onoho etzce. ** @@ -435,7 +435,7 @@ Pozn zatku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.3: VYHLEDVN PROV ZVORKY + Lekce 1.4.3: VYHLEDVN PROV ZVORKY ** Napi % pro nalezen prov ),], nebo } . ** @@ -458,7 +458,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.4: ZPSOB JAK ZMNIT CHYBY + Lekce 1.4.4: ZPSOB JAK ZMNIT CHYBY ** Napi :s/star/nov/g pro nahrazen slova 'nov' za 'star'. ** @@ -481,7 +481,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 4 + SHRNUT LEKCE 1.4 1. Ctrl-g vype tvou pozici v souboru a status souboru. @@ -504,7 +504,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.1: JAK VYKONAT VNJ PKAZ + Lekce 1.5.1: JAK VYKONAT VNJ PKAZ ** Napi :! nsledovan vnjm pkazem pro sputn pkazu. ** @@ -527,7 +527,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.2: VCE O UKLDN SOUBOR + Lekce 1.5.2: VCE O UKLDN SOUBOR ** Pro uloen zmn v souboru napi :w SOUBOR. ** @@ -550,7 +550,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.3: VBROV PKAZ ULOEN + Lekce 1.5.3: VBROV PKAZ ULOEN ** Pro uloen sti souboru napi :#,# w SOUBOR ** @@ -573,7 +573,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.4: SLUOVN SOUBOR + Lekce 1.5.4: SLUOVN SOUBOR ** K vloen obsahu souboru napi :r NZEV_SOUBORU ** @@ -582,7 +582,7 @@ Pozn 2. Pesu kurzor na vrch tto strnky. -POZNMKA: Po vykonn kroku 3 uvid lekci 5.3. Potom se opt pesu dol +POZNMKA: Po vykonn kroku 3 uvid lekci 1.5.3. Potom se opt pesu dol na tuto lekci. 3. Nyn vlo soubor TEST pouitm pkazu :r TEST kde TEST je nzev @@ -591,12 +591,12 @@ POZN POZNMKA: Soubor, kter vkld se vlo od msta, kde se nachz kurzor. 4. Pro potvrzen vloen souboru, pesu kurzor zpt a vimni si, e te - m dv kopie lekce 5.3, originl a souborovou verzi. + m dv kopie lekce 1.5.3, originl a souborovou verzi. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUT LEKCE 5 + SHRNUT LEKCE 1.5 1. :!pkaz vykon vnj pkaz. @@ -619,7 +619,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.1: PKAZ OTEVT + Lekce 1.6.1: PKAZ OTEVT ** Napi o pro vloen dku pod kurzor a pepnut do Vkldacho mdu. ** @@ -642,7 +642,7 @@ Vlo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.2: PKAZ PIDAT + Lekce 1.6.2: PKAZ PIDAT ** Stiskni a pro vloen textu ZA kurzor. ** @@ -665,7 +665,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.3: JIN ZPSOB NAHRAZOVN + Lekce 1.6.3: JIN ZPSOB NAHRAZOVN ** Napi velk R pro nahrazen vc ne jednoho znaku. ** @@ -688,7 +688,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.4: NASTAVEN MONOST + Lekce 1.6.4: NASTAVEN MONOST ** Nastav monost, e vyhledvn anebo nahrazovn nedb velikosti psmen ** @@ -711,7 +711,7 @@ Pozn 6. Pro vypnut zvrazovn vsledk napi: :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRHNUT LEKCE 6 + SHRHNUT LEKCE 1.6 1. Stisknut o oteve nov dek POD kurzorem a umst kurzor na vloen @@ -734,7 +734,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCE 7: PKAZY ON-LINE NPOVDY + LEKCE 1.7: PKAZY ON-LINE NPOVDY ** Pouvej on-line systm npovdy ** @@ -757,7 +757,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCE 8: VYTVOEN INICIALIZANHO SKRIPTU + LEKCE 1.8: VYTVOEN INICIALIZANHO SKRIPTU ** Zapni funkce editoru Vim ** diff --git a/usr/share/vim/vim91/tutor/tutor.cs.utf-8 b/usr/share/vim/vim91/tutor/tutor1.cs.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.cs.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.cs.utf-8 index 36bb3a2d0fd..882c6e635b9 100644 --- a/usr/share/vim/vim91/tutor/tutor.cs.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.cs.utf-8 @@ -18,10 +18,10 @@ naučení. Pokud si jen čteš text, příkazy zapomeneš! Nyní se přesvědčte, že Caps-Lock NENÍ stlačený a několikrát stiskněte - klávesu j aby se kurzor posunul natolik, že lekce 1.1 zaplní celou + klávesu j aby se kurzor posunul natolik, že lekce 1.1.1 zaplní celou obrazovku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.1: POHYB KURZORU + Lekce 1.1.1: POHYB KURZORU ** Pro pohyb kurzoru používej klávesy h,j,k,l jak je znázorněno níže. ** @@ -35,7 +35,7 @@ 2. Drž klávesu pro pohyb dolu (j), dokud se její funkce nezopakuje. ---> Teď víš jak se přesunout na následující lekci. - 3. Použitím klávesy dolu přejdi na lekci 1.2. + 3. Použitím klávesy dolu přejdi na lekci 1.1.2. Poznámka: Pokud si někdy nejsi jist něčím, co jsi napsal, stlač pro přechod do Normálního módu. Poté přepiš požadovaný příkaz. @@ -44,7 +44,7 @@ Poznámka: Kurzorové klávesy také fungují, avšak používání hjkl je rych jakmile si na něj zvykneš. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.2: SPUŠTĚNÍ A UKONČENÍ VIM + Lekce 1.1.2: SPUŠTĚNÍ A UKONČENÍ VIM !! POZNÁMKA: Před vykonáním těchto kroků si přečti celou lekci!! @@ -64,10 +64,10 @@ Poznámka: Kurzorové klávesy také fungují, avšak používání hjkl je rych ---> 'vim' znamená spuštění editoru, 'tutor' je soubor k editaci. 4. Pokud si tyto kroky spolehlivě pamatuješ, vykonej kroky 1 až 3, čímž - ukončíš a znovu spustíš editor. Potom přesuň kurzor dolu na lekci 1.3. + ukončíš a znovu spustíš editor. Potom přesuň kurzor dolu na lekci 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.3: ÚPRAVA TEXTU - MAZÁNÍ + Lekce 1.1.3: ÚPRAVA TEXTU - MAZÁNÍ ** Stisknutím klávesy x v Normálním módu smažeš znak na místě kurzoru. ** @@ -82,7 +82,7 @@ Poznámka: Kurzorové klávesy také fungují, avšak používání hjkl je rych ---> Krááva skoččilla přess měssíc. - 5. Pokud je věta správně, přejdi na lekci 1.4. + 5. Pokud je věta správně, přejdi na lekci 1.1.4. POZNÁMKA: Nesnaž se pouze zapamatovat předváděné příkazy, uč se je používáním. @@ -90,7 +90,7 @@ POZNÁMKA: Nesnaž se pouze zapamatovat předváděné příkazy, uč se je pou ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 1.4: ÚPRAVA TEXTU - VKLÁDÁNÍ + Lekce 1.1.4: ÚPRAVA TEXTU - VKLÁDÁNÍ ** Stlačení klávesy i v Normálním módu umožňuje vkládání textu. ** @@ -113,7 +113,7 @@ POZNÁMKA: Nesnaž se pouze zapamatovat předváděné příkazy, uč se je pou ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUTÍ LEKCE 1 + SHRNUTÍ LEKCE 1.1 1. Kurzorem se pohybuje pomocí šipek nebo klávesami hjkl. @@ -136,7 +136,7 @@ Nyní pokračuj Lekcí 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.1: PŘÍKAZY MAZÁNÍ + Lekce 1.2.1: PŘÍKAZY MAZÁNÍ ** Příkaz dw smaže znaky do konce slova. ** @@ -154,12 +154,12 @@ POZNÁMKA: Písmena dw se zobrazí na posledním řádku obrazovky jakmile je ---> Jsou tu nějaká slova zábava, která nepatří list do této věty. - 5. Opakuj kroky 3 až 4 dokud není věta správně a přejdi na lekci 2.2. + 5. Opakuj kroky 3 až 4 dokud není věta správně a přejdi na lekci 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.2: VÍCE PŘÍKAZŮ MAZÁNÍ + Lekce 1.2.2: VÍCE PŘÍKAZŮ MAZÁNÍ ** Napsání příkazu d$ smaže vše až do konce řádky. ** @@ -175,14 +175,14 @@ POZNÁMKA: Písmena dw se zobrazí na posledním řádku obrazovky jakmile je ---> Někdo napsal konec této věty dvakrát. konec této věty dvakrát. - 5. Přejdi na lekci 2.3 pro pochopení toho, co se stalo. + 5. Přejdi na lekci 1.2.3 pro pochopení toho, co se stalo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.3: ROZŠIŘOVACÍ PŘÍKAZY A OBJEKTY + Lekce 1.2.3: ROZŠIŘOVACÍ PŘÍKAZY A OBJEKTY Formát mazacího příkazu d je následující: @@ -205,7 +205,7 @@ POZNÁMKA: Stlačením klávesy objektu v Normálním módu se kurzor přesune ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.4: VÝJIMKA Z 'PŘÍKAZ-OBJEKT' + Lekce 1.2.4: VÝJIMKA Z 'PŘÍKAZ-OBJEKT' ** Napsáním dd smažeš celý řádek. ** @@ -228,7 +228,7 @@ POZNÁMKA: Stlačením klávesy objektu v Normálním módu se kurzor přesune ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 2.5: PŘÍKAZ UNDO + Lekce 1.2.5: PŘÍKAZ UNDO ** Stlač u pro vrácení posledního příkazu, U pro celou řádku. ** @@ -244,14 +244,14 @@ POZNÁMKA: Stlačením klávesy objektu v Normálním módu se kurzor přesune ---> Opprav chybby nna toomto řádku a nahraď je pommocí undo. - 8. Toto jsou velmi užitečné příkazy. Nyní přejdi na souhrn Lekce 2. + 8. Toto jsou velmi užitečné příkazy. Nyní přejdi na souhrn Lekce 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUTÍ LEKCE 2 + SHRNUTÍ LEKCE 1.2 1. Pro smazání znaků od kurzoru do konce slova napiš: dw @@ -274,7 +274,7 @@ POZNÁMKA: Stlačením klávesy objektu v Normálním módu se kurzor přesune Pro vrácení vrácených úprav (redo) napiš: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.1: PŘÍKAZ VLOŽIT + Lekce 1.3.1: PŘÍKAZ VLOŽIT ** Příka p vloží poslední vymazaný text za kurzor. ** @@ -297,7 +297,7 @@ POZNÁMKA: Stlačením klávesy objektu v Normálním módu se kurzor přesune ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.2: PŘÍKAZ NAHRAZENÍ + Lekce 1.3.2: PŘÍKAZ NAHRAZENÍ ** Napsáním r a znaku se nahradí znak pod kurzorem. ** @@ -313,14 +313,14 @@ POZNÁMKA: Stlačením klávesy objektu v Normálním módu se kurzor přesune ---> Kdiž byl pzán tento řádeg, někdu stlažil špaqné klávesy! ---> Když byl psán tento řádek, někdo stlačíl špatné klávesy! - 5. Nyní přejdi na Lekci 3.2. + 5. Nyní přejdi na Lekci 1.3.2. POZNÁMKA: Zapamatuj si, že by ses měl učit používáním, ne zapamatováním. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.3: PŘÍKAZ ÚPRAVY + Lekce 1.3.3: PŘÍKAZ ÚPRAVY ** Pokud chceš změnit část nebo celé slovo, napiš cw . ** @@ -343,7 +343,7 @@ Všimni si, že cw nejen nahrazuje slovo, ale také přemístí do vkládání ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 3.4: VÍCE ZMĚN POUŽITÍM c + Lekce 1.3.4: VÍCE ZMĚN POUŽITÍM c ** Příkaz pro úpravu se druží se stejnými objekty jako ten pro mazání. ** @@ -366,7 +366,7 @@ Všimni si, že cw nejen nahrazuje slovo, ale také přemístí do vkládání ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUTÍ LEKCE 3 + SHRNUTÍ LEKCE 1.3 1. Pro vložení textu, který byl smazán, napiš p . To vloží smazaný text @@ -389,7 +389,7 @@ Nyní přejdi na následující lekci. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.1: POZICE A STATUS SOUBORU + Lekce 1.4.1: POZICE A STATUS SOUBORU ** Stlač CTRL-g pro zobrazení své pozice v souboru a statusu souboru. @@ -412,7 +412,7 @@ Nyní přejdi na následující lekci. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.2: PŘÍKAZ VYHLEDÁVÁNÍ + Lekce 1.4.2: PŘÍKAZ VYHLEDÁVÁNÍ ** Napiš / následované řetězcem pro vyhledání onoho řetězce. ** @@ -435,7 +435,7 @@ Poznámka: Když vyhledávání dosáhne konce souboru, bude pokračovat na jeho začátku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.3: VYHLEDÁVÁNÍ PÁROVÉ ZÁVORKY + Lekce 1.4.3: VYHLEDÁVÁNÍ PÁROVÉ ZÁVORKY ** Napiš % pro nalezení párové ),], nebo } . ** @@ -458,7 +458,7 @@ Poznámka: Toto je velmi užitečné pří ladění programu s chybějícími ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 4.4: ZPŮSOB JAK ZMĚNIT CHYBY + Lekce 1.4.4: ZPŮSOB JAK ZMĚNIT CHYBY ** Napiš :s/staré/nové/g pro nahrazení slova 'nové' za 'staré'. ** @@ -481,7 +481,7 @@ Poznámka: Toto je velmi užitečné pří ladění programu s chybějícími ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUTÍ LEKCE 4 + SHRNUTÍ LEKCE 1.4 1. Ctrl-g vypíše tvou pozici v souboru a status souboru. @@ -504,7 +504,7 @@ Poznámka: Toto je velmi užitečné pří ladění programu s chybějícími ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.1: JAK VYKONAT VNĚJŠÍ PŘÍKAZ + Lekce 1.5.1: JAK VYKONAT VNĚJŠÍ PŘÍKAZ ** Napiš :! následované vnějším příkazem pro spuštění příkazu. ** @@ -527,7 +527,7 @@ Poznámka: Všechny příkazy : musí být dokončené stisknutím ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.2: VÍCE O UKLÁDÁNÍ SOUBORŮ + Lekce 1.5.2: VÍCE O UKLÁDÁNÍ SOUBORŮ ** Pro uložení změn v souboru napiš :w SOUBOR. ** @@ -550,7 +550,7 @@ Poznámka: Jakmile ukončíš Vim a znovu ho spustíš s názvem souboru TEST, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.3: VÝBĚROVÝ PŘÍKAZ ULOŽENÍ + Lekce 1.5.3: VÝBĚROVÝ PŘÍKAZ ULOŽENÍ ** Pro uložení části souboru napiš :#,# w SOUBOR ** @@ -573,7 +573,7 @@ Poznámka: Jakmile ukončíš Vim a znovu ho spustíš s názvem souboru TEST, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 5.4: SLUČOVÁNÍ SOUBORŮ + Lekce 1.5.4: SLUČOVÁNÍ SOUBORŮ ** K vložení obsahu souboru napiš :r NÁZEV_SOUBORU ** @@ -582,7 +582,7 @@ Poznámka: Jakmile ukončíš Vim a znovu ho spustíš s názvem souboru TEST, 2. Přesuň kurzor na vrch této stránky. -POZNÁMKA: Po vykonání kroku 3 uvidíš lekci 5.3. Potom se opět přesuň dolů +POZNÁMKA: Po vykonání kroku 3 uvidíš lekci 1.5.3. Potom se opět přesuň dolů na tuto lekci. 3. Nyní vlož soubor TEST použitím příkazu :r TEST kde TEST je název @@ -591,12 +591,12 @@ POZNÁMKA: Po vykonání kroku 3 uvidíš lekci 5.3. Potom se opět přesuň dol POZNÁMKA: Soubor, který vkládáš se vloží od místa, kde se nachází kurzor. 4. Pro potvrzení vložení souboru, přesuň kurzor zpět a všimni si, že teď - máš dvě kopie lekce 5.3, originál a souborovou verzi. + máš dvě kopie lekce 1.5.3, originál a souborovou verzi. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRNUTÍ LEKCE 5 + SHRNUTÍ LEKCE 1.5 1. :!příkaz vykoná vnější příkaz. @@ -619,7 +619,7 @@ POZNÁMKA: Soubor, který vkládáš se vloží od místa, kde se nachází kurz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.1: PŘÍKAZ OTEVŘÍT + Lekce 1.6.1: PŘÍKAZ OTEVŘÍT ** Napiš o pro vložení řádku pod kurzor a přepnutí do Vkládacího módu. ** @@ -642,7 +642,7 @@ Vlož řádek nad tímto napsáním Shift-O po umístění kurzoru na tento řá ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.2: PŘÍKAZ PŘIDAT + Lekce 1.6.2: PŘÍKAZ PŘIDAT ** Stiskni a pro vložení textu ZA kurzor. ** @@ -665,7 +665,7 @@ Poznámka: Tímto se vyhneš stisknutí i , posledního znaku, textu na vlože ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.3: JINÝ ZPŮSOB NAHRAZOVÁNÍ + Lekce 1.6.3: JINÝ ZPŮSOB NAHRAZOVÁNÍ ** Napiš velké R pro nahrazení víc než jednoho znaku. ** @@ -688,7 +688,7 @@ Poznámka: Tímto se vyhneš stisknutí i , posledního znaku, textu na vlože ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekce 6.4: NASTAVENÍ MOŽNOSTÍ + Lekce 1.6.4: NASTAVENÍ MOŽNOSTÍ ** Nastav možnost, že vyhledávání anebo nahrazování nedbá velikosti písmen ** @@ -711,7 +711,7 @@ Poznámka: Tímto se vyhneš stisknutí i , posledního znaku, textu na vlože 6. Pro vypnutí zvýrazňování výsledků napiš: :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SHRHNUTÍ LEKCE 6 + SHRHNUTÍ LEKCE 1.6 1. Stisknutí o otevře nový řádek POD kurzorem a umístí kurzor na vložený @@ -734,7 +734,7 @@ Poznámka: Tímto se vyhneš stisknutí i , posledního znaku, textu na vlože ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCE 7: PŘÍKAZY ON-LINE NÁPOVĚDY + LEKCE 1.7: PŘÍKAZY ON-LINE NÁPOVĚDY ** Používej on-line systém nápovědy ** @@ -757,7 +757,7 @@ Poznámka: Tímto se vyhneš stisknutí i , posledního znaku, textu na vlože ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCE 8: VYTVOŘENÍ INICIALIZAČNÍHO SKRIPTU + LEKCE 1.8: VYTVOŘENÍ INICIALIZAČNÍHO SKRIPTU ** Zapni funkce editoru Vim ** diff --git a/usr/share/vim/vim91/tutor/tutor.da b/usr/share/vim/vim91/tutor/tutor1.da similarity index 95% rename from usr/share/vim/vim91/tutor/tutor.da rename to usr/share/vim/vim91/tutor/tutor1.da index ba62fce53c6..2d3b28db35b 100644 --- a/usr/share/vim/vim91/tutor/tutor.da +++ b/usr/share/vim/vim91/tutor/tutor1.da @@ -11,7 +11,7 @@ afhngig af hvor meget tid der bruges p at eksperimentere. VR OPMRKSOM P AT: - Kommandoerne i lektionerne ndre teksten. Opret en kopi af filen + Kommandoerne i lektionerne ndrer teksten. Opret en kopi af filen til at ve p (hvis du startede "vimtutor", s er det allerede en kopi). Det er vigtigt at huske p at vejledningen er sat op til at lre ved at @@ -22,7 +22,7 @@ p j-tasten nok gange til at flytte markren s lektion 1.1 fylder hele skrmen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.1: FLYT MARKREN + Lektion 1.1.1: FLYT MARKREN ** Tryk p h-,j-,k-,l-tasterne som vist, for at flytte markren. ** @@ -45,7 +45,7 @@ BEM meget hurtigere, nr du har vnnet dig til det. Serist! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.2: AFSLUT VIM + Lektion 1.1.2: AFSLUT VIM !! BEMRK: Ls hele lektionen, inden trinnene nedenfor udfres!! @@ -68,7 +68,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.3: TEKSTREDIGERING - SLET + Lektion 1.1.3: TEKSTREDIGERING - SLET ** Tryk p x for at slette tegnet som markren er ovenp. ** @@ -91,7 +91,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.4: TEKSTREDIGERING - INDST + Lektion 1.1.4: TEKSTREDIGERING - INDST ** Tryk p i for at indstte tekst. ** @@ -114,7 +114,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.5: TEKSTREDIGERING - VEDHFT + Lektion 1.1.5: TEKSTREDIGERING - VEDHFT ** Tryk p A for at vedhfte tekst. ** @@ -137,13 +137,13 @@ BEM 5. Nr du er fortrolig med at vedhfte tekst, s flyt til lektion 1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.6: REDIGER EN FIL + Lektion 1.1.6: REDIGER EN FIL ** Brug :wq til at gemme en fil og afslutte. ** !! BEMRK: Ls hele lektionen, inden trinnene nedenfor udfres!! - 1. Afslut vejledningen som du gjorde i lektion 1.2: :q! + 1. Afslut vejledningen som du gjorde i lektion 1.1.2: :q! Eller gr flgende i en anden terminal, hvis du har adgang til en. 2. Skriv denne kommando i skalprompten: vim tutor @@ -183,7 +183,7 @@ BEM Fortst nu med lektion 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.1: SLETTEKOMMANDOER + Lektion 1.2.1: SLETTEKOMMANDOER ** Skriv dw for at slette et ord. ** @@ -206,7 +206,7 @@ Forts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.2: FLERE SLETTEKOMMANDOER + Lektion 1.2.2: FLERE SLETTEKOMMANDOER ** Skriv d$ for at slette til slutningen af linjen. ** @@ -229,7 +229,7 @@ Forts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.3: OM OPERATORER OG BEVGELSER + Lektion 1.2.3: OM OPERATORER OG BEVGELSER Mange kommandoer som ndre tekst skabes fra en operator og en bevgelse. @@ -252,7 +252,7 @@ BEM s flyttes markren som angivet. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.4: BRUG TLLER TIL EN BEVGELSE + Lektion 1.2.4: BRUG TLLER TIL EN BEVGELSE ** Nr der skrives et nummer inden en bevgelse, s gentages den det antal gange. ** @@ -275,7 +275,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.5: BRUG TLLER TIL AT SLETTE FLERE + Lektion 1.2.5: BRUG TLLER TIL AT SLETTE FLERE ** Nr der skrives et nummer med en operator, s gentages den det antal gange. ** @@ -298,7 +298,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.6: ARBEJD P LINJER + Lektion 1.2.6: ARBEJD P LINJER ** Skriv dd for at slette en hel linje. ** @@ -321,7 +321,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.7: FORTRYD-KOMMANDOEN + Lektion 1.2.7: FORTRYD-KOMMANDOEN ** Tryk p u for at fortryde de sidste kommandoer, U for at rette en hel linje. ** @@ -367,7 +367,7 @@ BEM Fortryd fortrydelserne, ved at skrive: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.1: PUT-INDSTTE-KOMMANDOEN + Lektion 1.3.1: PUT-INDSTTE-KOMMANDOEN ** Skriv p for at put-indstte tidligere slettede tekst efter markren. ** @@ -390,7 +390,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.2: ERSTAT-KOMMANDOEN + Lektion 1.3.2: ERSTAT-KOMMANDOEN ** Skriv rx for at erstatte tegnet ved markren med x . ** @@ -413,7 +413,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.3: NDRINGSOPERATOREN + Lektion 1.3.3: NDRINGSOPERATOREN ** ndr indtil slutningen af et ord, ved at skrive ce . ** @@ -436,7 +436,7 @@ Bem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.4: FLERE NDRINGER MED c + Lektion 1.3.4: FLERE NDRINGER MED c ** NDRINGSOPERATOREN bruges med de samme bevgelser som slet. ** @@ -482,7 +482,7 @@ G ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.1: MARKRPLACERING OG FILSTATUS + Lektion 1.4.1: MARKRPLACERING OG FILSTATUS ** Skriv CTRL-G for at vise din placering i filen og filstatussen. Skriv G for at flytte til en linje i filen. ** @@ -505,7 +505,7 @@ BEM 4. Hvis du fler dig klar til at gre det, s udfre trin 1 til 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.2: SG-KOMMANDOEN + Lektion 1.4.2: SG-KOMMANDOEN ** Skriv / efterfulgt af en frase for at sge efter frasen. ** @@ -528,7 +528,7 @@ BEM begyndelsen, men mindre 'wrapscan'-valgmuligheden er blevet slet fra. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.3: SG EFTER MODSVARENDE PARENTESER + Lektion 1.4.3: SG EFTER MODSVARENDE PARENTESER ** Skriv % for at finde en modsvarende ),], eller } . ** @@ -551,7 +551,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.4: UDSKIFT-KOMMANDOEN + Lektion 1.4.4: UDSKIFT-KOMMANDOEN ** Skriv :s/gammel/ny/g for at udskifte 'gammel' med 'ny'. ** @@ -597,7 +597,7 @@ BEM Sprg om bekrftelse hver gang, ved at tilfje 'c' :%s/gammel/ny/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.1: UDFR EN EKSTERN KOMMANDO + Lektion 1.5.1: UDFR EN EKSTERN KOMMANDO ** Skriv :! efterfulgt af en ekstern kommando, for at udfre kommandoen. ** @@ -620,7 +620,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.2: MERE OM AT SKRIVE FILER + Lektion 1.5.2: MERE OM AT SKRIVE FILER ** Gem ndringerne som er foretaget til teksten, ved at skrive :w FILNAVN. ** @@ -643,7 +643,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.3: MARKR TEKST SOM SKAL SKRIVES + Lektion 1.5.3: MARKR TEKST SOM SKAL SKRIVES ** Gem en del af en fil, ved at skrive v bevgelse :w FILNAVN ** @@ -666,7 +666,7 @@ BEM operator til at gre noget med teksten. F.eks. vil d slette teksten. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.4: INDHENT OG SAMMENLG FILER + Lektion 1.5.4: INDHENT OG SAMMENLG FILER ** Indst indholdet af en fil, ved at skrive :r FILNAVN ** @@ -712,7 +712,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.1: BN-KOMMANDOEN + Lektion 1.6.1: BN-KOMMANDOEN ** Skriv o for at bne en linje under markren og stille dig i indst-tilstand. ** @@ -735,7 +735,7 @@ BEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.2: VEDHFT-KOMMANDOEN + Lektion 1.6.2: VEDHFT-KOMMANDOEN ** Skriv a for at indstte tekst EFTER markren. ** @@ -758,7 +758,7 @@ BEM den eneste forskel er hvor tegnene indsttes. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.3: AN ANDEN MDE AT ERSTATTE + Lektion 1.6.3: AN ANDEN MDE AT ERSTATTE ** Skriv et stort R for at erstatte flere end t tegn. ** @@ -781,7 +781,7 @@ BEM tegn sletter et eksisterende tegn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.4: KOPER OG INDST TEKST + Lektion 1.6.4: KOPER OG INDST TEKST ** Brug y-operatoren til at kopiere tekst og p til at indstte den ** @@ -804,7 +804,7 @@ BEM BEMRK: du kan ogs bruge y som en operator; yw yank-udtrkker et ord. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.5: ST VALGMULIGHED + Lektion 1.6.5: ST VALGMULIGHED ** St en valgmulighed s en sgning eller udskiftning ignorerer forskelle p store/sm bogstaver ** @@ -850,7 +850,7 @@ BEM 7. Vedhft "no" i begyndelsen, for at sl en valgmulighed fra: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.1: F HJLP + Lektion 1.7.1: F HJLP ** Brug online-hjlpesystemet ** @@ -873,7 +873,7 @@ BEM :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.2: OPRET ET OPSTARTS-SCRIPT + Lektion 1.7.2: OPRET ET OPSTARTS-SCRIPT ** Aktivr Vim-funktionaliteter ** @@ -896,7 +896,7 @@ BEM F mere information, ved at skrive :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.3: FULDFRELSE + Lektion 1.7.3: FULDFRELSE ** Kommandolinjefuldfrelse med CTRL-D og ** diff --git a/usr/share/vim/vim91/tutor/tutor.da.utf-8 b/usr/share/vim/vim91/tutor/tutor1.da.utf-8 similarity index 95% rename from usr/share/vim/vim91/tutor/tutor.da.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.da.utf-8 index dad3ea8a7e3..c7b1ef7c125 100644 --- a/usr/share/vim/vim91/tutor/tutor.da.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.da.utf-8 @@ -22,7 +22,7 @@ på j-tasten nok gange til at flytte markøren så lektion 1.1 fylder hele skærmen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.1: FLYT MARKØREN + Lektion 1.1.1: FLYT MARKØREN ** Tryk på h-,j-,k-,l-tasterne som vist, for at flytte markøren. ** @@ -45,7 +45,7 @@ BEMÆRK: Piletasterne bør også virke. Men med hjkl kan du flytte rundt meget hurtigere, når du har vænnet dig til det. Seriøst! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.2: AFSLUT VIM + Lektion 1.1.2: AFSLUT VIM !! BEMÆRK: Læs hele lektionen, inden trinnene nedenfor udføres!! @@ -68,7 +68,7 @@ BEMÆRK: :q! forkaster ændringer som du har foretaget. Om få lektione ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.3: TEKSTREDIGERING - SLET + Lektion 1.1.3: TEKSTREDIGERING - SLET ** Tryk på x for at slette tegnet som markøren er ovenpå. ** @@ -91,7 +91,7 @@ BEMÆRK: Efterhånden som du gennemgår vejledningen, så lær det ikke udenad, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.4: TEKSTREDIGERING - INDSÆT + Lektion 1.1.4: TEKSTREDIGERING - INDSÆT ** Tryk på i for at indsætte tekst. ** @@ -114,7 +114,7 @@ BEMÆRK: Efterhånden som du gennemgår vejledningen, så lær det ikke udenad, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.5: TEKSTREDIGERING - VEDHÆFT + Lektion 1.1.5: TEKSTREDIGERING - VEDHÆFT ** Tryk på A for at vedhæfte tekst. ** @@ -137,13 +137,13 @@ BEMÆRK: Efterhånden som du gennemgår vejledningen, så lær det ikke udenad, 5. Når du er fortrolig med at vedhæfte tekst, så flyt til lektion 1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.6: REDIGER EN FIL + Lektion 1.1.6: REDIGER EN FIL ** Brug :wq til at gemme en fil og afslutte. ** !! BEMÆRK: Læs hele lektionen, inden trinnene nedenfor udføres!! - 1. Afslut vejledningen som du gjorde i lektion 1.2: :q! + 1. Afslut vejledningen som du gjorde i lektion 1.1.2: :q! Eller gør følgende i en anden terminal, hvis du har adgang til en. 2. Skriv denne kommando i skalprompten: vim tutor @@ -183,7 +183,7 @@ BEMÆRK: Når der trykkes på , så stilles du i normal tilstand eller ogs Fortsæt nu med lektion 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.1: SLETTEKOMMANDOER + Lektion 1.2.1: SLETTEKOMMANDOER ** Skriv dw for at slette et ord. ** @@ -206,7 +206,7 @@ Fortsæt nu med lektion 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.2: FLERE SLETTEKOMMANDOER + Lektion 1.2.2: FLERE SLETTEKOMMANDOER ** Skriv d$ for at slette til slutningen af linjen. ** @@ -229,7 +229,7 @@ Fortsæt nu med lektion 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.3: OM OPERATORER OG BEVÆGELSER + Lektion 1.2.3: OM OPERATORER OG BEVÆGELSER Mange kommandoer som ændre tekst skabes fra en operator og en bevægelse. @@ -252,7 +252,7 @@ BEMÆRK: Når kun bevægelsen trykkes i normal tilstand, uden en operator, så flyttes markøren som angivet. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.4: BRUG TÆLLER TIL EN BEVÆGELSE + Lektion 1.2.4: BRUG TÆLLER TIL EN BEVÆGELSE ** Når der skrives et nummer inden en bevægelse, så gentages den det antal gange. ** @@ -275,7 +275,7 @@ BEMÆRK: Når kun bevægelsen trykkes i normal tilstand, uden en operator, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.5: BRUG TÆLLER TIL AT SLETTE FLERE + Lektion 1.2.5: BRUG TÆLLER TIL AT SLETTE FLERE ** Når der skrives et nummer med en operator, så gentages den det antal gange. ** @@ -298,7 +298,7 @@ BEMÆRK: Når kun bevægelsen trykkes i normal tilstand, uden en operator, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.6: ARBEJD PÅ LINJER + Lektion 1.2.6: ARBEJD PÅ LINJER ** Skriv dd for at slette en hel linje. ** @@ -321,7 +321,7 @@ BEMÆRK: Når kun bevægelsen trykkes i normal tilstand, uden en operator, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.7: FORTRYD-KOMMANDOEN + Lektion 1.2.7: FORTRYD-KOMMANDOEN ** Tryk på u for at fortryde de sidste kommandoer, U for at rette en hel linje. ** @@ -367,7 +367,7 @@ BEMÆRK: Når kun bevægelsen trykkes i normal tilstand, uden en operator, Fortryd fortrydelserne, ved at skrive: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.1: PUT-INDSÆTTE-KOMMANDOEN + Lektion 1.3.1: PUT-INDSÆTTE-KOMMANDOEN ** Skriv p for at put-indsætte tidligere slettede tekst efter markøren. ** @@ -390,7 +390,7 @@ BEMÆRK: Når kun bevægelsen trykkes i normal tilstand, uden en operator, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.2: ERSTAT-KOMMANDOEN + Lektion 1.3.2: ERSTAT-KOMMANDOEN ** Skriv rx for at erstatte tegnet ved markøren med x . ** @@ -413,7 +413,7 @@ BEMÆRK: Husk på at du skal lære ved at gøre det, ikke ved at lære det udena ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.3: ÆNDRINGSOPERATOREN + Lektion 1.3.3: ÆNDRINGSOPERATOREN ** Ændr indtil slutningen af et ord, ved at skrive ce . ** @@ -436,7 +436,7 @@ Bemærk at ce sletter ordet og stiller dig i indsæt-tilstand. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.4: FLERE ÆNDRINGER MED c + Lektion 1.3.4: FLERE ÆNDRINGER MED c ** ÆNDRINGSOPERATOREN bruges med de samme bevægelser som slet. ** @@ -482,7 +482,7 @@ Gå nu videre til den næste lektion. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.1: MARKØRPLACERING OG FILSTATUS + Lektion 1.4.1: MARKØRPLACERING OG FILSTATUS ** Skriv CTRL-G for at vise din placering i filen og filstatussen. Skriv G for at flytte til en linje i filen. ** @@ -505,7 +505,7 @@ BEMÆRK: Du ser muligvis markørplaceringen nederst i højre hjørne af skærmen 4. Hvis du føler dig klar til at gøre det, så udføre trin 1 til 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.2: SØG-KOMMANDOEN + Lektion 1.4.2: SØG-KOMMANDOEN ** Skriv / efterfulgt af en frase for at søge efter frasen. ** @@ -528,7 +528,7 @@ BEMÆRK: Når søgningen når slutningen af filen, så fortsætter den ved begyndelsen, men mindre 'wrapscan'-valgmuligheden er blevet slået fra. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.3: SØG EFTER MODSVARENDE PARENTESER + Lektion 1.4.3: SØG EFTER MODSVARENDE PARENTESER ** Skriv % for at finde en modsvarende ),], eller } . ** @@ -551,7 +551,7 @@ BEMÆRK: Det er meget nyttigt ved fejlretning af et program som mangler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.4: UDSKIFT-KOMMANDOEN + Lektion 1.4.4: UDSKIFT-KOMMANDOEN ** Skriv :s/gammel/ny/g for at udskifte 'gammel' med 'ny'. ** @@ -597,7 +597,7 @@ BEMÆRK: Det er meget nyttigt ved fejlretning af et program som mangler Spørg om bekræftelse hver gang, ved at tilføje 'c' :%s/gammel/ny/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.1: UDFØR EN EKSTERN KOMMANDO + Lektion 1.5.1: UDFØR EN EKSTERN KOMMANDO ** Skriv :! efterfulgt af en ekstern kommando, for at udføre kommandoen. ** @@ -620,7 +620,7 @@ BEMÆRK: Alle :-kommandoer skal afsluttes ved at trykke på . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.2: MERE OM AT SKRIVE FILER + Lektion 1.5.2: MERE OM AT SKRIVE FILER ** Gem ændringerne som er foretaget til teksten, ved at skrive :w FILNAVN. ** @@ -643,7 +643,7 @@ BEMÆRK: Hvis du afslutter Vim og starter den igen med vim TEST , så vil ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.3: MARKÉR TEKST SOM SKAL SKRIVES + Lektion 1.5.3: MARKÉR TEKST SOM SKAL SKRIVES ** Gem en del af en fil, ved at skrive v bevægelse :w FILNAVN ** @@ -666,7 +666,7 @@ BEMÆRK: Når der trykkes på v startes visuel markering. Du kan flytte markø operator til at gøre noget med teksten. F.eks. vil d slette teksten. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.4: INDHENT OG SAMMENLÆG FILER + Lektion 1.5.4: INDHENT OG SAMMENLÆG FILER ** Indsæt indholdet af en fil, ved at skrive :r FILNAVN ** @@ -712,7 +712,7 @@ BEMÆRK: Du kan også læse outputtet fra en ekstern kommando. F.eks. læser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.1: ÅBN-KOMMANDOEN + Lektion 1.6.1: ÅBN-KOMMANDOEN ** Skriv o for at åbne en linje under markøren og stille dig i indsæt-tilstand. ** @@ -735,7 +735,7 @@ BEMÆRK: Du kan også læse outputtet fra en ekstern kommando. F.eks. læser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.2: VEDHÆFT-KOMMANDOEN + Lektion 1.6.2: VEDHÆFT-KOMMANDOEN ** Skriv a for at indsætte tekst EFTER markøren. ** @@ -758,7 +758,7 @@ BEMÆRK: a, i og A går alle til den samme indsæt-tilstand, den eneste forskel er hvor tegnene indsættes. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.3: AN ANDEN MÅDE AT ERSTATTE + Lektion 1.6.3: AN ANDEN MÅDE AT ERSTATTE ** Skriv et stort R for at erstatte flere end ét tegn. ** @@ -781,7 +781,7 @@ BEMÆRK: Erstat-tilstand er ligesom indsæt-tilstand, men hvert indtastede tegn sletter et eksisterende tegn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.4: KOPÍER OG INDSÆT TEKST + Lektion 1.6.4: KOPÍER OG INDSÆT TEKST ** Brug y-operatoren til at kopiere tekst og p til at indsætte den ** @@ -804,7 +804,7 @@ BEMÆRK: Erstat-tilstand er ligesom indsæt-tilstand, men hvert indtastede BEMÆRK: du kan også bruge y som en operator; yw yank-udtrækker et ord. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.5: SÆT VALGMULIGHED + Lektion 1.6.5: SÆT VALGMULIGHED ** Sæt en valgmulighed så en søgning eller udskiftning ignorerer forskelle på store/små bogstaver ** @@ -850,7 +850,7 @@ BEMÆRK: Hvis du vil ignorere case for en enkelt søg-kommando, så brug \c 7. Vedhæft "no" i begyndelsen, for at slå en valgmulighed fra: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.1: FÅ HJÆLP + Lektion 1.7.1: FÅ HJÆLP ** Brug online-hjælpesystemet ** @@ -873,7 +873,7 @@ BEMÆRK: Hvis du vil ignorere case for en enkelt søg-kommando, så brug \c :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.2: OPRET ET OPSTARTS-SCRIPT + Lektion 1.7.2: OPRET ET OPSTARTS-SCRIPT ** Aktivér Vim-funktionaliteter ** @@ -896,7 +896,7 @@ BEMÆRK: Hvis du vil ignorere case for en enkelt søg-kommando, så brug \c Få mere information, ved at skrive :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.3: FULDFØRELSE + Lektion 1.7.3: FULDFØRELSE ** Kommandolinjefuldførelse med CTRL-D og ** diff --git a/usr/share/vim/vim91/tutor/tutor.de b/usr/share/vim/vim91/tutor/tutor1.de similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.de rename to usr/share/vim/vim91/tutor/tutor1.de index 599fdc7b64c..f7cee3e8f72 100644 --- a/usr/share/vim/vim91/tutor/tutor.de +++ b/usr/share/vim/vim91/tutor/tutor1.de @@ -20,9 +20,9 @@ Jetzt stelle sicher, dass deine Umstelltaste NICHT gedrckt ist und bettige die j Taste gengend Mal, um den Cursor nach unten zu bewegen, so dass - Lektion 1.1 den Bildschirm vollkommen ausfllt. + Lektion 1.1.1 den Bildschirm vollkommen ausfllt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.1: BEWEGEN DES CURSORS + Lektion 1.1.1: BEWEGEN DES CURSORS ** Um den Cursor zu bewegen, drcke die h,j,k,l Tasten wie unten gezeigt. ** ^ Hilfestellung: @@ -35,7 +35,7 @@ 2. Halte die Nach-Unten-Taste (j) gedrckt, bis sie sich wiederholt. Jetzt weit Du, wie Du Dich zur nchsten Lektion bewegen kannst. - 3. Benutze die Nach-Unten-Taste, um Dich zu Lektion 1.2 zu bewegen. + 3. Benutze die Nach-Unten-Taste, um Dich zu Lektion 1.1.2 zu bewegen. Anmerkung: Immer, wenn Du Dir unsicher bist ber das, was Du getippt hast, drcke , um Dich in den Normalmodus zu begeben. @@ -45,7 +45,7 @@ Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du hjkl benutzt, wirst Du in der Lage sein, Dich sehr viel schneller umherzubewegen, wenn Du Dich einmal daran gewhnt hast. Wirklich! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.2: VIM BEENDEN + Lektion 1.1.2: VIM BEENDEN !! Hinweis: Bevor Du einen der unten aufgefhrten Schritte ausfhrst, lies @@ -66,9 +66,9 @@ Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du Anmerkung: :q! verwirft alle nderungen, die Du gemacht hast. Einige Lektionen spter lernst Du, die nderungen in einer Datei zu speichern. - 5. Bewege den Cursor abwrts zu Lektion 1.3. + 5. Bewege den Cursor abwrts zu Lektion 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.3: TEXT EDITIEREN - LSCHEN + Lektion 1.1.3: TEXT EDITIEREN - LSCHEN ** Drcke x , um das Zeichen unter dem Cursor zu lschen. ** @@ -84,14 +84,14 @@ Anmerkung: :q! verwirft alle ---> Die Kkuh sprangg bberr deen Moond. - 5. Nun, da die Zeile korrekt ist, gehe weiter zur Lektion 1.4. + 5. Nun, da die Zeile korrekt ist, gehe weiter zur Lektion 1.1.4. Anmerkung: Whrend Du durch diesen Tutor gehst, versuche nicht, auswendig zu lernen, lerne vielmehr durch Anwenden. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.4: TEXT EDITIEREN - EINFGEN + Lektion 1.1.4: TEXT EDITIEREN - EINFGEN ** Drcke i , um Text einzufgen. ** @@ -110,11 +110,11 @@ Anmerkung: W ---> In dieser ft etwas . ---> In dieser Zeile fehlt etwas Text. - 5. Wenn Du Dich mit dem Einfgen von Text sicher fhlst, gehe zu Lektion 1.5. + 5. Wenn Du Dich mit dem Einfgen von Text sicher fhlst, gehe zu Lektion 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.5: TEXT EDITIEREN - ANFGEN + Lektion 1.1.5: TEXT EDITIEREN - ANFGEN ** Drcke A , um Text anzufgen. ** @@ -135,16 +135,16 @@ Anmerkung: W ---> Auch hier steh Auch hier steht etwas Unvollstndiges. - 5. Wenn Du dich mit dem Anfgen von Text sicher fhlst, gehe zu Lektion 1.6. + 5. Wenn Du dich mit dem Anfgen von Text sicher fhlst, gehe zu Lektion 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.6: EINE DATEI EDITIEREN + Lektion 1.1.6: EINE DATEI EDITIEREN ** Benutze :wq , um eine Datei zu speichern und Vim zu verlassen. ** !! Hinweis: Bevor Du einen der unten aufgefhrten Schritte ausfhrst, lies diese gesamte Lektion!! - 1. Verlasse den Editor so wie in Lektion 1.2: :q! + 1. Verlasse den Editor so wie in Lektion 1.1.2: :q! Oder, falls du Zugriff zu einem anderen Terminal hast, fhre das Folgende dort aus. @@ -162,7 +162,7 @@ Anmerkung: W 6. Nachdem Du obige Schritte gelesen und verstanden hast: fhre sie durch. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 1 + ZUSAMMENFASSUNG VON LEKTION 1.1 1. Der Cursor wird mit den Pfeiltasten oder den Tasten hjkl bewegt. @@ -182,9 +182,9 @@ Anmerkung: W Anmerkung: Drcken von bringt Dich in den Normalmodus oder bricht ein ungewolltes, erst teilweise eingegebenes Kommando ab. - Nun fahre mit Lektion 2 fort. + Nun fahre mit Lektion 1.2 fort. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.1: LSCHKOMMANDOS + Lektion 1.2.1: LSCHKOMMANDOS ** Tippe dw , um ein Wort zu lschen. ** @@ -205,9 +205,9 @@ Anmerkung: Dr ---> Einige Wrter lustig gehren nicht Papier in diesen Satz. 5. Wiederhole die Schritte 3 und 4, bis der Satz korrekt ist und gehe - zur Lektion 2.2. + zur Lektion 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.2: WEITERE LSCHKOMMANDOS + Lektion 1.2.2: WEITERE LSCHKOMMANDOS ** Tippe d$ , um bis zum Ende der Zeile zu lschen. ** @@ -223,14 +223,14 @@ Anmerkung: Dr ---> Jemand hat das Ende der Zeile doppelt eingegeben. doppelt eingegeben. - 5. Gehe weiter zur Lektion 2.3 , um zu verstehen, was hierbei vorgeht. + 5. Gehe weiter zur Lektion 1.2.3 , um zu verstehen, was hierbei vorgeht. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.3: BER OPERATOREN UND BEWEGUNGSZGE + Lektion 1.2.3: BER OPERATOREN UND BEWEGUNGSZGE Viele Kommandos, die Text ndern, setzen sich aus einem Operator und einer @@ -253,7 +253,7 @@ Anmerkung: Dr Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den Cursor entsprechend. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.4: ANWENDUNG EINES ZHLERS FR EINEN BEWEGUNGSSCHRITT + Lektion 1.2.4: ANWENDUNG EINES ZHLERS FR EINEN BEWEGUNGSSCHRITT ** Die Eingabe einer Zahl vor einem Bewegungsschritt wiederholt diesen. ** @@ -270,13 +270,13 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> Dies ist nur eine Zeile aus Wrtern, um sich darin herumzubewegen. - 6. Gehe weiter zu Lektion 2.5. + 6. Gehe weiter zu Lektion 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.5: ANWENDUNG EINES ZHLERS FR MEHRERE LSCHVORGNGE + Lektion 1.2.5: ANWENDUNG EINES ZHLERS FR MEHRERE LSCHVORGNGE ** Die Eingabe einer Zahl mit einem Operator wiederholt diesen mehrfach. ** @@ -298,7 +298,7 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.6: ARBEITEN AUF ZEILEN + Lektion 1.2.6: ARBEITEN AUF ZEILEN ** Tippe dd , um eine ganze Zeile zu lschen. ** @@ -321,7 +321,7 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> 7) So wie Du auch. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.7: RCKGNGIG MACHEN (UNDO) + Lektion 1.2.7: RCKGNGIG MACHEN (UNDO) ** Tippe u , um die letzten Kommandos rckgngig zu machen ** @@ -342,9 +342,9 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> Beehebe die Fehller diesser Zeile und sttelle sie mitt 'undo' wieder her. 8. Dies sind sehr ntzliche Kommandos. Nun gehe weiter zur Zusammenfassung - von Lektion 2. + von Lektion 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 2 + ZUSAMMENFASSUNG VON LEKTION 1.2 1. Um vom Cursor bis zum nchsten Wort zu lschen, tippe: dw @@ -367,7 +367,7 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den Um die Rckgngigmachungen rckgngig zu machen, tippe: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.1: ANFGEN (PUT) + Lektion 1.3.1: ANFGEN (PUT) ** Tippe p , um vorher gelschten Text nach dem Cursor anzufgen. ** @@ -390,7 +390,7 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> c) Intelligenz ist lernbar, ---> a) Rosen sind rot, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.2: ERSETZEN (REPLACE) + Lektion 1.3.2: ERSETZEN (REPLACE) ** Tippe rx , um das Zeichen unter dem Cursor durch x zu ersetzen. ** @@ -406,14 +406,14 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> Alf diese Zeite eingegoben wurde, wurden einike falsche Tasten gelippt! ---> Als diese Zeile eingegeben wurde, wurden einige falsche Tasten getippt! - 5. Nun fahre fort mit Lektion 3.2. + 5. Nun fahre fort mit Lektion 1.3.2. Anmerkung: Erinnere Dich daran, dass Du durch Anwenden lernen solltest, nicht durch Auswendiglernen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.3: NDERN (CHANGE) + Lektion 1.3.3: NDERN (CHANGE) ** Um eine nderung bis zum Wortende durchzufhren, tippe ce . ** @@ -436,7 +436,7 @@ Beachte, dass ce das Wort l ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.4: MEHR NDERUNGEN MITTELS c + Lektion 1.3.4: MEHR NDERUNGEN MITTELS c ** Das change-Kommando arbeitet mit denselben Bewegungen wie delete. ** @@ -459,7 +459,7 @@ Beachte, dass ce das Wort l Anmerkung: Du kannst die Rcktaste benutzen, um Tippfehler zu korrigieren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 3 + ZUSAMMENFASSUNG VON LEKTION 1.3 1. Um einen vorher gelschten Text anzufgen, tippe p . Dies fgt den @@ -482,7 +482,7 @@ Anmerkung: Du kannst die R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.1: CURSORPOSITION UND DATEISTATUS + Lektion 1.4.1: CURSORPOSITION UND DATEISTATUS ** Tippe CTRL-G , um deine Dateiposition sowie den Dateistatus anzuzeigen. ** ** Tippe G , um Dich zu einer Zeile in der Datei zu begeben. ** @@ -506,7 +506,7 @@ Anmerkung: M 4. Wenn Du Dich sicher genug fhlst, fhre die Schritte 1 bis 3 aus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.2: DAS SUCHEN - KOMMANDO + Lektion 1.4.2: DAS SUCHEN - KOMMANDO ** Tippe / gefolgt von einem Ausdruck, um nach dem Ausdruck zu suchen. ** @@ -529,7 +529,7 @@ Anmerkung: M Anmerkung: Wenn die Suche das Dateiende erreicht hat, wird sie am Anfang fortgesetzt, es sei denn, die 'wrapscan' Option wurde abgeschaltet. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.3: PASSENDE KLAMMERN FINDEN + Lektion 1.4.3: PASSENDE KLAMMERN FINDEN ** Tippe % , um eine gegenberliegenden Klammer ),], oder } zu finden. ** @@ -552,7 +552,7 @@ Anmerkung: Diese Funktionalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.4: DAS ERSETZUNGSKOMMANDO (SUBSTITUTE) + Lektion 1.4.4: DAS ERSETZUNGSKOMMANDO (SUBSTITUTE) ** Tippe :s/alt/neu/g , um 'alt' durch 'neu' zu ersetzen. ** @@ -575,7 +575,7 @@ Anmerkung: Diese Funktionalit Tippe :%s/alt/neu/gc um alle Vorkommen in der gesamten Datei zu finden mit einem Fragedialog, ob ersetzt werden soll oder nicht. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 4 + ZUSAMMENFASSUNG VON LEKTION 1.4 1. CTRL-G zeigt die aktuelle Dateiposition sowie den Dateistatus. G bringt Dich zum Ende der Datei. @@ -598,7 +598,7 @@ Anmerkung: Diese Funktionalit Um alle Vorkommen in der ganzen Datei zu ersetzen, tippe :%s/alt/neu/g Fr eine jedesmalige Besttigung, addiere 'c' (confirm) :%s/alt/neu/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.1: AUSFHREN EINES EXTERNEN KOMMANDOS + Lektion 1.5.1: AUSFHREN EINES EXTERNEN KOMMANDOS ** Gib :! , gefolgt von einem externen Kommando ein, um es auszufhren. ** @@ -621,7 +621,7 @@ Anmerkung: Alle : Kommandos m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.2: MEHR BER DAS SCHREIBEN VON DATEIEN + Lektion 1.5.2: MEHR BER DAS SCHREIBEN VON DATEIEN ** Um am Text durchgefhrte nderungen zu speichern, tippe :w DATEINAME. ** @@ -644,7 +644,7 @@ Anmerkung: W 5. Nun entferne die Datei durch Eingabe von (MS-DOS): :!del TEST oder (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.3: AUSWHLEN VON TEXT ZUM SCHREIBEN + Lektion 1.5.3: AUSWHLEN VON TEXT ZUM SCHREIBEN ** Um einen Abschnitt der Datei zu speichern, tippe v Bewegung :w DATEI ** @@ -668,22 +668,22 @@ Hinweis: Dr lscht d den Text. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.4: EINLESEN UND ZUSAMMENFHREN VON DATEIEN + Lektion 1.5.4: EINLESEN UND ZUSAMMENFHREN VON DATEIEN ** Um den Inhalt einer Datei einzulesen, tippe :r DATEINAME ** 1. Platziere den Cursor direkt ber dieser Zeile. -BEACHTE: Nachdem Du Schritt 2 ausgefhrt hast, wirst Du Text aus Lektion 5.3 - sehen. Dann bewege Dich wieder ABWRTS, Lektion 5.4 wiederzusehen. +BEACHTE: Nachdem Du Schritt 2 ausgefhrt hast, wirst Du Text aus Lektion 1.5.3 + sehen. Dann bewege Dich wieder ABWRTS, Lektion 1.5.4 wiederzusehen. 2. Nun lies deine Datei TEST ein indem Du das Kommando :r TEST ausfhrst, wobei TEST der von Dir verwendete Dateiname ist. Die eingelesene Datei wird unterhalb der Cursorzeile eingefgt. 3. Um zu berprfen, dass die Datei eingelesen wurde, gehe zurck und - beachte, dass es jetzt zwei Kopien von Lektion 5.3 gibt, das Original und + beachte, dass es jetzt zwei Kopien von Lektion 1.5.3 gibt, das Original und die eingefgte Dateiversion. Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum @@ -691,7 +691,7 @@ Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum sie unterhalb des Cursors. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 5 + ZUSAMMENFASSUNG VON LEKTION 1.5 1. :!Kommando fhrt ein externes Kommando aus. @@ -714,7 +714,7 @@ Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.1: ZEILEN FFNEN (OPEN) + Lektion 1.6.1: ZEILEN FFNEN (OPEN) ** Tippe o , um eine Zeile unterhalb des Cursors zu ffnen und Dich in ** @@ -737,7 +737,7 @@ Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.2: TEXT ANFGEN (APPEND) + Lektion 1.6.2: TEXT ANFGEN (APPEND) ** Tippe a , um Text NACH dem Cursor einzufgen. ** @@ -760,7 +760,7 @@ Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum Anmerkung: a, i und A gehen alle gleichermaen in den Einfgemodus; der einzige Unterschied ist, wo die Zeichen eingefgt werden. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.3: EINE ANDERE ART DES ERSETZENS (REPLACE) + Lektion 1.6.3: EINE ANDERE ART DES ERSETZENS (REPLACE) ** Tippe ein groes R , um mehr als ein Zeichen zu ersetzen. ** @@ -783,7 +783,7 @@ Anmerkung: Der Ersetzungsmodus ist wie der Einf Zeichen lscht ein vorhandenes Zeichen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.4: TEXT KOPIEREN UND EINFGEN + Lektion 1.6.4: TEXT KOPIEREN UND EINFGEN ** Benutze den y Operator, um Text zu kopieren; p , um ihn einzufgen ** @@ -806,7 +806,7 @@ Anmerkung: Der Ersetzungsmodus ist wie der Einf Anmerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.5: OPTIONEN SETZEN + Lektion 1.6.5: OPTIONEN SETZEN ** Setze eine Option so, dass eine Suche oder Ersetzung Gro- ** ** und Kleinschreibung ignoriert ** @@ -829,7 +829,7 @@ Anmerkung: Um die Hervorhebung der Treffer zu entfernen, gib ein: :nohlsearch Anmerkung: Um die Schreibweise fr eine einzige Suche zu ignorieren, benutze \c im Suchausdruck: /ignoriere\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 6 + ZUSAMMENFASSUNG VON LEKTION 1.6 1. Tippe o , um eine Zeile UNTER dem Cursor zu ffnen und den Einfgemodus zu starten @@ -852,7 +852,7 @@ Anmerkung: Um die Schreibweise f 7. Stelle einer Option "no" voran, um sie abzuschalten: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.1 : AUFRUFEN VON HILFE + Lektion 1.7.1: AUFRUFEN VON HILFE ** Nutze das eingebaute Hilfesystem ** @@ -875,7 +875,7 @@ Anmerkung: Um die Schreibweise f :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.2: ERSTELLE EIN START-SKRIPT + Lektion 1.7.2: ERSTELLE EIN START-SKRIPT ** Aktiviere die Features von Vim ** @@ -898,7 +898,7 @@ Anmerkung: Um die Schreibweise f Du kannst all deine bevorzugten Optionen zu dieser "vimrc"-Datei zufgen. Fr mehr Informationen tippe :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.3: VERVOLLSTNDIGEN + Lektion 1.7.3: VERVOLLSTNDIGEN ** Kommandozeilenvervollstndigung mit CTRL-D und ** @@ -921,7 +921,7 @@ Anmerkung: Um die Schreibweise f Anmerkung: Vervollstndigung funktioniert fr viele Kommandos. Probiere einfach CTRL-D und . Dies ist insbesondere ntzlich fr :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 7 + ZUSAMMENFASSUNG VON LEKTION 1.7 1. Tippe :help oder drcke oder , um ein Hilfefenster zu ffnen. diff --git a/usr/share/vim/vim91/tutor/tutor.de.utf-8 b/usr/share/vim/vim91/tutor/tutor1.de.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.de.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.de.utf-8 index 9a5b592d9fe..f2157d9cd69 100644 --- a/usr/share/vim/vim91/tutor/tutor.de.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.de.utf-8 @@ -20,9 +20,9 @@ Jetzt stelle sicher, dass deine Umstelltaste NICHT gedrückt ist und betätige die j Taste genügend Mal, um den Cursor nach unten zu bewegen, so dass - Lektion 1.1 den Bildschirm vollkommen ausfüllt. + Lektion 1.1.1 den Bildschirm vollkommen ausfüllt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.1: BEWEGEN DES CURSORS + Lektion 1.1.1: BEWEGEN DES CURSORS ** Um den Cursor zu bewegen, drücke die h,j,k,l Tasten wie unten gezeigt. ** ^ Hilfestellung: @@ -35,7 +35,7 @@ 2. Halte die Nach-Unten-Taste (j) gedrückt, bis sie sich wiederholt. Jetzt weißt Du, wie Du Dich zur nächsten Lektion bewegen kannst. - 3. Benutze die Nach-Unten-Taste, um Dich zu Lektion 1.2 zu bewegen. + 3. Benutze die Nach-Unten-Taste, um Dich zu Lektion 1.1.2 zu bewegen. Anmerkung: Immer, wenn Du Dir unsicher bist über das, was Du getippt hast, drücke , um Dich in den Normalmodus zu begeben. @@ -45,7 +45,7 @@ Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du hjkl benutzt, wirst Du in der Lage sein, Dich sehr viel schneller umherzubewegen, wenn Du Dich einmal daran gewöhnt hast. Wirklich! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.2: VIM BEENDEN + Lektion 1.1.2: VIM BEENDEN !! Hinweis: Bevor Du einen der unten aufgeführten Schritte ausführst, lies @@ -66,9 +66,9 @@ Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du Anmerkung: :q! verwirft alle Änderungen, die Du gemacht hast. Einige Lektionen später lernst Du, die Änderungen in einer Datei zu speichern. - 5. Bewege den Cursor abwärts zu Lektion 1.3. + 5. Bewege den Cursor abwärts zu Lektion 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.3: TEXT EDITIEREN - LÖSCHEN + Lektion 1.1.3: TEXT EDITIEREN - LÖSCHEN ** Drücke x , um das Zeichen unter dem Cursor zu löschen. ** @@ -84,14 +84,14 @@ Anmerkung: :q! verwirft alle Änderungen, die Du gemacht hast. Einige ---> Die Kkuh sprangg übberr deen Moond. - 5. Nun, da die Zeile korrekt ist, gehe weiter zur Lektion 1.4. + 5. Nun, da die Zeile korrekt ist, gehe weiter zur Lektion 1.1.4. Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu lernen, lerne vielmehr durch Anwenden. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.4: TEXT EDITIEREN - EINFÜGEN + Lektion 1.1.4: TEXT EDITIEREN - EINFÜGEN ** Drücke i , um Text einzufügen. ** @@ -110,11 +110,11 @@ Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu ---> In dieser ft etwas . ---> In dieser Zeile fehlt etwas Text. - 5. Wenn Du Dich mit dem Einfügen von Text sicher fühlst, gehe zu Lektion 1.5. + 5. Wenn Du Dich mit dem Einfügen von Text sicher fühlst, gehe zu Lektion 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.5: TEXT EDITIEREN - ANFÜGEN + Lektion 1.1.5: TEXT EDITIEREN - ANFÜGEN ** Drücke A , um Text anzufügen. ** @@ -135,16 +135,16 @@ Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu ---> Auch hier steh Auch hier steht etwas Unvollständiges. - 5. Wenn Du dich mit dem Anfügen von Text sicher fühlst, gehe zu Lektion 1.6. + 5. Wenn Du dich mit dem Anfügen von Text sicher fühlst, gehe zu Lektion 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.6: EINE DATEI EDITIEREN + Lektion 1.1.6: EINE DATEI EDITIEREN ** Benutze :wq , um eine Datei zu speichern und Vim zu verlassen. ** !! Hinweis: Bevor Du einen der unten aufgeführten Schritte ausführst, lies diese gesamte Lektion!! - 1. Verlasse den Editor so wie in Lektion 1.2: :q! + 1. Verlasse den Editor so wie in Lektion 1.1.2: :q! Oder, falls du Zugriff zu einem anderen Terminal hast, führe das Folgende dort aus. @@ -162,7 +162,7 @@ Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu 6. Nachdem Du obige Schritte gelesen und verstanden hast: führe sie durch. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 1 + ZUSAMMENFASSUNG VON LEKTION 1.1 1. Der Cursor wird mit den Pfeiltasten oder den Tasten hjkl bewegt. @@ -182,9 +182,9 @@ Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu Anmerkung: Drücken von bringt Dich in den Normalmodus oder bricht ein ungewolltes, erst teilweise eingegebenes Kommando ab. - Nun fahre mit Lektion 2 fort. + Nun fahre mit Lektion 1.2 fort. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.1: LÖSCHKOMMANDOS + Lektion 1.2.1: LÖSCHKOMMANDOS ** Tippe dw , um ein Wort zu löschen. ** @@ -205,9 +205,9 @@ Anmerkung: Drücken von bringt Dich in den Normalmodus oder bricht ein ---> Einige Wörter lustig gehören nicht Papier in diesen Satz. 5. Wiederhole die Schritte 3 und 4, bis der Satz korrekt ist und gehe - zur Lektion 2.2. + zur Lektion 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.2: WEITERE LÖSCHKOMMANDOS + Lektion 1.2.2: WEITERE LÖSCHKOMMANDOS ** Tippe d$ , um bis zum Ende der Zeile zu löschen. ** @@ -223,14 +223,14 @@ Anmerkung: Drücken von bringt Dich in den Normalmodus oder bricht ein ---> Jemand hat das Ende der Zeile doppelt eingegeben. doppelt eingegeben. - 5. Gehe weiter zur Lektion 2.3 , um zu verstehen, was hierbei vorgeht. + 5. Gehe weiter zur Lektion 1.2.3 , um zu verstehen, was hierbei vorgeht. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.3: ÜBER OPERATOREN UND BEWEGUNGSZÜGE + Lektion 1.2.3: ÜBER OPERATOREN UND BEWEGUNGSZÜGE Viele Kommandos, die Text ändern, setzen sich aus einem Operator und einer @@ -253,7 +253,7 @@ Anmerkung: Drücken von bringt Dich in den Normalmodus oder bricht ein Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den Cursor entsprechend. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.4: ANWENDUNG EINES ZÄHLERS FÜR EINEN BEWEGUNGSSCHRITT + Lektion 1.2.4: ANWENDUNG EINES ZÄHLERS FÜR EINEN BEWEGUNGSSCHRITT ** Die Eingabe einer Zahl vor einem Bewegungsschritt wiederholt diesen. ** @@ -270,13 +270,13 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> Dies ist nur eine Zeile aus Wörtern, um sich darin herumzubewegen. - 6. Gehe weiter zu Lektion 2.5. + 6. Gehe weiter zu Lektion 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.5: ANWENDUNG EINES ZÄHLERS FÜR MEHRERE LÖSCHVORGÄNGE + Lektion 1.2.5: ANWENDUNG EINES ZÄHLERS FÜR MEHRERE LÖSCHVORGÄNGE ** Die Eingabe einer Zahl mit einem Operator wiederholt diesen mehrfach. ** @@ -298,7 +298,7 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.6: ARBEITEN AUF ZEILEN + Lektion 1.2.6: ARBEITEN AUF ZEILEN ** Tippe dd , um eine ganze Zeile zu löschen. ** @@ -321,7 +321,7 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> 7) So wie Du auch. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.7: RÜCKGÄNGIG MACHEN (UNDO) + Lektion 1.2.7: RÜCKGÄNGIG MACHEN (UNDO) ** Tippe u , um die letzten Kommandos rückgängig zu machen ** @@ -342,9 +342,9 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> Beehebe die Fehller diesser Zeile und sttelle sie mitt 'undo' wieder her. 8. Dies sind sehr nützliche Kommandos. Nun gehe weiter zur Zusammenfassung - von Lektion 2. + von Lektion 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 2 + ZUSAMMENFASSUNG VON LEKTION 1.2 1. Um vom Cursor bis zum nächsten Wort zu löschen, tippe: dw @@ -367,7 +367,7 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den Um die Rückgängigmachungen rückgängig zu machen, tippe: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.1: ANFÜGEN (PUT) + Lektion 1.3.1: ANFÜGEN (PUT) ** Tippe p , um vorher gelöschten Text nach dem Cursor anzufügen. ** @@ -390,7 +390,7 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> c) Intelligenz ist lernbar, ---> a) Rosen sind rot, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.2: ERSETZEN (REPLACE) + Lektion 1.3.2: ERSETZEN (REPLACE) ** Tippe rx , um das Zeichen unter dem Cursor durch x zu ersetzen. ** @@ -406,14 +406,14 @@ Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den ---> Alf diese Zeite eingegoben wurde, wurden einike falsche Tasten gelippt! ---> Als diese Zeile eingegeben wurde, wurden einige falsche Tasten getippt! - 5. Nun fahre fort mit Lektion 3.2. + 5. Nun fahre fort mit Lektion 1.3.2. Anmerkung: Erinnere Dich daran, dass Du durch Anwenden lernen solltest, nicht durch Auswendiglernen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.3: ÄNDERN (CHANGE) + Lektion 1.3.3: ÄNDERN (CHANGE) ** Um eine Änderung bis zum Wortende durchzuführen, tippe ce . ** @@ -436,7 +436,7 @@ Beachte, dass ce das Wort löscht und Dich in den Eingabemodus versetzt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.4: MEHR ÄNDERUNGEN MITTELS c + Lektion 1.3.4: MEHR ÄNDERUNGEN MITTELS c ** Das change-Kommando arbeitet mit denselben Bewegungen wie delete. ** @@ -459,7 +459,7 @@ Beachte, dass ce das Wort löscht und Dich in den Eingabemodus versetzt. Anmerkung: Du kannst die Rücktaste benutzen, um Tippfehler zu korrigieren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 3 + ZUSAMMENFASSUNG VON LEKTION 1.3 1. Um einen vorher gelöschten Text anzufügen, tippe p . Dies fügt den @@ -482,7 +482,7 @@ Anmerkung: Du kannst die Rücktaste benutzen, um Tippfehler zu korrigieren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.1: CURSORPOSITION UND DATEISTATUS + Lektion 1.4.1: CURSORPOSITION UND DATEISTATUS ** Tippe CTRL-G , um deine Dateiposition sowie den Dateistatus anzuzeigen. ** ** Tippe G , um Dich zu einer Zeile in der Datei zu begeben. ** @@ -506,7 +506,7 @@ Anmerkung: Möglicherweise siehst Du die Cursorposition in der unteren rechten 4. Wenn Du Dich sicher genug fühlst, führe die Schritte 1 bis 3 aus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.2: DAS SUCHEN - KOMMANDO + Lektion 1.4.2: DAS SUCHEN - KOMMANDO ** Tippe / gefolgt von einem Ausdruck, um nach dem Ausdruck zu suchen. ** @@ -529,7 +529,7 @@ Anmerkung: Möglicherweise siehst Du die Cursorposition in der unteren rechten Anmerkung: Wenn die Suche das Dateiende erreicht hat, wird sie am Anfang fortgesetzt, es sei denn, die 'wrapscan' Option wurde abgeschaltet. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.3: PASSENDE KLAMMERN FINDEN + Lektion 1.4.3: PASSENDE KLAMMERN FINDEN ** Tippe % , um eine gegenüberliegenden Klammer ),], oder } zu finden. ** @@ -552,7 +552,7 @@ Anmerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.4: DAS ERSETZUNGSKOMMANDO (SUBSTITUTE) + Lektion 1.4.4: DAS ERSETZUNGSKOMMANDO (SUBSTITUTE) ** Tippe :s/alt/neu/g , um 'alt' durch 'neu' zu ersetzen. ** @@ -575,7 +575,7 @@ Anmerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem Tippe :%s/alt/neu/gc um alle Vorkommen in der gesamten Datei zu finden mit einem Fragedialog, ob ersetzt werden soll oder nicht. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 4 + ZUSAMMENFASSUNG VON LEKTION 1.4 1. CTRL-G zeigt die aktuelle Dateiposition sowie den Dateistatus. G bringt Dich zum Ende der Datei. @@ -598,7 +598,7 @@ Anmerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem Um alle Vorkommen in der ganzen Datei zu ersetzen, tippe :%s/alt/neu/g Für eine jedesmalige Bestätigung, addiere 'c' (confirm) :%s/alt/neu/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.1: AUSFÜHREN EINES EXTERNEN KOMMANDOS + Lektion 1.5.1: AUSFÜHREN EINES EXTERNEN KOMMANDOS ** Gib :! , gefolgt von einem externen Kommando ein, um es auszuführen. ** @@ -621,7 +621,7 @@ Anmerkung: Alle : Kommandos müssen durch Eingabe von ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.2: MEHR ÜBER DAS SCHREIBEN VON DATEIEN + Lektion 1.5.2: MEHR ÜBER DAS SCHREIBEN VON DATEIEN ** Um am Text durchgeführte Änderungen zu speichern, tippe :w DATEINAME. ** @@ -644,7 +644,7 @@ Anmerkung: Würdest Du Vim jetzt beenden und danach wieder mit vim TEST 5. Nun entferne die Datei durch Eingabe von (MS-DOS): :!del TEST oder (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.3: AUSWÄHLEN VON TEXT ZUM SCHREIBEN + Lektion 1.5.3: AUSWÄHLEN VON TEXT ZUM SCHREIBEN ** Um einen Abschnitt der Datei zu speichern, tippe v Bewegung :w DATEI ** @@ -668,22 +668,22 @@ Hinweis: Drücken von v startet die Visuelle Auswahl. Du kannst den Cursor löscht d den Text. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.4: EINLESEN UND ZUSAMMENFÜHREN VON DATEIEN + Lektion 1.5.4: EINLESEN UND ZUSAMMENFÜHREN VON DATEIEN ** Um den Inhalt einer Datei einzulesen, tippe :r DATEINAME ** 1. Platziere den Cursor direkt über dieser Zeile. -BEACHTE: Nachdem Du Schritt 2 ausgeführt hast, wirst Du Text aus Lektion 5.3 - sehen. Dann bewege Dich wieder ABWÄRTS, Lektion 5.4 wiederzusehen. +BEACHTE: Nachdem Du Schritt 2 ausgeführt hast, wirst Du Text aus Lektion 1.5.3 + sehen. Dann bewege Dich wieder ABWÄRTS, Lektion 1.5.4 wiederzusehen. 2. Nun lies deine Datei TEST ein indem Du das Kommando :r TEST ausführst, wobei TEST der von Dir verwendete Dateiname ist. Die eingelesene Datei wird unterhalb der Cursorzeile eingefügt. 3. Um zu überprüfen, dass die Datei eingelesen wurde, gehe zurück und - beachte, dass es jetzt zwei Kopien von Lektion 5.3 gibt, das Original und + beachte, dass es jetzt zwei Kopien von Lektion 1.5.3 gibt, das Original und die eingefügte Dateiversion. Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum @@ -691,7 +691,7 @@ Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum sie unterhalb des Cursors. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 5 + ZUSAMMENFASSUNG VON LEKTION 1.5 1. :!Kommando führt ein externes Kommando aus. @@ -714,7 +714,7 @@ Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.1: ZEILEN ÖFFNEN (OPEN) + Lektion 1.6.1: ZEILEN ÖFFNEN (OPEN) ** Tippe o , um eine Zeile unterhalb des Cursors zu öffnen und Dich in ** @@ -737,7 +737,7 @@ Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.2: TEXT ANFÜGEN (APPEND) + Lektion 1.6.2: TEXT ANFÜGEN (APPEND) ** Tippe a , um Text NACH dem Cursor einzufügen. ** @@ -760,7 +760,7 @@ Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum Anmerkung: a, i und A gehen alle gleichermaßen in den Einfügemodus; der einzige Unterschied ist, wo die Zeichen eingefügt werden. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.3: EINE ANDERE ART DES ERSETZENS (REPLACE) + Lektion 1.6.3: EINE ANDERE ART DES ERSETZENS (REPLACE) ** Tippe ein großes R , um mehr als ein Zeichen zu ersetzen. ** @@ -783,7 +783,7 @@ Anmerkung: Der Ersetzungsmodus ist wie der Einfügemodus, aber jedes eingetippte Zeichen löscht ein vorhandenes Zeichen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.4: TEXT KOPIEREN UND EINFÜGEN + Lektion 1.6.4: TEXT KOPIEREN UND EINFÜGEN ** Benutze den y Operator, um Text zu kopieren; p , um ihn einzufügen ** @@ -806,7 +806,7 @@ Anmerkung: Der Ersetzungsmodus ist wie der Einfügemodus, aber jedes eingetippte Anmerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.5: OPTIONEN SETZEN + Lektion 1.6.5: OPTIONEN SETZEN ** Setze eine Option so, dass eine Suche oder Ersetzung Groß- ** ** und Kleinschreibung ignoriert ** @@ -829,7 +829,7 @@ Anmerkung: Um die Hervorhebung der Treffer zu entfernen, gib ein: :nohlsearch Anmerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze \c im Suchausdruck: /ignoriere\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 6 + ZUSAMMENFASSUNG VON LEKTION 1.6 1. Tippe o , um eine Zeile UNTER dem Cursor zu öffnen und den Einfügemodus zu starten @@ -852,7 +852,7 @@ Anmerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze \c 7. Stelle einer Option "no" voran, um sie abzuschalten: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.1 : AUFRUFEN VON HILFE + Lektion 1.7.1: AUFRUFEN VON HILFE ** Nutze das eingebaute Hilfesystem ** @@ -875,7 +875,7 @@ Anmerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze \c :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.2: ERSTELLE EIN START-SKRIPT + Lektion 1.7.2: ERSTELLE EIN START-SKRIPT ** Aktiviere die Features von Vim ** @@ -898,7 +898,7 @@ Anmerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze \c Du kannst all deine bevorzugten Optionen zu dieser "vimrc"-Datei zufügen. Für mehr Informationen tippe :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 7.3: VERVOLLSTÄNDIGEN + Lektion 1.7.3: VERVOLLSTÄNDIGEN ** Kommandozeilenvervollständigung mit CTRL-D und ** @@ -921,7 +921,7 @@ Anmerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze \c Anmerkung: Vervollständigung funktioniert für viele Kommandos. Probiere einfach CTRL-D und . Dies ist insbesondere nützlich für :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZUSAMMENFASSUNG VON LEKTION 7 + ZUSAMMENFASSUNG VON LEKTION 1.7 1. Tippe :help oder drücke oder , um ein Hilfefenster zu öffnen. diff --git a/usr/share/vim/vim91/tutor/tutor.el b/usr/share/vim/vim91/tutor/tutor1.el similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.el rename to usr/share/vim/vim91/tutor/tutor1.el index 9a2fd98c629..ede8f00ea1d 100644 --- a/usr/share/vim/vim91/tutor/tutor.el +++ b/usr/share/vim/vim91/tutor/tutor1.el @@ -22,10 +22,10 @@ , Caps-Lock j - 1.1 . + 1.1.1 . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.1: + 1.1.1: ** , h,j,k,l . ** ^ @@ -39,7 +39,7 @@ 2. (j) . ---> . - 3. , 1.2. + 3. , 1.1.2. : , . . @@ -48,7 +48,7 @@ , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.2: VIM + 1.1.2: VIM !! : , !! @@ -69,9 +69,9 @@ 4. , 1 3 . - 1.3. + 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.3: - + 1.1.3: - ** x . ** @@ -87,13 +87,13 @@ ---> The ccow jumpedd ovverr thhe mooon. - 5. , 1.4. + 5. , 1.1.4. : , , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.4: - + 1.1.4: - ** i . ** @@ -115,7 +115,7 @@ . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1 + 1.1 1. hjkl. @@ -135,10 +135,10 @@ : . - 2. + 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.1: + 1.2.1: ** dw . ** @@ -157,10 +157,10 @@ ---> There are a some words fun that don't belong paper in this sentence. 5. 3 4 - 2.2. + 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.2: + 1.2.2: ** d$ . ** @@ -174,7 +174,7 @@ ---> Somebody typed the end of this line twice. end of this line twice. - 5. 2.3 . + 5. 1.2.3 . @@ -183,7 +183,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.3: + 1.2.3: d : @@ -206,7 +206,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.4: '-' + 1.2.4: '-' ** dd . ** @@ -229,7 +229,7 @@ 7) And so are you. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.5: + 1.2.5: ** u , U . ** @@ -249,10 +249,10 @@ ---> Fiix the errors oon thhis line and reeplace them witth undo. 8. . - 2. + 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2 + 1.2 1. : dw @@ -275,7 +275,7 @@ , : CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.1: + 1.3.1: ** p . ** @@ -299,7 +299,7 @@ a) Roses are red, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.2: + 1.3.2: ** r @@ -316,13 +316,13 @@ ---> 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. + 5. 1.3.2. : , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.3: + 1.3.3: ** , cw . ** @@ -345,7 +345,7 @@ . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.4: c + 1.3.4: c ** . ** @@ -369,7 +369,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3 + 1.3 1. , p . @@ -392,7 +392,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.1: + 1.4.1: ** CTRL-g . @@ -415,7 +415,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.2: + 1.4.2: ** / . ** @@ -437,7 +437,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.3: + 1.4.3: ** % ), ], } . ** @@ -460,7 +460,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.4: + 1.4.4: ** :s/old/new/g 'new' 'old'. ** @@ -483,7 +483,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4 + 1.4 1. Ctrl-g . @@ -506,7 +506,7 @@ 'c' "%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.1: + 1.5.1: ** :! . ** @@ -529,7 +529,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.2: + 1.5.2: ** , :w . ** @@ -552,7 +552,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.3: + 1.5.3: ** , :#,# w ** @@ -575,7 +575,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.4: + 1.5.4: ** , :r ** @@ -584,7 +584,7 @@ 2. . -: 3 5.3. +: 3 1.5.3. . 3. TEST :r TEST @@ -594,11 +594,11 @@ . 4. , - 5.3, + 1.5.3, . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5 + 1.5 1. :! . @@ -621,7 +621,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.1: + 1.6.1: ** o @@ -644,7 +644,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.2: + 1.6.2: ** a . ** @@ -667,7 +667,7 @@ ---> This line will allow you to practice appending text to the end of a line. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.3: + 1.6.3: ** R . ** @@ -690,7 +690,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.4: + 1.6.4: ** @@ -713,7 +713,7 @@ /ignore ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6 + 1.6 1. o @@ -736,7 +736,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7: ON-LINE + 1.7: ON-LINE ** on-line ** @@ -759,7 +759,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 8: SCRIPT + 1.8: SCRIPT ** Vim ** diff --git a/usr/share/vim/vim91/tutor/tutor.el.cp737 b/usr/share/vim/vim91/tutor/tutor1.el.cp737 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.el.cp737 rename to usr/share/vim/vim91/tutor/tutor1.el.cp737 index 64833444b14..36c3ebbf778 100644 --- a/usr/share/vim/vim91/tutor/tutor.el.cp737 +++ b/usr/share/vim/vim91/tutor/tutor1.el.cp737 @@ -22,10 +22,10 @@ 騘, 嫜 櫠 㡫 Caps-Lock 夘 ⤦ 㩫 㡫 j 㩜 ⫩ - 驫 ៞ 1.1 婜 椞. + 驫 ៞ 1.1.1 婜 椞. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 1.1: + ៞ 1.1.1: ** 㩜 , 㩫 㡫 h,j,k,l 室. ** ^ @@ -39,7 +39,7 @@ 2. 㩫 ⤦ 㡫 (j) ⮨ . ---> 騘 ⨜ 嫜 棜 ៞. - 3. 餫 㡫, 嫜 ៞ 1.2. + 3. 餫 㡫, 嫜 ៞ 1.1.2. ਫ਼: ᢢ ᫠ 㩘, 㩫 嫜 ᩫ. 㩫 ⢘. @@ -48,7 +48,7 @@ 嫜 嫜 櫜, 梠 婜. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 1.2: VIM + ៞ 1.1.2: VIM !! : ⩜ ᧦ 㣘, ᩫ 梦 ៞!! @@ -69,9 +69,9 @@ 4. ⮜ 穜 㣘 ⮜ 埞, ⩫ 㣘 1 3 嫜 嫜 ᡫ. - 㩫 ៞ 1.3. + 㩫 ៞ 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 1.3: - + ៞ 1.1.3: - **  婫 ᩫ 㩫 x ᯜ 㨘 . ** @@ -87,13 +87,13 @@ ---> The ccow jumpedd ovverr thhe mooon. - 5. 騘 夘 ੫, 夫 ៞ 1.4. + 5. 騘 夘 ੫, 夫 ៞ 1.1.4. : ⮜ 㚞, 㩫 眫, 夜 㩞. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 1.4: - + ៞ 1.1.4: - **  婫 ᩫ 㩫 i ᢢ 壜. ** @@ -115,7 +115,7 @@ 增. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1 + 1.1 1. ☪ 嫘 餫 嫜 㡫 hjkl. @@ -135,10 +135,10 @@ : 餫 嫜 ᩫ 驜 磞 ⤞ . -騘 婫 ៞ 2. +騘 婫 ៞ 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 2.1: + ៞ 1.2.1: ** ᯫ dw ᯜ ⮨ ⢦ 嘪 ⥞. ** @@ -157,10 +157,10 @@ ---> There are a some words fun that don't belong paper in this sentence. 5. ᙜ 㣘 3 4 ⮨ 櫘 夘 ੫ - 夜 ៞ 2.2. + 夜 ៞ 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 2.2: + ៞ 1.2.2: ** 㩫 d$ ᯜ ⮨ ⢦ . ** @@ -174,7 +174,7 @@ ---> Somebody typed the end of this line twice. end of this line twice. - 5. 夜 ៞ 2.3 ᙜ 夜. + 5. 夜 ៞ 1.2.3 ᙜ 夜. @@ -183,7 +183,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 2.3: + ៞ 1.2.3: d 夘 : @@ -206,7 +206,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 2.4: '-' + ៞ 1.2.4: '-' ** 㩫 dd ᯜ 梞 . ** @@ -229,7 +229,7 @@ 7) And so are you. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 2.5: + ៞ 1.2.5: ** 㩫 u ⩜ 圪 , U 驜 梞 . ** @@ -249,10 +249,10 @@ ---> Fiix the errors oon thhis line and reeplace them witth undo. 8. 夘 㩠 . 騘 夜 - 增 㣘 2. + 增 㣘 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2 + 1.2 1. ᯜ ⮨ ⢦ ⥞ ᯫ: dw @@ -275,7 +275,7 @@ ⩜ ⩜, 㩫: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 3.1: + ៞ 1.3.1: ** 㩫 p 㩜 . ** @@ -299,7 +299,7 @@ a) Roses are red, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 3.2: + ៞ 1.3.2: ** 㩫 r 㨘 ᥜ 夘 @@ -316,13 +316,13 @@ ---> 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. + 5. 騘 夜 ៞ 1.3.2. : ᩫ 櫠 ⧜ 夜 㩞, 殠 検. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 3.3: + ៞ 1.3.3: ** ᥜ 㣘 梞 ⥞, 㩫 cw . ** @@ -345,7 +345,7 @@ 婞 . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 3.4: c + ៞ 1.3.4: c ** 嫘 因 壜 . ** @@ -369,7 +369,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3 + 1.3 1. 㩜 壜 梠 ⮜ , 㩫 p . @@ -392,7 +392,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 4.1: + ៞ 1.4.1: ** 㩫 CTRL-g ⩞ ᩫ . @@ -415,7 +415,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 4.2: + ៞ 1.4.2: ** 㩫 / 磜 ᩞ ᮤ. ** @@ -437,7 +437,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 4.3: + ៞ 1.4.3: ** 㩫 % 嫜 婫 ), ], } . ** @@ -460,7 +460,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 4.4: + ៞ 1.4.4: ** ᯫ :s/old/new/g ᥜ 'new' 'old'. ** @@ -483,7 +483,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4 + 1.4 1. Ctrl-g 坜 ⩞ ᩫ . @@ -506,7 +506,7 @@ 髞 ਫ਼ ៜ ⩫ ⤘ 'c' "%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 5.1: + ៞ 1.5.1: ** ᯫ :! 磜 ૜ ⩜. ** @@ -529,7 +529,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 5.2: + ៞ 1.5.2: ** 驜 ᚜ ᤘ , ᯫ :w . ** @@ -552,7 +552,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 5.3: + ៞ 1.5.3: ** 驜 㣘 妬, ᯫ :#,# w ** @@ -575,7 +575,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 5.4: + ៞ 1.5.4: ** ᚜ 棜 妬, ᯫ :r ** @@ -584,7 +584,7 @@ 2. 㩫 ⨦ 囘. -: 櫦 ⩜ 㣘 3 嫜 ៞ 5.3. +: 櫦 ⩜ 㣘 3 嫜 ៞ 1.5.3. 嫜 ៞ . 3. 騘 㩫 TEST 餫 :r TEST @@ -594,11 +594,11 @@ ☪. 4. 穜 櫠 㟞, - 㩫 櫠 ᨮ 騘 嚨 㣘 5.3, + 㩫 櫠 ᨮ 騘 嚨 㣘 1.5.3, ⡛ 妬. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5 + 1.5 1. :! ૜ . @@ -621,7 +621,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 6.1: + ៞ 1.6.1: ** 㩫 o 奜 @@ -644,7 +644,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 6.2: + ៞ 1.6.2: ** 㩫 a ᚜ 壜 . ** @@ -667,7 +667,7 @@ ---> This line will allow you to practice appending text to the end of a line. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 6.3: + ៞ 1.6.3: ** 㩫 R ᥜ 櫜 ⤘ 㨜. ** @@ -690,7 +690,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ៞ 6.4: + ៞ 1.6.4: ** 婫 ⫩ 驫 㫞 ᩫ @@ -713,7 +713,7 @@ /ignore ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6 + 1.6 1. 餫 o 嚜 @@ -736,7 +736,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7: ON-LINE + 1.7: ON-LINE ** 㩫 on-line 穫 㟜 ** @@ -759,7 +759,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 8: SCRIPT + 1.8: SCRIPT ** 㩫 Vim ** diff --git a/usr/share/vim/vim91/tutor/tutor.el.utf-8 b/usr/share/vim/vim91/tutor/tutor1.el.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.el.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.el.utf-8 index 7cb97412934..a2e1ee896b7 100644 --- a/usr/share/vim/vim91/tutor/tutor.el.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.el.utf-8 @@ -22,10 +22,10 @@ Τώρα, βεβαιωθείτε ότι το πλήκτρο Caps-Lock ΔΕΝ είναι πατημένο και πατήστε το πλήκτρο j αρκετές φορές για να μετακινήσετε τον δρομέα έτσι - ώστε το Μάθημα 1.1 να γεμίσει πλήρως την οθόνη. + ώστε το Μάθημα 1.1.1 να γεμίσει πλήρως την οθόνη. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 1.1: ΜΕΤΑΚΙΝΟΝΤΑΣ ΤΟΝ ΔΡΟΜΕΑ + Μάθημα 1.1.1: ΜΕΤΑΚΙΝΟΝΤΑΣ ΤΟΝ ΔΡΟΜΕΑ ** Για να κινήσετε τον δρομέα, πατήστε τα πλήκτρα h,j,k,l όπως δείχνεται. ** ^ @@ -39,7 +39,7 @@ 2. Κρατήστε πατημένο το κάτω πλήκτρο (j) μέχρι να επαναληφθεί. ---> Τώρα ξέρετε πώς να μετακινηθείτε στο επόμενο μάθημα. - 3. Χρησιμοποιώντας το κάτω πλήκτρο, μετακινηθείτε στο Μάθημα 1.2. + 3. Χρησιμοποιώντας το κάτω πλήκτρο, μετακινηθείτε στο Μάθημα 1.1.2. Σημείωση: Αν αμφιβάλλετε για κάτι που πατήσατε, πατήστε για να βρεθείτε στην Κανονική Κατάσταση. Μετά πατήστε ξανά την εντολή που θέλατε. @@ -48,7 +48,7 @@ θα μπορείτε να κινηθείτε πολύ γρηγορότερα, μόλις τα συνηθίσετε. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 1.2: ΜΠΑΙΝΟΝΤΑΣ ΚΑΙ ΒΓΑΙΝΟΝΤΑΣ ΣΤΟΝ VIM + Μάθημα 1.1.2: ΜΠΑΙΝΟΝΤΑΣ ΚΑΙ ΒΓΑΙΝΟΝΤΑΣ ΣΤΟΝ VIM !! ΣΗΜΕΙΩΣΗ: Πριν εκτελέσετε κάποιο από τα βήματα, διαβάστε όλο το μάθημα!! @@ -69,9 +69,9 @@ 4. Αν έχετε απομνημονεύσει αυτά τα βήματα και έχετε αυτοπεποίθηση, εκτελέστε τα βήματα 1 έως 3 για να βγείτε και να μπείτε ξανά στον συντάκτη. Μετά - μετακινήστε τον δρομέα κάτω στο Μάθημα 1.3. + μετακινήστε τον δρομέα κάτω στο Μάθημα 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 1.3: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕΝΟΥ - ΔΙΑΓΡΑΦΗ + Μάθημα 1.1.3: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕΝΟΥ - ΔΙΑΓΡΑΦΗ ** Όσο είστε στην Κανονική Κατάσταση πατήστε x για να διαγράψετε τον χαρακτήρα κάτω από τον δρομέα. ** @@ -87,13 +87,13 @@ ---> The ccow jumpedd ovverr thhe mooon. - 5. Τώρα που η γραμμή είναι σωστή, πηγαίντε στο Μάθημα 1.4. + 5. Τώρα που η γραμμή είναι σωστή, πηγαίντε στο Μάθημα 1.1.4. ΣΗΜΕΙΩΣΗ: Καθώς διατρέχετε αυτήν την περιήγηση, προσπαθήστε να μην απομνημονεύετε, μαθαίνετε με τη χρήση. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 1.4: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕΝΟΥ - ΠΑΡΕΜΒΟΛΗ + Μάθημα 1.1.4: ΔΙΟΡΘΩΣΗ ΚΕΙΜΕΝΟΥ - ΠΑΡΕΜΒΟΛΗ ** Όσο είστε σε Κανονική Κατάσταση πατήστε i για να παρεμβάλλετε κείμενο. ** @@ -115,7 +115,7 @@ παρακάτω περίληψη. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ΜΑΘΗΜΑ 1 ΠΕΡΙΛΗΨΗ + ΜΑΘΗΜΑ 1.1 ΠΕΡΙΛΗΨΗ 1. Ο δρομέας κινείται χρησιμοποιώντας είτε τα πλήκτρα δρομέα ή τα hjkl. @@ -135,10 +135,10 @@ ΣΗΜΕΙΩΣΗ: Πατώντας θα τοποθετηθείτε στην Κανονική Κατάσταση ή θα ακυρώσετε μία ανεπιθύμητη και μερικώς ολοκληρωμένη εντολή. -Τώρα συνεχίστε με το Μάθημα 2. +Τώρα συνεχίστε με το Μάθημα 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 2.1: ΕΝΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ + Μάθημα 1.2.1: ΕΝΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ ** Γράψτε dw για να διαγράψετε μέχρι το τέλος μίας λέξης. ** @@ -157,10 +157,10 @@ ---> There are a some words fun that don't belong paper in this sentence. 5. Επαναλάβετε τα βήματα 3 και 4 μέχρι η πρόταση να είναι σωστή και - πηγαίνετε στο Μάθημα 2.2. + πηγαίνετε στο Μάθημα 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 2.2: ΠΕΡΙΣΣΟΤΕΡΕΣ ΕΝΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ + Μάθημα 1.2.2: ΠΕΡΙΣΣΟΤΕΡΕΣ ΕΝΤΟΛΕΣ ΔΙΑΓΡΑΦΗΣ ** Πληκτρολογήστε d$ για να διαγράψετε μέχρι το τέλος της γραμμής. ** @@ -174,7 +174,7 @@ ---> Somebody typed the end of this line twice. end of this line twice. - 5. Πηγαίνετε στο Μάθημα 2.3 για να καταλάβετε τι συμβαίνει. + 5. Πηγαίνετε στο Μάθημα 1.2.3 για να καταλάβετε τι συμβαίνει. @@ -183,7 +183,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 2.3: ΠΕΡΙ ΕΝΤΟΛΩΝ ΚΑΙ ΑΝΤΙΚΕΙΜΕΝΩΝ + Μάθημα 1.2.3: ΠΕΡΙ ΕΝΤΟΛΩΝ ΚΑΙ ΑΝΤΙΚΕΙΜΕΝΩΝ Η μορφή της εντολής διαγραφής d είναι ως εξής: @@ -206,7 +206,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 2.4: ΜΙΑ ΕΞΑΙΡΕΣΗ ΣΤΗΝ 'ΕΝΤΟΛΗ-ΑΝΤΙΚΕΙΜΕΝΟ' + Μάθημα 1.2.4: ΜΙΑ ΕΞΑΙΡΕΣΗ ΣΤΗΝ 'ΕΝΤΟΛΗ-ΑΝΤΙΚΕΙΜΕΝΟ' ** Πληκτρολογήστε dd για να διαγράψετε όλη τη γραμμή. ** @@ -229,7 +229,7 @@ 7) And so are you. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 2.5: Η ΕΝΤΟΛΗ ΑΝΑΙΡΕΣΗΣ + Μάθημα 1.2.5: Η ΕΝΤΟΛΗ ΑΝΑΙΡΕΣΗΣ ** Πατήστε u για να αναιρέσετε τις τελευταίες εντολές, U για να διορθώσετε όλη τη γραμμή. ** @@ -249,10 +249,10 @@ ---> Fiix the errors oon thhis line and reeplace them witth undo. 8. Αυτές είναι πολύ χρήσιμες εντολές. Τώρα πηγαίνετε στην - Περίληψη του Μαθήματος 2. + Περίληψη του Μαθήματος 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ΜΑΘΗΜΑ 2 ΠΕΡΙΛΗΨΗ + ΜΑΘΗΜΑ 1.2 ΠΕΡΙΛΗΨΗ 1. Για να διαγράψετε από τον δρομέα μέχρι το τέλος λέξης γράψτε: dw @@ -275,7 +275,7 @@ Για να αναιρέσετε τις αναιρέσεις, πατήστε: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 3.1: Η ΕΝΤΟΛΗ ΤΟΠΟΘΕΤΗΣΗΣ + Μάθημα 1.3.1: Η ΕΝΤΟΛΗ ΤΟΠΟΘΕΤΗΣΗΣ ** Πατήστε p για να τοποθετήσετε την τελευταία διαγραφή μετά τον δρομέα. ** @@ -299,7 +299,7 @@ a) Roses are red, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 3.2: Η ΕΝΤΟΛΗ ΑΝΤΙΚΑΤΑΣΤΑΣΗΣ + Μάθημα 1.3.2: Η ΕΝΤΟΛΗ ΑΝΤΙΚΑΤΑΣΤΑΣΗΣ ** Πατήστε r και χαρακτήρα για να αλλάξετε αυτόν που είναι @@ -316,13 +316,13 @@ ---> 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. + 5. Τώρα πηγαίνετε στο Μάθημα 1.3.2. ΣΗΜΕΙΩΣΗ: Να θυμάστε ότι πρέπει να μαθαίνετε με τη χρήση, και όχι με την απομνημόνευση. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 3.3: Η ΕΝΤΟΛΗ ΑΛΛΑΓΗΣ + Μάθημα 1.3.3: Η ΕΝΤΟΛΗ ΑΛΛΑΓΗΣ ** Για να αλλάξετε τμήμα ή όλη τη λέξη, πατήστε cw . ** @@ -345,7 +345,7 @@ επίσης σε παρεμβολή. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 3.4: ΠΕΡΙΣΣΟΤΕΡΕΣ ΑΛΛΑΓΕΣ ΜΕ c + Μάθημα 1.3.4: ΠΕΡΙΣΣΟΤΕΡΕΣ ΑΛΛΑΓΕΣ ΜΕ c ** Η εντολή αλλαγής χρησιμοποιείται με τα ίδια αντικείμενα της διαγραφής. ** @@ -369,7 +369,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ΜΑΘΗΜΑ 3 ΠΕΡΙΛΗΨΗ + ΜΑΘΗΜΑ 1.3 ΠΕΡΙΛΗΨΗ 1. Για να τοποθετήσετε κείμενο που μόλις έχει διαγραφεί, πατήστε p . @@ -392,7 +392,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 4.1: ΘΕΣΗ ΚΑΙ ΚΑΤΑΣΤΑΣΗ ΑΡΧΕΙΟΥ + Μάθημα 1.4.1: ΘΕΣΗ ΚΑΙ ΚΑΤΑΣΤΑΣΗ ΑΡΧΕΙΟΥ ** Πατήστε CTRL-g για να εμφανιστεί η θέση σας στο αρχείο και η κατάστασή του. @@ -415,7 +415,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 4.2: Η ΕΝΤΟΛΗ ΑΝΑΖΗΤΗΣΗΣ + Μάθημα 1.4.2: Η ΕΝΤΟΛΗ ΑΝΑΖΗΤΗΣΗΣ ** Πατήστε / ακολουθούμενο από τη φράση που ψάχνετε. ** @@ -437,7 +437,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 4.3: ΕΥΡΕΣΗ ΤΑΙΡΙΑΣΤΩΝ ΠΑΡΕΝΘΕΣΕΩΝ + Μάθημα 1.4.3: ΕΥΡΕΣΗ ΤΑΙΡΙΑΣΤΩΝ ΠΑΡΕΝΘΕΣΕΩΝ ** Πατήστε % για να βρείτε την αντίστοιχη ), ], ή } . ** @@ -460,7 +460,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 4.4: ΕΝΑΣ ΤΡΟΠΟΣ ΓΙΑ ΑΛΛΑΓΗ ΛΑΘΩΝ + Μάθημα 1.4.4: ΕΝΑΣ ΤΡΟΠΟΣ ΓΙΑ ΑΛΛΑΓΗ ΛΑΘΩΝ ** Γράψτε :s/old/new/g για να αλλάξετε το 'new' με το 'old'. ** @@ -483,7 +483,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ΜΑΘΗΜΑ 4 ΠΕΡΙΛΗΨΗ + ΜΑΘΗΜΑ 1.4 ΠΕΡΙΛΗΨΗ 1. Το Ctrl-g εμφανίζει τη θέση σας στο αρχείο και την κατάστασή του. @@ -506,7 +506,7 @@ Για ερώτηση επιβεβαίωσης κάθε φορά προσθέστε ένα 'c' "%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 5.1: ΠΩΣ ΕΚΤΕΛΩ ΜΙΑ ΕΞΩΤΕΡΙΚΗ ΕΝΤΟΛΗ + Μάθημα 1.5.1: ΠΩΣ ΕΚΤΕΛΩ ΜΙΑ ΕΞΩΤΕΡΙΚΗ ΕΝΤΟΛΗ ** Γράψτε :! ακολουθούμενο από μία εξωτερική εντολή για να την εκτελέσετε. ** @@ -529,7 +529,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 5.2: ΠΕΡΙΣΣΟΤΕΡΑ ΠΕΡΙ ΕΓΓΡΑΦΗΣ ΑΡΧΕΙΩΝ + Μάθημα 1.5.2: ΠΕΡΙΣΣΟΤΕΡΑ ΠΕΡΙ ΕΓΓΡΑΦΗΣ ΑΡΧΕΙΩΝ ** Για να σώσετε τις αλλάγες που κάνατε στο αρχείο, γράψτε :w ΑΡΧΕΙΟ. ** @@ -552,7 +552,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 5.3: ΕΠΙΛΕΚΤΙΚΗ ΕΝΤΟΛΗ ΕΓΓΡΑΦΗΣ + Μάθημα 1.5.3: ΕΠΙΛΕΚΤΙΚΗ ΕΝΤΟΛΗ ΕΓΓΡΑΦΗΣ ** Για να σώσετε τμήμα του αρχείου, γράψτε :#,# w ΑΡΧΕΙΟ ** @@ -575,7 +575,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 5.4: ΑΝΑΚΤΩΝΤΑΣ ΚΑΙ ΕΝΩΝΟΝΤΑΣ ΑΡΧΕΙΑ + Μάθημα 1.5.4: ΑΝΑΚΤΩΝΤΑΣ ΚΑΙ ΕΝΩΝΟΝΤΑΣ ΑΡΧΕΙΑ ** Για να εισάγετε τα περιεχόμενα ενός αρχείου, γράψτε :r ΑΡΧΕΙΟ ** @@ -584,7 +584,7 @@ 2. Τοποθετήστε τον δρομέα στο πάνω μέρος της σελίδας. -ΣΗΜΕΙΩΣΗ: Αφότου εκτελέσετε το Βήμα 3 θα δείτε το Μάθημα 5.3. +ΣΗΜΕΙΩΣΗ: Αφότου εκτελέσετε το Βήμα 3 θα δείτε το Μάθημα 1.5.3. Μετά κινηθείτε ΚΑΤΩ ξανά προς το μάθημα αυτό. 3. Τώρα ανακτήστε το αρχείο σας TEST χρησιμοποιώντας την εντολή :r TEST @@ -594,11 +594,11 @@ ο δρομέας. 4. Για να επαληθεύσετε ότι το αρχείο ανακτήθηκε, πίσω τον δρομέα και - παρατηρήστε ότι υπάρχουν τώρα δύο αντίγραφα του Μαθήματος 5.3, το + παρατηρήστε ότι υπάρχουν τώρα δύο αντίγραφα του Μαθήματος 1.5.3, το αρχικό και η έκδοση του αρχείου. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ΜΑΘΗΜΑ 5 ΠΕΡΙΛΗΨΗ + ΜΑΘΗΜΑ 1.5 ΠΕΡΙΛΗΨΗ 1. :!εντολή εκτελεί μία εξωτερική εντολή. @@ -621,7 +621,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 6.1: Η ΕΝΤΟΛΗ ΑΝΟΙΓΜΑΤΟΣ + Μάθημα 1.6.1: Η ΕΝΤΟΛΗ ΑΝΟΙΓΜΑΤΟΣ ** Πατήστε o για να ανοίξετε μία γραμμή κάτω από τον δρομέα και να @@ -644,7 +644,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 6.2: Η ΕΝΤΟΛΗ ΠΡΟΣΘΗΚΗΣ + Μάθημα 1.6.2: Η ΕΝΤΟΛΗ ΠΡΟΣΘΗΚΗΣ ** Πατήστε a για να εισάγετε κείμενο ΜΕΤΑ τον δρομέα. ** @@ -667,7 +667,7 @@ ---> This line will allow you to practice appending text to the end of a line. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 6.3: ΑΛΛΗ ΕΚΔΟΣΗ ΤΗΣ ΑΝΤΙΚΑΤΑΣΤΑΣΗΣ + Μάθημα 1.6.3: ΑΛΛΗ ΕΚΔΟΣΗ ΤΗΣ ΑΝΤΙΚΑΤΑΣΤΑΣΗΣ ** Πατήστε κεφαλαίο R για να αλλάξετε περισσότερους από έναν χαρακτήρες. ** @@ -690,7 +690,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Μάθημα 6.4: ΡΥΘΜΙΣΗ ΕΠΙΛΟΓΗΣ + Μάθημα 1.6.4: ΡΥΘΜΙΣΗ ΕΠΙΛΟΓΗΣ ** Ρυθμίστε μία επιλογή έτσι ώστε η αναζήτηση ή η αντικατάσταση να αγνοεί @@ -713,7 +713,7 @@ /ignore ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ΜΑΘΗΜΑ 6 ΠΕΡΙΛΗΨΗ + ΜΑΘΗΜΑ 1.6 ΠΕΡΙΛΗΨΗ 1. Πατώντας o ανοίγει μία γραμμή ΚΑΤΩ από τον δρομέα και τοποθετεί τον @@ -736,7 +736,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ΜΑΘΗΜΑ 7: ON-LINE ΕΝΤΟΛΕΣ ΒΟΗΘΕΙΑΣ + ΜΑΘΗΜΑ 1.7: ON-LINE ΕΝΤΟΛΕΣ ΒΟΗΘΕΙΑΣ ** Χρησιμοποιήστε το on-line σύστημα βοήθειας ** @@ -759,7 +759,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ΜΑΘΗΜΑ 8: ΔΗΜΙΟΥΡΓΗΣΤΕ ΕΝΑ SCRIPT ΕΚΚΙΝΗΣΗΣ + ΜΑΘΗΜΑ 1.8: ΔΗΜΙΟΥΡΓΗΣΤΕ ΕΝΑ SCRIPT ΕΚΚΙΝΗΣΗΣ ** Ενεργοποιήστε χαρακτηριστικά του Vim ** diff --git a/usr/share/vim/vim91/tutor/tutor.eo b/usr/share/vim/vim91/tutor/tutor1.eo similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.eo rename to usr/share/vim/vim91/tutor/tutor1.eo index b33699e04bc..6af741ed514 100644 --- a/usr/share/vim/vim91/tutor/tutor.eo +++ b/usr/share/vim/vim91/tutor/tutor1.eo @@ -23,7 +23,7 @@ ke la leciono 1.1 plenigu la ekranon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.1: MOVI LA KURSORON + Leciono 1.1.1: MOVI LA KURSORON ** Por movi la kursoron, premu la h,j,k,l klavojn kiel montrite. ** @@ -46,7 +46,7 @@ RIMARKO: La klavoj de la kursoro devus anka vi kapablos movii pli rapide post kiam vi kutimios. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.2: ELIRI EL VIM + Leciono 1.1.2: ELIRI EL VIM !! RIMARKO: Anta ol plenumi iujn subajn paojn ajn, legu la tutan lecionon!! @@ -68,7 +68,7 @@ RIMARKO: :q! eliras sen konservi la 5. Movu la kursoron suben is la leciono 1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.3: REDAKTO DE TEKSTO - FORVIO + Leciono 1.1.3: REDAKTO DE TEKSTO - FORVIO ** Premu x por forvii la signon sub la kursoro. ** @@ -92,7 +92,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.4: REDAKTO DE TEKSTO - ENMETO + Leciono 1.1.4: REDAKTO DE TEKSTO - ENMETO ** Premu i por enmeti tekston. ** @@ -116,7 +116,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.5: REDAKTO DE TEKSTO - POSTALDONO + Leciono 1.1.5: REDAKTO DE TEKSTO - POSTALDONO ** Premu A por postaldoni tekston. ** @@ -142,13 +142,13 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.6: REDAKTI DOSIERON + Leciono 1.1.6: REDAKTI DOSIERON ** Uzu :wq por konservi dosieron kaj eliri. ** !! RIMARKO: Anta ol plenumi iun suban paon ajn, legu la tutan lecionon!! - 1. Eliru el la instruilo kiel vi faris en la leciono 1.2: :q! + 1. Eliru el la instruilo kiel vi faris en la leciono 1.1.2: :q! A, se vi havas atingon al alia terminalo, faru tion, kio sekvas tie. 2. e la elinvito, tajpu i tiun komandon: vim tutor @@ -167,7 +167,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1 RESUMO + Leciono 1.1 RESUMO 1. La kursoro movias a per la sagoklavoj, a per la klavoj hjkl. @@ -193,7 +193,7 @@ Nun da ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.1: KOMANDOJ DE FORVIO + Leciono 1.2.1: KOMANDOJ DE FORVIO ** Tajpu dw por forvii vorton. ** @@ -218,7 +218,7 @@ Nun da ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.2: PLIAJ KOMANDOJ DE FORVIO + Leciono 1.2.2: PLIAJ KOMANDOJ DE FORVIO ** Tajpu d$ por forvii la finon de la linio. ** @@ -239,7 +239,7 @@ Nun da ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.3: PRI OPERATOROJ KAJ MOVOJ + Leciono 1.2.3: PRI OPERATOROJ KAJ MOVOJ Multaj komandoj, kiuj anas la tekston, estas faritaj de operatoro kaj @@ -264,7 +264,7 @@ RIMARKO: Premo de nur la movo en Normala re ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.4: UZI NOMBRON POR MOVO + Leciono 1.2.4: UZI NOMBRON POR MOVO ** Tajpo de nombro anta movo ripetas in lafoje. ** @@ -285,7 +285,7 @@ RIMARKO: Premo de nur la movo en Normala re ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.5: UZI NOMBRON POR FORVII PLI + Leciono 1.2.5: UZI NOMBRON POR FORVII PLI ** Tajpo de nombro kun operatoro ripetas in lafoje. ** @@ -305,7 +305,7 @@ RIMARKO: Premo de nur la movo en Normala re ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.6: OPERACII SUR LINIOJ + Leciono 1.2.6: OPERACII SUR LINIOJ ** Tajpu dd por forvii tutan linion. ** @@ -328,7 +328,7 @@ RIMARKO: Premo de nur la movo en Normala re ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.7: LA KOMANDO DE MALFARO + Leciono 1.2.7: LA KOMANDO DE MALFARO ** Premu u por malfari la lastajn komandojn, U por ripari la tutan linion. ** @@ -345,11 +345,11 @@ RIMARKO: Premo de nur la movo en Normala re ---> Koorektii la erarojn sur tiuu i liniio kaj remettu illlin per malfaro. - 8. Tiuj estas tre utilaj komandoj. Nun moviu al la leciono 2 RESUMO. + 8. Tiuj estas tre utilaj komandoj. Nun moviu al la leciono 1.2 RESUMO. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2 RESUMO + Leciono 1.2 RESUMO 1. Por forvii ekde la kursoro is la sekvanta vorto, tajpu: dw @@ -463,7 +463,7 @@ RIMARKO: Vi povas uzi la klavon Retropa ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 3 RESUMO + Leciono 1.3 RESUMO 1. Por remeti tekston, kiun vi us forviis, tajpu p. Tio metas la @@ -485,7 +485,7 @@ Nun da ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4.1: POZICIO DE KURSORO KAJ STATO DE DOSIERO + Leciono 1.4.1: POZICIO DE KURSORO KAJ STATO DE DOSIERO ** Tajpu CTRL-G por montri vian pozicion en la dosiero kaj la dosierstaton. @@ -511,7 +511,7 @@ Nun da ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4.2 LA KOMANDO DE SERO + Leciono 1.4.2: LA KOMANDO DE SERO ** Tajpu / kaj poste frazon por seri la frazon. ** @@ -537,7 +537,7 @@ RIMARKO: Kiam la ser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4.3 SERO DE KONGRUAJ KRAMPOJ + Leciono 1.4.3: SERO DE KONGRUAJ KRAMPOJ ** Tajpu % por trovi kongruan ), ] a } ** @@ -557,7 +557,7 @@ RIMARKO: Kiam la ser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4.4 LA KOMANDO DE ANSTATAIGO + Leciono 1.4.4: LA KOMANDO DE ANSTATAIGO ** Tajpu :s/malnova/nova/g por anstataigi 'nova' per 'malnova'. ** @@ -585,7 +585,7 @@ RIMARKO: Kiam la ser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4 RESUMO + Leciono 1.4 RESUMO 1. CTRL-G vidigas vian pozicion en la dosiero kaj la staton de la dosiero. G movas la kursoron al la fino de la dosiero. @@ -609,7 +609,7 @@ RIMARKO: Kiam la ser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5.1 KIEL PLENUMI EKSTERAN KOMANDON + Leciono 1.5.1: KIEL PLENUMI EKSTERAN KOMANDON ** Tajpu :! sekvata de ekstera komando por plenumi la komandon. ** @@ -632,7 +632,7 @@ RIMARKO: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5.2 PLI PRI KONSERVO DE DOSIERO + Leciono 1.5.2: PLI PRI KONSERVO DE DOSIERO ** Por konservi la faritajn anojn en la teksto, tajpu :w DOSIERNOMO. ** @@ -657,7 +657,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5.3 APARTIGI KONSERVENDAN TESTON + Leciono 1.5.3: APARTIGI KONSERVENDAN TESTON ** Por konservi parton de la dosiero, tajpu v movo :w DOSIERNOMO ** @@ -683,7 +683,7 @@ RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5.4 AKIRI KAJ KUNFANDI DOSIEROJN + Leciono 1.5.4: AKIRI KAJ KUNFANDI DOSIEROJN ** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON ** @@ -707,7 +707,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5 RESUMO + Leciono 1.5 RESUMO 1. :!komando plenumas eksteran komandon. @@ -731,7 +731,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.1 LA KOMANDO DE MALFERMO + Leciono 1.6.1: LA KOMANDO DE MALFERMO ** Tajpu o por malfermi linion sub la kursoro kaj eniri Enmetan reimon. ** @@ -753,7 +753,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.2 LA KOMANDO DE POSTALDONO + Leciono 1.6.2: LA KOMANDO DE POSTALDONO ** Tajpu a por enmeti POST la kursoro. ** @@ -778,7 +778,7 @@ RIMARKO: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.3 ALIA MANIERO POR ANSTATAIGI + Leciono 1.6.3: ALIA MANIERO POR ANSTATAIGI ** Tajpu majusklan R por anstataigi pli ol unu signo. ** @@ -802,7 +802,7 @@ RIMARKO: Anstata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.4 KOPII KAJ ALGLUI TEKSTON + Leciono 1.6.4: KOPII KAJ ALGLUI TEKSTON ** Uzu la y operatoron por kopii tekston, kaj p por alglui in ** @@ -829,7 +829,7 @@ RIMARKO: vi povas anka ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.5 AGORDI OPCION + Leciono 1.6.5: AGORDI OPCION ** Agordu opcion por ke sero a anstataigo ignoru usklecon ** @@ -854,7 +854,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu ser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6 RESUMO + Leciono 1.6 RESUMO 1. Tajpu o por malfermi linion SUB la kursoro kaj eki en Enmeta reimo. 1. Tajpu O por malfermi linion SUPER la kursoro. @@ -879,7 +879,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu ser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 7.1 AKIRI HELPON + Leciono 1.7.1: AKIRI HELPON ** Uzu la helpan sistemon ** @@ -904,7 +904,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu ser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 7.2 KREI STARTAN SKRIPTON + Leciono 1.7.2: KREI STARTAN SKRIPTON ** Ebligu kapablojn de Vim ** @@ -928,7 +928,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu ser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 7.3 KOMPLETIGO + Leciono 1.7.3: KOMPLETIGO ** Kompletigo de komanda linio per CTRL-D kaj ** @@ -951,7 +951,7 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj . Estas aparte utila por :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 7 RESUMO + Leciono 1.7 RESUMO 1. Tajpu :help a premu a por malfermi helpan fenestron. diff --git a/usr/share/vim/vim91/tutor/tutor.eo.utf-8 b/usr/share/vim/vim91/tutor/tutor1.eo.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.eo.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.eo.utf-8 index 1feeeb93fe3..52daa8fc70b 100644 --- a/usr/share/vim/vim91/tutor/tutor.eo.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.eo.utf-8 @@ -23,7 +23,7 @@ ke la leciono 1.1 plenigu la ekranon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.1: MOVI LA KURSORON + Leciono 1.1.1: MOVI LA KURSORON ** Por movi la kursoron, premu la h,j,k,l klavojn kiel montrite. ** @@ -46,7 +46,7 @@ RIMARKO: La klavoj de la kursoro devus ankaŭ funkcii. Sed uzante hjkl, vi kapablos moviĝi pli rapide post kiam vi kutimiĝos. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.2: ELIRI EL VIM + Leciono 1.1.2: ELIRI EL VIM !! RIMARKO: Antaŭ ol plenumi iujn subajn paŝojn ajn, legu la tutan lecionon!! @@ -68,7 +68,7 @@ RIMARKO: :q! eliras sen konservi la ŝanĝojn, kiujn vi faris. 5. Movu la kursoron suben ĝis la leciono 1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.3: REDAKTO DE TEKSTO - FORVIŜO + Leciono 1.1.3: REDAKTO DE TEKSTO - FORVIŜO ** Premu x por forviŝi la signon sub la kursoro. ** @@ -92,7 +92,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.4: REDAKTO DE TEKSTO - ENMETO + Leciono 1.1.4: REDAKTO DE TEKSTO - ENMETO ** Premu i por enmeti tekston. ** @@ -116,7 +116,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.5: REDAKTO DE TEKSTO - POSTALDONO + Leciono 1.1.5: REDAKTO DE TEKSTO - POSTALDONO ** Premu A por postaldoni tekston. ** @@ -142,13 +142,13 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1.6: REDAKTI DOSIERON + Leciono 1.1.6: REDAKTI DOSIERON ** Uzu :wq por konservi dosieron kaj eliri. ** !! RIMARKO: Antaŭ ol plenumi iun suban paŝon ajn, legu la tutan lecionon!! - 1. Eliru el la instruilo kiel vi faris en la leciono 1.2: :q! + 1. Eliru el la instruilo kiel vi faris en la leciono 1.1.2: :q! Aŭ, se vi havas atingon al alia terminalo, faru tion, kio sekvas tie. 2. Ĉe la ŝelinvito, tajpu ĉi tiun komandon: vim tutor @@ -167,7 +167,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 1 RESUMO + Leciono 1.1 RESUMO 1. La kursoro moviĝas aŭ per la sagoklavoj, aŭ per la klavoj hjkl. @@ -193,7 +193,7 @@ Nun daŭrigu al la leciono 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.1: KOMANDOJ DE FORVIŜO + Leciono 1.2.1: KOMANDOJ DE FORVIŜO ** Tajpu dw por forviŝi vorton. ** @@ -218,7 +218,7 @@ Nun daŭrigu al la leciono 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.2: PLIAJ KOMANDOJ DE FORVIŜO + Leciono 1.2.2: PLIAJ KOMANDOJ DE FORVIŜO ** Tajpu d$ por forviŝi la finon de la linio. ** @@ -239,7 +239,7 @@ Nun daŭrigu al la leciono 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.3: PRI OPERATOROJ KAJ MOVOJ + Leciono 1.2.3: PRI OPERATOROJ KAJ MOVOJ Multaj komandoj, kiuj ŝanĝas la tekston, estas faritaj de operatoro kaj @@ -264,7 +264,7 @@ RIMARKO: Premo de nur la movo en Normala reĝimo sen operatoro movos ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.4: UZI NOMBRON POR MOVO + Leciono 1.2.4: UZI NOMBRON POR MOVO ** Tajpo de nombro antaŭ movo ripetas ĝin laŭfoje. ** @@ -285,7 +285,7 @@ RIMARKO: Premo de nur la movo en Normala reĝimo sen operatoro movos ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.5: UZI NOMBRON POR FORVIŜI PLI + Leciono 1.2.5: UZI NOMBRON POR FORVIŜI PLI ** Tajpo de nombro kun operatoro ripetas ĝin laŭfoje. ** @@ -305,7 +305,7 @@ RIMARKO: Premo de nur la movo en Normala reĝimo sen operatoro movos ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.6: OPERACII SUR LINIOJ + Leciono 1.2.6: OPERACII SUR LINIOJ ** Tajpu dd por forviŝi tutan linion. ** @@ -328,7 +328,7 @@ RIMARKO: Premo de nur la movo en Normala reĝimo sen operatoro movos ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2.7: LA KOMANDO DE MALFARO + Leciono 1.2.7: LA KOMANDO DE MALFARO ** Premu u por malfari la lastajn komandojn, U por ripari la tutan linion. ** @@ -345,11 +345,11 @@ RIMARKO: Premo de nur la movo en Normala reĝimo sen operatoro movos ---> Koorektii la erarojn sur tiuu ĉi liniio kaj remettu illlin per malfaro. - 8. Tiuj estas tre utilaj komandoj. Nun moviĝu al la leciono 2 RESUMO. + 8. Tiuj estas tre utilaj komandoj. Nun moviĝu al la leciono 1.2 RESUMO. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 2 RESUMO + Leciono 1.2 RESUMO 1. Por forviŝi ekde la kursoro ĝis la sekvanta vorto, tajpu: dw @@ -463,7 +463,7 @@ RIMARKO: Vi povas uzi la klavon Retropaŝo por korekti erarojn dum vi tajpas. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 3 RESUMO + Leciono 1.3 RESUMO 1. Por remeti tekston, kiun vi ĵus forviŝis, tajpu p. Tio metas la @@ -485,7 +485,7 @@ Nun daŭrigu al la sekvanta leciono. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4.1: POZICIO DE KURSORO KAJ STATO DE DOSIERO + Leciono 1.4.1: POZICIO DE KURSORO KAJ STATO DE DOSIERO ** Tajpu CTRL-G por montri vian pozicion en la dosiero kaj la dosierstaton. @@ -511,7 +511,7 @@ Nun daŭrigu al la sekvanta leciono. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4.2 LA KOMANDO DE SERĈO + Leciono 1.4.2: LA KOMANDO DE SERĈO ** Tajpu / kaj poste frazon por serĉi la frazon. ** @@ -537,7 +537,7 @@ RIMARKO: Kiam la serĉo atingas la finon de la dosiero, ĝi daŭras ĉe la ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4.3 SERĈO DE KONGRUAJ KRAMPOJ + Leciono 1.4.3: SERĈO DE KONGRUAJ KRAMPOJ ** Tajpu % por trovi kongruan ), ] aŭ } ** @@ -557,7 +557,7 @@ RIMARKO: Kiam la serĉo atingas la finon de la dosiero, ĝi daŭras ĉe la ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4.4 LA KOMANDO DE ANSTATAŭIGO + Leciono 1.4.4: LA KOMANDO DE ANSTATAŭIGO ** Tajpu :s/malnova/nova/g por anstataŭigi 'nova' per 'malnova'. ** @@ -585,7 +585,7 @@ RIMARKO: Kiam la serĉo atingas la finon de la dosiero, ĝi daŭras ĉe la ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 4 RESUMO + Leciono 1.4 RESUMO 1. CTRL-G vidigas vian pozicion en la dosiero kaj la staton de la dosiero. G movas la kursoron al la fino de la dosiero. @@ -609,7 +609,7 @@ RIMARKO: Kiam la serĉo atingas la finon de la dosiero, ĝi daŭras ĉe la ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5.1 KIEL PLENUMI EKSTERAN KOMANDON + Leciono 1.5.1: KIEL PLENUMI EKSTERAN KOMANDON ** Tajpu :! sekvata de ekstera komando por plenumi la komandon. ** @@ -632,7 +632,7 @@ RIMARKO: Ĉiuj : komandoj devas finiĝi per tajpo de ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5.2 PLI PRI KONSERVO DE DOSIERO + Leciono 1.5.2: PLI PRI KONSERVO DE DOSIERO ** Por konservi la faritajn ŝanĝojn en la teksto, tajpu :w DOSIERNOMO. ** @@ -657,7 +657,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi ĝin denove per vim TESTO, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5.3 APARTIGI KONSERVENDAN TESTON + Leciono 1.5.3: APARTIGI KONSERVENDAN TESTON ** Por konservi parton de la dosiero, tajpu v movo :w DOSIERNOMO ** @@ -683,7 +683,7 @@ RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5.4 AKIRI KAJ KUNFANDI DOSIEROJN + Leciono 1.5.4: AKIRI KAJ KUNFANDI DOSIEROJN ** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON ** @@ -707,7 +707,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 5 RESUMO + Leciono 1.5 RESUMO 1. :!komando plenumas eksteran komandon. @@ -731,7 +731,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.1 LA KOMANDO DE MALFERMO + Leciono 1.6.1: LA KOMANDO DE MALFERMO ** Tajpu o por malfermi linion sub la kursoro kaj eniri Enmetan reĝimon. ** @@ -753,7 +753,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.2 LA KOMANDO DE POSTALDONO + Leciono 1.6.2: LA KOMANDO DE POSTALDONO ** Tajpu a por enmeti POST la kursoro. ** @@ -778,7 +778,7 @@ RIMARKO: Ĉiu a, i kaj A iras al la sama Enmeta reĝimo, la nura malsamo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.3 ALIA MANIERO POR ANSTATAŬIGI + Leciono 1.6.3: ALIA MANIERO POR ANSTATAŬIGI ** Tajpu majusklan R por anstataŭigi pli ol unu signo. ** @@ -802,7 +802,7 @@ RIMARKO: Anstataŭiga reĝimo estas same kiel Enmeta reĝimo, sed ĉiu signo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.4 KOPII KAJ ALGLUI TEKSTON + Leciono 1.6.4: KOPII KAJ ALGLUI TEKSTON ** Uzu la y operatoron por kopii tekston, kaj p por alglui ĝin ** @@ -829,7 +829,7 @@ RIMARKO: vi povas ankaŭ uzi y kiel operatoro; yw kopias unu vorton. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6.5 AGORDI OPCION + Leciono 1.6.5: AGORDI OPCION ** Agordu opcion por ke serĉo aŭ anstataŭigo ignoru usklecon ** @@ -854,7 +854,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu serĉa komando, uzu \c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 6 RESUMO + Leciono 1.6 RESUMO 1. Tajpu o por malfermi linion SUB la kursoro kaj eki en Enmeta reĝimo. 1. Tajpu O por malfermi linion SUPER la kursoro. @@ -879,7 +879,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu serĉa komando, uzu \c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 7.1 AKIRI HELPON + Leciono 1.7.1: AKIRI HELPON ** Uzu la helpan sistemon ** @@ -904,7 +904,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu serĉa komando, uzu \c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 7.2 KREI STARTAN SKRIPTON + Leciono 1.7.2: KREI STARTAN SKRIPTON ** Ebligu kapablojn de Vim ** @@ -928,7 +928,7 @@ RIMARKO: Se vi deziras ignori usklecon por nur unu serĉa komando, uzu \c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 7.3 KOMPLETIGO + Leciono 1.7.3: KOMPLETIGO ** Kompletigo de komanda linio per CTRL-D kaj ** @@ -951,7 +951,7 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj . Estas aparte utila por :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leciono 7 RESUMO + Leciono 1.7 RESUMO 1. Tajpu :help aŭ premu por malfermi helpan fenestron. diff --git a/usr/share/vim/vim91/tutor/tutor.es b/usr/share/vim/vim91/tutor/tutor1.es similarity index 94% rename from usr/share/vim/vim91/tutor/tutor.es rename to usr/share/vim/vim91/tutor/tutor1.es index 7af322cccb2..c92f494742a 100644 --- a/usr/share/vim/vim91/tutor/tutor.es +++ b/usr/share/vim/vim91/tutor/tutor1.es @@ -20,9 +20,9 @@ Ahora, asegrese de que la tecla de bloqueo de maysculas NO est activada y pulse la tecla j lo suficiente para mover el cursor - de forma que la Leccin 1.1 ocupe completamente la pantalla. + de forma que la Leccin 1.1.1 ocupe completamente la pantalla. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 1.1: MOVER EL CURSOR + Leccin 1.1.1: MOVER EL CURSOR ** Para mover el cursor, pulse las teclas h,j,k,l de la forma indicada. ** ^ @@ -36,7 +36,7 @@ 2. Mantenga pulsada la tecla (j) hasta que se repita automgicamente. Ahora ya sabe como llegar a la leccin siguiente. - 3. Utilizando la tecla abajo, vaya a la leccin 1.2. + 3. Utilizando la tecla abajo, vaya a la leccin 1.1.2. NOTA: Si alguna vez no est seguro sobre algo que ha tecleado, pulse para situarse en modo Normal. Luego vuelva a teclear la orden que deseaba. @@ -46,7 +46,7 @@ NOTA: Las teclas de movimiento del cursor tambi De verdad! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 1.2: SALIR DE VIM + Leccin 1.1.2: SALIR DE VIM NOTA: Antes de ejecutar alguno de los siguientes pasos lea primero la leccin entera!! @@ -65,11 +65,11 @@ NOTA: Las teclas de movimiento del cursor tambi NOTA: :q! descarta cualquier cambio que haya realizado. En prximas lecciones aprender cmo guardar los cambios en un archivo. - 5. Mueva el cursor hasta la Leccin 1.3. + 5. Mueva el cursor hasta la Leccin 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 1.3: EDITAR TEXTO - BORRAR + Leccin 1.1.3: EDITAR TEXTO - BORRAR ** Pulse x para eliminar el carcter bajo el cursor. ** @@ -84,14 +84,14 @@ NOTA: :q! descarta cualquier cambio que haya realizado. ---> La vvaca salt soobree laa luuuuna. - 5. Ahora que la lnea esta correcta, contine con la Leccin 1.4. + 5. Ahora que la lnea esta correcta, contine con la Leccin 1.1.4. NOTA: A medida que vaya avanzando en este tutor no intente memorizar, aprenda practicando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 1.4: EDITAR TEXTO - INSERTAR + Leccin 1.1.4: EDITAR TEXTO - INSERTAR ** Pulse i para insertar texto. ** @@ -109,11 +109,11 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar, ---> Flta texto en esta . ---> Falta algo de texto en esta lnea. - 5. Cuando se sienta cmodo insertando texto pase vaya a la leccin 1.5. + 5. Cuando se sienta cmodo insertando texto pase vaya a la leccin 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 1.5: EDITAR TEXTO - AADIR + Leccin 1.1.5: EDITAR TEXTO - AADIR ** Pulse A para aadir texto. ** @@ -133,17 +133,17 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar, ---> Tambin falta alg Tambin falta algn texto aqu. - 5. Cuando se sienta cmodo aadiendo texto pase a la leccin 1.6. + 5. Cuando se sienta cmodo aadiendo texto pase a la leccin 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 1.6: EDITAR UN ARCHIVO + Leccin 1.1.6: EDITAR UN ARCHIVO ** Use :wq para guardar un archivo y salir ** !! NOTA: Antes de ejecutar los siguientes pasos, lea la leccin entera!! 1. Si tiene acceso a otra terminal, haga lo siguiente en ella. - Si no es as, salga de este tutor como hizo en la leccin 1.2: :q! + Si no es as, salga de este tutor como hizo en la leccin 1.1.2: :q! 2. En el smbolo del sistema escriba este comando: vim archivo.txt 'vim' es el comando para arrancar el editor Vim, 'archivo.txt' @@ -160,7 +160,7 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar, 6. Despus de leer los pasos anteriores y haberlos entendido: hgalos. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIN 1 + RESUMEN DE LA LECCIN 1.1 1. El cursor se mueve utilizando las teclas de las flechas o las teclas hjkl. @@ -182,10 +182,10 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar, NOTA: Pulsando se vuelve al modo Normal o cancela una orden no deseada o incompleta. -Ahora contine con la Leccin 2. +Ahora contine con la Leccin 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 2.1: COMANDOS PARA BORRAR + Leccin 1.2.1: COMANDOS PARA BORRAR ** Escriba dw para borrar una palabra ** @@ -207,11 +207,11 @@ Ahora contin ---> Hay algunas palabras psalo bien que no pertenecen papel a esta frase. 5. Repita los pasos 3 y 4 hasta que la frase sea correcta y pase a la - leccin 2.2. + leccin 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 2.2: MS COMANDOS PARA BORRAR + Leccin 1.2.2: MS COMANDOS PARA BORRAR ** Escriba d$ para borrar hasta el final de la lnea. ** @@ -226,12 +226,12 @@ Ahora contin ---> Alguien ha escrito el final de esta lnea dos veces. esta lnea dos veces. - 5. Pase a la leccin 2.3 para entender qu est pasando. + 5. Pase a la leccin 1.2.3 para entender qu est pasando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 2.3: SOBRE OPERADORES Y MOVIMIENTOS + Leccin 1.2.3: SOBRE OPERADORES Y MOVIMIENTOS Muchos comandos que cambian texto estn compuestos por un operador y un @@ -258,7 +258,7 @@ NOTA: Pulsando operador, mover el cursor como se especifica en la lista anterior. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 2.4: UTILIZAR UN CONTADOR PARA UN MOVIMIENTO + Leccin 1.2.4: UTILIZAR UN CONTADOR PARA UN MOVIMIENTO ** Al escribir un nmero antes de un movimiento, lo repite esas veces. ** @@ -276,13 +276,13 @@ NOTA: Pulsando ---> Esto es solo una lnea con palabras donde poder moverse. - 6. Pase a la leccin 2.5. + 6. Pase a la leccin 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 2.5: UTILIZAR UN CONTADOR PARA BORRAR MAS + Leccin 1.2.5: UTILIZAR UN CONTADOR PARA BORRAR MAS ** Al escribir un nmero con un operador lo repite esas veces. ** @@ -306,7 +306,7 @@ NOTA: Pulsando ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 2.6: OPERACIN EN LNEAS + Leccin 1.2.6: OPERACIN EN LNEAS ** Escriba dd para eliminar una lnea completa. ** @@ -332,7 +332,7 @@ La duplicaci mencionados anteriormente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 2.7: EL MANDATO DESHACER + Leccin 1.2.7: EL MANDATO DESHACER ** Pulse u para deshacer los ltimos comandos, @@ -352,13 +352,13 @@ mencionados anteriormente. ---> Corrrija los errores dee esttta lnea y vuuelva a ponerlos coon deshacer. 8. Estos son unos comandos muy tiles. Ahora vayamos al resumen de la - leccin 2. + leccin 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIN 2 + RESUMEN DE LA LECCIN 1.2 1. Para borrar desde el cursor hasta siguiente palabra pulse: dw 2. Para borrar desde el cursor hasta el final de la palabra pulse: de @@ -381,7 +381,7 @@ mencionados anteriormente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 3.1: EL COMANDO PUT (poner) + Leccin 1.3.1: EL COMANDO PUT (poner) ** Pulse p para poner (pegar) despus del cursor lo ltimo que ha borrado. ** @@ -403,7 +403,7 @@ mencionados anteriormente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 3.2: EL COMANDO REEMPLAZAR + Leccin 1.3.2: EL COMANDO REEMPLAZAR ** Pulse rx para reemplazar el carcter bajo el cursor con x . ** @@ -419,14 +419,14 @@ mencionados anteriormente. ---> Cuendo esta lnea fue rscrita alguien pulso algunas teclas equibocadas! ---> Cuando esta lnea fue escrita alguien puls algunas teclas equivocadas! - 5. Ahora pase a la leccin 3.3. + 5. Ahora pase a la leccin 1.3.3. NOTA: Recuerde que debera aprender practicando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 3.3: EL COMANDO CAMBIAR + Leccin 1.3.3: EL COMANDO CAMBIAR ** Para cambiar hasta el final de una palabra, escriba ce . ** @@ -449,7 +449,7 @@ Tenga en cuenta que ce elimina la palabra y entra en el modo Insertar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 3.4: MS CAMBIOS USANDO c + Leccin 1.3.4: MS CAMBIOS USANDO c ** El operador change se utiliza con los mismos movimientos que delete. ** @@ -473,7 +473,7 @@ Tenga en cuenta que ce elimina la palabra y entra en el modo Insertar. NOTA: Puede utilizar el retorno de carro para corregir errores mientras escribe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIN 3 + RESUMEN DE LA LECCIN 1.3 1. Para volver a poner o pegar el texto que acaba de ser borrado, @@ -496,7 +496,7 @@ NOTA: Puede utilizar el retorno de carro para corregir errores mientras escribe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 4.1: UBICACIN DEL CURSOR Y ESTADO DEL ARCHIVO + Leccin 1.4.1: UBICACIN DEL CURSOR Y ESTADO DEL ARCHIVO ** Pulse CTRL-G para mostrar su situacin en el fichero y su estado. Pulse G para moverse a una determinada lnea del fichero. ** @@ -521,7 +521,7 @@ NOTA: Quiz 4. Si se siente seguro en poder hacer esto ejecute los pasos 1 a 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 4.2: EL COMANDO SEARCH (buscar) + Leccin 1.4.2: EL COMANDO SEARCH (buscar) ** Escriba / seguido de una frase para buscar la frase. ** @@ -547,7 +547,7 @@ NOTA: Cuando la b comienzo, a menos que la opcin 'wrapscan' haya sido desactivada. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 4.3: BSQUEDA PARA COMPROBAR PARNTESIS + Leccin 1.4.3: BSQUEDA PARA COMPROBAR PARNTESIS ** Pulse % para encontrar el parntesis correspondiente a ),] o } . ** @@ -571,7 +571,7 @@ NOTA: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 4.4: EL COMANDO SUSTITUIR + Leccin 1.4.4: EL COMANDO SUSTITUIR ** Escriba :s/viejo/nuevo/g para sustituir 'viejo' por 'nuevo'. ** @@ -597,7 +597,7 @@ NOTA: realizar la sustitucin o no. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIN 4 + RESUMEN DE LA LECCIN 1.4 1. CTRL-G muestra la posicin del cursor en el fichero y su estado. @@ -621,7 +621,7 @@ NOTA: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 5.1: CMO EJECUTAR UN MANDATO EXTERNO + Leccin 1.5.1: CMO EJECUTAR UN MANDATO EXTERNO ** Escriba :! seguido de un comando externo para ejecutar ese comando. ** @@ -644,7 +644,7 @@ NOTA: Todos los comando : deben finalizarse pulsando . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 5.2: MS SOBRE GUARDAR FICHEROS + Leccin 1.5.2: MS SOBRE GUARDAR FICHEROS ** Para guardar los cambios hechos en un fichero, @@ -669,7 +669,7 @@ NOTA: Si saliera de Vim y volviera a entrar de nuevo con vim TEST , el ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 5.3: SELECCIONAR TEXTO PARA GUARDAR + Leccin 1.5.3: SELECCIONAR TEXTO PARA GUARDAR ** Para guardar parte del archivo, escriba v movimiento :w ARCHIVO ** @@ -696,14 +696,14 @@ NOTA: Al pulsar v inicia la selecci ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 5.4: RECUPERANDO Y MEZCLANDO FICHEROS + Leccin 1.5.4: RECUPERANDO Y MEZCLANDO FICHEROS ** Para insertar el contenido de un fichero escriba :r NOMBRE_DEL_FICHERO ** 1. Site el cursor justo por encima de esta lnea. -NOTA: Despus de ejecutar el paso 2 ver texto de la leccin 5.3. Despus +NOTA: Despus de ejecutar el paso 2 ver texto de la leccin 1.5.3. Despus DESCIENDA hasta ver de nuevo esta leccin. 2. Ahora recupere el archivo TEST utilizando el comando :r TEST donde @@ -712,7 +712,7 @@ NOTA: Despu se encuentra el cursor. 3. Para verificar que se ha recuperado el archivo, suba el cursor y - compruebe que ahora hay dos copias de la leccin 5.3, la original y + compruebe que ahora hay dos copias de la leccin 1.5.3, la original y la versin del archivo. NOTA: Tambin puede leer la salida de un comando externo. Por ejemplo, @@ -721,7 +721,7 @@ NOTA: Tambi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIN 5 + RESUMEN DE LA LECCIN 1.5 1. :!comando ejecuta un comando externo. @@ -745,7 +745,7 @@ NOTA: Tambi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 6.1: EL COMANDO OPEN + Leccin 1.6.1: EL COMANDO OPEN ** Pulse o para abrir una lnea debajo del cursor @@ -769,7 +769,7 @@ NOTA: Tambi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 6.2: EL COMANDO APPEND (aadir) + Leccin 1.6.2: EL COMANDO APPEND (aadir) ** Pulse a para insertar texto DESPUS del cursor. ** @@ -793,7 +793,7 @@ NOTA: a, i y A todos entran en el modo Insertar, la dnde ubican los caracteres insertados. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 6.3: OTRA VERSIN DE REPLACE (remplazar) + Leccin 1.6.3: OTRA VERSIN DE REPLACE (remplazar) ** Pulse una R mayscula para sustituir ms de un carcter. ** @@ -816,7 +816,7 @@ NOTA: El modo Reemplazar es como el modo Insertar, pero cada car elimina un carcter ya existente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 6.4: COPIAR Y PEGAR TEXTO + Leccin 1.6.4: COPIAR Y PEGAR TEXTO @@ -845,7 +845,7 @@ NOTA: Tambi esa lnea. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 6.5: ACTIVAR (SET) UNA OPCIN + Leccin 1.6.5: ACTIVAR (SET) UNA OPCIN ** Active una opcin para buscar o sustituir ignorando si est @@ -871,7 +871,7 @@ NOTA: Para eliminar el resaltado de las coincidencias escriba: :nohlsearch NOTA: Si quiere ignorar las maysculas y minsculas, solo para un comando de bsqueda, utilice \c en la frase: /ignorar\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIN 6 + RESUMEN DE LA LECCIN 1.6 1. Escriba o para abrir una lnea por DEBAJO de la posicin del cursor y @@ -922,7 +922,7 @@ NOTA: Si quiere ignorar las may :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 7.2: CREAR UN SCRIPT DE INICIO + Leccin 1.7.2: CREAR UN SCRIPT DE INICIO ** Habilitar funcionalidades en Vim ** @@ -947,7 +947,7 @@ NOTA: Si quiere ignorar las may Para ms informacin escriba :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leccin 7.3: COMPLETADO + Leccin 1.7.3: COMPLETADO ** Completado de la lnea de comandos con CTRL-D o ** @@ -970,7 +970,7 @@ NOTA: El completado funciona con muchos comandos. Solo pulse CTRL-D o . Es especialmente til para :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIN 7 + RESUMEN DE LA LECCIN 1.7 1. Escriba :help o pulse o para abrir la ventana de ayuda. diff --git a/usr/share/vim/vim91/tutor/tutor.es.utf-8 b/usr/share/vim/vim91/tutor/tutor1.es.utf-8 similarity index 94% rename from usr/share/vim/vim91/tutor/tutor.es.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.es.utf-8 index c6f4bab4f9e..0d3ac4fa640 100644 --- a/usr/share/vim/vim91/tutor/tutor.es.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.es.utf-8 @@ -20,9 +20,9 @@ Ahora, asegúrese de que la tecla de bloqueo de mayúsculas NO está activada y pulse la tecla j lo suficiente para mover el cursor - de forma que la Lección 1.1 ocupe completamente la pantalla. + de forma que la Lección 1.1.1 ocupe completamente la pantalla. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 1.1: MOVER EL CURSOR + Lección 1.1.1: MOVER EL CURSOR ** Para mover el cursor, pulse las teclas h,j,k,l de la forma indicada. ** ^ @@ -36,7 +36,7 @@ 2. Mantenga pulsada la tecla (j) hasta que se repita «automágicamente». Ahora ya sabe como llegar a la lección siguiente. - 3. Utilizando la tecla abajo, vaya a la lección 1.2. + 3. Utilizando la tecla abajo, vaya a la lección 1.1.2. NOTA: Si alguna vez no está seguro sobre algo que ha tecleado, pulse para situarse en modo Normal. Luego vuelva a teclear la orden que deseaba. @@ -46,7 +46,7 @@ NOTA: Las teclas de movimiento del cursor también funcionan. Pero usando ¡De verdad! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 1.2: SALIR DE VIM + Lección 1.1.2: SALIR DE VIM ¡¡ NOTA: Antes de ejecutar alguno de los siguientes pasos lea primero la lección entera!! @@ -65,11 +65,11 @@ NOTA: Las teclas de movimiento del cursor también funcionan. Pero usando NOTA: :q! descarta cualquier cambio que haya realizado. En próximas lecciones aprenderá cómo guardar los cambios en un archivo. - 5. Mueva el cursor hasta la Lección 1.3. + 5. Mueva el cursor hasta la Lección 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 1.3: EDITAR TEXTO - BORRAR + Lección 1.1.3: EDITAR TEXTO - BORRAR ** Pulse x para eliminar el carácter bajo el cursor. ** @@ -84,14 +84,14 @@ NOTA: :q! descarta cualquier cambio que haya realizado. ---> La vvaca saltóó soobree laa luuuuna. - 5. Ahora que la línea esta correcta, continúe con la Lección 1.4. + 5. Ahora que la línea esta correcta, continúe con la Lección 1.1.4. NOTA: A medida que vaya avanzando en este tutor no intente memorizar, aprenda practicando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 1.4: EDITAR TEXTO - INSERTAR + Lección 1.1.4: EDITAR TEXTO - INSERTAR ** Pulse i para insertar texto. ** @@ -109,11 +109,11 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar, ---> Flta texto en esta . ---> Falta algo de texto en esta línea. - 5. Cuando se sienta cómodo insertando texto pase vaya a la lección 1.5. + 5. Cuando se sienta cómodo insertando texto pase vaya a la lección 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 1.5: EDITAR TEXTO - AÑADIR + Lección 1.1.5: EDITAR TEXTO - AÑADIR ** Pulse A para añadir texto. ** @@ -133,17 +133,17 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar, ---> También falta alg También falta algún texto aquí. - 5. Cuando se sienta cómodo añadiendo texto pase a la lección 1.6. + 5. Cuando se sienta cómodo añadiendo texto pase a la lección 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 1.6: EDITAR UN ARCHIVO + Lección 1.1.6: EDITAR UN ARCHIVO ** Use :wq para guardar un archivo y salir ** !! NOTA: Antes de ejecutar los siguientes pasos, lea la lección entera!! 1. Si tiene acceso a otra terminal, haga lo siguiente en ella. - Si no es así, salga de este tutor como hizo en la lección 1.2: :q! + Si no es así, salga de este tutor como hizo en la lección 1.1.2: :q! 2. En el símbolo del sistema escriba este comando: vim archivo.txt 'vim' es el comando para arrancar el editor Vim, 'archivo.txt' @@ -160,7 +160,7 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar, 6. Después de leer los pasos anteriores y haberlos entendido: hágalos. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIÓN 1 + RESUMEN DE LA LECCIÓN 1.1 1. El cursor se mueve utilizando las teclas de las flechas o las teclas hjkl. @@ -182,10 +182,10 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar, NOTA: Pulsando se vuelve al modo Normal o cancela una orden no deseada o incompleta. -Ahora continúe con la Lección 2. +Ahora continúe con la Lección 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 2.1: COMANDOS PARA BORRAR + Lección 1.2.1: COMANDOS PARA BORRAR ** Escriba dw para borrar una palabra ** @@ -207,11 +207,11 @@ Ahora continúe con la Lección 2. ---> Hay algunas palabras pásalo bien que no pertenecen papel a esta frase. 5. Repita los pasos 3 y 4 hasta que la frase sea correcta y pase a la - lección 2.2. + lección 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 2.2: MÁS COMANDOS PARA BORRAR + Lección 1.2.2: MÁS COMANDOS PARA BORRAR ** Escriba d$ para borrar hasta el final de la línea. ** @@ -226,12 +226,12 @@ Ahora continúe con la Lección 2. ---> Alguien ha escrito el final de esta línea dos veces. esta línea dos veces. - 5. Pase a la lección 2.3 para entender qué está pasando. + 5. Pase a la lección 1.2.3 para entender qué está pasando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 2.3: SOBRE OPERADORES Y MOVIMIENTOS + Lección 1.2.3: SOBRE OPERADORES Y MOVIMIENTOS Muchos comandos que cambian texto están compuestos por un operador y un @@ -258,7 +258,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un operador, moverá el cursor como se especifica en la lista anterior. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 2.4: UTILIZAR UN CONTADOR PARA UN MOVIMIENTO + Lección 1.2.4: UTILIZAR UN CONTADOR PARA UN MOVIMIENTO ** Al escribir un número antes de un movimiento, lo repite esas veces. ** @@ -276,13 +276,13 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un ---> Esto es solo una línea con palabras donde poder moverse. - 6. Pase a la lección 2.5. + 6. Pase a la lección 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 2.5: UTILIZAR UN CONTADOR PARA BORRAR MAS + Lección 1.2.5: UTILIZAR UN CONTADOR PARA BORRAR MAS ** Al escribir un número con un operador lo repite esas veces. ** @@ -306,7 +306,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 2.6: OPERACIÓN EN LÍNEAS + Lección 1.2.6: OPERACIÓN EN LÍNEAS ** Escriba dd para eliminar una línea completa. ** @@ -332,7 +332,7 @@ La duplicación para borrar líneas también funcionan con los operadores mencionados anteriormente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 2.7: EL MANDATO DESHACER + Lección 1.2.7: EL MANDATO DESHACER ** Pulse u para deshacer los últimos comandos, @@ -352,13 +352,13 @@ mencionados anteriormente. ---> Corrrija los errores dee esttta línea y vuuelva a ponerlos coon deshacer. 8. Estos son unos comandos muy útiles. Ahora vayamos al resumen de la - lección 2. + lección 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIÓN 2 + RESUMEN DE LA LECCIÓN 1.2 1. Para borrar desde el cursor hasta siguiente palabra pulse: dw 2. Para borrar desde el cursor hasta el final de la palabra pulse: de @@ -381,7 +381,7 @@ mencionados anteriormente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 3.1: EL COMANDO «PUT» (poner) + Lección 1.3.1: EL COMANDO «PUT» (poner) ** Pulse p para poner (pegar) después del cursor lo último que ha borrado. ** @@ -403,7 +403,7 @@ mencionados anteriormente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 3.2: EL COMANDO REEMPLAZAR + Lección 1.3.2: EL COMANDO REEMPLAZAR ** Pulse rx para reemplazar el carácter bajo el cursor con x . ** @@ -419,14 +419,14 @@ mencionados anteriormente. ---> ¡Cuendo esta línea fue rscrita alguien pulso algunas teclas equibocadas! ---> ¡Cuando esta línea fue escrita alguien pulsó algunas teclas equivocadas! - 5. Ahora pase a la lección 3.3. + 5. Ahora pase a la lección 1.3.3. NOTA: Recuerde que debería aprender practicando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 3.3: EL COMANDO CAMBIAR + Lección 1.3.3: EL COMANDO CAMBIAR ** Para cambiar hasta el final de una palabra, escriba ce . ** @@ -449,7 +449,7 @@ Tenga en cuenta que ce elimina la palabra y entra en el modo Insertar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 3.4: MÁS CAMBIOS USANDO c + Lección 1.3.4: MÁS CAMBIOS USANDO c ** El operador change se utiliza con los mismos movimientos que delete. ** @@ -473,7 +473,7 @@ Tenga en cuenta que ce elimina la palabra y entra en el modo Insertar. NOTA: Puede utilizar el retorno de carro para corregir errores mientras escribe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIÓN 3 + RESUMEN DE LA LECCIÓN 1.3 1. Para volver a poner o pegar el texto que acaba de ser borrado, @@ -496,7 +496,7 @@ NOTA: Puede utilizar el retorno de carro para corregir errores mientras escribe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 4.1: UBICACIÓN DEL CURSOR Y ESTADO DEL ARCHIVO + Lección 1.4.1: UBICACIÓN DEL CURSOR Y ESTADO DEL ARCHIVO ** Pulse CTRL-G para mostrar su situación en el fichero y su estado. Pulse G para moverse a una determinada línea del fichero. ** @@ -521,7 +521,7 @@ NOTA: Quizás pueda ver la posición del cursor en la esquina inferior derecha 4. Si se siente seguro en poder hacer esto ejecute los pasos 1 a 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 4.2: EL COMANDO «SEARCH» (buscar) + Lección 1.4.2: EL COMANDO «SEARCH» (buscar) ** Escriba / seguido de una frase para buscar la frase. ** @@ -547,7 +547,7 @@ NOTA: Cuando la búsqueda llega al final del archivo, continuará desde el comienzo, a menos que la opción 'wrapscan' haya sido desactivada. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 4.3: BÚSQUEDA PARA COMPROBAR PARÉNTESIS + Lección 1.4.3: BÚSQUEDA PARA COMPROBAR PARÉNTESIS ** Pulse % para encontrar el paréntesis correspondiente a ),] o } . ** @@ -571,7 +571,7 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 4.4: EL COMANDO SUSTITUIR + Lección 1.4.4: EL COMANDO SUSTITUIR ** Escriba :s/viejo/nuevo/g para sustituir 'viejo' por 'nuevo'. ** @@ -597,7 +597,7 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con realizar la sustitución o no. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIÓN 4 + RESUMEN DE LA LECCIÓN 1.4 1. CTRL-G muestra la posición del cursor en el fichero y su estado. @@ -621,7 +621,7 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 5.1: CÓMO EJECUTAR UN MANDATO EXTERNO + Lección 1.5.1: CÓMO EJECUTAR UN MANDATO EXTERNO ** Escriba :! seguido de un comando externo para ejecutar ese comando. ** @@ -644,7 +644,7 @@ NOTA: Todos los comando : deben finalizarse pulsando . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 5.2: MÁS SOBRE GUARDAR FICHEROS + Lección 1.5.2: MÁS SOBRE GUARDAR FICHEROS ** Para guardar los cambios hechos en un fichero, @@ -669,7 +669,7 @@ NOTA: Si saliera de Vim y volviera a entrar de nuevo con vim TEST , el ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 5.3: SELECCIONAR TEXTO PARA GUARDAR + Lección 1.5.3: SELECCIONAR TEXTO PARA GUARDAR ** Para guardar parte del archivo, escriba v movimiento :w ARCHIVO ** @@ -696,14 +696,14 @@ NOTA: Al pulsar v inicia la selección visual. Puede mover el cursor para ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 5.4: RECUPERANDO Y MEZCLANDO FICHEROS + Lección 1.5.4: RECUPERANDO Y MEZCLANDO FICHEROS ** Para insertar el contenido de un fichero escriba :r NOMBRE_DEL_FICHERO ** 1. Sitúe el cursor justo por encima de esta línea. -NOTA: Después de ejecutar el paso 2 verá texto de la lección 5.3. Después +NOTA: Después de ejecutar el paso 2 verá texto de la lección 1.5.3. Después DESCIENDA hasta ver de nuevo esta lección. 2. Ahora recupere el archivo TEST utilizando el comando :r TEST donde @@ -712,7 +712,7 @@ NOTA: Después de ejecutar el paso 2 verá texto de la lección 5.3. Después se encuentra el cursor. 3. Para verificar que se ha recuperado el archivo, suba el cursor y - compruebe que ahora hay dos copias de la lección 5.3, la original y + compruebe que ahora hay dos copias de la lección 1.5.3, la original y la versión del archivo. NOTA: También puede leer la salida de un comando externo. Por ejemplo, @@ -721,7 +721,7 @@ NOTA: También puede leer la salida de un comando externo. Por ejemplo, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIÓN 5 + RESUMEN DE LA LECCIÓN 1.5 1. :!comando ejecuta un comando externo. @@ -745,7 +745,7 @@ NOTA: También puede leer la salida de un comando externo. Por ejemplo, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 6.1: EL COMANDO OPEN + Lección 1.6.1: EL COMANDO OPEN ** Pulse o para abrir una línea debajo del cursor @@ -769,7 +769,7 @@ NOTA: También puede leer la salida de un comando externo. Por ejemplo, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 6.2: EL COMANDO APPEND (añadir) + Lección 1.6.2: EL COMANDO APPEND (añadir) ** Pulse a para insertar texto DESPUÉS del cursor. ** @@ -793,7 +793,7 @@ NOTA: a, i y A todos entran en el modo Insertar, la única diferencia es dónde ubican los caracteres insertados. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 6.3: OTRA VERSIÓN DE REPLACE (remplazar) + Lección 1.6.3: OTRA VERSIÓN DE REPLACE (remplazar) ** Pulse una R mayúscula para sustituir más de un carácter. ** @@ -816,7 +816,7 @@ NOTA: El modo Reemplazar es como el modo Insertar, pero cada carácter escrito elimina un carácter ya existente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 6.4: COPIAR Y PEGAR TEXTO + Lección 1.6.4: COPIAR Y PEGAR TEXTO @@ -845,7 +845,7 @@ NOTA: También puede utilizar y como un operador: yw copia una palabra, esa línea. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 6.5: ACTIVAR (SET) UNA OPCIÓN + Lección 1.6.5: ACTIVAR (SET) UNA OPCIÓN ** Active una opción para buscar o sustituir ignorando si está @@ -871,7 +871,7 @@ NOTA: Para eliminar el resaltado de las coincidencias escriba: :nohlsearch NOTA: Si quiere ignorar las mayúsculas y minúsculas, solo para un comando de búsqueda, utilice \c en la frase: /ignorar\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIÓN 6 + RESUMEN DE LA LECCIÓN 1.6 1. Escriba o para abrir una línea por DEBAJO de la posición del cursor y @@ -922,7 +922,7 @@ NOTA: Si quiere ignorar las mayúsculas y minúsculas, solo para un comando :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 7.2: CREAR UN SCRIPT DE INICIO + Lección 1.7.2: CREAR UN SCRIPT DE INICIO ** Habilitar funcionalidades en Vim ** @@ -947,7 +947,7 @@ NOTA: Si quiere ignorar las mayúsculas y minúsculas, solo para un comando Para más información escriba :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lección 7.3: COMPLETADO + Lección 1.7.3: COMPLETADO ** Completado de la línea de comandos con CTRL-D o ** @@ -970,7 +970,7 @@ NOTA: El completado funciona con muchos comandos. Solo pulse CTRL-D o . Es especialmente útil para :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMEN DE LA LECCIÓN 7 + RESUMEN DE LA LECCIÓN 1.7 1. Escriba :help o pulse o para abrir la ventana de ayuda. diff --git a/usr/share/vim/vim91/tutor/tutor.fr b/usr/share/vim/vim91/tutor/tutor1.fr similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.fr rename to usr/share/vim/vim91/tutor/tutor1.fr index 35f74400016..079f2da3b45 100644 --- a/usr/share/vim/vim91/tutor/tutor.fr +++ b/usr/share/vim/vim91/tutor/tutor1.fr @@ -21,11 +21,11 @@ Maintenant, vrifiez que votre clavier n'est PAS verrouill en majuscules, et appuyez la touche j le nombre de fois suffisant pour - que la Leon 1.1 remplisse compltement l'cran. + que la Leon 1.1.1 remplisse compltement l'cran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 1.1 : DPLACEMENT DU CURSEUR + Leon 1.1.1 : DPLACEMENT DU CURSEUR ** Pour dplacer le curseur, appuyez les touches h,j,k,l comme indiqu. ** @@ -39,7 +39,7 @@ 2. Maintenez la touche Bas (j) enfonce jusqu' ce qu'elle se rpte. Maintenant vous tes capable de vous dplacer jusqu' la leon suivante. - 3. En utilisant la touche Bas, allez la Leon 1.2. + 3. En utilisant la touche Bas, allez la Leon 1.1.2. NOTE : Si jamais vous doutez de ce que vous venez de taper, appuyez pour revenir en mode Normal. Puis retapez la commande que vous vouliez. @@ -50,7 +50,7 @@ NOTE : Les touches fl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 1.2 : SORTIR DE VIM + Leon 1.1.2 : SORTIR DE VIM !! NOTE : Avant d'effectuer les tapes ci-dessous, lisez toute cette leon !! @@ -70,11 +70,11 @@ NOTE : Les touches fl NOTE : :q! annule tous les changements que vous avez faits. Dans quelques leons, vous apprendrez enregistrer les changements. - 5. Dplacez le curseur la Leon 1.3. + 5. Dplacez le curseur la Leon 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 1.3 : DITION DE TEXTE - EFFACEMENT + Leon 1.1.3 : DITION DE TEXTE - EFFACEMENT ** Appuyez x pour effacer le caractre sous le curseur. ** @@ -90,14 +90,14 @@ NOTE : :q! La vvache a saut au-ddessus dde la luune. - 5. Maintenant que la ligne est correcte, passez la Leon 1.4. + 5. Maintenant que la ligne est correcte, passez la Leon 1.1.4. NOTE : En avanant dans ce cours, n'essayez pas de mmoriser, apprenez par la pratique. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 1.4 : DITION DE TEXTE - INSERTION + Leon 1.1.4 : DITION DE TEXTE - INSERTION ** Appuyez i pour insrer du texte. ** @@ -116,11 +116,11 @@ NOTE : En avan ---> Il manque des caractres dans cette ligne. 5. Une fois que vous tes l'aise avec l'insertion de texte, allez la - Leon 1.5. + Leon 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 1.5 : DITION DE TEXTE - AJOUTER + Leon 1.1.5 : DITION DE TEXTE - AJOUTER ** Appuyez A pour ajouter du texte. ** @@ -142,18 +142,18 @@ NOTE : En avan Il manque aussi du texte ici. 5. Quand vous vous sentez suffisamment l'aise pour ajouter du texte, - allez la Leon 1.6. + allez la Leon 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 1.6 : DITER UN FICHIER + Leon 1.1.6 : DITER UN FICHIER ** Utilisez :wq pour enregistrer un fichier et sortir. ** !! NOTE : Lisez toute la leon avant d'excuter les instructions ci-dessous !! - 1. Sortez de ce tutoriel comme vous l'avez fait dans la Leon 1.2 : :q! + 1. Sortez de ce tutoriel comme vous l'avez fait dans la Leon 1.1.2 : :q! Ou, si vous avez accs un autre terminal, excutez-y les actions qui suivent. @@ -173,7 +173,7 @@ NOTE : En avan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RSUM DE LA LEON 1 + RSUM DE LA LEON 1.1 1. Le curseur se dplace avec les touches flches ou les touches hjkl. @@ -199,7 +199,7 @@ Passez maintenant ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 2.1 : COMMANDES D'EFFACEMENT + Leon 1.2.1 : COMMANDES D'EFFACEMENT ** Tapez dw pour effacer un mot. ** @@ -220,11 +220,11 @@ NOTE : La lettre d appara ---> Il y a quelques drle mots qui n'ont rien faire papier sur cette ligne. 5. Rptez les tapes 3 et 4 jusqu' ce que la phrase soit correcte et allez - la Leon 2.2. + la Leon 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 2.2 : PLUS DE COMMANDES D'EFFACEMENTS + Leon 1.2.2 : PLUS DE COMMANDES D'EFFACEMENTS ** Tapez d$ pour effacer jusqu' la fin de la ligne. ** @@ -240,11 +240,11 @@ NOTE : La lettre d appara ---> Quelqu'un a tap la fin de cette ligne deux fois. cette ligne deux fois. - 5. Allez la Leon 2.3 pour comprendre ce qui se passe. + 5. Allez la Leon 1.2.3 pour comprendre ce qui se passe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 2.3 : PROPOS DES OPRATEURS ET DES MOUVEMENTS + Leon 1.2.3 : PROPOS DES OPRATEURS ET DES MOUVEMENTS Plusieurs commandes qui changent le texte sont constitues d'un oprateur @@ -270,7 +270,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 2.4 : UTILISER UN QUANTIFICATEUR AVEC UN MOUVEMENT + Leon 1.2.4 : UTILISER UN QUANTIFICATEUR AVEC UN MOUVEMENT ** Taper un nombre avant un mouvement le rpte autant de fois. ** @@ -288,11 +288,11 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d ---> Ceci est juste une ligne avec des mots o vous pouvez vous dplacer. - 6. Dplacez-vous la Leon 2.5. + 6. Dplacez-vous la Leon 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 2.5 : UTILISER UN QUANTIFICATEUR POUR EFFACER PLUS + Leon 1.2.5 : UTILISER UN QUANTIFICATEUR POUR EFFACER PLUS ** Taper un nombre avec un oprateur le rpte autant de fois. ** @@ -314,7 +314,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 2.6 : OPREZ SUR DES LIGNES + Leon 1.2.6 : OPREZ SUR DES LIGNES ** Tapez dd pour effacer une ligne complte. ** @@ -338,7 +338,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 2.7 : L'ANNULATION + Leon 1.2.7 : L'ANNULATION ** Tapez u pour annuler les dernires commandes. ** @@ -359,11 +359,11 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d ---> Coorrigez les erreurs suur ccette ligne et reemettez-les avvec 'annuler'. 8. Ce sont des commandes trs utiles. Maintenant, allez au rsum de la - Leon 2. + Leon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RSUM DE LA LEON 2 + RSUM DE LA LEON 1.2 1. Pour effacer du curseur jusqu'au mot suivant tapez : dw @@ -392,7 +392,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 3.1 : LE COLLAGE + Leon 1.3.1 : LE COLLAGE ** Tapez p pour placer aprs le curseur ce qui vient d'tre effac. ** @@ -415,7 +415,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 3.2 : LA COMMANDE DE REMPLACEMENT + Leon 1.3.2 : LA COMMANDE DE REMPLACEMENT ** Tapez rx pour remplacer un caractre sous le curseur par x . ** @@ -432,14 +432,14 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, d ---> Quand cette ligne a t sauvie, quelqu'un a lait des faunes de frappe ! ---> Quand cette ligne a t saisie, quelqu'un a fait des fautes de frappe ! - 5. Maintenant, allez la Leon 3.3. + 5. Maintenant, allez la Leon 1.3.3. NOTE : N'oubliez pas que vous devriez apprendre par la pratique, pas par mmorisation. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 3.3 : L'OPRATEUR DE CHANGEMENT + Leon 1.3.3 : L'OPRATEUR DE CHANGEMENT ** Pour changer jusqu' la fin d'un mot, tapez ce .** @@ -463,7 +463,7 @@ Notez que ce efface le mot et vous place ensuite en mode Insertion. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 3.4 : PLUS DE CHANGEMENTS AVEC c + Leon 1.3.4 : PLUS DE CHANGEMENTS AVEC c ** L'oprateur de changement fonctionne avec les mmes dplacements @@ -491,7 +491,7 @@ NOTE : Vous pouvez utiliser la touche Retour Arri ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RSUM DE LA LEON 3 + RSUM DE LA LEON 1.3 1. Pour remettre le texte qui a dj t effac, tapez p . Cela Place le @@ -514,7 +514,7 @@ Passez maintenant ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 4.1 : POSITION DU CURSEUR ET TAT DU FICHIER + Leon 1.4.1 : POSITION DU CURSEUR ET TAT DU FICHIER ** Tapez CTRL-G pour afficher votre position dans le fichier et son tat. @@ -541,7 +541,7 @@ NOTE : Vous pouvez peut- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 4.2 : LA RECHERCHE + Leon 1.4.2 : LA RECHERCHE ** Tapez / suivi d'un texte pour rechercher ce texte. ** @@ -564,7 +564,7 @@ NOTE : Quand la recherche atteint la fin du fichier, elle reprend au d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 4.3 : RECHERCHE DES PARENTHSES CORRESPONDANTES + Leon 1.4.3 : RECHERCHE DES PARENTHSES CORRESPONDANTES ** Tapez % pour trouver des ), ] ou } correspondants. ** @@ -589,7 +589,7 @@ NOTE : Cette fonctionnalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 4.4 : LA COMMANDE DE SUBSTITUTION + Leon 1.4.4 : LA COMMANDE DE SUBSTITUTION ** Tapez :s/ancien/nouveau/g pour remplacer 'ancien' par 'nouveau'. ** @@ -617,7 +617,7 @@ NOTE : Cette fonctionnalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RSUM DE LA LEON 4 + RSUM DE LA LEON 1.4 1. CTRL-G affiche la position dans le fichier et l'tat de celui-ci. @@ -641,7 +641,7 @@ NOTE : Cette fonctionnalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leon 5.1 : COMMENT EXCUTER UNE COMMANDE EXTERNE + Leon 1.5.1 : COMMENT EXCUTER UNE COMMANDE EXTERNE ** Tapez :! suivi d'une commande externe pour excuter cette commande. ** @@ -664,7 +664,7 @@ NOTE : Toutes les commandes : doivent finir par la frappe de ** @@ -990,7 +990,7 @@ NOTE : Le compl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RSUM DE LA LEON 7 + RSUM DE LA LEON 1.7 1. Tapez :help ou appuyez ou pour ouvrir la fentre d'aide. diff --git a/usr/share/vim/vim91/tutor/tutor.fr.utf-8 b/usr/share/vim/vim91/tutor/tutor1.fr.utf-8 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.fr.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.fr.utf-8 index 35eab89d87d..f479cd2815c 100644 --- a/usr/share/vim/vim91/tutor/tutor.fr.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.fr.utf-8 @@ -21,11 +21,11 @@ Maintenant, vérifiez que votre clavier n'est PAS verrouillé en majuscules, et appuyez la touche j le nombre de fois suffisant pour - que la Leçon 1.1 remplisse complètement l'écran. + que la Leçon 1.1.1 remplisse complètement l'écran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 1.1 : DÉPLACEMENT DU CURSEUR + Leçon 1.1.1 : DÉPLACEMENT DU CURSEUR ** Pour déplacer le curseur, appuyez les touches h,j,k,l comme indiqué. ** @@ -39,7 +39,7 @@ 2. Maintenez la touche Bas (j) enfoncée jusqu'à ce qu'elle se répète. Maintenant vous êtes capable de vous déplacer jusqu'à la leçon suivante. - 3. En utilisant la touche Bas, allez à la Leçon 1.2. + 3. En utilisant la touche Bas, allez à la Leçon 1.1.2. NOTE : Si jamais vous doutez de ce que vous venez de taper, appuyez <Échap> pour revenir en mode Normal. Puis retapez la commande que vous vouliez. @@ -50,7 +50,7 @@ NOTE : Les touches fléchées devraient également fonctionner. Mais en utilisan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 1.2 : SORTIR DE VIM + Leçon 1.1.2 : SORTIR DE VIM !! NOTE : Avant d'effectuer les étapes ci-dessous, lisez toute cette leçon !! @@ -70,11 +70,11 @@ NOTE : Les touches fléchées devraient également fonctionner. Mais en utilisan NOTE : :q! annule tous les changements que vous avez faits. Dans quelques leçons, vous apprendrez à enregistrer les changements. - 5. Déplacez le curseur à la Leçon 1.3. + 5. Déplacez le curseur à la Leçon 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 1.3 : ÉDITION DE TEXTE - EFFACEMENT + Leçon 1.1.3 : ÉDITION DE TEXTE - EFFACEMENT ** Appuyez x pour effacer le caractère sous le curseur. ** @@ -90,14 +90,14 @@ NOTE : :q! annule tous les changements que vous avez faits. Dans ---> La vvache a sautéé au-ddessus dde la luune. - 5. Maintenant que la ligne est correcte, passez à la Leçon 1.4. + 5. Maintenant que la ligne est correcte, passez à la Leçon 1.1.4. NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par la pratique. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 1.4 : ÉDITION DE TEXTE - INSERTION + Leçon 1.1.4 : ÉDITION DE TEXTE - INSERTION ** Appuyez i pour insérer du texte. ** @@ -116,11 +116,11 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par ---> Il manque des caractères dans cette ligne. 5. Une fois que vous êtes à l'aise avec l'insertion de texte, allez à la - Leçon 1.5. + Leçon 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 1.5 : ÉDITION DE TEXTE - AJOUTER + Leçon 1.1.5 : ÉDITION DE TEXTE - AJOUTER ** Appuyez A pour ajouter du texte. ** @@ -142,18 +142,18 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par Il manque aussi du texte ici. 5. Quand vous vous sentez suffisamment à l'aise pour ajouter du texte, - allez à la Leçon 1.6. + allez à la Leçon 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 1.6 : ÉDITER UN FICHIER + Leçon 1.1.6 : ÉDITER UN FICHIER ** Utilisez :wq pour enregistrer un fichier et sortir. ** !! NOTE : Lisez toute la leçon avant d'exécuter les instructions ci-dessous !! - 1. Sortez de ce tutoriel comme vous l'avez fait dans la Leçon 1.2 : :q! + 1. Sortez de ce tutoriel comme vous l'avez fait dans la Leçon 1.1.2 : :q! Ou, si vous avez accès à un autre terminal, exécutez-y les actions qui suivent. @@ -173,7 +173,7 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RÉSUMÉ DE LA LEÇON 1 + RÉSUMÉ DE LA LEÇON 1.1 1. Le curseur se déplace avec les touches fléchées ou les touches hjkl. @@ -199,7 +199,7 @@ Passez maintenant à la leçon 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 2.1 : COMMANDES D'EFFACEMENT + Leçon 1.2.1 : COMMANDES D'EFFACEMENT ** Tapez dw pour effacer un mot. ** @@ -220,11 +220,11 @@ NOTE : La lettre d apparaîtra sur la dernière ligne de l'écran lors de ---> Il y a quelques drôle mots qui n'ont rien à faire papier sur cette ligne. 5. Répétez les étapes 3 et 4 jusqu'à ce que la phrase soit correcte et allez - à la Leçon 2.2. + à la Leçon 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 2.2 : PLUS DE COMMANDES D'EFFACEMENTS + Leçon 1.2.2 : PLUS DE COMMANDES D'EFFACEMENTS ** Tapez d$ pour effacer jusqu'à la fin de la ligne. ** @@ -240,11 +240,11 @@ NOTE : La lettre d apparaîtra sur la dernière ligne de l'écran lors de ---> Quelqu'un a tapé la fin de cette ligne deux fois. cette ligne deux fois. - 5. Allez à la Leçon 2.3 pour comprendre ce qui se passe. + 5. Allez à la Leçon 1.2.3 pour comprendre ce qui se passe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 2.3 : À PROPOS DES OPÉRATEURS ET DES MOUVEMENTS + Leçon 1.2.3 : À PROPOS DES OPÉRATEURS ET DES MOUVEMENTS Plusieurs commandes qui changent le texte sont constituées d'un opérateur @@ -270,7 +270,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 2.4 : UTILISER UN QUANTIFICATEUR AVEC UN MOUVEMENT + Leçon 1.2.4 : UTILISER UN QUANTIFICATEUR AVEC UN MOUVEMENT ** Taper un nombre avant un mouvement le répète autant de fois. ** @@ -288,11 +288,11 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le ---> Ceci est juste une ligne avec des mots où vous pouvez vous déplacer. - 6. Déplacez-vous à la Leçon 2.5. + 6. Déplacez-vous à la Leçon 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 2.5 : UTILISER UN QUANTIFICATEUR POUR EFFACER PLUS + Leçon 1.2.5 : UTILISER UN QUANTIFICATEUR POUR EFFACER PLUS ** Taper un nombre avec un opérateur le répète autant de fois. ** @@ -314,7 +314,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 2.6 : OPÉREZ SUR DES LIGNES + Leçon 1.2.6 : OPÉREZ SUR DES LIGNES ** Tapez dd pour effacer une ligne complète. ** @@ -338,7 +338,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 2.7 : L'ANNULATION + Leçon 1.2.7 : L'ANNULATION ** Tapez u pour annuler les dernières commandes. ** @@ -359,11 +359,11 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le ---> Coorrigez les erreurs suur ccette ligne et reemettez-les avvec 'annuler'. 8. Ce sont des commandes très utiles. Maintenant, allez au résumé de la - Leçon 2. + Leçon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RÉSUMÉ DE LA LEÇON 2 + RÉSUMÉ DE LA LEÇON 1.2 1. Pour effacer du curseur jusqu'au mot suivant tapez : dw @@ -392,7 +392,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 3.1 : LE COLLAGE + Leçon 1.3.1 : LE COLLAGE ** Tapez p pour placer après le curseur ce qui vient d'être effacé. ** @@ -415,7 +415,7 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 3.2 : LA COMMANDE DE REMPLACEMENT + Leçon 1.3.2 : LA COMMANDE DE REMPLACEMENT ** Tapez rx pour remplacer un caractère sous le curseur par x . ** @@ -432,14 +432,14 @@ NOTE : Le seul appui d'un mouvement en mode Normal, sans commande, déplace le ---> Quand cette ligne a été sauvie, quelqu'un a lait des faunes de frappe ! ---> Quand cette ligne a été saisie, quelqu'un a fait des fautes de frappe ! - 5. Maintenant, allez à la Leçon 3.3. + 5. Maintenant, allez à la Leçon 1.3.3. NOTE : N'oubliez pas que vous devriez apprendre par la pratique, pas par mémorisation. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 3.3 : L'OPÉRATEUR DE CHANGEMENT + Leçon 1.3.3 : L'OPÉRATEUR DE CHANGEMENT ** Pour changer jusqu'à la fin d'un mot, tapez ce .** @@ -463,7 +463,7 @@ Notez que ce efface le mot et vous place ensuite en mode Insertion. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 3.4 : PLUS DE CHANGEMENTS AVEC c + Leçon 1.3.4 : PLUS DE CHANGEMENTS AVEC c ** L'opérateur de changement fonctionne avec les mêmes déplacements @@ -491,7 +491,7 @@ NOTE : Vous pouvez utiliser la touche Retour Arrière pour corriger les ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RÉSUMÉ DE LA LEÇON 3 + RÉSUMÉ DE LA LEÇON 1.3 1. Pour remettre le texte qui a déjà été effacé, tapez p . Cela Place le @@ -514,7 +514,7 @@ Passez maintenant à la leçon suivante. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 4.1 : POSITION DU CURSEUR ET ÉTAT DU FICHIER + Leçon 1.4.1 : POSITION DU CURSEUR ET ÉTAT DU FICHIER ** Tapez CTRL-G pour afficher votre position dans le fichier et son état. @@ -541,7 +541,7 @@ NOTE : Vous pouvez peut-être voir le curseur en bas à droite de l'écran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 4.2 : LA RECHERCHE + Leçon 1.4.2 : LA RECHERCHE ** Tapez / suivi d'un texte pour rechercher ce texte. ** @@ -564,7 +564,7 @@ NOTE : Quand la recherche atteint la fin du fichier, elle reprend au début ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 4.3 : RECHERCHE DES PARENTHÈSES CORRESPONDANTES + Leçon 1.4.3 : RECHERCHE DES PARENTHÈSES CORRESPONDANTES ** Tapez % pour trouver des ), ] ou } correspondants. ** @@ -589,7 +589,7 @@ NOTE : Cette fonctionnalité est très utile lors du débogage d'un programme qu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 4.4 : LA COMMANDE DE SUBSTITUTION + Leçon 1.4.4 : LA COMMANDE DE SUBSTITUTION ** Tapez :s/ancien/nouveau/g pour remplacer 'ancien' par 'nouveau'. ** @@ -617,7 +617,7 @@ NOTE : Cette fonctionnalité est très utile lors du débogage d'un programme qu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RÉSUMÉ DE LA LEÇON 4 + RÉSUMÉ DE LA LEÇON 1.4 1. CTRL-G affiche la position dans le fichier et l'état de celui-ci. @@ -641,7 +641,7 @@ NOTE : Cette fonctionnalité est très utile lors du débogage d'un programme qu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 5.1 : COMMENT EXÉCUTER UNE COMMANDE EXTERNE + Leçon 1.5.1 : COMMENT EXÉCUTER UNE COMMANDE EXTERNE ** Tapez :! suivi d'une commande externe pour exécuter cette commande. ** @@ -664,7 +664,7 @@ NOTE : Toutes les commandes : doivent finir par la frappe de . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 5.2 : PLUS DE DÉTAILS SUR L'ENREGISTREMENT DE FICHIERS + Leçon 1.5.2 : PLUS DE DÉTAILS SUR L'ENREGISTREMENT DE FICHIERS ** Pour enregistrer les changements faits au texte, tapez :w FICHIER . ** @@ -690,7 +690,7 @@ NOTE : Si vous quittez Vim et le redémarrez de nouveau avec le fichier TEST, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 5.3 : SÉLECTION DU TEXTE À ENREGISTRER + Leçon 1.5.3 : SÉLECTION DU TEXTE À ENREGISTRER ** Pour enregistrer une portion du fichier, @@ -717,14 +717,14 @@ NOTE : L'appui de v démarre la sélection Visuelle. Vous pouvez déplacer le ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 5.4 : RÉCUPÉRATION ET FUSION DE FICHIERS + Leçon 1.5.4 : RÉCUPÉRATION ET FUSION DE FICHIERS ** Pour insérer le contenu d'un fichier, tapez :r FICHIER ** 1. Placez le curseur juste au-dessus de cette ligne. -NOTE : Après avoir exécuté l'étape 2 vous verrez du texte de la Leçon 5.3. +NOTE : Après avoir exécuté l'étape 2 vous verrez du texte de la Leçon 1.5.3. Puis déplacez-vous vers le bas pour voir cette leçon à nouveau. 2. Maintenant récupérez votre fichier TEST en utilisant la commande :r TEST @@ -732,7 +732,7 @@ NOTE : Après avoir exécuté l'étape 2 vous verrez du texte de la Leçon 5.3. Le fichier que vous récupérez est placé au-dessous de la ligne du curseur. 3. Pour vérifier que le fichier a bien été inséré, remontez et vérifiez - qu'il y a maintenant deux copies de la Leçon 5.3, l'originale et celle + qu'il y a maintenant deux copies de la Leçon 1.5.3, l'originale et celle contenue dans le fichier. NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple, @@ -741,7 +741,7 @@ NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RÉSUMÉ DE LA LEÇON 5 + RÉSUMÉ DE LA LEÇON 1.5 1. :!commande exécute une commande externe. @@ -765,7 +765,7 @@ NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 6.1 : LA COMMANDE D'OUVERTURE + Leçon 1.6.1 : LA COMMANDE D'OUVERTURE ** Tapez o pour ouvrir une ligne sous le curseur et y aller en Insertion. ** @@ -787,7 +787,7 @@ NOTE : Vous pouvez aussi lire la sortie d'une commande externe. Par exemple, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 6.2 : LA COMMANDE D'AJOUT + Leçon 1.6.2 : LA COMMANDE D'AJOUT ** Tapez a pour insérer du texte APRÈS le curseur. ** @@ -812,7 +812,7 @@ NOTE : a, i, A vont tous dans le même mode Insertion, la seule différence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 6.3 : UNE AUTRE MANIÈRE DE REMPLACER + Leçon 1.6.3 : UNE AUTRE MANIÈRE DE REMPLACER ** Tapez un R majuscule pour remplacer plus d'un caractère. ** @@ -837,7 +837,7 @@ NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 6.4 : COPIER ET COLLER DU TEXTE + Leçon 1.6.4 : COPIER ET COLLER DU TEXTE ** Utilisez l'opérateur y pour copier du texte et p pour le coller ** @@ -861,7 +861,7 @@ NOTE : Le mode Remplacement est comme le mode Insertion, mais tous les b) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 6.5 : RÉGLAGE DES OPTIONS + Leçon 1.6.5 : RÉGLAGE DES OPTIONS ** Réglons une option afin que la recherche et la substitution ignorent la @@ -889,7 +889,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RÉSUMÉ DE LA LEÇON 6 + RÉSUMÉ DE LA LEÇON 1.6 1. Taper o ouvre une ligne SOUS le curseur et démarre le mode Insertion. @@ -912,7 +912,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 7.1 : OBTENIR DE L'AIDE + Leçon 1.7.1 : OBTENIR DE L'AIDE ** Utiliser le système d'aide en ligne. ** @@ -940,7 +940,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 7.2 : CRÉER UN SCRIPT DE DÉMARRAGE + Leçon 1.7.2 : CRÉER UN SCRIPT DE DÉMARRAGE ** Activer les fonctionnalités de Vim. ** @@ -964,7 +964,7 @@ NOTE : Si vous voulez ignorer la casse uniquement pour une recherche, utilisez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leçon 7.3 : COMPLÈTEMENT + Leçon 1.7.3 : COMPLÈTEMENT ** Complètement de ligne de commande avec CTRL-D et ** @@ -990,7 +990,7 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RÉSUMÉ DE LA LEÇON 7 + RÉSUMÉ DE LA LEÇON 1.7 1. Tapez :help ou appuyez ou pour ouvrir la fenêtre d'aide. diff --git a/usr/share/vim/vim91/tutor/tutor.hr b/usr/share/vim/vim91/tutor/tutor1.hr similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.hr rename to usr/share/vim/vim91/tutor/tutor1.hr index fced37437e5..89bbdc239e4 100644 --- a/usr/share/vim/vim91/tutor/tutor.hr +++ b/usr/share/vim/vim91/tutor/tutor1.hr @@ -19,10 +19,10 @@ pravilno koristiti. Ako samo itate tekst, zaboraviti e te naredbe! Ako je CapsLock ukljuen ISKLJUITE ga. Pritiskajte tipku j kako - bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. + bi pomakli kursor sve dok Lekcija 1.1.1 ne ispuni ekran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.1: POMICANJE KURSORA + Lekcija 1.1.1: POMICANJE KURSORA ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** @@ -36,7 +36,7 @@ 2. Drite tipku (j) pritisnutom. Sada znate kako doi do sljedee lekcije. - 3. Koristei tipku j prijeite na sljedeu lekciju 1.2. + 3. Koristei tipku j prijeite na sljedeu lekciju 1.1.2. NAPOMENA: Ako niste sigurni to ste zapravo pritisnuli uvijek koristite tipku kako bi preli u Normal mod i onda pokuajte ponovno. @@ -45,7 +45,7 @@ NAPOMENA: Kursorske tipke rade isto. Kori bre, nakon to se jednom naviknete na njihovo koritenje. Stvarno! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.2: IZLAZ IZ VIM-a + Lekcija 1.1.2: IZLAZ IZ VIM-a !! UPOZORENJE: Prije izvoenja bilo kojeg koraka, @@ -65,10 +65,10 @@ NAPOMENA: Kursorske tipke rade isto. Kori NAPOMENA: :q! ponitava sve promjene koje ste napravili. U sljedeim lekcijama nauit e te kako promjene sauvati. - 5. Pomaknite kursor na Lekciju 1.3. + 5. Pomaknite kursor na Lekciju 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.3: PROMJENA TEKSTA - BRISANJE + Lekcija 1.1.3: PROMJENA TEKSTA - BRISANJE ** Pritisnite x za brisanje znaka pod kursorom. ** @@ -84,14 +84,14 @@ NAPOMENA: :q! poni ---> KKKravaa jee presskoila mmjeseccc. - 5. Nakon to ispravite liniju, prijeite na lekciju 1.4. + 5. Nakon to ispravite liniju, prijeite na lekciju 1.1.4. NAPOMENA: Koristei ovaj prirunik ne pokuavajte pamtiti ve uite primjenom. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.4: PROMJENA TEKSTA - UBACIVANJE + Lekcija 1.1.4: PROMJENA TEKSTA - UBACIVANJE ** Pritisnite i za ubacivanje teksta ispred kursora. ** @@ -114,7 +114,7 @@ NAPOMENA: Koriste ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.5: PROMJENA TEKSTA - DODAVANJE + Lekcija 1.1.5: PROMJENA TEKSTA - DODAVANJE ** Pritisnite A za dodavanje teksta. ** @@ -135,16 +135,16 @@ NAPOMENA: Koriste ---> Ima neto teksta koji ne Ima neto teksta koji nedostaje ba ovdje. - 5. Prijeite na lekciju 1.6. + 5. Prijeite na lekciju 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.6: PROMJENA DATOTEKE + Lekcija 1.1.6: PROMJENA DATOTEKE ** Koristite :wq za spremanje teksta i naputanje Vim-a. ** !! UPOZORENJE: Prije izvravanja bilo kojeg koraka, proitajte lekciju!! - 1. Izaite iz programa kao sto ste napravili u lekciji 1.2: :q! + 1. Izaite iz programa kao sto ste napravili u lekciji 1.1.2: :q! 2. Iz ljuske utipkajte sljedeu naredbu: vim tutor 'vim' je naredba pokretanja Vim editora, 'tutor' je ime datoteke koju @@ -160,7 +160,7 @@ NAPOMENA: Koriste izvrite ih. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1 SAETAK + Lekcija 1.1 SAETAK 1. Kursor se pomie strelicama ili pomou hjkl tipaka. @@ -183,7 +183,7 @@ NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i Nastavite itati Lekciju 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.1: NAREDBE BRISANJA + Lekcija 1.2.1: NAREDBE BRISANJA ** Tipkajte dw za brisanje rijei. ** @@ -203,10 +203,10 @@ NAPOMENA: Vim ---> Neke rijei smijeno ne pripadaju na papir ovoj reenici. 5. Ponovite korake 3 i 4 dok ne ispravite reenicu; - prijeite na Lekciju 2.2. + prijeite na Lekciju 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.2: JO BRISANJA + Lekcija 1.2.2: JO BRISANJA ** Otipkajte d$ za brisanje znakova do kraja linije. ** @@ -224,12 +224,12 @@ NAPOMENA: Vim ---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. - 5. Prijeite na Lekciju 2.3 za bolje objanjenje. + 5. Prijeite na Lekciju 1.2.3 za bolje objanjenje. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.3: UKRATKO O OPERATORIMA I POKRETIMA + Lekcija 1.2.3: UKRATKO O OPERATORIMA I POKRETIMA Mnogo naredbi koje mijenjaju tekst se sastoje od operatora i pokreta. @@ -252,7 +252,7 @@ NAPOMENA: Pritiskaju pomicati kursor kao to je navedeno. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.4: KORITENJE BROJANJA ZA POKRETE + Lekcija 1.2.4: KORITENJE BROJANJA ZA POKRETE ** Tipkanjem nekog broja prije pokreta, pokret se izvrava toliko puta. ** @@ -269,13 +269,13 @@ NAPOMENA: Pritiskaju ---> Reenica sa rijeima po kojoj moete pomicati kursor. - 6. Prijeite na Lekciju 2.5. + 6. Prijeite na Lekciju 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.5: KORITENJE BROJANJA ZA VEE BRISANJE + Lekcija 1.2.5: KORITENJE BROJANJA ZA VEE BRISANJE ** Tipkanje broja N s operatorom ponavlja ga N-puta. ** @@ -298,7 +298,7 @@ NAPOMENA: Pritiskaju ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.6: OPERIRANJE NAD LINIJAMA + Lekcija 1.2.6: OPERIRANJE NAD LINIJAMA ** Otipkajte dd za brisanje cijele linije. ** @@ -321,7 +321,7 @@ NAPOMENA: Pritiskaju ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.7: NAREDBA PONITENJA + Lekcija 1.2.7: NAREDBA PONITENJA ** Pritisnite u za ponitenje zadnje naredbe, U za cijelu liniju. ** @@ -341,10 +341,10 @@ NAPOMENA: Pritiskaju ---> Poopravite pogreke nna ovvoj liniji ii poonititeee ih. - 8. Vrlo korisne naredbe. Prijeite na saetak Lekcije 2. + 8. Vrlo korisne naredbe. Prijeite na saetak Lekcije 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2 SAETAK + Lekcija 1.2 SAETAK 1. Brisanje od kursora do sljedee rijei: dw @@ -367,7 +367,7 @@ NAPOMENA: Pritiskaju Za vraanja promjena, utipkajte: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.1: NAREDBA POSTAVI + Lekcija 1.3.1: NAREDBA POSTAVI ** p za unos prethodno izbrisanog teksta iza kursora. ** @@ -390,7 +390,7 @@ NAPOMENA: Pritiskaju ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.2: NAREDBA PROMJENE + Lekcija 1.3.2: NAREDBA PROMJENE ** Otipkajte rx za zamjenu slova ispod kursora sa slovom x . ** @@ -407,13 +407,13 @@ NAPOMENA: Pritiskaju ---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! ---> Kada je ova linija tipkana, netko je pritiskao krive tipke! - 5. Prijeite na Lekciju 3.2. + 5. Prijeite na Lekciju 1.3.2. NAPOMENA: Prisjetite da trebate uiti vjebanjem, ne pamenjem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.3: OPERATOR MIJENJANJA + Lekcija 1.3.3: OPERATOR MIJENJANJA ** Za mijenjanje do kraja rijei, istipkajte ce . ** @@ -436,7 +436,7 @@ NAPOMENA: Prisjetite da trebate u Primijetite da ce brie rije i postavlja Vim u Insert mod. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.4: JO MIJENJANJA KORITENJEM c + Lekcija 1.3.4: JO MIJENJANJA KORITENJEM c ** Naredba mijenjanja se koristi sa istim pokretima kao i brisanje. ** @@ -459,7 +459,7 @@ Primijetite da ce bri NAPOMENA: Moete koristiti Backspace za ispravljanje greaka. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3 SAETAK + Lekcija 1.3 SAETAK 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo @@ -482,7 +482,7 @@ Prije ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.1: POZICIJA KURSORA I STATUS DATOTEKE + Lekcija 1.4.1: POZICIJA KURSORA I STATUS DATOTEKE ** CTRL-G za prikaz pozicije kursora u datoteci i status datoteke. Pritisnite G za pomicanje kursora na neku liniju u datoteci. ** @@ -505,7 +505,7 @@ NAPOMENA: Mo 4. Ako ste spremni, izvrite korake od 1 do 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.2: NAREDBE TRAENJA + Lekcija 1.4.2: NAREDBE TRAENJA ** Otipkajte / i nakon toga izraz kojeg elite traiti. ** @@ -528,7 +528,7 @@ NAPOMENA: Mo NAPOMENA: Ako se traenjem doe do kraja datoteke nastavit e se od njenog poetka osim ako je postavka 'wrapscan' deaktivirana. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.3: TRAENJE PRIPADAJUE ZAGRADE + Lekcija 1.4.3: TRAENJE PRIPADAJUE ZAGRADE ** Otipkajte % za pronalazak pripadajue ), ] ili } . ** @@ -551,7 +551,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.4: NAREDBE ZAMIJENE + Lekcija 1.4.4: NAREDBE ZAMIJENE ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** @@ -574,7 +574,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju potvrdu zamjene. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4 SAETAK + Lekcija 1.4 SAETAK 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. @@ -597,7 +597,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju Za potvrdu svake zamjene dodajte 'c' :%s/staro/novo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.1: IZVRAVANJE VANJSKIH NAREDBI + Lekcija 1.5.1: IZVRAVANJE VANJSKIH NAREDBI ** Otipkajte :! sa vanjskom naredbom koju elite izvriti. ** @@ -620,7 +620,7 @@ NAPOMENA: Sve : naredbe se izvr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.2: VIE O SPREMANJU DATOTEKA + Lekcija 1.5.2: VIE O SPREMANJU DATOTEKA ** Za spremanje promjena, otipkajte :w IME_DATOTEKE. ** @@ -643,7 +643,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , ili (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.3: SPREMANJE OZNAENOG TEKSTA + Lekcija 1.5.3: SPREMANJE OZNAENOG TEKSTA ** Kako bi spremili dio datoteke, otipkajte v pokret :w IME_DATOTEKE ** @@ -666,14 +666,14 @@ NAPOMENA: Tipka v zapo unaokolo kako bi mijenjali veliinu oznaenog teksta. Moete koristiti i operatore. Npr, d e izbrisati oznaeni tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.4: UITAVANJE DATOTEKA + Lekcija 1.5.4: UITAVANJE DATOTEKA ** Za ubacivanje sadraja datoteke, otipkajte :r IME_DATOTEKE ** 1. Postavite kursor iznad ove linije. -NAPOMENA: Nakon to izvrite 2. korak vidjeti e te tekst iz Lekcije 5.3. +NAPOMENA: Nakon to izvrite 2. korak vidjeti e te tekst iz Lekcije 1.5.3. Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. 2. Uitajte vau TEST datoteku koristei naredbu :r TEST @@ -681,7 +681,7 @@ NAPOMENA: Nakon Sadraj uitane datoteke je ubaen liniju ispod kursora. 3. Kako bi provjerili da je datoteka uitana, vratite kursor unatrag i - primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. + primijetite dvije kopije Lekcije 1.5.3, originalnu i onu iz datoteke. NAPOMENA: Moete takoer uitati ispis vanjske naredbe. Npr, :r !ls e uitati ispis ls naredbe i postaviti ispis liniju ispod @@ -689,7 +689,7 @@ NAPOMENA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5 SAETAK + Lekcija 1.5 SAETAK 1. :!naredba izvrava vanjsku naredbu. @@ -712,7 +712,7 @@ NAPOMENA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.1: NAREDBA OTVORI + Lekcija 1.6.1: NAREDBA OTVORI ** Pritisnite o kako bi otvorili liniju ispod kursora @@ -735,7 +735,7 @@ NAPOMENA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.2: NAREDBA DODAJ + Lekcija 1.6.2: NAREDBA DODAJ ** Otipkajte a za dodavanje teksta IZA kursora. ** @@ -758,7 +758,7 @@ NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina razlika je u poziciji od koje e se tekst ubacivati. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.3: DRUGI NAIN MIJENJANJA + Lekcija 1.6.3: DRUGI NAIN MIJENJANJA ** Otipkajte veliko R kako bi zamijelili vie od jednog znaka. ** @@ -781,7 +781,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, svaki otipkani znak brie ve postojei. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA + Lekcija 1.6.4: KOPIRANJE I LIJEPLJENJE TEKSTA ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** @@ -804,7 +804,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, NAPOMENA: moete koristiti y kao operator; yw kopira jednu rije. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.5: MIJENJANJE POSTAVKI + Lekcija 1.6.5: MIJENJANJE POSTAVKI ** Postavka: naredbe traenja i zamijene ne razlikuju VELIKA i mala slova ** @@ -827,7 +827,7 @@ NAPOMENA: Za neozna NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi koristite \c u izrazu: /razlika\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6 SAETAK + Lekcija 1.6 SAETAK 1. Pritisnite o za otvaranje linije ISPOD kursora i prelazak u Insert mod. Pritisnite O za otvaranje linije IZNAD kursora. @@ -850,7 +850,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.1: DOBIVANJE POMOI + Lekcija 1.7.1: DOBIVANJE POMOI ** Koristite on-line sustav pomoi ** @@ -873,7 +873,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.2: PRAVLJENJE SKRIPTE + Lekcija 1.7.2: PRAVLJENJE SKRIPTE ** Aktivirajte Vim mogunosti ** @@ -896,7 +896,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi Za vie informacija otipkajte :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.3: AUTOMATSKO DOVRAVANJE + Lekcija 1.7.3: AUTOMATSKO DOVRAVANJE ** Dovravanje iz naredbene linije pomou CTRL-D i ** @@ -919,7 +919,7 @@ NAPOMENA: Mogu Naroito je korisno za :help naredbe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7 SAETAK + Lekcija 1.7 SAETAK 1. Otipkajte :help ili pritisnite ili za pomo. diff --git a/usr/share/vim/vim91/tutor/tutor.hr.cp1250 b/usr/share/vim/vim91/tutor/tutor1.hr.cp1250 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.hr.cp1250 rename to usr/share/vim/vim91/tutor/tutor1.hr.cp1250 index f968053b26d..3070ffd71cb 100644 --- a/usr/share/vim/vim91/tutor/tutor.hr.cp1250 +++ b/usr/share/vim/vim91/tutor/tutor1.hr.cp1250 @@ -19,10 +19,10 @@ pravilno koristiti. Ako samo itate tekst, zaboraviti e te naredbe! Ako je CapsLock ukljuen ISKLJUITE ga. Pritiskajte tipku j kako - bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. + bi pomakli kursor sve dok Lekcija 1.1.1 ne ispuni ekran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.1: POMICANJE KURSORA + Lekcija 1.1.1: POMICANJE KURSORA ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** @@ -36,7 +36,7 @@ 2. Drite tipku (j) pritisnutom. Sada znate kako doi do sljedee lekcije. - 3. Koristei tipku j prijeite na sljedeu lekciju 1.2. + 3. Koristei tipku j prijeite na sljedeu lekciju 1.1.2. NAPOMENA: Ako niste sigurni to ste zapravo pritisnuli uvijek koristite tipku kako bi preli u Normal mod i onda pokuajte ponovno. @@ -45,7 +45,7 @@ NAPOMENA: Kursorske tipke rade isto. Kori bre, nakon to se jednom naviknete na njihovo koritenje. Stvarno! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.2: IZLAZ IZ VIM-a + Lekcija 1.1.2: IZLAZ IZ VIM-a !! UPOZORENJE: Prije izvoenja bilo kojeg koraka, @@ -65,10 +65,10 @@ NAPOMENA: Kursorske tipke rade isto. Kori NAPOMENA: :q! ponitava sve promjene koje ste napravili. U sljedeim lekcijama nauit e te kako promjene sauvati. - 5. Pomaknite kursor na Lekciju 1.3. + 5. Pomaknite kursor na Lekciju 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.3: PROMJENA TEKSTA - BRISANJE + Lekcija 1.1.3: PROMJENA TEKSTA - BRISANJE ** Pritisnite x za brisanje znaka pod kursorom. ** @@ -84,14 +84,14 @@ NAPOMENA: :q! poni ---> KKKravaa jee presskoila mmjeseccc. - 5. Nakon to ispravite liniju, prijeite na lekciju 1.4. + 5. Nakon to ispravite liniju, prijeite na lekciju 1.1.4. NAPOMENA: Koristei ovaj prirunik ne pokuavajte pamtiti ve uite primjenom. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.4: PROMJENA TEKSTA - UBACIVANJE + Lekcija 1.1.4: PROMJENA TEKSTA - UBACIVANJE ** Pritisnite i za ubacivanje teksta ispred kursora. ** @@ -114,7 +114,7 @@ NAPOMENA: Koriste ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.5: PROMJENA TEKSTA - DODAVANJE + Lekcija 1.1.5: PROMJENA TEKSTA - DODAVANJE ** Pritisnite A za dodavanje teksta. ** @@ -135,16 +135,16 @@ NAPOMENA: Koriste ---> Ima neto teksta koji ne Ima neto teksta koji nedostaje ba ovdje. - 5. Prijeite na lekciju 1.6. + 5. Prijeite na lekciju 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.6: PROMJENA DATOTEKE + Lekcija 1.1.6: PROMJENA DATOTEKE ** Koristite :wq za spremanje teksta i naputanje Vim-a. ** !! UPOZORENJE: Prije izvravanja bilo kojeg koraka, proitajte lekciju!! - 1. Izaite iz programa kao sto ste napravili u lekciji 1.2: :q! + 1. Izaite iz programa kao sto ste napravili u lekciji 1.1.2: :q! 2. Iz ljuske utipkajte sljedeu naredbu: vim tutor 'vim' je naredba pokretanja Vim editora, 'tutor' je ime datoteke koju @@ -160,7 +160,7 @@ NAPOMENA: Koriste izvrite ih. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1 SAETAK + Lekcija 1.1 SAETAK 1. Kursor se pomie strelicama ili pomou hjkl tipaka. @@ -183,7 +183,7 @@ NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i Nastavite itati Lekciju 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.1: NAREDBE BRISANJA + Lekcija 1.2.1: NAREDBE BRISANJA ** Tipkajte dw za brisanje rijei. ** @@ -203,10 +203,10 @@ NAPOMENA: Vim ---> Neke rijei smijeno ne pripadaju na papir ovoj reenici. 5. Ponovite korake 3 i 4 dok ne ispravite reenicu; - prijeite na Lekciju 2.2. + prijeite na Lekciju 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.2: JO BRISANJA + Lekcija 1.2.2: JO BRISANJA ** Otipkajte d$ za brisanje znakova do kraja linije. ** @@ -224,12 +224,12 @@ NAPOMENA: Vim ---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. - 5. Prijeite na Lekciju 2.3 za bolje objanjenje. + 5. Prijeite na Lekciju 1.2.3 za bolje objanjenje. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.3: UKRATKO O OPERATORIMA I POKRETIMA + Lekcija 1.2.3: UKRATKO O OPERATORIMA I POKRETIMA Mnogo naredbi koje mijenjaju tekst se sastoje od operatora i pokreta. @@ -252,7 +252,7 @@ NAPOMENA: Pritiskaju pomicati kursor kao to je navedeno. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.4: KORITENJE BROJANJA ZA POKRETE + Lekcija 1.2.4: KORITENJE BROJANJA ZA POKRETE ** Tipkanjem nekog broja prije pokreta, pokret se izvrava toliko puta. ** @@ -269,13 +269,13 @@ NAPOMENA: Pritiskaju ---> Reenica sa rijeima po kojoj moete pomicati kursor. - 6. Prijeite na Lekciju 2.5. + 6. Prijeite na Lekciju 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.5: KORITENJE BROJANJA ZA VEE BRISANJE + Lekcija 1.2.5: KORITENJE BROJANJA ZA VEE BRISANJE ** Tipkanje broja N s operatorom ponavlja ga N-puta. ** @@ -298,7 +298,7 @@ NAPOMENA: Pritiskaju ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.6: OPERIRANJE NAD LINIJAMA + Lekcija 1.2.6: OPERIRANJE NAD LINIJAMA ** Otipkajte dd za brisanje cijele linije. ** @@ -321,7 +321,7 @@ NAPOMENA: Pritiskaju ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.7: NAREDBA PONITENJA + Lekcija 1.2.7: NAREDBA PONITENJA ** Pritisnite u za ponitenje zadnje naredbe, U za cijelu liniju. ** @@ -341,10 +341,10 @@ NAPOMENA: Pritiskaju ---> Poopravite pogreke nna ovvoj liniji ii poonititeee ih. - 8. Vrlo korisne naredbe. Prijeite na saetak Lekcije 2. + 8. Vrlo korisne naredbe. Prijeite na saetak Lekcije 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2 SAETAK + Lekcija 1.2 SAETAK 1. Brisanje od kursora do sljedee rijei: dw @@ -367,7 +367,7 @@ NAPOMENA: Pritiskaju Za vraanja promjena, utipkajte: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.1: NAREDBA POSTAVI + Lekcija 1.3.1: NAREDBA POSTAVI ** p za unos prethodno izbrisanog teksta iza kursora. ** @@ -390,7 +390,7 @@ NAPOMENA: Pritiskaju ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.2: NAREDBA PROMJENE + Lekcija 1.3.2: NAREDBA PROMJENE ** Otipkajte rx za zamjenu slova ispod kursora sa slovom x . ** @@ -407,13 +407,13 @@ NAPOMENA: Pritiskaju ---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! ---> Kada je ova linija tipkana, netko je pritiskao krive tipke! - 5. Prijeite na Lekciju 3.2. + 5. Prijeite na Lekciju 1.3.2. NAPOMENA: Prisjetite da trebate uiti vjebanjem, ne pamenjem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.3: OPERATOR MIJENJANJA + Lekcija 1.3.3: OPERATOR MIJENJANJA ** Za mijenjanje do kraja rijei, istipkajte ce . ** @@ -436,7 +436,7 @@ NAPOMENA: Prisjetite da trebate u Primijetite da ce brie rije i postavlja Vim u Insert mod. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.4: JO MIJENJANJA KORITENJEM c + Lekcija 1.3.4: JO MIJENJANJA KORITENJEM c ** Naredba mijenjanja se koristi sa istim pokretima kao i brisanje. ** @@ -459,7 +459,7 @@ Primijetite da ce bri NAPOMENA: Moete koristiti Backspace za ispravljanje greaka. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3 SAETAK + Lekcija 1.3 SAETAK 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo @@ -482,7 +482,7 @@ Prije ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.1: POZICIJA KURSORA I STATUS DATOTEKE + Lekcija 1.4.1: POZICIJA KURSORA I STATUS DATOTEKE ** CTRL-G za prikaz pozicije kursora u datoteci i status datoteke. Pritisnite G za pomicanje kursora na neku liniju u datoteci. ** @@ -505,7 +505,7 @@ NAPOMENA: Mo 4. Ako ste spremni, izvrite korake od 1 do 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.2: NAREDBE TRAENJA + Lekcija 1.4.2: NAREDBE TRAENJA ** Otipkajte / i nakon toga izraz kojeg elite traiti. ** @@ -528,7 +528,7 @@ NAPOMENA: Mo NAPOMENA: Ako se traenjem doe do kraja datoteke nastavit e se od njenog poetka osim ako je postavka 'wrapscan' deaktivirana. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.3: TRAENJE PRIPADAJUE ZAGRADE + Lekcija 1.4.3: TRAENJE PRIPADAJUE ZAGRADE ** Otipkajte % za pronalazak pripadajue ), ] ili } . ** @@ -551,7 +551,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.4: NAREDBE ZAMIJENE + Lekcija 1.4.4: NAREDBE ZAMIJENE ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** @@ -574,7 +574,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju potvrdu zamjene. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4 SAETAK + Lekcija 1.4 SAETAK 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. @@ -597,7 +597,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju Za potvrdu svake zamjene dodajte 'c' :%s/staro/novo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.1: IZVRAVANJE VANJSKIH NAREDBI + Lekcija 1.5.1: IZVRAVANJE VANJSKIH NAREDBI ** Otipkajte :! sa vanjskom naredbom koju elite izvriti. ** @@ -620,7 +620,7 @@ NAPOMENA: Sve : naredbe se izvr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.2: VIE O SPREMANJU DATOTEKA + Lekcija 1.5.2: VIE O SPREMANJU DATOTEKA ** Za spremanje promjena, otipkajte :w IME_DATOTEKE. ** @@ -643,7 +643,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , ili (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.3: SPREMANJE OZNAENOG TEKSTA + Lekcija 1.5.3: SPREMANJE OZNAENOG TEKSTA ** Kako bi spremili dio datoteke, otipkajte v pokret :w IME_DATOTEKE ** @@ -666,14 +666,14 @@ NAPOMENA: Tipka v zapo unaokolo kako bi mijenjali veliinu oznaenog teksta. Moete koristiti i operatore. Npr, d e izbrisati oznaeni tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.4: UITAVANJE DATOTEKA + Lekcija 1.5.4: UITAVANJE DATOTEKA ** Za ubacivanje sadraja datoteke, otipkajte :r IME_DATOTEKE ** 1. Postavite kursor iznad ove linije. -NAPOMENA: Nakon to izvrite 2. korak vidjeti e te tekst iz Lekcije 5.3. +NAPOMENA: Nakon to izvrite 2. korak vidjeti e te tekst iz Lekcije 1.5.3. Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. 2. Uitajte vau TEST datoteku koristei naredbu :r TEST @@ -681,7 +681,7 @@ NAPOMENA: Nakon Sadraj uitane datoteke je ubaen liniju ispod kursora. 3. Kako bi provjerili da je datoteka uitana, vratite kursor unatrag i - primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. + primijetite dvije kopije Lekcije 1.5.3, originalnu i onu iz datoteke. NAPOMENA: Moete takoer uitati ispis vanjske naredbe. Npr, :r !ls e uitati ispis ls naredbe i postaviti ispis liniju ispod @@ -689,7 +689,7 @@ NAPOMENA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5 SAETAK + Lekcija 1.5 SAETAK 1. :!naredba izvrava vanjsku naredbu. @@ -712,7 +712,7 @@ NAPOMENA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.1: NAREDBA OTVORI + Lekcija 1.6.1: NAREDBA OTVORI ** Pritisnite o kako bi otvorili liniju ispod kursora @@ -735,7 +735,7 @@ NAPOMENA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.2: NAREDBA DODAJ + Lekcija 1.6.2: NAREDBA DODAJ ** Otipkajte a za dodavanje teksta IZA kursora. ** @@ -758,7 +758,7 @@ NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina razlika je u poziciji od koje e se tekst ubacivati. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.3: DRUGI NAIN MIJENJANJA + Lekcija 1.6.3: DRUGI NAIN MIJENJANJA ** Otipkajte veliko R kako bi zamijelili vie od jednog znaka. ** @@ -781,7 +781,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, svaki otipkani znak brie ve postojei. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA + Lekcija 1.6.4: KOPIRANJE I LIJEPLJENJE TEKSTA ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** @@ -804,7 +804,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, NAPOMENA: moete koristiti y kao operator; yw kopira jednu rije. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.5: MIJENJANJE POSTAVKI + Lekcija 1.6.5: MIJENJANJE POSTAVKI ** Postavka: naredbe traenja i zamijene ne razlikuju VELIKA i mala slova ** @@ -827,7 +827,7 @@ NAPOMENA: Za neozna NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi koristite \c u izrazu: /razlika\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6 SAETAK + Lekcija 1.6 SAETAK 1. Pritisnite o za otvaranje linije ISPOD kursora i prelazak u Insert mod. Pritisnite O za otvaranje linije IZNAD kursora. @@ -850,7 +850,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.1: DOBIVANJE POMOI + Lekcija 1.7.1: DOBIVANJE POMOI ** Koristite on-line sustav pomoi ** @@ -873,7 +873,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.2: PRAVLJENJE SKRIPTE + Lekcija 1.7.2: PRAVLJENJE SKRIPTE ** Aktivirajte Vim mogunosti ** @@ -896,7 +896,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi Za vie informacija otipkajte :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.3: AUTOMATSKO DOVRAVANJE + Lekcija 1.7.3: AUTOMATSKO DOVRAVANJE ** Dovravanje iz naredbene linije pomou CTRL-D i ** @@ -919,7 +919,7 @@ NAPOMENA: Mogu Naroito je korisno za :help naredbe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7 SAETAK + Lekcija 1.7 SAETAK 1. Otipkajte :help ili pritisnite ili za pomo. diff --git a/usr/share/vim/vim91/tutor/tutor.hr.utf-8 b/usr/share/vim/vim91/tutor/tutor1.hr.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.hr.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.hr.utf-8 index 291def02084..cf3323a94e7 100644 --- a/usr/share/vim/vim91/tutor/tutor.hr.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.hr.utf-8 @@ -19,10 +19,10 @@ pravilno koristiti. Ako samo čitate tekst, zaboraviti će te naredbe! Ako je CapsLock uključen ISKLJUČITE ga. Pritiskajte tipku j kako - bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. + bi pomakli kursor sve dok Lekcija 1.1.1 ne ispuni ekran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.1: POMICANJE KURSORA + Lekcija 1.1.1: POMICANJE KURSORA ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** @@ -36,7 +36,7 @@ 2. Držite tipku (j) pritisnutom. Sada znate kako doći do sljedeće lekcije. - 3. Koristeći tipku j prijeđite na sljedeću lekciju 1.2. + 3. Koristeći tipku j prijeđite na sljedeću lekciju 1.1.2. NAPOMENA: Ako niste sigurni što ste zapravo pritisnuli uvijek koristite tipku kako bi prešli u Normal mod i onda pokušajte ponovno. @@ -45,7 +45,7 @@ NAPOMENA: Kursorske tipke rade isto. Korištenje hjkl tipaka je znatno brže, nakon što se jednom naviknete na njihovo korištenje. Stvarno! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.2: IZLAZ IZ VIM-a + Lekcija 1.1.2: IZLAZ IZ VIM-a !! UPOZORENJE: Prije izvođenja bilo kojeg koraka, @@ -65,10 +65,10 @@ NAPOMENA: Kursorske tipke rade isto. Korištenje hjkl tipaka je znatno NAPOMENA: :q! poništava sve promjene koje ste napravili. U sljedećim lekcijama naučit će te kako promjene sačuvati. - 5. Pomaknite kursor na Lekciju 1.3. + 5. Pomaknite kursor na Lekciju 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.3: PROMJENA TEKSTA - BRISANJE + Lekcija 1.1.3: PROMJENA TEKSTA - BRISANJE ** Pritisnite x za brisanje znaka pod kursorom. ** @@ -84,14 +84,14 @@ NAPOMENA: :q! poništava sve promjene koje ste napravili. ---> KKKravaa jee presskočila mmjeseccc. - 5. Nakon što ispravite liniju, prijeđite na lekciju 1.4. + 5. Nakon što ispravite liniju, prijeđite na lekciju 1.1.4. NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti već učite primjenom. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.4: PROMJENA TEKSTA - UBACIVANJE + Lekcija 1.1.4: PROMJENA TEKSTA - UBACIVANJE ** Pritisnite i za ubacivanje teksta ispred kursora. ** @@ -114,7 +114,7 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.5: PROMJENA TEKSTA - DODAVANJE + Lekcija 1.1.5: PROMJENA TEKSTA - DODAVANJE ** Pritisnite A za dodavanje teksta. ** @@ -135,16 +135,16 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti ---> Ima nešto teksta koji ne Ima nešto teksta koji nedostaje baš ovdje. - 5. Prijeđite na lekciju 1.6. + 5. Prijeđite na lekciju 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.6: PROMJENA DATOTEKE + Lekcija 1.1.6: PROMJENA DATOTEKE ** Koristite :wq za spremanje teksta i napuštanje Vim-a. ** !! UPOZORENJE: Prije izvršavanja bilo kojeg koraka, pročitajte lekciju!! - 1. Izađite iz programa kao sto ste napravili u lekciji 1.2: :q! + 1. Izađite iz programa kao sto ste napravili u lekciji 1.1.2: :q! 2. Iz ljuske utipkajte sljedeću naredbu: vim tutor 'vim' je naredba pokretanja Vim editora, 'tutor' je ime datoteke koju @@ -160,7 +160,7 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti izvršite ih. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1 SAŽETAK + Lekcija 1.1 SAŽETAK 1. Kursor se pomiče strelicama ili pomoću hjkl tipaka. @@ -183,7 +183,7 @@ NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i Nastavite čitati Lekciju 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.1: NAREDBE BRISANJA + Lekcija 1.2.1: NAREDBE BRISANJA ** Tipkajte dw za brisanje riječi. ** @@ -203,10 +203,10 @@ NAPOMENA: Vim će prikazati slovo d na zadnjoj liniji kad ga otipkate. ---> Neke riječi smiješno ne pripadaju na papir ovoj rečenici. 5. Ponovite korake 3 i 4 dok ne ispravite rečenicu; - prijeđite na Lekciju 2.2. + prijeđite na Lekciju 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.2: JOŠ BRISANJA + Lekcija 1.2.2: JOŠ BRISANJA ** Otipkajte d$ za brisanje znakova do kraja linije. ** @@ -224,12 +224,12 @@ NAPOMENA: Vim će prikazati slovo d na zadnjoj liniji kad ga otipkate. ---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. - 5. Prijeđite na Lekciju 2.3 za bolje objašnjenje. + 5. Prijeđite na Lekciju 1.2.3 za bolje objašnjenje. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.3: UKRATKO O OPERATORIMA I POKRETIMA + Lekcija 1.2.3: UKRATKO O OPERATORIMA I POKRETIMA Mnogo naredbi koje mijenjaju tekst se sastoje od operatora i pokreta. @@ -252,7 +252,7 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će pomicati kursor kao što je navedeno. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.4: KORIŠTENJE BROJANJA ZA POKRETE + Lekcija 1.2.4: KORIŠTENJE BROJANJA ZA POKRETE ** Tipkanjem nekog broja prije pokreta, pokret se izvršava toliko puta. ** @@ -269,13 +269,13 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će ---> Rečenica sa riječima po kojoj možete pomicati kursor. - 6. Prijeđite na Lekciju 2.5. + 6. Prijeđite na Lekciju 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.5: KORIŠTENJE BROJANJA ZA VEĆE BRISANJE + Lekcija 1.2.5: KORIŠTENJE BROJANJA ZA VEĆE BRISANJE ** Tipkanje broja N s operatorom ponavlja ga N-puta. ** @@ -298,7 +298,7 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.6: OPERIRANJE NAD LINIJAMA + Lekcija 1.2.6: OPERIRANJE NAD LINIJAMA ** Otipkajte dd za brisanje cijele linije. ** @@ -321,7 +321,7 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.7: NAREDBA PONIŠTENJA + Lekcija 1.2.7: NAREDBA PONIŠTENJA ** Pritisnite u za poništenje zadnje naredbe, U za cijelu liniju. ** @@ -341,10 +341,10 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će ---> Poopravite pogreške nna ovvoj liniji ii pooništiteee ih. - 8. Vrlo korisne naredbe. Prijeđite na sažetak Lekcije 2. + 8. Vrlo korisne naredbe. Prijeđite na sažetak Lekcije 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2 SAŽETAK + Lekcija 1.2 SAŽETAK 1. Brisanje od kursora do sljedeće riječi: dw @@ -367,7 +367,7 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će Za vraćanja promjena, utipkajte: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.1: NAREDBA POSTAVI + Lekcija 1.3.1: NAREDBA POSTAVI ** p za unos prethodno izbrisanog teksta iza kursora. ** @@ -390,7 +390,7 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.2: NAREDBA PROMJENE + Lekcija 1.3.2: NAREDBA PROMJENE ** Otipkajte rx za zamjenu slova ispod kursora sa slovom x . ** @@ -407,13 +407,13 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će ---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! ---> Kada je ova linija tipkana, netko je pritiskao krive tipke! - 5. Prijeđite na Lekciju 3.2. + 5. Prijeđite na Lekciju 1.3.2. NAPOMENA: Prisjetite da trebate učiti vježbanjem, ne pamćenjem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.3: OPERATOR MIJENJANJA + Lekcija 1.3.3: OPERATOR MIJENJANJA ** Za mijenjanje do kraja riječi, istipkajte ce . ** @@ -436,7 +436,7 @@ NAPOMENA: Prisjetite da trebate učiti vježbanjem, ne pamćenjem. Primijetite da ce briše riječ i postavlja Vim u Insert mod. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.4: JOŠ MIJENJANJA KORIŠTENJEM c + Lekcija 1.3.4: JOŠ MIJENJANJA KORIŠTENJEM c ** Naredba mijenjanja se koristi sa istim pokretima kao i brisanje. ** @@ -459,7 +459,7 @@ Primijetite da ce briše riječ i postavlja Vim u Insert mod. NAPOMENA: Možete koristiti Backspace za ispravljanje grešaka. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3 SAŽETAK + Lekcija 1.3 SAŽETAK 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo @@ -482,7 +482,7 @@ Prijeđite na sljedeću lekciju. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.1: POZICIJA KURSORA I STATUS DATOTEKE + Lekcija 1.4.1: POZICIJA KURSORA I STATUS DATOTEKE ** CTRL-G za prikaz pozicije kursora u datoteci i status datoteke. Pritisnite G za pomicanje kursora na neku liniju u datoteci. ** @@ -505,7 +505,7 @@ NAPOMENA: Možete vidjeti poziciju kursora u donjem desnom kutu ako 4. Ako ste spremni, izvršite korake od 1 do 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.2: NAREDBE TRAŽENJA + Lekcija 1.4.2: NAREDBE TRAŽENJA ** Otipkajte / i nakon toga izraz kojeg želite tražiti. ** @@ -528,7 +528,7 @@ NAPOMENA: Možete vidjeti poziciju kursora u donjem desnom kutu ako NAPOMENA: Ako se traženjem dođe do kraja datoteke nastavit će se od njenog početka osim ako je postavka 'wrapscan' deaktivirana. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.3: TRAŽENJE PRIPADAJUĆE ZAGRADE + Lekcija 1.4.3: TRAŽENJE PRIPADAJUĆE ZAGRADE ** Otipkajte % za pronalazak pripadajuće ), ] ili } . ** @@ -551,7 +551,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.4: NAREDBE ZAMIJENE + Lekcija 1.4.4: NAREDBE ZAMIJENE ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** @@ -574,7 +574,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! potvrdu zamjene. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4 SAŽETAK + Lekcija 1.4 SAŽETAK 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. @@ -597,7 +597,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! Za potvrdu svake zamjene dodajte 'c' :%s/staro/novo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.1: IZVRŠAVANJE VANJSKIH NAREDBI + Lekcija 1.5.1: IZVRŠAVANJE VANJSKIH NAREDBI ** Otipkajte :! sa vanjskom naredbom koju želite izvršiti. ** @@ -620,7 +620,7 @@ NAPOMENA: Sve : naredbe se izvršavaju nakon što pritisnete ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.2: VIŠE O SPREMANJU DATOTEKA + Lekcija 1.5.2: VIŠE O SPREMANJU DATOTEKA ** Za spremanje promjena, otipkajte :w IME_DATOTEKE. ** @@ -643,7 +643,7 @@ NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , ili (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.3: SPREMANJE OZNAČENOG TEKSTA + Lekcija 1.5.3: SPREMANJE OZNAČENOG TEKSTA ** Kako bi spremili dio datoteke, otipkajte v pokret :w IME_DATOTEKE ** @@ -666,14 +666,14 @@ NAPOMENA: Tipka v započinje Vizualno označavanje. Možete pomicati kursor unaokolo kako bi mijenjali veličinu označenog teksta. Možete koristiti i operatore. Npr, d će izbrisati označeni tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.4: UČITAVANJE DATOTEKA + Lekcija 1.5.4: UČITAVANJE DATOTEKA ** Za ubacivanje sadržaja datoteke, otipkajte :r IME_DATOTEKE ** 1. Postavite kursor iznad ove linije. -NAPOMENA: Nakon što izvršite 2. korak vidjeti će te tekst iz Lekcije 5.3. +NAPOMENA: Nakon što izvršite 2. korak vidjeti će te tekst iz Lekcije 1.5.3. Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. 2. Učitajte vašu TEST datoteku koristeći naredbu :r TEST @@ -681,7 +681,7 @@ NAPOMENA: Nakon što izvršite 2. korak vidjeti će te tekst iz Lekcije 5.3. Sadržaj učitane datoteke je ubačen liniju ispod kursora. 3. Kako bi provjerili da je datoteka učitana, vratite kursor unatrag i - primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. + primijetite dvije kopije Lekcije 1.5.3, originalnu i onu iz datoteke. NAPOMENA: Možete također učitati ispis vanjske naredbe. Npr, :r !ls će učitati ispis ls naredbe i postaviti ispis liniju ispod @@ -689,7 +689,7 @@ NAPOMENA: Možete također učitati ispis vanjske naredbe. Npr, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5 SAŽETAK + Lekcija 1.5 SAŽETAK 1. :!naredba izvršava vanjsku naredbu. @@ -712,7 +712,7 @@ NAPOMENA: Možete također učitati ispis vanjske naredbe. Npr, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.1: NAREDBA OTVORI + Lekcija 1.6.1: NAREDBA OTVORI ** Pritisnite o kako bi otvorili liniju ispod kursora @@ -735,7 +735,7 @@ NAPOMENA: Možete također učitati ispis vanjske naredbe. Npr, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.2: NAREDBA DODAJ + Lekcija 1.6.2: NAREDBA DODAJ ** Otipkajte a za dodavanje teksta IZA kursora. ** @@ -758,7 +758,7 @@ NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina razlika je u poziciji od koje će se tekst ubacivati. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.3: DRUGI NAČIN MIJENJANJA + Lekcija 1.6.3: DRUGI NAČIN MIJENJANJA ** Otipkajte veliko R kako bi zamijelili više od jednog znaka. ** @@ -781,7 +781,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, svaki otipkani znak briše već postojeći. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA + Lekcija 1.6.4: KOPIRANJE I LIJEPLJENJE TEKSTA ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** @@ -804,7 +804,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, NAPOMENA: možete koristiti y kao operator; yw kopira jednu riječ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.5: MIJENJANJE POSTAVKI + Lekcija 1.6.5: MIJENJANJE POSTAVKI ** Postavka: naredbe traženja i zamijene ne razlikuju VELIKA i mala slova ** @@ -827,7 +827,7 @@ NAPOMENA: Za neoznačavanje pronađenih izraza otipkajte: :nohlsearch NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi koristite \c u izrazu: /razlika\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6 SAŽETAK + Lekcija 1.6 SAŽETAK 1. Pritisnite o za otvaranje linije ISPOD kursora i prelazak u Insert mod. Pritisnite O za otvaranje linije IZNAD kursora. @@ -850,7 +850,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.1: DOBIVANJE POMOĆI + Lekcija 1.7.1: DOBIVANJE POMOĆI ** Koristite on-line sustav pomoći ** @@ -873,7 +873,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.2: PRAVLJENJE SKRIPTE + Lekcija 1.7.2: PRAVLJENJE SKRIPTE ** Aktivirajte Vim mogućnosti ** @@ -896,7 +896,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi Za više informacija otipkajte :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.3: AUTOMATSKO DOVRŠAVANJE + Lekcija 1.7.3: AUTOMATSKO DOVRŠAVANJE ** Dovršavanje iz naredbene linije pomoću CTRL-D i ** @@ -919,7 +919,7 @@ NAPOMENA: Moguće je dopuniti mnoge naredbe. Koristite CTRL-D i . Naročito je korisno za :help naredbe. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7 SAŽETAK + Lekcija 1.7 SAŽETAK 1. Otipkajte :help ili pritisnite ili za pomoć. diff --git a/usr/share/vim/vim91/tutor/tutor.hu.cp1250 b/usr/share/vim/vim91/tutor/tutor1.hu similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.hu.cp1250 rename to usr/share/vim/vim91/tutor/tutor1.hu index d895e197406..2e86f80bbe0 100644 --- a/usr/share/vim/vim91/tutor/tutor.hu.cp1250 +++ b/usr/share/vim/vim91/tutor/tutor1.hu @@ -20,11 +20,11 @@ hogy megfelelen megtanulja azokat. Ha csak olvassa, elfelejti! Most bizonyosodjon, meg, hogy a Caps-Lock gombja NINCS lenyomva, s - Nyomja meg megfelel szmszor a j gombot, hogy az 1.1-es + Nyomja meg megfelel szmszor a j gombot, hogy az 1.1.1-es lecke teljesen a kpernyn legyen! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.1. lecke: A KURZOR MOZGATSA + 1.1.1. lecke: A KURZOR MOZGATSA ** A kurzor mozgatshoz nyomja meg a h,j,k,l gombokat az albbi szerint. ** @@ -38,7 +38,7 @@ 2. Tartsa lenyomva a lefelt (j), akkor ismtldik! ---> Most tudja, hogyan mehet a kvetkez leckre. - 3. A lefel gomb hasznlatval menjen a 1.2. leckre! + 3. A lefel gomb hasznlatval menjen a 1.1.2. leckre! Megj: Ha nem biztos benne, mit nyomott meg, nyomja meg az -et, hogy norml mdba kerljn, s ismtelje meg a parancsot! @@ -47,7 +47,7 @@ Megj: A kurzor gomboknak is m sokkal gyorsabban tud, mozogni, ha hozzszokik. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.2. lecke: BE S KILPS A VIMBL + 1.1.2. lecke: BE S KILPS A VIMBL !! MEGJ: Mieltt vgrehajtja az albbi lpseket, olvassa vgig a leckt !! @@ -69,9 +69,9 @@ Megj: A kurzor gomboknak is m 4. Ha megjegyezte a lpseket s biztos magban, hajtsa vgre a lpseket 1-tl 3-ig, hogy kilpjen s visszatrjen a szerkesztbe. Azutn - menjen az 1.3. leckre. + menjen az 1.1.3. leckre. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.3. lecke: SZVEG SZERKESZTSE - TRLS + 1.1.3. lecke: SZVEG SZERKESZTSE - TRLS ** Norml mdban nyomjon x-et, hogy a kurzor alatti karaktert trlje. ** @@ -87,13 +87,13 @@ Megj: A kurzor gomboknak is m ---> szi jjjell izziik aa galaggonya rruuhja. - 5. Ha a sor helyes, ugorjon a 1.4. leckre. + 5. Ha a sor helyes, ugorjon a 1.1.4. leckre. MEGJ: A tanuls sorn ne memorizlni prbljon, hanem hasznlat sorn tanuljon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.4. lecke: SZVEG SZERKESZTSE - BESZRS + 1.1.4. lecke: SZVEG SZERKESZTSE - BESZRS ** Norml mdban i megnyomsval lehet beilleszteni. ** @@ -116,7 +116,7 @@ MEGJ: A tanul ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1. LECKE SSZEFOGLALJA + 1.1. LECKE SSZEFOGLALJA 1. A kurzort vagy a nyilakkal vagy a hjkl gombokkal mozgathatja. @@ -135,11 +135,11 @@ MEGJ: A tanul MEGJ: Az megnyomsa norml mdba viszi, vagy megszakt egy nem befejezett rszben befejezett parancsot. -Most folytassuk a 2. leckvel! +Most folytassuk a 1.2. leckvel! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.1. lecke: TRL UTASTSOK + 1.2.1. lecke: TRL UTASTSOK ** dw trl a sz vgig. ** @@ -158,10 +158,10 @@ Most folytassuk a 2. leck ---> Pr sz kutya nem uhu illik pingvin a mondatba tehn. - 5. Ismtelje a 3 s 4 kztti utastsokat amg kell s ugorjon a 2.2 leckre! + 5. Ismtelje a 3 s 4 kztti utastsokat amg kell s ugorjon a 1.2.2 leckre! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.2. lecke: MG TBB TRL UTASTS + 1.2.2. lecke: MG TBB TRL UTASTS ** d$ bersval a sor vgig trlhet. ** @@ -177,14 +177,14 @@ Most folytassuk a 2. leck ---> Valaki a sor vgt ktszer gpelte be. ktszer gpelte be. - 5. Menjen a 2.3. leckre, hogy megrtse mi trtnt! + 5. Menjen a 1.2.3. leckre, hogy megrtse mi trtnt! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.3. lecke: UTASTSOKRL S MOZGSOKRL + 1.2.3. lecke: UTASTSOKRL S MOZGSOKRL A d (delete=trls) utasts formja a kvetkez: @@ -207,7 +207,7 @@ MEGJ: Csup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.4. lecke: EGSZ SOROK FELDOLGOZSA + 1.2.4. lecke: EGSZ SOROK FELDOLGOZSA ** dd bersval trlheti az egsz sort. ** @@ -230,7 +230,7 @@ MEGJ: Csup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.5. lecke: A VISSZAVONS (UNDO) PARANCS + 1.2.5. lecke: A VISSZAVONS (UNDO) PARANCS ** u gpelsvel visszavonhat az utols parancs, U az egsz sort helyrelltja. ** @@ -247,12 +247,12 @@ MEGJ: Csup ---> Javtsa a hhibkaat ebbben a sooorban majd lltsa visszaaa az eredetit. - 8. Ezek nagyon hasznos parancsok. Most ugorjon a 2. lecke sszefoglaljra. + 8. Ezek nagyon hasznos parancsok. Most ugorjon a 1.2. lecke sszefoglaljra. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2. LECKE SSZEFOGLALJA + 1.2. LECKE SSZEFOGLALJA 1. Trls a kurzortl a sz vgig: dw @@ -275,7 +275,7 @@ MEGJ: Csup Visszavonsok visszavonsa: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.1. lecke: A BEILLESZTS (PUT) PARANCS + 1.3.1. lecke: A BEILLESZTS (PUT) PARANCS ** p letsvel az utolsnak trltet a kurzor utn illeszthetjk. ** @@ -299,7 +299,7 @@ MEGJ: Csup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.2. lecke: AZ TRS (REPLACE) PARANCS + 1.3.2. lecke: AZ TRS (REPLACE) PARANCS ** r s a karakterek letsvel a kurzor alatti karaktert megvltoztatjuk. ** @@ -315,13 +315,13 @@ MEGJ: Csup ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ---> When this line was typed in, someone pressed some wrong keys! - 5. Menjnk a 3.2. leckre! + 5. Menjnk a 1.3.2. leckre! MEGJ: Emlkezzen, hogy nem memorizlssal, hanem gyakorlssal tanuljon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.3. lecke: A CSERE (CHANGE) PARANCS + 1.3.3. lecke: A CSERE (CHANGE) PARANCS ** A sz egy rsznek megvltoztatshoz rjuk: cw . ** @@ -347,7 +347,7 @@ Vegy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.4. lecke: TBBFLE VLTOZTATS c-VEL + 1.3.4. lecke: TBBFLE VLTOZTATS c-VEL ** A c utasts hasznlhat ugyanazokkal az mozgsokkal mint a trls ** @@ -370,7 +370,7 @@ Vegy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3. LECKE SSZEFOGLALJA + 1.3. LECKE SSZEFOGLALJA 1. A mr trlt sort beillesztshez nyomjunk p-t. Ez a trlt szveget @@ -392,7 +392,7 @@ Ugorjunk a k ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.1. lecke: HELY S FJLLLAPOT + 1.4.1. lecke: HELY S FJLLLAPOT ** CTRL-g megnyomsval megnzhetjk a helynket a fjlban s a fjl llapott. @@ -415,7 +415,7 @@ Ugorjunk a k ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.2. lecke: A KERESS (SEARCH) PARANCS + 1.4.2. lecke: A KERESS (SEARCH) PARANCS ** / majd a kvnt kifejezs bersval kereshetjk meg a kifejezst. ** @@ -436,7 +436,7 @@ Megj: Ha a keres ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.3. lecke: ZRJELEK PRJNAK KERESSE + 1.4.3. lecke: ZRJELEK PRJNAK KERESSE ** % letsvel megtalljuk a ),], vagy } prjt. ** @@ -459,7 +459,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.4. lecke: A HIBK KIJAVTSNAK EGY MDJA + 1.4.4. lecke: A HIBK KIJAVTSNAK EGY MDJA ** :s/rgi/j/g begpelsvel az 'j'-ra cserljk a 'rgi'-t. ** @@ -483,7 +483,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4. LECKE SSZEFOGLALJA + 1.4. LECKE SSZEFOGLALJA 1. Ctrl-g kirja az kurzor helyt a fjlban s a fjl llapott. @@ -507,7 +507,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.1. lecke: KLS PARANCS VGREHAJTSA + 1.5.1. lecke: KLS PARANCS VGREHAJTSA ** :! utn kls parancsot rva vgrehajtdik a parancs. ** @@ -530,7 +530,7 @@ Megj: Minden : parancs ut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.2. lecke: BVEBBEN A FJLOK RSRL + 1.5.2. lecke: BVEBBEN A FJLOK RSRL ** A fjlok vltozsait gy rhatjuk ki :w FJLNV. ** @@ -554,7 +554,7 @@ Megj: Ha ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.3. lecke: EGY KIVLASZTOTT RSZ KIRSA + 1.5.3. lecke: EGY KIVLASZTOTT RSZ KIRSA ** A fjl egy rsznek kirshoz rja :#,# w FJLNV ** @@ -579,7 +579,7 @@ Megj: Ha ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.4. lecke: FJLOK VISSZALLTSA S SSZEFZSE + 1.5.4. lecke: FJLOK VISSZALLTSA S SSZEFZSE ** Egy fjl tartalmnak beillesztshez rja :r FJLNV ** @@ -588,7 +588,7 @@ Megj: Ha 2. Helyezze a kurzort ennek az oldalnak a tetejre. -MEGJ: A 3. lps utn az 5.3. leckt fogja ltni. Azutn LEFEL indulva +MEGJ: A 3. lps utn az 1.5.3. leckt fogja ltni. Azutn LEFEL indulva keresse meg ismt ezt a leckt. 3. Most szrja be a TESZT nev fjlt a :r TESZT paranccsal, ahol @@ -597,13 +597,13 @@ MEGJ: A 3. l MEGJ: A fjl, amit beillesztett a kurzora alatt helyezkedik el. 4. Hogy ellenrizzk, hogy a fjlt tnyleg beillesztettk, menjen - vissza, s nzze meg, hogy ktszer szerepel az 5.3. lecke! Az eredeti + vissza, s nzze meg, hogy ktszer szerepel az 1.5.3. lecke! Az eredeti mellett a fjlbl bemsolt is ott van. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5. LECKE SSZEFOGLALJA + 1.5. LECKE SSZEFOGLALJA 1. :!parancs vgrehajt egy kls utastst. @@ -626,7 +626,7 @@ MEGJ: A f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.1. lecke: A MEGNYITS (OPEN) PARANCS + 1.6.1. lecke: A MEGNYITS (OPEN) PARANCS ** o bersval nyit egy j sort a kurzor alatt s beszr mdba vlt ** @@ -651,7 +651,7 @@ ezen a soron ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.2. lecke: AZ APPEND PARANCS + 1.6.2. lecke: AZ APPEND PARANCS ** a lenyomsval a kurzor UTN szrhatunk szveget. ** @@ -677,7 +677,7 @@ Megj: A Vimben a sor legv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.3. lecke: AZ TRS MSIK VLTOZATA + 1.6.3. lecke: AZ TRS MSIK VLTOZATA ** Nagy R bersval rhat fell tbb mint egy karaktert. ** @@ -701,7 +701,7 @@ Megj: A Vimben a sor legv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.4. lecke: BELLTSOK + 1.6.4. lecke: BELLTSOK ** lltsuk be, hogy a keress s a helyettests ne fggjn kis/NAGYbetktl ** @@ -724,7 +724,7 @@ Megj: A Vimben a sor legv 6. A kiemelst szntessk meg albbi utastsok egyikvel: :set nohls vagy :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6. LECKE SSZEFOGLALJA + 1.6. LECKE SSZEFOGLALJA 1. o bersval j sort nyitunk meg a sor ALATT s a kurzor az j @@ -747,7 +747,7 @@ Megj: A Vimben a sor legv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7. lecke: AZ ON-LINE SG PARANCSAI + 1.7. lecke: AZ ON-LINE SG PARANCSAI ** Az online sgrendszer hasznlata ** @@ -770,7 +770,7 @@ Megj: A Vimben a sor legv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 8. lecke: INDTSZKRIPT RSA + 1.8. lecke: INDTSZKRIPT RSA ** A Vim lehetsgeinek belltsa ** diff --git a/usr/share/vim/vim91/tutor/tutor.hu b/usr/share/vim/vim91/tutor/tutor1.hu.cp1250 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.hu rename to usr/share/vim/vim91/tutor/tutor1.hu.cp1250 index d895e197406..2e86f80bbe0 100644 --- a/usr/share/vim/vim91/tutor/tutor.hu +++ b/usr/share/vim/vim91/tutor/tutor1.hu.cp1250 @@ -20,11 +20,11 @@ hogy megfelelen megtanulja azokat. Ha csak olvassa, elfelejti! Most bizonyosodjon, meg, hogy a Caps-Lock gombja NINCS lenyomva, s - Nyomja meg megfelel szmszor a j gombot, hogy az 1.1-es + Nyomja meg megfelel szmszor a j gombot, hogy az 1.1.1-es lecke teljesen a kpernyn legyen! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.1. lecke: A KURZOR MOZGATSA + 1.1.1. lecke: A KURZOR MOZGATSA ** A kurzor mozgatshoz nyomja meg a h,j,k,l gombokat az albbi szerint. ** @@ -38,7 +38,7 @@ 2. Tartsa lenyomva a lefelt (j), akkor ismtldik! ---> Most tudja, hogyan mehet a kvetkez leckre. - 3. A lefel gomb hasznlatval menjen a 1.2. leckre! + 3. A lefel gomb hasznlatval menjen a 1.1.2. leckre! Megj: Ha nem biztos benne, mit nyomott meg, nyomja meg az -et, hogy norml mdba kerljn, s ismtelje meg a parancsot! @@ -47,7 +47,7 @@ Megj: A kurzor gomboknak is m sokkal gyorsabban tud, mozogni, ha hozzszokik. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.2. lecke: BE S KILPS A VIMBL + 1.1.2. lecke: BE S KILPS A VIMBL !! MEGJ: Mieltt vgrehajtja az albbi lpseket, olvassa vgig a leckt !! @@ -69,9 +69,9 @@ Megj: A kurzor gomboknak is m 4. Ha megjegyezte a lpseket s biztos magban, hajtsa vgre a lpseket 1-tl 3-ig, hogy kilpjen s visszatrjen a szerkesztbe. Azutn - menjen az 1.3. leckre. + menjen az 1.1.3. leckre. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.3. lecke: SZVEG SZERKESZTSE - TRLS + 1.1.3. lecke: SZVEG SZERKESZTSE - TRLS ** Norml mdban nyomjon x-et, hogy a kurzor alatti karaktert trlje. ** @@ -87,13 +87,13 @@ Megj: A kurzor gomboknak is m ---> szi jjjell izziik aa galaggonya rruuhja. - 5. Ha a sor helyes, ugorjon a 1.4. leckre. + 5. Ha a sor helyes, ugorjon a 1.1.4. leckre. MEGJ: A tanuls sorn ne memorizlni prbljon, hanem hasznlat sorn tanuljon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.4. lecke: SZVEG SZERKESZTSE - BESZRS + 1.1.4. lecke: SZVEG SZERKESZTSE - BESZRS ** Norml mdban i megnyomsval lehet beilleszteni. ** @@ -116,7 +116,7 @@ MEGJ: A tanul ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1. LECKE SSZEFOGLALJA + 1.1. LECKE SSZEFOGLALJA 1. A kurzort vagy a nyilakkal vagy a hjkl gombokkal mozgathatja. @@ -135,11 +135,11 @@ MEGJ: A tanul MEGJ: Az megnyomsa norml mdba viszi, vagy megszakt egy nem befejezett rszben befejezett parancsot. -Most folytassuk a 2. leckvel! +Most folytassuk a 1.2. leckvel! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.1. lecke: TRL UTASTSOK + 1.2.1. lecke: TRL UTASTSOK ** dw trl a sz vgig. ** @@ -158,10 +158,10 @@ Most folytassuk a 2. leck ---> Pr sz kutya nem uhu illik pingvin a mondatba tehn. - 5. Ismtelje a 3 s 4 kztti utastsokat amg kell s ugorjon a 2.2 leckre! + 5. Ismtelje a 3 s 4 kztti utastsokat amg kell s ugorjon a 1.2.2 leckre! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.2. lecke: MG TBB TRL UTASTS + 1.2.2. lecke: MG TBB TRL UTASTS ** d$ bersval a sor vgig trlhet. ** @@ -177,14 +177,14 @@ Most folytassuk a 2. leck ---> Valaki a sor vgt ktszer gpelte be. ktszer gpelte be. - 5. Menjen a 2.3. leckre, hogy megrtse mi trtnt! + 5. Menjen a 1.2.3. leckre, hogy megrtse mi trtnt! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.3. lecke: UTASTSOKRL S MOZGSOKRL + 1.2.3. lecke: UTASTSOKRL S MOZGSOKRL A d (delete=trls) utasts formja a kvetkez: @@ -207,7 +207,7 @@ MEGJ: Csup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.4. lecke: EGSZ SOROK FELDOLGOZSA + 1.2.4. lecke: EGSZ SOROK FELDOLGOZSA ** dd bersval trlheti az egsz sort. ** @@ -230,7 +230,7 @@ MEGJ: Csup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.5. lecke: A VISSZAVONS (UNDO) PARANCS + 1.2.5. lecke: A VISSZAVONS (UNDO) PARANCS ** u gpelsvel visszavonhat az utols parancs, U az egsz sort helyrelltja. ** @@ -247,12 +247,12 @@ MEGJ: Csup ---> Javtsa a hhibkaat ebbben a sooorban majd lltsa visszaaa az eredetit. - 8. Ezek nagyon hasznos parancsok. Most ugorjon a 2. lecke sszefoglaljra. + 8. Ezek nagyon hasznos parancsok. Most ugorjon a 1.2. lecke sszefoglaljra. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2. LECKE SSZEFOGLALJA + 1.2. LECKE SSZEFOGLALJA 1. Trls a kurzortl a sz vgig: dw @@ -275,7 +275,7 @@ MEGJ: Csup Visszavonsok visszavonsa: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.1. lecke: A BEILLESZTS (PUT) PARANCS + 1.3.1. lecke: A BEILLESZTS (PUT) PARANCS ** p letsvel az utolsnak trltet a kurzor utn illeszthetjk. ** @@ -299,7 +299,7 @@ MEGJ: Csup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.2. lecke: AZ TRS (REPLACE) PARANCS + 1.3.2. lecke: AZ TRS (REPLACE) PARANCS ** r s a karakterek letsvel a kurzor alatti karaktert megvltoztatjuk. ** @@ -315,13 +315,13 @@ MEGJ: Csup ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ---> When this line was typed in, someone pressed some wrong keys! - 5. Menjnk a 3.2. leckre! + 5. Menjnk a 1.3.2. leckre! MEGJ: Emlkezzen, hogy nem memorizlssal, hanem gyakorlssal tanuljon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.3. lecke: A CSERE (CHANGE) PARANCS + 1.3.3. lecke: A CSERE (CHANGE) PARANCS ** A sz egy rsznek megvltoztatshoz rjuk: cw . ** @@ -347,7 +347,7 @@ Vegy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.4. lecke: TBBFLE VLTOZTATS c-VEL + 1.3.4. lecke: TBBFLE VLTOZTATS c-VEL ** A c utasts hasznlhat ugyanazokkal az mozgsokkal mint a trls ** @@ -370,7 +370,7 @@ Vegy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3. LECKE SSZEFOGLALJA + 1.3. LECKE SSZEFOGLALJA 1. A mr trlt sort beillesztshez nyomjunk p-t. Ez a trlt szveget @@ -392,7 +392,7 @@ Ugorjunk a k ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.1. lecke: HELY S FJLLLAPOT + 1.4.1. lecke: HELY S FJLLLAPOT ** CTRL-g megnyomsval megnzhetjk a helynket a fjlban s a fjl llapott. @@ -415,7 +415,7 @@ Ugorjunk a k ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.2. lecke: A KERESS (SEARCH) PARANCS + 1.4.2. lecke: A KERESS (SEARCH) PARANCS ** / majd a kvnt kifejezs bersval kereshetjk meg a kifejezst. ** @@ -436,7 +436,7 @@ Megj: Ha a keres ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.3. lecke: ZRJELEK PRJNAK KERESSE + 1.4.3. lecke: ZRJELEK PRJNAK KERESSE ** % letsvel megtalljuk a ),], vagy } prjt. ** @@ -459,7 +459,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.4. lecke: A HIBK KIJAVTSNAK EGY MDJA + 1.4.4. lecke: A HIBK KIJAVTSNAK EGY MDJA ** :s/rgi/j/g begpelsvel az 'j'-ra cserljk a 'rgi'-t. ** @@ -483,7 +483,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4. LECKE SSZEFOGLALJA + 1.4. LECKE SSZEFOGLALJA 1. Ctrl-g kirja az kurzor helyt a fjlban s a fjl llapott. @@ -507,7 +507,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.1. lecke: KLS PARANCS VGREHAJTSA + 1.5.1. lecke: KLS PARANCS VGREHAJTSA ** :! utn kls parancsot rva vgrehajtdik a parancs. ** @@ -530,7 +530,7 @@ Megj: Minden : parancs ut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.2. lecke: BVEBBEN A FJLOK RSRL + 1.5.2. lecke: BVEBBEN A FJLOK RSRL ** A fjlok vltozsait gy rhatjuk ki :w FJLNV. ** @@ -554,7 +554,7 @@ Megj: Ha ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.3. lecke: EGY KIVLASZTOTT RSZ KIRSA + 1.5.3. lecke: EGY KIVLASZTOTT RSZ KIRSA ** A fjl egy rsznek kirshoz rja :#,# w FJLNV ** @@ -579,7 +579,7 @@ Megj: Ha ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.4. lecke: FJLOK VISSZALLTSA S SSZEFZSE + 1.5.4. lecke: FJLOK VISSZALLTSA S SSZEFZSE ** Egy fjl tartalmnak beillesztshez rja :r FJLNV ** @@ -588,7 +588,7 @@ Megj: Ha 2. Helyezze a kurzort ennek az oldalnak a tetejre. -MEGJ: A 3. lps utn az 5.3. leckt fogja ltni. Azutn LEFEL indulva +MEGJ: A 3. lps utn az 1.5.3. leckt fogja ltni. Azutn LEFEL indulva keresse meg ismt ezt a leckt. 3. Most szrja be a TESZT nev fjlt a :r TESZT paranccsal, ahol @@ -597,13 +597,13 @@ MEGJ: A 3. l MEGJ: A fjl, amit beillesztett a kurzora alatt helyezkedik el. 4. Hogy ellenrizzk, hogy a fjlt tnyleg beillesztettk, menjen - vissza, s nzze meg, hogy ktszer szerepel az 5.3. lecke! Az eredeti + vissza, s nzze meg, hogy ktszer szerepel az 1.5.3. lecke! Az eredeti mellett a fjlbl bemsolt is ott van. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5. LECKE SSZEFOGLALJA + 1.5. LECKE SSZEFOGLALJA 1. :!parancs vgrehajt egy kls utastst. @@ -626,7 +626,7 @@ MEGJ: A f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.1. lecke: A MEGNYITS (OPEN) PARANCS + 1.6.1. lecke: A MEGNYITS (OPEN) PARANCS ** o bersval nyit egy j sort a kurzor alatt s beszr mdba vlt ** @@ -651,7 +651,7 @@ ezen a soron ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.2. lecke: AZ APPEND PARANCS + 1.6.2. lecke: AZ APPEND PARANCS ** a lenyomsval a kurzor UTN szrhatunk szveget. ** @@ -677,7 +677,7 @@ Megj: A Vimben a sor legv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.3. lecke: AZ TRS MSIK VLTOZATA + 1.6.3. lecke: AZ TRS MSIK VLTOZATA ** Nagy R bersval rhat fell tbb mint egy karaktert. ** @@ -701,7 +701,7 @@ Megj: A Vimben a sor legv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.4. lecke: BELLTSOK + 1.6.4. lecke: BELLTSOK ** lltsuk be, hogy a keress s a helyettests ne fggjn kis/NAGYbetktl ** @@ -724,7 +724,7 @@ Megj: A Vimben a sor legv 6. A kiemelst szntessk meg albbi utastsok egyikvel: :set nohls vagy :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6. LECKE SSZEFOGLALJA + 1.6. LECKE SSZEFOGLALJA 1. o bersval j sort nyitunk meg a sor ALATT s a kurzor az j @@ -747,7 +747,7 @@ Megj: A Vimben a sor legv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7. lecke: AZ ON-LINE SG PARANCSAI + 1.7. lecke: AZ ON-LINE SG PARANCSAI ** Az online sgrendszer hasznlata ** @@ -770,7 +770,7 @@ Megj: A Vimben a sor legv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 8. lecke: INDTSZKRIPT RSA + 1.8. lecke: INDTSZKRIPT RSA ** A Vim lehetsgeinek belltsa ** diff --git a/usr/share/vim/vim91/tutor/tutor.hu.utf-8 b/usr/share/vim/vim91/tutor/tutor1.hu.utf-8 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.hu.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.hu.utf-8 index f2e0d403c6b..f9482e40c63 100644 --- a/usr/share/vim/vim91/tutor/tutor.hu.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.hu.utf-8 @@ -20,11 +20,11 @@ hogy megfelelően megtanulja azokat. Ha csak olvassa, elfelejti! Most bizonyosodjon, meg, hogy a Caps-Lock gombja NINCS lenyomva, és - Nyomja meg megfelelő számúszor a j gombot, hogy az 1.1-es + Nyomja meg megfelelő számúszor a j gombot, hogy az 1.1.1-es lecke teljesen a képernyőn legyen! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.1. lecke: A KURZOR MOZGATÁSA + 1.1.1. lecke: A KURZOR MOZGATÁSA ** A kurzor mozgatásához nyomja meg a h,j,k,l gombokat az alábbi szerint. ** @@ -38,7 +38,7 @@ 2. Tartsa lenyomva a lefelét (j), akkor ismétlődik! ---> Most tudja, hogyan mehet a következő leckére. - 3. A lefelé gomb használatával menjen a 1.2. leckére! + 3. A lefelé gomb használatával menjen a 1.1.2. leckére! Megj: Ha nem biztos benne, mit nyomott meg, nyomja meg az -et, hogy normál módba kerüljön, és ismételje meg a parancsot! @@ -47,7 +47,7 @@ Megj: A kurzor gomboknak is működniük kell, de a hjkl használatával sokkal gyorsabban tud, mozogni, ha hozzászokik. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.2. lecke: BE ÉS KILÉPÉS A VIMBŐL + 1.1.2. lecke: BE ÉS KILÉPÉS A VIMBŐL !! MEGJ: Mielőtt végrehajtja az alábbi lépéseket, olvassa végig a leckét !! @@ -69,9 +69,9 @@ Megj: A kurzor gomboknak is működniük kell, de a hjkl használatával 4. Ha megjegyezte a lépéseket és biztos magában, hajtsa végre a lépéseket 1-től 3-ig, hogy kilépjen és visszatérjen a szerkesztőbe. Azután - menjen az 1.3. leckére. + menjen az 1.1.3. leckére. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.3. lecke: SZÖVEG SZERKESZTÉSE - TÖRLÉS + 1.1.3. lecke: SZÖVEG SZERKESZTÉSE - TÖRLÉS ** Normál módban nyomjon x-et, hogy a kurzor alatti karaktert törölje. ** @@ -87,13 +87,13 @@ Megj: A kurzor gomboknak is működniük kell, de a hjkl használatával ---> ŐŐszi éjjjell izziik aa galaggonya rruuhája. - 5. Ha a sor helyes, ugorjon a 1.4. leckére. + 5. Ha a sor helyes, ugorjon a 1.1.4. leckére. MEGJ: A tanulás során ne memorizálni próbáljon, hanem használat során tanuljon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.4. lecke: SZÖVEG SZERKESZTÉSE - BESZÚRÁS + 1.1.4. lecke: SZÖVEG SZERKESZTÉSE - BESZÚRÁS ** Normál módban i megnyomásával lehet beilleszteni. ** @@ -116,7 +116,7 @@ MEGJ: A tanulás során ne memorizálni próbáljon, hanem használat során tan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1. LECKE ÖSSZEFOGLALÓJA + 1.1. LECKE ÖSSZEFOGLALÓJA 1. A kurzort vagy a nyilakkal vagy a hjkl gombokkal mozgathatja. @@ -135,11 +135,11 @@ MEGJ: A tanulás során ne memorizálni próbáljon, hanem használat során tan MEGJ: Az megnyomása normál módba viszi, vagy megszakít egy nem befejezett részben befejezett parancsot. -Most folytassuk a 2. leckével! +Most folytassuk a 1.2. leckével! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.1. lecke: TÖRLŐ UTASÍTÁSOK + 1.2.1. lecke: TÖRLŐ UTASÍTÁSOK ** dw töröl a szó végéig. ** @@ -158,10 +158,10 @@ Most folytassuk a 2. leckével! ---> Pár szó kutya nem uhu illik pingvin a mondatba tehén. - 5. Ismételje a 3 és 4 közötti utasításokat amíg kell és ugorjon a 2.2 leckére! + 5. Ismételje a 3 és 4 közötti utasításokat amíg kell és ugorjon a 1.2.2 leckére! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.2. lecke: MÉG TÖBB TÖRLŐ UTASÍTÁS + 1.2.2. lecke: MÉG TÖBB TÖRLŐ UTASÍTÁS ** d$ beírásával a sor végéig törölhet. ** @@ -177,14 +177,14 @@ Most folytassuk a 2. leckével! ---> Valaki a sor végét kétszer gépelte be. kétszer gépelte be. - 5. Menjen a 2.3. leckére, hogy megértse mi történt! + 5. Menjen a 1.2.3. leckére, hogy megértse mi történt! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.3. lecke: UTASÍTÁSOKRÓL ÉS MOZGÁSOKRÓL + 1.2.3. lecke: UTASÍTÁSOKRÓL ÉS MOZGÁSOKRÓL A d (delete=törlés) utasítás formája a következő: @@ -207,7 +207,7 @@ MEGJ: Csupán a mozgás begépelésével (parancs nélkül) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.4. lecke: EGÉSZ SOROK FELDOLGOZÁSA + 1.2.4. lecke: EGÉSZ SOROK FELDOLGOZÁSA ** dd beírásával törölheti az egész sort. ** @@ -230,7 +230,7 @@ MEGJ: Csupán a mozgás begépelésével (parancs nélkül) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.5. lecke: A VISSZAVONÁS (UNDO) PARANCS + 1.2.5. lecke: A VISSZAVONÁS (UNDO) PARANCS ** u gépelésével visszavonható az utolsó parancs, U az egész sort helyreállítja. ** @@ -247,12 +247,12 @@ MEGJ: Csupán a mozgás begépelésével (parancs nélkül) ---> Javíítsa a hhibákaat ebbben a sooorban majd állítsa visszaaa az eredetit. - 8. Ezek nagyon hasznos parancsok. Most ugorjon a 2. lecke összefoglalójára. + 8. Ezek nagyon hasznos parancsok. Most ugorjon a 1.2. lecke összefoglalójára. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2. LECKE ÖSSZEFOGLALÓJA + 1.2. LECKE ÖSSZEFOGLALÓJA 1. Törlés a kurzortól a szó végéig: dw @@ -275,7 +275,7 @@ MEGJ: Csupán a mozgás begépelésével (parancs nélkül) Visszavonások visszavonása: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.1. lecke: A BEILLESZTÉS (PUT) PARANCS + 1.3.1. lecke: A BEILLESZTÉS (PUT) PARANCS ** p leütésével az utolsónak töröltet a kurzor után illeszthetjük. ** @@ -299,7 +299,7 @@ MEGJ: Csupán a mozgás begépelésével (parancs nélkül) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.2. lecke: AZ ÁTÍRÁS (REPLACE) PARANCS + 1.3.2. lecke: AZ ÁTÍRÁS (REPLACE) PARANCS ** r és a karakterek leütésével a kurzor alatti karaktert megváltoztatjuk. ** @@ -315,13 +315,13 @@ MEGJ: Csupán a mozgás begépelésével (parancs nélkül) ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ---> When this line was typed in, someone pressed some wrong keys! - 5. Menjünk a 3.2. leckére! + 5. Menjünk a 1.3.2. leckére! MEGJ: Emlékezzen, hogy nem memorizálással, hanem gyakorlással tanuljon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.3. lecke: A CSERE (CHANGE) PARANCS + 1.3.3. lecke: A CSERE (CHANGE) PARANCS ** A szó egy részének megváltoztatásához írjuk: cw . ** @@ -347,7 +347,7 @@ Vegyük észre, hogy a cw nem csak a szót írja át, hanem beszúró ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.4. lecke: TÖBBFÉLE VÁLTOZTATÁS c-VEL + 1.3.4. lecke: TÖBBFÉLE VÁLTOZTATÁS c-VEL ** A c utasítás használható ugyanazokkal az mozgásokkal mint a törlés ** @@ -370,7 +370,7 @@ Vegyük észre, hogy a cw nem csak a szót írja át, hanem beszúró ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3. LECKE ÖSSZEFOGLALÓJA + 1.3. LECKE ÖSSZEFOGLALÓJA 1. A már törölt sort beillesztéséhez nyomjunk p-t. Ez a törölt szöveget @@ -392,7 +392,7 @@ Ugorjunk a következő leckére! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.1. lecke: HELY ÉS FÁJLÁLLAPOT + 1.4.1. lecke: HELY ÉS FÁJLÁLLAPOT ** CTRL-g megnyomásával megnézhetjük a helyünket a fájlban és a fájl állapotát. @@ -415,7 +415,7 @@ Ugorjunk a következő leckére! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.2. lecke: A KERESÉS (SEARCH) PARANCS + 1.4.2. lecke: A KERESÉS (SEARCH) PARANCS ** / majd a kívánt kifejezés beírásával kereshetjük meg a kifejezést. ** @@ -436,7 +436,7 @@ Megj: Ha a keresés eléri a fájl végét, akkor az elején kezdi. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.3. lecke: ZÁRÓJELEK PÁRJÁNAK KERESÉSE + 1.4.3. lecke: ZÁRÓJELEK PÁRJÁNAK KERESÉSE ** % leütésével megtaláljuk a ),], vagy } párját. ** @@ -459,7 +459,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.4. lecke: A HIBÁK KIJAVÍTÁSÁNAK EGY MÓDJA + 1.4.4. lecke: A HIBÁK KIJAVÍTÁSÁNAK EGY MÓDJA ** :s/régi/új/g begépelésével az 'új'-ra cseréljük a 'régi'-t. ** @@ -483,7 +483,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4. LECKE ÖSSZEFOGLALÓJA + 1.4. LECKE ÖSSZEFOGLALÓJA 1. Ctrl-g kiírja az kurzor helyét a fájlban és a fájl állapotát. @@ -507,7 +507,7 @@ Megj: Ez nagyon hasznos, ha olyan programot debugolunk, amelyben a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.1. lecke: KÜLSŐ PARANCS VÉGREHAJTÁSA + 1.5.1. lecke: KÜLSŐ PARANCS VÉGREHAJTÁSA ** :! után külső parancsot írva végrehajtódik a parancs. ** @@ -530,7 +530,7 @@ Megj: Minden : parancs után -t kell ütni. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.2. lecke: BŐVEBBEN A FÁJLOK ÍRÁSÁRÓL + 1.5.2. lecke: BŐVEBBEN A FÁJLOK ÍRÁSÁRÓL ** A fájlok változásait így írhatjuk ki :w FÁJLNÉV. ** @@ -554,7 +554,7 @@ Megj: Ha Ön kilépne a Vimből és és visszatérne a TESZT fájlnévvel, akkor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.3. lecke: EGY KIVÁLASZTOTT RÉSZ KIÍRÁSA + 1.5.3. lecke: EGY KIVÁLASZTOTT RÉSZ KIÍRÁSA ** A fájl egy részének kiírásához írja :#,# w FÁJLNÉV ** @@ -579,7 +579,7 @@ Megj: Ha Ön kilépne a Vimből és és visszatérne a TESZT fájlnévvel, akkor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.4. lecke: FÁJLOK VISSZAÁLLÍTÁSA ÉS ÖSSZEFŰZÉSE + 1.5.4. lecke: FÁJLOK VISSZAÁLLÍTÁSA ÉS ÖSSZEFŰZÉSE ** Egy fájl tartalmának beillesztéséhez írja :r FÁJLNÉV ** @@ -588,7 +588,7 @@ Megj: Ha Ön kilépne a Vimből és és visszatérne a TESZT fájlnévvel, akkor 2. Helyezze a kurzort ennek az oldalnak a tetejére. -MEGJ: A 3. lépés után az 5.3. leckét fogja látni. Azután LEFELÉ indulva +MEGJ: A 3. lépés után az 1.5.3. leckét fogja látni. Azután LEFELÉ indulva keresse meg ismét ezt a leckét. 3. Most szúrja be a TESZT nevű fájlt a :r TESZT paranccsal, ahol @@ -597,13 +597,13 @@ MEGJ: A 3. lépés után az 5.3. leckét fogja látni. Azután LEFELÉ indulva MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el. 4. Hogy ellenőrizzük, hogy a fájlt tényleg beillesztettük, menjen - vissza, és nézze meg, hogy kétszer szerepel az 5.3. lecke! Az eredeti + vissza, és nézze meg, hogy kétszer szerepel az 1.5.3. lecke! Az eredeti mellett a fájlból bemásolt is ott van. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5. LECKE ÖSSZEFOGLALÓJA + 1.5. LECKE ÖSSZEFOGLALÓJA 1. :!parancs végrehajt egy külső utasítást. @@ -626,7 +626,7 @@ MEGJ: A fájl, amit beillesztett a kurzora alatt helyezkedik el. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.1. lecke: A MEGNYITÁS (OPEN) PARANCS + 1.6.1. lecke: A MEGNYITÁS (OPEN) PARANCS ** o beírásával nyit egy új sort a kurzor alatt és beszúró módba vált ** @@ -651,7 +651,7 @@ ezen a soron áll. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.2. lecke: AZ APPEND PARANCS + 1.6.2. lecke: AZ APPEND PARANCS ** a lenyomásával a kurzor UTÁN szúrhatunk szöveget. ** @@ -677,7 +677,7 @@ Megj: A Vimben a sor legvégére is lehet állni, azonban ez elődjében ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.3. lecke: AZ ÁTÍRÁS MÁSIK VÁLTOZATA + 1.6.3. lecke: AZ ÁTÍRÁS MÁSIK VÁLTOZATA ** Nagy R beírásával írhat felül több mint egy karaktert. ** @@ -701,7 +701,7 @@ Megj: A Vimben a sor legvégére is lehet állni, azonban ez elődjében ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.4. lecke: BEÁLLÍTÁSOK + 1.6.4. lecke: BEÁLLÍTÁSOK ** Állítsuk be, hogy a keresés és a helyettesítés ne függjön kis/NAGYbetűktől ** @@ -724,7 +724,7 @@ Megj: A Vimben a sor legvégére is lehet állni, azonban ez elődjében 6. A kiemelést szüntessük meg alábbi utasítások egyikével: :set nohls vagy :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6. LECKE ÖSSZEFOGLALÓJA + 1.6. LECKE ÖSSZEFOGLALÓJA 1. o beírásával új sort nyitunk meg a sor ALATT és a kurzor az új @@ -747,7 +747,7 @@ Megj: A Vimben a sor legvégére is lehet állni, azonban ez elődjében ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7. lecke: AZ ON-LINE SÚGÓ PARANCSAI + 1.7. lecke: AZ ON-LINE SÚGÓ PARANCSAI ** Az online súgórendszer használata ** @@ -770,7 +770,7 @@ Megj: A Vimben a sor legvégére is lehet állni, azonban ez elődjében ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 8. lecke: INDÍTÓSZKRIPT ÍRÁSA + 1.8. lecke: INDÍTÓSZKRIPT ÍRÁSA ** A Vim lehetőségeinek beállítása ** diff --git a/usr/share/vim/vim91/tutor/tutor.it b/usr/share/vim/vim91/tutor/tutor1.it similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.it rename to usr/share/vim/vim91/tutor/tutor1.it index ce3b9707b9a..73a2289f5d0 100644 --- a/usr/share/vim/vim91/tutor/tutor.it +++ b/usr/share/vim/vim91/tutor/tutor1.it @@ -20,9 +20,9 @@ Adesso, assicurati che il tasto BLOCCA-MAIUSCOLO non sia schiacciato e premi il tasto j tanto da muovere il cursore fino a che la - Lezione 1.1 riempia completamente lo schermo. + Lezione 1.1.1 riempia completamente lo schermo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.1: MOVIMENTI DEL CURSORE + Lezione 1.1.1: MOVIMENTI DEL CURSORE ** Per muovere il cursore, premi i tasti h,j,k,l come indicato. ** @@ -36,7 +36,7 @@ 2. Tieni schiacciato il tasto "gi" (j) finch non si ripete il movimento. Adesso sai come arrivare fino alla lezione seguente. - 3. Usando il tasto "gi" spostati alla Lezione 1.2. + 3. Usando il tasto "gi" spostati alla Lezione 1.1.2. NOTA: Quando non sei sicuro del tasto che hai premuto, premi per andare in Modalit Normale [Normal Mode]. Poi ri-immetti il comando che volevi. @@ -45,7 +45,7 @@ NOTA: I tasti con le frecce fanno lo stesso servizio. Ma usando hjkl riesci a muoverti molto pi rapidamente, dopo che ci si abitua. Davvero! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.2: USCIRE DA VIM + Lezione 1.1.2: USCIRE DA VIM !! NOTA: Prima di eseguire quanto richiesto, leggi la Lezione per intero!! @@ -64,11 +64,11 @@ NOTA: I tasti con le frecce fanno lo stesso servizio. Ma usando hjkl riesci NOTA: :q! SCARTA qualsiasi modifica fatta. In una delle prossime lezioni imparerai come salvare un file che hai modificato. - 5. Muovi in gi il cursore per passare alla lezione 1.3. + 5. Muovi in gi il cursore per passare alla lezione 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.3: MODIFICA DI TESTI - CANCELLAZIONE + Lezione 1.1.3: MODIFICA DI TESTI - CANCELLAZIONE ** Premere x per cancellare il carattere sotto al cursore ** @@ -84,14 +84,14 @@ NOTA: :q! SCARTA qualsiasi modifica fatta. In una delle prossime ---> La mmucca salt finnoo allaa lunnna. - 5. Ora che la linea corretta, vai alla Lezione 1.4 + 5. Ora che la linea corretta, vai alla Lezione 1.1.4 NOTA: Mentre segui questa guida, non cercare di imparare a memoria, ma impara facendo pratica. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.4: MODIFICA DI TESTI - INSERIMENTO + Lezione 1.1.4: MODIFICA DI TESTI - INSERIMENTO ** Premere i per inserire testo. ** @@ -109,12 +109,12 @@ NOTA: Mentre segui questa guida, non cercare di imparare a memoria, ---> C'era del tsto mncnt questa . ---> C'era del testo mancante da questa linea. - 5. Quando sei a tuo agio nell'inserimento di testo vai alla lezione 1.5. + 5. Quando sei a tuo agio nell'inserimento di testo vai alla lezione 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.5: MODIFICA DI TESTI - AGGIUNTA + Lezione 1.1.5: MODIFICA DI TESTI - AGGIUNTA ** Premere A per aggiungere testo a fine linea. ** @@ -134,17 +134,17 @@ NOTA: Mentre segui questa guida, non cercare di imparare a memoria, ---> C' anche del testo che ma C' anche del testo che manca qui. - 5. Quando sei a tuo agio nell'aggiunta di testo vai alla lezione 1.6. + 5. Quando sei a tuo agio nell'aggiunta di testo vai alla lezione 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.6: MODIFICARE UN FILE + Lezione 1.1.6: MODIFICARE UN FILE ** Usare :wq per salvare un file e uscire. ** !! NOTA: Prima di eseguire quanto richiesto, leggi la Lezione per intero!! - 1. Esci da Vim come hai fatto nella lezione 1.2: :q! + 1. Esci da Vim come hai fatto nella lezione 1.1.2: :q! 2. Quando vedi il PROMPT della Shell, batti il comando: vim tutor 'vim' il comando per richiamare Vim, 'tutor' il nome del file che @@ -160,7 +160,7 @@ NOTA: Mentre segui questa guida, non cercare di imparare a memoria, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1 SOMMARIO + Lezione 1.1 SOMMARIO 1. Il cursore si muove usando i tasti con le frecce o i tasti hjkl. @@ -180,10 +180,10 @@ NOTA: Mentre segui questa guida, non cercare di imparare a memoria, NOTA: premendo ritornerai in Modalit Normale o annullerai un comando errato che puoi aver inserito in parte. -Ora continua con la Lezione 2. +Ora continua con la Lezione 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.1: COMANDI DI CANCELLAZIONE + Lezione 1.2.1: COMANDI DI CANCELLAZIONE ** Batti dw per cancellare una parola. ** @@ -202,11 +202,11 @@ NOTA: La lettera d sar ---> Ci sono le alcune parole gioia che non c'entrano carta in questa frase. - 5. Ripeti i passi 3 e 4 finch la frase corretta, poi vai alla Lezione 2.2. + 5. Ripeti i passi 3 e 4 finch la frase corretta, poi vai alla Lezione 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.2: ALTRI COMANDI DI CANCELLAZIONE + Lezione 1.2.2: ALTRI COMANDI DI CANCELLAZIONE ** Batti d$ per cancellare fino a fine linea. ** @@ -222,14 +222,14 @@ NOTA: La lettera d sar ---> Qualcuno ha battuto la fine di questa linea due volte. linea due volte. - 5. Vai alla Lezione 2.3 per capire il funzionamento di questo comando. + 5. Vai alla Lezione 1.2.3 per capire il funzionamento di questo comando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.3: OPERATORI E MOVIMENTI + Lezione 1.2.3: OPERATORI E MOVIMENTI Molti comandi di modifica testi consistono in un operatore e un movimento. @@ -252,7 +252,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalit nessun operatore, il cursore si muover come specificato. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.4: USO DI UN CONTATORE PER UN MOVIMENTO + Lezione 1.2.4: USO DI UN CONTATORE PER UN MOVIMENTO ** Se batti un numero prima di un movimento, lo ripeti altrettante volte. ** @@ -269,13 +269,13 @@ NOTA: Se batti solo il movimento mentre sei in Modalit ---> Questa solo una linea con parole all'interno della quale puoi muoverti. - 6. Vai alla Lezione 2.5. + 6. Vai alla Lezione 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.5: USO DI UN CONTATORE PER CANCELLARE DI PIU' + Lezione 1.2.5: USO DI UN CONTATORE PER CANCELLARE DI PIU' ** Se batti un numero prima di un movimento, lo ripeti altrettante volte. ** @@ -298,7 +298,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.6: LAVORARE SU LINEE INTERE + Lezione 1.2.6: LAVORARE SU LINEE INTERE ** Batti dd per cancellare un'intera linea. ** @@ -321,7 +321,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.7: IL COMANDO UNDO [ANNULLA] + Lezione 1.2.7: IL COMANDO UNDO [ANNULLA] ** Premi u per annullare gli ultimi comandi eseguiti. ** ** Premi U per annullare le modifiche all'ultima linea. ** @@ -338,13 +338,13 @@ NOTA: Se batti solo il movimento mentre sei in Modalit ---> Correeggi gli errori ssu quuesta linea e riimpiazzali coon "undo". - 8. Questi comandi sono molto utili. Ora spostati al Sommario della Lezione 2. + 8. Questi comandi sono molto utili. Ora spostati al Sommario della Lezione 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2 SOMMARIO + Lezione 1.2 SOMMARIO 1. Per cancellare dal cursore fino alla parola seguente batti: dw @@ -367,7 +367,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3.1: IL COMANDO PUT [METTI, PONI] + Lezione 1.3.1: IL COMANDO PUT [METTI, PONI] ** Batti p per porre [put] testo (cancellato prima) dopo il cursore. ** @@ -390,7 +390,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3.2: IL COMANDO REPLACE [RIMPIAZZARE] + Lezione 1.3.2: IL COMANDO REPLACE [RIMPIAZZARE] ** Batti rx per rimpiazzare il carattere sotto al cursore con x . ** @@ -406,14 +406,14 @@ NOTA: Se batti solo il movimento mentre sei in Modalit ---> Ammattendo quetta lince, qualcuno ho predato alcuni tosti sballiati! ---> Immettendo questa linea, qualcuno ha premuto alcuni tasti sbagliati! - 5. Ora passa alla Lezione 3.3. + 5. Ora passa alla Lezione 1.3.3. NOTA: Ricordati che dovresti imparare con la pratica, non solo leggendo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3.3: L'OPERATORE CHANGE [CAMBIA] + Lezione 1.3.3: L'OPERATORE CHANGE [CAMBIA] ** Per cambiare fino alla fine di una parola, batti ce . ** @@ -436,7 +436,7 @@ Nota che ce cancella la parola, e ti mette anche in Modalit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3.4: ALTRI CAMBIAMENTI USANDO c + Lezione 1.3.4: ALTRI CAMBIAMENTI USANDO c ** L'operatore c [CHANGE] agisce sugli stessi movimenti di d [DELETE] ** @@ -459,7 +459,7 @@ Nota che ce cancella la parola, e ti mette anche in Modalit NOTA: Puoi usare il tasto Backspace se devi correggere errori di battitura. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3 SOMMARIO + Lezione 1.3 SOMMARIO 1. Per reinserire del testo appena cancellato, batti p . Questo @@ -482,7 +482,7 @@ Ora vai alla prossima Lezione. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4.1: POSIZIONAMENTO E SITUAZIONE FILE + Lezione 1.4.1: POSIZIONAMENTO E SITUAZIONE FILE ** Batti CTRL-G per vedere a che punto sei nel file e la situazione ** ** del file. Batti G per raggiungere una linea nel file. ** @@ -505,7 +505,7 @@ NOTA: La posizione del cursore si vede nell'angolo in basso a destra dello 4. Se ti senti sicuro nel farlo, esegui i passi da 1 a 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4.2: IL COMANDO SEARCH [RICERCA] + Lezione 1.4.2: IL COMANDO SEARCH [RICERCA] ** Batti / seguito da una frase per ricercare quella frase. ** @@ -528,7 +528,7 @@ NOTA: Quando la ricerca arriva a fine file, ricomincia dall'inizio del file, a meno che l'opzione 'wrapscan' sia stata disattivata. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4.3: RICERCA DI PARENTESI CORRISPONDENTI + Lezione 1.4.3: RICERCA DI PARENTESI CORRISPONDENTI ** Batti % per trovare una ),], o } corrispondente. ** @@ -551,7 +551,7 @@ NOTA: Questo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4.4: L'OPERATORE SOSTITUZIONE (SUBSTITUTE) + Lezione 1.4.4: L'OPERATORE SOSTITUZIONE (SUBSTITUTE) ** Batti :s/vecchio/nuovo/g per sostituire 'nuovo' a 'vecchio'. ** @@ -574,7 +574,7 @@ NOTA: Questo ricevendo per ognuna una richiesta se effettuare o meno la sostituzione. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4 SOMMARIO + Lezione 1.4 SOMMARIO 1. CTRL-G visualizza a che punto sei nel file e la situazione del file. @@ -597,7 +597,7 @@ NOTA: Questo Per sostituire tutte le occorrenze nel file batti :%s/vecchio/nuovo/g Per chiedere conferma ogni volta aggiungi 'c' :%s/vecchio/nuovo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5.1: COME ESEGUIRE UN COMANDO ESTERNO + Lezione 1.5.1: COME ESEGUIRE UN COMANDO ESTERNO ** Batti :! seguito da un comando esterno per eseguire quel comando. ** @@ -620,7 +620,7 @@ NOTA: Tutti i comandi : devono essere terminati premendo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5.2: ANCORA SULLA SCRITTURA DEI FILE + Lezione 1.5.2: ANCORA SULLA SCRITTURA DEI FILE ** Per salvare le modifiche apportate a un testo batti :w NOMEFILE. ** @@ -643,7 +643,7 @@ NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5.3: SELEZIONARE IL TESTO DA SCRIVERE + Lezione 1.5.3: SELEZIONARE IL TESTO DA SCRIVERE ** Per salvare una porzione di file, batti v movimento :w NOMEFILE ** @@ -666,14 +666,14 @@ NOTA: Battere v inizia una selezione visuale. Puoi muovere il cursore puoi usare un operatore per agire sul testo selezionato. Ad es., d cancella il testo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5.4: INSERIRE E RIUNIRE FILE + Lezione 1.5.4: INSERIRE E RIUNIRE FILE ** Per inserire il contenuto di un file, batti :r NOMEFILE ** 1. Posiziona il cursore appena sopra questa riga. -NOTA: Dopo aver eseguito il Passo 2 vedrai il testo della Lezione 5.3. +NOTA: Dopo aver eseguito il Passo 2 vedrai il testo della Lezione 1.5.3. Quindi spostati IN GIU' per tornare ancora a questa Lezione. 2. Ora inserisci il tuo file TEST con il comando :r TEST dove TEST @@ -681,7 +681,7 @@ NOTA: Dopo aver eseguito il Passo 2 vedrai il testo della Lezione 5.3. Il file richiesto inserito sotto la linea in cui si trova il cursore. 3. Per verificare che un file stato inserito, torna indietro col cursore - e nota che ci sono ora 2 copie della Lezione 5.3, quella originale e + e nota che ci sono ora 2 copie della Lezione 1.5.3, quella originale e quella che viene dal file. NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. @@ -689,7 +689,7 @@ NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. in cui si trova il cursore. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5 SOMMARIO + Lezione 1.5 SOMMARIO 1. :!comando esegue un comando esterno. @@ -712,7 +712,7 @@ NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.1: IL COMANDO OPEN [APRIRE] + Lezione 1.6.1: IL COMANDO OPEN [APRIRE] ** Batti o per aprire una linea sotto il cursore ** @@ -735,7 +735,7 @@ NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.2: IL COMANDO APPEND [AGGIUNGERE] + Lezione 1.6.2: IL COMANDO APPEND [AGGIUNGERE] ** Batti a per inserire testo DOPO il cursore. ** @@ -758,7 +758,7 @@ NOTA: a, i ed A entrano sempre in Modalit dove verranno inseriti i caratteri. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.3: UN ALTRO MODO DI RIMPIAZZARE [REPLACE] + Lezione 1.6.3: UN ALTRO MODO DI RIMPIAZZARE [REPLACE] ** Batti una R maiuscola per rimpiazzare pi di un carattere. ** @@ -781,7 +781,7 @@ NOTA: La Modalit che viene battuto ricopre un carattere esistente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.4: COPIA E INCOLLA DEL TESTO + Lezione 1.6.4: COPIA E INCOLLA DEL TESTO ** usa l'operatore y per copiare del testo e p per incollarlo ** @@ -804,7 +804,7 @@ NOTA: La Modalit NOTA: Puoi usare y come operatore; yw copia una parola [word]. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.5: SET [IMPOSTA] UN'OPZIONE + Lezione 1.6.5: SET [IMPOSTA] UN'OPZIONE ** Imposta un'opzione per ignorare maiuscole/minuscole ** ** durante la ricerca/sostituzione ** @@ -827,7 +827,7 @@ NOTA: Per non evidenziare le occorrenze trovate batti: :nohlsearch NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c nel comando di ricerca: /nota\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6 SOMMARIO + Lezione 1.6 SOMMARIO 1. Batti o per aggiungere una linea SOTTO il cursore ed entrare in Modalit Inserimento. @@ -850,7 +850,7 @@ NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c 7. Usa il prefisso "no" per annullare una opzione: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 7.1: OTTENERE AIUTO + Lezione 1.7.1: OTTENERE AIUTO ** Usa il sistema di aiuto on-line ** @@ -873,7 +873,7 @@ NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 7.2: PREPARARE UNO SCRIPT INIZIALE + Lezione 1.7.2: PREPARARE UNO SCRIPT INIZIALE ** Attiva le opzioni Vim ** @@ -896,7 +896,7 @@ NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c Per maggiori informazioni batti: :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 7.3: COMPLETAMENTO + Lezione 1.7.3: COMPLETAMENTO ** Completamento linea comandi con CTRL-D e ** @@ -919,7 +919,7 @@ NOTA: Il completamento CTRL-D e . Particolarmente utile per :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 7 Sommario + Lezione 1.7 Sommario 1. Batti :help o premi o per aprire una finestra di aiuto. diff --git a/usr/share/vim/vim91/tutor/tutor.it.utf-8 b/usr/share/vim/vim91/tutor/tutor1.it.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.it.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.it.utf-8 index d1f62e27749..235a1920d38 100644 --- a/usr/share/vim/vim91/tutor/tutor.it.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.it.utf-8 @@ -20,9 +20,9 @@ Adesso, assicurati che il tasto BLOCCA-MAIUSCOLO non sia schiacciato e premi il tasto j tanto da muovere il cursore fino a che la - Lezione 1.1 riempia completamente lo schermo. + Lezione 1.1.1 riempia completamente lo schermo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.1: MOVIMENTI DEL CURSORE + Lezione 1.1.1: MOVIMENTI DEL CURSORE ** Per muovere il cursore, premi i tasti h,j,k,l come indicato. ** @@ -36,7 +36,7 @@ 2. Tieni schiacciato il tasto "giù" (j) finché non si ripete il movimento. Adesso sai come arrivare fino alla lezione seguente. - 3. Usando il tasto "giù" spostati alla Lezione 1.2. + 3. Usando il tasto "giù" spostati alla Lezione 1.1.2. NOTA: Quando non sei sicuro del tasto che hai premuto, premi per andare in Modalità Normale [Normal Mode]. Poi ri-immetti il comando che volevi. @@ -45,7 +45,7 @@ NOTA: I tasti con le frecce fanno lo stesso servizio. Ma usando hjkl riesci a muoverti molto più rapidamente, dopo che ci si abitua. Davvero! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.2: USCIRE DA VIM + Lezione 1.1.2: USCIRE DA VIM !! NOTA: Prima di eseguire quanto richiesto, leggi la Lezione per intero!! @@ -64,11 +64,11 @@ NOTA: I tasti con le frecce fanno lo stesso servizio. Ma usando hjkl riesci NOTA: :q! SCARTA qualsiasi modifica fatta. In una delle prossime lezioni imparerai come salvare un file che hai modificato. - 5. Muovi in giù il cursore per passare alla lezione 1.3. + 5. Muovi in giù il cursore per passare alla lezione 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.3: MODIFICA DI TESTI - CANCELLAZIONE + Lezione 1.1.3: MODIFICA DI TESTI - CANCELLAZIONE ** Premere x per cancellare il carattere sotto al cursore ** @@ -84,14 +84,14 @@ NOTA: :q! SCARTA qualsiasi modifica fatta. In una delle prossime ---> La mmucca saltòò finnoo allaa lunnna. - 5. Ora che la linea è corretta, vai alla Lezione 1.4 + 5. Ora che la linea è corretta, vai alla Lezione 1.1.4 NOTA: Mentre segui questa guida, non cercare di imparare a memoria, ma impara facendo pratica. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.4: MODIFICA DI TESTI - INSERIMENTO + Lezione 1.1.4: MODIFICA DI TESTI - INSERIMENTO ** Premere i per inserire testo. ** @@ -109,12 +109,12 @@ NOTA: Mentre segui questa guida, non cercare di imparare a memoria, ---> C'era del tsto mncnt questa . ---> C'era del testo mancante da questa linea. - 5. Quando sei a tuo agio nell'inserimento di testo vai alla lezione 1.5. + 5. Quando sei a tuo agio nell'inserimento di testo vai alla lezione 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.5: MODIFICA DI TESTI - AGGIUNTA + Lezione 1.1.5: MODIFICA DI TESTI - AGGIUNTA ** Premere A per aggiungere testo a fine linea. ** @@ -134,17 +134,17 @@ NOTA: Mentre segui questa guida, non cercare di imparare a memoria, ---> C'è anche del testo che ma C'è anche del testo che manca qui. - 5. Quando sei a tuo agio nell'aggiunta di testo vai alla lezione 1.6. + 5. Quando sei a tuo agio nell'aggiunta di testo vai alla lezione 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1.6: MODIFICARE UN FILE + Lezione 1.1.6: MODIFICARE UN FILE ** Usare :wq per salvare un file e uscire. ** !! NOTA: Prima di eseguire quanto richiesto, leggi la Lezione per intero!! - 1. Esci da Vim come hai fatto nella lezione 1.2: :q! + 1. Esci da Vim come hai fatto nella lezione 1.1.2: :q! 2. Quando vedi il PROMPT della Shell, batti il comando: vim tutor 'vim' è il comando per richiamare Vim, 'tutor' è il nome del file che @@ -160,7 +160,7 @@ NOTA: Mentre segui questa guida, non cercare di imparare a memoria, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 1 SOMMARIO + Lezione 1.1 SOMMARIO 1. Il cursore si muove usando i tasti con le frecce o i tasti hjkl. @@ -180,10 +180,10 @@ NOTA: Mentre segui questa guida, non cercare di imparare a memoria, NOTA: premendo ritornerai in Modalità Normale o annullerai un comando errato che puoi aver inserito in parte. -Ora continua con la Lezione 2. +Ora continua con la Lezione 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.1: COMANDI DI CANCELLAZIONE + Lezione 1.2.1: COMANDI DI CANCELLAZIONE ** Batti dw per cancellare una parola. ** @@ -202,11 +202,11 @@ NOTA: La lettera d sarà visibile sull'ultima linea dello schermo mentre la ---> Ci sono le alcune parole gioia che non c'entrano carta in questa frase. - 5. Ripeti i passi 3 e 4 finché la frase è corretta, poi vai alla Lezione 2.2. + 5. Ripeti i passi 3 e 4 finché la frase è corretta, poi vai alla Lezione 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.2: ALTRI COMANDI DI CANCELLAZIONE + Lezione 1.2.2: ALTRI COMANDI DI CANCELLAZIONE ** Batti d$ per cancellare fino a fine linea. ** @@ -222,14 +222,14 @@ NOTA: La lettera d sarà visibile sull'ultima linea dello schermo mentre la ---> Qualcuno ha battuto la fine di questa linea due volte. linea due volte. - 5. Vai alla Lezione 2.3 per capire il funzionamento di questo comando. + 5. Vai alla Lezione 1.2.3 per capire il funzionamento di questo comando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.3: OPERATORI E MOVIMENTI + Lezione 1.2.3: OPERATORI E MOVIMENTI Molti comandi di modifica testi consistono in un operatore e un movimento. @@ -252,7 +252,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza nessun operatore, il cursore si muoverà come specificato. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.4: USO DI UN CONTATORE PER UN MOVIMENTO + Lezione 1.2.4: USO DI UN CONTATORE PER UN MOVIMENTO ** Se batti un numero prima di un movimento, lo ripeti altrettante volte. ** @@ -269,13 +269,13 @@ NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza ---> Questa è solo una linea con parole all'interno della quale puoi muoverti. - 6. Vai alla Lezione 2.5. + 6. Vai alla Lezione 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.5: USO DI UN CONTATORE PER CANCELLARE DI PIU' + Lezione 1.2.5: USO DI UN CONTATORE PER CANCELLARE DI PIU' ** Se batti un numero prima di un movimento, lo ripeti altrettante volte. ** @@ -298,7 +298,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.6: LAVORARE SU LINEE INTERE + Lezione 1.2.6: LAVORARE SU LINEE INTERE ** Batti dd per cancellare un'intera linea. ** @@ -321,7 +321,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2.7: IL COMANDO UNDO [ANNULLA] + Lezione 1.2.7: IL COMANDO UNDO [ANNULLA] ** Premi u per annullare gli ultimi comandi eseguiti. ** ** Premi U per annullare le modifiche all'ultima linea. ** @@ -338,13 +338,13 @@ NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza ---> Correeggi gli errori ssu quuesta linea e riimpiazzali coon "undo". - 8. Questi comandi sono molto utili. Ora spostati al Sommario della Lezione 2. + 8. Questi comandi sono molto utili. Ora spostati al Sommario della Lezione 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 2 SOMMARIO + Lezione 1.2 SOMMARIO 1. Per cancellare dal cursore fino alla parola seguente batti: dw @@ -367,7 +367,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3.1: IL COMANDO PUT [METTI, PONI] + Lezione 1.3.1: IL COMANDO PUT [METTI, PONI] ** Batti p per porre [put] testo (cancellato prima) dopo il cursore. ** @@ -390,7 +390,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3.2: IL COMANDO REPLACE [RIMPIAZZARE] + Lezione 1.3.2: IL COMANDO REPLACE [RIMPIAZZARE] ** Batti rx per rimpiazzare il carattere sotto al cursore con x . ** @@ -406,14 +406,14 @@ NOTA: Se batti solo il movimento mentre sei in Modalità Normale, senza ---> Ammattendo quetta lince, qualcuno ho predato alcuni tosti sballiati! ---> Immettendo questa linea, qualcuno ha premuto alcuni tasti sbagliati! - 5. Ora passa alla Lezione 3.3. + 5. Ora passa alla Lezione 1.3.3. NOTA: Ricordati che dovresti imparare con la pratica, non solo leggendo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3.3: L'OPERATORE CHANGE [CAMBIA] + Lezione 1.3.3: L'OPERATORE CHANGE [CAMBIA] ** Per cambiare fino alla fine di una parola, batti ce . ** @@ -436,7 +436,7 @@ Nota che ce cancella la parola, e ti mette anche in Modalità Inserimento ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3.4: ALTRI CAMBIAMENTI USANDO c + Lezione 1.3.4: ALTRI CAMBIAMENTI USANDO c ** L'operatore c [CHANGE] agisce sugli stessi movimenti di d [DELETE] ** @@ -459,7 +459,7 @@ Nota che ce cancella la parola, e ti mette anche in Modalità Inserimento NOTA: Puoi usare il tasto Backspace se devi correggere errori di battitura. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 3 SOMMARIO + Lezione 1.3 SOMMARIO 1. Per reinserire del testo appena cancellato, batti p . Questo @@ -482,7 +482,7 @@ Ora vai alla prossima Lezione. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4.1: POSIZIONAMENTO E SITUAZIONE FILE + Lezione 1.4.1: POSIZIONAMENTO E SITUAZIONE FILE ** Batti CTRL-G per vedere a che punto sei nel file e la situazione ** ** del file. Batti G per raggiungere una linea nel file. ** @@ -505,7 +505,7 @@ NOTA: La posizione del cursore si vede nell'angolo in basso a destra dello 4. Se ti senti sicuro nel farlo, esegui i passi da 1 a 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4.2: IL COMANDO SEARCH [RICERCA] + Lezione 1.4.2: IL COMANDO SEARCH [RICERCA] ** Batti / seguito da una frase per ricercare quella frase. ** @@ -528,7 +528,7 @@ NOTA: Quando la ricerca arriva a fine file, ricomincia dall'inizio del file, a meno che l'opzione 'wrapscan' sia stata disattivata. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4.3: RICERCA DI PARENTESI CORRISPONDENTI + Lezione 1.4.3: RICERCA DI PARENTESI CORRISPONDENTI ** Batti % per trovare una ),], o } corrispondente. ** @@ -551,7 +551,7 @@ NOTA: Questo è molto utile nel "debug" di un programma con parentesi errate! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4.4: L'OPERATORE SOSTITUZIONE (SUBSTITUTE) + Lezione 1.4.4: L'OPERATORE SOSTITUZIONE (SUBSTITUTE) ** Batti :s/vecchio/nuovo/g per sostituire 'nuovo' a 'vecchio'. ** @@ -574,7 +574,7 @@ NOTA: Questo è molto utile nel "debug" di un programma con parentesi errate! ricevendo per ognuna una richiesta se effettuare o meno la sostituzione. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 4 SOMMARIO + Lezione 1.4 SOMMARIO 1. CTRL-G visualizza a che punto sei nel file e la situazione del file. @@ -597,7 +597,7 @@ NOTA: Questo è molto utile nel "debug" di un programma con parentesi errate! Per sostituire tutte le occorrenze nel file batti :%s/vecchio/nuovo/g Per chiedere conferma ogni volta aggiungi 'c' :%s/vecchio/nuovo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5.1: COME ESEGUIRE UN COMANDO ESTERNO + Lezione 1.5.1: COME ESEGUIRE UN COMANDO ESTERNO ** Batti :! seguito da un comando esterno per eseguire quel comando. ** @@ -612,7 +612,7 @@ NOTA: Questo è molto utile nel "debug" di un programma con parentesi errate! visualizza una lista della tua directory, proprio come se fossi in una "shell". Usa :!dir se ls non funziona. [Unix: ls MS-DOS: dir] -NOTA: È possibile in questo modo eseguire un comando a piacere, specificando +NOTA: E' possibile in questo modo eseguire un comando a piacere, specificando anche dei parametri per i comandi stessi. NOTA: Tutti i comandi : devono essere terminati premendo @@ -620,7 +620,7 @@ NOTA: Tutti i comandi : devono essere terminati premendo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5.2: ANCORA SULLA SCRITTURA DEI FILE + Lezione 1.5.2: ANCORA SULLA SCRITTURA DEI FILE ** Per salvare le modifiche apportate a un testo batti :w NOMEFILE. ** @@ -643,7 +643,7 @@ NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5.3: SELEZIONARE IL TESTO DA SCRIVERE + Lezione 1.5.3: SELEZIONARE IL TESTO DA SCRIVERE ** Per salvare una porzione di file, batti v movimento :w NOMEFILE ** @@ -666,14 +666,14 @@ NOTA: Battere v inizia una selezione visuale. Puoi muovere il cursore puoi usare un operatore per agire sul testo selezionato. Ad es., d cancella il testo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5.4: INSERIRE E RIUNIRE FILE + Lezione 1.5.4: INSERIRE E RIUNIRE FILE ** Per inserire il contenuto di un file, batti :r NOMEFILE ** 1. Posiziona il cursore appena sopra questa riga. -NOTA: Dopo aver eseguito il Passo 2 vedrai il testo della Lezione 5.3. +NOTA: Dopo aver eseguito il Passo 2 vedrai il testo della Lezione 1.5.3. Quindi spostati IN GIU' per tornare ancora a questa Lezione. 2. Ora inserisci il tuo file TEST con il comando :r TEST dove TEST è @@ -681,7 +681,7 @@ NOTA: Dopo aver eseguito il Passo 2 vedrai il testo della Lezione 5.3. Il file richiesto è inserito sotto la linea in cui si trova il cursore. 3. Per verificare che un file è stato inserito, torna indietro col cursore - e nota che ci sono ora 2 copie della Lezione 5.3, quella originale e + e nota che ci sono ora 2 copie della Lezione 1.5.3, quella originale e quella che viene dal file. NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. @@ -689,7 +689,7 @@ NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. in cui si trova il cursore. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 5 SOMMARIO + Lezione 1.5 SOMMARIO 1. :!comando esegue un comando esterno. @@ -712,7 +712,7 @@ NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.1: IL COMANDO OPEN [APRIRE] + Lezione 1.6.1: IL COMANDO OPEN [APRIRE] ** Batti o per aprire una linea sotto il cursore ** @@ -735,7 +735,7 @@ NOTA: Puoi anche leggere l'output prodotto da un comando esterno. Ad es. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.2: IL COMANDO APPEND [AGGIUNGERE] + Lezione 1.6.2: IL COMANDO APPEND [AGGIUNGERE] ** Batti a per inserire testo DOPO il cursore. ** @@ -758,7 +758,7 @@ NOTA: a, i ed A entrano sempre in Modalità Inserimento, la sola differenza è dove verranno inseriti i caratteri. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.3: UN ALTRO MODO DI RIMPIAZZARE [REPLACE] + Lezione 1.6.3: UN ALTRO MODO DI RIMPIAZZARE [REPLACE] ** Batti una R maiuscola per rimpiazzare più di un carattere. ** @@ -781,7 +781,7 @@ NOTA: La Modalità Replace è come la Modalità Inserimento, ma ogni carattere che viene battuto ricopre un carattere esistente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.4: COPIA E INCOLLA DEL TESTO + Lezione 1.6.4: COPIA E INCOLLA DEL TESTO ** usa l'operatore y per copiare del testo e p per incollarlo ** @@ -804,7 +804,7 @@ NOTA: La Modalità Replace è come la Modalità Inserimento, ma ogni carattere NOTA: Puoi usare y come operatore; yw copia una parola [word]. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6.5: SET [IMPOSTA] UN'OPZIONE + Lezione 1.6.5: SET [IMPOSTA] UN'OPZIONE ** Imposta un'opzione per ignorare maiuscole/minuscole ** ** durante la ricerca/sostituzione ** @@ -827,7 +827,7 @@ NOTA: Per non evidenziare le occorrenze trovate batti: :nohlsearch NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c nel comando di ricerca: /nota\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 6 SOMMARIO + Lezione 1.6 SOMMARIO 1. Batti o per aggiungere una linea SOTTO il cursore ed entrare in Modalità Inserimento. @@ -850,7 +850,7 @@ NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c 7. Usa il prefisso "no" per annullare una opzione: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 7.1: OTTENERE AIUTO + Lezione 1.7.1: OTTENERE AIUTO ** Usa il sistema di aiuto on-line ** @@ -873,7 +873,7 @@ NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 7.2: PREPARARE UNO SCRIPT INIZIALE + Lezione 1.7.2: PREPARARE UNO SCRIPT INIZIALE ** Attiva le opzioni Vim ** @@ -896,7 +896,7 @@ NOTA: Per ignorare maiuscole/minuscole solo per una ricerca, usa \c Per maggiori informazioni batti: :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 7.3: COMPLETAMENTO + Lezione 1.7.3: COMPLETAMENTO ** Completamento linea comandi con CTRL-D e ** @@ -919,7 +919,7 @@ NOTA: Il completamento è disponibile per molti comandi. Prova a battere CTRL-D e . Particolarmente utile per :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lezione 7 Sommario + Lezione 1.7 Sommario 1. Batti :help o premi o per aprire una finestra di aiuto. diff --git a/usr/share/vim/vim91/tutor/tutor.ja.euc b/usr/share/vim/vim91/tutor/tutor1.ja.euc similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.ja.euc rename to usr/share/vim/vim91/tutor/tutor1.ja.euc index 92e040db349..4d6d3b9d385 100644 --- a/usr/share/vim/vim91/tutor/tutor.ja.euc +++ b/usr/share/vim/vim91/tutor/tutor1.ja.euc @@ -18,10 +18,10 @@ ƤʤФʤޤؽˤϥޥɤºݤ˻ʤ ʤʤΤǤʸϤɤʤСä˺Ƥޤޤ! - CapsåƤʤȤǧ塢̤˥å1.1 + CapsåƤʤȤǧ塢̤˥å1.1.1 ɽȤޤǡj 򲡤ƥưޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 1.1: ΰư + å 1.1.1: ΰư ** ưˤϡͤ h,j,k,l 򲡤ޤ ** @@ -35,7 +35,7 @@ 2. ؤΥ(j)򲡤ĤŤȡϢ³ưưǤޤ ǼΥå˰ưˡ狼ޤ͡ - 3. ؤΥȤäơå1.2 ˰ưޤ礦 + 3. ؤΥȤäơå1.1.2 ˰ưޤ礦 NOTE: 򥿥פƤ뤫Ƚʤʤä顢򲡤ƥΡޥ⡼ɤˤ ޤ줫Ϥ褦ȤƤޥɤϤޤ礦 @@ -44,7 +44,7 @@ NOTE: ®ư뤳ȤǤǤ礦ޥ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 1.2: VIM εưȽλ + å 1.1.2: VIM εưȽλ !! NOTE: ʲΤ륹ƥåפԤˡΥåɤߤޤ礦!! @@ -63,11 +63,11 @@ NOTE: NOTE: :q! Ƥѹ˴ޤåˤѹե ¸ˡˤĤƤٶƤޤ礦 - 5. 1.3ޤǥưޤ礦 + 5. 1.1.3ޤǥưޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 1.3: ƥԽ - + å 1.1.3: ƥԽ - ** Ρޥ⡼ɤˤƥβʸˤ x 򲡤ޤ ** @@ -82,14 +82,14 @@ NOTE: :q! ---> ĤĤ Ƥ ȤӤϤͤ - 5. Ԥʤä顢å 1.4 ؿʤߤޤ礦 + 5. Ԥʤä顢å 1.1.4 ؿʤߤޤ礦 NOTE: ƤΥå̤ơФ褦ȤΤǤϤʤºݤˤäƤߤޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 1.4: ƥԽ - + å 1.1.4: ƥԽ - ** Ρޥ⡼ɤˤƥƥȤˤ i 򲡤ޤ ** @@ -107,12 +107,12 @@ NOTE: ---> ˤ ­ʤ ƥ 롣 ---> ˤ Ĥ ­ʤ ƥ 롣 - 5. ˡ狼äå 1.5 ؿʤߤޤ礦 + 5. ˡ狼äå 1.1.5 ؿʤߤޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 1.5: ƥԽ - ɲ + å 1.1.5: ƥԽ - ɲ ** ƥȤɲäˤ A 򲡤ޤ礦 ** @@ -132,17 +132,17 @@ NOTE: ---> ˤְäƥ ˤְäƥȤޤ - 5. ƥȤɲäڲˤʤäƤå 1.6 ؿʤߤޤ礦 + 5. ƥȤɲäڲˤʤäƤå 1.1.6 ؿʤߤޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 1.6: եԽ + å 1.1.6: եԽ ** ե¸ƽλˤ :wq ȥפޤ ** !! NOTE: ʲΥƥåפ¹ԤˡޤΤɤǤ!! 1. ̤üϤǰʲƤԤäƤǤʤС - å 1.2 Ǥä褦 :q! 򥿥פơΥ塼ȥꥢλ + å 1.1.2 Ǥä褦 :q! 򥿥פơΥ塼ȥꥢλ ޤ 2. ץץȤǤΥޥɤ򥿥פޤ: vim file.txt @@ -159,7 +159,7 @@ NOTE: 6. ʾΥƥåפɤ򤷤Ǥ¹Ԥޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 1 + å 1.1 1. ⤷ hjkl ǰưޤ @@ -179,10 +179,10 @@ NOTE: NOTE: 򲡤ȥΡޥ⡼ɤ˰ܹԤޤκݡְä ΥޥɤäȤǤޤ -ơ³ƥå 2 Ϥޤ礦 +ơ³ƥå 1.2 Ϥޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 2.1: ޥ + å 1.2.1: ޥ ** ñޤǤˤ dw ȥפޤ礦 ** @@ -201,11 +201,11 @@ NOTE: ---> ʸ ˤ Ĥ Τ ɬפΤʤ ñ ޤޤ ޤ - 5. 3 4 ޤǤʸʤޤǷ֤å 2.2 ؿʤߤޤ礦 + 5. 3 4 ޤǤʸʤޤǷ֤å 1.2.2 ؿʤߤޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 2.2: ¾κޥ + å 1.2.2: ¾κޥ ** ԤޤǤˤ d$ ȥפޤ礦 ** @@ -221,14 +221,14 @@ NOTE: ---> ïιԤκǸ2٥פޤ 2٥פޤ - 5. ɤȤ򤹤뤿ˡå 2.3 ؿʤߤޤ礦 + 5. ɤȤ򤹤뤿ˡå 1.2.3 ؿʤߤޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 2.3: ڥ졼ȥ⡼ + å 1.2.3: ڥ졼ȥ⡼ ƥȤѹä¿Υޥɤϥڥ졼ȥ⡼󤫤ʤޤ @@ -251,7 +251,7 @@ NOTE: ߤޤ礦뤬ŪǼ֤˰ưϤǤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 2.4: ⡼˥ȤѤ + å 1.2.4: ⡼˥ȤѤ ** Ԥ֤Υ⡼˿ͤ򥿥פޤ ** @@ -268,13 +268,13 @@ NOTE: ---> This is just a line with words you can move around in. - 6. å 2.5 ˿ʤߤޤ礦 + 6. å 1.2.5 ˿ʤߤޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 2.5: ¿뤿˥ȤѤ + å 1.2.5: ¿뤿˥ȤѤ ** ڥ졼ȥȤ򥿥פȡʣ󷫤֤ޤ ** @@ -297,7 +297,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 2.6: Ԥ + å 1.2.6: Ԥ ** Τˤ dd ȥפޤ ** @@ -321,7 +321,7 @@ NOTE: 2󥿥פ1ԤФƺѤˡϰʲǽҤ٤륪ڥ졼Ǥưޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 2.7: ľޥ + å 1.2.7: ľޥ ** ǸΥޥɤäˤ u 򲡤ޤU ϹΤμäǤ ** @@ -338,13 +338,13 @@ NOTE: ---> ΤιԤΤδְ㤤Ǥνäޤޤ - 8. ϤȤƤʥޥɤǤå 2 ؿʤߤޤ礦 + 8. ϤȤƤʥޥɤǤå 1.2 ؿʤߤޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 2 + å 1.2 1. ֤鼡ñޤǤˤ dw ȥפޤ @@ -368,7 +368,7 @@ NOTE: äμä: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 3.1: Žդޥ + å 1.3.1: Žդޥ ** Ǹ˺줿Ԥ򥫡θŽդˤ p 򥿥פޤ ** @@ -392,7 +392,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 3.2: ֤ޥ + å 1.3.2: ֤ޥ ** βʸ x ֤ˤ rx 򥿥פޤ ** @@ -408,14 +408,14 @@ NOTE: ---> ιϤ͡οͤϴĤä򲡤⤷! ---> ιԤϤˡοͤϴĤְä򲡤ޤ! - 5. å 3.3 ؿʤߤޤ礦 + 5. å 1.3.3 ؿʤߤޤ礦 NOTE: ºݤ˻ޤ礦褷ƳФˤϤʤȡ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 3.3: ѹޥ + å 1.3.3: ѹޥ ** ñޤǤѹˤ ce ȥפޤ ** @@ -438,7 +438,7 @@ cc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 3.4: c Ѥ¾ѹ + å 1.3.4: c Ѥ¾ѹ ** ѹڥ졼ϡƱͤ˥⡼Ѥޤ ** @@ -461,7 +461,7 @@ cc NOTE: δְ㤤ϥХåڡȤäľȤǤޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 3 + å 1.3 1. ˺줿ƥȤ֤ˤϡp 򥿥פޤϺ @@ -484,7 +484,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 4.1: ֤ȥեξ + å 1.4.1: ֤ȥեξ ** եǤΰ֤ȥեξ֤ɽˤ CTRL-G 򥿥פޤ եΤԤ˰ưˤ G 򥿥פޤ ** @@ -507,7 +507,7 @@ NOTE: 4. Ƥ饹ƥå 1 3 ¹Ԥޤ礦 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 4.2: ޥ + å 1.4.2: ޥ ** 򸡺ˤ / ȡ򥿥פޤ ** @@ -530,7 +530,7 @@ NOTE: ϡեƬ鸡³Ԥޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 4.3: б̤򸡺 + å 1.4.3: б̤򸡺 ** б ),] } 򸡺ˤ % 򥿥פޤ ** @@ -553,7 +553,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 4.4: ְ㤤ѹˡ + å 1.4.4: ְ㤤ѹˡ ** 'old' 'new' ִˤ :s/old/new/g ȥפޤ ** @@ -576,7 +576,7 @@ NOTE: ѹ롣 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 4 + å 1.4 1. CTRL-G ϥեǤΰ֤ȥեξܺ٤ɽޤ @@ -599,7 +599,7 @@ NOTE: 'c' äִ٤˳ǧ롣 :%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 5.1: ޥɤ¹Ԥˡ + å 1.5.1: ޥɤ¹Ԥˡ ** :! θ˼¹Ԥ볰ޥɤ򥿥פޤ ** @@ -622,7 +622,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 5.2: ¾Υեؽ񤭹 + å 1.5.2: ¾Υեؽ񤭹 ** եѹ¸ˤ :w ե̾ ȥפޤ ** @@ -645,7 +645,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 5.3: 򤷤񤭹 + å 1.5.3: 򤷤񤭹 ** եΰ¸ˤϡv ⡼ :w FILENAME 򥿥פޤ ** @@ -669,21 +669,21 @@ NOTE: v Ǥޤ㤨 d ϥƥȤޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 5.4: եμȹʻ + å 1.5.4: եμȹʻ ** եȤˤ :r ե̾ ȥפޤ ** 1. 򤳤ιԤΤ˹碌ޤ -NOTE: ƥå 2 μ¹Ը塢å 5.3 ΥƥȤޤ˲äƤ +NOTE: ƥå 2 μ¹Ը塢å 1.5.3 ΥƥȤޤ˲äƤ Υå˰ưޤ礦 2. Ǥ TEST Ȥե :r TEST Ȥޥɤɤ߹ߤޤ礦 Ǥ TEST ϻȤե̾ΤȤǤ ɤ߹ޤ줿եϡԤβˤޤ - 3. եǧƤߤޤ礦᤹ȡå5.3 + 3. եǧƤߤޤ礦᤹ȡå1.5.3 ꥸʥȥեˤΤ2Ĥ뤳Ȥ狼ޤ NOTE: ޥɤνϤɤ߹ळȤǤޤ㤨С @@ -691,7 +691,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 5 + å 1.5 1. :!command ˤä ޥɤ¹Ԥ롣 @@ -714,7 +714,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 6.1: ץ󥳥ޥ + å 1.6.1: ץ󥳥ޥ ** o 򥿥פȡβιԤ⡼ɤޤ ** @@ -737,7 +737,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 6.2: ɲåޥ + å 1.6.2: ɲåޥ ** μΰ֤ƥȤɲäˤ a ȥפޤ ** @@ -760,7 +760,7 @@ NOTE: a, i ޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 6.3: ¾ִˡ + å 1.6.3: ¾ִˡ ** 1ʸʾ֤ˤʸ R ȥפޤ礦 ** @@ -782,7 +782,7 @@ NOTE: ޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 6.4: ƥȤΥԡȥڡ + å 1.6.4: ƥȤΥԡȥڡ ** ƥȤΥԡˤϥڥ졼 y 򡢥ڡȤˤ p Ȥޤ ** @@ -806,7 +806,7 @@ NOTE: NOTE: y 򥪥ڥ졼ȤƻȤȤǤޤyw ñ1 yank ޤ yy ϹԤ1 yank p ǤιԤ put ޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 6.5: ץ + å 1.6.5: ץ ** ִκݤʸ/ʸ̵뤹ˤϡץꤷޤ ** @@ -829,7 +829,7 @@ NOTE: NOTE: 1Ĥθޥɤʸʸζ̤᤿ʤС \c Ѥޤ: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 6 + å 1.6 1. o 򥿥פȥβιԤ򳫤ơ⡼ɤˤʤ롣 O (ʸ) 򥿥פȥξιԤ⡼ɤˤʤ롣 @@ -852,7 +852,7 @@ NOTE: 1 7. ץ̵ˤˤ "no" Ϳ: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 7.1: 饤إץޥ + å 1.7.1: 饤إץޥ ** 饤إפѤޤ礦 ** @@ -875,7 +875,7 @@ NOTE: 1 :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 7.2: ưץȤκ + å 1.7.2: ưץȤκ ** Vim ħȯ ** @@ -898,7 +898,7 @@ NOTE: 1 ¿ξˤ :help vimrc-intro ȥפޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 7.3: 䴰 + å 1.7.3: 䴰 ** CTRL-D ǥޥɥ饤䴰 ** @@ -921,7 +921,7 @@ NOTE: ä :help κݤΩޤ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - å 7 + å 1.7 1. إץɥ򳫤ˤ :help Ȥ뤫 򲡤 diff --git a/usr/share/vim/vim91/tutor/tutor.ja.sjis b/usr/share/vim/vim91/tutor/tutor1.ja.sjis similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.ja.sjis rename to usr/share/vim/vim91/tutor/tutor1.ja.sjis index ab463801cc4..ea1207e9d70 100644 --- a/usr/share/vim/vim91/tutor/tutor.ja.sjis +++ b/usr/share/vim/vim91/tutor/tutor1.ja.sjis @@ -18,10 +18,10 @@ ĂȂ΂Ȃ܂BwKɂ̓R}hۂɎȂ ȂȂ̂łB͂ǂ񂾂Ȃ΁AƖYĂ܂܂! - ACapsbNL[ĂȂƂmFAʂɃbX1.1 + ACapsbNL[ĂȂƂmFAʂɃbX1.1.1 S\Ƃ܂ŁAj L[ăJ[\ړ܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 1.1: J[\̈ړ + bX 1.1.1: J[\̈ړ ** J[\ړɂ́Al h,j,k,l ܂B ** @@ -35,7 +35,7 @@ 2. ւ̃L[(j)‚ÂƁAAĈړł܂B Ŏ̃bXɈړ@킩܂ˁB - 3. ւ̃L[gāAbX1.2 Ɉړ܂傤B + 3. ւ̃L[gāAbX1.1.2 Ɉړ܂傤B NOTE: ^CvĂ邩ȂȂAăm[}[hɂ ܂Bꂩ͂悤ƂĂR}hē͂܂傤B @@ -44,7 +44,7 @@ NOTE: ɑړ邱Ƃłł傤B}W! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 1.2: VIM ̋NƏI + bX 1.1.2: VIM ̋NƏI !! NOTE: ȉ̂XebvsOɁÃbXǂ݂܂傤!! @@ -63,11 +63,11 @@ NOTE: NOTE: :q! ͑SĂ̕ύXj܂BbXɂĕύXt@Cɕ @ɂ‚Ă׋Ă܂傤B - 5. 1.3܂ŃJ[\ړ܂傤B + 5. 1.1.3܂ŃJ[\ړ܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 1.3: eLXgҏW - 폜 + bX 1.1.3: eLXgҏW - 폜 ** m[}[hɂăJ[\̉̕폜ɂ x ܂B ** @@ -82,14 +82,14 @@ NOTE: :q! ---> ‚‚ Ă Ƃт͂˂ - 5. sȂAbX 1.4 ֐i݂܂傤B + 5. sȂAbX 1.1.4 ֐i݂܂傤B NOTE: SẴbXʂāAo悤Ƃ̂ł͂ȂۂɂĂ݂܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 1.4: eLXgҏW - } + bX 1.1.4: eLXgҏW - } ** m[}[hɂăeLXg}ɂ i ܂B ** @@ -107,12 +107,12 @@ NOTE: ---> ɂ Ȃ eLXg B ---> s ɂ ‚ Ȃ eLXg B - 5. }̕@킩烌bX 1.5 ֐i݂܂傤B + 5. }̕@킩烌bX 1.1.5 ֐i݂܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 1.5: eLXgҏW - lj + bX 1.1.5: eLXgҏW - lj ** eLXgljɂ A ܂傤B ** @@ -132,17 +132,17 @@ NOTE: ---> ɂԈeLX ɂԈeLXg܂B - 5. eLXg̒ljyɂȂĂ烌bX 1.6 ֐i݂܂傤B + 5. eLXg̒ljyɂȂĂ烌bX 1.1.6 ֐i݂܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 1.6: t@C̕ҏW + bX 1.1.6: t@C̕ҏW ** t@CۑďIɂ :wq ƃ^Cv܂B ** !! NOTE: ȉ̃XebvsOɁA܂Ŝǂł!! 1. ʂ̒[ꍇ͂ňȉ̓esĂBłȂ΁A - bX 1.2 ł悤 :q! ^CvāÃ`[gAI + bX 1.1.2 ł悤 :q! ^CvāÃ`[gAI ܂B 2. VFvvgł̃R}h^Cv܂: vim file.txt @@ -159,7 +159,7 @@ NOTE: 6. ȏ̃Xebvǂŗłs܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 1 v + bX 1.1 v 1. J[\͖L[ hjkl L[ňړ܂B @@ -179,10 +179,10 @@ NOTE: NOTE: L[ƃm[}[hɈڍs܂B̍ہAԈ͓r ̃R}hƂł܂B -āAăbX 2 n߂܂傤B +āAăbX 1.2 n߂܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 2.1: 폜R}h + bX 1.2.1: 폜R}h ** P̖܂ł폜ɂ dw ƃ^Cv܂傤B ** @@ -201,11 +201,11 @@ NOTE: ---> ɂ ‚ ̂ Kv̂Ȃ P ܂܂ ܂B - 5. 3 4 ܂ł𕶂Ȃ܂ŌJԂAbX 2.2 ֐i݂܂傤B + 5. 3 4 ܂ł𕶂Ȃ܂ŌJԂAbX 1.2.2 ֐i݂܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 2.2: ̑̍폜R}h + bX 1.2.2: ̑̍폜R}h ** s̖܂ł폜ɂ d$ ƃ^Cv܂傤B ** @@ -221,14 +221,14 @@ NOTE: ---> N̍s̍Ō2x^Cv܂B 2x^Cv܂B - 5. ǂƂ邽߂ɁAbX 2.3 ֐i݂܂傤B + 5. ǂƂ邽߂ɁAbX 1.2.3 ֐i݂܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 2.3: Iy[^ƃ[V + bX 1.2.3: Iy[^ƃ[V eLXgɕύX鑽̃R}h̓Iy[^ƃ[VȂ܂B @@ -251,7 +251,7 @@ NOTE: ݂܂傤BJ[\ړIꗗŎʒuɈړ͂łB ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 2.4: [VɃJEggp + bX 1.2.4: [VɃJEggp ** sJԂ̃[V̑Oɐl^Cv܂B ** @@ -268,13 +268,13 @@ NOTE: ---> This is just a line with words you can move around in. - 6. bX 2.5 ɐi݂܂傤B + 6. bX 1.2.5 ɐi݂܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 2.5: 葽폜邽߂ɃJEggp + bX 1.2.5: 葽폜邽߂ɃJEggp ** Iy[^ƃJEg^CvƁȂ삪JԂ܂B ** @@ -297,7 +297,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 2.6: s̑ + bX 1.2.6: s̑ ** sŜ폜ɂ dd ƃ^Cv܂B ** @@ -321,7 +321,7 @@ NOTE: 2^Cv1sɑ΂čp@͈ȉŏqׂIy[^ł삵܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 2.7: 蒼R}h + bX 1.2.7: 蒼R}h ** Ō̃R}hɂ u ܂BU ͍sŜ̎łB ** @@ -338,13 +338,13 @@ NOTE: ---> ̂̍ŝ̊ԈႢCXAł̏C܂܂B - 8. ͂ƂĂ֗ȃR}hłBbX 2 v֐i݂܂傤B + 8. ͂ƂĂ֗ȃR}hłBbX 1.2 v֐i݂܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 2 v + bX 1.2 v 1. J[\ʒu玟̒P܂ł폜ɂ dw ƃ^Cv܂B @@ -368,7 +368,7 @@ NOTE: ̎: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 3.1: \tR}h + bX 1.3.1: \tR}h ** Ōɍ폜ꂽsJ[\̌ɓ\tɂ p ^Cv܂B ** @@ -392,7 +392,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 3.2: uR}h + bX 1.3.2: uR}h ** J[\̉̕ x ɒuɂ rx ^Cv܂B ** @@ -408,14 +408,14 @@ NOTE: ---> ̍l͂ˁA̐l͊‚L[! ---> ̍s͂ɁA̐l͊‚ԈL[܂! - 5. AbX 3.3 ֐i݂܂傤B + 5. AbX 1.3.3 ֐i݂܂傤B NOTE: ۂɎ܂傤BĊo邾ɂ͂ȂƁB ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 3.3: ύXR}h + bX 1.3.3: ύXR}h ** P̖܂łύXɂ ce ƃ^Cv܂B ** @@ -438,7 +438,7 @@ cc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 3.4: c gp̑̕ύX + bX 1.3.4: c gp̑̕ύX ** ύXIy[^́A폜ƓlɃ[Vgp܂B ** @@ -461,7 +461,7 @@ cc NOTE: ^Cv̊ԈႢ̓obNXy[XL[gĒƂł܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 3 v + bX 1.3 v 1. ɍ폜ꂽeLXgĔzuɂ́Ap ^Cv܂B͍폜 @@ -484,7 +484,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 4.1: ʒuƃt@C̏ + bX 1.4.1: ʒuƃt@C̏ ** t@Cł̈ʒuƃt@C̏Ԃ\ɂ CTRL-G ^Cv܂B t@ĈsɈړɂ G ^Cv܂B ** @@ -507,7 +507,7 @@ NOTE: 4. MĂXebv 1 3 s܂傤B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 4.2: R}h + bX 1.4.2: R}h ** ɂ / ƁAO^Cv܂B ** @@ -530,7 +530,7 @@ NOTE: ꍇ́At@C̐擪猟𑱍s܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 4.3: Ή銇ʂ + bX 1.4.3: Ή銇ʂ ** Ή ),] } ɂ % ^Cv܂B ** @@ -553,7 +553,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 4.4: ԈႢύX@ + bX 1.4.4: ԈႢύX@ ** 'old' 'new' ɒuɂ :s/old/new/g ƃ^Cv܂B ** @@ -576,7 +576,7 @@ NOTE: ύXB ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 4 v + bX 1.4 v 1. CTRL-G ̓t@Cł̈ʒuƃt@C̏ڍׂ\܂B @@ -599,7 +599,7 @@ NOTE: 'c' ƒu̓xɊmF߂B :%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 5.1: OR}hs@ + bX 1.5.1: OR}hs@ ** :! ̌ɎsOR}h^Cv܂B ** @@ -622,7 +622,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 5.2: ̑̃t@C֏ + bX 1.5.2: ̑̃t@C֏ ** t@C֕ύXۑɂ :w t@C ƃ^Cv܂B ** @@ -645,7 +645,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 5.3: I + bX 1.5.3: I ** t@C̈ꕔۑɂ́Av [V :w FILENAME ^Cv܂B ** @@ -669,21 +669,21 @@ NOTE: v ł܂BႦ d ̓eLXg폜܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 5.4: t@C̎捞ƍ + bX 1.5.4: t@C̎捞ƍ ** t@C̒g}ɂ :r t@C ƃ^Cv܂B ** 1. J[\̍ŝɍ킹܂B -NOTE: Xebv 2 ̎sAbX 5.3 ̃eLXg܂BɉĂ +NOTE: Xebv 2 ̎sAbX 1.5.3 ̃eLXg܂BɉĂ ̃bXɈړ܂傤B 2. ł TEST Ƃt@C :r TEST ƂR}hœǂݍ݂܂傤B ł TEST ͎gt@C̖ÔƂłB ǂݍ܂ꂽt@ĆAJ[\s̉ɂ܂B - 3. 荞񂾃t@CmFĂ݂܂傤BJ[\߂ƁAbX5.3 + 3. 荞񂾃t@CmFĂ݂܂傤BJ[\߂ƁAbX1.5.3 IWiƃt@Cɂ̂2‚邱Ƃ킩܂B NOTE: OR}h̏o͂ǂݍނƂł܂BႦ΁A @@ -691,7 +691,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 5 v + bX 1.5 v 1. :!command ɂ OR}hsB @@ -714,7 +714,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 6.1: I[vR}h + bX 1.6.1: I[vR}h ** o ^CvƁAJ[\̉̍sJA}[hɓ܂B ** @@ -737,7 +737,7 @@ NOTE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 6.2: ljR}h + bX 1.6.2: ljR}h ** J[\̎̈ʒueLXgljɂ a ƃ^Cv܂B ** @@ -760,7 +760,7 @@ NOTE: a, i ܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 6.3: ̑̒u@ + bX 1.6.3: ̑̒u@ ** 1ȏuɂ͑啶 R ƃ^Cv܂傤B ** @@ -782,7 +782,7 @@ NOTE: 폜܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 6.4: eLXg̃Rs[ƃy[Xg + bX 1.6.4: eLXg̃Rs[ƃy[Xg ** eLXg̃Rs[ɂ̓Iy[^ y Ay[Xgɂ p g܂B ** @@ -806,7 +806,7 @@ NOTE: NOTE: y Iy[^ƂĎgƂł܂Byw ͒P1 yank ܂B yy ͍s1 yank Ap ł̍s put ܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 6.5: IvV̐ݒ + bX 1.6.5: IvV̐ݒ ** u̍ۂɑ啶/𖳎ɂ́AIvVݒ肵܂B ** @@ -829,7 +829,7 @@ NOTE: NOTE: 1‚̌R}h啶̋ʂ߂Ȃ΁A \c gp܂: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 6 v + bX 1.6 v 1. o ^CvƃJ[\̉̍sJāAő}[hɂȂB O (啶) ^CvƃJ[\̏̍ső}[hɂȂB @@ -852,7 +852,7 @@ NOTE: 1 7. IvV𖳌ɂɂ "no" t^: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 7.1: ICwvR}h + bX 1.7.1: ICwvR}h ** ICwvgp܂傤 ** @@ -875,7 +875,7 @@ NOTE: 1 :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 7.2: NXNvg̍쐬 + bX 1.7.2: NXNvg̍쐬 ** Vim ̓𔭊 ** @@ -898,7 +898,7 @@ NOTE: 1 葽̏𓾂ɂ :help vimrc-intro ƃ^Cv܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 7.3: ⊮ + bX 1.7.3: ⊮ ** CTRL-D ŃR}hC⊮ ** @@ -921,7 +921,7 @@ NOTE: B :help ̍ۂɖ𗧂܂B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - bX 7 v + bX 1.7 v 1. wvEBhEJɂ :help Ƃ邩 B diff --git a/usr/share/vim/vim91/tutor/tutor.ja.utf-8 b/usr/share/vim/vim91/tutor/tutor1.ja.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.ja.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.ja.utf-8 index 8eaa72cf055..96004ceaeab 100644 --- a/usr/share/vim/vim91/tutor/tutor.ja.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.ja.utf-8 @@ -18,10 +18,10 @@ ておかなければなりません。正しく学習するにはコマンドを実際に試さなければ ならないのです。文章を読んだだけならば、きっと忘れてしまいます! - さぁ、Capsロックキーが押されていないことを確認した後、画面にレッスン1.1 + さぁ、Capsロックキーが押されていないことを確認した後、画面にレッスン1.1.1 が全部表示されるところまで、j キーを押してカーソルを移動しましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 1.1: カーソルの移動 + レッスン 1.1.1: カーソルの移動 ** カーソルを移動するには、示される様に h,j,k,l を押します。 ** @@ -35,7 +35,7 @@ 2. 下へのキー(j)を押しつづけると、連続して移動できます。 これで次のレッスンに移動する方法がわかりましたね。 - 3. 下へのキーを使って、レッスン1.2 に移動しましょう。 + 3. 下へのキーを使って、レッスン1.1.2 に移動しましょう。 NOTE: 何をタイプしているか判らなくなったら、を押してノーマルモードにし ます。それから入力しようとしていたコマンドを再入力しましょう。 @@ -44,7 +44,7 @@ NOTE: カーソルキーでも移動できます。しかし hjkl に一度慣 に速く移動することができるでしょう。いやマジで! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 1.2: VIM の起動と終了 + レッスン 1.1.2: VIM の起動と終了 !! NOTE: 以下のあらゆるステップを行う前に、このレッスンを読みましょう!! @@ -63,11 +63,11 @@ NOTE: カーソルキーでも移動できます。しかし hjkl に一度慣 NOTE: :q! は全ての変更を破棄します。レッスンにて変更をファイルに保 存する方法についても勉強していきましょう。 - 5. 1.3までカーソルを移動させましょう。 + 5. 1.1.3までカーソルを移動させましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 1.3: テキスト編集 - 削除 + レッスン 1.1.3: テキスト編集 - 削除 ** ノーマルモードにてカーソルの下の文字を削除するには x を押します。 ** @@ -82,14 +82,14 @@ NOTE: :q! は全ての変更を破棄します。レッスンにて変 ---> その ううさぎ は つつきき を こええてて とびはねたた - 5. 行が正しくなったら、レッスン 1.4 へ進みましょう。 + 5. 行が正しくなったら、レッスン 1.1.4 へ進みましょう。 NOTE: 全てのレッスンを通じて、覚えようとするのではなく実際にやってみましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 1.4: テキスト編集 - 挿入 + レッスン 1.1.4: テキスト編集 - 挿入 ** ノーマルモードにてテキストを挿入するには i を押します。 ** @@ -107,12 +107,12 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく ---> この には 足りない テキスト ある。 ---> この 行 には 幾つか 足りない テキスト が ある。 - 5. 挿入の方法がわかったらレッスン 1.5 へ進みましょう。 + 5. 挿入の方法がわかったらレッスン 1.1.5 へ進みましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 1.5: テキスト編集 - 追加 + レッスン 1.1.5: テキスト編集 - 追加 ** テキストを追加するには A を押しましょう。 ** @@ -132,17 +132,17 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく ---> ここにも間違ったテキス ここにも間違ったテキストがあります。 - 5. テキストの追加が軽快になってきたらレッスン 1.6 へ進みましょう。 + 5. テキストの追加が軽快になってきたらレッスン 1.1.6 へ進みましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 1.6: ファイルの編集 + レッスン 1.1.6: ファイルの編集 ** ファイルを保存して終了するには :wq とタイプします。 ** !! NOTE: 以下のステップを実行する前に、まず全体を読んでください!! 1. 別の端末がある場合はそこで以下の内容を行ってください。そうでなければ、 - レッスン 1.2 でやったように :q! をタイプして、このチュートリアルを終了 + レッスン 1.1.2 でやったように :q! をタイプして、このチュートリアルを終了 します。 2. シェルプロンプトでこのコマンドをタイプします: vim file.txt @@ -159,7 +159,7 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく 6. 以上のステップを読んで理解した上でこれを実行しましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 1 要約 + レッスン 1.1 要約 1. カーソルは矢印キーもしくは hjkl キーで移動します。 @@ -179,10 +179,10 @@ NOTE: 全てのレッスンを通じて、覚えようとするのではなく NOTE: キーを押すとノーマルモードに移行します。その際、間違ったり入力途 中のコマンドを取り消すことができます。 -さて、続けてレッスン 2 を始めましょう。 +さて、続けてレッスン 1.2 を始めましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 2.1: 削除コマンド + レッスン 1.2.1: 削除コマンド ** 単語の末尾までを削除するには dw とタイプしましょう。 ** @@ -201,11 +201,11 @@ NOTE: キーを押すとノーマルモードに移行します。その ---> この 文 紙 には いくつかの たのしい 必要のない 単語 が 含まれて います。 - 5. 3 から 4 までを文が正しくなるまで繰り返し、レッスン 2.2 へ進みましょう。 + 5. 3 から 4 までを文が正しくなるまで繰り返し、レッスン 1.2.2 へ進みましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 2.2: その他の削除コマンド + レッスン 1.2.2: その他の削除コマンド ** 行の末尾までを削除するには d$ とタイプしましょう。 ** @@ -221,14 +221,14 @@ NOTE: キーを押すとノーマルモードに移行します。その ---> 誰かがこの行の最後を2度タイプしました。 2度タイプしました。 - 5. どういうことか理解するために、レッスン 2.3 へ進みましょう。 + 5. どういうことか理解するために、レッスン 1.2.3 へ進みましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 2.3: オペレータとモーション + レッスン 1.2.3: オペレータとモーション テキストに変更を加える多くのコマンドはオペレータとモーションからなります。 @@ -251,7 +251,7 @@ NOTE: 冒険したい人は、ノーマルモードにてオペレータなし みましょう。カーソルが目的語一覧で示される位置に移動するはずです。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 2.4: モーションにカウントを使用する + レッスン 1.2.4: モーションにカウントを使用する ** 何回も行いたい繰り返しのモーションの前に数値をタイプします。 ** @@ -268,13 +268,13 @@ NOTE: 冒険したい人は、ノーマルモードにてオペレータなし ---> This is just a line with words you can move around in. - 6. レッスン 2.5 に進みましょう。 + 6. レッスン 1.2.5 に進みましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 2.5: より多くを削除するためにカウントを使用する + レッスン 1.2.5: より多くを削除するためにカウントを使用する ** オペレータとカウントをタイプすると、その操作が複数回繰り返されます。 ** @@ -297,7 +297,7 @@ NOTE: 冒険したい人は、ノーマルモードにてオペレータなし ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 2.6: 行の操作 + レッスン 1.2.6: 行の操作 ** 行全体を削除するには dd とタイプします。 ** @@ -321,7 +321,7 @@ NOTE: 冒険したい人は、ノーマルモードにてオペレータなし 2回タイプで1行に対して作用させる方法は以下で述べるオペレータでも動作します。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 2.7: やり直しコマンド + レッスン 1.2.7: やり直しコマンド ** 最後のコマンドを取り消すには u を押します。U は行全体の取り消しです。 ** @@ -338,13 +338,13 @@ NOTE: 冒険したい人は、ノーマルモードにてオペレータなし ---> このの行のの間違いを修正々し、後でそれらの修正をを取り消しまますす。 - 8. これはとても便利なコマンドです。さぁレッスン 2 要約へ進みましょう。 + 8. これはとても便利なコマンドです。さぁレッスン 1.2 要約へ進みましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 2 要約 + レッスン 1.2 要約 1. カーソル位置から次の単語までを削除するには dw とタイプします。 @@ -368,7 +368,7 @@ NOTE: 冒険したい人は、ノーマルモードにてオペレータなし 取り消しの取り消し: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 3.1: 貼り付けコマンド + レッスン 1.3.1: 貼り付けコマンド ** 最後に削除された行をカーソルの後に貼り付けるには p をタイプします。 ** @@ -392,7 +392,7 @@ NOTE: 冒険したい人は、ノーマルモードにてオペレータなし ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 3.2: 置き換えコマンド + レッスン 1.3.2: 置き換えコマンド ** カーソルの下の文字を x に置き換えるには rx をタイプします。 ** @@ -408,14 +408,14 @@ NOTE: 冒険したい人は、ノーマルモードにてオペレータなし ---> この合を人力した時ね、その人は幾つか問違ったキーを押しもした! ---> この行を入力した時に、その人は幾つか間違ったキーを押しました! - 5. さぁ、レッスン 3.3 へ進みましょう。 + 5. さぁ、レッスン 1.3.3 へ進みましょう。 NOTE: 実際に試しましょう。決して覚えるだけにはしないこと。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 3.3: 変更コマンド + レッスン 1.3.3: 変更コマンド ** 単語の末尾までを変更するには ce とタイプします。 ** @@ -438,7 +438,7 @@ cc は同じことを行全体に対して行います。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 3.4: c を使用したその他の変更 + レッスン 1.3.4: c を使用したその他の変更 ** 変更オペレータは、削除と同じ様にモーションを使用します。 ** @@ -461,7 +461,7 @@ cc は同じことを行全体に対して行います。 NOTE: タイプ中の間違いはバックスペースキーを使って直すこともできます。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 3 要約 + レッスン 1.3 要約 1. 既に削除されたテキストを再配置するには、p をタイプします。これは削除さ @@ -484,7 +484,7 @@ NOTE: タイプ中の間違いはバックスペースキーを使って直す ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 4.1: 位置とファイルの情報 + レッスン 1.4.1: 位置とファイルの情報 ** ファイル内での位置とファイルの状態を表示するには CTRL-G をタイプします。 ファイル内のある行に移動するには G をタイプします。 ** @@ -507,7 +507,7 @@ NOTE: 画面の右下隅にカーソルの位置が表示されているかも 4. 自信が持てたらステップ 1 から 3 を実行しましょう。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 4.2: 検索コマンド + レッスン 1.4.2: 検索コマンド ** 語句を検索するには / と、前方検索する語句をタイプします。 ** @@ -530,7 +530,7 @@ NOTE: 検索がファイルの終わりに達すると、オプション 'wrapsc 場合は、ファイルの先頭から検索を続行します。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 4.3: 対応する括弧を検索 + レッスン 1.4.3: 対応する括弧を検索 ** 対応する ),] や } を検索するには % をタイプします。 ** @@ -553,7 +553,7 @@ NOTE: この機能は括弧が一致していないプログラムをデバッ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 4.4: 間違いを変更する方法 + レッスン 1.4.4: 間違いを変更する方法 ** 'old' を 'new' に置換するには :s/old/new/g とタイプします。 ** @@ -576,7 +576,7 @@ NOTE: この機能は括弧が一致していないプログラムをデバッ がら変更する。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 4 要約 + レッスン 1.4 要約 1. CTRL-G はファイルでの位置とファイルの詳細を表示します。 @@ -599,7 +599,7 @@ NOTE: この機能は括弧が一致していないプログラムをデバッ 'c' を加えると置換の度に確認を求める。 :%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 5.1: 外部コマンドを実行する方法 + レッスン 1.5.1: 外部コマンドを実行する方法 ** :! の後に実行する外部コマンドをタイプします。 ** @@ -622,7 +622,7 @@ NOTE: 全ての : コマンドは を押して終了しなければな ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 5.2: その他のファイルへ書き込み + レッスン 1.5.2: その他のファイルへ書き込み ** ファイルへ変更を保存するには :w ファイル名 とタイプします。 ** @@ -645,7 +645,7 @@ NOTE: ここで Vim を終了し、ファイル名 TEST と共に起動すると ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 5.3: 選択した書き込み + レッスン 1.5.3: 選択した書き込み ** ファイルの一部を保存するには、v モーションと :w FILENAME をタイプします。 ** @@ -669,21 +669,21 @@ NOTE: v を押すと、Visual 選択が始まります。カーソルを動か できます。例えば d はテキストを削除します。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 5.4: ファイルの取込と合併 + レッスン 1.5.4: ファイルの取込と合併 ** ファイルの中身を挿入するには :r ファイル名 とタイプします。 ** 1. カーソルをこの行のすぐ上に合わせます。 -NOTE: ステップ 2 の実行後、レッスン 5.3 のテキストが現れます。下に下がってこ +NOTE: ステップ 2 の実行後、レッスン 1.5.3 のテキストが現れます。下に下がってこ のレッスンに移動しましょう。 2. では TEST というファイルを :r TEST というコマンドで読み込みましょう。 ここでいう TEST は使うファイルの名前のことです。 読み込まれたファイルは、カーソル行の下にあります。 - 3. 取り込んだファイルを確認してみましょう。カーソルを戻すと、レッスン5.3 の + 3. 取り込んだファイルを確認してみましょう。カーソルを戻すと、レッスン1.5.3 の オリジナルとファイルによるものの2つがあることがわかります。 NOTE: 外部コマンドの出力を読み込むこともできます。例えば、 @@ -691,7 +691,7 @@ NOTE: 外部コマンドの出力を読み込むこともできます。例え ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 5 要約 + レッスン 1.5 要約 1. :!command によって 外部コマンドを実行する。 @@ -714,7 +714,7 @@ NOTE: 外部コマンドの出力を読み込むこともできます。例え ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 6.1: オープンコマンド + レッスン 1.6.1: オープンコマンド ** o をタイプすると、カーソルの下の行が開き、挿入モードに入ります。 ** @@ -737,7 +737,7 @@ NOTE: 外部コマンドの出力を読み込むこともできます。例え ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 6.2: 追加コマンド + レッスン 1.6.2: 追加コマンド ** カーソルの次の位置からテキストを追加するには a とタイプします。 ** @@ -760,7 +760,7 @@ NOTE: a, i と A は同じ挿入モードへ移りますが、文字が挿入さ ます。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 6.3: その他の置換方法 + レッスン 1.6.3: その他の置換方法 ** 1文字以上を置き換えるには大文字の R とタイプしましょう。 ** @@ -782,7 +782,7 @@ NOTE: 置換モードは挿入モードに似ていますが、全てのタイ を削除します。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 6.4: テキストのコピーとペースト + レッスン 1.6.4: テキストのコピーとペースト ** テキストのコピーにはオペレータ y を、ペーストには p を使います。 ** @@ -806,7 +806,7 @@ NOTE: 置換モードは挿入モードに似ていますが、全てのタイ NOTE: y をオペレータとして使うこともできます。yw は単語を1つ yank します。 yy は行を1つ yank し、p でその行を put します。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 6.5: オプションの設定 + レッスン 1.6.5: オプションの設定 ** 検索や置換の際に大文字/小文字を無視するには、オプションを設定します。 ** @@ -829,7 +829,7 @@ NOTE: マッチの強調表示をやめるには次の様に入力します: :n NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたいならば、語句内で \c を使用します: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 6 要約 + レッスン 1.6 要約 1. o をタイプするとカーソルの下の行を開けて、そこで挿入モードになる。 O (大文字) をタイプするとカーソルの上の行で挿入モードになる。 @@ -852,7 +852,7 @@ NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたい 7. オプションを無効にするには "no" を付与する: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 7.1: オンラインヘルプコマンド + レッスン 1.7.1: オンラインヘルプコマンド ** オンラインヘルプを使用しましょう ** @@ -875,7 +875,7 @@ NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたい :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 7.2: 起動スクリプトの作成 + レッスン 1.7.2: 起動スクリプトの作成 ** Vim の特徴を発揮する ** @@ -898,7 +898,7 @@ NOTE: 1つの検索コマンドだけ大文字小文字の区別をやめたい より多くの情報を得るには :help vimrc-intro とタイプします。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - レッスン 7.3: 補完 + レッスン 1.7.3: 補完 ** CTRL-D と でコマンドラインを補完する ** @@ -921,7 +921,7 @@ NOTE: 補完は多くのコマンドで動作します。そして CTRL-D と もしくは を押す。 diff --git a/usr/share/vim/vim91/tutor/tutor.ko b/usr/share/vim/vim91/tutor/tutor1.ko similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.ko rename to usr/share/vim/vim91/tutor/tutor1.ko index 993c43de8c7..60f1f488dca 100644 --- a/usr/share/vim/vim91/tutor/tutor.ko +++ b/usr/share/vim/vim91/tutor/tutor1.ko @@ -18,9 +18,9 @@ 것만으로는, 명령을 잊어버리게 될 것입니다. 자 이제, Caps Lock(Shift-Lock) 키가 눌려있지 않은지 확인해보시고, j 키를 - 충분히 눌러서 Lesson 1.1이 화면에 가득 차도록 움직여봅시다. + 충분히 눌러서 Lesson 1.1.1이 화면에 가득 차도록 움직여봅시다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.1: 커서 움직이기 + Lesson 1.1.1: 커서 움직이기 ** 커서를 움직이려면, 표시된 대로 h,j,k,l 키를 누르십시오. ** ^ @@ -34,7 +34,7 @@ 2. 아래 방향키 (j)를 반복입력이 될 때까지 누르고 계십시오. 이제 다음 lesson으로 가는 방법을 알게 되었습니다. - 3. 아래 방향키를 이용하여, Lesson 1.2 로 가십시오. + 3. 아래 방향키를 이용하여, Lesson 1.1.2 로 가십시오. 참고: 원하지 않는 무언가가 입력이 되었다면, 를 눌러서, 명령 모드로 돌아가십시오. 그 후에 원하는 명령을 다시 입력하십시오. @@ -43,7 +43,7 @@ 훨씬 빠르게 이동할 수 있을 것입니다. 정말요! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.2: 빔을 시작하고 끝내기 + Lesson 1.1.2: 빔을 시작하고 끝내기 !! 주의: 아래 있는 단계를 실행하기 전에, 이 lesson 전체를 읽으십시오!! @@ -68,9 +68,9 @@ 주의: :q! 는 바뀐 내용을 저장하지 않습니다. 이 후 lesson에서 어떻게 편집 내용을 저장하는지 배울 수 있습니다. - 5. 그 후 커서를 아래로 움직여 Lesson 1.3 으로 가십시오. + 5. 그 후 커서를 아래로 움직여 Lesson 1.1.3 으로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.3: 텍스트 편집 - 지우기 + Lesson 1.1.3: 텍스트 편집 - 지우기 ** 명령 모드에서 x 를 누르면 커서가 위치한 곳의 글자를 지울 수 있습니다. ** @@ -85,7 +85,7 @@ ---> The ccow jumpedd ovverr thhe mooon. - 5. 문장이 정확해졌다면, Lesson 1.4로 가십시오. + 5. 문장이 정확해졌다면, Lesson 1.1.4로 가십시오. 주의: 이 길잡이를 보면서 외우려고 하지말고, 직접 사용해보면서 익히길 바랍니다. @@ -93,7 +93,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.4: 텍스트 편집 - 삽입 (INSERTION) + Lesson 1.1.4: 텍스트 편집 - 삽입 (INSERTION) ** 명령 모드에서 i 를 누르면 텍스트를 입력할 수 있습니다. ** @@ -111,12 +111,12 @@ ---> There is text misng this . ---> There is some text missing from this line. - 5. 텍스트를 삽입하는 데에 익숙해졌다면, Lesson 1.5로 가십시오. + 5. 텍스트를 삽입하는 데에 익숙해졌다면, Lesson 1.1.5로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.5: 택스트 편집 - 추가 (APPENDING) + Lesson 1.1.5: 택스트 편집 - 추가 (APPENDING) ** A 를 입력해 텍스트를 추가할 수 있습니다. ** @@ -136,16 +136,16 @@ ---> There is also some text miss There is also some text missing here. - 5. 텍스트를 추가하는 데 익숙해졌다면, Lesson 1.6으로 가십시오. + 5. 텍스트를 추가하는 데 익숙해졌다면, Lesson 1.1.6으로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.6: 파일 편집 + Lesson 1.1.6: 파일 편집 ** :wq 를 이용하여 파일을 저장하고 빠져나갈 수 있습니다. ** !! 주의: 아래 있는 단계를 실행하기 전에, 이 lesson 전체를 읽으십시오!! - 1. lesson 1.2에서 배웠던 것처럼 :q!로 편집기를 나갈 수 있습니다. + 1. lesson 1.1.2에서 배웠던 것처럼 :q!로 편집기를 나갈 수 있습니다. 만약, 다른 터미널에 접근 가능하다면, 아래의 단계를 다른 터미널에서 해봅니다. 2. 쉘 프롬프트에 다음과 같이 입력합니다: vim tutor @@ -161,7 +161,7 @@ 6. 위 모든 단계를 다 읽고 이해한 후에 직접 해보세요. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 1 요약 + LESSON 1.1 요약 1. 커서를 움직일 때에는 화살표 키나 hjkl 키를 이용합니다. @@ -181,10 +181,10 @@ 참고: 는 명령 모드로 돌아가는 데 쓰며, 원치 않는 명령이나 완전히 입력되지 않은 명령을 취소하는 데에도 씁니다. -그럼 Lesson 2를 시작합시다. +그럼 Lesson 1.2를 시작합시다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.1: 삭제(DELETION) 명령 + Lesson 1.2.1: 삭제(DELETION) 명령 ** 한 단어를 끝까지 지우려면 dw 라고 치면 됩니다. ** @@ -202,11 +202,11 @@ ---> There are a some words fun that don't belong paper in this sentence. - 5. 3, 4번 과정을 다시 하여 문장을 정확하게 만든 뒤 Lesson 2.2로 가십시오. + 5. 3, 4번 과정을 다시 하여 문장을 정확하게 만든 뒤 Lesson 1.2.2로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.2: 다른 삭제 명령 + Lesson 1.2.2: 다른 삭제 명령 ** d$ 라고 치면 그 줄 끝까지 지워집니다. ** @@ -221,14 +221,14 @@ ---> Somebody typed the end of this line twice. end of this line twice. - 5. 어떤 일이 일어났는지 이해하기 위해 Lesson 2.3 으로 가십시오. + 5. 어떤 일이 일어났는지 이해하기 위해 Lesson 1.2.3 으로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.3: 명령과 적용 대상에 대해 + Lesson 1.2.3: 명령과 적용 대상에 대해 삭제 명령 d의 형식은 다음과 같습니다. @@ -250,7 +250,7 @@ 위에서 이야기한 대상의 목록에 따라 커서가 움직이게 됩니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.4: 대상에 반복 적용하기 + Lesson 1.2.4: 대상에 반복 적용하기 ** 대상 이전에 숫자를 넣어주면 그 만큼 반복 됩니다. ** @@ -267,10 +267,10 @@ ---> This is just a line with words you can move around in. - 6. Lesson 2.5로 가십시오. + 6. Lesson 1.2.5로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.5: 삭제에 반복 적용하기 + Lesson 1.2.5: 삭제에 반복 적용하기 ** 명령과 숫자를 함께 사용하면 그만큼 반복 수행 됩니다. ** @@ -287,7 +287,7 @@ ---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.6: 줄 전체 조작하기 + Lesson 1.2.6: 줄 전체 조작하기 @@ -311,7 +311,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.7: 취소(UNDO) 명령 + Lesson 1.2.7: 취소(UNDO) 명령 ** u 를 누르면 마지막 명령이 취소되며, U 는 줄 전체를 수정합니다. ** @@ -327,13 +327,13 @@ ---> Fiix the errors oon thhis line and reeplace them witth undo. - 8. 이 명령은 매우 유용합니다. 그럼 Lesson 2 요약으로 넘어가도록 합시다. + 8. 이 명령은 매우 유용합니다. 그럼 Lesson 1.2 요약으로 넘어가도록 합시다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 2 요약 + LESSON 1.2 요약 1. 커서가 위치한 곳부터 단어의 끝까지 지우려면: dw @@ -357,7 +357,7 @@ 취소한 것을 다시 실행하려면: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.1: 붙이기(PUT) 명령 + Lesson 1.3.1: 붙이기(PUT) 명령 ** p 를 입력하여 마지막으로 지운 내용을 커서 뒤에 붙입니다. ** @@ -380,7 +380,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.2: 치환(REPLACE) 명령 + Lesson 1.3.2: 치환(REPLACE) 명령 ** 커서 아래의 글자 하나를 바꾸려면, r 을 누른 후 바꿀 글자를 입력합니다. ** @@ -396,14 +396,14 @@ ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ---> When this line was typed in, someone pressed some wrong keys! - 5. Lesson 3.2 로 이동합시다. + 5. Lesson 1.3.2 로 이동합시다. 주의: 외우지 말고, 직접 해보면서 익혀야 한다는 것을 잊지 마십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.3: 변환(CHANGE) 명령 + Lesson 1.3.3: 변환(CHANGE) 명령 ** 한 단어의 전체를 바꾸려면, ce 를 치십시오. ** @@ -427,7 +427,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.4: c 를 이용한 다른 변환 명령 + Lesson 1.3.4: c 를 이용한 다른 변환 명령 ** 변환 명령은 삭제할 때 이용한 대상에 대해 적용할 수 있습니다. ** @@ -451,7 +451,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 참고: 입력하는 동안은 백스페이스를 이용할 수 있습니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 3 요약 + LESSON 1.3 요약 1. 이미 지운 내용을 되돌리려면, p 를 누르십시오. 이 명령은 커서 *다음에* @@ -474,7 +474,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.1: 위치와 파일의 상태 + Lesson 1.4.1: 위치와 파일의 상태 ** CTRL-G 를 누르면 파일 내에서의 현재 위치와 파일의 상태를 볼 수 있습니다. @@ -501,7 +501,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.2: 찾기 명령 + Lesson 1.4.2: 찾기 명령 ** / 를 누른 후 검색할 문구를 입력하십시오. ** @@ -525,7 +525,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.3: 괄호의 짝 찾기 + Lesson 1.4.3: 괄호의 짝 찾기 ** % 를 눌러서 ), ], } 의 짝을 찾습니다. ** @@ -547,7 +547,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.4: 치환(SUBTITUTE) 명령 + Lesson 1.4.4: 치환(SUBTITUTE) 명령 ** :s/old/new/g 하면 'old' 를 'new' 로 치환(SUBTITUTE)합니다. ** @@ -569,7 +569,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 할지 프롬프트로 명령합니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 4 요약 + LESSON 1.4 요약 1. CTRL-G 파일의 상태와 파일 내에서의 현재 위치를 표시합니다. G 파일의 끝으로 이동합니다. @@ -593,7 +593,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.1: 외부 명령 실행하는 방법 + Lesson 1.5.1: 외부 명령 실행하는 방법 ** :! 을 입력한 후 실행하려는 명령을 입력하십시오. ** @@ -615,7 +615,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.2: 보다 자세한 파일 저장 + Lesson 1.5.2: 보다 자세한 파일 저장 ** 수정된 내용을 파일로 저장하려면, :w FILENAME 하십시오. ** @@ -639,7 +639,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.3: 선택적으로 저장하는 명령 + Lesson 1.5.3: 선택적으로 저장하는 명령 ** 파일의 일부를 저장하려면, v 대상 :w FILENAME 을 입력합니다. ** @@ -660,27 +660,27 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 삭제할 수도 있습니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.4: 파일 읽어들이기, 합치기 + Lesson 1.5.4: 파일 읽어들이기, 합치기 ** 어떤 파일의 내용을 삽입하려면, :r FILENAME 하십시오 ** 1. 커서를 이 라인 바로 위로 옮기십시오. -주의: 3번째 단계를 실행하면, Lesson 5.3 을 보게 될 것입니다. 그렇게 되면 +주의: 3번째 단계를 실행하면, Lesson 1.5.3 을 보게 될 것입니다. 그렇게 되면 이 lesson으로 다시 내려오십시오. 2. 이제 TEST 파일을 읽어들입시다. :r TEST 명령을 사용하십시오. TEST 는 파일의 이름입니다. 읽어들인 파일은 커서가 위치한 문장 아래부터 놓이게 됩니다. 3. 파일이 읽어들여진 것을 확인하기 위해, 뒤로 이동해서 기존 버전과 파일에서 - 읽어들인 버전, 이렇게 Lesson 5.3 이 두번 반복되었음을 확인하십시오. + 읽어들인 버전, 이렇게 Lesson 1.5.3 이 두번 반복되었음을 확인하십시오. 참고: 외부 명령어의 결과값도 읽을 수 있습니다. 예를 들어, :r !ls 는 ls 명령어에 대한 결과값을 읽어 커서 바로 아래에 합칩니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 5 요약 + LESSON 1.5 요약 1. :!command 를 이용하여 외부 명령을 실행합니다. @@ -702,7 +702,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.1: 새 줄 열기(OPEN) 명령 + Lesson 1.6.1: 새 줄 열기(OPEN) 명령 ** o 를 누르면 커서 아래에 줄을 만들고 편집 모드가 됩니다. ** @@ -722,7 +722,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.2: 추가(APPEND) 명령 + Lesson 1.6.2: 추가(APPEND) 명령 ** a 를 누르면 커서 *다음에* 글을 입력할 수 있습니다. ** @@ -751,7 +751,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 참고: a, i 그리고 A 는 텍스트가 입력되는 위치 외에는 편집 모드와 완전히 같다는 것을 유념하십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.3: 치환(REPLACE) 의 다른 버전 + Lesson 1.6.3: 치환(REPLACE) 의 다른 버전 ** 대문자 R 을 입력하면 하나 이상의 글자를 바꿀 수 있습니다. ** @@ -770,7 +770,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 주의: 치환 모드는 편집 모드와 비슷합니다. 하지만 입력된 문자들이 원래 문자들을 삭제하는 점이 다릅니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.4: 문자 복사 붙여넣기(COPY AND PASTE) + Lesson 1.6.4: 문자 복사 붙여넣기(COPY AND PASTE) ** y 를 이용해 복사하고 p 로 붙여 넣습니다. ** @@ -794,7 +794,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 참고: y 역시 명령어로 사용 가능합니다. 예를 들어, yw 는 한 단어를 복사합니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.5: 옵션 설정(SET) + Lesson 1.6.5: 옵션 설정(SET) ** 찾기나 바꾸기에서 대소문자 구분을 없애기 위해 옵션을 설정합니다 ** @@ -821,7 +821,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 : /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 6 요약 + LESSON 1.6 요약 1. o 를 입력하면 커서 *아래에* 한 줄이 열리며, 커서는 편집 모드로 @@ -846,7 +846,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 7. 앞에 "no"를 붙여 옵션을 끌 수 있습니다: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 7.1: 온라인 도움말 명령 + LESSON 1.7.1: 온라인 도움말 명령 ** 온라인 도움말 시스템 사용하기 ** @@ -870,7 +870,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 7.2: 시작 스크립트 만들기 + LESSON 1.7.2: 시작 스크립트 만들기 ** 빔의 기능 켜기 ** @@ -892,7 +892,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 더 자세한 내용은 :help vimrc-intro를 참고 하세요. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.3: 명령어 완성하기 + Lesson 1.7.3: 명령어 완성하기 ** CTRL-D 와 이용하여 명령어를 완성할 수 있습니다.** @@ -915,7 +915,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 특히, :help 에서 유용할 것입니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7 요약 + Lesson 1.7 요약 1. 도움말을 열기 위해 :help 혹은 혹은 를 누릅니다. diff --git a/usr/share/vim/vim91/tutor/tutor.ko.euc b/usr/share/vim/vim91/tutor/tutor1.ko.euc similarity index 91% rename from usr/share/vim/vim91/tutor/tutor.ko.euc rename to usr/share/vim/vim91/tutor/tutor1.ko.euc index b93bb3be3c3..6e062511968 100644 --- a/usr/share/vim/vim91/tutor/tutor.ko.euc +++ b/usr/share/vim/vim91/tutor/tutor1.ko.euc @@ -18,9 +18,9 @@ ͸δ, ؾ Դϴ. , Caps Lock(Shift-Lock) Ű Ȯغð, j Ű - Lesson 1.1 ȭ鿡 ô. + Lesson 1.1.1 ȭ鿡 ô. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.1: Ŀ ̱ + Lesson 1.1.1: Ŀ ̱ ** Ŀ ̷, ǥõ h,j,k,l Ű ʽÿ. ** ^ @@ -34,7 +34,7 @@ 2. Ʒ Ű (j) ݺԷ ʽÿ. lesson ˰ Ǿϴ. - 3. Ʒ Ű ̿Ͽ, Lesson 1.2 ʽÿ. + 3. Ʒ Ű ̿Ͽ, Lesson 1.1.2 ʽÿ. : ʴ 𰡰 Է Ǿٸ, , ưʽÿ. Ŀ ϴ ٽ ԷϽʽÿ. @@ -43,7 +43,7 @@ ξ ̵ Դϴ. ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.2: ϰ + Lesson 1.1.2: ϰ !! : Ʒ ִ ܰ踦 ϱ , lesson ü ʽÿ!! @@ -68,9 +68,9 @@ : :q! ٲ ʽϴ. lesson  ϴ ֽϴ. - 5. Ŀ Ʒ Lesson 1.3 ʽÿ. + 5. Ŀ Ʒ Lesson 1.1.3 ʽÿ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.3: ؽƮ - + Lesson 1.1.3: ؽƮ - ** 忡 x Ŀ ġ ڸ ֽϴ. ** @@ -85,7 +85,7 @@ ---> The ccow jumpedd ovverr thhe mooon. - 5. Ȯٸ, Lesson 1.4 ʽÿ. + 5. Ȯٸ, Lesson 1.1.4 ʽÿ. : ̸ 鼭 ܿ , غ鼭 ٶϴ. @@ -93,7 +93,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.4: ؽƮ - (INSERTION) + Lesson 1.1.4: ؽƮ - (INSERTION) ** 忡 i ؽƮ Է ֽϴ. ** @@ -111,12 +111,12 @@ ---> There is text misng this . ---> There is some text missing from this line. - 5. ؽƮ ϴ ͼٸ, Lesson 1.5 ʽÿ. + 5. ؽƮ ϴ ͼٸ, Lesson 1.1.5 ʽÿ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.5: ýƮ - ߰ (APPENDING) + Lesson 1.1.5: ýƮ - ߰ (APPENDING) ** A Է ؽƮ ߰ ֽϴ. ** @@ -136,16 +136,16 @@ ---> There is also some text miss There is also some text missing here. - 5. ؽƮ ߰ϴ ͼٸ, Lesson 1.6 ʽÿ. + 5. ؽƮ ߰ϴ ͼٸ, Lesson 1.1.6 ʽÿ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.6: + Lesson 1.1.6: ** :wq ̿Ͽ ϰ ֽϴ. ** !! : Ʒ ִ ܰ踦 ϱ , lesson ü ʽÿ!! - 1. lesson 1.2 ó :q! ⸦ ֽϴ. + 1. lesson 1.1.2 ó :q! ⸦ ֽϴ. , ٸ ͹̳ο ϴٸ, Ʒ ܰ踦 ٸ ͹̳ο غϴ. 2. Ʈ Էմϴ: vim tutor @@ -161,7 +161,7 @@ 6. ܰ踦 а Ŀ غ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 1 + LESSON 1.1 1. Ŀ ȭǥ Ű hjkl Ű ̿մϴ. @@ -181,10 +181,10 @@ : ư , ġ ʴ ̳ Էµ ϴ ϴ. -׷ Lesson 2 սô. +׷ Lesson 1.2 սô. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.1: (DELETION) + Lesson 1.2.1: (DELETION) ** ܾ dw ġ ˴ϴ. ** @@ -202,11 +202,11 @@ ---> There are a some words fun that don't belong paper in this sentence. - 5. 3, 4 ٽ Ͽ Ȯϰ Lesson 2.2 ʽÿ. + 5. 3, 4 ٽ Ͽ Ȯϰ Lesson 1.2.2 ʽÿ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.2: ٸ + Lesson 1.2.2: ٸ ** d$ ġ ϴ. ** @@ -221,14 +221,14 @@ ---> Somebody typed the end of this line twice. end of this line twice. - 5.  Ͼ ϱ Lesson 2.3 ʽÿ. + 5.  Ͼ ϱ Lesson 1.2.3 ʽÿ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.3: ɰ + Lesson 1.2.3: ɰ d ϴ. @@ -250,7 +250,7 @@ ̾߱ Ͽ Ŀ ̰ ˴ϴ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.4: ݺ ϱ + Lesson 1.2.4: ݺ ϱ ** ڸ ־ָ ŭ ݺ ˴ϴ. ** @@ -267,10 +267,10 @@ ---> This is just a line with words you can move around in. - 6. Lesson 2.5 ʽÿ. + 6. Lesson 1.2.5 ʽÿ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.5: ݺ ϱ + Lesson 1.2.5: ݺ ϱ ** ɰ ڸ Բ ϸ ׸ŭ ݺ ˴ϴ. ** @@ -287,7 +287,7 @@ ---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.6: ü ϱ + Lesson 1.2.6: ü ϱ @@ -311,7 +311,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.7: (UNDO) + Lesson 1.2.7: (UNDO) ** u ҵǸ, U ü մϴ. ** @@ -327,13 +327,13 @@ ---> Fiix the errors oon thhis line and reeplace them witth undo. - 8. ſ մϴ. ׷ Lesson 2 Ѿ սô. + 8. ſ մϴ. ׷ Lesson 1.2 Ѿ սô. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 2 + LESSON 1.2 1. Ŀ ġ ܾ : dw @@ -357,7 +357,7 @@ ٽ Ϸ: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.1: ̱(PUT) + Lesson 1.3.1: ̱(PUT) ** p ԷϿ Ŀ ڿ Դϴ. ** @@ -380,7 +380,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.2: ġȯ(REPLACE) + Lesson 1.3.2: ġȯ(REPLACE) ** Ŀ Ʒ ϳ ٲٷ, r ٲ ڸ Էմϴ. ** @@ -396,14 +396,14 @@ ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ---> When this line was typed in, someone pressed some wrong keys! - 5. Lesson 3.2 ̵սô. + 5. Lesson 1.3.2 ̵սô. : ܿ , غ鼭 Ѵٴ ʽÿ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.3: ȯ(CHANGE) + Lesson 1.3.3: ȯ(CHANGE) ** ܾ ü ٲٷ, ce ġʽÿ. ** @@ -427,7 +427,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.4: c ̿ ٸ ȯ + Lesson 1.3.4: c ̿ ٸ ȯ ** ȯ ̿ ֽϴ. ** @@ -451,7 +451,7 @@ ce : Էϴ 齺̽ ̿ ֽϴ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 3 + LESSON 1.3 1. ̹ ǵ, p ʽÿ. Ŀ ** @@ -474,7 +474,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.1: ġ + Lesson 1.4.1: ġ ** CTRL-G ġ ¸ ֽϴ. @@ -501,7 +501,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.2: ã + Lesson 1.4.2: ã ** / ˻ ԷϽʽÿ. ** @@ -525,7 +525,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.3: ȣ ¦ ã + Lesson 1.4.3: ȣ ¦ ã ** % ), ], } ¦ ãϴ. ** @@ -547,7 +547,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.4: ġȯ(SUBTITUTE) + Lesson 1.4.4: ġȯ(SUBTITUTE) ** :s/old/new/g ϸ 'old' 'new' ġȯ(SUBTITUTE)մϴ. ** @@ -569,7 +569,7 @@ ce Ʈ մϴ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 4 + LESSON 1.4 1. CTRL-G ¿ ġ ǥմϴ. G ̵մϴ. @@ -593,7 +593,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.1: ܺ ϴ + Lesson 1.5.1: ܺ ϴ ** :! Է Ϸ ԷϽʽÿ. ** @@ -615,7 +615,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.2: ڼ + Lesson 1.5.2: ڼ ** Ϸ Ϸ, :w FILENAME Ͻʽÿ. ** @@ -639,7 +639,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.3: ϴ + Lesson 1.5.3: ϴ ** Ϻθ Ϸ, v :w FILENAME Էմϴ. ** @@ -660,27 +660,27 @@ ce ֽϴ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.4: о̱, ġ + Lesson 1.5.4: о̱, ġ **  Ϸ, :r FILENAME Ͻʽÿ ** 1. Ŀ ٷ űʽÿ. -: 3° ܰ踦 ϸ, Lesson 5.3 Դϴ. ׷ Ǹ +: 3° ܰ踦 ϸ, Lesson 1.5.3 Դϴ. ׷ Ǹ lesson ٽ ʽÿ. 2. TEST оԽô. :r TEST Ͻʽÿ. TEST ̸Դϴ. о Ŀ ġ Ʒ ̰ ˴ϴ. 3. о鿩 Ȯϱ , ڷ ̵ؼ Ͽ - о , ̷ Lesson 5.3 ι ݺǾ ȮϽʽÿ. + о , ̷ Lesson 1.5.3 ι ݺǾ ȮϽʽÿ. : ܺ ɾ ֽϴ. , :r !ls ls ɾ о Ŀ ٷ Ʒ Ĩϴ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 5 + LESSON 1.5 1. :!command ̿Ͽ ܺ մϴ. @@ -702,7 +702,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.1: (OPEN) + Lesson 1.6.1: (OPEN) ** o Ŀ Ʒ 尡 ˴ϴ. ** @@ -722,7 +722,7 @@ ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.2: ߰(APPEND) + Lesson 1.6.2: ߰(APPEND) ** a Ŀ ** Է ֽϴ. ** @@ -751,7 +751,7 @@ ce : a, i ׸ A ؽƮ ԷµǴ ġ ܿ ٴ Ͻʽÿ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.3: ġȯ(REPLACE) ٸ + Lesson 1.6.3: ġȯ(REPLACE) ٸ ** 빮 R Էϸ ϳ ̻ ڸ ٲ ֽϴ. ** @@ -770,7 +770,7 @@ ce : ġȯ մϴ. Էµ ڵ ڵ ϴ ٸϴ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.4: ٿֱ(COPY AND PASTE) + Lesson 1.6.4: ٿֱ(COPY AND PASTE) ** y ̿ ϰ p ٿ ֽϴ. ** @@ -794,7 +794,7 @@ ce : y ɾ մϴ. , yw ܾ մϴ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.5: ɼ (SET) + Lesson 1.6.5: ɼ (SET) ** ã⳪ ٲٱ⿡ ҹ ֱ ɼ մϴ ** @@ -821,7 +821,7 @@ ce : /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 6 + LESSON 1.6 1. o Էϸ Ŀ *Ʒ* , Ŀ @@ -846,7 +846,7 @@ ce 7. տ "no" ٿ ɼ ֽϴ: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 7.1: ¶ + LESSON 1.7.1: ¶ ** ¶ ý ϱ ** @@ -870,7 +870,7 @@ ce :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 7.2: ũƮ + LESSON 1.7.2: ũƮ ** ѱ ** @@ -892,7 +892,7 @@ ce ڼ :help vimrc-intro ϼ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.3: ɾ ϼϱ + Lesson 1.7.3: ɾ ϼϱ ** CTRL-D ̿Ͽ ɾ ϼ ֽϴ.** @@ -915,7 +915,7 @@ ce Ư, :help Դϴ. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7 + Lesson 1.7 1. :help Ȥ Ȥ ϴ. diff --git a/usr/share/vim/vim91/tutor/tutor.ko.utf-8 b/usr/share/vim/vim91/tutor/tutor1.ko.utf-8 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.ko.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.ko.utf-8 index 993c43de8c7..60f1f488dca 100644 --- a/usr/share/vim/vim91/tutor/tutor.ko.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.ko.utf-8 @@ -18,9 +18,9 @@ 것만으로는, 명령을 잊어버리게 될 것입니다. 자 이제, Caps Lock(Shift-Lock) 키가 눌려있지 않은지 확인해보시고, j 키를 - 충분히 눌러서 Lesson 1.1이 화면에 가득 차도록 움직여봅시다. + 충분히 눌러서 Lesson 1.1.1이 화면에 가득 차도록 움직여봅시다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.1: 커서 움직이기 + Lesson 1.1.1: 커서 움직이기 ** 커서를 움직이려면, 표시된 대로 h,j,k,l 키를 누르십시오. ** ^ @@ -34,7 +34,7 @@ 2. 아래 방향키 (j)를 반복입력이 될 때까지 누르고 계십시오. 이제 다음 lesson으로 가는 방법을 알게 되었습니다. - 3. 아래 방향키를 이용하여, Lesson 1.2 로 가십시오. + 3. 아래 방향키를 이용하여, Lesson 1.1.2 로 가십시오. 참고: 원하지 않는 무언가가 입력이 되었다면, 를 눌러서, 명령 모드로 돌아가십시오. 그 후에 원하는 명령을 다시 입력하십시오. @@ -43,7 +43,7 @@ 훨씬 빠르게 이동할 수 있을 것입니다. 정말요! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.2: 빔을 시작하고 끝내기 + Lesson 1.1.2: 빔을 시작하고 끝내기 !! 주의: 아래 있는 단계를 실행하기 전에, 이 lesson 전체를 읽으십시오!! @@ -68,9 +68,9 @@ 주의: :q! 는 바뀐 내용을 저장하지 않습니다. 이 후 lesson에서 어떻게 편집 내용을 저장하는지 배울 수 있습니다. - 5. 그 후 커서를 아래로 움직여 Lesson 1.3 으로 가십시오. + 5. 그 후 커서를 아래로 움직여 Lesson 1.1.3 으로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.3: 텍스트 편집 - 지우기 + Lesson 1.1.3: 텍스트 편집 - 지우기 ** 명령 모드에서 x 를 누르면 커서가 위치한 곳의 글자를 지울 수 있습니다. ** @@ -85,7 +85,7 @@ ---> The ccow jumpedd ovverr thhe mooon. - 5. 문장이 정확해졌다면, Lesson 1.4로 가십시오. + 5. 문장이 정확해졌다면, Lesson 1.1.4로 가십시오. 주의: 이 길잡이를 보면서 외우려고 하지말고, 직접 사용해보면서 익히길 바랍니다. @@ -93,7 +93,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.4: 텍스트 편집 - 삽입 (INSERTION) + Lesson 1.1.4: 텍스트 편집 - 삽입 (INSERTION) ** 명령 모드에서 i 를 누르면 텍스트를 입력할 수 있습니다. ** @@ -111,12 +111,12 @@ ---> There is text misng this . ---> There is some text missing from this line. - 5. 텍스트를 삽입하는 데에 익숙해졌다면, Lesson 1.5로 가십시오. + 5. 텍스트를 삽입하는 데에 익숙해졌다면, Lesson 1.1.5로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.5: 택스트 편집 - 추가 (APPENDING) + Lesson 1.1.5: 택스트 편집 - 추가 (APPENDING) ** A 를 입력해 텍스트를 추가할 수 있습니다. ** @@ -136,16 +136,16 @@ ---> There is also some text miss There is also some text missing here. - 5. 텍스트를 추가하는 데 익숙해졌다면, Lesson 1.6으로 가십시오. + 5. 텍스트를 추가하는 데 익숙해졌다면, Lesson 1.1.6으로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.6: 파일 편집 + Lesson 1.1.6: 파일 편집 ** :wq 를 이용하여 파일을 저장하고 빠져나갈 수 있습니다. ** !! 주의: 아래 있는 단계를 실행하기 전에, 이 lesson 전체를 읽으십시오!! - 1. lesson 1.2에서 배웠던 것처럼 :q!로 편집기를 나갈 수 있습니다. + 1. lesson 1.1.2에서 배웠던 것처럼 :q!로 편집기를 나갈 수 있습니다. 만약, 다른 터미널에 접근 가능하다면, 아래의 단계를 다른 터미널에서 해봅니다. 2. 쉘 프롬프트에 다음과 같이 입력합니다: vim tutor @@ -161,7 +161,7 @@ 6. 위 모든 단계를 다 읽고 이해한 후에 직접 해보세요. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 1 요약 + LESSON 1.1 요약 1. 커서를 움직일 때에는 화살표 키나 hjkl 키를 이용합니다. @@ -181,10 +181,10 @@ 참고: 는 명령 모드로 돌아가는 데 쓰며, 원치 않는 명령이나 완전히 입력되지 않은 명령을 취소하는 데에도 씁니다. -그럼 Lesson 2를 시작합시다. +그럼 Lesson 1.2를 시작합시다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.1: 삭제(DELETION) 명령 + Lesson 1.2.1: 삭제(DELETION) 명령 ** 한 단어를 끝까지 지우려면 dw 라고 치면 됩니다. ** @@ -202,11 +202,11 @@ ---> There are a some words fun that don't belong paper in this sentence. - 5. 3, 4번 과정을 다시 하여 문장을 정확하게 만든 뒤 Lesson 2.2로 가십시오. + 5. 3, 4번 과정을 다시 하여 문장을 정확하게 만든 뒤 Lesson 1.2.2로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.2: 다른 삭제 명령 + Lesson 1.2.2: 다른 삭제 명령 ** d$ 라고 치면 그 줄 끝까지 지워집니다. ** @@ -221,14 +221,14 @@ ---> Somebody typed the end of this line twice. end of this line twice. - 5. 어떤 일이 일어났는지 이해하기 위해 Lesson 2.3 으로 가십시오. + 5. 어떤 일이 일어났는지 이해하기 위해 Lesson 1.2.3 으로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.3: 명령과 적용 대상에 대해 + Lesson 1.2.3: 명령과 적용 대상에 대해 삭제 명령 d의 형식은 다음과 같습니다. @@ -250,7 +250,7 @@ 위에서 이야기한 대상의 목록에 따라 커서가 움직이게 됩니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.4: 대상에 반복 적용하기 + Lesson 1.2.4: 대상에 반복 적용하기 ** 대상 이전에 숫자를 넣어주면 그 만큼 반복 됩니다. ** @@ -267,10 +267,10 @@ ---> This is just a line with words you can move around in. - 6. Lesson 2.5로 가십시오. + 6. Lesson 1.2.5로 가십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.5: 삭제에 반복 적용하기 + Lesson 1.2.5: 삭제에 반복 적용하기 ** 명령과 숫자를 함께 사용하면 그만큼 반복 수행 됩니다. ** @@ -287,7 +287,7 @@ ---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.6: 줄 전체 조작하기 + Lesson 1.2.6: 줄 전체 조작하기 @@ -311,7 +311,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.7: 취소(UNDO) 명령 + Lesson 1.2.7: 취소(UNDO) 명령 ** u 를 누르면 마지막 명령이 취소되며, U 는 줄 전체를 수정합니다. ** @@ -327,13 +327,13 @@ ---> Fiix the errors oon thhis line and reeplace them witth undo. - 8. 이 명령은 매우 유용합니다. 그럼 Lesson 2 요약으로 넘어가도록 합시다. + 8. 이 명령은 매우 유용합니다. 그럼 Lesson 1.2 요약으로 넘어가도록 합시다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 2 요약 + LESSON 1.2 요약 1. 커서가 위치한 곳부터 단어의 끝까지 지우려면: dw @@ -357,7 +357,7 @@ 취소한 것을 다시 실행하려면: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.1: 붙이기(PUT) 명령 + Lesson 1.3.1: 붙이기(PUT) 명령 ** p 를 입력하여 마지막으로 지운 내용을 커서 뒤에 붙입니다. ** @@ -380,7 +380,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.2: 치환(REPLACE) 명령 + Lesson 1.3.2: 치환(REPLACE) 명령 ** 커서 아래의 글자 하나를 바꾸려면, r 을 누른 후 바꿀 글자를 입력합니다. ** @@ -396,14 +396,14 @@ ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ---> When this line was typed in, someone pressed some wrong keys! - 5. Lesson 3.2 로 이동합시다. + 5. Lesson 1.3.2 로 이동합시다. 주의: 외우지 말고, 직접 해보면서 익혀야 한다는 것을 잊지 마십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.3: 변환(CHANGE) 명령 + Lesson 1.3.3: 변환(CHANGE) 명령 ** 한 단어의 전체를 바꾸려면, ce 를 치십시오. ** @@ -427,7 +427,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.4: c 를 이용한 다른 변환 명령 + Lesson 1.3.4: c 를 이용한 다른 변환 명령 ** 변환 명령은 삭제할 때 이용한 대상에 대해 적용할 수 있습니다. ** @@ -451,7 +451,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 참고: 입력하는 동안은 백스페이스를 이용할 수 있습니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 3 요약 + LESSON 1.3 요약 1. 이미 지운 내용을 되돌리려면, p 를 누르십시오. 이 명령은 커서 *다음에* @@ -474,7 +474,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.1: 위치와 파일의 상태 + Lesson 1.4.1: 위치와 파일의 상태 ** CTRL-G 를 누르면 파일 내에서의 현재 위치와 파일의 상태를 볼 수 있습니다. @@ -501,7 +501,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.2: 찾기 명령 + Lesson 1.4.2: 찾기 명령 ** / 를 누른 후 검색할 문구를 입력하십시오. ** @@ -525,7 +525,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.3: 괄호의 짝 찾기 + Lesson 1.4.3: 괄호의 짝 찾기 ** % 를 눌러서 ), ], } 의 짝을 찾습니다. ** @@ -547,7 +547,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.4: 치환(SUBTITUTE) 명령 + Lesson 1.4.4: 치환(SUBTITUTE) 명령 ** :s/old/new/g 하면 'old' 를 'new' 로 치환(SUBTITUTE)합니다. ** @@ -569,7 +569,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 할지 프롬프트로 명령합니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 4 요약 + LESSON 1.4 요약 1. CTRL-G 파일의 상태와 파일 내에서의 현재 위치를 표시합니다. G 파일의 끝으로 이동합니다. @@ -593,7 +593,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.1: 외부 명령 실행하는 방법 + Lesson 1.5.1: 외부 명령 실행하는 방법 ** :! 을 입력한 후 실행하려는 명령을 입력하십시오. ** @@ -615,7 +615,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.2: 보다 자세한 파일 저장 + Lesson 1.5.2: 보다 자세한 파일 저장 ** 수정된 내용을 파일로 저장하려면, :w FILENAME 하십시오. ** @@ -639,7 +639,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.3: 선택적으로 저장하는 명령 + Lesson 1.5.3: 선택적으로 저장하는 명령 ** 파일의 일부를 저장하려면, v 대상 :w FILENAME 을 입력합니다. ** @@ -660,27 +660,27 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 삭제할 수도 있습니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.4: 파일 읽어들이기, 합치기 + Lesson 1.5.4: 파일 읽어들이기, 합치기 ** 어떤 파일의 내용을 삽입하려면, :r FILENAME 하십시오 ** 1. 커서를 이 라인 바로 위로 옮기십시오. -주의: 3번째 단계를 실행하면, Lesson 5.3 을 보게 될 것입니다. 그렇게 되면 +주의: 3번째 단계를 실행하면, Lesson 1.5.3 을 보게 될 것입니다. 그렇게 되면 이 lesson으로 다시 내려오십시오. 2. 이제 TEST 파일을 읽어들입시다. :r TEST 명령을 사용하십시오. TEST 는 파일의 이름입니다. 읽어들인 파일은 커서가 위치한 문장 아래부터 놓이게 됩니다. 3. 파일이 읽어들여진 것을 확인하기 위해, 뒤로 이동해서 기존 버전과 파일에서 - 읽어들인 버전, 이렇게 Lesson 5.3 이 두번 반복되었음을 확인하십시오. + 읽어들인 버전, 이렇게 Lesson 1.5.3 이 두번 반복되었음을 확인하십시오. 참고: 외부 명령어의 결과값도 읽을 수 있습니다. 예를 들어, :r !ls 는 ls 명령어에 대한 결과값을 읽어 커서 바로 아래에 합칩니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 5 요약 + LESSON 1.5 요약 1. :!command 를 이용하여 외부 명령을 실행합니다. @@ -702,7 +702,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.1: 새 줄 열기(OPEN) 명령 + Lesson 1.6.1: 새 줄 열기(OPEN) 명령 ** o 를 누르면 커서 아래에 줄을 만들고 편집 모드가 됩니다. ** @@ -722,7 +722,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.2: 추가(APPEND) 명령 + Lesson 1.6.2: 추가(APPEND) 명령 ** a 를 누르면 커서 *다음에* 글을 입력할 수 있습니다. ** @@ -751,7 +751,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 참고: a, i 그리고 A 는 텍스트가 입력되는 위치 외에는 편집 모드와 완전히 같다는 것을 유념하십시오. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.3: 치환(REPLACE) 의 다른 버전 + Lesson 1.6.3: 치환(REPLACE) 의 다른 버전 ** 대문자 R 을 입력하면 하나 이상의 글자를 바꿀 수 있습니다. ** @@ -770,7 +770,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 주의: 치환 모드는 편집 모드와 비슷합니다. 하지만 입력된 문자들이 원래 문자들을 삭제하는 점이 다릅니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.4: 문자 복사 붙여넣기(COPY AND PASTE) + Lesson 1.6.4: 문자 복사 붙여넣기(COPY AND PASTE) ** y 를 이용해 복사하고 p 로 붙여 넣습니다. ** @@ -794,7 +794,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 참고: y 역시 명령어로 사용 가능합니다. 예를 들어, yw 는 한 단어를 복사합니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.5: 옵션 설정(SET) + Lesson 1.6.5: 옵션 설정(SET) ** 찾기나 바꾸기에서 대소문자 구분을 없애기 위해 옵션을 설정합니다 ** @@ -821,7 +821,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 : /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 6 요약 + LESSON 1.6 요약 1. o 를 입력하면 커서 *아래에* 한 줄이 열리며, 커서는 편집 모드로 @@ -846,7 +846,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 7. 앞에 "no"를 붙여 옵션을 끌 수 있습니다: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 7.1: 온라인 도움말 명령 + LESSON 1.7.1: 온라인 도움말 명령 ** 온라인 도움말 시스템 사용하기 ** @@ -870,7 +870,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LESSON 7.2: 시작 스크립트 만들기 + LESSON 1.7.2: 시작 스크립트 만들기 ** 빔의 기능 켜기 ** @@ -892,7 +892,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 더 자세한 내용은 :help vimrc-intro를 참고 하세요. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.3: 명령어 완성하기 + Lesson 1.7.3: 명령어 완성하기 ** CTRL-D 와 이용하여 명령어를 완성할 수 있습니다.** @@ -915,7 +915,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있 특히, :help 에서 유용할 것입니다. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7 요약 + Lesson 1.7 요약 1. 도움말을 열기 위해 :help 혹은 혹은 를 누릅니다. diff --git a/usr/share/vim/vim91/tutor/tutor.lt.utf-8 b/usr/share/vim/vim91/tutor/tutor1.lt.utf-8 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.lt.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.lt.utf-8 index c3b87bb6a75..0e1c29663fb 100644 --- a/usr/share/vim/vim91/tutor/tutor.lt.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.lt.utf-8 @@ -32,11 +32,11 @@ klavišas – užrašu , o klavišas – užrašu <ĮVESTI>. Dabar įsitikinkite, kad yra išjungta didžiųjų raidžių veiksena - („Caps Lock“) ir spauskite klavišą j tol, kol 1.1 pamokos tekstas + („Caps Lock“) ir spauskite klavišą j tol, kol 1.1.1 pamokos tekstas visiškai užpildys ekraną. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.1 pamoka: ŽYMEKLIO VALDYMAS + 1.1.1 pamoka: ŽYMEKLIO VALDYMAS ** Žymeklis valdomas klavišų h,j,k,l pagalba, kaip pavaizduota. ** @@ -50,7 +50,7 @@ 2. Nuspauskite klavišą žemyn (j), kol jo veiksmas ims kartotis. Dabar žinote, kaip nukeliauti iki kitos pamokos. - 3. Naudodami klavišą žemyn, keliaukite iki 1.2 pamokos. + 3. Naudodami klavišą žemyn, keliaukite iki 1.1.2 pamokos. PASTABA: Jei kada nebūtumėte tikri, kad nuspaudėte reikiamą klavišą, spustelėkite klavišą – taip sugrįšite į „Normaliąją“ veikseną. @@ -61,7 +61,7 @@ PASTABA: Žymeklį paprastai galima valdyti ir rodyklių klavišais, tačiau, į ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.2 pamoka: DARBO SU „VIM“ PABAIGA + 1.1.2 pamoka: DARBO SU „VIM“ PABAIGA !! SVARBU: prieš bandydami toliau nurodytas komandas, !! @@ -84,11 +84,11 @@ PASTABA: komanda :q! užbaigia redaktoriaus darbą, atmesdama bet kokius juo atliktus, bet dar neįrašytus failo pakeitimus. Kaip pakeitimus įrašyti, sužinosite paskesnėje pamokoje. - 5. Perkelkite žymeklį žemyn į 1.3 pamoką. + 5. Perkelkite žymeklį žemyn į 1.1.3 pamoką. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.3 pamoka: TEKSTO REDAGAVIMAS - ŠALINIMAS + 1.1.3 pamoka: TEKSTO REDAGAVIMAS - ŠALINIMAS ** Pašalinti ties žymekliu esantį rašmenį galite spustelėdami x klavišą. ** @@ -104,14 +104,14 @@ PASTABA: komanda :q! užbaigia redaktoriaus darbą, atmesdama bet kokius ---> KKarvė peršooko pperr mmmėnullį. - 5. Ištaisę klaidas sakinyje, eikite į 1.4 pamoką. + 5. Ištaisę klaidas sakinyje, eikite į 1.1.4 pamoką. PASTABA: šiame pradžiamokslyje komandas stenkitės įsiminti ne tik skaitydami jų aprašymus, bet ir išbandydami jas praktiškai. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.4 pamoka: TEKSTO REDAGAVIMAS – ĮTERPIMAS + 1.1.4 pamoka: TEKSTO REDAGAVIMAS – ĮTERPIMAS ** Įterpti tekstą galite, prieš tai spustelėję i raidę. ** @@ -129,11 +129,11 @@ PASTABA: šiame pradžiamokslyje komandas stenkitės įsiminti ne tik skaitydami ---> Šioje eiluje trūksta tiek . ---> Šioje eilutėje trūksta šiek tiek teksto. - 5. Išmokę įterpti tekstą, keliaukite toliau į 1.5 pamoką. + 5. Išmokę įterpti tekstą, keliaukite toliau į 1.1.5 pamoką. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.5 pamoka: TEKSTO REDAGAVIMAS – PRIDĖJIMAS EILUTĖS GALE + 1.1.5 pamoka: TEKSTO REDAGAVIMAS – PRIDĖJIMAS EILUTĖS GALE ** Pridėti teksto eilutės gale galite, prieš tai spustelėję A raidę. ** @@ -154,10 +154,10 @@ PASTABA: šiame pradžiamokslyje komandas stenkitės įsiminti ne tik skaitydami ---> Čia taip pat trūks Čia taip pat trūksta šiek tiek teksto. - 5. Išmokę pridėti teksto eilutės gale, keliaukite toliau į 1.6 pamoką. + 5. Išmokę pridėti teksto eilutės gale, keliaukite toliau į 1.1.6 pamoką. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.6 pamoka: FAILO REDAGAVIMAS + 1.1.6 pamoka: FAILO REDAGAVIMAS ** Komanda :wq įrašo atvertą failą ir užbaigia redaktoriaus darbą. ** @@ -166,7 +166,7 @@ PASTABA: šiame pradžiamokslyje komandas stenkitės įsiminti ne tik skaitydami !! perskaitykite šią pamoką iki galo !! 1. Jei galite naudotis kitu terminalu, tolesnius veiksmus atlikite jame. - Kitu atveju užverkite šį pradžiamokslį kaip ir 1.2 pamokoje: :q! + Kitu atveju užverkite šį pradžiamokslį kaip ir 1.1.2 pamokoje: :q! 2. Komandų eilutėje įveskite komandą: vim failas.txt Čia „vim“ – komanda „Vim“ redaktoriui paleisti, o „failas.txt“ – norimo @@ -182,7 +182,7 @@ PASTABA: šiame pradžiamokslyje komandas stenkitės įsiminti ne tik skaitydami 6. Perskaitę ir įsiminę visus aukščiau aprašytus žingsnius, atlikite juos. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1 pamokos SANTRAUKA + 1.1 pamokos SANTRAUKA 1. Žymeklis valdomas rodyklių arba hjkl klavišais. @@ -202,11 +202,11 @@ PASTABA: šiame pradžiamokslyje komandas stenkitės įsiminti ne tik skaitydami PASTABA: paspaudimas grąžina į „Normaliąją“ veikseną arba nutraukia nereikalingos komandos įvedimą. -Dabar keliaukite į 2 pamoką. +Dabar keliaukite į 1.2 pamoką. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.1 pamoka: ŠALINIMO KOMANDOS + 1.2.1 pamoka: ŠALINIMO KOMANDOS ** Komanda dw šalina žodį. ** @@ -227,11 +227,11 @@ PASTABA: Raidė d pasirodys apatinėje terminalo eilutėje, spustelėjus jos ---> Yra mėlynas žodžių, kurie skėtis nepriklauso juokiasi šiam sakiniui. 5. Kartokite 3 ir 4 punktus tol, kol sakinys bus ištaisytas. Tuomet - keliaukite į 2.2 pamoką. + keliaukite į 1.2.2 pamoką. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.2 pamoka: DAUGIAU ŠALINIMO KOMANDŲ + 1.2.2 pamoka: DAUGIAU ŠALINIMO KOMANDŲ ** Komanda d$ pašalinta tekstą iki eilutės pabaigos. ** @@ -247,11 +247,11 @@ PASTABA: Raidė d pasirodys apatinėje terminalo eilutėje, spustelėjus jos ---> Kažkas šios eilutės pabaigą įvedė dukart. pabaigą įvedė dukart. - 5. Keliaukite į 2.3 pamoką. Ten sužinosite daugiau kaip vyksta šalinimas. + 5. Keliaukite į 1.2.3 pamoką. Ten sužinosite daugiau kaip vyksta šalinimas. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.3 pamoka: OPERATORIAI IR VEKTORIAI + 1.2.3 pamoka: OPERATORIAI IR VEKTORIAI Daugelį teksto redagavimo komandų sudaro operatorius ir vektorius. @@ -276,7 +276,7 @@ PASTABA: „Normaliojoje“ veiksenoje spustelėjus tik vektoriaus klavišą, be ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.4 pamoka: VEKTORIAUS NAUDOJIMAS SU SKAITIKLIU + 1.2.4 pamoka: VEKTORIAUS NAUDOJIMAS SU SKAITIKLIU ** Prieš vektoriaus ženklą parašius skaičių, jis pakartojamas atitinkamą @@ -296,11 +296,11 @@ PASTABA: „Normaliojoje“ veiksenoje spustelėjus tik vektoriaus klavišą, be ---> Šioje eilutėje yra žodžių, po kuriuos galite pakilnoti žymeklį. - 6. Keliaukite toliau į 2.5 pamoką. + 6. Keliaukite toliau į 1.2.5 pamoką. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.5 pamoka: SKAITIKLIO NAUDOJIMAS ŠALINANT TEKSTĄ + 1.2.5 pamoka: SKAITIKLIO NAUDOJIMAS ŠALINANT TEKSTĄ ** Kai skaičius naudojamas su operatoriumi, komanda pakartojama atitinkamą @@ -324,7 +324,7 @@ PASTABA: „Normaliojoje“ veiksenoje spustelėjus tik vektoriaus klavišą, be ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.6 pamoka: OPERAVIMAS VISOMIS EILUTĖMIS + 1.2.6 pamoka: OPERAVIMAS VISOMIS EILUTĖMIS ** Spustelėkite dd visai eilutei pašalinti. ** @@ -350,7 +350,7 @@ kitais žemiau paminėtais operatoriais. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.7 pamoka: ATŠAUKIMO KOMANDA + 1.2.7 pamoka: ATŠAUKIMO KOMANDA ** Spustelėkite u atšaukti paskutinės komandos pakeitimams, @@ -368,11 +368,11 @@ kitais žemiau paminėtais operatoriais. ---> Ištaisyykite klaidas šiioje eilutėje iir atšaukite paakeitimus. - 8. Šios komandos labai naudingos. Keliaukite į 2 pamokos santrauką. + 8. Šios komandos labai naudingos. Keliaukite į 1.2 pamokos santrauką. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2 pamokos SANTRAUKA + 1.2 pamokos SANTRAUKA 1. Tekstui pašalinti nuo žymeklio iki kito žodžio pradžios rinkite: dw @@ -399,7 +399,7 @@ kitais žemiau paminėtais operatoriais. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.1 pamoka: PATALPINIMO KOMANDA + 1.3.1 pamoka: PATALPINIMO KOMANDA ** Komanda p už žymeklio patalpina paskiausiai pašalintą tekstą. ** @@ -423,7 +423,7 @@ kitais žemiau paminėtais operatoriais. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.2 pamoka: PAKEITIMO KOMANDA + 1.3.2 pamoka: PAKEITIMO KOMANDA ** Rašmenį, esantį ties žymekliu, galite pakeisti, spustelėdami r ir @@ -440,13 +440,13 @@ kitais žemiau paminėtais operatoriais. ---> Kežkus, rinjdamss šį tekštą, pridėrė dauk kleidų! ---> Kažkas, rinkdamas šį tekstą, pridarė daug klaidų! - 5. Tuomet keliaukite į 3.3 pamoką. + 5. Tuomet keliaukite į 1.3.3 pamoką. PASTABA: Mokykitės ne tik skaitydami, bet ir darydami. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.3 pamoka: KEITIMO KOMANDA + 1.3.3 pamoka: KEITIMO KOMANDA ** Kai norite pakeisti viską iki žodžio pabaigos, spustelėkite ce . ** @@ -470,7 +470,7 @@ PASTABA: komanda ce pašalina žodį ir įjungia įterpimo veikseną, o ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.4 pamoka: KITI KEITIMAI NAUDOJANT c OPERATORIŲ + 1.3.4 pamoka: KITI KEITIMAI NAUDOJANT c OPERATORIŲ ** Keitimo komanda gali būti naudojama su tais pačiais vektoriais, @@ -499,7 +499,7 @@ PASTABA: rinkdami tekstą, klaidas pataisyti galite ir naudodamiesi įprastu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3 pamokos SANTRAUKA + 1.3 pamokos SANTRAUKA 1. Norėdami patalpinti paskiausiai pašalintą tekstą, spustelėkite p – taip @@ -521,7 +521,7 @@ Dabar keliaukite į kitą pamoką. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.1 pamoka: ŽYMEKLIO VIETA IR FAILO BŪSENA + 1.4.1 pamoka: ŽYMEKLIO VIETA IR FAILO BŪSENA ** Spustelėję CTRL+G, sužinosite žymeklio vietą faile ir failo būseną. @@ -548,7 +548,7 @@ PASTABA: žymeklio poziciją faile apatiniame dešiniajame redaktoriaus kampe ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.2 pamoka: PAIEŠKOS KOMANDA + 1.4.2 pamoka: PAIEŠKOS KOMANDA ** Paieška vykdoma, spustelint / , tada surenkant ieškomą frazę. ** @@ -578,7 +578,7 @@ PASTABA: paieškai pasiekus failo pabaigą, ji bus pratęsta nuo pradžios, nebe ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.3 pamoka: PORINIŲ SKLIAUSTŲ PAIEŠKA + 1.4.3 pamoka: PORINIŲ SKLIAUSTŲ PAIEŠKA ** Spauskite % , jei norite surasti porinį ), ] ar } skliaustą. ** @@ -599,7 +599,7 @@ PASTABA: Ši komanda pravers derinant programas su skliaustų maišalyne. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.4 pamoka: PAKAITOS KOMANDA + 1.4.4 pamoka: PAKAITOS KOMANDA ** Pakeisti vieną frazę kita padės komanda :s/viena/kita/g . ** @@ -625,7 +625,7 @@ PASTABA: Ši komanda pravers derinant programas su skliaustų maišalyne. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4 pamokos SANTRAUKA + 1.4 pamokos SANTRAUKA 1. CTRl+G parodo padėtį faile ir failo būseną. @@ -656,7 +656,7 @@ PASTABA: Ši komanda pravers derinant programas su skliaustų maišalyne. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.1 pamoka: KAIP ĮVYKDYTI IŠORINĘ KOMANDĄ + 1.5.1 pamoka: KAIP ĮVYKDYTI IŠORINĘ KOMANDĄ ** Surinkite :! ir norimą įvykdyti išorinę komandą – ir ji bus įvykdyta. ** @@ -678,7 +678,7 @@ Pastaba: Visos : komandos pradedamos vykdyti paspaudus ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.2 pamoka: DAR APIE FAILŲ RAŠYMĄ + 1.5.2 pamoka: DAR APIE FAILŲ RAŠYMĄ ** Jeigu norite įrašyti savo pakeitimus į failą, surinkite :w FAILO_VARDAS ** @@ -703,7 +703,7 @@ PASTABA: jei po šio žingsnio baigtumėte „Vim“ darbą, o tada vėl paleist ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.3 pamoka: ĮRAŠYTINO TEKSTO PAŽYMĖJIMAS + 1.5.3 pamoka: ĮRAŠYTINO TEKSTO PAŽYMĖJIMAS ** Norėdami įrašyti dalį failo, įveskite v vektorius :w FAILO_VARDAS ** @@ -730,23 +730,23 @@ PASTABA: Spustelėjus v , pradedamas Vizualusis pažymėjimas. Pažymėto teks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.4 pamoka: FAILO ĮTERPIMAS + 1.5.4 pamoka: FAILO ĮTERPIMAS ** Jei norite į tekstą įterpti kito failo turinį, surinkite :r FAILO_VARDAS ** 1. Perkelkite žymeklį virš šios eilutės. -PASTABA: Įvykdę 2 žingsnį, pamatysite 5.3 pamokos turinį. Tuomet grįžkite atgal +PASTABA: Įvykdę 2 žingsnį, pamatysite 1.5.3 pamokos turinį. Tuomet grįžkite atgal į šią pamoką. 2. Dabar įterpkite failo TESTAS turinį į tekstą, pasinaudodami komanda :r TESTAS , kur TESTAS – tai norimo įterpti failo vardas (šį failą - turėjote sukurti 5.3 pamokoje). Failo turinys bus įterptas iškart + turėjote sukurti 1.5.3 pamokoje). Failo turinys bus įterptas iškart po eilute, kurioje yra žymeklis. 3. Kad įsitikintumėte, jog komanda buvo įvykdyta, šiek tiek sugrįžkite - aukštyn. Turėtumėte matyti dvi 5.3 pamokos kopijas. + aukštyn. Turėtumėte matyti dvi 1.5.3 pamokos kopijas. PASTABA: Panašiai galite įterpti ir išorinės komandos išvestą tekstą. Pavyzdžiui, įvedę :r !ls , įterpsite ls komandos išvestį po eilute, @@ -754,7 +754,7 @@ PASTABA: Panašiai galite įterpti ir išorinės komandos išvestą tekstą. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5 pamokos SANTRAUKA + 1.5 pamokos SANTRAUKA 1. :!komanda įvykdo išorinę komandą. @@ -777,7 +777,7 @@ PASTABA: Panašiai galite įterpti ir išorinės komandos išvestą tekstą. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.1 pamoka: NAUJOS EILUTĖS ĮTERPIMO IR REDAGAVIMO KOMANDA („OPEN“) + 1.6.1 pamoka: NAUJOS EILUTĖS ĮTERPIMO IR REDAGAVIMO KOMANDA („OPEN“) ** Spustelėjus o , po žymekliu bus įterpta tuščia eilutė ir persijungta @@ -800,7 +800,7 @@ PASTABA: Panašiai galite įterpti ir išorinės komandos išvestą tekstą. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.2 pamoka: TEKSTO ĮTERPIMO UŽ ŽYMEKLIO KOMANDA („APPEND“) + 1.6.2 pamoka: TEKSTO ĮTERPIMO UŽ ŽYMEKLIO KOMANDA („APPEND“) ** Kai norite rašyti tekstą už žymeklio, spustelėkite a . ** @@ -825,7 +825,7 @@ PASTABA: komandos a, i ir A visos įjungia Įterpimo veikseną. Skiriasi tik ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.3 pamoka: KITAS KEITIMO BŪDAS + 1.6.3 pamoka: KITAS KEITIMO BŪDAS ** Spustelėkite R , jeigu norite pakeisti daugiau nei vieną rašmenį. ** @@ -846,7 +846,7 @@ PASTABA: Perrašymo veiksena yra analogiška Įterpimo veiksenai, tačiau ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.4 pamoka: TEKSTO KOPIJAVIMAS IR ĮKLIJAVIMAS + 1.6.4 pamoka: TEKSTO KOPIJAVIMAS IR ĮKLIJAVIMAS ** Tekstas kopijuojamas y operatoriumi, o įterpiamas p operatoriumi. ** @@ -876,7 +876,7 @@ PASTABA: Perrašymo veiksena yra analogiška Įterpimo veiksenai, tačiau ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.5 pamoka: PARINKČIŲ NUSTATYMAS + 1.6.5 pamoka: PARINKČIŲ NUSTATYMAS ** Kad ieškant teksto nebūtų paisoma didžiųjų ir mažųjų raidžių skirtumo, @@ -903,7 +903,7 @@ PASTABA: Jei norite raidžių registro nepaisyti tik vienos paieškos metu, fraz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6 pamokos SANTRAUKA + 1.6 pamokos SANTRAUKA 1. Spustelėjus o , įterpiama nauja eilutė ŽEMIAU žymeklio, žymeklis @@ -932,7 +932,7 @@ PASTABA: Jei norite raidžių registro nepaisyti tik vienos paieškos metu, fraz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.1 pamoka: VIM ŽINYNO KOMANDOS + 1.7.1 pamoka: VIM ŽINYNO KOMANDOS ** Naudokitės „Vim“ žinyno sistema. ** @@ -957,7 +957,7 @@ PASTABA: Jei norite raidžių registro nepaisyti tik vienos paieškos metu, fraz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.2 pamoka: PALEISTIES SCENARIJAUS KŪRIMAS + 1.7.2 pamoka: PALEISTIES SCENARIJAUS KŪRIMAS ** Išnaudokite „Vim“ privalumus ** @@ -983,7 +983,7 @@ PASTABA: Jei norite raidžių registro nepaisyti tik vienos paieškos metu, fraz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.3 pamoka: AUTOMATINIS UŽBAIGIMAS + 1.7.3 pamoka: AUTOMATINIS UŽBAIGIMAS ** Komandų užbaigimas naudojant CTRL+D ir ** @@ -1009,7 +1009,7 @@ PASTABA: Automatinis užbaigimas veikia su daugeliu komandų. Jį išbandyti gal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7 pamokos SANTRAUKA + 1.7 pamokos SANTRAUKA 1. Įveskite :help , arba spustelėkite arba žinynui atverti. diff --git a/usr/share/vim/vim91/tutor/tutor.lv.utf-8 b/usr/share/vim/vim91/tutor/tutor1.lv.utf-8 similarity index 91% rename from usr/share/vim/vim91/tutor/tutor.lv.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.lv.utf-8 index e1ca778d032..0cbeaae8c48 100644 --- a/usr/share/vim/vim91/tutor/tutor.lv.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.lv.utf-8 @@ -20,9 +20,9 @@ Tagad pārliecinieties, ka tastatūrai nav nospiesti SHIFT vai CAPS-LOCK taustiņi un spiediet j taustiņu, līdz pilnībā redzat - 1.1 nodarbības saturu + 1.1.1 nodarbības saturu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.1 nodarbība: KURSORA PĀRVIETOŠANA + 1.1.1 nodarbība: KURSORA PĀRVIETOŠANA ** Lai pārvietotu kursoru, spiediet taustiņus h, j, k, l ** @@ -45,7 +45,7 @@ PIEZĪME: Kursora vadībai var izmantot arī bultiņu taustiņus, bet ticiet — iemācīties vadīt ar j, k, l, h taustiņiem ir daudz parocīgāk! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.2 nodarbība: IZIEŠANA NO VIM + 1.1.2 nodarbība: IZIEŠANA NO VIM !! PIEZĪME: Pirms izpildīt šīs nodarbības soļus, izlasiet visu instrukciju! @@ -63,11 +63,11 @@ PIEZĪME: Kursora vadībai var izmantot arī bultiņu taustiņus, bet ticiet — PIEZĪME: :q! komanda atceļ visas failā radītās izmaiņas. Pēc dažām nodarbībām jūs uzzināsiet, kā izmaiņas varat saglabāt. - 5. Pārvietojiet kursoru, uz 1.3 nodarbību. + 5. Pārvietojiet kursoru, uz 1.1.3 nodarbību. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.3 nodarbība: TEKSTA REDIĢĒŠANA – DZĒŠANA + 1.1.3 nodarbība: TEKSTA REDIĢĒŠANA – DZĒŠANA ** Lai izdzēstu zem kursora atrodošos burtu, spiediet x ** @@ -81,14 +81,14 @@ PIEZĪME: :q! komanda atceļ visas failā radītās izmaiņas. Pēc da ---> Hiiipijiiii čččauuukstiiina celllofānu. - 5. Kad augstāk parādītā rinda ir izlabota, dodieties uz 1.4. nodarbību. + 5. Kad augstāk parādītā rinda ir izlabota, dodieties uz 1.1.4. nodarbību. PIEZĪME: Izpildot šo pamācību, centieties mācīties nevis domājot, bet gan praktiski trenējot kustību atmiņu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.4 nodarbība: TEKSTA REDIĢĒŠANA — IEVIETOŠANA + 1.1.4 nodarbība: TEKSTA REDIĢĒŠANA — IEVIETOŠANA ** Lai ievietotu tekstu, spiediet i ** @@ -105,11 +105,11 @@ PIEZĪME: Izpildot šo pamācību, centieties mācīties nevis domājot, ---> Šaā lnij no tksta rūkt dai buti. Šajā līnijā no teksta trūkst daži burti. - 5. Kad esat apguvis šīs darbības, dodieties uz 1.5. nodarbību. + 5. Kad esat apguvis šīs darbības, dodieties uz 1.1.5. nodarbību. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.5 nodarbība: TEKSTA REDIĢĒŠANA — PIEVIENOŠANA + 1.1.5 nodarbība: TEKSTA REDIĢĒŠANA — PIEVIENOŠANA ** Lai pievienotu tekstu, spiediet A ** @@ -129,11 +129,11 @@ PIEZĪME: Izpildot šo pamācību, centieties mācīties nevis domājot, ---> Šajā līnijā t Šajā līnijā tekstam pietrūkst beigas. - 5. Kad esat apguvis šīs darbības, dodieties uz 1.6. nodarbību. + 5. Kad esat apguvis šīs darbības, dodieties uz 1.1.6. nodarbību. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.6 nodarbība: FAILA SAGLABĀŠANA + 1.1.6 nodarbība: FAILA SAGLABĀŠANA ** Lai saglabātu failu un izietu no redaktora, spiediet :wq ** @@ -141,7 +141,7 @@ PIEZĪME: Izpildot šo pamācību, centieties mācīties nevis domājot, 1. Pārliecinieties, ka esat pareizi izpildījis visas iepriekšējās nodarbības. - 2. Ja neesat pārliecināts, izejiet no redaktora, kā 1.2. nodarbībā ar komandu: + 2. Ja neesat pārliecināts, izejiet no redaktora, kā 1.1.2. nodarbībā ar komandu: :q! 3. Tad atkal palaidiet pamācību, un, ja nepieciešams, veiciet failā izmaiņas. @@ -156,7 +156,7 @@ PIEZĪME: Izpildot šo pamācību, centieties mācīties nevis domājot, 5. Kad esat sapratis veicamās darbības, izpildiet tās. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1. nodarbības APKOPOJUMS + 1.1. nodarbības APKOPOJUMS 1. Kursoru pārvieto ar bultiņu vai arī h,j,k,l taustiņiem: @@ -177,10 +177,10 @@ PIEZĪME: Izpildot šo pamācību, centieties mācīties nevis domājot, PIEZĪME: spiešana atgriezīs jūs normālajā režīmā, vai arī atcels nepareizu vai daļēji ievadītu komandu. -Tagad dodieties uz 2. nodarbību. +Tagad dodieties uz 1.2. nodarbību. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.1 nodarbība: DZĒŠANAS KOMANDAS + 1.2.1 nodarbība: DZĒŠANAS KOMANDAS ** Lai izdzēstu vārdu, spiediet dw ** @@ -200,11 +200,11 @@ PIEZĪME: Nospiežot d, ekrāna labajā apakšējā stūrī parādīsies d burts ---> Šajā kuku teikumā ir tata daži lala vārdi, kuri mumu nav vajadzīgi. - 5. Izpildiet 3. — 4. soļus, līdz teksts ir pareizs un dodieties uz 2.2. nodarbību. + 5. Izpildiet 3. — 4. soļus, līdz teksts ir pareizs un dodieties uz 1.2.2. nodarbību. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.2 nodarbība: CITAS DZĒŠANAS KOMANDAS + 1.2.2 nodarbība: CITAS DZĒŠANAS KOMANDAS ** Lai izdzēstu līdz rindas beigām, spiediet d$ ** @@ -220,13 +220,13 @@ PIEZĪME: Nospiežot d, ekrāna labajā apakšējā stūrī parādīsies d burts ---> Kāds ir ievadījis teikuma beigas divreiz. ievadījis teikuma beigas divreiz. - 5. Dodieties uz 2.3 nodarbību, lai labāk izprastu, kā tas notiek. + 5. Dodieties uz 1.2.3 nodarbību, lai labāk izprastu, kā tas notiek. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.3 nodarbība: OPERATORI UN KOMANDAS + 1.2.3 nodarbība: OPERATORI UN KOMANDAS Daudzas tekstu mainošās komandas sastāv no operatora un kustības. @@ -249,7 +249,7 @@ PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursor norādīto vietu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.4 nodarbība: KUSTĪBAS SKAITA IZMANTOŠANA + 1.2.4 nodarbība: KUSTĪBAS SKAITA IZMANTOŠANA ** Pirms kustības ievadot skaitli, tā tiks atkārtota norādās reizes. ** @@ -266,13 +266,13 @@ PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursor ---> Šī ir rinda ar vārdiem, kurā jūs varat pārvietoties. - 6. Dodieties uz nodarbību 2.5. + 6. Dodieties uz nodarbību 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.5 nodarbība: SKAITĻA IZMANTOŠANA DZĒŠANAI + 1.2.5 nodarbība: SKAITĻA IZMANTOŠANA DZĒŠANAI ** Ievadot skaitli pirms operatora, tas tiks atkārtots norādītās reizes. ** @@ -295,7 +295,7 @@ PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.6 nodarbība: DARBĪBAS AR RINDĀM + 1.2.6 nodarbība: DARBĪBAS AR RINDĀM ** Ievadiet dd lai izdzēstu visu teksta rindu. ** @@ -319,7 +319,7 @@ PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.7 nodarbība: ATCELŠANAS KOMANDA + 1.2.7 nodarbība: ATCELŠANAS KOMANDA ** Lai atceltu darbību, spiediet u ** @@ -339,12 +339,12 @@ PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursor ---> Iizlabojiet kļūudas šaajā riindā, aatceliet tās un aatceliet aatcelšanu. 8. Šīs ir svarīgas un noderīgas iespējas. - Tagad pārejiet uz 2. nodarbības apkopojumu. + Tagad pārejiet uz 1.2. nodarbības apkopojumu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2. nodarbības APKOPOJUMS + 1.2. nodarbības APKOPOJUMS 1. Lai izdzēstu vārdu, uz kura atrodas kursors, ievada: dw @@ -369,7 +369,7 @@ PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursor Lai atceltu atcelšanas darbības, ievada: CTRL-R (Ctrl+Shift+r) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.1 nodarbība: IEVIETOŠANAS DARBĪBA + 1.3.1 nodarbība: IEVIETOŠANAS DARBĪBA ** Lai pēc kursora ievietotu iepriekš izdzēstu tekstu, spiediet p ** @@ -392,7 +392,7 @@ PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.2 nodarbība: AIZVIETOŠANAS KOMANDA + 1.3.2 nodarbība: AIZVIETOŠANAS KOMANDA ** Lai aizvietotu burtu ar citu, ievadiet r un nepieciešamo burtu. ** @@ -408,7 +408,7 @@ PIEZĪME: Ievadot kustības komandu normālajā režīmā, tā pārvietos kursor ---> Iavadut šo rixdu, kuds ar nuspeedis napariizus teusteņus! ---> Ievadot šo rindu, kāds ir nospiedis nepareizus taustiņus! - 5. Tagad dodieties uz 3.3. nodarbību. + 5. Tagad dodieties uz 1.3.3. nodarbību. PIEZĪME: Atcerieties, ka jums ir jāmācās darbojoties, nevis vienkārši mēģinot atcerēties! @@ -416,7 +416,7 @@ PIEZĪME: Atcerieties, ka jums ir jāmācās darbojoties, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.3 nodarbība: IZMAIŅU DARBĪBA + 1.3.3 nodarbība: IZMAIŅU DARBĪBA ** Lai izmainītu tekstu līdz vārda beigām, spiediet ce ** @@ -439,7 +439,7 @@ Ievērojiet, ka pēc ce un vārda ievades jūs paliekat ievietošanas režīm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.4 nodarbība: CITAS MAINĪŠANAS DARBĪBAS AR c + 1.3.4 nodarbība: CITAS MAINĪŠANAS DARBĪBAS AR c ** Izmaiņu kustības operatoru lieto tieši tāpat kā dzēšanai. ** @@ -462,7 +462,7 @@ Ievērojiet, ka pēc ce un vārda ievades jūs paliekat ievietošanas režīm PIEZĪME: Lai labotu nepareizi ievadītu tekstu, spiediet taustiņu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3. NODARBĪBAS APKOPOJUMS + 1.3. NODARBĪBAS APKOPOJUMS 1. Lai ievietotu izdzēsto tekstu, spiediet p taustiņu. Ar to ievietosiet @@ -486,7 +486,7 @@ Tagad dodieties uz nākamo nodarbību. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.1 nodarbība: KURSORA VIETA FAILĀ UN FAILA STATUSS + 1.4.1 nodarbība: KURSORA VIETA FAILĀ UN FAILA STATUSS ** Lai noteiktu kursora atrašanās vietu failā un faila statusu, spiediet CTRL-g Lai pārvietotu kursoru uz noteiktu faila rindu, spiediet G ** @@ -512,7 +512,7 @@ PIEZĪME: Jūs varat redzēt kursora atrašanās vietu failā vienmēr ekrāna 4. Atkārtojiet darbības 1. — 3. tik ilgi, kamēr droši atceraties šīs komandas. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.2 nodarbība: MEKLĒŠANAS KOMANDA + 1.4.2 nodarbība: MEKLĒŠANAS KOMANDA ** Lai meklētu tekstā, spiediet / un ievadiet meklējamo frāzi. ** @@ -545,7 +545,7 @@ PIEZĪME: Ja vairs nevēlaties izgaismot meklējamo tekstu, spiediet / piekārto savu taustiņu kombināciju šai darbībai.) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.3 nodarbība: SAISTĪTO IEKAVU MEKLĒŠANA + 1.4.3 nodarbība: SAISTĪTO IEKAVU MEKLĒŠANA ** Lai atrastu saistīto ),], vai } iekavu, ievadiet % ** @@ -569,7 +569,7 @@ PIEZĪME: Šī iespēja ir ļoti noderīga, lai pārbaudītu nelīdzsvarotas iek ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.4 nodarbība: AIZVIETOŠANAS KOMANDA + 1.4.4 nodarbība: AIZVIETOŠANAS KOMANDA ** Ievadiet :s/vecais/jaunais/g lai aizvietotu 'vecais' ar 'jaunais'. ** @@ -592,7 +592,7 @@ PIEZĪME: Šī iespēja ir ļoti noderīga, lai pārbaudītu nelīdzsvarotas iek apstiprināt katru aizvietošanu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.5 nodarbība: DARBĪBAS ATKĀRTOŠANA + 1.4.5 nodarbība: DARBĪBAS ATKĀRTOŠANA ** Lai atkārtotu iepriekšējo darbību, spiediet . ** @@ -612,7 +612,7 @@ PIEZĪME: Šī iespēja ir ļoti noderīga, lai pārbaudītu nelīdzsvarotas iek ---> ba11e ce11e ha11e le11e ka11a mu11a nu11e ra11ijs šte11e ti11s ze11is ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4. nodarbības APKOPOJUMS + 1.4. nodarbības APKOPOJUMS 1. CTRL-G statusa rindā parāda faila nosaukumu, statusu un kursora atrašanās vietu @@ -637,7 +637,7 @@ PIEZĪME: Šī iespēja ir ļoti noderīga, lai pārbaudītu nelīdzsvarotas iek Lai aizvietotu visas frāzes failā ar apstiprinājumu: :%s/vecais/jaunais/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.1 nodarbība: KĀ IZPILDĪT ĀRĒJU KOMANDU + 1.5.1 nodarbība: KĀ IZPILDĪT ĀRĒJU KOMANDU ** Ievadiet :! un pēc tam sekojošo ārējo komandu. ** @@ -657,7 +657,7 @@ PIEZĪME: Izsaucamās komandas izpilda nospiežot taustiņu, kopš šī ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.2 nodarbība: VAIRĀK PAR FAILU SAGLABĀŠANU + 1.5.2 nodarbība: VAIRĀK PAR FAILU SAGLABĀŠANU ** Lai saglabātu failu ar noteiktu nosaukumu, ievadiet :w NOSAUKUMS ** @@ -678,7 +678,7 @@ PIEZĪME: Ja jūs iziesiet no vim un palaidīsiet to ar komandu vim test Vai, ja lietojat Windows, komandu: :!del test ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.3 nodarbība: TEKSTA DAĻĒJA SAGLABĀŠANA + 1.5.3 nodarbība: TEKSTA DAĻĒJA SAGLABĀŠANA ** Lai saglabātu tikai daļu no faila, ievadiet: v kustība :w fails ** @@ -701,13 +701,13 @@ PIEZĪME: Spiežot v VIM pārslēdzas vizuālā iezīmēšanas režīmā. Jūs v iezīmēto tekstu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.4 nodarbība: FAILU SATURA IEGŪŠANA UN APVIENOŠANA + 1.5.4 nodarbība: FAILU SATURA IEGŪŠANA UN APVIENOŠANA ** Lai ievietotu faila saturu, ievadiet :r fails ** 1. Novietojiet kursoru tieši virs šīs rindas. -PIEZĪME: Pēc 2. soļa izpildes, jūs redzēsiet tekstu no 5.3 nodarbības. +PIEZĪME: Pēc 2. soļa izpildes, jūs redzēsiet tekstu no 1.5.3 nodarbības. Pēc tam pārvietojiet kursoru uz leju, lai lasītu tālāk šīs nodarbības saturu. @@ -715,8 +715,8 @@ PIEZĪME: Pēc 2. soļa izpildes, jūs redzēsiet tekstu no 5.3 nodarbības. kur test ir jūsu iepriekšējā nodarbībā saglabātais fails. Ielasītā faila saturs tiek ievietots zem kursora. - 3. Lai pārbaudītu, ka darbība ir izdevusies, pārliecinieties, ka 5.4 - nodarbības aprakstā ir saturs no 5.3 nodarbības. + 3. Lai pārbaudītu, ka darbība ir izdevusies, pārliecinieties, ka 1.5.4 + nodarbības aprakstā ir saturs no 1.5.3 nodarbības. PIEZĪME: Jūs varat ievadīt saturu failā, izpildot ārēju komandu. Piemēram, ar komandu :r !ls @@ -724,7 +724,7 @@ PIEZĪME: Jūs varat ievadīt saturu failā, izpildot ārēju komandu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5. nodarbības APKOPOJUMS + 1.5. nodarbības APKOPOJUMS 1. :!komanda izpilda ārēju komandu @@ -743,7 +743,7 @@ PIEZĪME: Jūs varat ievadīt saturu failā, izpildot ārēju komandu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.1 nodarbība: ATVĒRŠANAS KOMANDA + 1.6.1 nodarbība: ATVĒRŠANAS KOMANDA ** Ievadiet o lai ievadītu jaunu rindu virs kursora un pārietu ievades režīmā. ** @@ -761,7 +761,7 @@ PIEZĪME: Jūs varat ievadīt saturu failā, izpildot ārēju komandu. ---> Ievadot O izveidosiet rindu zem šīs un pāriesiet ievades režīmā. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.2 nodarbība: PIEVIENOŠANAS KOMANDA + 1.6.2 nodarbība: PIEVIENOŠANAS KOMANDA ** Ievadiet a lai ievietotu jaunu tekstu PĒC kursora. ** @@ -785,7 +785,7 @@ PIEZĪME: No normālā režīma pāriet uz ievades režīmu ievadot a, i, A un i — pirms kursora, A — rindas beigās, I — rindas sākumā. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.3 nodarbība: VĒL VIENS AIZVIETOŠANAS VEIDS + 1.6.3 nodarbība: VĒL VIENS AIZVIETOŠANAS VEIDS ** Lai aizvietotu vairāk kā vienu rakstzīmi, spiediet R ** @@ -808,7 +808,7 @@ PIEZĪME: Aizvietošanas režīms darbojas līdzīgi ievietošanas režīmam, ar tikai ievadītās rakstzīmes aizvieto esošās. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.4 nodarbība: TEKSTA KOPĒŠANA UN IEVIETOŠANA + 1.6.4 nodarbība: TEKSTA KOPĒŠANA UN IEVIETOŠANA ** Lai kopētu tekstu, izmantojiet y, bet lai ievietotu — p ** @@ -835,7 +835,7 @@ PIEZĪME: Aizvietošanas režīms darbojas līdzīgi ievietošanas režīmam, ar PIEZĪME: y var lietot kopā ar pārvietošanās operatoru, piemēram, spiežot yw var nokopēt izvēlēto vārdu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.5 nodarbība: IESTATĪJUMU MAIŅA + 1.6.5 nodarbība: IESTATĪJUMU MAIŅA ** Iestatiet meklēšana un aizstāšana, neievērojot lielos/mazos burtus ** @@ -858,7 +858,7 @@ PIEZĪME: Ja vēlaties meklēt gan lielos, gan mazos burtus vienā meklējumā, ievadiet papildu komandu \c Piemēram: /neievērot\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6. nodarbības APKOPOJUMS + 1.6. nodarbības APKOPOJUMS Lai pārietu uz ievietošanas režīmu un: @@ -885,7 +885,7 @@ PIEZĪME: Ja vēlaties meklēt gan lielos, gan mazos burtus vienā meklējumā, 7. Lai opciju izslēgtu, pievieno priedēkli "no". Piemēram, :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.1 nodarbība: PALĪDZĪBAS IEGŪŠANA + 1.7.1 nodarbība: PALĪDZĪBAS IEGŪŠANA ** Iebūvētās palīdzības izmantošana ** @@ -908,7 +908,7 @@ PIEZĪME: Ja vēlaties meklēt gan lielos, gan mazos burtus vienā meklējumā, :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.2 nodarbība: IZVEIDOJIET SĀKŠANAS SKRIPTU + 1.7.2 nodarbība: IZVEIDOJIET SĀKŠANAS SKRIPTU ** Ieslēdziet Vim iespējas ** @@ -930,7 +930,7 @@ PIEZĪME: Ja vēlaties meklēt gan lielos, gan mazos burtus vienā meklējumā, Papildu informācijai ievadiet :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.3 nodarbība: AUTOMĀTISKĀ PABEIGŠANA + 1.7.3 nodarbība: AUTOMĀTISKĀ PABEIGŠANA ** Automātisko pabeigšanu komandrindā izsauc ar CTRL-D un ** @@ -955,7 +955,7 @@ PIEZĪME: Pabeigšana strādā dažādām komandām. Šī iespēja var būt īpaši noderīga, ievadot :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7. nodarbības APKOPOJUMS + 1.7. nodarbības APKOPOJUMS 1. Lai atvērtu palīdzības logu, ievadiet :help vai spiediet vai diff --git a/usr/share/vim/vim91/tutor/tutor.no b/usr/share/vim/vim91/tutor/tutor1.nb similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.no rename to usr/share/vim/vim91/tutor/tutor1.nb index 9eb6dfa93a6..a6be6947920 100644 --- a/usr/share/vim/vim91/tutor/tutor.no +++ b/usr/share/vim/vim91/tutor/tutor1.nb @@ -20,9 +20,9 @@ Hvis du bare leser teksten, vil du glemme kommandoene! Frst av alt, sjekk at Caps Lock IKKE er aktiv og trykk j-tasten for - flytte markren helt til leksjon 1.1 fyller skjermen. + flytte markren helt til leksjon 1.1.1 fyller skjermen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.1: FLYTTING AV MARKREN + Leksjon 1.1.1: FLYTTING AV MARKREN ** For flytte markren, trykk tastene h, j, k, l som vist. ** @@ -36,7 +36,7 @@ 2. Hold inne nedovertasten (j) til den repeterer. N vet du hvordan du beveger deg til neste leksjon. - 3. G til leksjon 1.2 ved hjelp av nedovertasten. + 3. G til leksjon 1.1.2 ved hjelp av nedovertasten. Merk: Hvis du blir usikker p noe du har skrevet, trykk for g til normalmodus. Skriv deretter kommandoen du nsket p nytt. @@ -45,7 +45,7 @@ Merk: Piltastene skal ogs bevege markren mye raskere nr du er blitt vant til det. Helt sant! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.2: AVSLUTTE VIM + Leksjon 1.1.2: AVSLUTTE VIM !! MERK: Fr du utfrer noen av punktene nedenfor, les hele leksjonen!! @@ -64,11 +64,11 @@ Merk: Piltastene skal ogs MERK: :q! forkaster alle forandringer som du gjorde. I lpet av noen f leksjoner vil du lre hvordan du lagrer forandringene til en fil. - 5. Flytt markren ned til leksjon 1.3. + 5. Flytt markren ned til leksjon 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + Leksjon 1.1.3: REDIGERING AV TEKST -- SLETTING ** Trykk x for slette tegnet under markren. ** @@ -85,13 +85,13 @@ MERK: :q! forkaster alle forandringer som du gjorde. I l ---> Hessstennnn brrrsnudddde ii gaaata. ---> Hesten brsnudde i gata. - 5. N som linjen er korrekt, g til leksjon 1.4. + 5. N som linjen er korrekt, g til leksjon 1.1.4. MERK: Nr du gr gjennom innfringen, ikke bare prv huske kommandoene, men bruk dem helt til de sitter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + Leksjon 1.1.4: REDIGERING AV TEKST -- INNSETTING ** Trykk i for sette inn tekst. ** @@ -114,7 +114,7 @@ MERK: N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + Leksjon 1.1.5: REDIGERING AV TEKST -- LEGGE TIL ** Trykk A for legge til tekst. ** @@ -134,17 +134,17 @@ MERK: N ---> Det mangler ogs litt tek Det mangler ogs litt tekst p denne linjen. - 5. Nr du fler at du behersker legge til tekst, g til leksjon 1.6. + 5. Nr du fler at du behersker legge til tekst, g til leksjon 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.6: REDIGERE EN FIL + Leksjon 1.1.6: REDIGERE EN FIL ** Bruk :wq for lagre en fil og avslutte. ** !! MERK: Fr du utfrer noen av stegene nedenfor, les hele denne leksjonen!! - 1. Avslutt denne innfringen som du gjorde i leksjon 1.2: :q! + 1. Avslutt denne innfringen som du gjorde i leksjon 1.1.2: :q! 2. Skriv denne kommandoen p kommandolinja: vim tutor vim er kommandoen for starte Vim-editoren, tutor er navnet p fila @@ -160,7 +160,7 @@ MERK: N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 1 + OPPSUMMERING AV LEKSJON 1.1 1. Markren beveges ved hjelp av piltastene eller hjkl-tastene. @@ -180,10 +180,10 @@ MERK: N MERK: Nr du trykker gr du til normalmodus eller du avbryter en unsket og delvis fullfrt kommando. - N kan du g videre til leksjon 2. + N kan du g videre til leksjon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.1: SLETTEKOMMANDOER + Leksjon 1.2.1: SLETTEKOMMANDOER ** Trykk dw for slette et ord. ** @@ -204,9 +204,9 @@ MERK: Bokstaven d vil komme til syne p ---> Det er tre ord som ikke hrer hjemme i denne setningen. 5. Repeter punkt 3 og 4 til den frste setningen er lik den andre. G - deretter til leksjon 2.2. + deretter til leksjon 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.2: FLERE SLETTEKOMMANDOER + Leksjon 1.2.2: FLERE SLETTEKOMMANDOER ** Trykk d$ for slette til slutten av linjen. ** @@ -221,7 +221,7 @@ MERK: Bokstaven d vil komme til syne p ---> Noen skrev slutten p linjen en gang for mye. linjen en gang for mye. - 5. G til leksjon 2.3 for forst hva som skjer. + 5. G til leksjon 1.2.3 for forst hva som skjer. @@ -229,7 +229,7 @@ MERK: Bokstaven d vil komme til syne p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.3: OM OPERATORER OG BEVEGELSER + Leksjon 1.2.3: OM OPERATORER OG BEVEGELSER Mange kommandoer som forandrer teksten er laget ut i fra en operator og en @@ -252,7 +252,7 @@ MERK: Bokstaven d vil komme til syne p MERK: Ved skrive kun bevegelsen i normalmodusen uten en operator vil markren flyttes som spesifisert. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + LEKSJON 1.2.4: BRUK AV TELLER FOR EN BEVEGELSE ** Ved skrive et tall foran en bevegelse repeterer den s mange ganger. ** @@ -270,12 +270,12 @@ MERK: Ved ---> Dette er en linje med noen ord som du kan bevege deg rundt p. - 6. G videre til leksjon 2.5. + 6. G videre til leksjon 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.5: BRUK AV ANTALL FOR SLETTE MER + Leksjon 1.2.5: BRUK AV ANTALL FOR SLETTE MER ** Et tall sammen med en operator repeterer den s mange ganger. ** @@ -298,7 +298,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p bruke bevegelsen uten en operator. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.6: OPERERE P LINJER + Leksjon 1.2.6: OPERERE P LINJER ** Trykk dd for slette en hel linje. ** @@ -321,7 +321,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.7: ANGRE-KOMMANDOEN + Leksjon 1.2.7: ANGRE-KOMMANDOEN ** Trykk u for angre siste kommando, U for fikse en hel linje. ** @@ -340,11 +340,11 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p ---> RReparer feiilene p denne linnnjen oog erssstatt dem meed angre. 8. Dette er meget nyttige kommandoer. N kan du g til oppsummeringen av - leksjon 2. + leksjon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 2 + OPPSUMMERING AV LEKSJON 1.2 1. For slette fra markren fram til det neste ordet, trykk: dw @@ -367,7 +367,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p For omgjre angringen, trykk: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.1: LIM INN-KOMMANDOEN + Leksjon 1.3.1: LIM INN-KOMMANDOEN ** Trykk p for lime inn tidligere slettet tekst etter markren ** @@ -390,7 +390,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.2: ERSTATT-KOMMANDOEN + Leksjon 1.3.2: ERSTATT-KOMMANDOEN ** Trykk rx for erstatte tegnet under markren med x. ** @@ -406,14 +406,14 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p ---> Da dfnne lynjxn ble zkrevet, var det nen som tjykket feite taster! ---> Da denne linjen ble skrevet, var det noen som trykket feile taster! - 5. G videre til leksjon 3.2. + 5. G videre til leksjon 1.3.2. MERK: Husk at du br lre ved BRUKE, ikke pugge. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.3: FORANDRE-OPERATOREN + Leksjon 1.3.3: FORANDRE-OPERATOREN ** For forandre til slutten av et ord, trykk ce . ** @@ -436,7 +436,7 @@ V ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + Leksjon 1.3.4: FLERE FORANDRINGER VED BRUK AV c ** Forandringskommandoen blir brukt med de samme bevegelser som slett. ** @@ -459,7 +459,7 @@ V MERK: Du kan bruke slettetasten for rette feil mens du skriver. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 3 + OPPSUMMERING AV LEKSJON 1.3 1. For legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette @@ -482,7 +482,7 @@ N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.1: POSISJONERING AV MARKREN OG FILSTATUS + Leksjon 1.4.1: POSISJONERING AV MARKREN OG FILSTATUS ** Trykk CTRL-G for vise posisjonen i filen og filstatusen. Trykk G for g til en spesifikk linje i filen. ** @@ -505,7 +505,7 @@ Merk: Du kan se mark 4. Utfr steg 1 til 3 hvis du fler deg sikker p prosedyren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.2: SKEKOMMANDOEN + Leksjon 1.4.2: SKEKOMMANDOEN ** Skriv / etterfulgt av en skestreng som du vil lete etter. ** @@ -528,7 +528,7 @@ Merk: Du kan se mark Merk: Nr skingen nr slutten av filen, vil den fortsette fra starten unntatt hvis wrapscan-valget er resatt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.3: FINN SAMSVARENDE PARENTESER + Leksjon 1.4.3: FINN SAMSVARENDE PARENTESER ** Trykk % for finne en samsvarende ), ] eller } . ** @@ -551,7 +551,7 @@ Merk: Dette er veldig nyttig til feils ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.4: ERSTATT-KOMMANDOEN + Leksjon 1.4.4: ERSTATT-KOMMANDOEN ** Skriv :s/gammel/ny/g for erstatte gammel med ny. ** @@ -574,7 +574,7 @@ Merk: Dette er veldig nyttig til feils deretter sprre om teksten skal erstattes eller ikke. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 4 + OPPSUMMERING AV LEKSJON 1.4 1. Ctrl-G viser nvrende posisjon i filen og filstatusen. @@ -597,7 +597,7 @@ Merk: Dette er veldig nyttig til feils Erstatte alle forekomster i en fil: :%s/gammel/ny/g For godkjenne hver erstatning, legg til c: :%s/gammel/ny/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.1: HVORDAN UTFRE EN EKSTERN KOMMANDO + Leksjon 1.5.1: HVORDAN UTFRE EN EKSTERN KOMMANDO ** Skriv :! etterfulgt av en ekstern kommando for utfre denne. ** @@ -620,7 +620,7 @@ MERK: Alle ikke alltid vi nevner det. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.2: MER OM LAGRING AV FILER + Leksjon 1.5.2: MER OM LAGRING AV FILER ** For lagre endringene gjort i en tekst, skriv :w FILNAVN. ** @@ -643,7 +643,7 @@ Merk: Hvis du n operativsystem, eller :!del TEST hvis du bruker MS-DOS. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + Leksjon 1.5.3: VELGE TEKST SOM SKAL LAGRES ** For lagre en del av en fil, skriv v bevegelse :w FILNAVN ** @@ -666,21 +666,21 @@ MERK: Ved operator for gjre noe med teksten. For eksempel sletter d teksten. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.4: HENTING OG SAMMENSLING AV FILER + Leksjon 1.5.4: HENTING OG SAMMENSLING AV FILER ** For lese inn en annen fil inn i nvrende buffer, skriv :r FILNAVN ** 1. Plasser markren like over denne linjen. -MERK: Etter ha utfrt steg 2 vil du se teksten fra leksjon 5.3. G deretter +MERK: Etter ha utfrt steg 2 vil du se teksten fra leksjon 1.5.3. G deretter NED for se denne leksjonen igjen. 2. Hent TEST-filen ved bruke kommandoen :r TEST der TEST er navnet p filen du brukte. Filen du henter blir plassert nedenfor markrlinjen. 3. For sjekke at filen ble hentet, g tilbake og se at det er to kopier av - leksjon 5.3, originalen og denne versjonen. + leksjon 1.5.3, originalen og denne versjonen. MERK: Du kan ogs lese utdataene av en ekstern kommando. For eksempel, :r !ls leser utdataene av ls-kommandoen og legger dem nedenfor markren. @@ -689,7 +689,7 @@ MERK: Du kan ogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 5 + OPPSUMMERING AV LEKSJON 1.5 1. :!kommando utfrer en ekstern kommandio. @@ -712,7 +712,7 @@ MERK: Du kan ogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.1: PNE LINJE-KOMMANDOEN + Leksjon 1.6.1: PNE LINJE-KOMMANDOEN ** Skriv o for pne opp for en ny linje etter markren og g til @@ -735,7 +735,7 @@ MERK: Du kan ogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.2: LEGG TIL-KOMMANDOEN + Leksjon 1.6.2: LEGG TIL-KOMMANDOEN ** Skriv a for legge til tekst ETTER markren. ** @@ -758,7 +758,7 @@ MERK: Du kan ogs Merk: a, i og A gr alle til den samme innsettingsmodusen, den eneste forskjellen er hvor tegnene blir satt inn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.3: EN ANNEN MTE ERSTATTE P + Leksjon 1.6.3: EN ANNEN MTE ERSTATTE P ** Skriv en stor R for erstatte mer enn ett tegn. ** @@ -781,7 +781,7 @@ MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives erstatter et eksisterende tegn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.4: KOPIERE OG LIME INN TEKST + Leksjon 1.6.4: KOPIERE OG LIME INN TEKST ** Bruk y-operatoren for kopiere tekst og p for lime den inn ** @@ -804,7 +804,7 @@ MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives Merk: Du kan ogs bruke y som en operator; yw kopierer ett ord. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.5: SETT VALG + Leksjon 1.6.5: SETT VALG ** Sett et valg s sk eller erstatning ignorerer store/sm bokstaver. ** @@ -827,7 +827,7 @@ Merk: For Merk: Hvis du vil ignorere store/sm bokstaver for kun en skekommando, bruk \c i uttrykket: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 6 + OPPSUMMERING AV LEKSJON 1.6 1. Trykk o for legge til en linje NEDENFOR markren og g inn i innsettingsmodus. @@ -850,7 +850,7 @@ Merk: Hvis du vil ignorere store/sm 7. Legg til no foran valget for sl det av: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.1: F HJELP + Leksjon 1.7.1: F HJELP ** Bruk det innebygde hjelpesystemet. ** @@ -873,7 +873,7 @@ Merk: Hvis du vil ignorere store/sm :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + Leksjon 1.7.2: LAG ET OPPSTARTSSKRIPT ** Sl p funksjoner i Vim ** @@ -896,7 +896,7 @@ Merk: Hvis du vil ignorere store/sm alle dine foretrukne oppsett i denne vimrc-filen. For mer informasjon, skriv :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.3: FULLFRING + Leksjon 1.7.3: FULLFRING ** Kommandolinjefullfring med CTRL-D og ** @@ -919,7 +919,7 @@ Merk: Hvis du vil ignorere store/sm MERK: Fullfring fungerer for mange kommandoer. Prv ved trykke CTRL-D og . Det er spesielt nyttig for bruk sammen med :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 7 + OPPSUMMERING AV LEKSJON 1.7 1. Skriv :help eller trykk eller for pne et hjelpevindu. diff --git a/usr/share/vim/vim91/tutor/tutor.nb.utf-8 b/usr/share/vim/vim91/tutor/tutor1.nb.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.nb.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.nb.utf-8 index 6a8a4e94632..4459f17b665 100644 --- a/usr/share/vim/vim91/tutor/tutor.nb.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.nb.utf-8 @@ -20,9 +20,9 @@ Hvis du bare leser teksten, vil du glemme kommandoene! Først av alt, sjekk at «Caps Lock» IKKE er aktiv og trykk «j»-tasten for - å flytte markøren helt til leksjon 1.1 fyller skjermen. + å flytte markøren helt til leksjon 1.1.1 fyller skjermen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.1: FLYTTING AV MARKØREN + Leksjon 1.1.1: FLYTTING AV MARKØREN ** For å flytte markøren, trykk tastene h, j, k, l som vist. ** @@ -36,7 +36,7 @@ 2. Hold inne nedovertasten (j) til den repeterer. Nå vet du hvordan du beveger deg til neste leksjon. - 3. Gå til leksjon 1.2 ved hjelp av nedovertasten. + 3. Gå til leksjon 1.1.2 ved hjelp av nedovertasten. Merk: Hvis du blir usikker på noe du har skrevet, trykk for å gå til normalmodus. Skriv deretter kommandoen du ønsket på nytt. @@ -45,7 +45,7 @@ Merk: Piltastene skal også virke. Men ved å bruke hjkl vil du være i stand ti å bevege markøren mye raskere når du er blitt vant til det. Helt sant! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.2: AVSLUTTE VIM + Leksjon 1.1.2: AVSLUTTE VIM !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!! @@ -64,11 +64,11 @@ Merk: Piltastene skal også virke. Men ved å bruke hjkl vil du være i stand ti MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen få leksjoner vil du lære hvordan du lagrer forandringene til en fil. - 5. Flytt markøren ned til leksjon 1.3. + 5. Flytt markøren ned til leksjon 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + Leksjon 1.1.3: REDIGERING AV TEKST -- SLETTING ** Trykk x for å slette tegnet under markøren. ** @@ -85,13 +85,13 @@ MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen ---> Hessstennnn brrråsnudddde ii gaaata. ---> Hesten bråsnudde i gata. - 5. Nå som linjen er korrekt, gå til leksjon 1.4. + 5. Nå som linjen er korrekt, gå til leksjon 1.1.4. MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, men bruk dem helt til de sitter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + Leksjon 1.1.4: REDIGERING AV TEKST -- INNSETTING ** Trykk i for å sette inn tekst. ** @@ -114,7 +114,7 @@ MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + Leksjon 1.1.5: REDIGERING AV TEKST -- LEGGE TIL ** Trykk A for å legge til tekst. ** @@ -134,17 +134,17 @@ MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, m ---> Det mangler også litt tek Det mangler også litt tekst på denne linjen. - 5. Når du føler at du behersker å legge til tekst, gå til leksjon 1.6. + 5. Når du føler at du behersker å legge til tekst, gå til leksjon 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.6: REDIGERE EN FIL + Leksjon 1.1.6: REDIGERE EN FIL ** Bruk :wq for å lagre en fil og avslutte. ** !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!! - 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q! + 1. Avslutt denne innføringen som du gjorde i leksjon 1.1.2: :q! 2. Skriv denne kommandoen på kommandolinja: vim tutor «vim» er kommandoen for å starte Vim-editoren, «tutor» er navnet på fila @@ -160,7 +160,7 @@ MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 1 + OPPSUMMERING AV LEKSJON 1.1 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene. @@ -180,10 +180,10 @@ MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, m MERK: Når du trykker går du til normalmodus eller du avbryter en uønsket og delvis fullført kommando. - Nå kan du gå videre til leksjon 2. + Nå kan du gå videre til leksjon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.1: SLETTEKOMMANDOER + Leksjon 1.2.1: SLETTEKOMMANDOER ** Trykk dw for å slette et ord. ** @@ -204,9 +204,9 @@ MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når ---> Det er tre ord som ikke hører hjemme i denne setningen. 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. Gå - deretter til leksjon 2.2. + deretter til leksjon 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.2: FLERE SLETTEKOMMANDOER + Leksjon 1.2.2: FLERE SLETTEKOMMANDOER ** Trykk d$ for å slette til slutten av linjen. ** @@ -221,7 +221,7 @@ MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når ---> Noen skrev slutten på linjen en gang for mye. linjen en gang for mye. - 5. Gå til leksjon 2.3 for å forstå hva som skjer. + 5. Gå til leksjon 1.2.3 for å forstå hva som skjer. @@ -229,7 +229,7 @@ MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.3: OM OPERATORER OG BEVEGELSER + Leksjon 1.2.3: OM OPERATORER OG BEVEGELSER Mange kommandoer som forandrer teksten er laget ut i fra en operator og en @@ -252,7 +252,7 @@ MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når MERK: Ved å skrive kun bevegelsen i normalmodusen uten en operator vil markøren flyttes som spesifisert. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + LEKSJON 1.2.4: BRUK AV TELLER FOR EN BEVEGELSE ** Ved å skrive et tall foran en bevegelse repeterer den så mange ganger. ** @@ -270,12 +270,12 @@ MERK: Ved å skrive kun bevegelsen i normalmodusen uten en operator vil ---> Dette er en linje med noen ord som du kan bevege deg rundt på. - 6. Gå videre til leksjon 2.5. + 6. Gå videre til leksjon 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.5: BRUK AV ANTALL FOR Å SLETTE MER + Leksjon 1.2.5: BRUK AV ANTALL FOR Å SLETTE MER ** Et tall sammen med en operator repeterer den så mange ganger. ** @@ -298,7 +298,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som bruke bevegelsen uten en operator. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.6: OPERERE PÅ LINJER + Leksjon 1.2.6: OPERERE PÅ LINJER ** Trykk dd for å slette en hel linje. ** @@ -321,7 +321,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.7: ANGRE-KOMMANDOEN + Leksjon 1.2.7: ANGRE-KOMMANDOEN ** Trykk u for å angre siste kommando, U for å fikse en hel linje. ** @@ -340,11 +340,11 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som ---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre. 8. Dette er meget nyttige kommandoer. Nå kan du gå til oppsummeringen av - leksjon 2. + leksjon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 2 + OPPSUMMERING AV LEKSJON 1.2 1. For å slette fra markøren fram til det neste ordet, trykk: dw @@ -367,7 +367,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som For å omgjøre angringen, trykk: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.1: «LIM INN»-KOMMANDOEN + Leksjon 1.3.1: «LIM INN»-KOMMANDOEN ** Trykk p for å lime inn tidligere slettet tekst etter markøren ** @@ -390,7 +390,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.2: «ERSTATT»-KOMMANDOEN + Leksjon 1.3.2: «ERSTATT»-KOMMANDOEN ** Trykk rx for å erstatte tegnet under markøren med x. ** @@ -406,14 +406,14 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som ---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster! ---> Da denne linjen ble skrevet, var det noen som trykket feile taster! - 5. Gå videre til leksjon 3.2. + 5. Gå videre til leksjon 1.3.2. MERK: Husk at du bør lære ved å BRUKE, ikke pugge. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.3: «FORANDRE»-OPERATOREN + Leksjon 1.3.3: «FORANDRE»-OPERATOREN ** For å forandre til slutten av et ord, trykk ce . ** @@ -436,7 +436,7 @@ Vær oppmerksom på at ce sletter ordet og går inn i innsettingsmodus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + Leksjon 1.3.4: FLERE FORANDRINGER VED BRUK AV c ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». ** @@ -459,7 +459,7 @@ Vær oppmerksom på at ce sletter ordet og går inn i innsettingsmodus. MERK: Du kan bruke slettetasten for å rette feil mens du skriver. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 3 + OPPSUMMERING AV LEKSJON 1.3 1. For å legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette @@ -482,7 +482,7 @@ Nå kan du gå til neste leksjon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS + Leksjon 1.4.1: POSISJONERING AV MARKØREN OG FILSTATUS ** Trykk CTRL-G for å vise posisjonen i filen og filstatusen. Trykk G for å gå til en spesifikk linje i filen. ** @@ -505,7 +505,7 @@ Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette 4. Utfør steg 1 til 3 hvis du føler deg sikker på prosedyren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.2: SØKEKOMMANDOEN + Leksjon 1.4.2: SØKEKOMMANDOEN ** Skriv / etterfulgt av en søkestreng som du vil lete etter. ** @@ -528,7 +528,7 @@ Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette Merk: Når søkingen når slutten av filen, vil den fortsette fra starten unntatt hvis «wrapscan»-valget er resatt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.3: FINN SAMSVARENDE PARENTESER + Leksjon 1.4.3: FINN SAMSVARENDE PARENTESER ** Trykk % for å finne en samsvarende ), ] eller } . ** @@ -551,7 +551,7 @@ Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.4: ERSTATT-KOMMANDOEN + Leksjon 1.4.4: ERSTATT-KOMMANDOEN ** Skriv :s/gammel/ny/g for å erstatte «gammel» med «ny». ** @@ -574,7 +574,7 @@ Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert deretter spørre om teksten skal erstattes eller ikke. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 4 + OPPSUMMERING AV LEKSJON 1.4 1. Ctrl-G viser nåværende posisjon i filen og filstatusen. @@ -597,7 +597,7 @@ Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert Erstatte alle forekomster i en fil: :%s/gammel/ny/g For å godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO + Leksjon 1.5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO ** Skriv :! etterfulgt av en ekstern kommando for å utføre denne. ** @@ -620,7 +620,7 @@ MERK: Alle «:»-kommandoer må avsluttes med . Fra dette punktet er det ikke alltid vi nevner det. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.2: MER OM LAGRING AV FILER + Leksjon 1.5.2: MER OM LAGRING AV FILER ** For å lagre endringene gjort i en tekst, skriv :w FILNAVN. ** @@ -643,7 +643,7 @@ Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST» operativsystem, eller :!del TEST hvis du bruker MS-DOS. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + Leksjon 1.5.3: VELGE TEKST SOM SKAL LAGRES ** For å lagre en del av en fil, skriv v bevegelse :w FILNAVN ** @@ -666,21 +666,21 @@ MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for operator for å gjøre noe med teksten. For eksempel sletter d teksten. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.4: HENTING OG SAMMENSLÅING AV FILER + Leksjon 1.5.4: HENTING OG SAMMENSLÅING AV FILER ** For å lese inn en annen fil inn i nåværende buffer, skriv :r FILNAVN ** 1. Plasser markøren like over denne linjen. -MERK: Etter å ha utført steg 2 vil du se teksten fra leksjon 5.3. Gå deretter +MERK: Etter å ha utført steg 2 vil du se teksten fra leksjon 1.5.3. Gå deretter NED for å se denne leksjonen igjen. 2. Hent TEST-filen ved å bruke kommandoen :r TEST der TEST er navnet på filen du brukte. Filen du henter blir plassert nedenfor markørlinjen. 3. For å sjekke at filen ble hentet, gå tilbake og se at det er to kopier av - leksjon 5.3, originalen og denne versjonen. + leksjon 1.5.3, originalen og denne versjonen. MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls leser utdataene av ls-kommandoen og legger dem nedenfor markøren. @@ -689,7 +689,7 @@ MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 5 + OPPSUMMERING AV LEKSJON 1.5 1. :!kommando utfører en ekstern kommandio. @@ -712,7 +712,7 @@ MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN + Leksjon 1.6.1: «ÅPNE LINJE»-KOMMANDOEN ** Skriv o for å «åpne opp» for en ny linje etter markøren og gå til @@ -735,7 +735,7 @@ MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.2: «LEGG TIL»-KOMMANDOEN + Leksjon 1.6.2: «LEGG TIL»-KOMMANDOEN ** Skriv a for å legge til tekst ETTER markøren. ** @@ -758,7 +758,7 @@ MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls Merk: a, i og A går alle til den samme innsettingsmodusen, den eneste forskjellen er hvor tegnene blir satt inn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.3: EN ANNEN MÅTE Å ERSTATTE PÅ + Leksjon 1.6.3: EN ANNEN MÅTE Å ERSTATTE PÅ ** Skriv en stor R for å erstatte mer enn ett tegn. ** @@ -781,7 +781,7 @@ MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives erstatter et eksisterende tegn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.4: KOPIERE OG LIME INN TEKST + Leksjon 1.6.4: KOPIERE OG LIME INN TEKST ** Bruk y-operatoren for å kopiere tekst og p for å lime den inn ** @@ -804,7 +804,7 @@ MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives Merk: Du kan også bruke y som en operator; yw kopierer ett ord. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.5: SETT VALG + Leksjon 1.6.5: SETT VALG ** Sett et valg så søk eller erstatning ignorerer store/små bokstaver. ** @@ -827,7 +827,7 @@ Merk: For å fjerne uthevingen av treff, skriv: :nohlsearch Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk \c i uttrykket: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 6 + OPPSUMMERING AV LEKSJON 1.6 1. Trykk o for å legge til en linje NEDENFOR markøren og gå inn i innsettingsmodus. @@ -850,7 +850,7 @@ Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk 7. Legg til «no» foran valget for å slå det av: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.1: FÅ HJELP + Leksjon 1.7.1: FÅ HJELP ** Bruk det innebygde hjelpesystemet. ** @@ -873,7 +873,7 @@ Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + Leksjon 1.7.2: LAG ET OPPSTARTSSKRIPT ** Slå på funksjoner i Vim ** @@ -896,7 +896,7 @@ Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk alle dine foretrukne oppsett i denne «vimrc»-filen. For mer informasjon, skriv :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.3: FULLFØRING + Leksjon 1.7.3: FULLFØRING ** Kommandolinjefullføring med CTRL-D og ** @@ -919,7 +919,7 @@ Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk MERK: Fullføring fungerer for mange kommandoer. Prøv ved å trykke CTRL-D og . Det er spesielt nyttig for bruk sammen med :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 7 + OPPSUMMERING AV LEKSJON 1.7 1. Skriv :help eller trykk eller for å åpne et hjelpevindu. diff --git a/usr/share/vim/vim91/tutor/tutor.nl b/usr/share/vim/vim91/tutor/tutor1.nl similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.nl rename to usr/share/vim/vim91/tutor/tutor1.nl index d07cd9836e1..a4c8a12775a 100644 --- a/usr/share/vim/vim91/tutor/tutor.nl +++ b/usr/share/vim/vim91/tutor/tutor1.nl @@ -20,7 +20,7 @@ alleen maar doorleest, zal je de commando's niet leren! Zorg ervoor dat de toets NIET is ingedrukt en druk vaak genoeg - op de j-toets om de cursor zo te bewegen dat les 1.1 volledig op het + op de j-toets om de cursor zo te bewegen dat les 1.1.1 volledig op het scherm staat. LET OP: In deze lessen worden omwille van de duidelijkheid vaak spaties @@ -28,7 +28,7 @@ Tik deze spaties echter NIET. Ze verstoren de werking. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.1: VERPLAATS DE CURSOR + Les 1.1.1: VERPLAATS DE CURSOR ** De cursor wordt verplaatst met de toetsen h, j, k, l zoals aangegeven. ** ^ @@ -42,7 +42,7 @@ 2. Druk de omlaag-toets (j) tot hij repeteert. Nu weet je hoe je de volgende les bereikt. - 3. Gebruik de omlaag-toets om naar les 1.2 te gaan. + 3. Gebruik de omlaag-toets om naar les 1.1.2 te gaan. OPMERKING: Als je twijfelt aan wat je tikte, druk om in de opdracht- modus te komen. Tik daarna het commando dat bedoeld wordt. @@ -51,7 +51,7 @@ rondbewegen, als je er eenmaal aan gewend bent. Echt waar! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.2: VIM AFSLUITEN + Les 1.1.2: VIM AFSLUITEN !! LET OP: Lees deze les goed door voordat je iets uitvoert!! @@ -70,10 +70,10 @@ lessen verder zal je leren hoe veranderingen worden opgeslagen in een bestand. - 5. Beweeg de cursor omlaag naar les 1.3. + 5. Beweeg de cursor omlaag naar les 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.3: TEKST BEWERKEN - WISSEN + Les 1.1.3: TEKST BEWERKEN - WISSEN ** Tik x om het teken onder de cursor te wissen. ** @@ -88,12 +88,12 @@ ---> Vi kkent eenn opdracccchtmodus en een invooegmmmmodus. - 5. Nu de regel gecorrigeerd is kan je naar les 1.4 gaan. + 5. Nu de regel gecorrigeerd is kan je naar les 1.1.4 gaan. LET OP: Probeer de lessen niet uit je hoofd te leren. Leer al doende. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.4: TEKST BEWERKEN - INVOEGEN + Les 1.1.4: TEKST BEWERKEN - INVOEGEN ** Tik i ('insert') om tekst in te voegen. ** @@ -110,10 +110,10 @@ ---> Aan regel ontekt wat . ---> Aan deze regel ontbreekt wat tekst. - 5. Ga naar les 1.5 als je gewend bent aan het invoegen van tekst. + 5. Ga naar les 1.1.5 als je gewend bent aan het invoegen van tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.5: TEKST BEWERKEN - TOEVOEGEN + Les 1.1.5: TEKST BEWERKEN - TOEVOEGEN ** Tik A ('append') om tekst toe te voegen. ** @@ -133,18 +133,18 @@ ---> Hier ontbreekt ook w Hier ontbreekt ook wat tekst. - 5. Ga naar les 1.6 als je vertrouwd bent geraakt aan het toevoegen + 5. Ga naar les 1.1.6 als je vertrouwd bent geraakt aan het toevoegen van tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.6: EEN BESTAND EDITTEN + Les 1.1.6: EEN BESTAND EDITTEN ** Gebruik :wq om een bestand op te slaan en de editor te verlaten. ** !! LET OP: Lees deze les helemaal door voordat je een van de volgende stappen uitvoert!! - 1. Verlaat deze les zoals je in les 1.2 deed: :q! + 1. Verlaat deze les zoals je in les 1.1.2 deed: :q! Of gebruik een andere terminal als je daar de beschikking over hebt. Doe daar het volgende. @@ -163,7 +163,7 @@ 6. Voer deze stappen uit nadat je ze hebt gelezen en begrepen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 1 + SAMENVATTING Les 1.1 1. De cursor wordt bewogen met de pijltjestoetsen of de hjkl-toetsen. h (links) j (omlaag) k (omhoog) l (rechts) @@ -182,10 +182,10 @@ OPMERKING: Met kom je terug in opdrachtmodus en wordt een ongewenst of gedeeltelijk uitgevoerd commando afgebroken. - Ga nu verder met les 2.1. + Ga nu verder met les 1.2.1. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.1: WIS-COMMANDO'S + Les 1.2.1: WIS-COMMANDO'S ** Tik dw ('delete word') om een woord te wissen. ** @@ -207,10 +207,10 @@ ---> Er zijn een het paar ggg woorden, die niet in deze len zin thuishoren. - 5. Herhaal de stappen 3 en 4 tot de zin goed is en ga naar les 2.2. + 5. Herhaal de stappen 3 en 4 tot de zin goed is en ga naar les 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.2: MEER WIS-COMMANDO'S + Les 1.2.2: MEER WIS-COMMANDO'S ** Tik d$ om te wissen tot het einde van de regel. ** @@ -224,10 +224,10 @@ ---> Iemand heeft het einde van deze regel dubbel getikt. dubbel getikt. - 5. Ga naar les 2.3 voor uitleg. + 5. Ga naar les 1.2.3 voor uitleg. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.3: OVER OPERATOREN EN BEWEGINGEN + Les 1.2.3: OVER OPERATOREN EN BEWEGINGEN Veel commando's die de tekst veranderen, bestaan uit een operator en een beweging. De samenstelling van een wis-commando met de operator d is: @@ -250,7 +250,7 @@ eind van de regel). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.4: GEBRUIK VAN EEN TELLER BIJ EEN BEWEGING + Les 1.2.4: GEBRUIK VAN EEN TELLER BIJ EEN BEWEGING ** Een getal voor een beweging herhaalt het zoveel keer. ** @@ -266,10 +266,10 @@ ---> Dit is een regel met woorden waarin je heen en weer kan bewegen. - 6. Ga verder met les 2.5. + 6. Ga verder met les 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.5: GEBRUIK EEN TELLER OM MEER TE WISSEN + Les 1.2.5: GEBRUIK EEN TELLER OM MEER TE WISSEN ** Een getal met een operator zorgt dat deze zoveel keer wordt herhaald. ** @@ -289,7 +289,7 @@ OPMERKING: De teller kan ook aan het begin staan: d2w en 2dw werken allebei. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.6: BEWERKING VAN HELE REGELS + Les 1.2.6: BEWERKING VAN HELE REGELS ** Tik dd om een hele regel te wissen. ** @@ -313,7 +313,7 @@ ---> 7) En dat ben jij ook. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.7: HET COMMANDO HERSTEL + Les 1.2.7: HET COMMANDO HERSTEL ** u maakt het laatste commando ongedaan, U herstelt een hele regel. ** @@ -336,10 +336,10 @@ ---> Heerstel de fouten inn deeze regel en brenng ze weer terugg met undo. - 8. Dit zijn heel nuttige commando's. Ga verder met samenvatting van les 2. + 8. Dit zijn heel nuttige commando's. Ga verder met samenvatting van les 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 2 + SAMENVATTING Les 1.2 1. Wis van de cursor tot het volgende woord met dw @@ -364,7 +364,7 @@ Undo de undo's met CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 3.1: HET COMMANDO PLAK + Les 1.3.1: HET COMMANDO PLAK ** Tik p ('put') en plak daarmee zojuist gewiste tekst na de cursor. ** @@ -384,7 +384,7 @@ ---> a) Rozen zijn rood, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 3.2: HET COMMANDO VERVANG + Les 1.3.2: HET COMMANDO VERVANG ** Tik rx ('replace') om het teken onder de cursor te vervangen door x. ** @@ -399,12 +399,12 @@ ---> Bij het tokken van dezf hegel heeft iemamd verklerde letters getikt. ---> Bij het tikken van deze regel heeft iemand verkeerde letters getikt. - 5. Ga nu naar les 3.3. + 5. Ga nu naar les 1.3.3. LET OP: Door het te doen, leer je beter dan door het uit je hoofd te leren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 3.3: HET COMMANDO VERANDER + Les 1.3.3: HET COMMANDO VERANDER ** Tik ce om te veranderen tot het einde van een woord. ** @@ -425,7 +425,7 @@ in de invoegmodus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 3.4: MEER VERANDERINGEN MET c + Les 1.3.4: MEER VERANDERINGEN MET c 1. Het commando verander ('change') werkt op dezelfde manier als wis. De opbouw is: @@ -446,7 +446,7 @@ OPMERKING: Je kan de toets gebruiken om tikfouten te herstellen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 3 + SAMENVATTING Les 1.3 1. Tik p om tekst terug te plakken, die zojuist is gewist. Dit zet de gewiste tekst ACHTER de cursor (als een hele regel is gewist komt deze @@ -466,7 +466,7 @@ Ga nu naar de volgende les. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 4.1: PLAATS VAN DE CURSOR EN STATUS VAN HET BESTAND + Les 1.4.1: PLAATS VAN DE CURSOR EN STATUS VAN HET BESTAND ** CTRL-G laat zien waar (regelnummer) je je bevindt en wat de status van het bestand is. Met [nummer] G ga je naar een bepaalde regel. ** @@ -492,7 +492,7 @@ 4. Voer de stappen 1 tot 3 uit als je dit goed hebt gelezen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 4.2: HET COMMANDO ZOEKEN + Les 1.4.2: HET COMMANDO ZOEKEN ** Met /ZOEK wordt naar de zoekterm (n of meer woorden) gezocht. ** @@ -515,7 +515,7 @@ begin doorgezocht, tenzij de optie 'wrapscan' is uitgeschakeld. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 4.3: GA NAAR CORRESPONDERENDE HAAKJES + Les 1.4.3: GA NAAR CORRESPONDERENDE HAAKJES ** Tik % om naar corresponderende ), ] of } te gaan. ** @@ -537,7 +537,7 @@ (blijvend) verplaatst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 4.4: HET VERVANG COMMANDO + Les 1.4.4: HET VERVANG COMMANDO ** Tik :s/oud/nieuw/g om 'oud' door 'nieuw' te vervangen. ** @@ -559,7 +559,7 @@ en te vragen of er vervangen moet worden. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 4 + SAMENVATTING Les 1.4 1. CTRL-G laat positie in het bestand zien en de status van het bestand. G verplaatst je naar het einde van het bestand. @@ -583,7 +583,7 @@ ('confirmation') te vragen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 5.1: HOE EEN EXTERN COMMANDO WORDT UITGEVOERD + Les 1.5.1: HOE EEN EXTERN COMMANDO WORDT UITGEVOERD ** Tik :! gevolgd door een extern commando om dat uit te voeren. ** @@ -604,7 +604,7 @@ Vanaf nu zullen we dat niet meer altijd vermelden. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 5.2: MEER OVER HET OPSLAAN VAN BESTANDEN + Les 1.5.2: MEER OVER HET OPSLAAN VAN BESTANDEN ** Tik :w BESTANDSNAAM om de tekst mt veranderingen op te slaan. ** @@ -625,7 +625,7 @@ of (Unix) :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 5.3: EEN DEEL VAN DE TEKST OPSLAAN + Les 1.5.3: EEN DEEL VAN DE TEKST OPSLAAN ** Sla een deel van het bestand op met v beweging :w BESTANDSNAAM ** @@ -649,20 +649,20 @@ de tekst te doen. Met d bijvoorbeeld wis je de tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 5.4: OPHALEN EN SAMENVOEGEN VAN BESTANDEN + Les 1.5.4: OPHALEN EN SAMENVOEGEN VAN BESTANDEN ** Tik :r BESTANDSNAAM om de inhoud van een bestand in te voegen. ** 1. Zet de cursor precies boven deze regel. - OPMERKING: Na het uitvoeren van stap 2 zie je tekst van les 5.3. Scrol + OPMERKING: Na het uitvoeren van stap 2 zie je tekst van les 1.5.3. Scrol daarna naar beneden om deze les weer te zien. 2. Haal nu het bestand TEST op met het commando :r TEST . Het bestand dat je ophaalt komt onder de regel waarin de cursor staat. 3. Controleer dat er een bestand is opgehaald. Ga met de cursor omhoog. - Dan zie je de tekst van les 5.3 dubbel, het origineel en de versie uit + Dan zie je de tekst van les 1.5.3 dubbel, het origineel en de versie uit het bestand. OPMERKING: Je kan ook de uitvoer van een extern commando inlezen. Om een @@ -670,7 +670,7 @@ ls en zet dat onder de regel waarin de cursor staat. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 5 + SAMENVATTING Les 1.5 1. :!COMMANDO voert een extern commando uit. Enkele bruikbare voorbeelden zijn: @@ -691,7 +691,7 @@ de cursor-positie. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.1: HET COMMANDO OPEN + Les 1.6.1: HET COMMANDO OPEN ** Tik o om een regel onder de cursor te openen in invoegmodus. ** @@ -711,7 +711,7 @@ ---> Open een regel hierboven. Tik een O terwijl de cursor hier staat. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.2: HET COMMANDO TOEVOEGEN + Les 1.6.2: HET COMMANDO TOEVOEGEN ** Tik a om tekst toe te voegen ACHTER de cursor. ** @@ -734,7 +734,7 @@ verschil is waar tekens worden ingevoegd. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.3: VERVANGEN OP EEN ANDERE MANIER + Les 1.6.3: VERVANGEN OP EEN ANDERE MANIER ** Tik een hoofdletter R om meer dan n teken te vervangen. ** @@ -756,7 +756,7 @@ vervangt een bestaand teken. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.4: TEKST KOPIREN EN PLAKKEN + Les 1.6.4: TEKST KOPIREN EN PLAKKEN ** Gebruik y om tekst te kopiren en p om te plakken. ** @@ -781,7 +781,7 @@ yy een hele regel. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.5: OPTIES GEBRUIKEN + Les 1.6.5: OPTIES GEBRUIKEN ** Gebruik een optie voor al dan niet hoofdlettergevoelig zoeken. ** @@ -808,7 +808,7 @@ /hoofdlettergevoelig\c . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 6 + SAMENVATTING Les 1.6 1. Tik o om een regel te openen ONDER de cursor en invoegmodus te starten. Tik O om een regel te openen BOVEN de cursor. @@ -832,7 +832,7 @@ schakelt 'ic' uit. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 7.1: HULP INROEPEN + Les 1.7.1: HULP INROEPEN ** Het gebruik van ingebouwde hulp. ** @@ -854,7 +854,7 @@ :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 7.2: SCHRIJF EEN CONFIGURATIEBESTAND + Les 1.7.2: SCHRIJF EEN CONFIGURATIEBESTAND ** Mogelijkheden van Vim uitbreiden. ** @@ -876,7 +876,7 @@ Tik :help vimrc-intro voor meer informatie. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 7.3: AANVULLEN + Les 1.7.3: AANVULLEN ** Aanvullen van de 'command line' met CTRL-D en . ** @@ -900,7 +900,7 @@ en . Het is bijzonder nuttig bij :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 7 + SAMENVATTING Les 1.7 1. Tik :help of druk of om een help-venster te openen. diff --git a/usr/share/vim/vim91/tutor/tutor.nl.utf-8 b/usr/share/vim/vim91/tutor/tutor1.nl.utf-8 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.nl.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.nl.utf-8 index d6a1c7f1e19..a5893241e79 100644 --- a/usr/share/vim/vim91/tutor/tutor.nl.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.nl.utf-8 @@ -20,7 +20,7 @@ alleen maar doorleest, zal je de commando's niet leren! Zorg ervoor dat de toets NIET is ingedrukt en druk vaak genoeg - op de j-toets om de cursor zo te bewegen dat les 1.1 volledig op het + op de j-toets om de cursor zo te bewegen dat les 1.1.1 volledig op het scherm staat. LET OP: In deze lessen worden omwille van de duidelijkheid vaak spaties @@ -28,7 +28,7 @@ Tik deze spaties echter NIET. Ze verstoren de werking. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.1: VERPLAATS DE CURSOR + Les 1.1.1: VERPLAATS DE CURSOR ** De cursor wordt verplaatst met de toetsen h, j, k, l zoals aangegeven. ** ^ @@ -42,7 +42,7 @@ 2. Druk de omlaag-toets (j) tot hij repeteert. Nu weet je hoe je de volgende les bereikt. - 3. Gebruik de omlaag-toets om naar les 1.2 te gaan. + 3. Gebruik de omlaag-toets om naar les 1.1.2 te gaan. OPMERKING: Als je twijfelt aan wat je tikte, druk om in de opdracht- modus te komen. Tik daarna het commando dat bedoeld wordt. @@ -51,7 +51,7 @@ rondbewegen, als je er eenmaal aan gewend bent. Echt waar! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.2: VIM AFSLUITEN + Les 1.1.2: VIM AFSLUITEN !! LET OP: Lees deze les goed door voordat je iets uitvoert!! @@ -70,10 +70,10 @@ lessen verder zal je leren hoe veranderingen worden opgeslagen in een bestand. - 5. Beweeg de cursor omlaag naar les 1.3. + 5. Beweeg de cursor omlaag naar les 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.3: TEKST BEWERKEN - WISSEN + Les 1.1.3: TEKST BEWERKEN - WISSEN ** Tik x om het teken onder de cursor te wissen. ** @@ -88,12 +88,12 @@ ---> Vi kkent eenn opdracccchtmodus en een invooegmmmmodus. - 5. Nu de regel gecorrigeerd is kan je naar les 1.4 gaan. + 5. Nu de regel gecorrigeerd is kan je naar les 1.1.4 gaan. LET OP: Probeer de lessen niet uit je hoofd te leren. Leer al doende. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.4: TEKST BEWERKEN - INVOEGEN + Les 1.1.4: TEKST BEWERKEN - INVOEGEN ** Tik i ('insert') om tekst in te voegen. ** @@ -110,10 +110,10 @@ ---> Aan regel ontekt wat . ---> Aan deze regel ontbreekt wat tekst. - 5. Ga naar les 1.5 als je gewend bent aan het invoegen van tekst. + 5. Ga naar les 1.1.5 als je gewend bent aan het invoegen van tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.5: TEKST BEWERKEN - TOEVOEGEN + Les 1.1.5: TEKST BEWERKEN - TOEVOEGEN ** Tik A ('append') om tekst toe te voegen. ** @@ -133,18 +133,18 @@ ---> Hier ontbreekt ook w Hier ontbreekt ook wat tekst. - 5. Ga naar les 1.6 als je vertrouwd bent geraakt aan het toevoegen + 5. Ga naar les 1.1.6 als je vertrouwd bent geraakt aan het toevoegen van tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 1.6: EEN BESTAND EDITTEN + Les 1.1.6: EEN BESTAND EDITTEN ** Gebruik :wq om een bestand op te slaan en de editor te verlaten. ** !! LET OP: Lees deze les helemaal door voordat je een van de volgende stappen uitvoert!! - 1. Verlaat deze les zoals je in les 1.2 deed: :q! + 1. Verlaat deze les zoals je in les 1.1.2 deed: :q! Of gebruik een andere terminal als je daar de beschikking over hebt. Doe daar het volgende. @@ -163,7 +163,7 @@ 6. Voer deze stappen uit nadat je ze hebt gelezen en begrepen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 1 + SAMENVATTING Les 1.1 1. De cursor wordt bewogen met de pijltjestoetsen of de hjkl-toetsen. h (links) j (omlaag) k (omhoog) l (rechts) @@ -182,10 +182,10 @@ OPMERKING: Met kom je terug in opdrachtmodus en wordt een ongewenst of gedeeltelijk uitgevoerd commando afgebroken. - Ga nu verder met les 2.1. + Ga nu verder met les 1.2.1. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.1: WIS-COMMANDO'S + Les 1.2.1: WIS-COMMANDO'S ** Tik dw ('delete word') om een woord te wissen. ** @@ -207,10 +207,10 @@ ---> Er zijn een het paar ggg woorden, die niet in deze len zin thuishoren. - 5. Herhaal de stappen 3 en 4 tot de zin goed is en ga naar les 2.2. + 5. Herhaal de stappen 3 en 4 tot de zin goed is en ga naar les 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.2: MEER WIS-COMMANDO'S + Les 1.2.2: MEER WIS-COMMANDO'S ** Tik d$ om te wissen tot het einde van de regel. ** @@ -224,10 +224,10 @@ ---> Iemand heeft het einde van deze regel dubbel getikt. dubbel getikt. - 5. Ga naar les 2.3 voor uitleg. + 5. Ga naar les 1.2.3 voor uitleg. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.3: OVER OPERATOREN EN BEWEGINGEN + Les 1.2.3: OVER OPERATOREN EN BEWEGINGEN Veel commando's die de tekst veranderen, bestaan uit een operator en een beweging. De samenstelling van een wis-commando met de operator d is: @@ -250,7 +250,7 @@ eind van de regel). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.4: GEBRUIK VAN EEN TELLER BIJ EEN BEWEGING + Les 1.2.4: GEBRUIK VAN EEN TELLER BIJ EEN BEWEGING ** Een getal voor een beweging herhaalt het zoveel keer. ** @@ -266,10 +266,10 @@ ---> Dit is een regel met woorden waarin je heen en weer kan bewegen. - 6. Ga verder met les 2.5. + 6. Ga verder met les 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.5: GEBRUIK EEN TELLER OM MEER TE WISSEN + Les 1.2.5: GEBRUIK EEN TELLER OM MEER TE WISSEN ** Een getal met een operator zorgt dat deze zoveel keer wordt herhaald. ** @@ -289,7 +289,7 @@ OPMERKING: De teller kan ook aan het begin staan: d2w en 2dw werken allebei. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.6: BEWERKING VAN HELE REGELS + Les 1.2.6: BEWERKING VAN HELE REGELS ** Tik dd om een hele regel te wissen. ** @@ -313,7 +313,7 @@ ---> 7) En dat ben jij ook. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 2.7: HET COMMANDO HERSTEL + Les 1.2.7: HET COMMANDO HERSTEL ** u maakt het laatste commando ongedaan, U herstelt een hele regel. ** @@ -336,10 +336,10 @@ ---> Heerstel de fouten inn deeze regel en brenng ze weer terugg met undo. - 8. Dit zijn heel nuttige commando's. Ga verder met samenvatting van les 2. + 8. Dit zijn heel nuttige commando's. Ga verder met samenvatting van les 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 2 + SAMENVATTING Les 1.2 1. Wis van de cursor tot het volgende woord met dw @@ -364,7 +364,7 @@ Undo de undo's met CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 3.1: HET COMMANDO PLAK + Les 1.3.1: HET COMMANDO PLAK ** Tik p ('put') en plak daarmee zojuist gewiste tekst na de cursor. ** @@ -384,7 +384,7 @@ ---> a) Rozen zijn rood, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 3.2: HET COMMANDO VERVANG + Les 1.3.2: HET COMMANDO VERVANG ** Tik rx ('replace') om het teken onder de cursor te vervangen door x. ** @@ -399,12 +399,12 @@ ---> Bij het tokken van dezf hegel heeft iemamd verklerde letters getikt. ---> Bij het tikken van deze regel heeft iemand verkeerde letters getikt. - 5. Ga nu naar les 3.3. + 5. Ga nu naar les 1.3.3. LET OP: Door het te doen, leer je beter dan door het uit je hoofd te leren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 3.3: HET COMMANDO VERANDER + Les 1.3.3: HET COMMANDO VERANDER ** Tik ce om te veranderen tot het einde van een woord. ** @@ -425,7 +425,7 @@ in de invoegmodus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 3.4: MEER VERANDERINGEN MET c + Les 1.3.4: MEER VERANDERINGEN MET c 1. Het commando verander ('change') werkt op dezelfde manier als wis. De opbouw is: @@ -446,7 +446,7 @@ OPMERKING: Je kan de toets gebruiken om tikfouten te herstellen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 3 + SAMENVATTING Les 1.3 1. Tik p om tekst terug te plakken, die zojuist is gewist. Dit zet de gewiste tekst ACHTER de cursor (als een hele regel is gewist komt deze @@ -466,7 +466,7 @@ Ga nu naar de volgende les. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 4.1: PLAATS VAN DE CURSOR EN STATUS VAN HET BESTAND + Les 1.4.1: PLAATS VAN DE CURSOR EN STATUS VAN HET BESTAND ** CTRL-G laat zien waar (regelnummer) je je bevindt en wat de status van het bestand is. Met [nummer] G ga je naar een bepaalde regel. ** @@ -492,7 +492,7 @@ 4. Voer de stappen 1 tot 3 uit als je dit goed hebt gelezen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 4.2: HET COMMANDO ZOEKEN + Les 1.4.2: HET COMMANDO ZOEKEN ** Met /ZOEK wordt naar de zoekterm (één of meer woorden) gezocht. ** @@ -515,7 +515,7 @@ begin doorgezocht, tenzij de optie 'wrapscan' is uitgeschakeld. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 4.3: GA NAAR CORRESPONDERENDE HAAKJES + Les 1.4.3: GA NAAR CORRESPONDERENDE HAAKJES ** Tik % om naar corresponderende ), ] of } te gaan. ** @@ -537,7 +537,7 @@ (blijvend) verplaatst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 4.4: HET VERVANG COMMANDO + Les 1.4.4: HET VERVANG COMMANDO ** Tik :s/oud/nieuw/g om 'oud' door 'nieuw' te vervangen. ** @@ -559,7 +559,7 @@ en te vragen of er vervangen moet worden. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 4 + SAMENVATTING Les 1.4 1. CTRL-G laat positie in het bestand zien en de status van het bestand. G verplaatst je naar het einde van het bestand. @@ -583,7 +583,7 @@ ('confirmation') te vragen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 5.1: HOE EEN EXTERN COMMANDO WORDT UITGEVOERD + Les 1.5.1: HOE EEN EXTERN COMMANDO WORDT UITGEVOERD ** Tik :! gevolgd door een extern commando om dat uit te voeren. ** @@ -604,7 +604,7 @@ Vanaf nu zullen we dat niet meer altijd vermelden. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 5.2: MEER OVER HET OPSLAAN VAN BESTANDEN + Les 1.5.2: MEER OVER HET OPSLAAN VAN BESTANDEN ** Tik :w BESTANDSNAAM om de tekst mèt veranderingen op te slaan. ** @@ -625,7 +625,7 @@ of (Unix) :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 5.3: EEN DEEL VAN DE TEKST OPSLAAN + Les 1.5.3: EEN DEEL VAN DE TEKST OPSLAAN ** Sla een deel van het bestand op met v beweging :w BESTANDSNAAM ** @@ -649,20 +649,20 @@ de tekst te doen. Met d bijvoorbeeld wis je de tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 5.4: OPHALEN EN SAMENVOEGEN VAN BESTANDEN + Les 1.5.4: OPHALEN EN SAMENVOEGEN VAN BESTANDEN ** Tik :r BESTANDSNAAM om de inhoud van een bestand in te voegen. ** 1. Zet de cursor precies boven deze regel. - OPMERKING: Na het uitvoeren van stap 2 zie je tekst van les 5.3. Scrol + OPMERKING: Na het uitvoeren van stap 2 zie je tekst van les 1.5.3. Scrol daarna naar beneden om deze les weer te zien. 2. Haal nu het bestand TEST op met het commando :r TEST . Het bestand dat je ophaalt komt onder de regel waarin de cursor staat. 3. Controleer dat er een bestand is opgehaald. Ga met de cursor omhoog. - Dan zie je de tekst van les 5.3 dubbel, het origineel en de versie uit + Dan zie je de tekst van les 1.5.3 dubbel, het origineel en de versie uit het bestand. OPMERKING: Je kan ook de uitvoer van een extern commando inlezen. Om een @@ -670,7 +670,7 @@ ls en zet dat onder de regel waarin de cursor staat. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 5 + SAMENVATTING Les 1.5 1. :!COMMANDO voert een extern commando uit. Enkele bruikbare voorbeelden zijn: @@ -691,7 +691,7 @@ de cursor-positie. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.1: HET COMMANDO OPEN + Les 1.6.1: HET COMMANDO OPEN ** Tik o om een regel onder de cursor te openen in invoegmodus. ** @@ -711,7 +711,7 @@ ---> Open een regel hierboven. Tik een O terwijl de cursor hier staat. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.2: HET COMMANDO TOEVOEGEN + Les 1.6.2: HET COMMANDO TOEVOEGEN ** Tik a om tekst toe te voegen ACHTER de cursor. ** @@ -734,7 +734,7 @@ verschil is waar tekens worden ingevoegd. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.3: VERVANGEN OP EEN ANDERE MANIER + Les 1.6.3: VERVANGEN OP EEN ANDERE MANIER ** Tik een hoofdletter R om meer dan één teken te vervangen. ** @@ -756,7 +756,7 @@ vervangt een bestaand teken. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.4: TEKST KOPIËREN EN PLAKKEN + Les 1.6.4: TEKST KOPIËREN EN PLAKKEN ** Gebruik y om tekst te kopiëren en p om te plakken. ** @@ -781,7 +781,7 @@ yy een hele regel. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 6.5: OPTIES GEBRUIKEN + Les 1.6.5: OPTIES GEBRUIKEN ** Gebruik een optie voor al dan niet hoofdlettergevoelig zoeken. ** @@ -808,7 +808,7 @@ /hoofdlettergevoelig\c . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 6 + SAMENVATTING Les 1.6 1. Tik o om een regel te openen ONDER de cursor en invoegmodus te starten. Tik O om een regel te openen BOVEN de cursor. @@ -832,7 +832,7 @@ schakelt 'ic' uit. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 7.1: HULP INROEPEN + Les 1.7.1: HULP INROEPEN ** Het gebruik van ingebouwde hulp. ** @@ -854,7 +854,7 @@ :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 7.2: SCHRIJF EEN CONFIGURATIEBESTAND + Les 1.7.2: SCHRIJF EEN CONFIGURATIEBESTAND ** Mogelijkheden van Vim uitbreiden. ** @@ -876,7 +876,7 @@ Tik :help vimrc-intro voor meer informatie. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Les 7.3: AANVULLEN + Les 1.7.3: AANVULLEN ** Aanvullen van de 'command line' met CTRL-D en . ** @@ -900,7 +900,7 @@ en . Het is bijzonder nuttig bij :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SAMENVATTING Les 7 + SAMENVATTING Les 1.7 1. Tik :help of druk of om een help-venster te openen. diff --git a/usr/share/vim/vim91/tutor/tutor.nb b/usr/share/vim/vim91/tutor/tutor1.no similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.nb rename to usr/share/vim/vim91/tutor/tutor1.no index 9eb6dfa93a6..a6be6947920 100644 --- a/usr/share/vim/vim91/tutor/tutor.nb +++ b/usr/share/vim/vim91/tutor/tutor1.no @@ -20,9 +20,9 @@ Hvis du bare leser teksten, vil du glemme kommandoene! Frst av alt, sjekk at Caps Lock IKKE er aktiv og trykk j-tasten for - flytte markren helt til leksjon 1.1 fyller skjermen. + flytte markren helt til leksjon 1.1.1 fyller skjermen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.1: FLYTTING AV MARKREN + Leksjon 1.1.1: FLYTTING AV MARKREN ** For flytte markren, trykk tastene h, j, k, l som vist. ** @@ -36,7 +36,7 @@ 2. Hold inne nedovertasten (j) til den repeterer. N vet du hvordan du beveger deg til neste leksjon. - 3. G til leksjon 1.2 ved hjelp av nedovertasten. + 3. G til leksjon 1.1.2 ved hjelp av nedovertasten. Merk: Hvis du blir usikker p noe du har skrevet, trykk for g til normalmodus. Skriv deretter kommandoen du nsket p nytt. @@ -45,7 +45,7 @@ Merk: Piltastene skal ogs bevege markren mye raskere nr du er blitt vant til det. Helt sant! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.2: AVSLUTTE VIM + Leksjon 1.1.2: AVSLUTTE VIM !! MERK: Fr du utfrer noen av punktene nedenfor, les hele leksjonen!! @@ -64,11 +64,11 @@ Merk: Piltastene skal ogs MERK: :q! forkaster alle forandringer som du gjorde. I lpet av noen f leksjoner vil du lre hvordan du lagrer forandringene til en fil. - 5. Flytt markren ned til leksjon 1.3. + 5. Flytt markren ned til leksjon 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + Leksjon 1.1.3: REDIGERING AV TEKST -- SLETTING ** Trykk x for slette tegnet under markren. ** @@ -85,13 +85,13 @@ MERK: :q! forkaster alle forandringer som du gjorde. I l ---> Hessstennnn brrrsnudddde ii gaaata. ---> Hesten brsnudde i gata. - 5. N som linjen er korrekt, g til leksjon 1.4. + 5. N som linjen er korrekt, g til leksjon 1.1.4. MERK: Nr du gr gjennom innfringen, ikke bare prv huske kommandoene, men bruk dem helt til de sitter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + Leksjon 1.1.4: REDIGERING AV TEKST -- INNSETTING ** Trykk i for sette inn tekst. ** @@ -114,7 +114,7 @@ MERK: N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + Leksjon 1.1.5: REDIGERING AV TEKST -- LEGGE TIL ** Trykk A for legge til tekst. ** @@ -134,17 +134,17 @@ MERK: N ---> Det mangler ogs litt tek Det mangler ogs litt tekst p denne linjen. - 5. Nr du fler at du behersker legge til tekst, g til leksjon 1.6. + 5. Nr du fler at du behersker legge til tekst, g til leksjon 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.6: REDIGERE EN FIL + Leksjon 1.1.6: REDIGERE EN FIL ** Bruk :wq for lagre en fil og avslutte. ** !! MERK: Fr du utfrer noen av stegene nedenfor, les hele denne leksjonen!! - 1. Avslutt denne innfringen som du gjorde i leksjon 1.2: :q! + 1. Avslutt denne innfringen som du gjorde i leksjon 1.1.2: :q! 2. Skriv denne kommandoen p kommandolinja: vim tutor vim er kommandoen for starte Vim-editoren, tutor er navnet p fila @@ -160,7 +160,7 @@ MERK: N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 1 + OPPSUMMERING AV LEKSJON 1.1 1. Markren beveges ved hjelp av piltastene eller hjkl-tastene. @@ -180,10 +180,10 @@ MERK: N MERK: Nr du trykker gr du til normalmodus eller du avbryter en unsket og delvis fullfrt kommando. - N kan du g videre til leksjon 2. + N kan du g videre til leksjon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.1: SLETTEKOMMANDOER + Leksjon 1.2.1: SLETTEKOMMANDOER ** Trykk dw for slette et ord. ** @@ -204,9 +204,9 @@ MERK: Bokstaven d vil komme til syne p ---> Det er tre ord som ikke hrer hjemme i denne setningen. 5. Repeter punkt 3 og 4 til den frste setningen er lik den andre. G - deretter til leksjon 2.2. + deretter til leksjon 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.2: FLERE SLETTEKOMMANDOER + Leksjon 1.2.2: FLERE SLETTEKOMMANDOER ** Trykk d$ for slette til slutten av linjen. ** @@ -221,7 +221,7 @@ MERK: Bokstaven d vil komme til syne p ---> Noen skrev slutten p linjen en gang for mye. linjen en gang for mye. - 5. G til leksjon 2.3 for forst hva som skjer. + 5. G til leksjon 1.2.3 for forst hva som skjer. @@ -229,7 +229,7 @@ MERK: Bokstaven d vil komme til syne p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.3: OM OPERATORER OG BEVEGELSER + Leksjon 1.2.3: OM OPERATORER OG BEVEGELSER Mange kommandoer som forandrer teksten er laget ut i fra en operator og en @@ -252,7 +252,7 @@ MERK: Bokstaven d vil komme til syne p MERK: Ved skrive kun bevegelsen i normalmodusen uten en operator vil markren flyttes som spesifisert. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + LEKSJON 1.2.4: BRUK AV TELLER FOR EN BEVEGELSE ** Ved skrive et tall foran en bevegelse repeterer den s mange ganger. ** @@ -270,12 +270,12 @@ MERK: Ved ---> Dette er en linje med noen ord som du kan bevege deg rundt p. - 6. G videre til leksjon 2.5. + 6. G videre til leksjon 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.5: BRUK AV ANTALL FOR SLETTE MER + Leksjon 1.2.5: BRUK AV ANTALL FOR SLETTE MER ** Et tall sammen med en operator repeterer den s mange ganger. ** @@ -298,7 +298,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p bruke bevegelsen uten en operator. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.6: OPERERE P LINJER + Leksjon 1.2.6: OPERERE P LINJER ** Trykk dd for slette en hel linje. ** @@ -321,7 +321,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.7: ANGRE-KOMMANDOEN + Leksjon 1.2.7: ANGRE-KOMMANDOEN ** Trykk u for angre siste kommando, U for fikse en hel linje. ** @@ -340,11 +340,11 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p ---> RReparer feiilene p denne linnnjen oog erssstatt dem meed angre. 8. Dette er meget nyttige kommandoer. N kan du g til oppsummeringen av - leksjon 2. + leksjon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 2 + OPPSUMMERING AV LEKSJON 1.2 1. For slette fra markren fram til det neste ordet, trykk: dw @@ -367,7 +367,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p For omgjre angringen, trykk: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.1: LIM INN-KOMMANDOEN + Leksjon 1.3.1: LIM INN-KOMMANDOEN ** Trykk p for lime inn tidligere slettet tekst etter markren ** @@ -390,7 +390,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.2: ERSTATT-KOMMANDOEN + Leksjon 1.3.2: ERSTATT-KOMMANDOEN ** Trykk rx for erstatte tegnet under markren med x. ** @@ -406,14 +406,14 @@ MERK: Et antall mellom operatoren d og bevegelsen virker p ---> Da dfnne lynjxn ble zkrevet, var det nen som tjykket feite taster! ---> Da denne linjen ble skrevet, var det noen som trykket feile taster! - 5. G videre til leksjon 3.2. + 5. G videre til leksjon 1.3.2. MERK: Husk at du br lre ved BRUKE, ikke pugge. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.3: FORANDRE-OPERATOREN + Leksjon 1.3.3: FORANDRE-OPERATOREN ** For forandre til slutten av et ord, trykk ce . ** @@ -436,7 +436,7 @@ V ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + Leksjon 1.3.4: FLERE FORANDRINGER VED BRUK AV c ** Forandringskommandoen blir brukt med de samme bevegelser som slett. ** @@ -459,7 +459,7 @@ V MERK: Du kan bruke slettetasten for rette feil mens du skriver. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 3 + OPPSUMMERING AV LEKSJON 1.3 1. For legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette @@ -482,7 +482,7 @@ N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.1: POSISJONERING AV MARKREN OG FILSTATUS + Leksjon 1.4.1: POSISJONERING AV MARKREN OG FILSTATUS ** Trykk CTRL-G for vise posisjonen i filen og filstatusen. Trykk G for g til en spesifikk linje i filen. ** @@ -505,7 +505,7 @@ Merk: Du kan se mark 4. Utfr steg 1 til 3 hvis du fler deg sikker p prosedyren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.2: SKEKOMMANDOEN + Leksjon 1.4.2: SKEKOMMANDOEN ** Skriv / etterfulgt av en skestreng som du vil lete etter. ** @@ -528,7 +528,7 @@ Merk: Du kan se mark Merk: Nr skingen nr slutten av filen, vil den fortsette fra starten unntatt hvis wrapscan-valget er resatt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.3: FINN SAMSVARENDE PARENTESER + Leksjon 1.4.3: FINN SAMSVARENDE PARENTESER ** Trykk % for finne en samsvarende ), ] eller } . ** @@ -551,7 +551,7 @@ Merk: Dette er veldig nyttig til feils ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.4: ERSTATT-KOMMANDOEN + Leksjon 1.4.4: ERSTATT-KOMMANDOEN ** Skriv :s/gammel/ny/g for erstatte gammel med ny. ** @@ -574,7 +574,7 @@ Merk: Dette er veldig nyttig til feils deretter sprre om teksten skal erstattes eller ikke. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 4 + OPPSUMMERING AV LEKSJON 1.4 1. Ctrl-G viser nvrende posisjon i filen og filstatusen. @@ -597,7 +597,7 @@ Merk: Dette er veldig nyttig til feils Erstatte alle forekomster i en fil: :%s/gammel/ny/g For godkjenne hver erstatning, legg til c: :%s/gammel/ny/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.1: HVORDAN UTFRE EN EKSTERN KOMMANDO + Leksjon 1.5.1: HVORDAN UTFRE EN EKSTERN KOMMANDO ** Skriv :! etterfulgt av en ekstern kommando for utfre denne. ** @@ -620,7 +620,7 @@ MERK: Alle ikke alltid vi nevner det. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.2: MER OM LAGRING AV FILER + Leksjon 1.5.2: MER OM LAGRING AV FILER ** For lagre endringene gjort i en tekst, skriv :w FILNAVN. ** @@ -643,7 +643,7 @@ Merk: Hvis du n operativsystem, eller :!del TEST hvis du bruker MS-DOS. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + Leksjon 1.5.3: VELGE TEKST SOM SKAL LAGRES ** For lagre en del av en fil, skriv v bevegelse :w FILNAVN ** @@ -666,21 +666,21 @@ MERK: Ved operator for gjre noe med teksten. For eksempel sletter d teksten. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.4: HENTING OG SAMMENSLING AV FILER + Leksjon 1.5.4: HENTING OG SAMMENSLING AV FILER ** For lese inn en annen fil inn i nvrende buffer, skriv :r FILNAVN ** 1. Plasser markren like over denne linjen. -MERK: Etter ha utfrt steg 2 vil du se teksten fra leksjon 5.3. G deretter +MERK: Etter ha utfrt steg 2 vil du se teksten fra leksjon 1.5.3. G deretter NED for se denne leksjonen igjen. 2. Hent TEST-filen ved bruke kommandoen :r TEST der TEST er navnet p filen du brukte. Filen du henter blir plassert nedenfor markrlinjen. 3. For sjekke at filen ble hentet, g tilbake og se at det er to kopier av - leksjon 5.3, originalen og denne versjonen. + leksjon 1.5.3, originalen og denne versjonen. MERK: Du kan ogs lese utdataene av en ekstern kommando. For eksempel, :r !ls leser utdataene av ls-kommandoen og legger dem nedenfor markren. @@ -689,7 +689,7 @@ MERK: Du kan ogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 5 + OPPSUMMERING AV LEKSJON 1.5 1. :!kommando utfrer en ekstern kommandio. @@ -712,7 +712,7 @@ MERK: Du kan ogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.1: PNE LINJE-KOMMANDOEN + Leksjon 1.6.1: PNE LINJE-KOMMANDOEN ** Skriv o for pne opp for en ny linje etter markren og g til @@ -735,7 +735,7 @@ MERK: Du kan ogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.2: LEGG TIL-KOMMANDOEN + Leksjon 1.6.2: LEGG TIL-KOMMANDOEN ** Skriv a for legge til tekst ETTER markren. ** @@ -758,7 +758,7 @@ MERK: Du kan ogs Merk: a, i og A gr alle til den samme innsettingsmodusen, den eneste forskjellen er hvor tegnene blir satt inn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.3: EN ANNEN MTE ERSTATTE P + Leksjon 1.6.3: EN ANNEN MTE ERSTATTE P ** Skriv en stor R for erstatte mer enn ett tegn. ** @@ -781,7 +781,7 @@ MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives erstatter et eksisterende tegn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.4: KOPIERE OG LIME INN TEKST + Leksjon 1.6.4: KOPIERE OG LIME INN TEKST ** Bruk y-operatoren for kopiere tekst og p for lime den inn ** @@ -804,7 +804,7 @@ MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives Merk: Du kan ogs bruke y som en operator; yw kopierer ett ord. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.5: SETT VALG + Leksjon 1.6.5: SETT VALG ** Sett et valg s sk eller erstatning ignorerer store/sm bokstaver. ** @@ -827,7 +827,7 @@ Merk: For Merk: Hvis du vil ignorere store/sm bokstaver for kun en skekommando, bruk \c i uttrykket: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 6 + OPPSUMMERING AV LEKSJON 1.6 1. Trykk o for legge til en linje NEDENFOR markren og g inn i innsettingsmodus. @@ -850,7 +850,7 @@ Merk: Hvis du vil ignorere store/sm 7. Legg til no foran valget for sl det av: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.1: F HJELP + Leksjon 1.7.1: F HJELP ** Bruk det innebygde hjelpesystemet. ** @@ -873,7 +873,7 @@ Merk: Hvis du vil ignorere store/sm :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + Leksjon 1.7.2: LAG ET OPPSTARTSSKRIPT ** Sl p funksjoner i Vim ** @@ -896,7 +896,7 @@ Merk: Hvis du vil ignorere store/sm alle dine foretrukne oppsett i denne vimrc-filen. For mer informasjon, skriv :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.3: FULLFRING + Leksjon 1.7.3: FULLFRING ** Kommandolinjefullfring med CTRL-D og ** @@ -919,7 +919,7 @@ Merk: Hvis du vil ignorere store/sm MERK: Fullfring fungerer for mange kommandoer. Prv ved trykke CTRL-D og . Det er spesielt nyttig for bruk sammen med :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 7 + OPPSUMMERING AV LEKSJON 1.7 1. Skriv :help eller trykk eller for pne et hjelpevindu. diff --git a/usr/share/vim/vim91/tutor/tutor.no.utf-8 b/usr/share/vim/vim91/tutor/tutor1.no.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.no.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.no.utf-8 index 6a8a4e94632..4459f17b665 100644 --- a/usr/share/vim/vim91/tutor/tutor.no.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.no.utf-8 @@ -20,9 +20,9 @@ Hvis du bare leser teksten, vil du glemme kommandoene! Først av alt, sjekk at «Caps Lock» IKKE er aktiv og trykk «j»-tasten for - å flytte markøren helt til leksjon 1.1 fyller skjermen. + å flytte markøren helt til leksjon 1.1.1 fyller skjermen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.1: FLYTTING AV MARKØREN + Leksjon 1.1.1: FLYTTING AV MARKØREN ** For å flytte markøren, trykk tastene h, j, k, l som vist. ** @@ -36,7 +36,7 @@ 2. Hold inne nedovertasten (j) til den repeterer. Nå vet du hvordan du beveger deg til neste leksjon. - 3. Gå til leksjon 1.2 ved hjelp av nedovertasten. + 3. Gå til leksjon 1.1.2 ved hjelp av nedovertasten. Merk: Hvis du blir usikker på noe du har skrevet, trykk for å gå til normalmodus. Skriv deretter kommandoen du ønsket på nytt. @@ -45,7 +45,7 @@ Merk: Piltastene skal også virke. Men ved å bruke hjkl vil du være i stand ti å bevege markøren mye raskere når du er blitt vant til det. Helt sant! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.2: AVSLUTTE VIM + Leksjon 1.1.2: AVSLUTTE VIM !! MERK: Før du utfører noen av punktene nedenfor, les hele leksjonen!! @@ -64,11 +64,11 @@ Merk: Piltastene skal også virke. Men ved å bruke hjkl vil du være i stand ti MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen få leksjoner vil du lære hvordan du lagrer forandringene til en fil. - 5. Flytt markøren ned til leksjon 1.3. + 5. Flytt markøren ned til leksjon 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.3: REDIGERING AV TEKST -- SLETTING + Leksjon 1.1.3: REDIGERING AV TEKST -- SLETTING ** Trykk x for å slette tegnet under markøren. ** @@ -85,13 +85,13 @@ MERK: :q! forkaster alle forandringer som du gjorde. I løpet av noen ---> Hessstennnn brrråsnudddde ii gaaata. ---> Hesten bråsnudde i gata. - 5. Nå som linjen er korrekt, gå til leksjon 1.4. + 5. Nå som linjen er korrekt, gå til leksjon 1.1.4. MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, men bruk dem helt til de sitter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.4: REDIGERING AV TEKST -- INNSETTING + Leksjon 1.1.4: REDIGERING AV TEKST -- INNSETTING ** Trykk i for å sette inn tekst. ** @@ -114,7 +114,7 @@ MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.5: REDIGERING AV TEKST -- LEGGE TIL + Leksjon 1.1.5: REDIGERING AV TEKST -- LEGGE TIL ** Trykk A for å legge til tekst. ** @@ -134,17 +134,17 @@ MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, m ---> Det mangler også litt tek Det mangler også litt tekst på denne linjen. - 5. Når du føler at du behersker å legge til tekst, gå til leksjon 1.6. + 5. Når du føler at du behersker å legge til tekst, gå til leksjon 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 1.6: REDIGERE EN FIL + Leksjon 1.1.6: REDIGERE EN FIL ** Bruk :wq for å lagre en fil og avslutte. ** !! MERK: Før du utfører noen av stegene nedenfor, les hele denne leksjonen!! - 1. Avslutt denne innføringen som du gjorde i leksjon 1.2: :q! + 1. Avslutt denne innføringen som du gjorde i leksjon 1.1.2: :q! 2. Skriv denne kommandoen på kommandolinja: vim tutor «vim» er kommandoen for å starte Vim-editoren, «tutor» er navnet på fila @@ -160,7 +160,7 @@ MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 1 + OPPSUMMERING AV LEKSJON 1.1 1. Markøren beveges ved hjelp av piltastene eller hjkl-tastene. @@ -180,10 +180,10 @@ MERK: Når du går gjennom innføringen, ikke bare prøv å huske kommandoene, m MERK: Når du trykker går du til normalmodus eller du avbryter en uønsket og delvis fullført kommando. - Nå kan du gå videre til leksjon 2. + Nå kan du gå videre til leksjon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.1: SLETTEKOMMANDOER + Leksjon 1.2.1: SLETTEKOMMANDOER ** Trykk dw for å slette et ord. ** @@ -204,9 +204,9 @@ MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når ---> Det er tre ord som ikke hører hjemme i denne setningen. 5. Repeter punkt 3 og 4 til den første setningen er lik den andre. Gå - deretter til leksjon 2.2. + deretter til leksjon 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.2: FLERE SLETTEKOMMANDOER + Leksjon 1.2.2: FLERE SLETTEKOMMANDOER ** Trykk d$ for å slette til slutten av linjen. ** @@ -221,7 +221,7 @@ MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når ---> Noen skrev slutten på linjen en gang for mye. linjen en gang for mye. - 5. Gå til leksjon 2.3 for å forstå hva som skjer. + 5. Gå til leksjon 1.2.3 for å forstå hva som skjer. @@ -229,7 +229,7 @@ MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.3: OM OPERATORER OG BEVEGELSER + Leksjon 1.2.3: OM OPERATORER OG BEVEGELSER Mange kommandoer som forandrer teksten er laget ut i fra en operator og en @@ -252,7 +252,7 @@ MERK: Bokstaven d vil komme til syne på den nederste linjen på skjermen når MERK: Ved å skrive kun bevegelsen i normalmodusen uten en operator vil markøren flyttes som spesifisert. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKSJON 2.4: BRUK AV TELLER FOR EN BEVEGELSE + LEKSJON 1.2.4: BRUK AV TELLER FOR EN BEVEGELSE ** Ved å skrive et tall foran en bevegelse repeterer den så mange ganger. ** @@ -270,12 +270,12 @@ MERK: Ved å skrive kun bevegelsen i normalmodusen uten en operator vil ---> Dette er en linje med noen ord som du kan bevege deg rundt på. - 6. Gå videre til leksjon 2.5. + 6. Gå videre til leksjon 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.5: BRUK AV ANTALL FOR Å SLETTE MER + Leksjon 1.2.5: BRUK AV ANTALL FOR Å SLETTE MER ** Et tall sammen med en operator repeterer den så mange ganger. ** @@ -298,7 +298,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som bruke bevegelsen uten en operator. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.6: OPERERE PÅ LINJER + Leksjon 1.2.6: OPERERE PÅ LINJER ** Trykk dd for å slette en hel linje. ** @@ -321,7 +321,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 2.7: ANGRE-KOMMANDOEN + Leksjon 1.2.7: ANGRE-KOMMANDOEN ** Trykk u for å angre siste kommando, U for å fikse en hel linje. ** @@ -340,11 +340,11 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som ---> RReparer feiilene påå denne linnnjen oog erssstatt dem meed angre. 8. Dette er meget nyttige kommandoer. Nå kan du gå til oppsummeringen av - leksjon 2. + leksjon 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 2 + OPPSUMMERING AV LEKSJON 1.2 1. For å slette fra markøren fram til det neste ordet, trykk: dw @@ -367,7 +367,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som For å omgjøre angringen, trykk: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.1: «LIM INN»-KOMMANDOEN + Leksjon 1.3.1: «LIM INN»-KOMMANDOEN ** Trykk p for å lime inn tidligere slettet tekst etter markøren ** @@ -390,7 +390,7 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.2: «ERSTATT»-KOMMANDOEN + Leksjon 1.3.2: «ERSTATT»-KOMMANDOEN ** Trykk rx for å erstatte tegnet under markøren med x. ** @@ -406,14 +406,14 @@ MERK: Et antall mellom operatoren d og bevegelsen virker på samme måte som ---> Da dfnne lynjxn ble zkrevet, var det nøen som tjykket feite taster! ---> Da denne linjen ble skrevet, var det noen som trykket feile taster! - 5. Gå videre til leksjon 3.2. + 5. Gå videre til leksjon 1.3.2. MERK: Husk at du bør lære ved å BRUKE, ikke pugge. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.3: «FORANDRE»-OPERATOREN + Leksjon 1.3.3: «FORANDRE»-OPERATOREN ** For å forandre til slutten av et ord, trykk ce . ** @@ -436,7 +436,7 @@ Vær oppmerksom på at ce sletter ordet og går inn i innsettingsmodus. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 3.4: FLERE FORANDRINGER VED BRUK AV c + Leksjon 1.3.4: FLERE FORANDRINGER VED BRUK AV c ** Forandringskommandoen blir brukt med de samme bevegelser som «slett». ** @@ -459,7 +459,7 @@ Vær oppmerksom på at ce sletter ordet og går inn i innsettingsmodus. MERK: Du kan bruke slettetasten for å rette feil mens du skriver. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 3 + OPPSUMMERING AV LEKSJON 1.3 1. For å legge tilbake tekst som nettopp er blitt slettet, trykk p . Dette @@ -482,7 +482,7 @@ Nå kan du gå til neste leksjon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.1: POSISJONERING AV MARKØREN OG FILSTATUS + Leksjon 1.4.1: POSISJONERING AV MARKØREN OG FILSTATUS ** Trykk CTRL-G for å vise posisjonen i filen og filstatusen. Trykk G for å gå til en spesifikk linje i filen. ** @@ -505,7 +505,7 @@ Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette 4. Utfør steg 1 til 3 hvis du føler deg sikker på prosedyren. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.2: SØKEKOMMANDOEN + Leksjon 1.4.2: SØKEKOMMANDOEN ** Skriv / etterfulgt av en søkestreng som du vil lete etter. ** @@ -528,7 +528,7 @@ Merk: Du kan se markørposisjonen i nederste høyre hjørne av skjermen. Dette Merk: Når søkingen når slutten av filen, vil den fortsette fra starten unntatt hvis «wrapscan»-valget er resatt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.3: FINN SAMSVARENDE PARENTESER + Leksjon 1.4.3: FINN SAMSVARENDE PARENTESER ** Trykk % for å finne en samsvarende ), ] eller } . ** @@ -551,7 +551,7 @@ Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 4.4: ERSTATT-KOMMANDOEN + Leksjon 1.4.4: ERSTATT-KOMMANDOEN ** Skriv :s/gammel/ny/g for å erstatte «gammel» med «ny». ** @@ -574,7 +574,7 @@ Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert deretter spørre om teksten skal erstattes eller ikke. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 4 + OPPSUMMERING AV LEKSJON 1.4 1. Ctrl-G viser nåværende posisjon i filen og filstatusen. @@ -597,7 +597,7 @@ Merk: Dette er veldig nyttig til feilsøking i programmer som har ubalansert Erstatte alle forekomster i en fil: :%s/gammel/ny/g For å godkjenne hver erstatning, legg til «c»: :%s/gammel/ny/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO + Leksjon 1.5.1: HVORDAN UTFØRE EN EKSTERN KOMMANDO ** Skriv :! etterfulgt av en ekstern kommando for å utføre denne. ** @@ -620,7 +620,7 @@ MERK: Alle «:»-kommandoer må avsluttes med . Fra dette punktet er det ikke alltid vi nevner det. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.2: MER OM LAGRING AV FILER + Leksjon 1.5.2: MER OM LAGRING AV FILER ** For å lagre endringene gjort i en tekst, skriv :w FILNAVN. ** @@ -643,7 +643,7 @@ Merk: Hvis du nå hadde avsluttet Vim og startet på nytt igjen med «vim TEST» operativsystem, eller :!del TEST hvis du bruker MS-DOS. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.3: VELGE TEKST SOM SKAL LAGRES + Leksjon 1.5.3: VELGE TEKST SOM SKAL LAGRES ** For å lagre en del av en fil, skriv v bevegelse :w FILNAVN ** @@ -666,21 +666,21 @@ MERK: Ved å trykke v startes visuelt valg. Du kan flytte markøren rundt for operator for å gjøre noe med teksten. For eksempel sletter d teksten. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 5.4: HENTING OG SAMMENSLÅING AV FILER + Leksjon 1.5.4: HENTING OG SAMMENSLÅING AV FILER ** For å lese inn en annen fil inn i nåværende buffer, skriv :r FILNAVN ** 1. Plasser markøren like over denne linjen. -MERK: Etter å ha utført steg 2 vil du se teksten fra leksjon 5.3. Gå deretter +MERK: Etter å ha utført steg 2 vil du se teksten fra leksjon 1.5.3. Gå deretter NED for å se denne leksjonen igjen. 2. Hent TEST-filen ved å bruke kommandoen :r TEST der TEST er navnet på filen du brukte. Filen du henter blir plassert nedenfor markørlinjen. 3. For å sjekke at filen ble hentet, gå tilbake og se at det er to kopier av - leksjon 5.3, originalen og denne versjonen. + leksjon 1.5.3, originalen og denne versjonen. MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls leser utdataene av ls-kommandoen og legger dem nedenfor markøren. @@ -689,7 +689,7 @@ MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 5 + OPPSUMMERING AV LEKSJON 1.5 1. :!kommando utfører en ekstern kommandio. @@ -712,7 +712,7 @@ MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.1: «ÅPNE LINJE»-KOMMANDOEN + Leksjon 1.6.1: «ÅPNE LINJE»-KOMMANDOEN ** Skriv o for å «åpne opp» for en ny linje etter markøren og gå til @@ -735,7 +735,7 @@ MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.2: «LEGG TIL»-KOMMANDOEN + Leksjon 1.6.2: «LEGG TIL»-KOMMANDOEN ** Skriv a for å legge til tekst ETTER markøren. ** @@ -758,7 +758,7 @@ MERK: Du kan også lese utdataene av en ekstern kommando. For eksempel, :r !ls Merk: a, i og A går alle til den samme innsettingsmodusen, den eneste forskjellen er hvor tegnene blir satt inn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.3: EN ANNEN MÅTE Å ERSTATTE PÅ + Leksjon 1.6.3: EN ANNEN MÅTE Å ERSTATTE PÅ ** Skriv en stor R for å erstatte mer enn ett tegn. ** @@ -781,7 +781,7 @@ MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives erstatter et eksisterende tegn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.4: KOPIERE OG LIME INN TEKST + Leksjon 1.6.4: KOPIERE OG LIME INN TEKST ** Bruk y-operatoren for å kopiere tekst og p for å lime den inn ** @@ -804,7 +804,7 @@ MERK: Erstatningsmodus er lik insettingsmodus, men hvert tegn som skrives Merk: Du kan også bruke y som en operator; yw kopierer ett ord. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 6.5: SETT VALG + Leksjon 1.6.5: SETT VALG ** Sett et valg så søk eller erstatning ignorerer store/små bokstaver. ** @@ -827,7 +827,7 @@ Merk: For å fjerne uthevingen av treff, skriv: :nohlsearch Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk \c i uttrykket: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 6 + OPPSUMMERING AV LEKSJON 1.6 1. Trykk o for å legge til en linje NEDENFOR markøren og gå inn i innsettingsmodus. @@ -850,7 +850,7 @@ Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk 7. Legg til «no» foran valget for å slå det av: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.1: FÅ HJELP + Leksjon 1.7.1: FÅ HJELP ** Bruk det innebygde hjelpesystemet. ** @@ -873,7 +873,7 @@ Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.2: LAG ET OPPSTARTSSKRIPT + Leksjon 1.7.2: LAG ET OPPSTARTSSKRIPT ** Slå på funksjoner i Vim ** @@ -896,7 +896,7 @@ Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk alle dine foretrukne oppsett i denne «vimrc»-filen. For mer informasjon, skriv :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Leksjon 7.3: FULLFØRING + Leksjon 1.7.3: FULLFØRING ** Kommandolinjefullføring med CTRL-D og ** @@ -919,7 +919,7 @@ Merk: Hvis du vil ignorere store/små bokstaver for kun en søkekommando, bruk MERK: Fullføring fungerer for mange kommandoer. Prøv ved å trykke CTRL-D og . Det er spesielt nyttig for bruk sammen med :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - OPPSUMMERING AV LEKSJON 7 + OPPSUMMERING AV LEKSJON 1.7 1. Skriv :help eller trykk eller for å åpne et hjelpevindu. diff --git a/usr/share/vim/vim91/tutor/tutor.pl b/usr/share/vim/vim91/tutor/tutor1.pl similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.pl rename to usr/share/vim/vim91/tutor/tutor1.pl index e6834315686..5d75bdeac73 100644 --- a/usr/share/vim/vim91/tutor/tutor.pl +++ b/usr/share/vim/vim91/tutor/tutor1.pl @@ -21,10 +21,10 @@ polece! Teraz upewnij si, e nie masz wcinitego Caps Locka i wciskaj j - tak dugo dopki Lekcja 1.1. nie wypeni cakowicie ekranu. + tak dugo dopki Lekcja 1.1.1. nie wypeni cakowicie ekranu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.1.: PORUSZANIE SI KURSOREM + Lekcja 1.1.1.: PORUSZANIE SI KURSOREM ** By wykona ruch kursorem, wcinij h, j, k, l jak pokazano. ** @@ -48,7 +48,7 @@ Naprawd! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.2.: WYCHODZENIE Z VIM-a + Lekcja 1.1.2.: WYCHODZENIE Z VIM-a !! UWAGA: Przed wykonaniem jakiegokolwiek polecenia przeczytaj ca lekcj !! @@ -67,11 +67,11 @@ UWAGA: :q! porzuca wszelkie zmiany jakie zrobie. W nastpnych lekcjach dowiesz si jak je zapamitywa. - 5. Przenie kursor do lekcji 1.3. + 5. Przenie kursor do lekcji 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.3.: EDYCJA TEKSTU - KASOWANIE + Lekcja 1.1.3.: EDYCJA TEKSTU - KASOWANIE ** Wcinij x aby usun znak pod kursorem. ** @@ -85,7 +85,7 @@ ---> Kkrowa prrzeskoczya prrzez ksiiycc. - 5. Teraz, kiedy zdanie jest poprawione, przejd do Lekcji 1.4. + 5. Teraz, kiedy zdanie jest poprawione, przejd do Lekcji 1.1.4. UWAGA: Ucz si przez wiczenie, nie wkuwanie. @@ -94,7 +94,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) + Lekcja 1.1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) ** Wcinij i aby wstawi tekst. ** @@ -117,7 +117,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) + Lekcja 1.1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) ** Wcinij A by doda tekst. ** @@ -137,16 +137,16 @@ ---> Tu te troch bra Tu te troch brakuje. - 5. Kiedy ju utrwalie wiczenie, przejd do lekcji 1.6. + 5. Kiedy ju utrwalie wiczenie, przejd do lekcji 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.6.: EDYCJA PLIKU + Lekcja 1.1.6.: EDYCJA PLIKU ** Uyj :wq aby zapisa plik i wyj. ** !! UWAGA: zanim wykonasz jakiekolwiek polecenia przeczytaj ca lekcj !! - 1. Zakocz tutorial tak jak w lekcji 1.2.: :q! + 1. Zakocz tutorial tak jak w lekcji 1.1.2.: :q! lub, jeli masz dostp do innego terminala, wykonaj kolejne kroki tam. 2. W powoce wydaj polecenie: vim tutor @@ -163,7 +163,7 @@ 6. Po przeczytaniu wszystkich krokw i ich zrozumieniu: wykonaj je. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 1. PODSUMOWANIE + LEKCJA 1.1. PODSUMOWANIE 1. Poruszasz kursorem uywajc "strzaek" i klawiszy hjkl . h (w lewo) j (w d) k (do gry) l (w prawo) @@ -184,9 +184,9 @@ UWAGA: Wcinicie przeniesie Ci z powrotem do trybu Normal lub odwoa niechciane lub czciowo wprowadzone polecenia. -Teraz moemy kontynuowa i przej do Lekcji 2. +Teraz moemy kontynuowa i przej do Lekcji 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.1.: POLECENIE DELETE (usuwanie) + Lekcja 1.2.1.: POLECENIE DELETE (usuwanie) ** Wpisz dw by usun wyraz. ** @@ -206,10 +206,10 @@ ---> Jest tu par papier wyrazw, ktre kamie nie nale do noyce tego zdania. 5. Powtarzaj kroki 3. i 4. dopki zdanie nie bdzie poprawne, potem - przejd do Lekcji 2.2. + przejd do Lekcji 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.2.: WICEJ POLECE USUWAJCYCH + Lekcja 1.2.2.: WICEJ POLECE USUWAJCYCH ** Wpisz d$ aby usun tekst do koca linii. ** @@ -225,14 +225,14 @@ ---> Kto wpisa koniec tego zdania dwukrotnie. zdania dwukrotnie. - 5. Przejd do Lekcji 2.3., by zrozumie co si stao. + 5. Przejd do Lekcji 1.2.3., by zrozumie co si stao. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.3.: O OPERATORACH I RUCHACH + Lekcja 1.2.3.: O OPERATORACH I RUCHACH Wiele polece zmieniajcych tekst jest zoonych z operatora i ruchu. @@ -255,7 +255,7 @@ tak, jak to okrelono. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.4.: UYCIE MNONIKA DLA RUCHU + Lekcja 1.2.4.: UYCIE MNONIKA DLA RUCHU ** Wpisanie liczby przed ruchem powtarza ruch odpowiedni ilo razy. ** @@ -273,12 +273,12 @@ ---> To jest zwyky wiersz z wyrazami, po ktrych moesz si porusza. - 6. Przejd do lekcji 2.5. + 6. Przejd do lekcji 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.5.: UYCIE MNONIKA, BY WICEJ USUN + Lekcja 1.2.5.: UYCIE MNONIKA, BY WICEJ USUN ** Wpisanie liczby z operatorem powtarza go odpowiedni ilo razy. ** @@ -301,7 +301,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.6.: OPEROWANIE NA LINIACH + Lekcja 1.2.6.: OPEROWANIE NA LINIACH ** Wpisz dd aby usun ca lini. ** @@ -324,7 +324,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.7.: POLECENIE UNDO (cofnij) + Lekcja 1.2.7.: POLECENIE UNDO (cofnij) ** Wcinij u aby cofn skutki ostatniego polecenia. @@ -344,10 +344,10 @@ 8. To s bardzo poyteczne polecenia. - Przejd teraz do podsumowania Lekcji 2. + Przejd teraz do podsumowania Lekcji 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 2. PODSUMOWANIE + LEKCJA 1.2. PODSUMOWANIE 1. By usun znaki od kursora do nastpnego wyrazu, wpisz: dw @@ -370,7 +370,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.1.: POLECENIE PUT (wstaw) + Lekcja 1.3.1.: POLECENIE PUT (wstaw) ** Wpisz p by wstawi ostatnie usunicia za kursorem. ** @@ -393,7 +393,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.2.: POLECENIE REPLACE (zastp) + Lekcja 1.3.2.: POLECENIE REPLACE (zastp) ** Wpisz rx aby zastpi znak pod kursorem na x . ** @@ -409,14 +409,14 @@ ---> Kjedy ten wiersz bi wstkiwany, kto wcizn per zych klawirzy! ---> Kiedy ten wiersz by wstukiwany, kto wcisn par zych klawiszy! - 5. Teraz czas na Lekcj 3.3. + 5. Teraz czas na Lekcj 1.3.3. UWAGA: Pamitaj, by uczy si wiczc, a nie pamiciowo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.3.: OPERATOR CHANGE (zmie) + Lekcja 1.3.3.: OPERATOR CHANGE (zmie) ** By zmieni do koca wyrazu, wpisz ce . ** @@ -439,7 +439,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.4.: WICEJ ZMIAN UYWAJC c + Lekcja 1.3.4.: WICEJ ZMIAN UYWAJC c ** Polecenie change uywa takich samych ruchw, jak delete. ** @@ -462,7 +462,7 @@ UWAGA: Moesz uywa aby poprawia bdy w czasie pisania. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 3. PODSUMOWANIE + LEKCJA 1.3. PODSUMOWANIE 1. Aby wstawi tekst, ktry zosta wczeniej usunity wcinij p . To @@ -485,7 +485,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.1.: POOENIE KURSORA ORAZ STATUS PLIKU + Lekcja 1.4.1.: POOENIE KURSORA ORAZ STATUS PLIKU ** Nacinij CTRL-G aby zobaczy swoje pooenie w pliku i status pliku. Nacinij G aby przej do linii w pliku. ** @@ -508,7 +508,7 @@ 4. Jeli czujesz si wystarczajco pewnie, wykonaj kroki 1-3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.2.: POLECENIE SZUKAJ + Lekcja 1.4.2.: POLECENIE SZUKAJ ** Wpisz / a nastpnie wyraenie, aby je znale. ** @@ -531,7 +531,7 @@ o ile opcja 'wrapscan' nie zostaa przestawiona. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.3.: W POSZUKIWANIU PARUJCYCH NAWIASW + Lekcja 1.4.3.: W POSZUKIWANIU PARUJCYCH NAWIASW ** Wpisz % by znale parujcy ), ], lub } . ** @@ -554,7 +554,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.4.: POLECENIE SUBSTITUTE (zamiana) + Lekcja 1.4.4.: POLECENIE SUBSTITUTE (zamiana) ** Wpisz :s/stary/nowy/g aby zamieni 'stary' na 'nowy'. ** @@ -577,7 +577,7 @@ pliku, proszc o potwierdzenie za kadym razem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 4. PODSUMOWANIE + LEKCJA 1.4. PODSUMOWANIE 1. CTRL-G pokae Twoj pozycj w pliku i status pliku. SHIFT-G przenosi Ci do koca pliku. @@ -600,7 +600,7 @@ By zamieni wszystkie wystpienia w pliku, wpisz :%s/stary/nowy/g By Vim prosi Ci o potwierdzenie, dodaj 'c' :%s/stary/nowy/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.1.: JAK WYKONA POLECENIA ZEWNTRZNE? + Lekcja 1.5.1.: JAK WYKONA POLECENIA ZEWNTRZNE? ** Wpisz :! a nastpnie zewntrzne polecenie, by je wykona. ** @@ -623,7 +623,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.2.: WICEJ O ZAPISYWANIU PLIKW + Lekcja 1.5.2.: WICEJ O ZAPISYWANIU PLIKW ** By zachowa zmiany w tekcie, wpisz :w NAZWA_PLIKU . ** @@ -646,7 +646,7 @@ lub (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.3.: WYBRANIE TEKSTU DO ZAPISU + Lekcja 1.5.3.: WYBRANIE TEKSTU DO ZAPISU ** By zachowa cz pliku, wpisz v ruch :w NAZWA_PLIKU ** @@ -669,14 +669,14 @@ z tekstem. Na przykad d usuwa tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.4.: WSTAWIANIE I CZENIE PLIKW + Lekcja 1.5.4.: WSTAWIANIE I CZENIE PLIKW ** By wstawi zawarto pliku, wpisz :r NAZWA_PLIKU ** 1. Umie kursor tu powyej tej linii. -UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejd +UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 1.5.3. Potem przejd do DOU, by zobaczy ponownie t lekcj. 2. Teraz wczytaj plik TEST uywajc polecenia :r TEST , gdzie TEST @@ -684,7 +684,7 @@ Wczytany plik jest umieszczony poniej linii z kursorem. 3. By sprawdzi czy plik zosta wczytany, cofnij kursor i zobacz, e - teraz s dwie kopie Lekcji 5.3., orygina i kopia z pliku. + teraz s dwie kopie Lekcji 1.5.3., orygina i kopia z pliku. UWAGA: Moesz te wczyta wyjcie zewntrznego polecenia. Na przykad :r !ls wczytuje wyjcie polecenia ls i umieszcza je pod poniej @@ -692,7 +692,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 5. PODSUMOWANIE + LEKCJA 1.5. PODSUMOWANIE 1. :!polecenie wykonuje polecenie zewntrzne. @@ -715,7 +715,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.1.: POLECENIE OPEN (otwrz) + Lekcja 1.6.1.: POLECENIE OPEN (otwrz) ** Wpisz o by otworzy lini poniej kursora i przenie si do @@ -738,7 +738,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.2.: POLECENIE APPEND (dodaj) + Lekcja 1.6.2.: POLECENIE APPEND (dodaj) ** Wpisz a by doda tekst ZA kursorem. ** @@ -761,7 +761,7 @@ Uwaga: a , i oraz A prowadz do trybu Insert, jedyn rnic jest miejsce, gdzie nowe znaki bd dodawane. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.3.: INNA WERSJA REPLACE (zamiana) + Lekcja 1.6.3.: INNA WERSJA REPLACE (zamiana) ** Wpisz wielkie R by zamieni wicej ni jeden znak. ** @@ -784,7 +784,7 @@ znak. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.4.: KOPIOWANIE I WKLEJANIE TEKSTU + Lekcja 1.6.4.: KOPIOWANIE I WKLEJANIE TEKSTU ** uyj operatora y aby skopiowa tekst i p aby go wklei ** @@ -807,7 +807,7 @@ Uwaga: moesz uy y jako operatora; yw kopiuje jeden wyraz. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.5.: USTAWIANIE OPCJI + Lekcja 1.6.5.: USTAWIANIE OPCJI ** Ustawianie opcji tak, by szukaj lub substytucja ignoroway wielko liter ** @@ -831,7 +831,7 @@ Uwaga: Aby usun podwietlanie dopasowa, wpisz: :nohlsearch Uwaga: Aby ignorowa wielko liter dla jednego wyszukiwania: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 6. PODSUMOWANIE + LEKCJA 1.6. PODSUMOWANIE 1. Wpisanie o otwiera lini PONIEJ kursora. @@ -856,7 +856,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 7.1. JAK UZYSKA POMOC? + LEKCJA 1.7.1.: JAK UZYSKA POMOC? ** Uycie systemu pomocy on-line ** @@ -878,7 +878,7 @@ :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 7.2. TWORZENIE SKRYPTU STARTOWEGO + LEKCJA 1.7.2.: TWORZENIE SKRYPTU STARTOWEGO ** Wcz moliwoci Vima ** @@ -900,7 +900,7 @@ Aby uzyska wicej informacji, wpisz :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 7.3.: UZUPENIANIE + Lekcja 1.7.3.: UZUPENIANIE ** Uzupenianie linii polece z CTRL-D i ** @@ -922,7 +922,7 @@ UWAGA: Uzupenianie dziaa dla wielu polece. Sprbuj wcisn CTRL-D i . Uyteczne zwaszcza przy :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 7. PODSUMOWANIE + Lekcja 1.7. PODSUMOWANIE 1. Wpisz :help albo wcinij lub aby otworzy okno pomocy. diff --git a/usr/share/vim/vim91/tutor/tutor.pl.cp1250 b/usr/share/vim/vim91/tutor/tutor1.pl.cp1250 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.pl.cp1250 rename to usr/share/vim/vim91/tutor/tutor1.pl.cp1250 index 129f8ec4f51..f8f5012ac00 100644 --- a/usr/share/vim/vim91/tutor/tutor.pl.cp1250 +++ b/usr/share/vim/vim91/tutor/tutor1.pl.cp1250 @@ -21,10 +21,10 @@ polece! Teraz upewnij si, e nie masz wcinitego Caps Locka i wciskaj j - tak dugo dopki Lekcja 1.1. nie wypeni cakowicie ekranu. + tak dugo dopki Lekcja 1.1.1. nie wypeni cakowicie ekranu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.1.: PORUSZANIE SI KURSOREM + Lekcja 1.1.1.: PORUSZANIE SI KURSOREM ** By wykona ruch kursorem, wcinij h, j, k, l jak pokazano. ** @@ -48,7 +48,7 @@ Uwaga: Klawisze kursora tak Naprawd! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.2.: WYCHODZENIE Z VIM-a + Lekcja 1.1.2.: WYCHODZENIE Z VIM-a !! UWAGA: Przed wykonaniem jakiegokolwiek polecenia przeczytaj ca lekcj !! @@ -67,11 +67,11 @@ Uwaga: Klawisze kursora tak UWAGA: :q! porzuca wszelkie zmiany jakie zrobie. W nastpnych lekcjach dowiesz si jak je zapamitywa. - 5. Przenie kursor do lekcji 1.3. + 5. Przenie kursor do lekcji 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.3.: EDYCJA TEKSTU - KASOWANIE + Lekcja 1.1.3.: EDYCJA TEKSTU - KASOWANIE ** Wcinij x aby usun znak pod kursorem. ** @@ -85,7 +85,7 @@ UWAGA: :q! porzuca wszelkie zmiany jakie zrobi ---> Kkrowa prrzeskoczya prrzez ksiiycc. - 5. Teraz, kiedy zdanie jest poprawione, przejd do Lekcji 1.4. + 5. Teraz, kiedy zdanie jest poprawione, przejd do Lekcji 1.1.4. UWAGA: Ucz si przez wiczenie, nie wkuwanie. @@ -94,7 +94,7 @@ UWAGA: Ucz si ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) + Lekcja 1.1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) ** Wcinij i aby wstawi tekst. ** @@ -117,7 +117,7 @@ UWAGA: Ucz si ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) + Lekcja 1.1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) ** Wcinij A by doda tekst. ** @@ -137,16 +137,16 @@ UWAGA: Ucz si ---> Tu te troch bra Tu te troch brakuje. - 5. Kiedy ju utrwalie wiczenie, przejd do lekcji 1.6. + 5. Kiedy ju utrwalie wiczenie, przejd do lekcji 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.6.: EDYCJA PLIKU + Lekcja 1.1.6.: EDYCJA PLIKU ** Uyj :wq aby zapisa plik i wyj. ** !! UWAGA: zanim wykonasz jakiekolwiek polecenia przeczytaj ca lekcj !! - 1. Zakocz tutorial tak jak w lekcji 1.2.: :q! + 1. Zakocz tutorial tak jak w lekcji 1.1.2.: :q! lub, jeli masz dostp do innego terminala, wykonaj kolejne kroki tam. 2. W powoce wydaj polecenie: vim tutor @@ -163,7 +163,7 @@ UWAGA: Ucz si 6. Po przeczytaniu wszystkich krokw i ich zrozumieniu: wykonaj je. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 1. PODSUMOWANIE + LEKCJA 1.1. PODSUMOWANIE 1. Poruszasz kursorem uywajc "strzaek" i klawiszy hjkl . h (w lewo) j (w d) k (do gry) l (w prawo) @@ -184,9 +184,9 @@ UWAGA: Ucz si UWAGA: Wcinicie przeniesie Ci z powrotem do trybu Normal lub odwoa niechciane lub czciowo wprowadzone polecenia. -Teraz moemy kontynuowa i przej do Lekcji 2. +Teraz moemy kontynuowa i przej do Lekcji 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.1.: POLECENIE DELETE (usuwanie) + Lekcja 1.2.1.: POLECENIE DELETE (usuwanie) ** Wpisz dw by usun wyraz. ** @@ -206,10 +206,10 @@ Teraz mo ---> Jest tu par papier wyrazw, ktre kamie nie nale do noyce tego zdania. 5. Powtarzaj kroki 3. i 4. dopki zdanie nie bdzie poprawne, potem - przejd do Lekcji 2.2. + przejd do Lekcji 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.2.: WICEJ POLECE USUWAJCYCH + Lekcja 1.2.2.: WICEJ POLECE USUWAJCYCH ** Wpisz d$ aby usun tekst do koca linii. ** @@ -225,14 +225,14 @@ Teraz mo ---> Kto wpisa koniec tego zdania dwukrotnie. zdania dwukrotnie. - 5. Przejd do Lekcji 2.3., by zrozumie co si stao. + 5. Przejd do Lekcji 1.2.3., by zrozumie co si stao. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.3.: O OPERATORACH I RUCHACH + Lekcja 1.2.3.: O OPERATORACH I RUCHACH Wiele polece zmieniajcych tekst jest zoonych z operatora i ruchu. @@ -255,7 +255,7 @@ UWAGA: Wpisanie tylko ruchu w trybie Normal bez operatora przeniesie kursor tak, jak to okrelono. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.4.: UYCIE MNONIKA DLA RUCHU + Lekcja 1.2.4.: UYCIE MNONIKA DLA RUCHU ** Wpisanie liczby przed ruchem powtarza ruch odpowiedni ilo razy. ** @@ -273,12 +273,12 @@ UWAGA: Wpisanie tylko ruchu w trybie Normal bez operatora przeniesie kursor ---> To jest zwyky wiersz z wyrazami, po ktrych moesz si porusza. - 6. Przejd do lekcji 2.5. + 6. Przejd do lekcji 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.5.: UYCIE MNONIKA, BY WICEJ USUN + Lekcja 1.2.5.: UYCIE MNONIKA, BY WICEJ USUN ** Wpisanie liczby z operatorem powtarza go odpowiedni ilo razy. ** @@ -301,7 +301,7 @@ UWAGA: Mno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.6.: OPEROWANIE NA LINIACH + Lekcja 1.2.6.: OPEROWANIE NA LINIACH ** Wpisz dd aby usun ca lini. ** @@ -324,7 +324,7 @@ UWAGA: Mno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.7.: POLECENIE UNDO (cofnij) + Lekcja 1.2.7.: POLECENIE UNDO (cofnij) ** Wcinij u aby cofn skutki ostatniego polecenia. @@ -344,10 +344,10 @@ UWAGA: Mno 8. To s bardzo poyteczne polecenia. - Przejd teraz do podsumowania Lekcji 2. + Przejd teraz do podsumowania Lekcji 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 2. PODSUMOWANIE + LEKCJA 1.2. PODSUMOWANIE 1. By usun znaki od kursora do nastpnego wyrazu, wpisz: dw @@ -370,7 +370,7 @@ UWAGA: Mno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.1.: POLECENIE PUT (wstaw) + Lekcja 1.3.1.: POLECENIE PUT (wstaw) ** Wpisz p by wstawi ostatnie usunicia za kursorem. ** @@ -393,7 +393,7 @@ UWAGA: Mno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.2.: POLECENIE REPLACE (zastp) + Lekcja 1.3.2.: POLECENIE REPLACE (zastp) ** Wpisz rx aby zastpi znak pod kursorem na x . ** @@ -409,14 +409,14 @@ UWAGA: Mno ---> Kjedy ten wiersz bi wstkiwany, kto wcizn per zych klawirzy! ---> Kiedy ten wiersz by wstukiwany, kto wcisn par zych klawiszy! - 5. Teraz czas na Lekcj 3.3. + 5. Teraz czas na Lekcj 1.3.3. UWAGA: Pamitaj, by uczy si wiczc, a nie pamiciowo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.3.: OPERATOR CHANGE (zmie) + Lekcja 1.3.3.: OPERATOR CHANGE (zmie) ** By zmieni do koca wyrazu, wpisz ce . ** @@ -439,7 +439,7 @@ UWAGA: Pami ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.4.: WICEJ ZMIAN UYWAJC c + Lekcja 1.3.4.: WICEJ ZMIAN UYWAJC c ** Polecenie change uywa takich samych ruchw, jak delete. ** @@ -462,7 +462,7 @@ UWAGA: Pami UWAGA: Moesz uywa aby poprawia bdy w czasie pisania. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 3. PODSUMOWANIE + LEKCJA 1.3. PODSUMOWANIE 1. Aby wstawi tekst, ktry zosta wczeniej usunity wcinij p . To @@ -485,7 +485,7 @@ UWAGA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.1.: POOENIE KURSORA ORAZ STATUS PLIKU + Lekcja 1.4.1.: POOENIE KURSORA ORAZ STATUS PLIKU ** Nacinij CTRL-G aby zobaczy swoje pooenie w pliku i status pliku. Nacinij G aby przej do linii w pliku. ** @@ -508,7 +508,7 @@ UWAGA: Mo 4. Jeli czujesz si wystarczajco pewnie, wykonaj kroki 1-3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.2.: POLECENIE SZUKAJ + Lekcja 1.4.2.: POLECENIE SZUKAJ ** Wpisz / a nastpnie wyraenie, aby je znale. ** @@ -531,7 +531,7 @@ Uwaga: Kiedy szukanie osi o ile opcja 'wrapscan' nie zostaa przestawiona. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.3.: W POSZUKIWANIU PARUJCYCH NAWIASW + Lekcja 1.4.3.: W POSZUKIWANIU PARUJCYCH NAWIASW ** Wpisz % by znale parujcy ), ], lub } . ** @@ -554,7 +554,7 @@ Uwaga: Ta funkcja jest bardzo u ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.4.: POLECENIE SUBSTITUTE (zamiana) + Lekcja 1.4.4.: POLECENIE SUBSTITUTE (zamiana) ** Wpisz :s/stary/nowy/g aby zamieni 'stary' na 'nowy'. ** @@ -577,7 +577,7 @@ Uwaga: Ta funkcja jest bardzo u pliku, proszc o potwierdzenie za kadym razem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 4. PODSUMOWANIE + LEKCJA 1.4. PODSUMOWANIE 1. CTRL-G pokae Twoj pozycj w pliku i status pliku. SHIFT-G przenosi Ci do koca pliku. @@ -600,7 +600,7 @@ Uwaga: Ta funkcja jest bardzo u By zamieni wszystkie wystpienia w pliku, wpisz :%s/stary/nowy/g By Vim prosi Ci o potwierdzenie, dodaj 'c' :%s/stary/nowy/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.1.: JAK WYKONA POLECENIA ZEWNTRZNE? + Lekcja 1.5.1.: JAK WYKONA POLECENIA ZEWNTRZNE? ** Wpisz :! a nastpnie zewntrzne polecenie, by je wykona. ** @@ -623,7 +623,7 @@ Uwaga: Wszystkie polecenia : musz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.2.: WICEJ O ZAPISYWANIU PLIKW + Lekcja 1.5.2.: WICEJ O ZAPISYWANIU PLIKW ** By zachowa zmiany w tekcie, wpisz :w NAZWA_PLIKU . ** @@ -646,7 +646,7 @@ Uwaga: Zauwa lub (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.3.: WYBRANIE TEKSTU DO ZAPISU + Lekcja 1.5.3.: WYBRANIE TEKSTU DO ZAPISU ** By zachowa cz pliku, wpisz v ruch :w NAZWA_PLIKU ** @@ -669,14 +669,14 @@ UWAGA: Wci z tekstem. Na przykad d usuwa tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.4.: WSTAWIANIE I CZENIE PLIKW + Lekcja 1.5.4.: WSTAWIANIE I CZENIE PLIKW ** By wstawi zawarto pliku, wpisz :r NAZWA_PLIKU ** 1. Umie kursor tu powyej tej linii. -UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejd +UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 1.5.3. Potem przejd do DOU, by zobaczy ponownie t lekcj. 2. Teraz wczytaj plik TEST uywajc polecenia :r TEST , gdzie TEST @@ -684,7 +684,7 @@ UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejd Wczytany plik jest umieszczony poniej linii z kursorem. 3. By sprawdzi czy plik zosta wczytany, cofnij kursor i zobacz, e - teraz s dwie kopie Lekcji 5.3., orygina i kopia z pliku. + teraz s dwie kopie Lekcji 1.5.3., orygina i kopia z pliku. UWAGA: Moesz te wczyta wyjcie zewntrznego polecenia. Na przykad :r !ls wczytuje wyjcie polecenia ls i umieszcza je pod poniej @@ -692,7 +692,7 @@ UWAGA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 5. PODSUMOWANIE + LEKCJA 1.5. PODSUMOWANIE 1. :!polecenie wykonuje polecenie zewntrzne. @@ -715,7 +715,7 @@ UWAGA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.1.: POLECENIE OPEN (otwrz) + Lekcja 1.6.1.: POLECENIE OPEN (otwrz) ** Wpisz o by otworzy lini poniej kursora i przenie si do @@ -738,7 +738,7 @@ UWAGA: Mo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.2.: POLECENIE APPEND (dodaj) + Lekcja 1.6.2.: POLECENIE APPEND (dodaj) ** Wpisz a by doda tekst ZA kursorem. ** @@ -761,7 +761,7 @@ UWAGA: Mo Uwaga: a , i oraz A prowadz do trybu Insert, jedyn rnic jest miejsce, gdzie nowe znaki bd dodawane. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.3.: INNA WERSJA REPLACE (zamiana) + Lekcja 1.6.3.: INNA WERSJA REPLACE (zamiana) ** Wpisz wielkie R by zamieni wicej ni jeden znak. ** @@ -784,7 +784,7 @@ UWAGA: Tryb Replace jest jak tryb Insert, ale ka znak. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.4.: KOPIOWANIE I WKLEJANIE TEKSTU + Lekcja 1.6.4.: KOPIOWANIE I WKLEJANIE TEKSTU ** uyj operatora y aby skopiowa tekst i p aby go wklei ** @@ -807,7 +807,7 @@ UWAGA: Tryb Replace jest jak tryb Insert, ale ka Uwaga: moesz uy y jako operatora; yw kopiuje jeden wyraz. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.5.: USTAWIANIE OPCJI + Lekcja 1.6.5.: USTAWIANIE OPCJI ** Ustawianie opcji tak, by szukaj lub substytucja ignoroway wielko liter ** @@ -831,7 +831,7 @@ Uwaga: mo Uwaga: Aby usun podwietlanie dopasowa, wpisz: :nohlsearch Uwaga: Aby ignorowa wielko liter dla jednego wyszukiwania: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 6. PODSUMOWANIE + LEKCJA 1.6. PODSUMOWANIE 1. Wpisanie o otwiera lini PONIEJ kursora. @@ -856,7 +856,7 @@ Uwaga: Aby ignorowa ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 7.1. JAK UZYSKA POMOC? + LEKCJA 1.7.1.: JAK UZYSKA POMOC? ** Uycie systemu pomocy on-line ** @@ -878,7 +878,7 @@ Uwaga: Aby ignorowa :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 7.2. TWORZENIE SKRYPTU STARTOWEGO + LEKCJA 1.7.2.: TWORZENIE SKRYPTU STARTOWEGO ** Wcz moliwoci Vima ** @@ -900,7 +900,7 @@ Uwaga: Aby ignorowa Aby uzyska wicej informacji, wpisz :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 7.3.: UZUPENIANIE + Lekcja 1.7.3.: UZUPENIANIE ** Uzupenianie linii polece z CTRL-D i ** @@ -922,7 +922,7 @@ Uwaga: Aby ignorowa UWAGA: Uzupenianie dziaa dla wielu polece. Sprbuj wcisn CTRL-D i . Uyteczne zwaszcza przy :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 7. PODSUMOWANIE + Lekcja 1.7. PODSUMOWANIE 1. Wpisz :help albo wcinij lub aby otworzy okno pomocy. diff --git a/usr/share/vim/vim91/tutor/tutor.pl.utf-8 b/usr/share/vim/vim91/tutor/tutor1.pl.utf-8 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.pl.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.pl.utf-8 index 7856837b65a..cd3d5bd3541 100644 --- a/usr/share/vim/vim91/tutor/tutor.pl.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.pl.utf-8 @@ -21,10 +21,10 @@ poleceń! Teraz upewnij się, że nie masz wciśniętego Caps Locka i wciskaj j - tak długo dopóki Lekcja 1.1. nie wypełni całkowicie ekranu. + tak długo dopóki Lekcja 1.1.1. nie wypełni całkowicie ekranu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.1.: PORUSZANIE SIĘ KURSOREM + Lekcja 1.1.1.: PORUSZANIE SIĘ KURSOREM ** By wykonać ruch kursorem, wciśnij h, j, k, l jak pokazano. ** @@ -48,7 +48,7 @@ Uwaga: Klawisze kursora także powinny działać, ale używając hjkl będzies Naprawdę! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.2.: WYCHODZENIE Z VIM-a + Lekcja 1.1.2.: WYCHODZENIE Z VIM-a !! UWAGA: Przed wykonaniem jakiegokolwiek polecenia przeczytaj całą lekcję !! @@ -67,11 +67,11 @@ Uwaga: Klawisze kursora także powinny działać, ale używając hjkl będzies UWAGA: :q! porzuca wszelkie zmiany jakie zrobiłeś. W następnych lekcjach dowiesz się jak je zapamiętywać. - 5. Przenieś kursor do lekcji 1.3. + 5. Przenieś kursor do lekcji 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.3.: EDYCJA TEKSTU - KASOWANIE + Lekcja 1.1.3.: EDYCJA TEKSTU - KASOWANIE ** Wciśnij x aby usunąć znak pod kursorem. ** @@ -85,7 +85,7 @@ UWAGA: :q! porzuca wszelkie zmiany jakie zrobiłeś. W następnych ---> Kkrowa prrzeskoczyła prrzez ksiiężycc. - 5. Teraz, kiedy zdanie jest poprawione, przejdź do Lekcji 1.4. + 5. Teraz, kiedy zdanie jest poprawione, przejdź do Lekcji 1.1.4. UWAGA: Ucz się przez ćwiczenie, nie wkuwanie. @@ -94,7 +94,7 @@ UWAGA: Ucz się przez ćwiczenie, nie wkuwanie. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) + Lekcja 1.1.4.: EDYCJA TEKSTU - INSERT (wprowadzanie) ** Wciśnij i aby wstawić tekst. ** @@ -117,7 +117,7 @@ UWAGA: Ucz się przez ćwiczenie, nie wkuwanie. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) + Lekcja 1.1.5.: EDYCJA TEKSTU - APPENDING (dodawanie) ** Wciśnij A by dodać tekst. ** @@ -137,16 +137,16 @@ UWAGA: Ucz się przez ćwiczenie, nie wkuwanie. ---> Tu też trochę bra Tu też trochę brakuje. - 5. Kiedy już utrwaliłeś ćwiczenie, przejdź do lekcji 1.6. + 5. Kiedy już utrwaliłeś ćwiczenie, przejdź do lekcji 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 1.6.: EDYCJA PLIKU + Lekcja 1.1.6.: EDYCJA PLIKU ** Użyj :wq aby zapisać plik i wyjść. ** !! UWAGA: zanim wykonasz jakiekolwiek polecenia przeczytaj całą lekcję !! - 1. Zakończ tutorial tak jak w lekcji 1.2.: :q! + 1. Zakończ tutorial tak jak w lekcji 1.1.2.: :q! lub, jeśli masz dostęp do innego terminala, wykonaj kolejne kroki tam. 2. W powłoce wydaj polecenie: vim tutor @@ -163,7 +163,7 @@ UWAGA: Ucz się przez ćwiczenie, nie wkuwanie. 6. Po przeczytaniu wszystkich kroków i ich zrozumieniu: wykonaj je. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 1. PODSUMOWANIE + LEKCJA 1.1. PODSUMOWANIE 1. Poruszasz kursorem używając "strzałek" i klawiszy hjkl . h (w lewo) j (w dół) k (do góry) l (w prawo) @@ -184,9 +184,9 @@ UWAGA: Ucz się przez ćwiczenie, nie wkuwanie. UWAGA: Wciśnięcie przeniesie Cię z powrotem do trybu Normal lub odwoła niechciane lub częściowo wprowadzone polecenia. -Teraz możemy kontynuować i przejść do Lekcji 2. +Teraz możemy kontynuować i przejść do Lekcji 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.1.: POLECENIE DELETE (usuwanie) + Lekcja 1.2.1.: POLECENIE DELETE (usuwanie) ** Wpisz dw by usunąć wyraz. ** @@ -206,10 +206,10 @@ Teraz możemy kontynuować i przejść do Lekcji 2. ---> Jest tu parę papier wyrazów, które kamień nie należą do nożyce tego zdania. 5. Powtarzaj kroki 3. i 4. dopóki zdanie nie będzie poprawne, potem - przejdź do Lekcji 2.2. + przejdź do Lekcji 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.2.: WIĘCEJ POLECEŃ USUWAJĄCYCH + Lekcja 1.2.2.: WIĘCEJ POLECEŃ USUWAJĄCYCH ** Wpisz d$ aby usunąć tekst do końca linii. ** @@ -225,14 +225,14 @@ Teraz możemy kontynuować i przejść do Lekcji 2. ---> Ktoś wpisał koniec tego zdania dwukrotnie. zdania dwukrotnie. - 5. Przejdź do Lekcji 2.3., by zrozumieć co się stało. + 5. Przejdź do Lekcji 1.2.3., by zrozumieć co się stało. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.3.: O OPERATORACH I RUCHACH + Lekcja 1.2.3.: O OPERATORACH I RUCHACH Wiele poleceń zmieniających tekst jest złożonych z operatora i ruchu. @@ -255,7 +255,7 @@ UWAGA: Wpisanie tylko ruchu w trybie Normal bez operatora przeniesie kursor tak, jak to określono. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.4.: UŻYCIE MNOŻNIKA DLA RUCHU + Lekcja 1.2.4.: UŻYCIE MNOŻNIKA DLA RUCHU ** Wpisanie liczby przed ruchem powtarza ruch odpowiednią ilość razy. ** @@ -273,12 +273,12 @@ UWAGA: Wpisanie tylko ruchu w trybie Normal bez operatora przeniesie kursor ---> To jest zwykły wiersz z wyrazami, po których możesz się poruszać. - 6. Przejdź do lekcji 2.5. + 6. Przejdź do lekcji 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.5.: UŻYCIE MNOŻNIKA, BY WIĘCEJ USUNĄĆ + Lekcja 1.2.5.: UŻYCIE MNOŻNIKA, BY WIĘCEJ USUNĄĆ ** Wpisanie liczby z operatorem powtarza go odpowiednią ilość razy. ** @@ -301,7 +301,7 @@ UWAGA: Mnożnik pomiędzy operatorem d i ruchem działa podobnie do ruchu bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.6.: OPEROWANIE NA LINIACH + Lekcja 1.2.6.: OPEROWANIE NA LINIACH ** Wpisz dd aby usunąć całą linię. ** @@ -324,7 +324,7 @@ UWAGA: Mnożnik pomiędzy operatorem d i ruchem działa podobnie do ruchu bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 2.7.: POLECENIE UNDO (cofnij) + Lekcja 1.2.7.: POLECENIE UNDO (cofnij) ** Wciśnij u aby cofnąć skutki ostatniego polecenia. @@ -344,10 +344,10 @@ UWAGA: Mnożnik pomiędzy operatorem d i ruchem działa podobnie do ruchu bez 8. To są bardzo pożyteczne polecenia. - Przejdź teraz do podsumowania Lekcji 2. + Przejdź teraz do podsumowania Lekcji 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 2. PODSUMOWANIE + LEKCJA 1.2. PODSUMOWANIE 1. By usunąć znaki od kursora do następnego wyrazu, wpisz: dw @@ -370,7 +370,7 @@ UWAGA: Mnożnik pomiędzy operatorem d i ruchem działa podobnie do ruchu bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.1.: POLECENIE PUT (wstaw) + Lekcja 1.3.1.: POLECENIE PUT (wstaw) ** Wpisz p by wstawić ostatnie usunięcia za kursorem. ** @@ -393,7 +393,7 @@ UWAGA: Mnożnik pomiędzy operatorem d i ruchem działa podobnie do ruchu bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.2.: POLECENIE REPLACE (zastąp) + Lekcja 1.3.2.: POLECENIE REPLACE (zastąp) ** Wpisz rx aby zastąpić znak pod kursorem na x . ** @@ -409,14 +409,14 @@ UWAGA: Mnożnik pomiędzy operatorem d i ruchem działa podobnie do ruchu bez ---> Kjedy ten wiersz bił wstókiwany, ktoś wciznął perę złych klawirzy! ---> Kiedy ten wiersz był wstukiwany, ktoś wcisnął parę złych klawiszy! - 5. Teraz czas na Lekcję 3.3. + 5. Teraz czas na Lekcję 1.3.3. UWAGA: Pamiętaj, by uczyć się ćwicząc, a nie pamięciowo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.3.: OPERATOR CHANGE (zmień) + Lekcja 1.3.3.: OPERATOR CHANGE (zmień) ** By zmienić do końca wyrazu, wpisz ce . ** @@ -439,7 +439,7 @@ UWAGA: Pamiętaj, by uczyć się ćwicząc, a nie pamięciowo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 3.4.: WIĘCEJ ZMIAN UŻYWAJĄC c + Lekcja 1.3.4.: WIĘCEJ ZMIAN UŻYWAJĄC c ** Polecenie change używa takich samych ruchów, jak delete. ** @@ -462,7 +462,7 @@ UWAGA: Pamiętaj, by uczyć się ćwicząc, a nie pamięciowo. UWAGA: Możesz używać aby poprawiać błędy w czasie pisania. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 3. PODSUMOWANIE + LEKCJA 1.3. PODSUMOWANIE 1. Aby wstawić tekst, który został wcześniej usunięty wciśnij p . To @@ -485,7 +485,7 @@ UWAGA: Możesz używać aby poprawiać błędy w czasie pisania. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.1.: POŁOŻENIE KURSORA ORAZ STATUS PLIKU + Lekcja 1.4.1.: POŁOŻENIE KURSORA ORAZ STATUS PLIKU ** Naciśnij CTRL-G aby zobaczyć swoje położenie w pliku i status pliku. Naciśnij G aby przejść do linii w pliku. ** @@ -508,7 +508,7 @@ UWAGA: Możesz też zobaczyć pozycję kursora w prawym, dolnym rogu ekranu. 4. Jeśli czujesz się wystarczająco pewnie, wykonaj kroki 1-3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.2.: POLECENIE SZUKAJ + Lekcja 1.4.2.: POLECENIE SZUKAJ ** Wpisz / a następnie wyrażenie, aby je znaleźć. ** @@ -531,7 +531,7 @@ Uwaga: Kiedy szukanie osiągnie koniec pliku, będzie kontynuowane od początku o ile opcja 'wrapscan' nie została przestawiona. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.3.: W POSZUKIWANIU PARUJĄCYCH NAWIASÓW + Lekcja 1.4.3.: W POSZUKIWANIU PARUJĄCYCH NAWIASÓW ** Wpisz % by znaleźć parujący ), ], lub } . ** @@ -554,7 +554,7 @@ Uwaga: Ta funkcja jest bardzo użyteczna w debuggowaniu programu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 4.4.: POLECENIE SUBSTITUTE (zamiana) + Lekcja 1.4.4.: POLECENIE SUBSTITUTE (zamiana) ** Wpisz :s/stary/nowy/g aby zamienić 'stary' na 'nowy'. ** @@ -577,7 +577,7 @@ Uwaga: Ta funkcja jest bardzo użyteczna w debuggowaniu programu pliku, prosząc o potwierdzenie za każdym razem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 4. PODSUMOWANIE + LEKCJA 1.4. PODSUMOWANIE 1. CTRL-G pokaże Twoją pozycję w pliku i status pliku. SHIFT-G przenosi Cię do końca pliku. @@ -600,7 +600,7 @@ Uwaga: Ta funkcja jest bardzo użyteczna w debuggowaniu programu By zamienić wszystkie wystąpienia w pliku, wpisz :%s/stary/nowy/g By Vim prosił Cię o potwierdzenie, dodaj 'c' :%s/stary/nowy/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.1.: JAK WYKONAĆ POLECENIA ZEWNĘTRZNE? + Lekcja 1.5.1.: JAK WYKONAĆ POLECENIA ZEWNĘTRZNE? ** Wpisz :! a następnie zewnętrzne polecenie, by je wykonać. ** @@ -623,7 +623,7 @@ Uwaga: Wszystkie polecenia : muszą być zakończone . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.2.: WIĘCEJ O ZAPISYWANIU PLIKÓW + Lekcja 1.5.2.: WIĘCEJ O ZAPISYWANIU PLIKÓW ** By zachować zmiany w tekście, wpisz :w NAZWA_PLIKU . ** @@ -646,7 +646,7 @@ Uwaga: Zauważ, że gdybyś teraz wyszedł z Vima, a następnie wszedł ponownie lub (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.3.: WYBRANIE TEKSTU DO ZAPISU + Lekcja 1.5.3.: WYBRANIE TEKSTU DO ZAPISU ** By zachować część pliku, wpisz v ruch :w NAZWA_PLIKU ** @@ -669,14 +669,14 @@ UWAGA: Wciśnięcie v zaczyna tryb Wizualny. Możesz poruszać kursorem, by z tekstem. Na przykład d usuwa tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 5.4.: WSTAWIANIE I ŁĄCZENIE PLIKÓW + Lekcja 1.5.4.: WSTAWIANIE I ŁĄCZENIE PLIKÓW ** By wstawić zawartość pliku, wpisz :r NAZWA_PLIKU ** 1. Umieść kursor tuż powyżej tej linii. -UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejdź +UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 1.5.3. Potem przejdź do DOŁU, by zobaczyć ponownie tę lekcję. 2. Teraz wczytaj plik TEST używając polecenia :r TEST , gdzie TEST @@ -684,7 +684,7 @@ UWAGA: Po wykonaniu kroku 2. zobaczysz tekst z Lekcji 5.3. Potem przejdź Wczytany plik jest umieszczony poniżej linii z kursorem. 3. By sprawdzić czy plik został wczytany, cofnij kursor i zobacz, że - teraz są dwie kopie Lekcji 5.3., oryginał i kopia z pliku. + teraz są dwie kopie Lekcji 1.5.3., oryginał i kopia z pliku. UWAGA: Możesz też wczytać wyjście zewnętrznego polecenia. Na przykład :r !ls wczytuje wyjście polecenia ls i umieszcza je pod poniżej @@ -692,7 +692,7 @@ UWAGA: Możesz też wczytać wyjście zewnętrznego polecenia. Na przykład ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 5. PODSUMOWANIE + LEKCJA 1.5. PODSUMOWANIE 1. :!polecenie wykonuje polecenie zewnętrzne. @@ -715,7 +715,7 @@ UWAGA: Możesz też wczytać wyjście zewnętrznego polecenia. Na przykład ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.1.: POLECENIE OPEN (otwórz) + Lekcja 1.6.1.: POLECENIE OPEN (otwórz) ** Wpisz o by otworzyć linię poniżej kursora i przenieść się do @@ -738,7 +738,7 @@ UWAGA: Możesz też wczytać wyjście zewnętrznego polecenia. Na przykład ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.2.: POLECENIE APPEND (dodaj) + Lekcja 1.6.2.: POLECENIE APPEND (dodaj) ** Wpisz a by dodać tekst ZA kursorem. ** @@ -761,7 +761,7 @@ UWAGA: Możesz też wczytać wyjście zewnętrznego polecenia. Na przykład Uwaga: a , i oraz A prowadzą do trybu Insert, jedyną różnicą jest miejsce, gdzie nowe znaki będą dodawane. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.3.: INNA WERSJA REPLACE (zamiana) + Lekcja 1.6.3.: INNA WERSJA REPLACE (zamiana) ** Wpisz wielkie R by zamienić więcej niż jeden znak. ** @@ -784,7 +784,7 @@ UWAGA: Tryb Replace jest jak tryb Insert, ale każdy znak usuwa istniejący znak. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.4.: KOPIOWANIE I WKLEJANIE TEKSTU + Lekcja 1.6.4.: KOPIOWANIE I WKLEJANIE TEKSTU ** użyj operatora y aby skopiować tekst i p aby go wkleić ** @@ -807,7 +807,7 @@ UWAGA: Tryb Replace jest jak tryb Insert, ale każdy znak usuwa istniejący Uwaga: możesz użyć y jako operatora; yw kopiuje jeden wyraz. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 6.5.: USTAWIANIE OPCJI + Lekcja 1.6.5.: USTAWIANIE OPCJI ** Ustawianie opcji tak, by szukaj lub substytucja ignorowały wielkość liter ** @@ -831,7 +831,7 @@ Uwaga: możesz użyć y jako operatora; yw kopiuje jeden wyraz. Uwaga: Aby usunąć podświetlanie dopasowań, wpisz: :nohlsearch Uwaga: Aby ignorować wielkość liter dla jednego wyszukiwania: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCJA 6. PODSUMOWANIE + LEKCJA 1.6. PODSUMOWANIE 1. Wpisanie o otwiera linię PONIŻEJ kursora. @@ -856,7 +856,7 @@ Uwaga: Aby ignorować wielkość liter dla jednego wyszukiwania: /ignore\c ** @@ -922,7 +922,7 @@ Uwaga: Aby ignorować wielkość liter dla jednego wyszukiwania: /ignore\c. Użyteczne zwłaszcza przy :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcja 7. PODSUMOWANIE + Lekcja 1.7. PODSUMOWANIE 1. Wpisz :help albo wciśnij lub aby otworzyć okno pomocy. diff --git a/usr/share/vim/vim91/tutor/tutor.pt b/usr/share/vim/vim91/tutor/tutor1.pt similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.pt rename to usr/share/vim/vim91/tutor/tutor1.pt index 5735c09dc97..d3dcb05e158 100644 --- a/usr/share/vim/vim91/tutor/tutor.pt +++ b/usr/share/vim/vim91/tutor/tutor1.pt @@ -22,9 +22,9 @@ Agora, certifique-se de que sua tecla Shift-Lock (ou Caps Lock) no esteja ativada e pressione a tecla j o bastante para mover o cursor at que a - Lio 1.1 aparea inteiramente na tela. + Lio 1.1.1 aparea inteiramente na tela. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 1.1: MOVER O CURSOR + Lio 1.1.1: MOVER O CURSOR ** Para mover o cursor, pressione as teclas h,j,k,l conforme indicado. ** @@ -38,7 +38,7 @@ 2. Segure pressionada a tecla (j) at haver repetio. Agora voc j sabe como ir para a prxima lio. - 3. Usando a tecla j, v para a Lio 1.2. + 3. Usando a tecla j, v para a Lio 1.1.2. NOTA: Se est inseguro sobre o que digitou, pressione para coloc-lo no modo Normal. Ento redigite o comando que queria. @@ -47,7 +47,7 @@ NOTA: As teclas de cursor funcionam tamb esteja acostumado, voc poder se mover muito mais rapidamente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 1.2: SAIR DO VIM + Lio 1.1.2: SAIR DO VIM !! NOTA: Antes de executar quaisquer dos passos abaixo, leia a lio inteira !! @@ -66,10 +66,10 @@ NOTA: As teclas de cursor funcionam tamb NOTA: :q! descarta qualquer mudana. Em uma prxima lio ser ensinado como salvar as mudanas feitas em um arquivo. - 5. Desa o cursor at a Lio 1.3. + 5. Desa o cursor at a Lio 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 1.3: EDITAR TEXTOS - REMOO + Lio 1.1.3: EDITAR TEXTOS - REMOO ** Pressione x para deletar o caractere sob o cursor. ** @@ -85,14 +85,14 @@ NOTA: :q! descarta qualquer mudan ---> A vvaca pullouu por ccimaa dda luuua. - 5. Agora que a frase est correta, prossiga para a Lio 1.4. + 5. Agora que a frase est correta, prossiga para a Lio 1.1.4. NOTA: Enquanto segue este tutorial, no tente memorizar, aprenda pelo uso. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 1.4: EDITAR TEXTOS - INSERO + Lio 1.1.4: EDITAR TEXTOS - INSERO ** Pressione i para inserir texto. ** @@ -111,11 +111,11 @@ NOTA: Enquanto segue este tutorial, n ---> Tem algum texto faltando nesta linha. 5. Quando se sentir vontade com a insero de texto, mova o cursor para - a Lio 1.5. + a Lio 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 1.5: EDITAR TEXTO - ADICIONAR + Lio 1.1.5: EDITAR TEXTO - ADICIONAR ** Pressione A para adicionar texto. ** @@ -134,17 +134,17 @@ NOTA: Enquanto segue este tutorial, n ---> H algum texto faltan H algum texto faltando aqui. - 5. Quando se sentir confortvel adicionando texto, v para a Lio 1.6. + 5. Quando se sentir confortvel adicionando texto, v para a Lio 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 1.6: EDITAR UM ARQUIVO + Lio 1.1.6: EDITAR UM ARQUIVO ** Use :wq para salvar um arquivo e sair. ** !! NOTA: Leia toda a lio antes de executar as instrues!! - 1. Saia deste tutorial como o fez na lio 1.2: :q! + 1. Saia deste tutorial como o fez na lio 1.1.2: :q! Ou, se tiver acesso a outro terminal, faa o seguinte nele. 2. No prompt do shell, digite esse comando: vim tutor @@ -161,7 +161,7 @@ NOTA: Enquanto segue este tutorial, n 6. Aps ler os passos acima e compreend-los, execute-os. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIO 1 + RESUMO DA LIO 1.1 1. O cursor movido usando tanto as teclas de seta quanto as teclas hjkl. h (esquerda) j (para baixo) k (para cima) l (direita) @@ -181,10 +181,10 @@ NOTA: Enquanto segue este tutorial, n NOTA: Pressionando voc ir para o modo Normal ou cancelar um comando ainda incompleto. -Agora continue com a Lio 2. +Agora continue com a Lio 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 2.1: COMANDOS DE REMOO + Lio 1.2.1: COMANDOS DE REMOO ** Digite dw para apagar uma palavra. ** @@ -204,10 +204,10 @@ Agora continue com a Li ---> Tem a algumas oi palavras diverso que no pertencem papel a esta frase. 5. Repita os passos 3 ao 4 at que a frase esteja correta e v para a - Lio 2.2. + Lio 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 2.2: MAIS COMANDOS DE REMOO + Lio 1.2.2: MAIS COMANDOS DE REMOO ** Digite d$ para deletar at o fim da linha. ** @@ -223,14 +223,14 @@ Agora continue com a Li ---> Algum digitou o fim desta linha duas vezes. desta linha duas vezes. - 5. V para a lio 2.3 para entender o funcionamento deste comando. + 5. V para a lio 1.2.3 para entender o funcionamento deste comando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 2.3: SOBRE OPERADORES E MOVIMENTOS + Lio 1.2.3: SOBRE OPERADORES E MOVIMENTOS Muitos comandos que mudam texto so feitos de um operador e de um movimento. O formato para um comando apagar com o operador de remoo d tem a @@ -254,7 +254,7 @@ operador, faz o cursor se mover como especificado na lista de teclas de movimento. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 2.4: USAR UM CONTADOR PARA UM MOVIMENTO + Lio 1.2.4: USAR UM CONTADOR PARA UM MOVIMENTO ** Digitar um nmero antes de um movimento repete-o o tanto de vezes. ** @@ -271,13 +271,13 @@ movimento. ---> Esta uma linha com algumas palavras para permiti-lo fazer movimentos. - 6. V para a Lio 2.5. + 6. V para a Lio 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 2.5: USAR UM CONTADOR PARA APAGAR MAIS + Lio 1.2.5: USAR UM CONTADOR PARA APAGAR MAIS ** Digitar um nmero com um operador repete-o esse nmero de vezes. ** @@ -300,7 +300,7 @@ movimento. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 2.6: TRABALHAR COM LINHAS + Lio 1.2.6: TRABALHAR COM LINHAS ** Digite dd para apagar uma linha inteira. ** @@ -323,7 +323,7 @@ movimento. Notas do tradutor: Lama (mud) em ingls pode significar fofoca, difamao. H rima no texto original. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 2.7: O COMANDO UNDO (DESFAZER) + Lio 1.2.7: O COMANDO UNDO (DESFAZER) ** Pressione u para desfazer os ltimos comandos, U recupera a linha inteira.** @@ -340,13 +340,13 @@ Notas do tradutor: Lama (mud) em ingl ---> Corriija os erros nnesta linha e reetorne-os com undo. - 8. Esses comandos so muito teis. Agora v para o resumo da Lio 2. + 8. Esses comandos so muito teis. Agora v para o resumo da Lio 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIO 2 + RESUMO DA LIO 1.2 1. Para apagar do cursor at a prxima palavra, digite: dw @@ -371,7 +371,7 @@ Notas do tradutor: Lama (mud) em ingl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 3.1: O COMANDO COLAR + Lio 1.3.1: O COMANDO COLAR ** Digite p para colar aps o cursor o que acabou de apagar. ** @@ -394,7 +394,7 @@ Notas do tradutor: Lama (mud) em ingl Nota do tradutor: H rima no original. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 3.2: O COMANDO SUBSTITUIR + Lio 1.3.2: O COMANDO SUBSTITUIR ** Digite rx para substituir o caractere sob o cursor por x . ** @@ -410,14 +410,14 @@ Nota do tradutor: H ---> Quendo este limha foi dugitada, alguem pressioniu algumas teclas erradzs! ---> Quando esta linha foi digitada, algum pressionou algumas teclas erradas! - 5. Agora v para a Lio 3.3. + 5. Agora v para a Lio 1.3.3. NOTA: Lembre-se que voc deve aprender pelo uso, no pela memorizao. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 3.3: O OPERADOR CHANGE (MUDAR) + Lio 1.3.3: O OPERADOR CHANGE (MUDAR) ** Para alterar at o fim de uma palavra, digite ce . ** @@ -440,7 +440,7 @@ de Inser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 3.4: MAIS MUDANAS USANDO c + Lio 1.3.4: MAIS MUDANAS USANDO c ** O operador change usado com os mesmos movimentos que o delete. ** @@ -455,8 +455,8 @@ de Inser 4. Mova o cursor at o primeiro erro. - 5. Digite c$ e digite o resto da segunda para torn-las iguais e - pressione . + 5. Digite c$ e digite o resto da segunda linha para torn-las iguais e + pressione . ---> O fim desta linha precisa de ajuda para ficar igual segunda. ---> O fim desta linha precisa ser corrigido usando o comando c$. @@ -464,7 +464,7 @@ de Inser NOTA: Voc pode usar a tecla Backspace para corrigir erros enquanto digita. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIO 3 + RESUMO DA LIO 1.3 1. Para reinserir um texto que j foi apagado, digite p . Isso coloca o texto @@ -487,7 +487,7 @@ Agora v ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 4.1: LOCALIZAO DO CURSOR E ESTADO DO ARQUIVO + Lio 1.4.1: LOCALIZAO DO CURSOR E ESTADO DO ARQUIVO ** Digite CTRL-G para mostrar sua localizao no arquivo e seu estado. Digite G para mover para uma linha do arquivo. ** @@ -510,7 +510,7 @@ NOTA: A posi 4. Se estiver seguro para faz-los, execute os passos 1 a 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 4.2: O COMANDO BUSCAR + Lio 1.4.2: O COMANDO BUSCAR ** Digite / seguido por uma frase para procurar por ela. ** @@ -534,7 +534,7 @@ NOTA: Quando a busca atinge o fim do arquivo ela continuar menos que a opo 'wrapscan' esteja desativada. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 4.3: BUSCA DE PARNTESES CORRESPONDENTES + Lio 1.4.3: BUSCA DE PARNTESES CORRESPONDENTES ** Digite % para encontrar um ),], ou } correspondente. ** @@ -557,7 +557,7 @@ Nota: Isso ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 4.4: O COMANDO SUBSTITUIR + Lio 1.4.4: O COMANDO SUBSTITUIR ** Digite :s/velho/novo/g para substituir 'velho' por 'novo'. ** @@ -581,7 +581,7 @@ Nota: Isso substituio. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIO 4 + RESUMO DA LIO 1.4 1. CTRL-G mostra em que ponto do arquivo est e o estado dele. @@ -607,7 +607,7 @@ Nota: Isso Para confirmar cada substituio adicione 'c' :%s/velho/novo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 5.1: COMO EXECUTAR UM COMANDO EXTERNO + Lio 1.5.1: COMO EXECUTAR UM COMANDO EXTERNO ** Digite :! seguido por um comando externo para execut-lo. ** @@ -630,7 +630,7 @@ NOTA: Todos os comandos : devem ser finalizados teclando-se ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 5.2: MAIS SOBRE SALVAR ARQUIVOS + Lio 1.5.2: MAIS SOBRE SALVAR ARQUIVOS ** Para salvar as alteraes no texto, digite :w NOMEDOARQUIVO. ** @@ -653,7 +653,7 @@ NOTA: Se sair do Vim e entrar de novo com o nome do arquivo TESTE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 5.3: SELECIONAR O TEXTO A SER SALVO + Lio 1.5.3: SELECIONAR O TEXTO A SER SALVO ** Para salvar parte de um arquivo, digite v movimento :w NOMEDOARQUIVO ** @@ -676,14 +676,14 @@ cursor pela tela para tornar a sele operador para executar alguma ao. Por exemplo, d apaga o texto. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 5.4: RECUPERAR E UNIR ARQUIVOS + Lio 1.5.4: RECUPERAR E UNIR ARQUIVOS ** Para inserir o contedo de um arquivo, digite :r NOMEDOARQUIVO ** 1. Posicione o cursor logo acima desta linha. -NOTA: Depois de executar o Passo 2 voc ver a Lio 5.3. Ento DESA o +NOTA: Depois de executar o Passo 2 voc ver a Lio 1.5.3. Ento DESA o cursor para ver esta lio novamente. 2. Agora recupere o arquivo TESTE usando o comando :r TESTE onde TESTE o @@ -691,7 +691,7 @@ NOTA: Depois de executar o Passo 2 voc O arquivo recuperado colocado abaixo da linha atual do cursor. 3. Para verificar que o arquivo foi recuperado, volte com o cursor e verifique - que agora existem duas cpias da Lio 5.3, a original e a verso do + que agora existem duas cpias da Lio 1.5.3, a original e a verso do arquivo. NOTA: Voc tambm pode ler a sada de um comando externo. Por exemplo, :r !ls @@ -699,7 +699,7 @@ NOTA: Voc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIO 5 + RESUMO DA LIO 1.5 1. :!comando executa um comando externo. @@ -722,7 +722,7 @@ NOTA: Voc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 6.1: O COMANDO ABRIR + Lio 1.6.1: O COMANDO ABRIR ** Digite o para abrir uma linha em baixo do cursor e ir para o modo de Insero. ** @@ -745,7 +745,7 @@ NOTA: Voc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 6.2: O COMANDO ADICIONAR + Lio 1.6.2: O COMANDO ADICIONAR ** Digite a para inserir texto DEPOIS do cursor. ** @@ -768,7 +768,7 @@ NOTA: Voc NOTA: a, i e A levam ao mesmo modo de Insero, a nica diferena onde os caracteres so inseridos. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 6.3: UMA OUTRA VERSO DO SUBSTITUIR + Lio 1.6.3: UMA OUTRA VERSO DO SUBSTITUIR ** Digite um R maisculo para substituir mais de um caractere. ** @@ -791,7 +791,7 @@ NOTA: O modo de Substitui digitado apaga um caractere existente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 6.4: COPIAR E COLAR TEXTO + Lio 1.6.4: COPIAR E COLAR TEXTO ** Use o operador y para copiar texto e p para col-lo. ** @@ -816,7 +816,7 @@ NOTA: Voc palavra. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 6.5: CONFIGURAR PREFERNCIAS + Lio 1.6.5: CONFIGURAR PREFERNCIAS ** Configure uma preferncia de modo que uma busca ou substituio ignore se as letras so maisculas ou minsculas. ** @@ -842,7 +842,7 @@ NOTA: Se quiser ignorar a diferen uma pesquisa, use \c no comando: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIO 6 + RESUMO DA LIO 1.6 1. Digite o para abrir uma linha ABAIXO do cursor e iniciar o modo de Insero. @@ -868,7 +868,7 @@ NOTA: Se quiser ignorar a diferen ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LIO 7.1: OBTENDO AJUDA + LIO 1.7.1: OBTENDO AJUDA ** Use o sistema de ajuda do prprio Vim ** @@ -891,7 +891,7 @@ NOTA: Se quiser ignorar a diferen :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 7.2: CRIAR UM SCRIPT DE INICIALIZAO + Lio 1.7.2: CRIAR UM SCRIPT DE INICIALIZAO ** Habilite recursos do Vim ** @@ -900,11 +900,11 @@ NOTA: Se quiser ignorar a diferen arquivo "vimrc". 1. Comece a editar o arquivo "vimrc". Isso depende do sistema: - :e ~/.vimrc para Unix - :e ~/_vimrc para MS-Windows + :e ~/.vimrc para Unix + :e ~/_vimrc para MS-Windows 2. Agora, leia o contedo do arquivo "vimrc" de exemplo: - :r $VIMRUNTIME/vimrc_example.vim + :r $VIMRUNTIME/vimrc_example.vim 3. Salve o arquivo com: :w @@ -914,7 +914,7 @@ NOTA: Se quiser ignorar a diferen maiores informaes, digite: :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lio 7.3: COMPLETAO + Lio 1.7.3: COMPLETAO ** Completao da linha de comando com CTRL-D e ** @@ -938,7 +938,7 @@ NOTA: A completa . Isso especialmente til para :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIO 7 + RESUMO DA LIO 1.7 1. Digite :help ou pressione ou para abrir a janela de ajuda. diff --git a/usr/share/vim/vim91/tutor/tutor.pt.utf-8 b/usr/share/vim/vim91/tutor/tutor1.pt.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.pt.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.pt.utf-8 index 9d8e7588677..a731365a6f3 100644 --- a/usr/share/vim/vim91/tutor/tutor.pt.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.pt.utf-8 @@ -22,9 +22,9 @@ Agora, certifique-se de que sua tecla Shift-Lock (ou Caps Lock) não esteja ativada e pressione a tecla j o bastante para mover o cursor até que a - Lição 1.1 apareça inteiramente na tela. + Lição 1.1.1 apareça inteiramente na tela. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.1: MOVER O CURSOR + Lição 1.1.1: MOVER O CURSOR ** Para mover o cursor, pressione as teclas h,j,k,l conforme indicado. ** @@ -38,7 +38,7 @@ 2. Segure pressionada a tecla (j) até haver repetição. Agora você já sabe como ir para a próxima lição. - 3. Usando a tecla j, vá para a Lição 1.2. + 3. Usando a tecla j, vá para a Lição 1.1.2. NOTA: Se está inseguro sobre o que digitou, pressione para colocá-lo no modo Normal. Então redigite o comando que queria. @@ -47,7 +47,7 @@ NOTA: As teclas de cursor funcionam também. Mas usando hjkl, tão logo esteja acostumado, você poderá se mover muito mais rapidamente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.2: SAIR DO VIM + Lição 1.1.2: SAIR DO VIM !! NOTA: Antes de executar quaisquer dos passos abaixo, leia a lição inteira !! @@ -66,10 +66,10 @@ NOTA: As teclas de cursor funcionam também. Mas usando hjkl, tão logo NOTA: :q! descarta qualquer mudança. Em uma próxima lição será ensinado como salvar as mudanças feitas em um arquivo. - 5. Desça o cursor até a Lição 1.3. + 5. Desça o cursor até a Lição 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.3: EDITAR TEXTOS - REMOÇÃO + Lição 1.1.3: EDITAR TEXTOS - REMOÇÃO ** Pressione x para deletar o caractere sob o cursor. ** @@ -85,14 +85,14 @@ NOTA: :q! descarta qualquer mudança. Em uma próxima lição será ---> A vvaca pullouu por ccimaa dda luuua. - 5. Agora que a frase está correta, prossiga para a Lição 1.4. + 5. Agora que a frase está correta, prossiga para a Lição 1.1.4. NOTA: Enquanto segue este tutorial, não tente memorizar, aprenda pelo uso. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.4: EDITAR TEXTOS - INSERÇÃO + Lição 1.1.4: EDITAR TEXTOS - INSERÇÃO ** Pressione i para inserir texto. ** @@ -111,11 +111,11 @@ NOTA: Enquanto segue este tutorial, não tente memorizar, aprenda pelo uso. ---> Tem algum texto faltando nesta linha. 5. Quando se sentir à vontade com a inserção de texto, mova o cursor para - a Lição 1.5. + a Lição 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.5: EDITAR TEXTO - ADICIONAR + Lição 1.1.5: EDITAR TEXTO - ADICIONAR ** Pressione A para adicionar texto. ** @@ -134,17 +134,17 @@ NOTA: Enquanto segue este tutorial, não tente memorizar, aprenda pelo uso. ---> Há algum texto faltan Há algum texto faltando aqui. - 5. Quando se sentir confortável adicionando texto, vá para a Lição 1.6. + 5. Quando se sentir confortável adicionando texto, vá para a Lição 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 1.6: EDITAR UM ARQUIVO + Lição 1.1.6: EDITAR UM ARQUIVO ** Use :wq para salvar um arquivo e sair. ** !! NOTA: Leia toda a lição antes de executar as instruções!! - 1. Saia deste tutorial como o fez na lição 1.2: :q! + 1. Saia deste tutorial como o fez na lição 1.1.2: :q! Ou, se tiver acesso a outro terminal, faça o seguinte nele. 2. No prompt do shell, digite esse comando: vim tutor @@ -161,7 +161,7 @@ NOTA: Enquanto segue este tutorial, não tente memorizar, aprenda pelo uso. 6. Após ler os passos acima e compreendê-los, execute-os. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIÇÃO 1 + RESUMO DA LIÇÃO 1.1 1. O cursor é movido usando tanto as teclas de seta quanto as teclas hjkl. h (esquerda) j (para baixo) k (para cima) l (direita) @@ -181,10 +181,10 @@ NOTA: Enquanto segue este tutorial, não tente memorizar, aprenda pelo uso. NOTA: Pressionando você irá para o modo Normal ou cancelará um comando ainda incompleto. -Agora continue com a Lição 2. +Agora continue com a Lição 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.1: COMANDOS DE REMOÇÃO + Lição 1.2.1: COMANDOS DE REMOÇÃO ** Digite dw para apagar uma palavra. ** @@ -204,10 +204,10 @@ Agora continue com a Lição 2. ---> Tem a algumas oi palavras diversão que não pertencem papel a esta frase. 5. Repita os passos 3 ao 4 até que a frase esteja correta e vá para a - Lição 2.2. + Lição 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.2: MAIS COMANDOS DE REMOÇÃO + Lição 1.2.2: MAIS COMANDOS DE REMOÇÃO ** Digite d$ para deletar até o fim da linha. ** @@ -223,14 +223,14 @@ Agora continue com a Lição 2. ---> Alguém digitou o fim desta linha duas vezes. desta linha duas vezes. - 5. Vá para a lição 2.3 para entender o funcionamento deste comando. + 5. Vá para a lição 1.2.3 para entender o funcionamento deste comando. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.3: SOBRE OPERADORES E MOVIMENTOS + Lição 1.2.3: SOBRE OPERADORES E MOVIMENTOS Muitos comandos que mudam texto são feitos de um operador e de um movimento. O formato para um comando apagar com o operador de remoção d tem a @@ -254,7 +254,7 @@ operador, faz o cursor se mover como especificado na lista de teclas de movimento. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.4: USAR UM CONTADOR PARA UM MOVIMENTO + Lição 1.2.4: USAR UM CONTADOR PARA UM MOVIMENTO ** Digitar um número antes de um movimento repete-o o tanto de vezes. ** @@ -271,13 +271,13 @@ movimento. ---> Esta é uma linha com algumas palavras para permiti-lo fazer movimentos. - 6. Vá para a Lição 2.5. + 6. Vá para a Lição 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.5: USAR UM CONTADOR PARA APAGAR MAIS + Lição 1.2.5: USAR UM CONTADOR PARA APAGAR MAIS ** Digitar um número com um operador repete-o esse número de vezes. ** @@ -300,7 +300,7 @@ movimento. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.6: TRABALHAR COM LINHAS + Lição 1.2.6: TRABALHAR COM LINHAS ** Digite dd para apagar uma linha inteira. ** @@ -323,7 +323,7 @@ movimento. Notas do tradutor: Lama (mud) em inglês pode significar fofoca, difamação. Há rima no texto original. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 2.7: O COMANDO UNDO (DESFAZER) + Lição 1.2.7: O COMANDO UNDO (DESFAZER) ** Pressione u para desfazer os últimos comandos, U recupera a linha inteira.** @@ -340,13 +340,13 @@ Notas do tradutor: Lama (mud) em inglês pode significar fofoca, difamação. ---> Corriija os erros nnesta linha e reetorne-os com undo. - 8. Esses comandos são muito úteis. Agora vá para o resumo da Lição 2. + 8. Esses comandos são muito úteis. Agora vá para o resumo da Lição 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIÇÃO 2 + RESUMO DA LIÇÃO 1.2 1. Para apagar do cursor até a próxima palavra, digite: dw @@ -371,7 +371,7 @@ Notas do tradutor: Lama (mud) em inglês pode significar fofoca, difamação. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 3.1: O COMANDO COLAR + Lição 1.3.1: O COMANDO COLAR ** Digite p para colar após o cursor o que acabou de apagar. ** @@ -394,7 +394,7 @@ Notas do tradutor: Lama (mud) em inglês pode significar fofoca, difamação. Nota do tradutor: Há rima no original. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 3.2: O COMANDO SUBSTITUIR + Lição 1.3.2: O COMANDO SUBSTITUIR ** Digite rx para substituir o caractere sob o cursor por x . ** @@ -410,14 +410,14 @@ Nota do tradutor: Há rima no original. ---> Quendo este limha foi dugitada, alguem pressioniu algumas teclas erradzs! ---> Quando esta linha foi digitada, alguém pressionou algumas teclas erradas! - 5. Agora vá para a Lição 3.3. + 5. Agora vá para a Lição 1.3.3. NOTA: Lembre-se que você deve aprender pelo uso, não pela memorização. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 3.3: O OPERADOR CHANGE (MUDAR) + Lição 1.3.3: O OPERADOR CHANGE (MUDAR) ** Para alterar até o fim de uma palavra, digite ce . ** @@ -440,7 +440,7 @@ de Inserção. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 3.4: MAIS MUDANÇAS USANDO c + Lição 1.3.4: MAIS MUDANÇAS USANDO c ** O operador change é usado com os mesmos movimentos que o delete. ** @@ -464,7 +464,7 @@ de Inserção. NOTA: Você pode usar a tecla Backspace para corrigir erros enquanto digita. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIÇÃO 3 + RESUMO DA LIÇÃO 1.3 1. Para reinserir um texto que já foi apagado, digite p . Isso coloca o texto @@ -487,7 +487,7 @@ Agora vá para a próxima lição. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 4.1: LOCALIZAÇÃO DO CURSOR E ESTADO DO ARQUIVO + Lição 1.4.1: LOCALIZAÇÃO DO CURSOR E ESTADO DO ARQUIVO ** Digite CTRL-G para mostrar sua localização no arquivo e seu estado. Digite G para mover para uma linha do arquivo. ** @@ -510,7 +510,7 @@ NOTA: A posição do cursor pode estar visível no canto direito inferior da 4. Se estiver seguro para fazê-los, execute os passos 1 a 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 4.2: O COMANDO BUSCAR + Lição 1.4.2: O COMANDO BUSCAR ** Digite / seguido por uma frase para procurar por ela. ** @@ -534,7 +534,7 @@ NOTA: Quando a busca atinge o fim do arquivo ela continuará do começo, a menos que a opção 'wrapscan' esteja desativada. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 4.3: BUSCA DE PARÊNTESES CORRESPONDENTES + Lição 1.4.3: BUSCA DE PARÊNTESES CORRESPONDENTES ** Digite % para encontrar um ),], ou } correspondente. ** @@ -557,7 +557,7 @@ Nota: Isso é muito útil para corrigir um programa com parêntese não-casado! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 4.4: O COMANDO SUBSTITUIR + Lição 1.4.4: O COMANDO SUBSTITUIR ** Digite :s/velho/novo/g para substituir 'velho' por 'novo'. ** @@ -581,7 +581,7 @@ Nota: Isso é muito útil para corrigir um programa com parêntese não-casado! substituição. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIÇÃO 4 + RESUMO DA LIÇÃO 1.4 1. CTRL-G mostra em que ponto do arquivo está e o estado dele. @@ -607,7 +607,7 @@ Nota: Isso é muito útil para corrigir um programa com parêntese não-casado! Para confirmar cada substituição adicione 'c' :%s/velho/novo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 5.1: COMO EXECUTAR UM COMANDO EXTERNO + Lição 1.5.1: COMO EXECUTAR UM COMANDO EXTERNO ** Digite :! seguido por um comando externo para executá-lo. ** @@ -630,7 +630,7 @@ NOTA: Todos os comandos : devem ser finalizados teclando-se ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 5.2: MAIS SOBRE SALVAR ARQUIVOS + Lição 1.5.2: MAIS SOBRE SALVAR ARQUIVOS ** Para salvar as alterações no texto, digite :w NOMEDOARQUIVO. ** @@ -653,7 +653,7 @@ NOTA: Se sair do Vim e entrar de novo com o nome do arquivo TESTE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 5.3: SELECIONAR O TEXTO A SER SALVO + Lição 1.5.3: SELECIONAR O TEXTO A SER SALVO ** Para salvar parte de um arquivo, digite v movimento :w NOMEDOARQUIVO ** @@ -676,14 +676,14 @@ cursor pela tela para tornar a seleção maior ou menor. Pode, então, usar um operador para executar alguma ação. Por exemplo, d apaga o texto. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 5.4: RECUPERAR E UNIR ARQUIVOS + Lição 1.5.4: RECUPERAR E UNIR ARQUIVOS ** Para inserir o conteúdo de um arquivo, digite :r NOMEDOARQUIVO ** 1. Posicione o cursor logo acima desta linha. -NOTA: Depois de executar o Passo 2 você verá a Lição 5.3. Então DESÇA o +NOTA: Depois de executar o Passo 2 você verá a Lição 1.5.3. Então DESÇA o cursor para ver esta lição novamente. 2. Agora recupere o arquivo TESTE usando o comando :r TESTE onde TESTE é o @@ -691,7 +691,7 @@ NOTA: Depois de executar o Passo 2 você verá a Lição 5.3. Então DESÇA o O arquivo recuperado é colocado abaixo da linha atual do cursor. 3. Para verificar que o arquivo foi recuperado, volte com o cursor e verifique - que agora existem duas cópias da Lição 5.3, a original e a versão do + que agora existem duas cópias da Lição 1.5.3, a original e a versão do arquivo. NOTA: Você também pode ler a saída de um comando externo. Por exemplo, :r !ls @@ -699,7 +699,7 @@ NOTA: Você também pode ler a saída de um comando externo. Por exemplo, :r !l ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIÇÃO 5 + RESUMO DA LIÇÃO 1.5 1. :!comando executa um comando externo. @@ -722,7 +722,7 @@ NOTA: Você também pode ler a saída de um comando externo. Por exemplo, :r !l ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 6.1: O COMANDO ABRIR + Lição 1.6.1: O COMANDO ABRIR ** Digite o para abrir uma linha em baixo do cursor e ir para o modo de Inserção. ** @@ -745,7 +745,7 @@ NOTA: Você também pode ler a saída de um comando externo. Por exemplo, :r !l ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 6.2: O COMANDO ADICIONAR + Lição 1.6.2: O COMANDO ADICIONAR ** Digite a para inserir texto DEPOIS do cursor. ** @@ -768,7 +768,7 @@ NOTA: Você também pode ler a saída de um comando externo. Por exemplo, :r !l NOTA: a, i e A levam ao mesmo modo de Inserção, a única diferença é onde os caracteres são inseridos. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 6.3: UMA OUTRA VERSÃO DO SUBSTITUIR + Lição 1.6.3: UMA OUTRA VERSÃO DO SUBSTITUIR ** Digite um R maiúsculo para substituir mais de um caractere. ** @@ -791,7 +791,7 @@ NOTA: O modo de Substituição é como o modo de Inserção, mas cada caractere digitado apaga um caractere existente. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 6.4: COPIAR E COLAR TEXTO + Lição 1.6.4: COPIAR E COLAR TEXTO ** Use o operador y para copiar texto e p para colá-lo. ** @@ -816,7 +816,7 @@ NOTA: Você também pode usar y como um operador; por exemplo, yw copia uma palavra. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 6.5: CONFIGURAR PREFERÊNCIAS + Lição 1.6.5: CONFIGURAR PREFERÊNCIAS ** Configure uma preferência de modo que uma busca ou substituição ignore se as letras são maiúsculas ou minúsculas. ** @@ -842,7 +842,7 @@ NOTA: Se quiser ignorar a diferença entre maiúsculas e minúsculas em apenas uma pesquisa, use \c no comando: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIÇÃO 6 + RESUMO DA LIÇÃO 1.6 1. Digite o para abrir uma linha ABAIXO do cursor e iniciar o modo de Inserção. @@ -868,7 +868,7 @@ NOTA: Se quiser ignorar a diferença entre maiúsculas e minúsculas em apenas ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LIÇÃO 7.1: OBTENDO AJUDA + LIÇÃO 1.7.1: OBTENDO AJUDA ** Use o sistema de ajuda do próprio Vim ** @@ -891,7 +891,7 @@ NOTA: Se quiser ignorar a diferença entre maiúsculas e minúsculas em apenas :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 7.2: CRIAR UM SCRIPT DE INICIALIZAÇÃO + Lição 1.7.2: CRIAR UM SCRIPT DE INICIALIZAÇÃO ** Habilite recursos do Vim ** @@ -914,7 +914,7 @@ NOTA: Se quiser ignorar a diferença entre maiúsculas e minúsculas em apenas maiores informações, digite: :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lição 7.3: COMPLETAÇÃO + Lição 1.7.3: COMPLETAÇÃO ** Completação da linha de comando com CTRL-D e ** @@ -938,7 +938,7 @@ NOTA: A completação funciona com muitos comandos. Basta pressionar CTRL-D e . Isso é especialmente útil para :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RESUMO DA LIÇÃO 7 + RESUMO DA LIÇÃO 1.7 1. Digite :help ou pressione ou para abrir a janela de ajuda. diff --git a/usr/share/vim/vim91/tutor/tutor.ru b/usr/share/vim/vim91/tutor/tutor1.ru similarity index 88% rename from usr/share/vim/vim91/tutor/tutor.ru rename to usr/share/vim/vim91/tutor/tutor1.ru index fa5454602c1..8cbd05a8abf 100644 --- a/usr/share/vim/vim91/tutor/tutor.ru +++ b/usr/share/vim/vim91/tutor/tutor1.ru @@ -1,12 +1,13 @@ =============================================================================== - 1.7 = Vim = + 1.7 = Vim = +=============================================================================== += = =============================================================================== Vim -- , , . , ̣ Vim . - 30 , , . @@ -18,11 +19,10 @@ , . , , . , ! - , , , j - , , 1.1 . + , , 1.1.1 . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.1. + 1.1.1. ** , h,j,k,l ** ^ . @@ -35,7 +35,7 @@ 2. "" (j) . , . - 3. "", j , 1.2. + 3. "", j , 1.1.2. . , , @@ -46,7 +46,7 @@ h j k l , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.2. + 1.1.2. ! , ! @@ -68,9 +68,9 @@ :q! . , . - 5. 1.3. + 5. 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.3. - + 1.1.3. - ** , x ** @@ -79,21 +79,22 @@ 2. , , . - 3. x ( x - x ). + 3. x . 4. 2 4, . ---> . - 5. , , 1.4. + 5. , , 1.1.4. . ӣ , . + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.4. - + 1.1.4. - ** , i ** @@ -113,18 +114,18 @@ ---> . - 5. , 1.5. + 5. , 1.1.5. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.5. - + 1.1.5. - ** , A ** 1. --->. , . - 2. A ( A) , - . + 2. A , . 3. . @@ -136,16 +137,18 @@ ---> . - 5. , 1.6. + 5. , 1.1.6. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.6. + 1.1.6. ** , :wq ** ! , ! - 1. Vim, 1.2 - :q! + 1. Vim, 1.1.2 - :q! , : 2. vim tutor @@ -161,8 +164,9 @@ . 6. , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1 + 1.1 1. , hjkl. h () j () k () l () @@ -184,9 +188,9 @@ . - 2. + 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.1. + 1.2.1. ** , dw ** @@ -206,10 +210,11 @@ ---> . 5. 3 4, , - 2.2 + 1.2.2 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.2. + 1.2.2. ** , d$ ** @@ -226,13 +231,14 @@ ---> - . . - 5. , , 2.3. + 5. , 1.2.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.3. + 1.2.3. , , , . @@ -256,7 +262,7 @@ , , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.4. + 1.2.4. ** , ** @@ -276,10 +282,11 @@ ---> , . - 6. , 2.5. + 6. , 1.2.5. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.5. + 1.2.5. ** , ** @@ -301,8 +308,9 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.6. + 1.2.6. ** , dd ** @@ -326,7 +334,7 @@ , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.7. + 1.2.7. ** , u , U ** @@ -335,8 +343,7 @@ 2. x . 3. u . 4. , x . - 5. U ( U), - . + 5. U , . 6. u U . 7. CTRL-R (.. CTRL, @@ -348,9 +355,10 @@ 8. . - 2. + 1.2. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2 + 1.2 1. , dw 2. , de @@ -372,9 +380,9 @@ 8. , u ( u) , U ( U) - Σ , CTRL+R + Σ , CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.1. + 1.3.1. ** ̣ , p ** @@ -396,8 +404,9 @@ ---> ) ---> ) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.2. + 1.3.2. ** , r ** @@ -414,13 +423,14 @@ ---> - ! - 5. 3.3. + 5. 1.3.3. . , , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.3. + 1.3.3. ** , ce ** @@ -442,8 +452,9 @@ , ce , . cc , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.4. c + 1.3.4. c ** , ** @@ -465,8 +476,9 @@ . . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3 + 1.3 1. , ̣, p . ( , @@ -490,7 +502,7 @@ . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.1. + 1.4.1. ** , CTRL-g . , SHIFT-G ** @@ -514,7 +526,7 @@ 4. ӣ , 1 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.2. + 1.4.2. ** - , / ** @@ -536,8 +548,9 @@ . , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.3. + 1.4.3. ** (, [ {, % ** @@ -559,8 +572,9 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.4. + 1.4.4. ** "-" "-", :s///g ** @@ -582,15 +596,15 @@ :%s///g ӣ . :%s///gc . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4 + 1.4 1. ģ : CTRL-g - SHIFT-G - SHIFT-G - gg - - 2. / , . ? , @@ -600,17 +614,15 @@ . CTRL-O , CTRL-I . - 3. % , ( ), [ ] { }, ţ . - 4. , :s// , :s///g , :#,#s///g , :%s///g , 'c' :%s///gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.1. + 1.5.1. ** , :! ** @@ -632,8 +644,9 @@ . , : , , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.2. + 1.5.2. ** , :w ** @@ -655,8 +668,9 @@ 5. , :!del TEST ( Windows) :!rm TEST ( UNIX- ) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.3. + 1.5.3. ** , v , :w ** @@ -674,28 +688,27 @@ 5. TEST. , :!dir :!ls . , . - . v . , . , , d . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.4. + 1.5.4. ** , :r ** 1. . ! - 2 5.3. + 2 1.5.3. . 2. TEST, :r TEST , TEST - . 3. , , - , 5.3. - + , 1.5.3. - TEST. . @@ -703,8 +716,9 @@ ls . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5 + 1.5 1. :!command . @@ -726,16 +740,16 @@ . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.1. + 1.6.1. ** , o ** 1. , --->. - 2. o ( o) , - - . + 2. o , + . 3. - . @@ -749,40 +763,41 @@ ---> , SHIFT-O. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.2. + 1.6.2. ** , a ** 1. , --->. - 2. e , "". - 3. a ( a) - , . + 3. a , + . 4. . . - 5. e ۣ - , 3 4. + 5. e ۣ + , 3 4. ----> . ----> . +---> . +---> . . a , i A , , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.3. + 1.6.3. ** , R ** 1. xxx ---> - 2. SHIFT-R ( R) , - , xxx. + 2. SHIFT-R , , + xxx. 3. . , Σ. @@ -799,15 +814,14 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.4. + 1.6.4. ** , y , - p ** - 1. ")" --->. + 1. ")" , --->. 2. v ң "". - 3. y ( y) - . + 3. y . 4. , j$ . 5. p . a , "" . @@ -821,8 +835,10 @@ yw ( y w) . yy , p . + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.5. + 1.6.5. ** , ** @@ -840,40 +856,37 @@ 5. , / 6. ޣ , :set noic - . - :nohlsearch + , :nohlsearch . , \c , , /\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6 + 1.6 1. o O - 2. a . A . 3. e . - 4. y , p . 5. SHIFT-R , - . - 6. ":set xxx" 'xxx'. + 6. :set xxx 'xxx'. ( ݣ ): 'ic' 'ignorecase' 'is' 'incsearch' 'hls' 'hlsearch' - 7. "no" :set noic + 7. , "no" :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.1. + 1.7.1. ** ** @@ -897,7 +910,7 @@ :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.2. + 1.7.2. ** Vim ** @@ -921,7 +934,7 @@ "vimrc". , :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.3. + 1.7.3. ** CTRL-D ** @@ -933,7 +946,7 @@ 4. CTRL-D , Vim "e". 5. d , - ":edit". + "edit". 6. :edit TE 7. , @@ -943,8 +956,9 @@ . CTRL-D . :help . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7 + 1.7 1. , @@ -966,31 +980,34 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ݣ Vim. + . + + Vim, + , . + , Vim ݣ - . - ݣ Vim. , - , - , , - . , , - . , - , :help user-manual. + , , + :help user-manual. "Vim - Vi Improved", Steve Oualline, New Riders. - Vim . + Vim . . . https://iccf-holland.org/click5.html - Vi, + ݣ Vi, Vim, "Learning the Vi Editor", Linda Lamb, O'Reilly & Associates Inc. , ӣ, Vi. - Vim. + Vim. Michael C. Pierce Robert K. Ware Colorado School of Mines ޣ , Charles Smith Colorado State - University. E-mail: bware@mines.colorado.edu. + University. E-mail: bware@mines.colorado.edu ( ). Bram Moolenaar Vim. diff --git a/usr/share/vim/vim91/tutor/tutor.ru.cp1251 b/usr/share/vim/vim91/tutor/tutor1.ru.cp1251 similarity index 88% rename from usr/share/vim/vim91/tutor/tutor.ru.cp1251 rename to usr/share/vim/vim91/tutor/tutor1.ru.cp1251 index 281a1d3dc9b..27d567a07db 100644 --- a/usr/share/vim/vim91/tutor/tutor.ru.cp1251 +++ b/usr/share/vim/vim91/tutor/tutor1.ru.cp1251 @@ -1,12 +1,13 @@ =============================================================================== - 1.7 = Vim = + 1.7 = Vim = +=============================================================================== += = =============================================================================== Vim -- , , . , Vim . - 30 , , . @@ -18,11 +19,10 @@ , . , , . , ! - , , , j - , , 1.1 . + , , 1.1.1 . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.1. + 1.1.1. ** , h,j,k,l ** ^ . @@ -35,7 +35,7 @@ 2. "" (j) . , . - 3. "", j , 1.2. + 3. "", j , 1.1.2. . , , @@ -46,7 +46,7 @@ h j k l , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.2. + 1.1.2. ! , ! @@ -68,9 +68,9 @@ :q! . , . - 5. 1.3. + 5. 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.3. - + 1.1.3. - ** , x ** @@ -79,21 +79,22 @@ 2. , , . - 3. x ( x - x ). + 3. x . 4. 2 4, . ---> . - 5. , , 1.4. + 5. , , 1.1.4. . , . + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.4. - + 1.1.4. - ** , i ** @@ -113,18 +114,18 @@ ---> . - 5. , 1.5. + 5. , 1.1.5. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.5. - + 1.1.5. - ** , A ** 1. --->. , . - 2. A ( A) , - . + 2. A , . 3. . @@ -136,16 +137,18 @@ ---> . - 5. , 1.6. + 5. , 1.1.6. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1.6. + 1.1.6. ** , :wq ** ! , ! - 1. Vim, 1.2 - :q! + 1. Vim, 1.1.2 - :q! , : 2. vim tutor @@ -161,8 +164,9 @@ . 6. , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 1 + 1.1 1. , hjkl. h () j () k () l () @@ -184,9 +188,9 @@ . - 2. + 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.1. + 1.2.1. ** , dw ** @@ -206,10 +210,11 @@ ---> . 5. 3 4, , - 2.2 + 1.2.2 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.2. ٨ + 1.2.2. ٨ ** , d$ ** @@ -226,13 +231,14 @@ ---> - . . - 5. , , 2.3. + 5. , 1.2.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.3. + 1.2.3. , , , . @@ -256,7 +262,7 @@ , , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.4. ר + 1.2.4. ר ** , ** @@ -276,10 +282,11 @@ ---> , . - 6. , 2.5. + 6. , 1.2.5. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.5. ר + 1.2.5. ר ** , ** @@ -301,8 +308,9 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.6. + 1.2.6. ** , dd ** @@ -326,7 +334,7 @@ , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2.7. + 1.2.7. ** , u , U ** @@ -335,8 +343,7 @@ 2. x . 3. u . 4. , x . - 5. U ( U), - . + 5. U , . 6. u U . 7. CTRL-R (.. CTRL, @@ -348,9 +355,10 @@ 8. . - 2. + 1.2. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 2 + 1.2 1. , dw 2. , de @@ -372,9 +380,9 @@ 8. , u ( u) , U ( U) - , CTRL+R + , CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.1. + 1.3.1. ** , p ** @@ -396,8 +404,9 @@ ---> ) ---> ) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.2. + 1.3.2. ** , r ** @@ -414,13 +423,14 @@ ---> - ! - 5. 3.3. + 5. 1.3.3. . , , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.3. + 1.3.3. ** , ce ** @@ -442,8 +452,9 @@ , ce , . cc , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3.4. ٨ c + 1.3.4. ٨ c ** , ** @@ -465,8 +476,9 @@ . . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 3 + 1.3 1. , , p . ( , @@ -490,7 +502,7 @@ . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.1. + 1.4.1. ** , CTRL-g . , SHIFT-G ** @@ -514,7 +526,7 @@ 4. , 1 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.2. + 1.4.2. ** - , / ** @@ -536,8 +548,9 @@ . , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.3. + 1.4.3. ** (, [ {, % ** @@ -559,8 +572,9 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4.4. + 1.4.4. ** "-" "-", :s///g ** @@ -582,15 +596,15 @@ :%s///g . :%s///gc . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 4 + 1.4 1. : CTRL-g - SHIFT-G - SHIFT-G - gg - - 2. / , Ш . ? , @@ -600,17 +614,15 @@ . CTRL-O , CTRL-I . - 3. % , ( ), [ ] { }, . - 4. , :s// , :s///g , :#,#s///g , :%s///g , 'c' :%s///gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.1. + 1.5.1. ** , :! ** @@ -632,8 +644,9 @@ . , : , , . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.2. + 1.5.2. ** , :w ** @@ -655,8 +668,9 @@ 5. , :!del TEST ( Windows) :!rm TEST ( UNIX- ) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.3. + 1.5.3. ** , v , :w ** @@ -674,28 +688,27 @@ 5. TEST. , :!dir :!ls . , . - . v . , . , , d . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5.4. + 1.5.4. ** , :r ** 1. . ! - 2 5.3. + 2 1.5.3. . 2. TEST, :r TEST , TEST - . 3. , , - , 5.3. - + , 1.5.3. - TEST. . @@ -703,8 +716,9 @@ ls . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 5 + 1.5 1. :!command . @@ -726,16 +740,16 @@ . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.1. + 1.6.1. ** , o ** 1. , --->. - 2. o ( o) , - - . + 2. o , + . 3. - . @@ -749,40 +763,41 @@ ---> , SHIFT-O. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.2. + 1.6.2. ** , a ** 1. , --->. - 2. e , "". - 3. a ( a) - , . + 3. a , + . 4. . . - 5. e - , 3 4. + 5. e + , 3 4. ----> . ----> . +---> . +---> . . a , i A , , . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.3. ٨ + 1.6.3. ٨ ** , R ** 1. xxx ---> - 2. SHIFT-R ( R) , - , xxx. + 2. SHIFT-R , , + xxx. 3. . , . @@ -799,15 +814,14 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.4. + 1.6.4. ** , y , - p ** - 1. ")" --->. + 1. ")" , --->. 2. v "". - 3. y ( y) - . + 3. y . 4. , j$ . 5. p . a , "" . @@ -821,8 +835,10 @@ yw ( y w) . yy , p . + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6.5. + 1.6.5. ** , ** @@ -840,40 +856,37 @@ 5. , / 6. , :set noic - . - :nohlsearch + , :nohlsearch . , \c , , /\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 6 + 1.6 1. o O - 2. a . A . 3. e . - 4. y , p . 5. SHIFT-R , - . - 6. ":set xxx" 'xxx'. + 6. :set xxx 'xxx'. ( ): 'ic' 'ignorecase' 'is' 'incsearch' 'hls' 'hlsearch' - 7. "no" :set noic + 7. , "no" :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.1. + 1.7.1. ** ** @@ -897,7 +910,7 @@ :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.2. + 1.7.2. ** Vim ** @@ -921,7 +934,7 @@ "vimrc". , :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7.3. + 1.7.3. ** CTRL-D ** @@ -933,7 +946,7 @@ 4. CTRL-D , Vim "e". 5. d , - ":edit". + "edit". 6. :edit TE 7. , @@ -943,8 +956,9 @@ . CTRL-D . :help . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 7 + 1.7 1. , @@ -966,31 +980,34 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Vim. + . + + Vim, + , . + , Vim - . - Vim. , - , - , , - . , , - . , - , :help user-manual. + , , + :help user-manual. "Vim - Vi Improved", Steve Oualline, New Riders. - Vim . + Vim . . . https://iccf-holland.org/click5.html - Vi, + Vi, Vim, "Learning the Vi Editor", Linda Lamb, O'Reilly & Associates Inc. , , Vi. - Vim. + Vim. Michael C. Pierce Robert K. Ware Colorado School of Mines , Charles Smith Colorado State - University. E-mail: bware@mines.colorado.edu. + University. E-mail: bware@mines.colorado.edu ( ). Bram Moolenaar Vim. diff --git a/usr/share/vim/vim91/tutor/tutor.ru.utf-8 b/usr/share/vim/vim91/tutor/tutor1.ru.utf-8 similarity index 89% rename from usr/share/vim/vim91/tutor/tutor.ru.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.ru.utf-8 index 2976584618d..a856560e5be 100644 --- a/usr/share/vim/vim91/tutor/tutor.ru.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.ru.utf-8 @@ -1,12 +1,13 @@ =============================================================================== - версия 1.7 = ДОБРО ПОЖАЛОВАТЬ НА ЗАНЯТИЯ ПО РЕДАКТОРУ Vim = +версия 1.7 = ДОБРО ПОЖАЛОВАТЬ НА ЗАНЯТИЯ ПО РЕДАКТОРУ Vim = +=============================================================================== += ГЛАВА ПЕРВАЯ = =============================================================================== Программа Vim -- это очень мощный текстовый редактор, имеющий множество команд, и все их просто невозможно описать в рамках этого учебника. Данный же учебник призван объяснить те команды, которые позволят вам с лёгкостью использовать программу Vim в качестве редактора общего назначения. - На освоение материалов этого учебника потребуется около 30 минут, но это зависит от того, сколько времени вы посвятите практическим занятиям. @@ -18,11 +19,10 @@ Важно помнить, что этот учебник предназначен для практического обучения. Это означает, что вы должны применять команды для того, чтобы как следует их изучить. Если вы просто прочитаете этот текст, то не запомните команды! - Теперь, убедившись, что не включена клавиша , нажмите клавишу j - несколько раз, так, чтобы урок 1.1 полностью поместился на экране. + несколько раз, так, чтобы урок 1.1.1 полностью поместился на экране. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.1. ПЕРЕМЕЩЕНИЕ КАРЕТКИ + Урок 1.1.1. ПЕРЕМЕЩЕНИЕ КАРЕТКИ ** Чтобы перемещать каретку в указанных направлениях, нажмите клавиши h,j,k,l ** ^ Подсказка. @@ -35,7 +35,7 @@ 2. Удерживайте нажатой клавишу "вниз" (j) для беспрерывного перемещения каретки. Теперь вы знаете, как перейти к следующему уроку. - 3. Используя клавишу "вниз", то есть j , перейдите к уроку 1.2. + 3. Используя клавишу "вниз", то есть j , перейдите к уроку 1.1.2. Совет. Если вы не уверены в правильности набранного текста, нажмите клавишу , @@ -46,7 +46,7 @@ выполнять перемещение каретки клавишами h j k l намного быстрее, стоит только немного потренироваться. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.2. ЗАВЕРШЕНИЕ РАБОТЫ ПРОГРАММЫ + Урок 1.1.2. ЗАВЕРШЕНИЕ РАБОТЫ ПРОГРАММЫ ВНИМАНИЕ! Перед выполнением описанных ниже действий, прочтите урок полностью! @@ -68,9 +68,9 @@ По команде :q! будут сброшены любые сделанные изменения. Через несколько уроков вы узнаете, как сохранять изменения в файл. - 5. Переместите каретку вниз к уроку 1.3. + 5. Переместите каретку вниз к уроку 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.3. РЕДАКТИРОВАНИЕ - УДАЛЕНИЕ ТЕКСТА + Урок 1.1.3. РЕДАКТИРОВАНИЕ - УДАЛЕНИЕ ТЕКСТА ** Чтобы удалить символ под курсором, нажмите клавишу x ** @@ -79,21 +79,22 @@ 2. Чтобы исправить ошибки, перемещайте каретку, пока она не окажется над удаляемым символом. - 3. Нажмите клавишу x для удаления требуемого символа (здесь x означает - латинскую строчную букву x на клавиатуре). + 3. Нажмите клавишу x для удаления требуемого символа. 4. Повторите шаги со 2 по 4, пока строка не будет исправлена. ---> От тттопота копытт пппыль ппо ппполю леттитт. - 5. Теперь, когда строка исправлена, переходите к уроку 1.4. + 5. Теперь, когда строка исправлена, переходите к уроку 1.1.4. Примечание. В ходе этих занятий не пытайтесь сразу всё запоминать, учитесь в процессе работы. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.4. РЕДАКТИРОВАНИЕ - ВСТАВКА ТЕКСТА + Урок 1.1.4. РЕДАКТИРОВАНИЕ - ВСТАВКА ТЕКСТА ** Чтобы вставить текст, нажмите клавишу i ** @@ -113,18 +114,18 @@ ---> Часть текста в этой строке бесследно пропало. - 5. Когда освоите вставку текста, переходите к уроку 1.5. + 5. Когда освоите вставку текста, переходите к уроку 1.1.5. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.5. РЕДАКТИРОВАНИЕ - ДОБАВЛЕНИЕ ТЕКСТА + Урок 1.1.5. РЕДАКТИРОВАНИЕ - ДОБАВЛЕНИЕ ТЕКСТА ** Чтобы добавить текст, нажмите клавишу A ** 1. Переместите каретку к первой строке помеченной --->. Сейчас неважно, на каком символе расположена каретка в этой строке. - 2. Нажмите клавишу A (латинская прописная буква A) и наберите текст, - который требуется добавить. + 2. Нажмите клавишу A и наберите текст, который требуется добавить. 3. После добавления текста нажмите клавишу для возврата в режим команд. @@ -136,16 +137,18 @@ ---> Здесь также недостаёт час Здесь также недостаёт части текста. - 5. Когда освоите добавление текста, переходите к уроку 1.6. + 5. Когда освоите добавление текста, переходите к уроку 1.1.6. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - УРОК 1.6. РЕДАКТИРОВАНИЕ И ЗАПИСЬ ФАЙЛА + УРОК 1.1.6. РЕДАКТИРОВАНИЕ И ЗАПИСЬ ФАЙЛА ** Чтобы сохранить файл и закрыть редактор, используйте команды :wq ** ВНИМАНИЕ! Перед выполнением описанных ниже действий, прочтите урок полностью! - 1. Завершите работу редактора Vim, как указано в уроке 1.2 - :q! + 1. Завершите работу редактора Vim, как указано в уроке 1.1.2 - :q! Если есть доступ к другому терминалу, то там можете сделать следующее: 2. В приглашении командной оболочки введите команду vim tutor @@ -161,8 +164,9 @@ далее к резюме. 6. После того как вы прочли и поняли вышесказанное, выполните описанные шаги. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - РЕЗЮМЕ УРОКА 1 + РЕЗЮМЕ УРОКА 1.1 1. Каретку можно перемещать либо клавишами со стрелками, либо клавишами hjkl. h (влево) j (вниз) k (вверх) l (вправо) @@ -184,9 +188,9 @@ По нажатию клавиши будет выполнено переключение редактора в режим команд с прерыванием обработки любой ранее набранной команды. -Теперь переходите к уроку 2. +Теперь переходите к уроку 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.1. КОМАНДЫ УДАЛЕНИЯ + Урок 1.2.1. КОМАНДЫ УДАЛЕНИЯ ** Чтобы удалить слово под кареткой, используйте команду dw ** @@ -206,10 +210,11 @@ ---> Несколько слов рафинад в этом предложении автокран излишни. 5. Повторите шаги 3 и 4, пока не исправите все ошибки, и переходите к - уроку 2.2 + уроку 1.2.2 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.2. ЕЩЁ ОДНА КОМАНДА УДАЛЕНИЯ + Урок 1.2.2. ЕЩЁ ОДНА КОМАНДА УДАЛЕНИЯ ** Чтобы удалить текст до конца строки, используйте команду d$ ** @@ -226,13 +231,14 @@ ---> Кто-то набрал окончание этой строки дважды. окончание этой строки дважды. - 5. Чтобы лучше разобраться в том, как это происходит, переходите к уроку 2.3. + 5. Чтобы лучше разобраться в том как это происходит, обратитесь к уроку 1.2.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.3. ОПЕРАТОРЫ И ОБЪЕКТЫ + Урок 1.2.3. ОПЕРАТОРЫ И ОБЪЕКТЫ Многие команды, изменяющие текст, являются составными и формируются из оператора и объекта, к которому применяется этот оператор. @@ -256,7 +262,7 @@ с которым ассоциирован объект, то каретка будет перемещена так, как указано в перечне объектов. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.4. ПРИМЕНЕНИЕ СЧЁТЧИКА СОВМЕСТНО С ОБЪЕКТАМИ + Урок 1.2.4. ПРИМЕНЕНИЕ СЧЁТЧИКА СОВМЕСТНО С ОБЪЕКТАМИ ** Чтобы перемещение каретка выполнялось необходимое количество раз, укажите перед объектом требуемое число ** @@ -276,10 +282,11 @@ ---> Обычная строка из слов, чтобы вы на ней потренировались перемещать курсор. - 6. Когда освоите это, переходите к уроку 2.5. + 6. Когда освоите это, переходите к уроку 1.2.5. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.5. ПРИМЕНЕНИЕ СЧЁТЧИКА ДЛЯ МНОЖЕСТВЕННОГО УДАЛЕНИЯ + Урок 1.2.5. ПРИМЕНЕНИЕ СЧЁТЧИКА ДЛЯ МНОЖЕСТВЕННОГО УДАЛЕНИЯ ** Чтобы применить оператор несколько раз, укажите число требуемых повторов ** @@ -301,8 +308,9 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.6. ОПЕРАЦИИ СО СТРОКАМИ + Урок 1.2.6. ОПЕРАЦИИ СО СТРОКАМИ ** Чтобы удалить строку целиком, используйте команду dd ** @@ -326,7 +334,7 @@ Дублирование оператора для обработки целой строки применяется и с другими операторами, о которых говорится далее. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.7. КОМАНДА ОТМЕНЫ + Урок 1.2.7. КОМАНДА ОТМЕНЫ ** Чтобы отменить результат действия предыдущей команды, нажмите клавишу u Чтобы отменить правки для всей строки, нажмите клавишу U ** @@ -335,8 +343,7 @@ 2. Нажмите клавишу x для удаления первого ошибочного символа. 3. Теперь нажмите клавишу u для отмены последней выполненной команды. 4. Исправьте все ошибки в строке, используя команду x . - 5. Теперь нажмите клавишу U (латинская прописная буква U), чтобы вернуть - всю строку в исходное состояние. + 5. Теперь нажмите клавишу U , чтобы вернуть всю строку в исходное состояние. 6. Нажмите клавишу u несколько раз для отмены команды U и предыдущих команд. 7. Теперь нажмите клавиши CTRL-R (т. е. удерживая нажатой клавишу CTRL, @@ -348,9 +355,10 @@ 8. Это очень нужные и полезные команды. -Далее переходите к резюме урока 2. +Далее переходите к резюме урока 1.2. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - РЕЗЮМЕ УРОКА 2 + РЕЗЮМЕ УРОКА 1.2 1. Чтобы удалить слово, установите курсор в его начало и наберите dw 2. Чтобы удалить текст от позиции каретки до конца слова, наберите de @@ -372,9 +380,9 @@ 8. Чтобы отменить предшествующие действия, нажмите u (строчная буква u) Чтобы отменить все изменения в строке, нажмите U (прописная буква U) - Чтобы вернуть отменённые изменения, нажмите CTRL+R + Чтобы вернуть отменённые изменения, нажмите CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.1. КОМАНДА ВСТАВКИ + Урок 1.3.1. КОМАНДА ВСТАВКИ ** Чтобы вставить последний удалённый текст, наберите команду p ** @@ -396,8 +404,9 @@ ---> в) Он уважать себя заставил ---> а) Мой дядя самых честных правил + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.2. КОМАНДА ЗАМЕНЫ + Урок 1.3.2. КОМАНДА ЗАМЕНЫ ** Чтобы заменить символ под кареткой, наберите r и заменяющий символ ** @@ -414,13 +423,14 @@ ---> В момент набора этой строки кое-кто с трудом попадал по клавишам! - 5. Теперь переходите к уроку 3.3. + 5. Теперь переходите к уроку 1.3.3. Примечание. Помните, что вы должны учиться в процессе работы, а не просто зубрить. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.3. ОПЕРАТОР ИЗМЕНЕНИЯ + Урок 1.3.3. ОПЕРАТОР ИЗМЕНЕНИЯ ** Чтобы изменить окончание слова, наберите команду ce ** @@ -442,8 +452,9 @@ Обратите внимание, что по команде ce не только удаляется часть слова, но и происходит переключение редактора в режим вставки. По команде cc будет выполнятся то же самое, но для целой строки. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - УРОК 3.4. ЕЩЁ НЕСКОЛЬКО СПОСОБОВ РАБОТЫ С ОПЕРАТОРОМ ИЗМЕНЕНИЯ c + УРОК 1.3.4. ЕЩЁ НЕСКОЛЬКО СПОСОБОВ РАБОТЫ С ОПЕРАТОРОМ ИЗМЕНЕНИЯ c ** К оператору изменения применимы те же объекты, что и к оператору удаления ** @@ -465,8 +476,9 @@ Примечание. Клавиша может использоваться для исправления при наборе текста. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - РЕЗЮМЕ УРОКА 3 + РЕЗЮМЕ УРОКА 1.3 1. Чтобы вставить текст, который был только что удалён, наберите команду p . Текст будет вставлен ПОСЛЕ позиции каретки (если была удалена строка, @@ -490,7 +502,7 @@ Теперь переходите к следующему уроку. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - УРОК 4.1. ИНФОРМАЦИЯ О ФАЙЛЕ И ПОЗИЦИЯ КАРЕТКИ + УРОК 1.4.1. ИНФОРМАЦИЯ О ФАЙЛЕ И ПОЗИЦИЯ КАРЕТКИ ** Чтобы получить информацию о файле и позиции каретки, нажмите CTRL-g . Чтобы переместить каретку к заданной строке в файле, нажмите SHIFT-G ** @@ -514,7 +526,7 @@ 4. Если вы запомнили всё вышесказанное, выполните шаги с 1 по 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.2. КОМАНДЫ ПОИСКА + Урок 1.4.2. КОМАНДЫ ПОИСКА ** Чтобы что-то найти, наберите команду / и затем введите искомую фразу ** @@ -536,8 +548,9 @@ Примечание. Если будет достигнут конец файла, то поиск будет продолжен от начала файла. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.3. ПОИСК ПАРНЫХ СКОБОК + Урок 1.4.3. ПОИСК ПАРНЫХ СКОБОК ** Чтобы найти парную скобку для (, [ или {, наберите команду % ** @@ -559,8 +572,9 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.4. СПОСОБ ЗАМЕНЫ СЛОВ + Урок 1.4.4. СПОСОБ ЗАМЕНЫ СЛОВ ** Чтобы "что-то" заменить "чем-то", наберите команду :s/что/чем/g ** @@ -582,15 +596,15 @@ Наберите :%s/что/чем/g чтобы заменить все вхождения во всём файле. Наберите :%s/что/чем/gc чтобы выдавался запрос подтверждения перед каждой заменой. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - РЕЗЮМЕ УРОКА 4 + РЕЗЮМЕ УРОКА 1.4 1. По приведённым ниже командам будет выполнено: CTRL-g - вывод информации о файле и текущей позиции каретки в этом файле SHIFT-G - переход на последнюю строку файла номер и SHIFT-G - переход к строке с указанным номером gg - переход на первую строку файла - 2. При вводе символа / с последующим набором слова, будет выполнен поиск этого слова ВПЕРЁД по тексту. При вводе символа ? с последующим набором слова, будет выполнен поиск @@ -600,17 +614,15 @@ противоположном направлении. При нажатии клавиш CTRL-O будет возврат к предыдущему слову, а при нажатии клавиш CTRL-I будет переход к ранее найденному слову. - 3. При нажатии % , когда каретка на одной из скобок ( ), [ ] или { }, будет найдена её парная скобка. - 4. Чтобы заменить первое найденное слово в строке, наберите :s/что/чем Чтобы заменить все найденные слова в строке, наберите :s/что/чем/g Чтобы заменить в указанными интервале строк, наберите :#,#s/что/чем/g Чтобы заменить все найденные слова в файле, наберите :%s/что/чем/g Чтобы запрашивалось подтверждение, добавьте флаг 'c' :%s/что/чем/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.1. КАК ВЫЗВАТЬ ИЗ РЕДАКТОРА ВНЕШНЮЮ КОМАНДУ + Урок 1.5.1. КАК ВЫЗВАТЬ ИЗ РЕДАКТОРА ВНЕШНЮЮ КОМАНДУ ** Чтобы была выполнена команда командной оболочки, наберите в редакторе :! ** @@ -632,8 +644,9 @@ Важно. После ввода команды, начинающейся с : , должна быть нажата клавиша В дальнейшем это может не указываться отдельно, но подразумеваться. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.2. КАК ЗАПИСАТЬ ФАЙЛ + Урок 1.5.2. КАК ЗАПИСАТЬ ФАЙЛ ** Чтобы сохранить файл со всеми изменениями в тексте, наберите :w ФАЙЛ ** @@ -655,8 +668,9 @@ 5. Теперь удалите этот файл, набрав в редакторе команду :!del TEST (для ОС Windows) или :!rm TEST (для UNIX-подобных ОС) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.3. ВЫБОРОЧНАЯ ЗАПИСЬ СТРОК + Урок 1.5.3. ВЫБОРОЧНАЯ ЗАПИСЬ СТРОК ** Чтобы сохранить часть файла, нажмите клавишу v , выделите строки и наберите команду :w ФАЙЛ ** @@ -674,28 +688,27 @@ 5. По этой команде выбранные строки будут записаны в файл TEST. Убедитесь в наличии этого файла, воспользовавшись командой :!dir или :!ls . Не удаляйте этот файл, он потребуется на следующем уроке. - Примечание. По нажатию клавиши v выполняется переключение в визуальный режим. Чтобы изменить размер выбранной области, нужно переместить каретку. К выделенному фрагменту можно применить любой оператор, например, d для его удаления. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.4. СЧИТЫВАНИЕ И ОБЪЕДИНЕНИЕ ФАЙЛОВ + Урок 1.5.4. СЧИТЫВАНИЕ И ОБЪЕДИНЕНИЕ ФАЙЛОВ ** Чтобы вставить содержащийся в файле текст, наберите :r ФАЙЛ ** 1. Установите каретку над этой строкой. Внимание! - После выполнения описанного в пункте 2 вы увидите текст из урока 5.3. + После выполнения описанного в пункте 2 вы увидите текст из урока 1.5.3. Переместите каретку вниз по тексту до текущего урока. 2. Теперь считайте содержимое файла TEST, используя команду :r TEST , здесь TEST - это наименование файла. 3. Для проверки, что содержимое файла было вставлено, переместите каретку - вверх по тексту и удостоверьтесь, что теперь здесь два урока 5.3. - + вверх по тексту и удостоверьтесь, что теперь здесь два урока 1.5.3. - исходный и из файла TEST. Примечание. @@ -703,8 +716,9 @@ будет получен вывод команды ls и вставлен ниже позиции каретки. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - РЕЗЮМЕ УРОКА 5 + РЕЗЮМЕ УРОКА 1.5 1. По команде :!command будет исполнена указанная внешняя команда. @@ -726,16 +740,16 @@ позиции каретки. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - УРОК 6.1. КОМАНДЫ ДЛЯ СОЗДАНИЯ СТРОК + УРОК 1.6.1. КОМАНДЫ ДЛЯ СОЗДАНИЯ СТРОК ** Чтобы открыть новую строку с переключением в режим вставки, наберите o ** 1. Переместите каретку вниз, к первой строке помеченной --->. - 2. Нажмите клавишу o (латинская строчная буква o) для того, чтобы создать - пустую строку НИЖЕ позиции каретки и переключить редактор в - режим вставки. + 2. Нажмите клавишу o для того, чтобы создать пустую строку НИЖЕ позиции + каретки и переключить редактор в режим вставки. 3. Теперь наберите какой-нибудь текст и нажмите клавишу для выхода из режима вставки. @@ -749,40 +763,41 @@ ---> Создайте новую строку над этой, поместив сюда каретку и нажав SHIFT-O. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - УРОК 6.2. КОМАНДА ДЛЯ ДОБАВЛЕНИЯ ТЕКСТА + УРОК 1.6.2. КОМАНДА ДЛЯ ДОБАВЛЕНИЯ ТЕКСТА ** Чтобы вставить текст после позиции каретки, наберите a ** 1. Переместите каретку вниз, в начало первой строки помеченной --->. - 2. Нажмите клавишу e , пока каретка не окажется на последнем символе слова "стро". - 3. Нажмите клавишу a (латинская строчная буква a) для добавления текста - ПОСЛЕ символа, находящегося под кареткой. + 3. Нажмите клавишу a для добавления текста ПОСЛЕ символа, находящегося под + кареткой. 4. Допишите слово как в строке ниже. Нажмите клавишу для выхода из режима вставки. - 5. Используйте e для перехода к следующему незавершённому слову и повторите - действия, описанные в пунктах 3 и 4. + 5. Используйте клавишу e для перехода к следующему незавершённому слову + и повторите действия, описанные в пунктах 3 и 4. ----> Эта стро позволит вам попрактиков в добавле текста. ----> Эта строчка позволит вам попрактиковаться в добавлении текста. +---> На этой стро вы можете попрактиков в добавле текста. +---> На этой строке вы можете попрактиковаться в добавлении текста. Примечание. По команде a , i и A будет выполнено переключение в один и тот же режим вставки, различие только в том, где вставляются символы. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.3. ЕЩЁ ОДИН СПОСОБ ЗАМЕНЫ + Урок 1.6.3. ЕЩЁ ОДИН СПОСОБ ЗАМЕНЫ ** Чтобы заменить несколько символов в строке, наберите R ** 1. Переместите каретку в начало первого слова xxx в строке помеченной ---> - 2. Теперь нажмите SHIFT-R (латинская прописная буква R) и введите число, - указанное ниже во второй строке, чтобы заменить символы xxx. + 2. Теперь нажмите SHIFT-R и введите число, указанное ниже во второй строке, + чтобы заменить символы xxx. 3. Нажмите клавишу для выхода из режима замены. Заметьте, что остаток строки не был изменён. @@ -799,15 +814,14 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.4. КОПИРОВАНИЕ И ВСТАВКА ТЕКСТА + Урок 1.6.4. КОПИРОВАНИЕ И ВСТАВКА ТЕКСТА ** Чтобы копировать, используйте оператор y , чтобы вставить - команду p ** - 1. Установите каретку после символов "а)" в строке помеченной --->. + 1. Установите каретку после символов "а)" в строке, помеченной --->. 2. Переключите редактор в визуальный режим командой v и переместите каретку вперёд до слова "первый". - 3. Нажмите клавишу y (латинская строчная буква y) для копирования - подсвеченного текста. + 3. Нажмите клавишу y для копирования подсвеченного текста. 4. Переместите каретку в конец следующей строки, набрав команду j$ . 5. Нажмите клавишу p для вставки текста. Затем наберите команду a , напечатайте слово "второй" и нажмите клавишу . @@ -821,8 +835,10 @@ Можно воспользоваться командой yw (оператор y и объект w) для копирования одного слова. По команде yy будет скопирована целая строка, а по команде p вставлена. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.5. УСТАНОВКА ПАРАМЕТРОВ + Урок 1.6.5. УСТАНОВКА ПАРАМЕТРОВ ** Чтобы при поиске или замене не учитывался регистр символов, задайте соответствующие настройки ** @@ -840,40 +856,37 @@ 5. Повторно введите команду поиска и посмотрите, что получится /игнорировать 6. Для возврата учёта регистра при поиске, введите команду :set noic - Примечание. - Для отключения подсветки совпадений наберите команду :nohlsearch + Для отключения подсветки совпадений, наберите команду :nohlsearch Примечание. Если требуется не учитывать регистр символов только единоразово, используйте ключ \c в команде поиска, например, /игнорировать\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - РЕЗЮМЕ УРОКА 6 + РЕЗЮМЕ УРОКА 1.6 1. По команде o будет создана пустая строка ниже строки с кареткой и редактор будет переключен в режим вставки По команде O будет создана пустая строка выше строки с кареткой и редактор будет переключен в режим вставки - 2. По команде a выполняется вставки текста ПОСЛЕ позиции каретки. По команде A выполняется вставки текста в конце строки. 3. По команде e выполняется установка каретки в конце слова. - 4. Оператор y используется для копирования текста, а по команде p происходит вставка скопированного текста. 5. При нажатии клавиш SHIFT-R выполняется переключение в режим замены, а отключение - нажатием клавиши . - 6. Наберите ":set xxx" для установки параметра 'xxx'. + 6. Наберите :set xxx для установки параметра 'xxx'. Вот некоторые параметры (можно указывать полные или сокращённые наименования): 'ic' 'ignorecase' игнорирование регистра символов при поиске 'is' 'incsearch' отображение частичных совпадений при поиске 'hls' 'hlsearch' подсветка всех совпадений при поиске - 7. Для отключения параметра добавьте приставку "no" к его названию :set noic + 7. Для сброса параметра, добавьте приставку "no" к его названию :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - УРОК 7.1. ВСТРОЕННАЯ СПРАВОЧНАЯ СИСТЕМА + УРОК 1.7.1. ВСТРОЕННАЯ СПРАВОЧНАЯ СИСТЕМА ** Используйте встроенную справочную систему ** @@ -897,7 +910,7 @@ :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 7.2. СОЗДАНИЕ СТАРТОВОГО КОМАНДНОГО ФАЙЛА + Урок 1.7.2. СОЗДАНИЕ СТАРТОВОГО КОМАНДНОГО ФАЙЛА ** Включим все возможности Vim ** @@ -921,7 +934,7 @@ "vimrc". Чтобы получить подробную информацию, наберите :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - УРОК 7.3. ПОДСТАНОВКА КОМАНД + УРОК 1.7.3. ПОДСТАНОВКА КОМАНД ** Подстановка в командной строке выполняется нажатием клавиш CTRL-D и ** @@ -933,7 +946,7 @@ 4. Нажмите клавиши CTRL-D , и будет показан перечень команд редактора Vim начинающихся с буквы "e". 5. Нажмите клавиши d , и будет подставлено полное название команды - ":edit". + "edit". 6. Теперь напечатайте пробел и начало наименования существующего файла :edit TE 7. Нажмите клавишу и будет подставлено наименование файла, если оно @@ -943,8 +956,9 @@ Подстановка работает для множества команд. Просто попробуйте нажать клавиши CTRL-D и для любой из команд редактора. Это особенно полезно для команды :help . + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - РЕЗЮМЕ УРОКА 7 + РЕЗЮМЕ УРОКА 1.7 1. Чтобы открыть окно встроенной справочной системы редактора, наберите @@ -966,31 +980,34 @@ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + На этом можно завершить первую часть занятий посвящённых редактору Vim. + Далее вы можете ознакомиться со второй частью занятий. + + Целью данного курса было дать краткий обзор редактора Vim, достаточный для + того, чтобы не возникало сложностей при его использовании. Это далеко не + полный обзор, поскольку в редакторе Vim есть ещё много-много команд. - На этом позвольте завершить наши занятия посвящённые редактору Vim. Уроки, - представленные в рамках данного курса, должны были дать вам общее - представление о работе с редактором, достаточное для того, чтобы не возникало - сложностей при его использовании. Эти занятия, как вы понимаете, не позволяют - описать все доступные команды. Чтобы расширить свои познания, ознакомьтесь с - руководством пользователя, набрав команду :help user-manual. + Чтобы расширить свои познания, ознакомьтесь с руководством пользователя, + набрав команду :help user-manual. Для дальнейшего чтения рекомендуется книга "Vim - Vi Improved", автор Steve Oualline, издательство New Riders. - Эта книга полностью посвящена программе Vim и будет особенно полезна новичкам. + Она полностью посвящена редактору Vim и будет особенно полезна новичкам. В книге имеется множество примеров и иллюстраций. См. https://iccf-holland.org/click5.html - Следующая книга более почтенного возраста и посвящена больше редактору Vi, + Ещё одна книга более почтенного возраста и посвящена больше редактору Vi, чем редактору Vim, однако также рекомендуется к прочтению "Learning the Vi Editor", автор Linda Lamb, издательство O'Reilly & Associates Inc. Это хорошая книга, чтобы узнать всё, что только можно сделать в редакторе Vi. - Шестое издание также включает информацию о редакторе Vim. + Шестое издание этой книги включает информацию о редакторе Vim. Эти уроки были составлены Michael C. Pierce и Robert K. Ware из Colorado School of Mines с учётом идей, предложенных Charles Smith из Colorado State - University. E-mail: bware@mines.colorado.edu. + University. E-mail: bware@mines.colorado.edu (теперь недоступен). Уроки доработаны Bram Moolenaar для использования в редакторе Vim. diff --git a/usr/share/vim/vim91/tutor/tutor.sk b/usr/share/vim/vim91/tutor/tutor1.sk similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.sk rename to usr/share/vim/vim91/tutor/tutor1.sk index 35b04c804bf..a34cd0ac5e6 100644 --- a/usr/share/vim/vim91/tutor/tutor.sk +++ b/usr/share/vim/vim91/tutor/tutor1.sk @@ -19,11 +19,11 @@ uenie sprvne. Ak len itas text, prkazy zabudne! Presved sa, e Caps-Lock NIEJE stlaen a stlat klvesu - j niekoko krt, aby sa kurzor posunul natoko, e lekcia 1.1 + j niekoko krt, aby sa kurzor posunul natoko, e lekcia 1.1.1 celkom zapln obrazovku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.1: POHYB KURZOROM + Lekcia 1.1.1: POHYB KURZOROM ** Pre pohyb kurzorum stla klvesy h,j,k,l ako je znzornen. ** @@ -37,7 +37,7 @@ 2. Dr stlaen klvesu pre pohyb dole (j), km sa jej funkcia nezopakuje. ---> Teraz sa u vie pohybova na nasledujcu lekciu. - 3. Pouitm klvesy pre pohyb dole prejdi na Lekciu 1.2. + 3. Pouitm klvesy pre pohyb dole prejdi na Lekciu 1.1.2. Poznmka: Ak si niesi ist tm o si napsal, stla na prechod do normlneho mdu. @@ -46,7 +46,7 @@ Pozn schopn pohybova rchlejie, ke si zvykne ich pouva. Naozaj! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 1.2: ZATVRANIE VIMU + LEKCIA 1.1.2: ZATVRANIE VIMU !! POZNMKA: Pred vykonanm tchto krokov si pretaj cel tto lekciu !! @@ -65,10 +65,10 @@ Pozn POZNMKA: :q! neulo zmeny, ktor si vykonal. O niekoko lekci sa nau ako uloi zmeny do sboru - 5. presu kurzor dole na lekciu 1.3. + 5. presu kurzor dole na lekciu 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.3: EDITCIA TEXTU - MAZANIE + Lekcia 1.1.3: EDITCIA TEXTU - MAZANIE ** Stlaenie klvesy x v normlnom mde zmae znak na mieste kurzora. ** @@ -84,14 +84,14 @@ POZN ---> Kraava skooilla ccezz mesiiac. - 5. Ak je veta sprvna, prejdi na lekciu 1.4. + 5. Ak je veta sprvna, prejdi na lekciu 1.1.4. POZNMKA: Neskaj si zapamta obsah tejto vuky, ale sa u pouvanm. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.4: EDITCIA TEXTU - VKLADANIE + Lekcia 1.1.4: EDITCIA TEXTU - VKLADANIE ** Stlaenie klvesy i umouje vkladanie textu. ** @@ -113,7 +113,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.5: EDITCIA TEXTU - PRIDVANIE + Lekcia 1.1.5: EDITCIA TEXTU - PRIDVANIE ** Stlaenie klvesy A umouje pridva text. ** @@ -133,18 +133,18 @@ POZN ---> Tu tie chba nej Tu tie chba nejak text. - 5. Ke sa dostatone nau pridva text, prejdi na lekciu 1.6. + 5. Ke sa dostatone nau pridva text, prejdi na lekciu 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.6: EDITCIA SBORU + Lekcia 1.1.6: EDITCIA SBORU ** Napsanm :wq sa sbor ulo a zavrie ** !! POZNMKA: Pred vykonanm tchto krokov si pretaj cel lekciu!! -1. Opusti tto vuku, ako si to urobil v lekcii 1.2: :q! +1. Opusti tto vuku, ako si to urobil v lekcii 1.1.2: :q! 2. Do prkazovho riadku nap prkaz: vim tutor 'vim' je prkaz, ktor spust editor Vim, 'tutor' je meno sboru, @@ -160,7 +160,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZHRNUTIE LEKCIE 1 + ZHRNUTIE LEKCIE 1.1 1. Kurzor sa pohybuje pouitm klves so pkami alebo klvesmi hjkl. @@ -180,11 +180,11 @@ POZN POZNMKA: Stlaenie a premiestn do normlneho mdu alebo zru nejak nechcen a iastone dokonen prkaz. -Teraz pokrauj lekciou 2. +Teraz pokrauj lekciou 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.1: Mazacie prkazy + Lekcia 1.2.1: Mazacie prkazy ** Napsanie prkazu dw zmae znaky do konca slova. ** @@ -204,12 +204,12 @@ POZN ---> Tu je niekoko slov zbava, ktor nie patria list do tejto vety. -5. Zopakuj kroky 3 a 4 km veta nieje sprvna a prejdi na lekciu 2.2. +5. Zopakuj kroky 3 a 4 km veta nieje sprvna a prejdi na lekciu 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.2: VIAC MAZACCH PRKAZOV + Lekcia 1.2.2: VIAC MAZACCH PRKAZOV ** Napsanie prkazu d$ zmae znaky do konca riadku ** @@ -225,11 +225,11 @@ POZN ---> Niekto napsal koniec tohto riadku dvakrt. koniec tohot riadku dvakrt. -5. Prejdi na lekciu 2.3 pre pochopenie toho o sa stalo. +5. Prejdi na lekciu 1.2.3 pre pochopenie toho o sa stalo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.3: OPERTORY A POHYBY + Lekcia 1.2.3: OPERTORY A POHYBY Vea prkazov, ktor menia text s odvoden od opertorov a pohybov. Formt pre prkaz mazania klvesou d je nasledovn: @@ -251,7 +251,7 @@ POZN sa presunie kurzor tak ako je to pecivikovan. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.4: Pouitie viacnsobnho pohybu + Lekcia 1.2.4: Pouitie viacnsobnho pohybu ** Napsanm sla pred pohyb ho zopakuje zadn poet krt ** @@ -268,11 +268,11 @@ POZN ---> Toto je riadok so slovami po kotrch sa mete pohybova. - 6. Prejdi na lekciu 2.5. + 6. Prejdi na lekciu 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.5: POUITIE VIACNSOBNHO MAZANIA PRE HROMADN MAZANIE + Lekcia 1.2.5: POUITIE VIACNSOBNHO MAZANIA PRE HROMADN MAZANIE ** Napsanie sla spolu s opertorom ho zopakuje zadan poet krt ** @@ -296,7 +296,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.6: OPERCIE S RIADKAMI + Lekcia 1.2.6: OPERCIE S RIADKAMI ** Napsanie prkazu dd zmae cel riadok. ** @@ -319,7 +319,7 @@ Vzh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.7: PRKAZ UNDO + Lekcia 1.2.7: PRKAZ UNDO ** Stla u pre vrtenie poslednho prkazu, U pre pravu celho riadku. ** @@ -336,13 +336,13 @@ Vzh ---> Opprav chybby nna toomto riadku a zmee ich pommocou undo. - 8. Tieto prkazy s asto pouvan. Teraz prejdi na zhrnutie lekcie 2. + 8. Tieto prkazy s asto pouvan. Teraz prejdi na zhrnutie lekcie 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 2 ZHRNUTIE + LEKCIA 1.2 ZHRNUTIE 1. Pre zmazanie znakov od kurzora do konca slova nap: dw @@ -369,7 +369,7 @@ Vzh Pre vrtenie vrtench prav nap: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.1: PRKAZ VLOI + Lekcia 1.3.1: PRKAZ VLOI ** Napsanie prkazu p vlo psledn vmaz za kurzor. ** @@ -392,7 +392,7 @@ Vzh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.2: PRKAZ NAHRADENIA + Lekcia 1.3.2: PRKAZ NAHRADENIA ** Napsanm rx sa nahrad znak na mieste kurzora znakom x . ** @@ -408,14 +408,14 @@ Vzh ---> Ka bol tento riasok paan, niekro stlail nesprbne klvesy! ---> Ke bol tento riadok psan, niekto stlail nesprvne klvesy! - 5. Teraz prejdi na lekciu 3.2. + 5. Teraz prejdi na lekciu 1.3.2. POZNMKA: Pamtaj si, e naui sa me len pouvanim, nie pamtanm. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.3. PRKAZ PRAVY + Lekcia 1.3.3: PRKAZ PRAVY ** Ak chce zmeni as slova do konca slova, nap ce . ** @@ -438,7 +438,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.4: VIAC ZMIEN POUITM c + Lekcia 1.3.4: VIAC ZMIEN POUITM c ** Prkaz pre pravy sa pouva s rovnakmi pohybmi ako pre mazanie ** @@ -463,7 +463,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 3 ZHRNUTIE + LEKCIA 1.3 ZHRNUTIE 1. Na vloenie textu, ktor u bol zmazan, nap p . To vlo zmazan @@ -486,7 +486,7 @@ Teraz prejdi na nalseduj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.1: POZCIA A STATUS SBORU + Lekcia 1.4.1: POZCIA A STATUS SBORU ** Stla CTRL-g pre zobrazenie svojej pozcie v sbore a statusu sboru. @@ -509,7 +509,7 @@ Teraz prejdi na nalseduj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.2: PRKAZ VYHADVANIA + Lekcia 1.4.2: PRKAZ VYHADVANIA ** Nap / nasledovan reazcom pre vyhadanie prslunho reazca. ** @@ -536,7 +536,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.3: VYHADVANIE ZODPOVEDAJCICH ZTAVORIEK + Lekcia 1.4.3: VYHADVANIE ZODPOVEDAJCICH ZTAVORIEK ** Nap % pre vyhadanie prslunho znaku ),], alebo } . ** @@ -561,7 +561,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.4: PRKAZ NAHRADENIA + Lekcia 1.4.4: PRKAZ NAHRADENIA ** Nap :s/star/nov/g pre nahradenie slova 'star' za slovo 'nov'. ** @@ -586,7 +586,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 4 ZHRNUTIE + LEKCIA 1.4 ZHRNUTIE 1. CTRL-g vype tvoju pozciu v sbore a status sboru. @@ -611,7 +611,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.1 AKO SPUSTI VONKAJ PRKAZ + Lekcia 1.5.1: AKO SPUSTI VONKAJ PRKAZ ** Nap prkaz :! nasledovan vonkajm prkazom pre spustenie prkazu ** @@ -633,7 +633,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.2: VIAC O UKLADAN SBOROV + Lekcia 1.5.2: VIAC O UKLADAN SBOROV ** Pre uloenie zmien v sbore, nap :w FILENAME. ** @@ -656,7 +656,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.3 VBER TEXTU PRE ULOENIE + Lekcia 1.5.3: VBER TEXTU PRE ULOENIE ** Pre uloenie asti sboru, nap v pohyb :w FILENAME ** @@ -681,14 +681,14 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.4: VBER A ZLUOVANIE SBOROV + Lekcia 1.5.4: VBER A ZLUOVANIE SBOROV ** Pre vloenie obsahu sboru, nap :r FILENAME ** 1. Premiestni kurzor nad tento riadok. -POZNMKA: Po vykonan kroku 2 uvid text z lekcie 5.3. Potom sa presu +POZNMKA: Po vykonan kroku 2 uvid text z lekcie 1.5.3. Potom sa presu dole, aby si videl tto lekciu. 3. Teraz vlo sbor TEST pouitm prkazu :r TEST kde TEST je nzov @@ -699,7 +699,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 5 ZHRNUTIE + LEKCIA 1.5 ZHRNUTIE 1. :!prkaz spust vonkaj prkaz. @@ -722,7 +722,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.1: PRKAZ OTVORI + Lekcia 1.6.1: PRKAZ OTVORI ** Nap o pre vloenie riadku pod kurzor a prepnutie do vkladacieho mdu ** @@ -746,7 +746,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.2: PRKAZ PRIDA + Lekcia 1.6.2: PRKAZ PRIDA ** Nap a pre vloenie textu ZA kurzor. ** @@ -770,7 +770,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.3: IN SPOSOB NAHRADZOVANIA + Lekcia 1.6.3: IN SPOSOB NAHRADZOVANIA ** Nap vek R pre nahradenie viac ako jednho znaku. ** @@ -795,7 +795,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.4: Copy Paste textu + Lekcia 1.6.4: Copy Paste textu ** pou opertor y pre copy textku a p pre jeho paste ** @@ -820,7 +820,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.5: NASTAVENIE MONOST + Lekcia 1.6.5: NASTAVENIE MONOST ** Nastav monosti, take vyhadvanie alebo nahradzovanie ignoruje @@ -851,7 +851,7 @@ POZN pouitie vyhadvacieho prkazu, poui \c: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 6 ZHRNUTIE + LEKCIA 1.6 ZHRNUTIE 1. Nap o pre otvorenie riadku pod kurzorom a tart vkladacieho mdu. @@ -882,7 +882,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.1: ZSKANIE NPOVEDY + LEKCIA 1.7.1: ZSKANIE NPOVEDY ** Pouvaj on-line systm npovedy ** @@ -907,7 +907,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.2: VYTVORENIE TARTOVACIEHO SKRIPTU + LEKCIA 1.7.2: VYTVORENIE TARTOVACIEHO SKRIPTU ** Zapni funkcie editora Vim ** @@ -931,7 +931,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.3 DOKONENIE + LEKCIA 1.7.3: DOKONENIE ** Dokoni prkaz na prkazovom riadku pouitm CTRL-D a ** @@ -956,7 +956,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7 ZHRNUTIE + LEKCIA 1.7 ZHRNUTIE 1. Nap :help alebo stla alebo pre otvorenie okna npovedy. diff --git a/usr/share/vim/vim91/tutor/tutor.sk.cp1250 b/usr/share/vim/vim91/tutor/tutor1.sk.cp1250 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.sk.cp1250 rename to usr/share/vim/vim91/tutor/tutor1.sk.cp1250 index a1aee207c5f..1e6543e5c01 100644 --- a/usr/share/vim/vim91/tutor/tutor.sk.cp1250 +++ b/usr/share/vim/vim91/tutor/tutor1.sk.cp1250 @@ -19,11 +19,11 @@ uenie sprvne. Ak len itas text, prkazy zabudne! Presved sa, e Caps-Lock NIEJE stlaen a stlat klvesu - j niekoko krt, aby sa kurzor posunul natoko, e lekcia 1.1 + j niekoko krt, aby sa kurzor posunul natoko, e lekcia 1.1.1 celkom zapln obrazovku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.1: POHYB KURZOROM + Lekcia 1.1.1: POHYB KURZOROM ** Pre pohyb kurzorum stla klvesy h,j,k,l ako je znzornen. ** @@ -37,7 +37,7 @@ 2. Dr stlaen klvesu pre pohyb dole (j), km sa jej funkcia nezopakuje. ---> Teraz sa u vie pohybova na nasledujcu lekciu. - 3. Pouitm klvesy pre pohyb dole prejdi na Lekciu 1.2. + 3. Pouitm klvesy pre pohyb dole prejdi na Lekciu 1.1.2. Poznmka: Ak si niesi ist tm o si napsal, stla na prechod do normlneho mdu. @@ -46,7 +46,7 @@ Pozn schopn pohybova rchlejie, ke si zvykne ich pouva. Naozaj! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 1.2: ZATVRANIE VIMU + LEKCIA 1.1.2: ZATVRANIE VIMU !! POZNMKA: Pred vykonanm tchto krokov si pretaj cel tto lekciu !! @@ -65,10 +65,10 @@ Pozn POZNMKA: :q! neulo zmeny, ktor si vykonal. O niekoko lekci sa nau ako uloi zmeny do sboru - 5. presu kurzor dole na lekciu 1.3. + 5. presu kurzor dole na lekciu 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.3: EDITCIA TEXTU - MAZANIE + Lekcia 1.1.3: EDITCIA TEXTU - MAZANIE ** Stlaenie klvesy x v normlnom mde zmae znak na mieste kurzora. ** @@ -84,14 +84,14 @@ POZN ---> Kraava skooilla ccezz mesiiac. - 5. Ak je veta sprvna, prejdi na lekciu 1.4. + 5. Ak je veta sprvna, prejdi na lekciu 1.1.4. POZNMKA: Neskaj si zapamta obsah tejto vuky, ale sa u pouvanm. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.4: EDITCIA TEXTU - VKLADANIE + Lekcia 1.1.4: EDITCIA TEXTU - VKLADANIE ** Stlaenie klvesy i umouje vkladanie textu. ** @@ -113,7 +113,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.5: EDITCIA TEXTU - PRIDVANIE + Lekcia 1.1.5: EDITCIA TEXTU - PRIDVANIE ** Stlaenie klvesy A umouje pridva text. ** @@ -133,18 +133,18 @@ POZN ---> Tu tie chba nej Tu tie chba nejak text. - 5. Ke sa dostatone nau pridva text, prejdi na lekciu 1.6. + 5. Ke sa dostatone nau pridva text, prejdi na lekciu 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.6: EDITCIA SBORU + Lekcia 1.1.6: EDITCIA SBORU ** Napsanm :wq sa sbor ulo a zavrie ** !! POZNMKA: Pred vykonanm tchto krokov si pretaj cel lekciu!! -1. Opusti tto vuku, ako si to urobil v lekcii 1.2: :q! +1. Opusti tto vuku, ako si to urobil v lekcii 1.1.2: :q! 2. Do prkazovho riadku nap prkaz: vim tutor 'vim' je prkaz, ktor spust editor Vim, 'tutor' je meno sboru, @@ -160,7 +160,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZHRNUTIE LEKCIE 1 + ZHRNUTIE LEKCIE 1.1 1. Kurzor sa pohybuje pouitm klves so pkami alebo klvesmi hjkl. @@ -180,11 +180,11 @@ POZN POZNMKA: Stlaenie a premiestn do normlneho mdu alebo zru nejak nechcen a iastone dokonen prkaz. -Teraz pokrauj lekciou 2. +Teraz pokrauj lekciou 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.1: Mazacie prkazy + Lekcia 1.2.1: Mazacie prkazy ** Napsanie prkazu dw zmae znaky do konca slova. ** @@ -204,12 +204,12 @@ POZN ---> Tu je niekoko slov zbava, ktor nie patria list do tejto vety. -5. Zopakuj kroky 3 a 4 km veta nieje sprvna a prejdi na lekciu 2.2. +5. Zopakuj kroky 3 a 4 km veta nieje sprvna a prejdi na lekciu 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.2: VIAC MAZACCH PRKAZOV + Lekcia 1.2.2: VIAC MAZACCH PRKAZOV ** Napsanie prkazu d$ zmae znaky do konca riadku ** @@ -225,11 +225,11 @@ POZN ---> Niekto napsal koniec tohto riadku dvakrt. koniec tohot riadku dvakrt. -5. Prejdi na lekciu 2.3 pre pochopenie toho o sa stalo. +5. Prejdi na lekciu 1.2.3 pre pochopenie toho o sa stalo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.3: OPERTORY A POHYBY + Lekcia 1.2.3: OPERTORY A POHYBY Vea prkazov, ktor menia text s odvoden od opertorov a pohybov. Formt pre prkaz mazania klvesou d je nasledovn: @@ -251,7 +251,7 @@ POZN sa presunie kurzor tak ako je to pecivikovan. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.4: Pouitie viacnsobnho pohybu + Lekcia 1.2.4: Pouitie viacnsobnho pohybu ** Napsanm sla pred pohyb ho zopakuje zadn poet krt ** @@ -268,11 +268,11 @@ POZN ---> Toto je riadok so slovami po kotrch sa mete pohybova. - 6. Prejdi na lekciu 2.5. + 6. Prejdi na lekciu 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.5: POUITIE VIACNSOBNHO MAZANIA PRE HROMADN MAZANIE + Lekcia 1.2.5: POUITIE VIACNSOBNHO MAZANIA PRE HROMADN MAZANIE ** Napsanie sla spolu s opertorom ho zopakuje zadan poet krt ** @@ -296,7 +296,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.6: OPERCIE S RIADKAMI + Lekcia 1.2.6: OPERCIE S RIADKAMI ** Napsanie prkazu dd zmae cel riadok. ** @@ -319,7 +319,7 @@ Vzh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.7: PRKAZ UNDO + Lekcia 1.2.7: PRKAZ UNDO ** Stla u pre vrtenie poslednho prkazu, U pre pravu celho riadku. ** @@ -336,13 +336,13 @@ Vzh ---> Opprav chybby nna toomto riadku a zmee ich pommocou undo. - 8. Tieto prkazy s asto pouvan. Teraz prejdi na zhrnutie lekcie 2. + 8. Tieto prkazy s asto pouvan. Teraz prejdi na zhrnutie lekcie 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 2 ZHRNUTIE + LEKCIA 1.2 ZHRNUTIE 1. Pre zmazanie znakov od kurzora do konca slova nap: dw @@ -369,7 +369,7 @@ Vzh Pre vrtenie vrtench prav nap: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.1: PRKAZ VLOI + Lekcia 1.3.1: PRKAZ VLOI ** Napsanie prkazu p vlo psledn vmaz za kurzor. ** @@ -392,7 +392,7 @@ Vzh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.2: PRKAZ NAHRADENIA + Lekcia 1.3.2: PRKAZ NAHRADENIA ** Napsanm rx sa nahrad znak na mieste kurzora znakom x . ** @@ -408,14 +408,14 @@ Vzh ---> Ka bol tento riasok paan, niekro stlail nesprbne klvesy! ---> Ke bol tento riadok psan, niekto stlail nesprvne klvesy! - 5. Teraz prejdi na lekciu 3.2. + 5. Teraz prejdi na lekciu 1.3.2. POZNMKA: Pamtaj si, e naui sa me len pouvanim, nie pamtanm. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.3. PRKAZ PRAVY + Lekcia 1.3.3: PRKAZ PRAVY ** Ak chce zmeni as slova do konca slova, nap ce . ** @@ -438,7 +438,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.4: VIAC ZMIEN POUITM c + Lekcia 1.3.4: VIAC ZMIEN POUITM c ** Prkaz pre pravy sa pouva s rovnakmi pohybmi ako pre mazanie ** @@ -463,7 +463,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 3 ZHRNUTIE + LEKCIA 1.3 ZHRNUTIE 1. Na vloenie textu, ktor u bol zmazan, nap p . To vlo zmazan @@ -486,7 +486,7 @@ Teraz prejdi na nalseduj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.1: POZCIA A STATUS SBORU + Lekcia 1.4.1: POZCIA A STATUS SBORU ** Stla CTRL-g pre zobrazenie svojej pozcie v sbore a statusu sboru. @@ -509,7 +509,7 @@ Teraz prejdi na nalseduj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.2: PRKAZ VYHADVANIA + Lekcia 1.4.2: PRKAZ VYHADVANIA ** Nap / nasledovan reazcom pre vyhadanie prslunho reazca. ** @@ -536,7 +536,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.3: VYHADVANIE ZODPOVEDAJCICH ZTAVORIEK + Lekcia 1.4.3: VYHADVANIE ZODPOVEDAJCICH ZTAVORIEK ** Nap % pre vyhadanie prslunho znaku ),], alebo } . ** @@ -561,7 +561,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.4: PRKAZ NAHRADENIA + Lekcia 1.4.4: PRKAZ NAHRADENIA ** Nap :s/star/nov/g pre nahradenie slova 'star' za slovo 'nov'. ** @@ -586,7 +586,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 4 ZHRNUTIE + LEKCIA 1.4 ZHRNUTIE 1. CTRL-g vype tvoju pozciu v sbore a status sboru. @@ -611,7 +611,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.1 AKO SPUSTI VONKAJ PRKAZ + Lekcia 1.5.1: AKO SPUSTI VONKAJ PRKAZ ** Nap prkaz :! nasledovan vonkajm prkazom pre spustenie prkazu ** @@ -633,7 +633,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.2: VIAC O UKLADAN SBOROV + Lekcia 1.5.2: VIAC O UKLADAN SBOROV ** Pre uloenie zmien v sbore, nap :w FILENAME. ** @@ -656,7 +656,7 @@ Pozn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.3 VBER TEXTU PRE ULOENIE + Lekcia 1.5.3: VBER TEXTU PRE ULOENIE ** Pre uloenie asti sboru, nap v pohyb :w FILENAME ** @@ -681,14 +681,14 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.4: VBER A ZLUOVANIE SBOROV + Lekcia 1.5.4: VBER A ZLUOVANIE SBOROV ** Pre vloenie obsahu sboru, nap :r FILENAME ** 1. Premiestni kurzor nad tento riadok. -POZNMKA: Po vykonan kroku 2 uvid text z lekcie 5.3. Potom sa presu +POZNMKA: Po vykonan kroku 2 uvid text z lekcie 1.5.3. Potom sa presu dole, aby si videl tto lekciu. 3. Teraz vlo sbor TEST pouitm prkazu :r TEST kde TEST je nzov @@ -699,7 +699,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 5 ZHRNUTIE + LEKCIA 1.5 ZHRNUTIE 1. :!prkaz spust vonkaj prkaz. @@ -722,7 +722,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.1: PRKAZ OTVORI + Lekcia 1.6.1: PRKAZ OTVORI ** Nap o pre vloenie riadku pod kurzor a prepnutie do vkladacieho mdu ** @@ -746,7 +746,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.2: PRKAZ PRIDA + Lekcia 1.6.2: PRKAZ PRIDA ** Nap a pre vloenie textu ZA kurzor. ** @@ -770,7 +770,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.3: IN SPOSOB NAHRADZOVANIA + Lekcia 1.6.3: IN SPOSOB NAHRADZOVANIA ** Nap vek R pre nahradenie viac ako jednho znaku. ** @@ -795,7 +795,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.4: Copy Paste textu + Lekcia 1.6.4: Copy Paste textu ** pou opertor y pre copy textku a p pre jeho paste ** @@ -820,7 +820,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.5: NASTAVENIE MONOST + Lekcia 1.6.5: NASTAVENIE MONOST ** Nastav monosti, take vyhadvanie alebo nahradzovanie ignoruje @@ -851,7 +851,7 @@ POZN pouitie vyhadvacieho prkazu, poui \c: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 6 ZHRNUTIE + LEKCIA 1.6 ZHRNUTIE 1. Nap o pre otvorenie riadku pod kurzorom a tart vkladacieho mdu. @@ -882,7 +882,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.1: ZSKANIE NPOVEDY + LEKCIA 1.7.1: ZSKANIE NPOVEDY ** Pouvaj on-line systm npovedy ** @@ -907,7 +907,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.2: VYTVORENIE TARTOVACIEHO SKRIPTU + LEKCIA 1.7.2: VYTVORENIE TARTOVACIEHO SKRIPTU ** Zapni funkcie editora Vim ** @@ -931,7 +931,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.3 DOKONENIE + LEKCIA 1.7.3: DOKONENIE ** Dokoni prkaz na prkazovom riadku pouitm CTRL-D a ** @@ -956,7 +956,7 @@ POZN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7 ZHRNUTIE + LEKCIA 1.7 ZHRNUTIE 1. Nap :help alebo stla alebo pre otvorenie okna npovedy. @@ -1005,4 +1005,4 @@ POZN Preklad do Sloveniny: ubo elko e-mail: celbos@inmail.sk Last Change: 2006 Apr 18 - encoding: cp1250 + encoding: iso8859-2 diff --git a/usr/share/vim/vim91/tutor/tutor.sk.utf-8 b/usr/share/vim/vim91/tutor/tutor1.sk.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.sk.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.sk.utf-8 index d25e9cbfe99..523a300a01b 100644 --- a/usr/share/vim/vim91/tutor/tutor.sk.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.sk.utf-8 @@ -19,11 +19,11 @@ učenie správne. Ak len čitas text, príkazy zabudneš! Presvedč sa, že Caps-Lock NIEJE stlačený a stlačt klávesu - j niekoľko krát, aby sa kurzor posunul natoľko, že lekcia 1.1 + j niekoľko krát, aby sa kurzor posunul natoľko, že lekcia 1.1.1 celkom zaplní obrazovku. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.1: POHYB KURZOROM + Lekcia 1.1.1: POHYB KURZOROM ** Pre pohyb kurzorum stlač klávesy h,j,k,l ako je znázornené. ** @@ -37,7 +37,7 @@ 2. Drž stlačenú klávesu pre pohyb dole (j), kým sa jej funkcia nezopakuje. ---> Teraz sa už vieš pohybovať na nasledujúcu lekciu. - 3. Použitím klávesy pre pohyb dole prejdi na Lekciu 1.2. + 3. Použitím klávesy pre pohyb dole prejdi na Lekciu 1.1.2. Poznámka: Ak si niesi istý tým čo si napísal, stlač na prechod do normálneho módu. @@ -46,7 +46,7 @@ Poznámka: Kurzorové klávesy sú tiež funkčné. Ale používaním hjkl sa bu schopný pohybovať rýchlejšie, keď si zvykneš ich používať. Naozaj! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 1.2: ZATVÁRANIE VIMU + LEKCIA 1.1.2: ZATVÁRANIE VIMU !! POZNÁMKA: Pred vykonaním týchto krokov si prečítaj celú túto lekciu !! @@ -65,10 +65,10 @@ Poznámka: Kurzorové klávesy sú tiež funkčné. Ale používaním hjkl sa bu POZNÁMKA: :q! neuloží zmeny, ktoré si vykonal. O niekoľko lekcií sa naučíš ako uložiť zmeny do súboru - 5. presuň kurzor dole na lekciu 1.3. + 5. presuň kurzor dole na lekciu 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.3: EDITÁCIA TEXTU - MAZANIE + Lekcia 1.1.3: EDITÁCIA TEXTU - MAZANIE ** Stlačenie klávesy x v normálnom móde zmaže znak na mieste kurzora. ** @@ -84,14 +84,14 @@ POZNÁMKA: :q! neuloží zmeny, ktoré si vykonal. O niekoľko lekcií ---> Kraava skoočilla ccezz mesiiac. - 5. Ak je veta správna, prejdi na lekciu 1.4. + 5. Ak je veta správna, prejdi na lekciu 1.1.4. POZNÁMKA: Neskúšaj si zapamätať obsah tejto výuky, ale sa uč používaním. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.4: EDITÁCIA TEXTU - VKLADANIE + Lekcia 1.1.4: EDITÁCIA TEXTU - VKLADANIE ** Stlačenie klávesy i umožňuje vkladanie textu. ** @@ -113,7 +113,7 @@ POZNÁMKA: Neskúšaj si zapamätať obsah tejto výuky, ale sa uč používaní ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.5: EDITÁCIA TEXTU - PRIDÁVANIE + Lekcia 1.1.5: EDITÁCIA TEXTU - PRIDÁVANIE ** Stlačenie klávesy A umožňuje pridávať text. ** @@ -133,18 +133,18 @@ POZNÁMKA: Neskúšaj si zapamätať obsah tejto výuky, ale sa uč používaní ---> Tu tiež chýba nej Tu tiež chýba nejaký text. - 5. Keď sa dostatočne naučíš pridávať text, prejdi na lekciu 1.6. + 5. Keď sa dostatočne naučíš pridávať text, prejdi na lekciu 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 1.6: EDITÁCIA SÚBORU + Lekcia 1.1.6: EDITÁCIA SÚBORU ** Napísaním :wq sa súbor uloží a zavrie ** !! POZNÁMKA: Pred vykonaním týchto krokov si prečítaj celú lekciu!! -1. Opusti túto výuku, ako si to urobil v lekcii 1.2: :q! +1. Opusti túto výuku, ako si to urobil v lekcii 1.1.2: :q! 2. Do príkazového riadku napíš príkaz: vim tutor 'vim' je príkaz, ktorý spustí editor Vim, 'tutor' je meno súboru, @@ -160,7 +160,7 @@ POZNÁMKA: Neskúšaj si zapamätať obsah tejto výuky, ale sa uč používaní ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ZHRNUTIE LEKCIE 1 + ZHRNUTIE LEKCIE 1.1 1. Kurzor sa pohybuje použitím kláves so šípkami alebo klávesmi hjkl. @@ -180,11 +180,11 @@ POZNÁMKA: Neskúšaj si zapamätať obsah tejto výuky, ale sa uč používaní POZNÁMKA: Stlačenie ťa premiestní do normálneho módu alebo zruší nejaký nechcený a čiastočne dokončený príkaz. -Teraz pokračuj lekciou 2. +Teraz pokračuj lekciou 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.1: Mazacie príkazy + Lekcia 1.2.1: Mazacie príkazy ** Napísanie príkazu dw zmaže znaky do konca slova. ** @@ -204,12 +204,12 @@ POZNÁMKA: Písmeno d sa zobrazí na poslednom riadku obrazovky keď ho ---> Tu je niekoľko slov zábava, ktoré nie patria list do tejto vety. -5. Zopakuj kroky 3 až 4 kým veta nieje správna a prejdi na lekciu 2.2. +5. Zopakuj kroky 3 až 4 kým veta nieje správna a prejdi na lekciu 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.2: VIAC MAZACÍCH PRÍKAZOV + Lekcia 1.2.2: VIAC MAZACÍCH PRÍKAZOV ** Napísanie príkazu d$ zmaže znaky do konca riadku ** @@ -225,11 +225,11 @@ POZNÁMKA: Písmeno d sa zobrazí na poslednom riadku obrazovky keď ho ---> Niekto napísal koniec tohto riadku dvakrát. koniec tohot riadku dvakrát. -5. Prejdi na lekciu 2.3 pre pochopenie toho čo sa stalo. +5. Prejdi na lekciu 1.2.3 pre pochopenie toho čo sa stalo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.3: OPERÁTORY A POHYBY + Lekcia 1.2.3: OPERÁTORY A POHYBY Veľa príkazov, ktoré menia text sú odvodené od operátorov a pohybov. Formát pre príkaz mazania klávesou d je nasledovný: @@ -251,7 +251,7 @@ POZNÁMKA: Stlačením iba pohybu v normálnom móde bez operátora sa presunie kurzor tak ako je to špecivikované. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.4: Použitie viacnásobného pohybu + Lekcia 1.2.4: Použitie viacnásobného pohybu ** Napísaním čísla pred pohyb ho zopakuje zadný počet krát ** @@ -268,11 +268,11 @@ POZNÁMKA: Stlačením iba pohybu v normálnom móde bez operátora ---> Toto je riadok so slovami po kotrých sa môžete pohybovať. - 6. Prejdi na lekciu 2.5. + 6. Prejdi na lekciu 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.5: POUŽITIE VIACNÁSOBNÉHO MAZANIA PRE HROMADNÉ MAZANIE + Lekcia 1.2.5: POUŽITIE VIACNÁSOBNÉHO MAZANIA PRE HROMADNÉ MAZANIE ** Napísanie čísla spolu s operátorom ho zopakuje zadaný počet krát ** @@ -296,7 +296,7 @@ POZNÁMKA: Číslo medzi operátorom d a pohybom funguje podobne ako pri ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.6: OPERÁCIE S RIADKAMI + Lekcia 1.2.6: OPERÁCIE S RIADKAMI ** Napísanie príkazu dd zmaže celý riadok. ** @@ -319,7 +319,7 @@ Vzhľadom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 2.7: PRÍKAZ UNDO + Lekcia 1.2.7: PRÍKAZ UNDO ** Stlač u pre vrátenie posledného príkazu, U pre úpravu celého riadku. ** @@ -336,13 +336,13 @@ Vzhľadom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli, ---> Opprav chybby nna toomto riadku a zmeeň ich pommocou undo. - 8. Tieto príkazy sú často používané. Teraz prejdi na zhrnutie lekcie 2. + 8. Tieto príkazy sú často používané. Teraz prejdi na zhrnutie lekcie 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 2 ZHRNUTIE + LEKCIA 1.2 ZHRNUTIE 1. Pre zmazanie znakov od kurzora do konca slova napíš: dw @@ -369,7 +369,7 @@ Vzhľadom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli, Pre vrátenie vrátených úprav napíš: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.1: PRÍKAZ VLOŽIŤ + Lekcia 1.3.1: PRÍKAZ VLOŽIŤ ** Napísanie príkazu p vloží psledný výmaz za kurzor. ** @@ -392,7 +392,7 @@ Vzhľadom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.2: PRÍKAZ NAHRADENIA + Lekcia 1.3.2: PRÍKAZ NAHRADENIA ** Napísaním rx sa nahradí znak na mieste kurzora znakom x . ** @@ -408,14 +408,14 @@ Vzhľadom na frekvenciu mazania celého riadku, sa autori Vimu rozhodli, ---> Kaď bol tento riasok píaaný, niekro stlašil nesprábne klávesy! ---> Keď bol tento riadok písaný, niekto stlačil nesprávne klávesy! - 5. Teraz prejdi na lekciu 3.2. + 5. Teraz prejdi na lekciu 1.3.2. POZNÁMKA: Pamätaj si, že naučiť sa môžeš len používanim, nie pamätaním. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.3. PRÍKAZ ÚPRAVY + Lekcia 1.3.3: PRÍKAZ ÚPRAVY ** Ak chceš zmeniť časť slova do konca slova, napíš ce . ** @@ -438,7 +438,7 @@ Poznámka, že ce zmaže slovo a nastaví vkladací mód. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 3.4: VIAC ZMIEN POUŽITÍM c + Lekcia 1.3.4: VIAC ZMIEN POUŽITÍM c ** Príkaz pre úpravy sa používa s rovnakými pohybmi ako pre mazanie ** @@ -463,7 +463,7 @@ POZNÁMKA: Môžeš použiť klávesu backspace na úpravu zmien počas písania ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 3 ZHRNUTIE + LEKCIA 1.3 ZHRNUTIE 1. Na vloženie textu, ktorý už bol zmazaný, napíš p . To vloží zmazaný @@ -486,7 +486,7 @@ Teraz prejdi na nalsedujúcu lekciu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.1: POZÍCIA A STATUS SÚBORU + Lekcia 1.4.1: POZÍCIA A STATUS SÚBORU ** Stlač CTRL-g pre zobrazenie svojej pozície v súbore a statusu súboru. @@ -509,7 +509,7 @@ Teraz prejdi na nalsedujúcu lekciu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.2: PRÍKAZ VYHĽADÁVANIA + Lekcia 1.4.2: PRÍKAZ VYHĽADÁVANIA ** Napíš / nasledované reťazcom pre vyhľadanie príslušného reťazca. ** @@ -536,7 +536,7 @@ POZNÁMKA: Keď vyhľadávanie dosiahne koniec tohto súboru, bude pokračovať ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.3: VYHĽADÁVANIE ZODPOVEDAJÚCICH ZÁTAVORIEK + Lekcia 1.4.3: VYHĽADÁVANIE ZODPOVEDAJÚCICH ZÁTAVORIEK ** Napíš % pre vyhľadanie príslušného znaku ),], alebo } . ** @@ -561,7 +561,7 @@ Poznámka: Toto je veľmi výhodné použíť pri ladení programu s chýbajúci ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 4.4: PRÍKAZ NAHRADENIA + Lekcia 1.4.4: PRÍKAZ NAHRADENIA ** Napíš :s/starý/nový/g pre nahradenie slova 'starý' za slovo 'nový'. ** @@ -586,7 +586,7 @@ Poznámka: Toto je veľmi výhodné použíť pri ladení programu s chýbajúci ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 4 ZHRNUTIE + LEKCIA 1.4 ZHRNUTIE 1. CTRL-g vypíše tvoju pozíciu v súbore a status súboru. @@ -611,7 +611,7 @@ Poznámka: Toto je veľmi výhodné použíť pri ladení programu s chýbajúci ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.1 AKO SPUSTIŤ VONKAJŠÍ PRÍKAZ + Lekcia 1.5.1: AKO SPUSTIŤ VONKAJŠÍ PRÍKAZ ** Napíš príkaz :! nasledovaný vonkajším príkazom pre spustenie príkazu ** @@ -633,7 +633,7 @@ Poznámka: Všetky príkazy : musia byť dokončené stlačením ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.2: VIAC O UKLADANÍ SÚBOROV + Lekcia 1.5.2: VIAC O UKLADANÍ SÚBOROV ** Pre uloženie zmien v súbore, napíš :w FILENAME. ** @@ -656,7 +656,7 @@ Poznámka: že ak ukončíš prácu s editorom Vim a znovu ho spustíš príkazo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.3 VÝBER TEXTU PRE ULOŽENIE + Lekcia 1.5.3: VÝBER TEXTU PRE ULOŽENIE ** Pre uloženie časti súboru, napíš v pohyb :w FILENAME ** @@ -681,14 +681,14 @@ POZNÁMKA: Stlačením klávesy v sa spustí vizuálne označovanie. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 5.4: VÝBER A ZLUČOVANIE SÚBOROV + Lekcia 1.5.4: VÝBER A ZLUČOVANIE SÚBOROV ** Pre vloženie obsahu súboru, napíš :r FILENAME ** 1. Premiestni kurzor nad tento riadok. -POZNÁMKA: Po vykonaní kroku 2 uvidíš text z lekcie 5.3. Potom sa presuň +POZNÁMKA: Po vykonaní kroku 2 uvidíš text z lekcie 1.5.3. Potom sa presuň dole, aby si videl túto lekciu. 3. Teraz vlož súbor TEST použitím príkazu :r TEST kde TEST je názov @@ -699,7 +699,7 @@ POZNÁMKA: Môžeš tiež načítať výstup vonkajšieho príkazu. Napríklad : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 5 ZHRNUTIE + LEKCIA 1.5 ZHRNUTIE 1. :!príkaz spustí vonkajší príkaz. @@ -722,7 +722,7 @@ POZNÁMKA: Môžeš tiež načítať výstup vonkajšieho príkazu. Napríklad : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.1: PRÍKAZ OTVORIŤ + Lekcia 1.6.1: PRÍKAZ OTVORIŤ ** Napíš o pre vloženie riadku pod kurzor a prepnutie do vkladacieho módu ** @@ -746,7 +746,7 @@ POZNÁMKA: Môžeš tiež načítať výstup vonkajšieho príkazu. Napríklad : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.2: PRÍKAZ PRIDAŤ + Lekcia 1.6.2: PRÍKAZ PRIDAŤ ** Napíš a pre vloženie textu ZA kurzor. ** @@ -770,7 +770,7 @@ POZNÁMKA: a, i, A štartujú rovnaký vkladací mód, jediný rozidel je, kde ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.3: INÝ SPOSOB NAHRADZOVANIA + Lekcia 1.6.3: INÝ SPOSOB NAHRADZOVANIA ** Napíš veľké R pre nahradenie viac ako jedného znaku. ** @@ -795,7 +795,7 @@ POZNÁMKA: Nahradzovací mód je ako vkladací mód, ale každý napísaný zna ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.4: Copy Paste textu + Lekcia 1.6.4: Copy Paste textu ** použí operátor y pre copy textku a p pre jeho paste ** @@ -820,7 +820,7 @@ POZNÁMKA: Môžeš použiť tiež y ako operátor; yw vystrihne jedno slovo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcia 6.5: NASTAVENIE MOŽNOSTÍ + Lekcia 1.6.5: NASTAVENIE MOŽNOSTÍ ** Nastav možnosti, takže vyhľadávanie alebo nahradzovanie ignoruje @@ -851,7 +851,7 @@ POZNÁMKA: Ak chceš nerozlyšovať veľkosť písmen len pre jedno použitie vyhľadávacieho príkazu, použi \c: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 6 ZHRNUTIE + LEKCIA 1.6 ZHRNUTIE 1. Napíš o pre otvorenie riadku pod kurzorom a štart vkladacieho módu. @@ -882,7 +882,7 @@ POZNÁMKA: Ak chceš nerozlyšovať veľkosť písmen len pre jedno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.1: ZÍSKANIE NÁPOVEDY + LEKCIA 1.7.1: ZÍSKANIE NÁPOVEDY ** Používaj on-line systém nápovedy ** @@ -907,7 +907,7 @@ POZNÁMKA: Ak chceš nerozlyšovať veľkosť písmen len pre jedno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.2: VYTVORENIE ŠTARTOVACIEHO SKRIPTU + LEKCIA 1.7.2: VYTVORENIE ŠTARTOVACIEHO SKRIPTU ** Zapni funkcie editora Vim ** @@ -931,7 +931,7 @@ POZNÁMKA: Ak chceš nerozlyšovať veľkosť písmen len pre jedno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7.3 DOKONČENIE + LEKCIA 1.7.3: DOKONČENIE ** Dokonči príkaz na príkazovom riadku použitím CTRL-D a ** @@ -956,7 +956,7 @@ POZNÁMKA: Dokončovanie funguje pre veľa príkazov. Vyskúšaj stlačenie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKCIA 7 ZHRNUTIE + LEKCIA 1.7 ZHRNUTIE 1. Napíš :help alebo stlač alebo pre otvorenie okna nápovedy. diff --git a/usr/share/vim/vim91/tutor/tutor.sr.cp1250 b/usr/share/vim/vim91/tutor/tutor1.sr.cp1250 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.sr.cp1250 rename to usr/share/vim/vim91/tutor/tutor1.sr.cp1250 index c4d0064cd89..40a19f0bcda 100644 --- a/usr/share/vim/vim91/tutor/tutor.sr.cp1250 +++ b/usr/share/vim/vim91/tutor/tutor1.sr.cp1250 @@ -18,10 +18,10 @@ ih nauili. Ako samo itate tekst, zaboraviete komande! Ako je Caps Lock ukljuen ISKLJUITE ga. Pritisnite taster j dovoljno - puta da lekcija 1.1 cela stane na ekran. + puta da lekcija 1.1.1 cela stane na ekran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.1: POMERANJE KURSORA + Lekcija 1.1.1: POMERANJE KURSORA ** Za pomeranje kursora, pritiskajte tastere h,j,k,l kako je prikazano ** @@ -35,7 +35,7 @@ 2. Pritisnite taster (j) dok ne pone da se ponavlja. Sada znate kako da doete do naredne lekcije. - 3. Koristei taster j preite na lekciju 1.2. + 3. Koristei taster j preite na lekciju 1.1.2. NAPOMENA: Ako niste sigurni ta ste zapravo pritisnuli, pritisnite za prelazak u Normal mod i pokuajte ponovo. @@ -44,7 +44,7 @@ NAPOMENA: Strelice tako znatno bre, kad se jednom naviknete na njih. Zaista! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.2: IZLAZAK IZ VIM-a + Lekcija 1.1.2: IZLAZAK IZ VIM-a !! UPOZORENJE: Pre izvoenja bilo kog koraka, proitajte celu lekciju!! @@ -63,11 +63,11 @@ NAPOMENA: Strelice tako NAPOMENA: :q! ponitava sve izmene koje ste napravili. U narednim lekcijama nauiete kako da sauvate izmene. - 5. Pomerite kursor na lekciju 1.3. + 5. Pomerite kursor na lekciju 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.3: IZMENA TEKSTA - BRISANJE + Lekcija 1.1.3: IZMENA TEKSTA - BRISANJE ** Pritisnite x za brisanje znaka pod kursorom. ** @@ -83,14 +83,14 @@ NAPOMENA: :q! poni ---> RRRibaa riibi grizzze rrreepp. - 5. Kad ispravite red, preite na lekciju 1.4. + 5. Kad ispravite red, preite na lekciju 1.1.4. NAPOMENA: Dok koristite prirunik, nemojte uiti komande napamet, ve vebajte njihovu primenu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.4: IZMENA TEKSTA - UBACIVANJE + Lekcija 1.1.4: IZMENA TEKSTA - UBACIVANJE ** Pritisnite i za ubacivanje teksta ispred kursora. ** @@ -113,7 +113,7 @@ NAPOMENA: Dok koristite priru ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.5: IZMENA TEKSTA - DODAVANJE + Lekcija 1.1.5: IZMENA TEKSTA - DODAVANJE ** Pritisnite A za dodavanje teksta. ** @@ -134,16 +134,16 @@ NAPOMENA: Dok koristite priru ---> Deo teksta nedostaje Deo teksta nedostaje i ovde. - 5. Preite na lekciju 1.6. + 5. Preite na lekciju 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.6: IZMENA FAJLA + Lekcija 1.1.6: IZMENA FAJLA ** Upotrebite :wq za snimanje teksta i izlazak iz editora. ** !! UPOZORENJE: Pre izvoenja bilo kog koraka, proitajte celu lekciju!! - 1. Izaite iz editora kao u lekciji 1.2: :q! + 1. Izaite iz editora kao u lekciji 1.1.2: :q! 2. Na komandnom promptu unesite sledeu komandu: vim tutor 'vim' je komanda za pokretanja Vim editora, 'tutor' je ime fajla koji @@ -159,7 +159,7 @@ NAPOMENA: Dok koristite priru izvrite ih. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 1 + REZIME lekcije 1.1 1. Kursor se pomera strelicama ili pomou tastera hjkl . @@ -179,10 +179,10 @@ NAPOMENA: Dok koristite priru NAPOMENA: Pritiskom na prebacujete Vim u Normal mod i prekidate neeljenu ili delimino izvrenu komandu. -Nastavite sa lekcijom 2. +Nastavite sa lekcijom 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.1: NAREDBE BRISANJA + Lekcija 1.2.1: NAREDBE BRISANJA ** Otkucajte dw za brisanje rei. ** @@ -198,14 +198,14 @@ Nastavite sa lekcijom 2. NAPOMENA: Slovo d e se pojaviti na dnu ekrana kad ga otkucate. Vim eka da otkucate w . Ako je prikazano neko drugo slovo, pogreili ste u kucanju; pritisnite i pokuajte ponovo. (Ako se ne pojavi - nita, moda je iskljuena opcija 'showcmd': vidi lekciju 6.5.) + nita, moda je iskljuena opcija 'showcmd': vidi lekciju 1.6.5.) ---> Neke rei smeno ne pripadaju na papir ovoj reenici. 5. Ponavljajte korake 3 i 4 dok ne ispravite reenicu, pa - preite na lekciju 2.2. + preite na lekciju 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.2: JO BRISANJA + Lekcija 1.2.2: JO BRISANJA ** Otkucajte d$ za brisanje znakova do kraja reda. ** @@ -221,14 +221,14 @@ NAPOMENA: Slovo d ---> Neko je uneo kraj ovog reda dvaput. kraj ovog reda dvaput. - 5. Preite na lekciju 2.3 za podrobnije objanjenje. + 5. Preite na lekciju 1.2.3 za podrobnije objanjenje. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.3: O OPERATORIMA I POKRETIMA + Lekcija 1.2.3: O OPERATORIMA I POKRETIMA Mnoge komande za izmenu teksta sastoje se od operatora i pokreta. @@ -251,7 +251,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez operatora, kursor se pomera kao to je opisano. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.4: KORIENJE BROJANJA ZA POKRETE + Lekcija 1.2.4: KORIENJE BROJANJA ZA POKRETE ** Unoenjem nekog broja pre pokreta, pokret se izvrava taj broj puta. ** @@ -268,13 +268,13 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ---> Reenica sa reima po kojoj moete pomerati kursor. - 6. Preite na lekciju 2.5. + 6. Preite na lekciju 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.5: KORIENJE BROJANJA ZA VEE BRISANJE + Lekcija 1.2.5: KORIENJE BROJANJA ZA VEE BRISANJE ** Unoenje nekog broja s operatorom ponavlja operator taj broj puta. ** @@ -297,7 +297,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.6: OPERACIJE NAD REDOVIMA + Lekcija 1.2.6: OPERACIJE NAD REDOVIMA ** Otkucajte dd za brisanje celog reda. ** @@ -320,7 +320,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.7: PONITAVANJE PROMENA + Lekcija 1.2.7: PONITAVANJE PROMENA ** Pritisnite u za ponitavanje poslednje komande, U za ceo red. ** @@ -339,11 +339,11 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ---> Iiisspravite greke uu ovvom redu ii poonititeee ih. - 8. Ovo su veoma korisne komande. Preite na rezime lekcije 2. + 8. Ovo su veoma korisne komande. Preite na rezime lekcije 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 2 + REZIME lekcije 1.2 1. Brisanje od kursora do sledee rei: dw @@ -366,7 +366,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez Za vraanja promena, otkucajte: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.1: KOMANDA POSTAVLJANJA + Lekcija 1.3.1: KOMANDA POSTAVLJANJA ** Otkucajte p da postavite prethodno izbrisan tekst iza kursora. ** @@ -389,7 +389,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.2: KOMANDA ZAMENE + Lekcija 1.3.2: KOMANDA ZAMENE ** Otkucajte rx da zamenite znak ispod kursora slovom x . ** @@ -406,13 +406,13 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ---> Kedi ju ovej red ugaen, nako je protresao pustane testere! ---> Kada je ovaj red unoen, neko je pritiskao pogrene tastere! - 5. Preite na lekciju 3.2. + 5. Preite na lekciju 1.3.3. NAPOMENA: Setite se da treba da uite vebanjem, ne pamenjem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.3: OPERATOR IZMENE + Lekcija 1.3.3: OPERATOR IZMENE ** Za izmenu teksta do kraja rei, otkucajte ce .** @@ -435,7 +435,7 @@ NAPOMENA: Setite se da treba da u Uoite da ce brie re i postavlja editor u Insert mod. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.4: DALJE IZMENE UPOTREBOM c + Lekcija 1.3.4: DALJE IZMENE UPOTREBOM c ** Komanda izmene se koristi sa istim pokretima kao i brisanje. ** @@ -458,7 +458,7 @@ Uo NAPOMENA: Za ispravljanje greaka moete koristiti Backspace . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 3 + REZIME lekcije 1.3 1. Za postavljanje teksta koji ste upravo izbrisali, pritisnite p . Ovo @@ -481,7 +481,7 @@ Pre ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.1: POZICIJA KURSORA I STATUS FAJLA + Lekcija 1.4.1: POZICIJA KURSORA I STATUS FAJLA ** Pritisnite CTRL-G za prikaz pozicije kursora u tekstu i status fajla. Pritisnite G za pomeranje kursora na neki red u tekstu. ** @@ -493,7 +493,7 @@ NAPOMENA: Pro kursora u tekstu. Zapamtite broj reda za 3. korak. NAPOMENA: U donjem desnom uglu moe se videti poziciju kursora ako je - ukljuena opcija 'ruler' (vidi :help ruler ili lekciju 6.5.) + ukljuena opcija 'ruler' (vidi :help ruler ili lekciju 1.6.5.) 2. Pritisnite G za pomeranje kursora na kraj teksta. Pritisnite 1G ili gg za pomranje kursora na poetak teksta. @@ -504,7 +504,7 @@ NAPOMENA: U donjem desnom uglu mo 4. Ako ste spremni, izvrite korake od 1 do 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.2: KOMANDE PRETRAIVANJA + Lekcija 1.4.2: KOMANDE PRETRAIVANJA ** Otkucajte / i onda izraz koji elite da potraite. ** @@ -527,7 +527,7 @@ NAPOMENA: U donjem desnom uglu mo NAPOMENA: Ako pretraga doe do kraja teksta traenje e se nastaviti od njegovog poetka osim ako je opcija 'wrapscan' iskljuena. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.3: TRAENJE PARA ZAGRADE + Lekcija 1.4.3: TRAENJE PARA ZAGRADE ** Otkucajte % za nalaenje para ), ] ili } . ** @@ -550,7 +550,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.4: KOMANDA ZAMENE + Lekcija 1.4.4: KOMANDA ZAMENE ** Otkucajte :s/staro/novo/g da zamenite 'staro' za 'novo'. ** @@ -573,7 +573,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama! potvrdu zamene. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 4 + REZIME lekcije 1.4 1. CTRL-G prikazuje poziciju kursora u tekstu i status fajla. @@ -596,7 +596,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama! Za potvrdu svake zamene dodajte 'c' :%s/staro/novo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.1: IZVRAVANJE SPOLJANJIH KOMANDI + Lekcija 1.5.1: IZVRAVANJE SPOLJANJIH KOMANDI ** Otkucajte :! pa spoljanju komandu koju elite da izvrite. ** @@ -619,7 +619,7 @@ NAPOMENA: Sve : komande se izvr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.2: VIE O SNIMANJU FAJLOVA + Lekcija 1.5.2: VIE O SNIMANJU FAJLOVA ** Za snimanje promena, otkucajte :w IME_FAJLA . ** @@ -642,7 +642,7 @@ NAPOMENA: Ako biste napustili Vim i ponovo ga pokrenuli sa vim TEST , ili (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.3: SNIMANJE OZNAENOG TEKSTA + Lekcija 1.5.3: SNIMANJE OZNAENOG TEKSTA ** Da biste snimili deo teksta, otkucajte v pokret :w IME_FAJLA ** @@ -665,14 +665,14 @@ NAPOMENA: Komanda v zapo operatore nad tekstom. Na primer, d e izbrisati oznaeni tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.4: UITAVANJE FAJLA U TEKST + Lekcija 1.5.4: UITAVANJE FAJLA U TEKST ** Za ubacivanje sadraja fajla, otkucajte :r IME_FAJLA ** 1. Postavite kursor iznad ove linije. -NAPOMENA: Poto izvrite 2. korak videete tekst iz lekcije 5.3. Tada +NAPOMENA: Poto izvrite 2. korak videete tekst iz lekcije 1.5.3. Tada pomerite kursor DOLE da biste ponovo videli ovu lekciju. 2. Uitajte fajl TEST koristei komandu :r TEST gde je TEST ime fajla @@ -680,7 +680,7 @@ NAPOMENA: Po ubaen ispod kursora. 3. Da biste proverili da je fajl uitan, vratite kursor unazad i - primetite dve kopije lekcije 5.3, originalnu i onu iz fajla. + primetite dve kopije lekcije 1.5.3, originalnu i onu iz fajla. NAPOMENA: Takoe moete uitati izlaz spoljanje komande. Na primer, :r !ls e uitati izlaz komande ls i postaviti ga ispod @@ -688,7 +688,7 @@ NAPOMENA: Tako ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 5 + REZIME lekcije 1.5 1. :!komanda izvrava spoljanju komandu. @@ -711,7 +711,7 @@ NAPOMENA: Tako ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.1: KOMANDA OTVORI + Lekcija 1.6.1: KOMANDA OTVORI ** Pritisnite o da biste otvorili red ispod kursora @@ -734,7 +734,7 @@ NAPOMENA: Tako ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.2: KOMANDA DODAJ + Lekcija 1.6.2: KOMANDA DODAJ ** Otkucajte a za dodavanje teksta IZA kursora. ** @@ -757,7 +757,7 @@ NAPOMENA: Komande a, i, i A aktiviraju isti Insert mod, jedina razlika je u poziciji od koje e se tekst ubacivati. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.3: DRUGI NAIN ZAMENE + Lekcija 1.6.3: DRUGI NAIN ZAMENE ** Otkucajte veliko R da biste zamenili vie od jednog znaka. ** @@ -780,7 +780,7 @@ NAPOMENA: Replace mod je kao Insert mod, s tom razlikom uneti znak brie ve postojei. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.4: KOPIRANJE I LEPLJENJE TEKSTA + Lekcija 1.6.4: KOPIRANJE I LEPLJENJE TEKSTA ** Koristite operator y za kopiranje a p za lepljenje teksta. ** @@ -803,7 +803,7 @@ NAPOMENA: Replace mod je kao Insert mod, s tom razlikom NAPOMENA: takoe moete koristiti y kao operator; yw kopira jednu re. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.5: POSTAVLJANJE OPCIJA + Lekcija 1.6.5: POSTAVLJANJE OPCIJA ** Postavite opciju tako da traenje i zamena ignoriu veliinu slova ** @@ -826,7 +826,7 @@ NAPOMENA: Za neozna NAPOMENA: Ako elite da ne razlikujete veliinu slova u samo jednoj komandi traenja, dodajte \c u izraz: /razlika\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 6 + REZIME lekcije 1.6 1. Pritisnite o za otvaranje reda ISPOD kursora i prelazak u Insert mod. Pritisnite O za otvaranje reda IZNAD kursora. @@ -849,7 +849,7 @@ NAPOMENA: Ako 7. Ispred imena opcije stavite "no" da je deaktivirate: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.1: DOBIJANJE POMOI + Lekcija 1.7.1: DOBIJANJE POMOI ** Koristite on-line sistem za pomo ** @@ -872,7 +872,7 @@ NAPOMENA: Ako :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.2: PRAVLJENJE STARTNOG SKRIPTA + Lekcija 1.7.2: PRAVLJENJE STARTNOG SKRIPTA ** Aktivirajte mogunosti editora ** @@ -895,7 +895,7 @@ NAPOMENA: Ako Za vie informacija otkucajte :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.3: AUTOMATSKO DOVRAVANJE + Lekcija 1.7.3: AUTOMATSKO DOVRAVANJE ** Dovravanje komandne linije sa CTRL-D i ** @@ -918,7 +918,7 @@ NAPOMENA: Mogu Naroito je korisno za :help komande. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 7 + REZIME lekcije 1.7 1. Otkucajte :help ili pritisnite ili za pomo. diff --git a/usr/share/vim/vim91/tutor/tutor.sr.utf-8 b/usr/share/vim/vim91/tutor/tutor1.sr.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.sr.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.sr.utf-8 index 5bad8483c44..b84e67847ec 100644 --- a/usr/share/vim/vim91/tutor/tutor.sr.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.sr.utf-8 @@ -18,10 +18,10 @@ ih naučili. Ako samo čitate tekst, zaboravićete komande! Ako je Caps Lock uključen ISKLJUČITE ga. Pritisnite taster j dovoljno - puta da lekcija 1.1 cela stane na ekran. + puta da lekcija 1.1.1 cela stane na ekran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.1: POMERANJE KURSORA + Lekcija 1.1.1: POMERANJE KURSORA ** Za pomeranje kursora, pritiskajte tastere h,j,k,l kako je prikazano ** @@ -35,7 +35,7 @@ 2. Pritisnite taster (j) dok ne počne da se ponavlja. Sada znate kako da dođete do naredne lekcije. - 3. Koristeći taster j pređite na lekciju 1.2. + 3. Koristeći taster j pređite na lekciju 1.1.2. NAPOMENA: Ako niste sigurni šta ste zapravo pritisnuli, pritisnite za prelazak u Normal mod i pokušajte ponovo. @@ -44,7 +44,7 @@ NAPOMENA: Strelice takođe pomeraju kursor, ali korišćenje tastera hjkl je znatno brže, kad se jednom naviknete na njih. Zaista! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.2: IZLAZAK IZ VIM-a + Lekcija 1.1.2: IZLAZAK IZ VIM-a !! UPOZORENJE: Pre izvođenja bilo kog koraka, pročitajte celu lekciju!! @@ -63,11 +63,11 @@ NAPOMENA: Strelice takođe pomeraju kursor, ali korišćenje tastera hjkl je NAPOMENA: :q! poništava sve izmene koje ste napravili. U narednim lekcijama naučićete kako da sačuvate izmene. - 5. Pomerite kursor na lekciju 1.3. + 5. Pomerite kursor na lekciju 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.3: IZMENA TEKSTA - BRISANJE + Lekcija 1.1.3: IZMENA TEKSTA - BRISANJE ** Pritisnite x za brisanje znaka pod kursorom. ** @@ -83,14 +83,14 @@ NAPOMENA: :q! poništava sve izmene koje ste napravili. ---> RRRibaa riibi grizzze rrreepp. - 5. Kad ispravite red, pređite na lekciju 1.4. + 5. Kad ispravite red, pređite na lekciju 1.1.4. NAPOMENA: Dok koristite priručnik, nemojte učiti komande napamet, već vežbajte njihovu primenu. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.4: IZMENA TEKSTA - UBACIVANJE + Lekcija 1.1.4: IZMENA TEKSTA - UBACIVANJE ** Pritisnite i za ubacivanje teksta ispred kursora. ** @@ -113,7 +113,7 @@ NAPOMENA: Dok koristite priručnik, nemojte učiti komande napamet, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.5: IZMENA TEKSTA - DODAVANJE + Lekcija 1.1.5: IZMENA TEKSTA - DODAVANJE ** Pritisnite A za dodavanje teksta. ** @@ -134,16 +134,16 @@ NAPOMENA: Dok koristite priručnik, nemojte učiti komande napamet, ---> Deo teksta nedostaje Deo teksta nedostaje i ovde. - 5. Pređite na lekciju 1.6. + 5. Pređite na lekciju 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 1.6: IZMENA FAJLA + Lekcija 1.1.6: IZMENA FAJLA ** Upotrebite :wq za snimanje teksta i izlazak iz editora. ** !! UPOZORENJE: Pre izvođenja bilo kog koraka, pročitajte celu lekciju!! - 1. Izađite iz editora kao u lekciji 1.2: :q! + 1. Izađite iz editora kao u lekciji 1.1.2: :q! 2. Na komandnom promptu unesite sledeću komandu: vim tutor 'vim' je komanda za pokretanja Vim editora, 'tutor' je ime fajla koji @@ -159,7 +159,7 @@ NAPOMENA: Dok koristite priručnik, nemojte učiti komande napamet, izvršite ih. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 1 + REZIME lekcije 1.1 1. Kursor se pomera strelicama ili pomoću tastera hjkl . @@ -179,10 +179,10 @@ NAPOMENA: Dok koristite priručnik, nemojte učiti komande napamet, NAPOMENA: Pritiskom na prebacujete Vim u Normal mod i prekidate neželjenu ili delimično izvršenu komandu. -Nastavite sa lekcijom 2. +Nastavite sa lekcijom 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.1: NAREDBE BRISANJA + Lekcija 1.2.1: NAREDBE BRISANJA ** Otkucajte dw za brisanje reči. ** @@ -198,14 +198,14 @@ Nastavite sa lekcijom 2. NAPOMENA: Slovo d će se pojaviti na dnu ekrana kad ga otkucate. Vim čeka da otkucate w . Ako je prikazano neko drugo slovo, pogrešili ste u kucanju; pritisnite i pokušajte ponovo. (Ako se ne pojavi - ništa, možda je isključena opcija 'showcmd': vidi lekciju 6.5.) + ništa, možda je isključena opcija 'showcmd': vidi lekciju 1.6.5.) ---> Neke reči smešno ne pripadaju na papir ovoj rečenici. 5. Ponavljajte korake 3 i 4 dok ne ispravite rečenicu, pa - pređite na lekciju 2.2. + pređite na lekciju 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.2: JOŠ BRISANJA + Lekcija 1.2.2: JOŠ BRISANJA ** Otkucajte d$ za brisanje znakova do kraja reda. ** @@ -221,14 +221,14 @@ NAPOMENA: Slovo d će se pojaviti na dnu ekrana kad ga otkucate. Vim čeka ---> Neko je uneo kraj ovog reda dvaput. kraj ovog reda dvaput. - 5. Pređite na lekciju 2.3 za podrobnije objašnjenje. + 5. Pređite na lekciju 1.2.3 za podrobnije objašnjenje. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.3: O OPERATORIMA I POKRETIMA + Lekcija 1.2.3: O OPERATORIMA I POKRETIMA Mnoge komande za izmenu teksta sastoje se od operatora i pokreta. @@ -251,7 +251,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez operatora, kursor se pomera kao što je opisano. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.4: KORIŠĆENJE BROJANJA ZA POKRETE + Lekcija 1.2.4: KORIŠĆENJE BROJANJA ZA POKRETE ** Unošenjem nekog broja pre pokreta, pokret se izvršava taj broj puta. ** @@ -268,13 +268,13 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ---> Rečenica sa rečima po kojoj možete pomerati kursor. - 6. Pređite na lekciju 2.5. + 6. Pređite na lekciju 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.5: KORIŠĆENJE BROJANJA ZA VEĆE BRISANJE + Lekcija 1.2.5: KORIŠĆENJE BROJANJA ZA VEĆE BRISANJE ** Unošenje nekog broja s operatorom ponavlja operator taj broj puta. ** @@ -297,7 +297,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.6: OPERACIJE NAD REDOVIMA + Lekcija 1.2.6: OPERACIJE NAD REDOVIMA ** Otkucajte dd za brisanje celog reda. ** @@ -320,7 +320,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 2.7: PONIŠTAVANJE PROMENA + Lekcija 1.2.7: PONIŠTAVANJE PROMENA ** Pritisnite u za poništavanje poslednje komande, U za ceo red. ** @@ -339,11 +339,11 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ---> Iiisspravite greške uu ovvom redu ii pooništiteee ih. - 8. Ovo su veoma korisne komande. Pređite na rezime lekcije 2. + 8. Ovo su veoma korisne komande. Pređite na rezime lekcije 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 2 + REZIME lekcije 1.2 1. Brisanje od kursora do sledeće reči: dw @@ -366,7 +366,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez Za vraćanja promena, otkucajte: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.1: KOMANDA POSTAVLJANJA + Lekcija 1.3.1: KOMANDA POSTAVLJANJA ** Otkucajte p da postavite prethodno izbrisan tekst iza kursora. ** @@ -389,7 +389,7 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.2: KOMANDA ZAMENE + Lekcija 1.3.2: KOMANDA ZAMENE ** Otkucajte rx da zamenite znak ispod kursora slovom x . ** @@ -406,13 +406,13 @@ NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez ---> Kedi ju ovej red ugašen, nako je protresao pustašne testere! ---> Kada je ovaj red unošen, neko je pritiskao pogrešne tastere! - 5. Pređite na lekciju 3.2. + 5. Pređite na lekciju 1.3.3. NAPOMENA: Setite se da treba da učite vežbanjem, ne pamćenjem. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.3: OPERATOR IZMENE + Lekcija 1.3.3: OPERATOR IZMENE ** Za izmenu teksta do kraja reči, otkucajte ce .** @@ -435,7 +435,7 @@ NAPOMENA: Setite se da treba da učite vežbanjem, ne pamćenjem. Uočite da ce briše reč i postavlja editor u Insert mod. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 3.4: DALJE IZMENE UPOTREBOM c + Lekcija 1.3.4: DALJE IZMENE UPOTREBOM c ** Komanda izmene se koristi sa istim pokretima kao i brisanje. ** @@ -458,7 +458,7 @@ Uočite da ce briše reč i postavlja editor u Insert mod. NAPOMENA: Za ispravljanje grešaka možete koristiti Backspace . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 3 + REZIME lekcije 1.3 1. Za postavljanje teksta koji ste upravo izbrisali, pritisnite p . Ovo @@ -481,7 +481,7 @@ Pređite na narednu lekciju. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.1: POZICIJA KURSORA I STATUS FAJLA + Lekcija 1.4.1: POZICIJA KURSORA I STATUS FAJLA ** Pritisnite CTRL-G za prikaz pozicije kursora u tekstu i status fajla. Pritisnite G za pomeranje kursora na neki red u tekstu. ** @@ -493,7 +493,7 @@ NAPOMENA: Pročitajte celu lekciju pre izvođenja bilo kog koraka!! kursora u tekstu. Zapamtite broj reda za 3. korak. NAPOMENA: U donjem desnom uglu može se videti poziciju kursora ako je - uključena opcija 'ruler' (vidi :help ruler ili lekciju 6.5.) + uključena opcija 'ruler' (vidi :help ruler ili lekciju 1.6.5.) 2. Pritisnite G za pomeranje kursora na kraj teksta. Pritisnite 1G ili gg za pomranje kursora na početak teksta. @@ -504,7 +504,7 @@ NAPOMENA: U donjem desnom uglu može se videti poziciju kursora ako je 4. Ako ste spremni, izvršite korake od 1 do 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.2: KOMANDE PRETRAŽIVANJA + Lekcija 1.4.2: KOMANDE PRETRAŽIVANJA ** Otkucajte / i onda izraz koji želite da potražite. ** @@ -527,7 +527,7 @@ NAPOMENA: U donjem desnom uglu može se videti poziciju kursora ako je NAPOMENA: Ako pretraga dođe do kraja teksta traženje će se nastaviti od njegovog početka osim ako je opcija 'wrapscan' isključena. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.3: TRAŽENJE PARA ZAGRADE + Lekcija 1.4.3: TRAŽENJE PARA ZAGRADE ** Otkucajte % za nalaženje para ), ] ili } . ** @@ -550,7 +550,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 4.4: KOMANDA ZAMENE + Lekcija 1.4.4: KOMANDA ZAMENE ** Otkucajte :s/staro/novo/g da zamenite 'staro' za 'novo'. ** @@ -573,7 +573,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama! potvrdu zamene. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 4 + REZIME lekcije 1.4 1. CTRL-G prikazuje poziciju kursora u tekstu i status fajla. @@ -596,7 +596,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama! Za potvrdu svake zamene dodajte 'c' :%s/staro/novo/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.1: IZVRŠAVANJE SPOLJAŠNJIH KOMANDI + Lekcija 1.5.1: IZVRŠAVANJE SPOLJAŠNJIH KOMANDI ** Otkucajte :! pa spoljašnju komandu koju želite da izvršite. ** @@ -619,7 +619,7 @@ NAPOMENA: Sve : komande se izvršavaju pošto pritisnete . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.2: VIŠE O SNIMANJU FAJLOVA + Lekcija 1.5.2: VIŠE O SNIMANJU FAJLOVA ** Za snimanje promena, otkucajte :w IME_FAJLA . ** @@ -642,7 +642,7 @@ NAPOMENA: Ako biste napustili Vim i ponovo ga pokrenuli sa vim TEST , ili (Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.3: SNIMANJE OZNAČENOG TEKSTA + Lekcija 1.5.3: SNIMANJE OZNAČENOG TEKSTA ** Da biste snimili deo teksta, otkucajte v pokret :w IME_FAJLA ** @@ -665,14 +665,14 @@ NAPOMENA: Komanda v započinje vizuelno označavanje. Možete pomerati kurso operatore nad tekstom. Na primer, d će izbrisati označeni tekst. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 5.4: UČITAVANJE FAJLA U TEKST + Lekcija 1.5.4: UČITAVANJE FAJLA U TEKST ** Za ubacivanje sadržaja fajla, otkucajte :r IME_FAJLA ** 1. Postavite kursor iznad ove linije. -NAPOMENA: Pošto izvršite 2. korak videćete tekst iz lekcije 5.3. Tada +NAPOMENA: Pošto izvršite 2. korak videćete tekst iz lekcije 1.5.3. Tada pomerite kursor DOLE da biste ponovo videli ovu lekciju. 2. Učitajte fajl TEST koristeći komandu :r TEST gde je TEST ime fajla @@ -680,7 +680,7 @@ NAPOMENA: Pošto izvršite 2. korak videćete tekst iz lekcije 5.3. Tada ubačen ispod kursora. 3. Da biste proverili da je fajl učitan, vratite kursor unazad i - primetite dve kopije lekcije 5.3, originalnu i onu iz fajla. + primetite dve kopije lekcije 1.5.3, originalnu i onu iz fajla. NAPOMENA: Takođe možete učitati izlaz spoljašnje komande. Na primer, :r !ls će učitati izlaz komande ls i postaviti ga ispod @@ -688,7 +688,7 @@ NAPOMENA: Takođe možete učitati izlaz spoljašnje komande. Na primer, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 5 + REZIME lekcije 1.5 1. :!komanda izvršava spoljašnju komandu. @@ -711,7 +711,7 @@ NAPOMENA: Takođe možete učitati izlaz spoljašnje komande. Na primer, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.1: KOMANDA OTVORI + Lekcija 1.6.1: KOMANDA OTVORI ** Pritisnite o da biste otvorili red ispod kursora @@ -734,7 +734,7 @@ NAPOMENA: Takođe možete učitati izlaz spoljašnje komande. Na primer, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.2: KOMANDA DODAJ + Lekcija 1.6.2: KOMANDA DODAJ ** Otkucajte a za dodavanje teksta IZA kursora. ** @@ -757,7 +757,7 @@ NAPOMENA: Komande a, i, i A aktiviraju isti Insert mod, jedina razlika je u poziciji od koje će se tekst ubacivati. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.3: DRUGI NAČIN ZAMENE + Lekcija 1.6.3: DRUGI NAČIN ZAMENE ** Otkucajte veliko R da biste zamenili više od jednog znaka. ** @@ -780,7 +780,7 @@ NAPOMENA: Replace mod je kao Insert mod, s tom razlikom što svaki uneti znak briše već postojeći. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.4: KOPIRANJE I LEPLJENJE TEKSTA + Lekcija 1.6.4: KOPIRANJE I LEPLJENJE TEKSTA ** Koristite operator y za kopiranje a p za lepljenje teksta. ** @@ -803,7 +803,7 @@ NAPOMENA: Replace mod je kao Insert mod, s tom razlikom što svaki NAPOMENA: takođe možete koristiti y kao operator; yw kopira jednu reč. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 6.5: POSTAVLJANJE OPCIJA + Lekcija 1.6.5: POSTAVLJANJE OPCIJA ** Postavite opciju tako da traženje i zamena ignorišu veličinu slova ** @@ -826,7 +826,7 @@ NAPOMENA: Za neoznačavanje pronađenih izraza otkucajte: :nohlsearch NAPOMENA: Ako želite da ne razlikujete veličinu slova u samo jednoj komandi traženja, dodajte \c u izraz: /razlika\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 6 + REZIME lekcije 1.6 1. Pritisnite o za otvaranje reda ISPOD kursora i prelazak u Insert mod. Pritisnite O za otvaranje reda IZNAD kursora. @@ -849,7 +849,7 @@ NAPOMENA: Ako želite da ne razlikujete veličinu slova u samo jednoj komandi 7. Ispred imena opcije stavite "no" da je deaktivirate: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.1: DOBIJANJE POMOĆI + Lekcija 1.7.1: DOBIJANJE POMOĆI ** Koristite on-line sistem za pomoć ** @@ -872,7 +872,7 @@ NAPOMENA: Ako želite da ne razlikujete veličinu slova u samo jednoj komandi :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.2: PRAVLJENJE STARTNOG SKRIPTA + Lekcija 1.7.2: PRAVLJENJE STARTNOG SKRIPTA ** Aktivirajte mogućnosti editora ** @@ -895,7 +895,7 @@ NAPOMENA: Ako želite da ne razlikujete veličinu slova u samo jednoj komandi Za više informacija otkucajte :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lekcija 7.3: AUTOMATSKO DOVRŠAVANJE + Lekcija 1.7.3: AUTOMATSKO DOVRŠAVANJE ** Dovršavanje komandne linije sa CTRL-D i ** @@ -918,7 +918,7 @@ NAPOMENA: Moguće je dopuniti mnoge komande. Samo probajte CTRL-D i . Naročito je korisno za :help komande. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - REZIME lekcije 7 + REZIME lekcije 1.7 1. Otkucajte :help ili pritisnite ili za pomoć. diff --git a/usr/share/vim/vim91/tutor/tutor.sv b/usr/share/vim/vim91/tutor/tutor1.sv similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.sv rename to usr/share/vim/vim91/tutor/tutor1.sv index 42836a801de..ab439910a18 100644 --- a/usr/share/vim/vim91/tutor/tutor.sv +++ b/usr/share/vim/vim91/tutor/tutor1.sv @@ -20,9 +20,9 @@ Frskra dig nu om att din Caps-Lock tangent INTE r aktiv och tryck p j-tangenten tillrckligt mnga gnger fr att frflytta markren s att - Lektion 1.1 fyller skrmen helt. + Lektion 1.1.1 fyller skrmen helt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.1: FLYTTA MARKREN + Lektion 1.1.1: FLYTTA MARKREN ** Fr att flytta markren, tryck p tangenterna h,j,k,l som indikerat. ** @@ -36,7 +36,7 @@ 2. Hll ned tangenten pil ned (j) tills att den repeterar. ---> Nu vet du hur du tar dig till nsta lektion. - 3. Flytta till Lektion 1.2, med hjlp av ned tangenten. + 3. Flytta till Lektion 1.1.2, med hjlp av ned tangenten. Notera: Om du r osker p ngonting du skrev, tryck fr att placera dig dig i Normal-lge. Skriv sedan om kommandot. @@ -46,7 +46,7 @@ Notera: Piltangenterna borde ocks det. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.2: STARTA OCH AVSLUTA VIM + Lektion 1.1.2: STARTA OCH AVSLUTA VIM !! NOTERA: Innan du utfr ngon av punkterna nedan, ls hela lektionen!! @@ -67,9 +67,9 @@ Notera: Piltangenterna borde ocks 4. Om du har memorerat dessa steg och knner dig sjlvsker, kr d stegen 1 till 3 fr att avsluta och starta om redigeraren. Flytta sedan ned - markren till Lektion 1.3. + markren till Lektion 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.3: TEXT REDIGERING - BORTTAGNING + Lektion 1.1.3: TEXT REDIGERING - BORTTAGNING ** Nr du r i Normal-lge tryck x fr att ta bort tecknet under markren. ** @@ -85,7 +85,7 @@ Notera: Piltangenterna borde ocks ---> Kkon hoppadee vverr mnen. - 5. Nu nr raden r korrekt, g till Lektion 1.4. + 5. Nu nr raden r korrekt, g till Lektion 1.1.4. NOTERA: Nr du gr igenom den hr handledningen, frsk inte att memorera, lr genom anvndning. @@ -93,7 +93,7 @@ NOTERA: N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.4: TEXT REDIGERING - INFOGNING + Lektion 1.1.4: TEXT REDIGERING - INFOGNING ** Nr du r i Normal-lge tryck i fr att infoga text. ** @@ -117,7 +117,7 @@ NOTERA: N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 1 SAMMANFATTNING + LEKTION 1.1 SAMMANFATTNING 1. Markren flyttas genom att anvnda piltangenterna eller hjkl-tangenterna. @@ -136,11 +136,11 @@ NOTERA: N NOTERA: Genom att trycka kommer du att placeras i Normal-lge eller avbryta ett delvis frdigskrivet kommando. -Fortstt nu med Lektion 2. +Fortstt nu med Lektion 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.1: BORTTAGNINGSKOMMANDON + Lektion 1.2.1: BORTTAGNINGSKOMMANDON ** Skriv dw fr att radera till slutet av ett ord. ** @@ -158,12 +158,12 @@ Forts ---> Det r ett ngra ord roliga att som inte hr hemma i den hr meningen. - 5. Upprepa stegen 3 och 4 tills meningen r korrekt och g till Lektion 2.2. + 5. Upprepa stegen 3 och 4 tills meningen r korrekt och g till Lektion 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.2: FLER BORTTAGNINGSKOMMANDON + Lektion 1.2.2: FLER BORTTAGNINGSKOMMANDON ** Skriv d$ fr att radera till slutet p raden. ** @@ -179,14 +179,14 @@ Forts ---> Ngon skrev slutet p den hr raden tv gnger. den hr raden tv gnger. - 5. G vidare till Lektion 2.3 fr att frst vad det r som hnder. + 5. G vidare till Lektion 1.2.3 fr att frst vad det r som hnder. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.3: KOMMANDON OCH OBJEKT + Lesson 1.2.3: KOMMANDON OCH OBJEKT Syntaxen fr d raderingskommandot r fljande: @@ -210,7 +210,7 @@ NOTERA: F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.4: ETT UNDANTAG TILL 'KOMMANDO-OBJEKT' + Lektion 1.2.4: ETT UNDANTAG TILL 'KOMMANDO-OBJEKT' ** Skriv dd fr att radera hela raden. ** @@ -235,7 +235,7 @@ NOTERA: F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.5: NGRA-KOMMANDOT + Lektion 1.2.5: NGRA-KOMMANDOT ** Skriv u fr att ngra det senaste kommandona, U fr att fixa en hel rad. ** @@ -253,13 +253,13 @@ NOTERA: F ---> Fiixa felen pp deen hr meningen och terskapa dem med ngra. 8. Det hr r vldigt anvndbara kommandon. G nu vidare till - Lektion 2 Sammanfattning. + Lektion 1.2 Sammanfattning. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 2 SAMMANFATTNING + LEKTION 1.2 SAMMANFATTNING 1. Fr att radera frn markren till slutet av ett ord skriv: dw @@ -282,7 +282,7 @@ NOTERA: F Fr att ngra ngringar tryck: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.1: KLISTRA IN-KOMMANDOT + Lektion 1.3.1: KLISTRA IN-KOMMANDOT ** Skriv p fr att klistra in den senaste raderingen efter markren. ** @@ -305,7 +305,7 @@ NOTERA: F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.2: ERSTT-KOMMANDOT + Lesson 1.3.2: ERSTT-KOMMANDOT ** Skriv r och ett tecken fr att erstta tecknet under markren. ** @@ -321,14 +321,14 @@ NOTERA: F ---> Nr drn hr ruden skrevs, trickte ngon p fil knappar! ---> Nr den hr raden skrevs, tryckte ngon p fel knappar! - 5. G nu vidare till Lektion 3.2. + 5. G nu vidare till Lektion 1.3.2. NOTERA: Kom ihg att du skall lra dig genom anvndning, inte genom memorering. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.3: NDRA-KOMMANDOT + Lektion 1.3.3: NDRA-KOMMANDOT ** Fr att ndra en del eller ett helt ord, skriv cw . ** @@ -352,7 +352,7 @@ Notera att cw inte bara ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.4: FLER NDRINGAR MED c + Lektion 1.3.4: FLER NDRINGAR MED c ** ndra-kommandot anvnds p samma objekt som radera. ** @@ -376,7 +376,7 @@ Notera att cw inte bara ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 3 SAMMANFATTNING + LEKTION 1.3 SAMMANFATTNING 1. Fr att erstta text som redan har blivit raderad, skriv p . @@ -399,7 +399,7 @@ G ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.1: POSITION OCH FILSTATUS + Lektion 1.4.1: POSITION OCH FILSTATUS ** Tryck CTRL-g fr att visa din position i filen och filstatusen. @@ -421,7 +421,7 @@ G ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.2: SK-KOMMANDOT + Lektion 1.4.2: SK-KOMMANDOT ** Skriv / fljt av en fras fr att ska efter frasen. ** @@ -443,7 +443,7 @@ Notera: N ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.3: SKNING EFTER MATCHANDE PARENTESER + Lektion 1.4.3: SKNING EFTER MATCHANDE PARENTESER ** Skriv % fr att hitta en matchande ),], or } . ** @@ -468,7 +468,7 @@ Notera: Det h ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.4: ETT STT ATT NDRA FEL + Lektion 1.4.4: ETT STT ATT NDRA FEL ** Skriv :s/gammalt/nytt/g fr att erstta "gammalt" med "nytt". ** @@ -491,7 +491,7 @@ Notera: Det h ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 4 SAMMANFATTNING + LEKTION 1.4 SAMMANFATTNING 1. Ctrl-g visar din position i filen och filstatusen. @@ -514,7 +514,7 @@ Notera: Det h ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.1: HUR MAN KR ETT EXTERNT KOMMANDO + Lektion 1.5.1: HUR MAN KR ETT EXTERNT KOMMANDO ** Skriv :! fljt av ett externt kommando fr att kra det kommandot. ** @@ -538,7 +538,7 @@ Notera: Alla :-kommandon m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.2: MER OM ATT SPARA FILER + Lektion 1.5.2: MER OM ATT SPARA FILER ** Fr att spara ndringar gjorda i en fil, skriv :w FILNAMN. ** @@ -561,7 +561,7 @@ Notera: Om du skulle avsluta Vim och sedan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.3: ETT SELEKTIVT SPARA-KOMMANDO + Lektion 1.5.3: ETT SELEKTIVT SPARA-KOMMANDO ** Fr att spara en del av en fil, skriv :#,# w FILNAMN ** @@ -585,7 +585,7 @@ Notera: Om du skulle avsluta Vim och sedan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.4: TA EMOT OCH FRENA FILER + Lektion 1.5.4: TA EMOT OCH FRENA FILER ** Fr att infoga innehllet av en fil, skriv :r FILNAMN ** @@ -595,7 +595,7 @@ Notera: Om du skulle avsluta Vim och sedan 2. Placera markren hgst upp p den hr sidan. -NOTERA: Efter att du krt Steg 3 kommer du att se Lektion 5.3. +NOTERA: Efter att du krt Steg 3 kommer du att se Lektion 1.5.3. Flytta d NED till den hr lektionen igen. 3. Ta nu emot din TEST-fil med kommandot :r TEST dr TEST r namnet p @@ -604,12 +604,12 @@ NOTERA: Efter att du k NOTERA: Filen du tar emot placeras dr markren r placerad. 4. Fr att verifiera att filen togs emot, g tillbaka och notera att det nu - finns tv kopior av Lektion 5.3, orginalet och filversionen. + finns tv kopior av Lektion 1.5.3, orginalet och filversionen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 5 SAMMANFATTNING + LEKTION 1.5 SAMMANFATTNING 1. :!kommando kr ett externt kommando. @@ -632,7 +632,7 @@ NOTERA: Filen du tar emot placeras d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.1: PPNA-KOMMANDOT + Lektion 1.6.1: PPNA-KOMMANDOT ** Skriv o fr att ppna en rad under markren och placera dig i @@ -657,7 +657,7 @@ NOTERA: Filen du tar emot placeras d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.2: LGG TILL-KOMMANDOT + Lektion 1.6.2: LGG TILL-KOMMANDOT ** Skriv a fr att infoga text EFTER markren. ** @@ -681,7 +681,7 @@ Notera: Detta undviker att beh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.3: EN ANNAN VERSION AV ERSTT + Lektion 1.6.3: EN ANNAN VERSION AV ERSTT ** Skriv ett stort R fr att erstta fler n ett tecken. ** @@ -706,7 +706,7 @@ Notera: Detta undviker att beh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.4: STT FLAGGOR + Lektion 1.6.4: STT FLAGGOR ** Stt en flagga s att en skning eller ersttning ignorerar storlek ** @@ -729,7 +729,7 @@ Notera: Detta undviker att beh 6. Fr att ta bort framhvningen av trffar, skriv :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 6 SAMMANFATTNING + LEKTION 1.6 SAMMANFATTNING 1. Genom att skriva o pnnas en rad NEDANFR markren och markren placeras @@ -755,7 +755,7 @@ Notera: Detta undviker att beh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 7: ON-LINE HJLP-KOMMANDON + LEKTION 1.7: ON-LINE HJLP-KOMMANDON ** Anvnd on-line hjlpsystemet ** @@ -778,7 +778,7 @@ Notera: Detta undviker att beh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 8: SKAPA ETT UPPSTARTSSKRIPT + LEKTION 1.8: SKAPA ETT UPPSTARTSSKRIPT ** Aktivera Vim- funktioner ** diff --git a/usr/share/vim/vim91/tutor/tutor.sv.utf-8 b/usr/share/vim/vim91/tutor/tutor1.sv.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.sv.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.sv.utf-8 index c8cacc62404..10104c87ca5 100644 --- a/usr/share/vim/vim91/tutor/tutor.sv.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.sv.utf-8 @@ -20,9 +20,9 @@ Försäkra dig nu om att din Caps-Lock tangent INTE är aktiv och tryck på j-tangenten tillräckligt många gånger för att förflytta markören så att - Lektion 1.1 fyller skärmen helt. + Lektion 1.1.1 fyller skärmen helt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.1: FLYTTA MARKÖREN + Lektion 1.1.1: FLYTTA MARKÖREN ** För att flytta markören, tryck på tangenterna h,j,k,l som indikerat. ** @@ -36,7 +36,7 @@ 2. Håll ned tangenten pil ned (j) tills att den repeterar. ---> Nu vet du hur du tar dig till nästa lektion. - 3. Flytta till Lektion 1.2, med hjälp av ned tangenten. + 3. Flytta till Lektion 1.1.2, med hjälp av ned tangenten. Notera: Om du är osäker på någonting du skrev, tryck för att placera dig dig i Normal-läge. Skriv sedan om kommandot. @@ -46,7 +46,7 @@ Notera: Piltangenterna borde också fungera. Men om du använder hjkl så komme det. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.2: STARTA OCH AVSLUTA VIM + Lektion 1.1.2: STARTA OCH AVSLUTA VIM !! NOTERA: Innan du utför någon av punkterna nedan, läs hela lektionen!! @@ -67,9 +67,9 @@ Notera: Piltangenterna borde också fungera. Men om du använder hjkl så komme 4. Om du har memorerat dessa steg och känner dig självsäker, kör då stegen 1 till 3 för att avsluta och starta om redigeraren. Flytta sedan ned - markören till Lektion 1.3. + markören till Lektion 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.3: TEXT REDIGERING - BORTTAGNING + Lektion 1.1.3: TEXT REDIGERING - BORTTAGNING ** När du är i Normal-läge tryck x för att ta bort tecknet under markören. ** @@ -85,7 +85,7 @@ Notera: Piltangenterna borde också fungera. Men om du använder hjkl så komme ---> Kkon hoppadee övverr måånen. - 5. Nu när raden är korrekt, gå till Lektion 1.4. + 5. Nu när raden är korrekt, gå till Lektion 1.1.4. NOTERA: När du går igenom den här handledningen, försök inte att memorera, lär genom användning. @@ -93,7 +93,7 @@ NOTERA: När du går igenom den här handledningen, försök inte att memorera, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 1.4: TEXT REDIGERING - INFOGNING + Lektion 1.1.4: TEXT REDIGERING - INFOGNING ** När du är i Normal-läge tryck i för att infoga text. ** @@ -117,7 +117,7 @@ NOTERA: När du går igenom den här handledningen, försök inte att memorera, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 1 SAMMANFATTNING + LEKTION 1.1 SAMMANFATTNING 1. Markören flyttas genom att använda piltangenterna eller hjkl-tangenterna. @@ -136,11 +136,11 @@ NOTERA: När du går igenom den här handledningen, försök inte att memorera, NOTERA: Genom att trycka kommer du att placeras i Normal-läge eller avbryta ett delvis färdigskrivet kommando. -Fortsätt nu med Lektion 2. +Fortsätt nu med Lektion 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.1: BORTTAGNINGSKOMMANDON + Lektion 1.2.1: BORTTAGNINGSKOMMANDON ** Skriv dw för att radera till slutet av ett ord. ** @@ -158,12 +158,12 @@ Fortsätt nu med Lektion 2. ---> Det är ett några ord roliga att som inte hör hemma i den här meningen. - 5. Upprepa stegen 3 och 4 tills meningen är korrekt och gå till Lektion 2.2. + 5. Upprepa stegen 3 och 4 tills meningen är korrekt och gå till Lektion 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.2: FLER BORTTAGNINGSKOMMANDON + Lektion 1.2.2: FLER BORTTAGNINGSKOMMANDON ** Skriv d$ för att radera till slutet på raden. ** @@ -179,14 +179,14 @@ Fortsätt nu med Lektion 2. ---> Någon skrev slutet på den här raden två gånger. den här raden två gånger. - 5. Gå vidare till Lektion 2.3 för att förstå vad det är som händer. + 5. Gå vidare till Lektion 1.2.3 för att förstå vad det är som händer. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.3: KOMMANDON OCH OBJEKT + Lesson 1.2.3: KOMMANDON OCH OBJEKT Syntaxen för d raderingskommandot är följande: @@ -210,7 +210,7 @@ NOTERA: För den äventyrslystne, genom att bara trycka på objektet i ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.4: ETT UNDANTAG TILL 'KOMMANDO-OBJEKT' + Lektion 1.2.4: ETT UNDANTAG TILL 'KOMMANDO-OBJEKT' ** Skriv dd för att radera hela raden. ** @@ -235,7 +235,7 @@ NOTERA: För den äventyrslystne, genom att bara trycka på objektet i ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 2.5: ÅNGRA-KOMMANDOT + Lektion 1.2.5: ÅNGRA-KOMMANDOT ** Skriv u för att ångra det senaste kommandona, U för att fixa en hel rad. ** @@ -253,13 +253,13 @@ NOTERA: För den äventyrslystne, genom att bara trycka på objektet i ---> Fiixa felen ppå deen häär meningen och återskapa dem med ångra. 8. Det här är väldigt användbara kommandon. Gå nu vidare till - Lektion 2 Sammanfattning. + Lektion 1.2 Sammanfattning. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 2 SAMMANFATTNING + LEKTION 1.2 SAMMANFATTNING 1. För att radera från markören till slutet av ett ord skriv: dw @@ -282,7 +282,7 @@ NOTERA: För den äventyrslystne, genom att bara trycka på objektet i För att ångra ångringar tryck: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.1: KLISTRA IN-KOMMANDOT + Lektion 1.3.1: KLISTRA IN-KOMMANDOT ** Skriv p för att klistra in den senaste raderingen efter markören. ** @@ -305,7 +305,7 @@ NOTERA: För den äventyrslystne, genom att bara trycka på objektet i ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.2: ERSÄTT-KOMMANDOT + Lesson 1.3.2: ERSÄTT-KOMMANDOT ** Skriv r och ett tecken för att ersätta tecknet under markören. ** @@ -321,14 +321,14 @@ NOTERA: För den äventyrslystne, genom att bara trycka på objektet i ---> När drn här ruden skrevs, trickte någon på fil knappar! ---> När den här raden skrevs, tryckte någon på fel knappar! - 5. Gå nu vidare till Lektion 3.2. + 5. Gå nu vidare till Lektion 1.3.2. NOTERA: Kom ihåg att du skall lära dig genom användning, inte genom memorering. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.3: ÄNDRA-KOMMANDOT + Lektion 1.3.3: ÄNDRA-KOMMANDOT ** För att ändra en del eller ett helt ord, skriv cw . ** @@ -352,7 +352,7 @@ Notera att cw inte bara ändrar ordet, utan även placerar dig i infogningslä ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 3.4: FLER ÄNDRINGAR MED c + Lektion 1.3.4: FLER ÄNDRINGAR MED c ** Ändra-kommandot används på samma objekt som radera. ** @@ -376,7 +376,7 @@ Notera att cw inte bara ändrar ordet, utan även placerar dig i infogningslä ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 3 SAMMANFATTNING + LEKTION 1.3 SAMMANFATTNING 1. För att ersätta text som redan har blivit raderad, skriv p . @@ -399,7 +399,7 @@ Gå nu till nästa lektion. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.1: POSITION OCH FILSTATUS + Lektion 1.4.1: POSITION OCH FILSTATUS ** Tryck CTRL-g för att visa din position i filen och filstatusen. @@ -421,7 +421,7 @@ Gå nu till nästa lektion. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.2: SÖK-KOMMANDOT + Lektion 1.4.2: SÖK-KOMMANDOT ** Skriv / följt av en fras för att söka efter frasen. ** @@ -443,7 +443,7 @@ Notera: När sökningen når slutet på filen kommer den att fortsätta vid bör ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.3: SÖKNING EFTER MATCHANDE PARENTESER + Lektion 1.4.3: SÖKNING EFTER MATCHANDE PARENTESER ** Skriv % för att hitta en matchande ),], or } . ** @@ -468,7 +468,7 @@ Notera: Det här är väldigt användbart vid avlusning av ett program med icke ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 4.4: ETT SÄTT ATT ÄNDRA FEL + Lektion 1.4.4: ETT SÄTT ATT ÄNDRA FEL ** Skriv :s/gammalt/nytt/g för att ersätta "gammalt" med "nytt". ** @@ -491,7 +491,7 @@ Notera: Det här är väldigt användbart vid avlusning av ett program med icke ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 4 SAMMANFATTNING + LEKTION 1.4 SAMMANFATTNING 1. Ctrl-g visar din position i filen och filstatusen. @@ -514,7 +514,7 @@ Notera: Det här är väldigt användbart vid avlusning av ett program med icke ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.1: HUR MAN KÖR ETT EXTERNT KOMMANDO + Lektion 1.5.1: HUR MAN KÖR ETT EXTERNT KOMMANDO ** Skriv :! följt av ett externt kommando för att köra det kommandot. ** @@ -538,7 +538,7 @@ Notera: Alla :-kommandon måste avslutas med att trycka på ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.2: MER OM ATT SPARA FILER + Lektion 1.5.2: MER OM ATT SPARA FILER ** För att spara ändringar gjorda i en fil, skriv :w FILNAMN. ** @@ -561,7 +561,7 @@ Notera: Om du skulle avsluta Vim och sedan öppna igen med filnamnet TEST så ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.3: ETT SELEKTIVT SPARA-KOMMANDO + Lektion 1.5.3: ETT SELEKTIVT SPARA-KOMMANDO ** För att spara en del av en fil, skriv :#,# w FILNAMN ** @@ -585,7 +585,7 @@ Notera: Om du skulle avsluta Vim och sedan öppna igen med filnamnet TEST så ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 5.4: TA EMOT OCH FÖRENA FILER + Lektion 1.5.4: TA EMOT OCH FÖRENA FILER ** För att infoga innehållet av en fil, skriv :r FILNAMN ** @@ -595,7 +595,7 @@ Notera: Om du skulle avsluta Vim och sedan öppna igen med filnamnet TEST så 2. Placera markören högst upp på den här sidan. -NOTERA: Efter att du kört Steg 3 kommer du att se Lektion 5.3. +NOTERA: Efter att du kört Steg 3 kommer du att se Lektion 1.5.3. Flytta då NED till den här lektionen igen. 3. Ta nu emot din TEST-fil med kommandot :r TEST där TEST är namnet på @@ -604,12 +604,12 @@ NOTERA: Efter att du kört Steg 3 kommer du att se Lektion 5.3. NOTERA: Filen du tar emot placeras där markören är placerad. 4. För att verifiera att filen togs emot, gå tillbaka och notera att det nu - finns två kopior av Lektion 5.3, orginalet och filversionen. + finns två kopior av Lektion 1.5.3, orginalet och filversionen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 5 SAMMANFATTNING + LEKTION 1.5 SAMMANFATTNING 1. :!kommando kör ett externt kommando. @@ -632,7 +632,7 @@ NOTERA: Filen du tar emot placeras där markören är placerad. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.1: ÖPPNA-KOMMANDOT + Lektion 1.6.1: ÖPPNA-KOMMANDOT ** Skriv o för att öppna en rad under markören och placera dig i @@ -657,7 +657,7 @@ NOTERA: Filen du tar emot placeras där markören är placerad. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.2: LÄGG TILL-KOMMANDOT + Lektion 1.6.2: LÄGG TILL-KOMMANDOT ** Skriv a för att infoga text EFTER markören. ** @@ -681,7 +681,7 @@ Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.3: EN ANNAN VERSION AV ERSÄTT + Lektion 1.6.3: EN ANNAN VERSION AV ERSÄTT ** Skriv ett stort R för att ersätta fler än ett tecken. ** @@ -706,7 +706,7 @@ Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lektion 6.4: SÄTT FLAGGOR + Lektion 1.6.4: SÄTT FLAGGOR ** Sätt en flagga så att en sökning eller ersättning ignorerar storlek ** @@ -729,7 +729,7 @@ Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att 6. För att ta bort framhävningen av träffar, skriv :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 6 SAMMANFATTNING + LEKTION 1.6 SAMMANFATTNING 1. Genom att skriva o öpnnas en rad NEDANFÖR markören och markören placeras @@ -755,7 +755,7 @@ Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 7: ON-LINE HJÄLP-KOMMANDON + LEKTION 1.7: ON-LINE HJÄLP-KOMMANDON ** Använd on-line hjälpsystemet ** @@ -778,7 +778,7 @@ Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - LEKTION 8: SKAPA ETT UPPSTARTSSKRIPT + LEKTION 1.8: SKAPA ETT UPPSTARTSSKRIPT ** Aktivera Vim- funktioner ** diff --git a/usr/share/vim/vim91/tutor/tutor.tr.iso9 b/usr/share/vim/vim91/tutor/tutor1.tr.iso9 similarity index 94% rename from usr/share/vim/vim91/tutor/tutor.tr.iso9 rename to usr/share/vim/vim91/tutor/tutor1.tr.iso9 index ddbdf3b3beb..16be720664f 100644 --- a/usr/share/vim/vim91/tutor/tutor.tr.iso9 +++ b/usr/share/vim/vim91/tutor/tutor1.tr.iso9 @@ -19,11 +19,11 @@ Bu u anlama gelir; komutlar renmek iin doru bir ekilde altrma- nz gerekir. Eer sadece yazlanlar okursanz komutlar unutursunuz. - imdi Caps Lock dmenizin basl olmadna emin olun ve Ders 1.1'in + imdi Caps Lock dmenizin basl olmadna emin olun ve Ders 1.1.1'in ekran tamamen doldurmas iin j dmesine yeterli miktarda basn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.1: MLEC HAREKET ETTRMEK + Ders 1.1.1: MLEC HAREKET ETTRMEK evirmen Notu: Tm derslerde grdnzde bu dmeye basn. @@ -39,7 +39,7 @@ 2. j dmesine basn ve ekrann aaya kaydn grn. - 3. Aa dmesini kullanarak, Ders 1.2'ye gein. + 3. Aa dmesini kullanarak, Ders 1.1.2'ye gein. NOT: Eer yazdnz bir eyden emin deilseniz Normal kipe gemek iin dmesine basn. Daha sonra istediiniz komutu yeniden yazn. @@ -48,7 +48,7 @@ daha hzl hareket edebilirsiniz. Gerekten. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.2: VM'DEN IKI + Ders 1.1.2: VM'DEN IKI !! NOT: Aadaki admlar yapmadan nce, bu dersi tamamen okuyun. @@ -66,10 +66,10 @@ NOT: :q! , yaptnz tm deiiklikleri atar. Birka ders sonra, deiiklikleri dosyaya kaydetmeyi reneceksiniz. - 5. mleci Ders 1.3'e tayn. + 5. mleci Ders 1.1.3'e tayn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.3: METN DZENLEME - METN SLME + Ders 1.1.3: METN DZENLEME - METN SLME ** Normal kipteyken imlecin altndaki karakteri silmek iin x'e basn. ** @@ -84,12 +84,12 @@ ---> inek ayyn zzerinden attlad. - 5. imdi satr dzeldi; Ders 1.4'e gein. + 5. imdi satr dzeldi; Ders 1.1.4'e gein. NOT: Bu eitmende ilerledike ezberlemeye almayn, deneyerek renin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.4: METN DZENLEME - METN GRME + Ders 1.1.4: METN DZENLEME - METN GRME ** Normal kipteyken metin eklemek iin i'ye basn. ** @@ -110,7 +110,7 @@ 5. Artk yapabildiinizi dnyorsanz bir sonraki blme gein. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.5: METN DZENLEME - METN EKLEME + Ders 1.1.5: METN DZENLEME - METN EKLEME ** Metin eklemek iin A dmesine basn. ** @@ -130,17 +130,17 @@ ---> Bu satrda da baz metinl Bu satrda da baz metinler eksik gibi grnyor. - 5. Artk rahata metin ekleyebildiinizi dnyorsanz Ders 1.6'ya gein. + 5. Artk rahata metin ekleyebildiinizi dnyorsanz Ders 1.1.6'ya gein. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.6: DOSYA DZENLEME + Ders 1.1.6: DOSYA DZENLEME ** :wq yazmak ak olan dosyay kaydeder ve Vim'den kar. !! NOT: Aadaki admlar uygulamadan nce tm bu blm iyice okuyun! - 1. Bu eitmeni Ders 1.2'de yaptnz gibi :q! yazarak kapatn. Veya baka + 1. Bu eitmeni Ders 1.1.2'de yaptnz gibi :q! yazarak kapatn. Veya baka bir ubirime eriiminiz varsa orada yapn. 2. Komut istemi ekrannda u komutu girin: vim tutor . 'vim', Vim @@ -158,7 +158,7 @@ 6. Yukardaki admlar okuduktan ve anladktan sonra YAPIN. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1: ZET + Ders 1.1: ZET 1. mle ok dmeleri veya hjkl dmeleri kullanlarak hareket ettirilir. @@ -186,10 +186,10 @@ NOT: dmesine basmak sizi Normal kipe geri dndrr veya istenmeyen veya yarm yazlm bir komutu iptal eder. - imdi Ders 2 ile bu eitmeni srdrn. + imdi Ders 1.2 ile bu eitmeni srdrn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.1: SLME KOMUTLARI + Ders 1.2.1: SLME KOMUTLARI ** Bir szc silmek iin dw yazn. ** @@ -208,10 +208,10 @@ ---> Bu satrda erez tmceye ait olmayan leblebi szckler var. - 5. Tmce dzelene kadar adm 3 ve 4' tekrar edin ve Ders 2.2'ye gein. + 5. Tmce dzelene kadar adm 3 ve 4' tekrar edin ve Ders 1.2.2'ye gein. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.2: DAHA FAZLA SLME KOMUTLARI + Ders 1.2.2: DAHA FAZLA SLME KOMUTLARI ** Satr sonuna kadar silmek iin d$ yazn. ** @@ -230,10 +230,10 @@ ---> Birileri bu satrn sonunu iki defa yazm. satrn sonunu iki defa yazm. - 5. Neler olduunu anlamak iin Ders 2.3'e gidin. + 5. Neler olduunu anlamak iin Ders 1.2.3'e gidin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.3: LELER VE HAREKETLER + Ders 1.2.3: LELER VE HAREKETLER Metin deitiren birok komut ileler ve eklerden oluur. Bir d ileci @@ -258,7 +258,7 @@ yukarda belirtildii gibi hareket ettirir. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.4: BR HAREKET LE BRLKTE SAYIM KULLANMAK + Ders 1.2.4: BR HAREKET LE BRLKTE SAYIM KULLANMAK ** Bir hareketten nce say kullanmak o hareketi sayca tekrarlatr. ** @@ -275,10 +275,10 @@ ---> Bu zerinde hoplayp zplayabileceiniz naizane bir satr. - 6. Ders 2.5'e gein. + 6. Ders 1.2.5'e gein. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.5: BR SAYIM KULLANARAK DAHA FAZLA SLME LEM + Ders 1.2.5: BR SAYIM KULLANARAK DAHA FAZLA SLME LEM ** Bir ile ile birlikte say kullanmak ileci o kadar tekrarlatr. ** @@ -299,7 +299,7 @@ ---> Bu ABC DE satrdaki FG HI JKLM NO PRST szckler U VY temizlenmitir. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.6: SATIRLARDA LEM YAPMA + Ders 1.2.6: SATIRLARDA LEM YAPMA ** Btn bir satr silmek iin dd yazn. ** @@ -325,7 +325,7 @@ ---> 7) Ve sen de ylesin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.7: GER AL KOMUTU + Ders 1.2.7: GER AL KOMUTU ** Komutu geri almak iin u, btn bir satr dzeltmek iin U yazn. ** @@ -347,10 +347,10 @@ ---> Buu satrdaki hatalar dzeltinn ve sonra koomutu geri allln. - 8. Bunlar son derece kullanl komutlardr. imdi Ders 2 zete gein. + 8. Bunlar son derece kullanl komutlardr. imdi Ders 1.2 zete gein. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2: ZET + Ders 1.2: ZET 1. mleten itibaren bir szc silmek iin dw yazn. @@ -380,7 +380,7 @@ Geri almalar geri almak iin R kullann. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3.1: KOY KOMUTU + Ders 1.3.1: KOY KOMUTU ** Son yaptnz silmeyi imleten sonraya yerletirmek iin p yazn. ** @@ -403,7 +403,7 @@ ---> a) Gller krmzdr, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3.2: DETR KOMUTU + Ders 1.3.2: DETR KOMUTU ** mlecin altndaki karakteri bakas ile deitirmek iin rx yapn. ** @@ -419,12 +419,12 @@ ---> Bu satv yazlvken, bivileri yaml dmetere basm. ---> Bu satr yazlrken, birileri yanl dmelere basm. - 5. Ders 3.3'ye gein. + 5. Ders 1.3.3'ye gein. NOT: Unutmayn, ezberleyerek deil deneyerek renin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3.3: DETR LEC + Ders 1.3.3: DETR LEC ** Bir szc imleten szck sonuna kadar deitirmek iin ce yapn. ** @@ -446,7 +446,7 @@ aldna da dikkat edin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3.4: c'Y KULLANARAK DAHA FAZLA DETRME + Ders 1.3.4: c'Y KULLANARAK DAHA FAZLA DETRME ** Deitir ileci sil komutu ile ayn hareketlerle kullanlr. ** @@ -469,7 +469,7 @@ duyuyor. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3: ZET + Ders 1.3: ZET 1. Silinmi olan bir metni geri yerletirmek iin p yazn. Bu silinmi @@ -491,7 +491,7 @@ imdi bir sonraki derse gein. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4.1: MLE KONUMU VE DOSYA DURUMU + Ders 1.4.1: MLE KONUMU VE DOSYA DURUMU ** G dosya ierisindeki konumunuzu ve dosya durumunu gsterir. Dosya @@ -515,7 +515,7 @@ 4. Yapabileceinizi dndnzde, adm 1'den 3'e kadar yapn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4.2: ARAMA KOMUTU + Ders 1.4.2: ARAMA KOMUTU ** Bir szck beini aramak iin / ve aranacak bei girin. ** @@ -537,7 +537,7 @@ Not: Arama dosyan devre d brakmak iin 'wrapscan' seeneini sfrlayn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4.3: UYAN AYRALAR ARAMASI + Ders 1.4.3: UYAN AYRALAR ARAMASI ** Uyan bir (, [ veya { bulmak iin % yazn. ** @@ -559,7 +559,7 @@ Not: Arama dosyan ayklamak iin son derece yararldr. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4.4: BUL/DETR KOMUTU + Ders 1.4.4: BUL/DETR KOMUTU ** 'eski' yerine 'yeni' yerletirmek iin :s/eski/yeni/g yazn. ** @@ -583,7 +583,7 @@ Not: Arama dosyan her birini deitirmeden nce bize sorar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4: ZET + Ders 1.4: ZET 1. G sizin dosyadaki konumunuzu ve dosya durumunu gsterir. @@ -607,7 +607,7 @@ Not: Arama dosyan Her seferinde onay sormas iin :%s/eski/yeni/gc kullann. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5.1: BIR DI KOMUT ALITIRMAK + Ders 1.5.1: BIR DI KOMUT ALITIRMAK ** Bir d komutu altrmak iin :! ve ardndan d komutu yazn. ** @@ -628,7 +628,7 @@ Not: Arama dosyan sonra bunu her zaman anmsatmayacaz. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5.2: DOSYA YAZMAYA DEVAM + Ders 1.5.2: DOSYA YAZMAYA DEVAM ** Dosyaya yaplan deiiklii kaydetmek iin :w DOSYA_ADI yazn. ** @@ -652,7 +652,7 @@ Not: Arama dosyan Unix (macOS, Linux, Haiku): :!rm DENEME ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5.3: YAZMA N METN SEME + Ders 1.5.3: YAZMA N METN SEME ** Dosyann bir blmn kaydetmek iin, v hareket :w DOSYA_ADI yazn. ** @@ -671,28 +671,28 @@ Not: Arama dosyan bakarak dosyay grn. Henz silmeyin; bir sonraki derste kullanacaz. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5.4: DOSYALARI BRLETRME VE BLM EKLEME + Ders 1.5.4: DOSYALARI BRLETRME VE BLM EKLEME ** Bir dosyann ieriini eklemek iin :r DOSYA_ADI yazn. ** 1. mleci bu satrn hemen bir stne koyun. - NOT: kinci admdan sonra Ders 5.3'n metnini greceksiniz. + NOT: kinci admdan sonra Ders 1.5.3'n metnini greceksiniz. Sonrasnda AAI dmesi ile bu derse geri gelin. 2. imdi :r DENEME komutunu kullanarak DENEME dosyasn bu dosyann iine getirin. Getirdiiniz dosya imlecin hemen altna yerletirilir. 3. Dosyann getirildiini dorulamak iin YUKARI dmesini kullanarak - Ders 5.3'n iki adet kopyas olduunu grn, zgn srm ve kopyas. + Ders 1.5.3'n iki adet kopyas olduunu grn, zgn srm ve kopyas. NOT: Bu komutu kullanarak bir d komutun ktsn da dosyann iine koyabilirsiniz. rnein :r !ls yazmak ls komutunun verecei kty dosyann iinde hemen imlecin altndaki satra koyar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5: ZET + Ders 1.5: ZET 1. :!komut bir d komut altrr. @@ -712,7 +712,7 @@ Not: Arama dosyan okur ve dosyann iine yerletirir. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.1: A KOMUTU + Ders 1.6.1: A KOMUTU ** mlecin aasna satr amak ve EKLE kipine gemek iin o yazn. ** @@ -733,7 +733,7 @@ Not: Arama dosyan ---> Bu satrn zerine bir satr amak iin imle bu satrdayken O yazn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.2: EKLE KOMUTU + Ders 1.6.2: EKLE KOMUTU ** mleten sonra metin eklemek iin a yazn. ** @@ -754,7 +754,7 @@ Not: Arama dosyan ---> Bu satrda alabilirsiniz. alrken metin eklemeyi kullann. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.3: BR BAKA DETR KOMUTU + Ders 1.6.3: BR BAKA DETR KOMUTU ** Birden fazla karakter deitirmek iin byk R yazn. ** @@ -774,7 +774,7 @@ Not: Arama dosyan ---> 123 saysna 456 eklemek size 579 toplamn verir. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.4: METN KOPYALA VE YAPITIR + Ders 1.6.4: METN KOPYALA VE YAPITIR ** y ilecini kullanarak metin kopyalayn ve p kullanarak yaptrn. ** @@ -799,7 +799,7 @@ Not: Arama dosyan bir szc kopyalar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.4: SET KOMUTU + Ders 1.6.5: SET KOMUTU ** Arama veya deitirme ilemlerinin byk/kk harf durumunu grmezden @@ -824,7 +824,7 @@ Not: Arama dosyan yapmak istiyorsanz /ignore\c komutunu kullann. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - DERS 6 ZET + DERS 1.6 ZET 1. o komutu imlecin altnda bir satr aar ve imleci bu alm satra @@ -849,7 +849,7 @@ Not: Arama dosyan 7. Bir ayar kapatmak iin "no" ekleyin, rnein :set noic. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 7.1: YARDIM KAYNAKLARI + Ders 1.7.1: YARDIM KAYNAKLARI ** evrimii yardm sistemini kullann ** @@ -875,7 +875,7 @@ Not: Arama dosyan :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 7.2: BR BALANGI BET OLUTURUN + Ders 1.7.2: BR BALANGI BET OLUTURUN ** Vim'in zelliklerine bakn ** @@ -900,7 +900,7 @@ Not: Arama dosyan Daha fazla bilgi iin :help vimrc-intro yazn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 7.3: TAMAMLAMA + Ders 1.7.3: TAMAMLAMA ** D ve ile komut istemi ekrannda tamamlama ** @@ -928,7 +928,7 @@ Not: Arama dosyan ikililerini deneyin. zellikle :help iin ok yararldr. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 7: ZET + Ders 1.7: ZET 1. :help yazmak veya veya dmelerine basmak yardm diff --git a/usr/share/vim/vim91/tutor/tutor.tr.utf-8 b/usr/share/vim/vim91/tutor/tutor1.tr.utf-8 similarity index 94% rename from usr/share/vim/vim91/tutor/tutor.tr.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.tr.utf-8 index 909b0d456ea..df0cea09d62 100644 --- a/usr/share/vim/vim91/tutor/tutor.tr.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.tr.utf-8 @@ -19,11 +19,11 @@ Bu şu anlama gelir; komutları öğrenmek için doğru bir şekilde çalıştırma- nız gerekir. Eğer sadece yazılanları okursanız komutları unutursunuz. - Şimdi Caps Lock düğmenizin basılı olmadığına emin olun ve Ders 1.1'in + Şimdi Caps Lock düğmenizin basılı olmadığına emin olun ve Ders 1.1.1'in ekranı tamamen doldurması için j düğmesine yeterli miktarda basın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.1: İMLECİ HAREKET ETTİRMEK + Ders 1.1.1: İMLECİ HAREKET ETTİRMEK Çevirmen Notu: Tüm derslerde gördüğünüzde bu düğmeye basın. @@ -39,7 +39,7 @@ 2. j düğmesine basın ve ekranın aşağıya kaydığını görün. - 3. Aşağı düğmesini kullanarak, Ders 1.2'ye geçin. + 3. Aşağı düğmesini kullanarak, Ders 1.1.2'ye geçin. NOT: Eğer yazdığınız bir şeyden emin değilseniz Normal kipe geçmek için düğmesine basın. Daha sonra istediğiniz komutu yeniden yazın. @@ -48,7 +48,7 @@ daha hızlı hareket edebilirsiniz. Gerçekten. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.2: VİM'DEN ÇIKIŞ + Ders 1.1.2: VİM'DEN ÇIKIŞ !! NOT: Aşağıdaki adımları yapmadan önce, bu dersi tamamen okuyun. @@ -66,10 +66,10 @@ NOT: :q! , yaptığınız tüm değişiklikleri atar. Birkaç ders sonra, değişiklikleri dosyaya kaydetmeyi öğreneceksiniz. - 5. İmleci Ders 1.3'e taşıyın. + 5. İmleci Ders 1.1.3'e taşıyın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.3: METİN DÜZENLEME - METİN SİLME + Ders 1.1.3: METİN DÜZENLEME - METİN SİLME ** Normal kipteyken imlecin altındaki karakteri silmek için x'e basın. ** @@ -84,12 +84,12 @@ ---> İinek ayyın üzzerinden attladı. - 5. Şimdi satır düzeldi; Ders 1.4'e geçin. + 5. Şimdi satır düzeldi; Ders 1.1.4'e geçin. NOT: Bu eğitmende ilerledikçe ezberlemeye çalışmayın, deneyerek öğrenin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.4: METİN DÜZENLEME - METİN GİRME + Ders 1.1.4: METİN DÜZENLEME - METİN GİRME ** Normal kipteyken metin eklemek için i'ye basın. ** @@ -110,7 +110,7 @@ 5. Artık yapabildiğinizi düşünüyorsanız bir sonraki bölüme geçin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.5: METİN DÜZENLEME - METİN EKLEME + Ders 1.1.5: METİN DÜZENLEME - METİN EKLEME ** Metin eklemek için A düğmesine basın. ** @@ -130,17 +130,17 @@ ---> Bu satırda da bazı metinl Bu satırda da bazı metinler eksik gibi görünüyor. - 5. Artık rahatça metin ekleyebildiğinizi düşünüyorsanız Ders 1.6'ya geçin. + 5. Artık rahatça metin ekleyebildiğinizi düşünüyorsanız Ders 1.1.6'ya geçin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1.6: DOSYA DÜZENLEME + Ders 1.1.6: DOSYA DÜZENLEME ** :wq yazmak açık olan dosyayı kaydeder ve Vim'den çıkar. !! NOT: Aşağıdaki adımları uygulamadan önce tüm bu bölümü iyice okuyun! - 1. Bu eğitmeni Ders 1.2'de yaptığınız gibi :q! yazarak kapatın. Veya başka + 1. Bu eğitmeni Ders 1.1.2'de yaptığınız gibi :q! yazarak kapatın. Veya başka bir uçbirime erişiminiz varsa orada yapın. 2. Komut istemi ekranında şu komutu girin: vim tutor . 'vim', Vim @@ -158,7 +158,7 @@ 6. Yukarıdaki adımları okuduktan ve anladıktan sonra YAPIN. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 1: ÖZET + Ders 1.1: ÖZET 1. İmleç ok düğmeleri veya hjkl düğmeleri kullanılarak hareket ettirilir. @@ -186,10 +186,10 @@ NOT: düğmesine basmak sizi Normal kipe geri döndürür veya istenmeyen veya yarım yazılmış bir komutu iptal eder. - Şimdi Ders 2 ile bu eğitmeni sürdürün. + Şimdi Ders 1.2 ile bu eğitmeni sürdürün. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.1: SİLME KOMUTLARI + Ders 1.2.1: SİLME KOMUTLARI ** Bir sözcüğü silmek için dw yazın. ** @@ -208,10 +208,10 @@ ---> Bu satırda çerez tümceye ait olmayan leblebi sözcükler var. - 5. Tümce düzelene kadar adım 3 ve 4'ü tekrar edin ve Ders 2.2'ye geçin. + 5. Tümce düzelene kadar adım 3 ve 4'ü tekrar edin ve Ders 1.2.2'ye geçin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.2: DAHA FAZLA SİLME KOMUTLARI + Ders 1.2.2: DAHA FAZLA SİLME KOMUTLARI ** Satırı sonuna kadar silmek için d$ yazın. ** @@ -230,10 +230,10 @@ ---> Birileri bu satırın sonunu iki defa yazmış. satırın sonunu iki defa yazmış. - 5. Neler olduğunu anlamak için Ders 2.3'e gidin. + 5. Neler olduğunu anlamak için Ders 1.2.3'e gidin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.3: İŞLEÇLER VE HAREKETLER + Ders 1.2.3: İŞLEÇLER VE HAREKETLER Metin değiştiren birçok komut işleçler ve eklerden oluşur. Bir d işleci @@ -258,7 +258,7 @@ yukarıda belirtildiği gibi hareket ettirir. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.4: BİR HAREKET İLE BİRLİKTE SAYIM KULLANMAK + Ders 1.2.4: BİR HAREKET İLE BİRLİKTE SAYIM KULLANMAK ** Bir hareketten önce sayı kullanmak o hareketi sayıca tekrarlatır. ** @@ -275,10 +275,10 @@ ---> Bu üzerinde hoplayıp zıplayabileceğiniz naçizane bir satır. - 6. Ders 2.5'e geçin. + 6. Ders 1.2.5'e geçin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.5: BİR SAYIM KULLANARAK DAHA FAZLA SİLME İŞLEMİ + Ders 1.2.5: BİR SAYIM KULLANARAK DAHA FAZLA SİLME İŞLEMİ ** Bir işleç ile birlikte sayı kullanmak işleci o kadar tekrarlatır. ** @@ -299,7 +299,7 @@ ---> Bu ABC ÇDE satırdaki FGĞ HIİ JKLM NOÖ PRSŞT sözcükler UÜ VY temizlenmiştir. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.6: SATIRLARDA İŞLEM YAPMA + Ders 1.2.6: SATIRLARDA İŞLEM YAPMA ** Bütün bir satırı silmek için dd yazın. ** @@ -325,7 +325,7 @@ ---> 7) Ve sen de öylesin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2.7: GERİ AL KOMUTU + Ders 1.2.7: GERİ AL KOMUTU ** Komutu geri almak için u, bütün bir satırı düzeltmek için U yazın. ** @@ -347,10 +347,10 @@ ---> Buu satıırdaki hataları düüzeltinn ve sonra koomutu geri alllın. - 8. Bunlar son derece kullanışlı komutlardır. Şimdi Ders 2 Özete geçin. + 8. Bunlar son derece kullanışlı komutlardır. Şimdi Ders 1.2 Özete geçin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 2: ÖZET + Ders 1.2: ÖZET 1. İmleçten itibaren bir sözcüğü silmek için dw yazın. @@ -380,7 +380,7 @@ Geri almaları geri almak için R kullanın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3.1: KOY KOMUTU + Ders 1.3.1: KOY KOMUTU ** Son yaptığınız silmeyi imleçten sonraya yerleştirmek için p yazın. ** @@ -403,7 +403,7 @@ ---> a) Güller kırmızıdır, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3.2: DEĞİŞTİR KOMUTU + Ders 1.3.2: DEĞİŞTİR KOMUTU ** İmlecin altındaki karakteri başkası ile değiştirmek için rx yapın. ** @@ -419,12 +419,12 @@ ---> Bu satıv yazılıvken, bivileri yamlış düğmetere basmış. ---> Bu satır yazılırken, birileri yanlış düğmelere basmış. - 5. Ders 3.3'ye geçin. + 5. Ders 1.3.3'ye geçin. NOT: Unutmayın, ezberleyerek değil deneyerek öğrenin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3.3: DEĞİŞTİR İŞLECİ + Ders 1.3.3: DEĞİŞTİR İŞLECİ ** Bir sözcüğü imleçten sözcük sonuna kadar değiştirmek için ce yapın. ** @@ -446,7 +446,7 @@ aldığına da dikkat edin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3.4: c'Yİ KULLANARAK DAHA FAZLA DEĞİŞTİRME + Ders 1.3.4: c'Yİ KULLANARAK DAHA FAZLA DEĞİŞTİRME ** Değiştir işleci sil komutu ile aynı hareketlerle kullanılır. ** @@ -469,7 +469,7 @@ duyuyor. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 3: ÖZET + Ders 1.3: ÖZET 1. Silinmiş olan bir metni geri yerleştirmek için p yazın. Bu silinmiş @@ -491,7 +491,7 @@ Şimdi bir sonraki derse geçin. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4.1: İMLEÇ KONUMU VE DOSYA DURUMU + Ders 1.4.1: İMLEÇ KONUMU VE DOSYA DURUMU ** G dosya içerisindeki konumunuzu ve dosya durumunu gösterir. Dosya @@ -515,7 +515,7 @@ 4. Yapabileceğinizi düşündüğünüzde, adım 1'den 3'e kadar yapın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4.2: ARAMA KOMUTU + Ders 1.4.2: ARAMA KOMUTU ** Bir sözcük öbeğini aramak için / ve aranacak öbeği girin. ** @@ -537,7 +537,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu devre dışı bırakmak için 'wrapscan' seçeneğini sıfırlayın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4.3: UYAN AYRAÇLAR ARAMASI + Ders 1.4.3: UYAN AYRAÇLAR ARAMASI ** Uyan bir (, [ veya { bulmak için % yazın. ** @@ -559,7 +559,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu ayıklamak için son derece yararlıdır. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4.4: BUL/DEĞİŞTİR KOMUTU + Ders 1.4.4: BUL/DEĞİŞTİR KOMUTU ** 'eski' yerine 'yeni' yerleştirmek için :s/eski/yeni/g yazın. ** @@ -583,7 +583,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu her birini değiştirmeden önce bize sorar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 4: ÖZET + Ders 1.4: ÖZET 1. G sizin dosyadaki konumunuzu ve dosya durumunu gösterir. @@ -607,7 +607,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu Her seferinde onay sorması için :%s/eski/yeni/gc kullanın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5.1: BIR DIŞ KOMUT ÇALIŞTIRMAK + Ders 1.5.1: BIR DIŞ KOMUT ÇALIŞTIRMAK ** Bir dış komutu çalıştırmak için :! ve ardından dış komutu yazın. ** @@ -628,7 +628,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu sonra bunu her zaman anımsatmayacağız. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5.2: DOSYA YAZMAYA DEVAM + Ders 1.5.2: DOSYA YAZMAYA DEVAM ** Dosyaya yapılan değişikliği kaydetmek için :w DOSYA_ADI yazın. ** @@ -652,7 +652,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu Unix (macOS, Linux, Haiku): :!rm DENEME ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5.3: YAZMA İÇİN METİN SEÇME + Ders 1.5.3: YAZMA İÇİN METİN SEÇME ** Dosyanın bir bölümünü kaydetmek için, v hareket :w DOSYA_ADI yazın. ** @@ -671,28 +671,28 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu bakarak dosyayı görün. Henüz silmeyin; bir sonraki derste kullanacağız. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5.4: DOSYALARI BİRLEŞTİRME VE BÖLÜM EKLEME + Ders 1.5.4: DOSYALARI BİRLEŞTİRME VE BÖLÜM EKLEME ** Bir dosyanın içeriğini eklemek için :r DOSYA_ADI yazın. ** 1. İmleci bu satırın hemen bir üstüne koyun. - NOT: İkinci adımdan sonra Ders 5.3'ün metnini göreceksiniz. + NOT: İkinci adımdan sonra Ders 1.5.3'ün metnini göreceksiniz. Sonrasında AŞAĞI düğmesi ile bu derse geri gelin. 2. Şimdi :r DENEME komutunu kullanarak DENEME dosyasını bu dosyanın içine getirin. Getirdiğiniz dosya imlecin hemen altına yerleştirilir. 3. Dosyanın getirildiğini doğrulamak için YUKARI düğmesini kullanarak - Ders 5.3'ün iki adet kopyası olduğunu görün, özgün sürümü ve kopyası. + Ders 1.5.3'ün iki adet kopyası olduğunu görün, özgün sürümü ve kopyası. NOT: Bu komutu kullanarak bir dış komutun çıktısını da dosyanın içine koyabilirsiniz. Örneğin :r !ls yazmak ls komutunun vereceği çıktıyı dosyanın içinde hemen imlecin altındaki satıra koyar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 5: ÖZET + Ders 1.5: ÖZET 1. :!komut bir dış komut çalıştırır. @@ -712,7 +712,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu okur ve dosyanın içine yerleştirir. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.1: AÇ KOMUTU + Ders 1.6.1: AÇ KOMUTU ** İmlecin aşağısına satır açmak ve EKLE kipine geçmek için o yazın. ** @@ -733,7 +733,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu ---> Bu satırın üzerine bir satır açmak için imleç bu satırdayken O yazın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.2: EKLE KOMUTU + Ders 1.6.2: EKLE KOMUTU ** İmleçten sonra metin eklemek için a yazın. ** @@ -754,7 +754,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu ---> Bu satırda çalışabilirsiniz. Çalışırken metin eklemeyi kullanın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.3: BİR BAŞKA DEĞİŞTİR KOMUTU + Ders 1.6.3: BİR BAŞKA DEĞİŞTİR KOMUTU ** Birden fazla karakter değiştirmek için büyük R yazın. ** @@ -774,7 +774,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu ---> 123 sayısına 456 eklemek size 579 toplamını verir. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.4: METİN KOPYALA VE YAPIŞTIR + Ders 1.6.4: METİN KOPYALA VE YAPIŞTIR ** y işlecini kullanarak metin kopyalayın ve p kullanarak yapıştırın. ** @@ -799,7 +799,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu bir sözcüğü kopyalar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 6.4: SET KOMUTU + Ders 1.6.5: SET KOMUTU ** Arama veya değiştirme işlemlerinin büyük/küçük harf durumunu görmezden @@ -824,7 +824,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu yapmak istiyorsanız /ignore\c komutunu kullanın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - DERS 6 ÖZET + DERS 1.6 ÖZET 1. o komutu imlecin altında bir satır açar ve imleci bu açılmış satıra @@ -849,7 +849,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu 7. Bir ayarı kapatmak için "no" ekleyin, örneğin :set noic. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 7.1: YARDIM KAYNAKLARI + Ders 1.7.1: YARDIM KAYNAKLARI ** Çevrimiçi yardım sistemini kullanın ** @@ -875,7 +875,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 7.2: BİR BAŞLANGIÇ BETİĞİ OLUŞTURUN + Ders 1.7.2: BİR BAŞLANGIÇ BETİĞİ OLUŞTURUN ** Vim'in özelliklerine bakın ** @@ -900,7 +900,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu Daha fazla bilgi için :help vimrc-intro yazın. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 7.3: TAMAMLAMA + Ders 1.7.3: TAMAMLAMA ** D ve ile komut istemi ekranında tamamlama ** @@ -928,7 +928,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu ikililerini deneyin. Özellikle :help için çok yararlıdır. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Ders 7: ÖZET + Ders 1.7: ÖZET 1. :help yazmak veya veya düğmelerine basmak yardım diff --git a/usr/share/vim/vim91/tutor/tutor.uk.utf-8 b/usr/share/vim/vim91/tutor/tutor1.uk.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.uk.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.uk.utf-8 index 541c74fdd89..c91d25aa3fc 100644 --- a/usr/share/vim/vim91/tutor/tutor.uk.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.uk.utf-8 @@ -19,7 +19,7 @@ А зараз переконайтесь, що включена англійська розкладка і не затиснутий Caps Lock, і натисніть кнопку j щоб переміститись до першого уроку. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.1: ПЕРЕМІЩЕННЯ КУРСОРА + Урок 1.1.1: ПЕРЕМІЩЕННЯ КУРСОРА ** Щоб переміщати курсор використовуйте кнопки [h],[j],[k],[l], @@ -47,7 +47,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.2: Вихід з Vim + Урок 1.1.2: Вихід з Vim Увага! Перед тим як виконувати цей урок прочитайте його повністю. @@ -67,7 +67,7 @@ кілька уроків ви навчитесь зберігати зміни в файл. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.3:РЕДАГУВАННЯ ТЕКСТУ. ВИДАЛЕННЯ. + Урок 1.1.3:РЕДАГУВАННЯ ТЕКСТУ. ВИДАЛЕННЯ. ** Натисніть [x] щоб видалити символ під курсором. ** @@ -83,7 +83,7 @@ ---> Ккоровва перрестрибнуууууула ччерезз мііісяццць. - 5. Тепер, коли речення правильне, можна перейти до уроку 1.4. + 5. Тепер, коли речення правильне, можна перейти до уроку 1.1.4. Зауваження: Протягом навчання не старайтесь запам'ятати все. Вчіться практикою. @@ -91,7 +91,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.4: РЕДАГУВАННЯ ТЕКСТУ. ВСТАВКА + Урок 1.1.4: РЕДАГУВАННЯ ТЕКСТУ. ВСТАВКА ** Натисніть [i] щоб вставити текст. ** @@ -108,12 +108,12 @@ ---> З прав текст. ---> З цього рядка пропав деякий текст. - 5. Коли призвичаїтесь вставляти текст - переходьте до уроку 1.5. + 5. Коли призвичаїтесь вставляти текст - переходьте до уроку 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.5: РЕДАГУВАННЯ ТЕКСТУ. ДОДАВАННЯ. + Урок 1.1.5: РЕДАГУВАННЯ ТЕКСТУ. ДОДАВАННЯ. ** Натисніть [A] щоб додати текст. ** @@ -140,13 +140,13 @@ 5. Після виконання вправ, переходьте до наступного уроку. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 1.6: РЕДАГУВАННЯ ФАЙЛУ + Урок 1.1.6: РЕДАГУВАННЯ ФАЙЛУ ** Використайте :wq щоб зберегти файл і вийти.** Увага! Перед виконанням уроку прочитайте його повністю. - 1. Вийдіть з цього підручника як ви робили в уроці 1.2: :q![ENTER] + 1. Вийдіть з цього підручника як ви робили в уроці 1.1.2: :q![ENTER] Або якщо ви маєте доступ до іншого терміналу виконуйте наступні дії в ньому. @@ -164,7 +164,7 @@ 6. Після прочитання і засвоєння попередніх кроків виконайте їх. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ПІДСУМОК УРОКУ 1 + ПІДСУМОК УРОКУ 1.1 1. Курсор керується курсорними клавішами, або клавішами [h][j][k][l] @@ -184,10 +184,10 @@ Зауваження: Натискання [ESC] перенесе вас в звичайний режим, чи відмінить не до кінця введену команду. -Тепер переходьте до уроку 2. +Тепер переходьте до уроку 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.1: КОМАНДИ ВИДАЛЕННЯ + Урок 1.2.1: КОМАНДИ ВИДАЛЕННЯ ** Введіть dw щоб видалити слово. ** @@ -207,11 +207,11 @@ ---> Є деякі слова весело, які не потрібні папір в цьому реченні. 5. Повторюйте кроки 3 і 4 поки речення не стане правильне, а тоді переходьте - до уроку 2.2. + до уроку 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.2: БІЛЬШЕ КОМАНД ВИДАЛЕННЯ + Урок 1.2.2: БІЛЬШЕ КОМАНД ВИДАЛЕННЯ ** Наберіть d$ щоб видалити символи від курсора до кінця рядка. ** @@ -227,14 +227,14 @@ ---> Хтось надрукував кінець цього рядка двічі. кінець цього рядка двічі. - 5. Перейдіть до уроку 2.3 щоб розібратись в цьому детальніше. + 5. Перейдіть до уроку 1.2.3 щоб розібратись в цьому детальніше. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.3:ОПЕРАТОРИ І ПЕРЕМІЩЕННЯ + Урок 1.2.3:ОПЕРАТОРИ І ПЕРЕМІЩЕННЯ Багато команд що змінюють текст утворені з оператора і переміщення. @@ -257,7 +257,7 @@ переміщує курсор. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.4: ВИКОРИСТАННЯ ЛІЧИЛЬНИКА ДЛЯ ПЕРЕМІЩЕННЯ + Урок 1.2.4: ВИКОРИСТАННЯ ЛІЧИЛЬНИКА ДЛЯ ПЕРЕМІЩЕННЯ ** Введення числа перед переміщенням повторює його стільки раз. ** @@ -274,13 +274,13 @@ ---> А це просто рядок зі словами, серед яких можна рухати курсором. - 6. Переходьте до уроку 2.5. + 6. Переходьте до уроку 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.5: БАГАТОРАЗОВЕ ВИДАЛЕННЯ + Урок 1.2.5: БАГАТОРАЗОВЕ ВИДАЛЕННЯ ** Введення числа з оператором повторює його стільки ж разів. ** @@ -304,7 +304,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.6: ОПЕРАЦІЇ З РЯДКАМИ + Урок 1.2.6: ОПЕРАЦІЇ З РЯДКАМИ ** Введіть dd щоб видалити весь рядок. ** @@ -327,7 +327,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 2.7: ВІДКИНУТИ ЗМІНИ + Урок 1.2.7: ВІДКИНУТИ ЗМІНИ ** Натисніть u щоб скасувати останні команди, U щоб виправити ввесь рядок. ** @@ -349,7 +349,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ПІДСУМОК УРОКУ 2 + ПІДСУМОК УРОКУ 1.2 1. Щоб видалити все від курсора аж до початку наступного слова введіть: dw @@ -372,7 +372,7 @@ Щоб скасувати відміну натисніть: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.1: КОМАНДА PUT + Урок 1.3.1: КОМАНДА PUT ** Введіть p щоб вставити перед тим видалений текст після курсору. ** @@ -395,7 +395,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.2: Команда заміни + Урок 1.3.2: Команда заміни ** Наберіть rx щоб замінити символ під курсором на x . ** @@ -411,14 +411,14 @@ ---> Коли ця лігія набираламт. хтось наьтснкв геправмльні унопкм! ---> Коли ця лінія набиралась, хтось натиснув неправильні кнопки! - 5. Зараз переходьте до уроку 3.3. + 5. Зараз переходьте до уроку 1.3.3. Примітка: Ви маєте вчитись діями, а не простим заучуванням, пам'ятаєте? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.3: ОПЕРАТОР ЗАМІНИ + Урок 1.3.3: ОПЕРАТОР ЗАМІНИ ** Щоб зробити заміну до кінця слова введіть ce . ** @@ -441,7 +441,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 3.4: БІЛЬШЕ ЗМІН З c + Урок 1.3.4: БІЛЬШЕ ЗМІН З c ** Оператор заміни використовується з тими ж переміщеннями що і видалення. ** @@ -465,7 +465,7 @@ наборі. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ПІДСУМОК УРОКУ 3 + ПІДСУМОК УРОКУ 1.3 1. Щоб вставити текст який був видалений наберіть p . Це вставляє @@ -487,7 +487,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.1: ПОЗИЦІЯ КУРСОРА І СТАТУС ФАЙЛУ + Урок 1.4.1: ПОЗИЦІЯ КУРСОРА І СТАТУС ФАЙЛУ ** Введіть CTRL-G щоб побачити вашу позицію в файлі, і його статус. Введіть G щоб переміститись на потрібний рядок файлу. ** @@ -510,7 +510,7 @@ 4. Якщо ви запам'ятали три попередні кроки, то виконуйте. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.2: КОМАНДА ПОШУКУ + Урок 1.4.2: КОМАНДА ПОШУКУ ** Введіть / (слеш) і фразу, щоб шукати її в тексті. ** @@ -534,7 +534,7 @@ опція 'wrapscan' була виключена. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.3: ПОШУК ПАРНИХ ДУЖОК + Урок 1.4.3: ПОШУК ПАРНИХ ДУЖОК ** Введіть % щоб знайти парну ),], чи } . ** @@ -558,7 +558,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 4.4: КОМАНДА ЗАМІНИ + Урок 1.4.4: КОМАНДА ЗАМІНИ ** Наберіть :s/старе/нове/g щоб замінити 'старе' на 'нове'. ** @@ -581,7 +581,7 @@ підтвердженням кожної заміни. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ПІДСУМОК УРОКУ 4 + ПІДСУМОК УРОКУ 1.4 1. CTRL-G виводить вашу позицію в файлі і назву файлу. @@ -606,7 +606,7 @@ Щоб щоразу підтверджувати заміну додайте 'c' :%s/старе/нове/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.1: ЯК ВИКОНАТИ ЗОВНІШНЮ КОМАНДУ + Урок 1.5.1: ЯК ВИКОНАТИ ЗОВНІШНЮ КОМАНДУ ** Введіть :! і зовнішню команду, щоб виконати ту команду. ** @@ -629,7 +629,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.2: ЩЕ ПРО ЗАПИС ФАЙЛІВ + Урок 1.5.2: ЩЕ ПРО ЗАПИС ФАЙЛІВ ** Щоб зберегти змінений текст, введіть :w НАЗВА_ФАЙЛУ ** @@ -654,7 +654,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.3: ВИБІР ТЕКСТУ ДЛЯ ЗАПИСУ + Урок 1.5.3: ВИБІР ТЕКСТУ ДЛЯ ЗАПИСУ ** Щоб зберегти частину файлу, наберіть v переміщення :w НАЗВА_ФАЙЛУ ** @@ -679,14 +679,14 @@ Наприклад d видалить текст. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 5.4: ОТРИМАННЯ І ЗЛИТТЯ ФАЙЛІВ + Урок 1.5.4: ОТРИМАННЯ І ЗЛИТТЯ ФАЙЛІВ ** Щоб вставити вміст файлу введіть :r НАЗВА_ФАЙЛУ ** 1. Помістіть курсор десь над цим рядком. -Зауваження: Після виконання кроку 2 ви побачите текст з уроку 5.3. Тоді +Зауваження: Після виконання кроку 2 ви побачите текст з уроку 1.5.3. Тоді перемістіться вниз, щоб побачити вміст цього уроку знову. 2. Тоді отримайте вміст вашого файлу TEST використавши команду :r TEST , @@ -694,14 +694,14 @@ Файл що ви отримуєте поміщується під рядком курсора. 3. Щоб перевірити що файл вставлено, прокрутіть текст назад, і переконаєтесь - що тепер є дві копії урок 5.3, the original and the file version. + що тепер є дві копії урок 1.5.3, the original and the file version. Примітка: Також ви можете вставляти вивід зовнішньої програми. Наприклад :r !ls читає вивід команди ls і вставляє його під курсором. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Підсумок 5 уроку + Підсумок 1.5 уроку 1. :!команда виконує зовнішню команду. @@ -719,7 +719,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.1: КОМАНДА ВСТАВКИ + Урок 1.6.1: КОМАНДА ВСТАВКИ ** Введіть o щоб вставити новий рядок під курсором. ** @@ -742,7 +742,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.2: КОМАНДА ДОПИСУВАННЯ + Урок 1.6.2: КОМАНДА ДОПИСУВАННЯ ** Натисніть a щоб вставити текст після курсору. ** @@ -766,7 +766,7 @@ є тільки те, де вставляються символи. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.3: ІНШИЙ СПОСІБ ЗАМІНИ + Урок 1.6.3: ІНШИЙ СПОСІБ ЗАМІНИ ** Введіть велику R щоб замінити більш ніж один символ. ** @@ -789,7 +789,7 @@ символ видаляє символ який стояв на його місці. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.4: КОПІЮВАННЯ І ВСТАВКА + Урок 1.6.4: КОПІЮВАННЯ І ВСТАВКА ** Використайте оператор y щоб копіювати текст і p щоб його вставити ** @@ -813,7 +813,7 @@ Зауваження: також можна використовувати y як оператор; yw копіює одне слово. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 6.5: ВСТАНОВЛЕННЯ ОПЦІЙ + Урок 1.6.5: ВСТАНОВЛЕННЯ ОПЦІЙ ** Встановити опцію так що пошук чи заміна буде ігнорувати регістр ** @@ -837,7 +837,7 @@ Примітка: Якщо ви хочете не брати до уваги регістр тільки під час одного пошуку використайте ключ \c. Наприклад: /ігнорувати\c [ENTER] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ПІДСУМОК УРОКУ 6 + ПІДСУМОК УРОКУ 1.6 1. Введіть о щоб додати рядок ПІД курсором і почати режим вставки. Введіть O щоб додати рядок НАД курсором. @@ -861,7 +861,7 @@ 7. Використайте префікс "no" щоб вимкнути опцію: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 7.1: ОТРИМАННЯ ДОПОМОГИ + Урок 1.7.1: ОТРИМАННЯ ДОПОМОГИ ** Використання вбудованої довідкової системи ** @@ -884,7 +884,7 @@ :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 7.2: СТВОРЕННЯ СКРИПТА АВТОЗАПУСКУ + Урок 1.7.2: СТВОРЕННЯ СКРИПТА АВТОЗАПУСКУ ** Ввімкнення додаткових функцій Vim ** @@ -908,7 +908,7 @@ детальної інформації введіть :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Урок 7.3: АВТОДОПОВНЕННЯ + Урок 1.7.3: АВТОДОПОВНЕННЯ ** Автодоповнення за допомогою CTRL-D і [TAB] ** @@ -931,7 +931,7 @@ [TAB]. Це особливо корисно для команди :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ПІДСУМОК УРОКУ 7 + ПІДСУМОК УРОКУ 1.7 1. Введіть :help або натисніть [F1] щоб відкрити вікно довідки. diff --git a/usr/share/vim/vim91/tutor/tutor.utf-8 b/usr/share/vim/vim91/tutor/tutor1.utf-8 similarity index 92% rename from usr/share/vim/vim91/tutor/tutor.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.utf-8 index 3df15f1a1d1..04b490f0c90 100644 --- a/usr/share/vim/vim91/tutor/tutor.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.utf-8 @@ -1,12 +1,13 @@ =============================================================================== = W e l c o m e t o t h e V I M T u t o r - Version 1.7 = +=============================================================================== += C H A P T E R ONE = =============================================================================== Vim is a very powerful editor that has many commands, too many to explain in a tutor such as this. This tutor is designed to describe enough of the commands that you will be able to easily use Vim as an all-purpose editor. - The approximate time required to complete the tutor is 30 minutes, depending upon how much time is spent with experimentation. @@ -17,12 +18,11 @@ It is important to remember that this tutor is set up to teach by use. That means that you need to execute the commands to learn them properly. If you only read the text, you will forget the commands! - Now, make sure that your Caps-Lock key is NOT depressed and press - the j key enough times to move the cursor so that lesson 1.1 + the j key enough times to move the cursor so that lesson 1.1.1 completely fills the screen. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.1: MOVING THE CURSOR + Lesson 1.1.1: MOVING THE CURSOR ** To move the cursor, press the h,j,k,l keys as indicated. ** @@ -36,7 +36,7 @@ 2. Hold down the down key (j) until it repeats. Now you know how to move to the next lesson. - 3. Using the down key, move to lesson 1.2. + 3. Using the down key, move to lesson 1.1.2. NOTE: If you are ever unsure about something you typed, press to place you in Normal mode. Then retype the command you wanted. @@ -45,7 +45,7 @@ NOTE: The cursor keys should also work. But using hjkl you will be able to move around much faster, once you get used to it. Really! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.2: EXITING VIM + Lesson 1.1.2: EXITING VIM !! NOTE: Before executing any of the steps below, read this entire lesson!! @@ -64,11 +64,11 @@ NOTE: The cursor keys should also work. But using hjkl you will be able to NOTE: :q! discards any changes you made. In a few lessons you will learn how to save the changes to a file. - 5. Move the cursor down to lesson 1.3. + 5. Move the cursor down to lesson 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.3: TEXT EDITING - DELETION + Lesson 1.1.3: TEXT EDITING - DELETION ** Press x to delete the character under the cursor. ** @@ -84,14 +84,14 @@ NOTE: :q! discards any changes you made. In a few lessons you ---> The ccow jumpedd ovverr thhe mooon. - 5. Now that the line is correct, go on to lesson 1.4. + 5. Now that the line is correct, go on to lesson 1.1.4. NOTE: As you go through this tutor, do not try to memorize, learn by usage. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.4: TEXT EDITING - INSERTION + Lesson 1.1.4: TEXT EDITING - INSERTION ** Press i to insert text. ** @@ -109,12 +109,12 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage. ---> There is text misng this . ---> There is some text missing from this line. - 5. When you are comfortable inserting text move to lesson 1.5. + 5. When you are comfortable inserting text move to lesson 1.1.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.5: TEXT EDITING - APPENDING + Lesson 1.1.5: TEXT EDITING - APPENDING ** Press A to append text. ** @@ -134,17 +134,17 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage. ---> There is also some text miss There is also some text missing here. - 5. When you are comfortable appending text move to lesson 1.6. + 5. When you are comfortable appending text move to lesson 1.1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1.6: EDITING A FILE + Lesson 1.1.6: EDITING A FILE ** Use :wq to save a file and exit. ** !! NOTE: Before executing any of the steps below, read this entire lesson!! 1. If you have access to another terminal, do the following there. - Otherwise, exit this tutor as you did in lesson 1.2: :q! + Otherwise, exit this tutor as you did in lesson 1.1.2: :q! 2. At the shell prompt type this command: vim file.txt 'vim' is the command to start the Vim editor, 'file.txt' is the name of @@ -160,7 +160,7 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage. 6. After reading the above steps and understanding them: do it. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 1 SUMMARY + Lesson 1.1 SUMMARY 1. The cursor is moved using either the arrow keys or the hjkl keys. @@ -180,10 +180,10 @@ NOTE: As you go through this tutor, do not try to memorize, learn by usage. NOTE: Pressing will place you in Normal mode or will cancel an unwanted and partially completed command. -Now continue with lesson 2. +Now continue with lesson 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.1: DELETION COMMANDS + Lesson 1.2.1: DELETION COMMANDS ** Type dw to delete a word. ** @@ -202,11 +202,11 @@ Now continue with lesson 2. ---> There are a some words fun that don't belong paper in this sentence. - 5. Repeat steps 3 and 4 until the sentence is correct and go to lesson 2.2. + 5. Repeat steps 3 and 4 until the sentence is correct and go to lesson 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.2: MORE DELETION COMMANDS + Lesson 1.2.2: MORE DELETION COMMANDS ** Type d$ to delete to the end of the line. ** @@ -222,14 +222,14 @@ Now continue with lesson 2. ---> Somebody typed the end of this line twice. end of this line twice. - 5. Move on to lesson 2.3 to understand what is happening. + 5. Move on to lesson 1.2.3 to understand what is happening. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.3: ON OPERATORS AND MOTIONS + Lesson 1.2.3: ON OPERATORS AND MOTIONS Many commands that change text are made from an operator and a motion. @@ -252,7 +252,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will move the cursor as specified. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.4: USING A COUNT FOR A MOTION + Lesson 1.2.4: USING A COUNT FOR A MOTION ** Typing a number before a motion repeats it that many times. ** @@ -269,13 +269,13 @@ NOTE: Pressing just the motion while in Normal mode without an operator will ---> This is just a line with words you can move around in. - 6. Move on to lesson 2.5. + 6. Move on to lesson 1.2.5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.5: USING A COUNT TO DELETE MORE + Lesson 1.2.5: USING A COUNT TO DELETE MORE ** Typing a number with an operator repeats it that many times. ** @@ -298,7 +298,7 @@ NOTE: Pressing just the motion while in Normal mode without an operator will ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.6: OPERATING ON LINES + Lesson 1.2.6: OPERATING ON LINES ** Type dd to delete a whole line. ** @@ -320,9 +320,8 @@ NOTE: Pressing just the motion while in Normal mode without an operator will ---> 7) And so are you. Doubling to operate on a line also works for operators mentioned below. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2.7: THE UNDO COMMAND + Lesson 1.2.7: THE UNDO COMMAND ** Press u to undo the last commands, U to fix a whole line. ** @@ -339,13 +338,13 @@ Doubling to operate on a line also works for operators mentioned below. ---> Fiix the errors oon thhis line and reeplace them witth undo. - 8. These are very useful commands. Now move on to the lesson 2 Summary. + 8. These are very useful commands. Now move on to the lesson 1.2 Summary. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 2 SUMMARY + Lesson 1.2 SUMMARY 1. To delete from the cursor up to the next word type: dw 2. To delete from the cursor up to the end of the word type: de @@ -368,7 +367,7 @@ Doubling to operate on a line also works for operators mentioned below. To undo the undos, type: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.1: THE PUT COMMAND + Lesson 1.3.1: THE PUT COMMAND ** Type p to put previously deleted text after the cursor. ** @@ -391,7 +390,7 @@ Doubling to operate on a line also works for operators mentioned below. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.2: THE REPLACE COMMAND + Lesson 1.3.2: THE REPLACE COMMAND ** Type rx to replace the character at the cursor with x . ** @@ -407,14 +406,14 @@ Doubling to operate on a line also works for operators mentioned below. ---> Whan this lime was tuoed in, someone presswd some wrojg keys! ---> When this line was typed in, someone pressed some wrong keys! - 5. Now move on to lesson 3.3. + 5. Now move on to lesson 1.3.3. NOTE: Remember that you should be learning by doing, not memorization. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.3: THE CHANGE OPERATOR + Lesson 1.3.3: THE CHANGE OPERATOR ** To change until the end of a word, type ce . ** @@ -437,7 +436,7 @@ Notice that ce deletes the word and places you in Insert mode. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3.4: MORE CHANGES USING c + Lesson 1.3.4: MORE CHANGES USING c ** The change operator is used with the same motions as delete. ** @@ -460,7 +459,7 @@ Notice that ce deletes the word and places you in Insert mode. NOTE: You can use the Backspace key to correct mistakes while typing. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 3 SUMMARY + Lesson 1.3 SUMMARY 1. To put back text that has just been deleted, type p . This puts the @@ -483,7 +482,7 @@ Now go on to the next lesson. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.1: CURSOR LOCATION AND FILE STATUS + Lesson 1.4.1: CURSOR LOCATION AND FILE STATUS ** Type CTRL-G to show your location in the file and the file status. Type G to move to a line in the file. ** @@ -506,7 +505,7 @@ NOTE: You may see the cursor position in the lower right corner of the screen 4. If you feel confident to do this, execute steps 1 through 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.2: THE SEARCH COMMAND + Lesson 1.4.2: THE SEARCH COMMAND ** Type / followed by a phrase to search for the phrase. ** @@ -529,7 +528,7 @@ NOTE: When the search reaches the end of the file it will continue at the start, unless the 'wrapscan' option has been reset. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.3: MATCHING PARENTHESES SEARCH + Lesson 1.4.3: MATCHING PARENTHESES SEARCH ** Type % to find a matching ),], or } . ** @@ -552,7 +551,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4.4: THE SUBSTITUTE COMMAND + Lesson 1.4.4: THE SUBSTITUTE COMMAND ** Type :s/old/new/g to substitute 'new' for 'old'. ** @@ -575,7 +574,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses! with a prompt whether to substitute or not. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 4 SUMMARY + Lesson 1.4 SUMMARY 1. CTRL-G displays your location in the file and the file status. @@ -598,7 +597,7 @@ NOTE: This is very useful in debugging a program with unmatched parentheses! To ask for confirmation each time add 'c' :%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.1: HOW TO EXECUTE AN EXTERNAL COMMAND + Lesson 1.5.1: HOW TO EXECUTE AN EXTERNAL COMMAND ** Type :! followed by an external command to execute that command. ** @@ -621,7 +620,7 @@ NOTE: All : commands must be finished by hitting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.2: MORE ON WRITING FILES + Lesson 1.5.2: MORE ON WRITING FILES ** To save the changes made to the text, type :w FILENAME ** @@ -644,7 +643,7 @@ NOTE: If you were to exit Vim and start it again with vim TEST , the file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.3: SELECTING TEXT TO WRITE + Lesson 1.5.3: SELECTING TEXT TO WRITE ** To save part of the file, type v motion :w FILENAME ** @@ -667,14 +666,14 @@ NOTE: Pressing v starts Visual selection. You can move the cursor around to do something with the text. For example, d deletes the text. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.4: RETRIEVING AND MERGING FILES + Lesson 1.5.4: RETRIEVING AND MERGING FILES ** To insert the contents of a file, type :r FILENAME ** 1. Place the cursor just above this line. -NOTE: After executing Step 2 you will see text from lesson 5.3. Then move +NOTE: After executing Step 2 you will see text from lesson 1.5.3. Then move DOWN to see this lesson again. 2. Now retrieve your TEST file using the command :r TEST where TEST is @@ -682,7 +681,7 @@ NOTE: After executing Step 2 you will see text from lesson 5.3. Then move The file you retrieve is placed below the cursor line. 3. To verify that a file was retrieved, cursor back and notice that there - are now two copies of lesson 5.3, the original and the file version. + are now two copies of lesson 1.5.3, the original and the file version. NOTE: You can also read the output of an external command. For example, :r !ls reads the output of the ls command and puts it below the @@ -690,7 +689,7 @@ NOTE: You can also read the output of an external command. For example, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5 SUMMARY + Lesson 1.5 SUMMARY 1. :!command executes an external command. @@ -713,7 +712,7 @@ NOTE: You can also read the output of an external command. For example, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.1: THE OPEN COMMAND + Lesson 1.6.1: THE OPEN COMMAND ** Type o to open a line below the cursor and place you in Insert mode. ** @@ -736,7 +735,7 @@ NOTE: You can also read the output of an external command. For example, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.2: THE APPEND COMMAND + Lesson 1.6.2: THE APPEND COMMAND ** Type a to insert text AFTER the cursor. ** @@ -759,7 +758,7 @@ NOTE: a, i and A all go to the same Insert mode, the only difference is where the characters are inserted. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.3: ANOTHER WAY TO REPLACE + Lesson 1.6.3: ANOTHER WAY TO REPLACE ** Type a capital R to replace more than one character. ** @@ -782,8 +781,7 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an existing character. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.4: COPY AND PASTE TEXT - + Lesson 1.6.4: COPY AND PASTE TEXT ** Use the y operator to copy text and p to paste it ** @@ -806,7 +804,7 @@ NOTE: Replace mode is like Insert mode, but every typed character deletes an NOTE: You can also use y as an operator: yw yanks one word, yy yanks the whole line, then p puts that line. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6.5: SET OPTION + Lesson 1.6.5: SET OPTION ** Set an option so a search or substitute ignores case ** @@ -829,7 +827,7 @@ NOTE: To remove the highlighting of matches enter: :nohlsearch NOTE: If you want to ignore case for just one search command, use \c in the phrase: /ignore\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 6 SUMMARY + Lesson 1.6 SUMMARY 1. Type o to open a line BELOW the cursor and start Insert mode. Type O to open a line ABOVE the cursor. @@ -852,7 +850,7 @@ NOTE: If you want to ignore case for just one search command, use \c 7. Prepend "no" to switch an option off: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.1: GETTING HELP + Lesson 1.7.1: GETTING HELP ** Use the on-line help system ** @@ -875,7 +873,7 @@ NOTE: If you want to ignore case for just one search command, use \c :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.2: CREATE A STARTUP SCRIPT + Lesson 1.7.2: CREATE A STARTUP SCRIPT ** Enable Vim features ** @@ -898,7 +896,7 @@ NOTE: If you want to ignore case for just one search command, use \c For more information type :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7.3: COMPLETION + Lesson 1.7.3: COMPLETION ** Command line completion with CTRL-D and ** @@ -921,7 +919,7 @@ NOTE: Completion works for many commands. Just try pressing CTRL-D and . It is especially useful for :help . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 7 SUMMARY + Lesson 1.7 SUMMARY 1. Type :help or press or to open a help window. @@ -945,10 +943,14 @@ NOTE: Completion works for many commands. Just try pressing CTRL-D and ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - This concludes the Vim Tutor. It was intended to give a brief overview of - the Vim editor, just enough to allow you to use the editor fairly easily. - It is far from complete as Vim has many many more commands. Read the user - manual next: ":help user-manual". + This concludes Chapter 1 of the Vim Tutor. Consider continuing with + Chapter 2. + + It was intended to give a brief overview of the Vim editor, just enough to + allow you to use the editor fairly easily. It is far from complete as Vim + has many many more commands. + + Read the user manual next: ":help user-manual". For further reading and studying, this book is recommended: Vim - Vi Improved - by Steve Oualline diff --git a/usr/share/vim/vim91/tutor/tutor.vi.utf-8 b/usr/share/vim/vim91/tutor/tutor1.vi.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.vi.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.vi.utf-8 index 2e967c84c00..a48a248eebc 100644 --- a/usr/share/vim/vim91/tutor/tutor.vi.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.vi.utf-8 @@ -18,10 +18,10 @@ sẽ quên các câu lệnh! Bây giờ, cần chắc chắn là phím Shift KHÔNG bị nhấn và hãy nhấn phím - j đủ số lần cần thiết (di chuyển con trỏ) để Bài 1.1 hiện ra đầy đủ + j đủ số lần cần thiết (di chuyển con trỏ) để Bài 1.1.1 hiện ra đầy đủ trên màn hình. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 1.1: DI CHUYỂN CON TRỎ + Bài 1.1.1: DI CHUYỂN CON TRỎ ** Để di chuyển con trỏ, nhấn các phím h,j,k,l như đã chỉ ra. ** @@ -35,7 +35,7 @@ 2. Nhấn và giữ phím (j) cho đến khi nó lặp lại. ---> Bây giờ bạn biết cách chuyển tới bài học thứ hai. - 3. Sử dụng phím di chuyển xuống bài 1.2. + 3. Sử dụng phím di chuyển xuống bài 1.1.2. Chú ý: Nếu bạn không chắc chắn về những gì đã gõ, hãy nhấn để chuyển vào chế độ Câu lệnh, rồi gõ lại những câu lệnh mình muốn. @@ -44,7 +44,7 @@ Chú ý: Các phím mũi tên cũng làm việc. Nhưng một khi sử dụng th bạn sẽ di chuyển con trỏ nhanh hơn so với các phím mũi tên. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 1.2: VÀO VÀ THOÁT VIM + Bài 1.1.2: VÀO VÀ THOÁT VIM !! CHÚ Ý: Trước khi thực hiện bất kỳ lệnh nào, xin hãy đọc cả bài học này!! @@ -65,9 +65,9 @@ Chú ý: Các phím mũi tên cũng làm việc. Nhưng một khi sử dụng th 4. Nếu bạn đã nhớ và nắm chắc những câu lệnh trên, hãy thực hiện các bước từ 1 tới 3 để thoát và quay vào trình soạn thảo. Sau đó di chuyển con trỏ - tới Bài 1.3. + tới Bài 1.1.3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 1.3: SOẠN THẢO VĂN BẢN - XÓA + Bài 1.1.3: SOẠN THẢO VĂN BẢN - XÓA ** Trong chế độ Câu lệnh nhấn x để xóa ký tự nằm dưới con trỏ. ** @@ -83,14 +83,14 @@ Chú ý: Các phím mũi tên cũng làm việc. Nhưng một khi sử dụng th ---> Emm xiinh em đứnng chỗ nào cũnkg xinh. - 5. Câu trên đã sửa xong, hãy chuyển tới Bài 1.4. + 5. Câu trên đã sửa xong, hãy chuyển tới Bài 1.1.4. Chú ý: Khi học theo cuốn hướng dẫn này đừng cố nhớ, mà học từ thực hành. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 1.4: SOẠN THẢO VĂN BẢN - CHÈN + Bài 1.1.4: SOẠN THẢO VĂN BẢN - CHÈN ** Trong chế độ Câu lệnh nhấn i để chèn văn bản. ** @@ -113,7 +113,7 @@ Chú ý: Khi học theo cuốn hướng dẫn này đừng cố nhớ, mà học ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - TỔNG KẾT BÀI 1 + TỔNG KẾT BÀI 1.1 1. Con trỏ được di chuyển bởi các phím mũi tên hoặc các phím hjkl. @@ -132,11 +132,11 @@ Chú ý: Khi học theo cuốn hướng dẫn này đừng cố nhớ, mà học CHÚ Ý: Nhấn sẽ đưa bạn vào chế độ Câu lệnh hoặc sẽ hủy bỏ một câu lệnh hay đoạn câu lệnh không mong muốn. -Bây giờ chúng ta tiếp tục với Bài 2. +Bây giờ chúng ta tiếp tục với Bài 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 2.1: CÁC LỆNH XÓA + Bài 1.2.1: CÁC LỆNH XÓA ** Gõ dw để xóa tới cuối một từ. ** @@ -155,11 +155,11 @@ Bây giờ chúng ta tiếp tục với Bài 2. ---> Khi trái tỉm tìm tim ai như mùa đông giá lạnh lanh Anh đâu thành cánh én nhỏ trùng khơi. - 5. Lặp lại các bước cho đến khi sửa xong câu thơ rồi chuyển tới Bài 2.2. + 5. Lặp lại các bước cho đến khi sửa xong câu thơ rồi chuyển tới Bài 1.2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 2.2: CÁC CÂU LỆNH XÓA KHÁC + Bài 1.2.2: CÁC CÂU LỆNH XÓA KHÁC ** gõ d$ để xóa tới cuối một dòng. ** @@ -175,14 +175,14 @@ Bây giờ chúng ta tiếp tục với Bài 2. ---> Đã qua đi những tháng năm khờ dại. thừa thãi. - 5. Chuyển tới Bài 2.3 để hiểu cái gì đang xảy ra. + 5. Chuyển tới Bài 1.2.3 để hiểu cái gì đang xảy ra. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 2.3: CÂU LỆNH VÀ ĐỐI TƯỢNG + Bài 1.2.3: CÂU LỆNH VÀ ĐỐI TƯỢNG Câu lệnh xóa d có dạng như sau: @@ -205,7 +205,7 @@ CHÚ Ý: Dành cho những người ham tìm hiểu, chỉ nhấn đối tượ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 2.4: TRƯỜNG HỢP NGOẠI LỆ CỦA QUY LUẬT 'CÂU LỆNH-ĐỐI TƯỢNG' + Bài 1.2.4: TRƯỜNG HỢP NGOẠI LỆ CỦA QUY LUẬT 'CÂU LỆNH-ĐỐI TƯỢNG' ** Gõ dd để xóa cả một dòng. ** @@ -228,7 +228,7 @@ CHÚ Ý: Dành cho những người ham tìm hiểu, chỉ nhấn đối tượ 9) Bao khổ đau chờ tia nắng bình minh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 2.5: CÂU LỆNH "HỦY THAO TÁC" + Bài 1.2.5: CÂU LỆNH "HỦY THAO TÁC" ** Nhấn u để hủy bỏ những câu lệnh cuối cùng, U để sửa cả một dòng. ** @@ -245,13 +245,13 @@ CHÚ Ý: Dành cho những người ham tìm hiểu, chỉ nhấn đối tượ ---> Câyy ccó cộii, nuước csó nguuồn. - 8. Đây là những câu lệnh rất hữu ích. Bây giờ chuyển tới Tổng kết Bài 2. + 8. Đây là những câu lệnh rất hữu ích. Bây giờ chuyển tới Tổng kết Bài 1.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - TỔNG KẾT BÀI 2 + TỔNG KẾT BÀI 1.2 1. Để xóa từ con trỏ tới cuối một từ gõ: dw @@ -274,7 +274,7 @@ CHÚ Ý: Dành cho những người ham tìm hiểu, chỉ nhấn đối tượ Để hủy bỏ các câu lệnh hủy bỏ, gõ: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 3.1: CÂU LỆNH DÁN + Bài 1.3.1: CÂU LỆNH DÁN ** Gõ p để dán những gì vừa xóa tới sau con trỏ. ** @@ -297,7 +297,7 @@ CHÚ Ý: Dành cho những người ham tìm hiểu, chỉ nhấn đối tượ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 3.2: CÂU LỆNH THAY THẾ + Bài 1.3.2: CÂU LỆNH THAY THẾ ** Gõ r và một ký tự để thay thế ký tự nằm dưới con trỏ. ** @@ -313,14 +313,14 @@ CHÚ Ý: Dành cho những người ham tìm hiểu, chỉ nhấn đối tượ ---> "Trên đời nài làm gì có đườmg, người to đi mãi rồi thànk đường là tHôi" ---> "Trên đời này làm gì có đường, người ta đi mãi rồi thành đường mà thôi" - 5. Bây giờ chuyển sang Bài 3.3. + 5. Bây giờ chuyển sang Bài 1.3.3. CHÚ Ý: Hãy nhớ rằng bạn cần thực hành, không nên "học vẹt". ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 3.3: CÂU LỆNH THAY ĐỔI + Bài 1.3.3: CÂU LỆNH THAY ĐỔI ** Để thay đổi một phần hay cả một từ, gõ cw . ** @@ -343,7 +343,7 @@ Chú ý rằng cw không chỉ thay đổi từ, nhưng còn đưa bạn vào ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 3.4: TIẾP TỤC THAY ĐỔI VỚI c + Bài 1.3.4: TIẾP TỤC THAY ĐỔI VỚI c ** Câu lệnh thay đổi được sử dụng với cùng đối tượng như câu lệnh xóa. ** @@ -366,7 +366,7 @@ Chú ý rằng cw không chỉ thay đổi từ, nhưng còn đưa bạn vào ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - TỔNG KẾT BÀI 3 + TỔNG KẾT BÀI 1.3 1. Để dán đoạn văn bản vừa xóa, gõ p. Câu lệnh này sẽ đặt đoạn văn bản này @@ -389,7 +389,7 @@ Bây giờ chúng ta tiếp tục bài học mới. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 4.1: THÔNG TIN VỀ TẬP TIN VÀ VỊ TRÍ TRONG TẬP TIN + Bài 1.4.1: THÔNG TIN VỀ TẬP TIN VÀ VỊ TRÍ TRONG TẬP TIN ** Gõ CTRL-g để hiển thị vị trí của bạn trong tập tin và thông tin về tập tin. @@ -412,7 +412,7 @@ Bây giờ chúng ta tiếp tục bài học mới. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 4.2: CÂU LỆNH TÌM KIẾM + Bài 1.4.2: CÂU LỆNH TÌM KIẾM ** Gõ / và theo sau là cụm từ muốn tìm kiếm. ** @@ -435,7 +435,7 @@ Chú ý: Khi tìm kiếm đến cuối tập tin, việc tìm kiếm sẽ tiếp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 4.3: TÌM KIẾM CÁC DẤU NGOẶC SÁNH ĐÔI + Bài 1.4.3: TÌM KIẾM CÁC DẤU NGOẶC SÁNH ĐÔI ** Gõ % để tìm kiếm ),], hay } . ** @@ -458,7 +458,7 @@ Chú ý: Rất có ích khi sửa lỗi chương trình, khi có các lỗi th ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 4.4: MỘT CÁCH SỬA LỖI + Bài 1.4.4: MỘT CÁCH SỬA LỖI ** Gõ :s/cũ/mới/g để thay thế 'mới' vào 'cũ'. ** @@ -481,7 +481,7 @@ Chú ý: Rất có ích khi sửa lỗi chương trình, khi có các lỗi th ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - TỔNG KẾT BÀI 4 + TỔNG KẾT BÀI 1.4 1. Ctrl-g vị trí của con trỏ trong tập tin và thông tin về tập tin. @@ -504,7 +504,7 @@ Chú ý: Rất có ích khi sửa lỗi chương trình, khi có các lỗi th ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Lesson 5.1: CÁCH THỰC HIỆN MỘT CÂU LỆNH NGOẠI TRÚ + Lesson 1.5.1: CÁCH THỰC HIỆN MỘT CÂU LỆNH NGOẠI TRÚ ** Gõ :! theo sau là một câu lệnh ngoại trú để thực hiện câu lệnh đó. ** @@ -527,7 +527,7 @@ Chú ý: Tất cả các câu lệnh : cần kết thúc bởi phím ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 5.2: GHI LẠI CÁC TẬP TIN + Bài 1.5.2: GHI LẠI CÁC TẬP TIN ** Để ghi lại các thay đổi, gõ :w TÊNTỆPTIN. ** @@ -550,7 +550,7 @@ Chú ý: Nếu bạn thoát khỏi Vim và quay trở lại với tên tập tin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 5.3: CÂU LỆNH GHI CHỌN LỌC + Bài 1.5.3: CÂU LỆNH GHI CHỌN LỌC ** Để ghi một phần của tập tin, gõ :#,# w TÊNTẬPTIN ** @@ -573,7 +573,7 @@ Chú ý: Nếu bạn thoát khỏi Vim và quay trở lại với tên tập tin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 5.4: ĐỌC VÀ KẾT HỢP CÁC TẬP TIN + Bài 1.5.4: ĐỌC VÀ KẾT HỢP CÁC TẬP TIN ** Để chèn nội dung của một tập tin, gõ :r TÊNTẬPTIN ** @@ -582,7 +582,7 @@ Chú ý: Nếu bạn thoát khỏi Vim và quay trở lại với tên tập tin 2. Đặt con trỏ tại đầu trang này. -CHÚ Ý: Sau khi thực hiện Bước 3 bạn sẽ thấy Bài 5.3. Sau đó cần di chuyển +CHÚ Ý: Sau khi thực hiện Bước 3 bạn sẽ thấy Bài 1.5.3. Sau đó cần di chuyển XUỐNG bài học này lần nữa. 3. Bây giờ dùng câu lệnh :r TEST để đọc tập tin TEST, trong đó TEST là @@ -591,12 +591,12 @@ CHÚ Ý: Sau khi thực hiện Bước 3 bạn sẽ thấy Bài 5.3. Sau đó c CHÚ Ý: Tập tin được đọc sẽ đặt bắt đầu từ vị trí của con trỏ. 4. Để kiểm tra lại, di chuyển con trỏ ngược trở lại và thấy rằng bây giờ - có hai Bài 5.3, bản gốc và bản vừa chèn. + có hai Bài 1.5.3, bản gốc và bản vừa chèn. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - TỔNG KẾT BÀI 5 + TỔNG KẾT BÀI 1.5 1. :!câulệnh thực hiện một câu lệnh ngoại trú @@ -619,7 +619,7 @@ CHÚ Ý: Tập tin được đọc sẽ đặt bắt đầu từ vị trí củ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 6.1: CÂU LỆNH TẠO DÒNG + Bài 1.6.1: CÂU LỆNH TẠO DÒNG ** Gõ o để mở một dòng phía dưới con trỏ và chuyển vào chế độ Soạn thảo. ** @@ -642,7 +642,7 @@ Di chuyển con trỏ tới dòng này, rồi gõ Shift-O sẽ mở một dòng ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 6.2: CÂU LỆNH THÊM VÀO + Bài 1.6.2: CÂU LỆNH THÊM VÀO ** Gõ a để chèn văn bản vào SAU con trỏ. ** @@ -665,7 +665,7 @@ Chú ý: Lệnh này thay cho việc gõ i , ký tự cuối cùng, văn bản ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 6.3: MỘT CÁCH THAY THẾ KHÁC + Bài 1.6.3: MỘT CÁCH THAY THẾ KHÁC ** Gõ chữ cái R hoa để thay thế nhiều ký tự. ** @@ -688,7 +688,7 @@ Chú ý: Lệnh này thay cho việc gõ i , ký tự cuối cùng, văn bản ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 6.4: THIẾT LẬP CÁC THAM SỐ + Bài 1.6.4: THIẾT LẬP CÁC THAM SỐ ** Thiết lập một tùy chọn để việc tìm kiếm hay thay thế lờ đi kiểu chữ ** @@ -711,7 +711,7 @@ Chú ý: Lệnh này thay cho việc gõ i , ký tự cuối cùng, văn bản 6. Để xóa bỏ việc hiện sáng từ tìm thấy, gõ: :nohlsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - TỔNG KẾT BÀI 6 + TỔNG KẾT BÀI 1.6 1. Gõ o mở một dòng phía DƯỚI con trỏ và đặt con trỏ trên dòng vừa mở @@ -734,7 +734,7 @@ Chú ý: Lệnh này thay cho việc gõ i , ký tự cuối cùng, văn bản ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 7: CÂU LỆNH TRỢ GIÚP + Bài 1.7: CÂU LỆNH TRỢ GIÚP ** Sử dụng hệ thống trợ giúp có sẵn ** @@ -757,7 +757,7 @@ Chú ý: Lệnh này thay cho việc gõ i , ký tự cuối cùng, văn bản ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Bài 8: TẠO MỘT SCRIPT KHỞI ĐỘNG + Bài 1.8: TẠO MỘT SCRIPT KHỞI ĐỘNG ** Bật các tính năng của Vim ** diff --git a/usr/share/vim/vim91/tutor/tutor.zh.big5 b/usr/share/vim/vim91/tutor/tutor1.zh.big5 similarity index 100% rename from usr/share/vim/vim91/tutor/tutor.zh.big5 rename to usr/share/vim/vim91/tutor/tutor1.zh.big5 diff --git a/usr/share/vim/vim91/tutor/tutor.zh.euc b/usr/share/vim/vim91/tutor/tutor1.zh.euc similarity index 100% rename from usr/share/vim/vim91/tutor/tutor.zh.euc rename to usr/share/vim/vim91/tutor/tutor1.zh.euc diff --git a/usr/share/vim/vim91/tutor/tutor.zh_tw.utf-8 b/usr/share/vim/vim91/tutor/tutor1.zh.utf-8 similarity index 93% rename from usr/share/vim/vim91/tutor/tutor.zh_tw.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.zh.utf-8 index fc352598379..3b44665d12d 100644 --- a/usr/share/vim/vim91/tutor/tutor.zh_tw.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor1.zh.utf-8 @@ -26,7 +26,7 @@ ^ k 提示︰ h 的鍵位于左邊,每次按下就會向左移動。 < h l > l 的鍵位于右邊,每次按下就會向右移動。 - j j 鍵看起來很象一支尖端方向朝下的箭頭。 + j j 鍵看來很象一支尖端方向朝下的箭頭。 v 1. 請隨意在屏幕內移動光標,直至您覺得舒服為止。 @@ -105,7 +105,7 @@ 3. 然後按下 i 鍵,接著輸入必要的文本字符。 - 4. 所有文本都修正完畢,請按下 鍵返回正常模式。 + 4. 所有文本m修正完畢,請按下 鍵返回正常模式。 重復步驟2至步驟4以便修正句子。 ---> There is text misng this . @@ -128,7 +128,7 @@ :q! <回車> - 或者輸入以下命令保存所有修改︰ + 或芨擗J以下命令保存所有修改︰ :wq <回車> @@ -138,7 +138,7 @@ i 輸入必要文本 -特別提示︰按下 鍵會帶您回到正常模式或者取消一個不期望或者部分完成 +特別提示︰按下 鍵會帶您回到正常模式或籵消一個不期望或苀﹞嬪髡 的命令。 好了,第一講到此結束。下面接下來繼續第二講的內容。 @@ -196,7 +196,7 @@ 刪除命令 d 的格式如下︰ - [number] d object 或者 d [number] object + [number] d object 或 d [number] object 其意如下︰ number - 代表執行命令的次數(可選項,缺省設置為 1 )。 @@ -209,7 +209,7 @@ $ - 從當前光標當前位置直到當前行末。 特別提示︰ - 對于勇于探索者,請在正常模式下面僅按代表相應對象的鍵而不使用命令,則 + 對于勇于探索矷A請在正常模式下面僅按代表相應對象的鍵而不使用命令,則 將看到光標的移動正如上面的對象列表所代表的一樣。 @@ -221,7 +221,7 @@ ** 輸入 dd 可以刪除整一個當前行。 ** - 鑒于整行刪除的高頻度,VIM 的設計者決定要簡化整行刪除,僅需要在同一行上 + 鑒于整行刪除的高頻度,VIM 的設計籵M定要簡化整行刪除,僅需要在同一行上 擊打兩次 d 就可以刪除掉光標所在的整行了。 1. 請將光標移動到本節中下面的短句段落中的第二行。 @@ -249,14 +249,14 @@ 2. 輸入 x 刪除第一個不想保留的字母。 3. 然後輸入 u 撤消最後執行的(一次)命令。 4. 這次要使用 x 修正本行的所有錯誤。 - 5. 現在輸入一個大寫的 U ,恢復到該行的原始狀態。 + 5. 現在輸入一個大寫的 U ,庖_到該行的原始狀態。 6. 接著多次輸入 u 以撤消 U 以及更前的命令。 7. 然後多次輸入 CTRL-R (先按下 CTRL 鍵不放開,接著輸入 R 鍵) ,這樣就 - 可以執行恢復命令,也就是撤消掉撤消命令。 + 可以執行庖_命令,也就是撤消掉撤消命令。 ---> Fiix the errors oon thhis line and reeplace them witth undo. - 8. 這些都是非常有用的命令。下面是第二講的小結了。 + 8. 這些m是非常有用的命令。下面是第二講的小結了。 @@ -273,7 +273,7 @@ 4. 在正常模式下一個命令的格式是︰ - [number] command object 或者 command [number] object + [number] command object 或 command [number] object 其意是︰ number - 代表的是命令執行的次數 command - 代表要做的事情,比如 d 代表刪除 @@ -282,7 +282,7 @@ 5. 欲撤消以前的操作,請輸入︰u (小寫的u) 欲撤消在一行中所做的改動,請輸入︰U (大寫的U) - 欲撤消以前的撤消命令,恢復以前的操作結果,請輸入︰CTRL-R + 欲撤消以前的撤消命令,庖_以前的操作結果,請輸入︰CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 第三講第一節︰置入類命令 @@ -334,7 +334,7 @@ 第三講第三節︰更改類命令 - ** 要改變一個單字/單詞的部分或者全部,請輸入 cw ** + ** 要改變一個單字/單詞的部分或穸部,請輸入 cw ** 1. 請將光標移動到本節中下面標記有 ---> 的第一行。 @@ -361,7 +361,7 @@ 1. 更改類指令的工作方式跟刪除類命令是一致的。操作格式是︰ - [number] c object 或者 c [number] object + [number] c object 或 c [number] object 2. 對象參數也是一樣的,比如 w 代表單字/單詞,$代表行末等等。 @@ -393,7 +393,7 @@ 4. 更改類命令的格式是︰ - [number] c object 或者 c [number] object + [number] c object 或 c [number] object 下面我們繼續學習下一講。 @@ -427,7 +427,7 @@ ** 輸入 / 以及尾隨的字符串可以用以在當前文件中查找該字符串。** - 1. 在正常模式下輸入 / 字符。您此時會注意到該字符和光標都會出現在屏幕底 + 1. 在正常模式下輸入 / 字符。您此時會注意到該字符和光標m會出現在屏幕底 部,這跟 : 命令是一樣的。 2. 接著輸入 errroor <回車>。那個errroor就是您要查找的字符串。 @@ -500,7 +500,7 @@ 2. 輸入 / 然後緊隨一個字符串是則是在當前所編輯的文檔中向後查找該字符串。 輸入問號 ? 然後緊隨一個字符串是則是在當前所編輯的文檔中向前查找該字 符串。完成一次查找之後按 n 鍵則是重復上一次的命令,可在同一方向上查 - 找下一個字符串所在;或者按 Shift-N 向相反方向查找下該字符串所在。 + 找下一個字符串所在;或肏 Shift-N 向相反方向查找下該字符串所在。 3. 如果光標當前位置是括號(、)、[、]、{、},按 % 可以將光標移動到配對的 括號上。 @@ -523,12 +523,12 @@ 2. 接著輸入感嘆號 ! 這個字符,這樣就允許您執行外部的 shell 命令了。 3. 我們以 ls 命令為例。輸入 !ls <回車> 。該命令就會列舉出您當前目錄的 - 內容,就如同您在命令行提示符下輸入 ls 命令的結果一樣。如果 !ls 沒起 + 內容,就如同您在命令行提示符下輸入 ls 命令的結果一樣。如果 !ls 沒 作用,您可以試試 :!dir 看看。 ----> 提示︰ 所有的外部命令都可以以這種方式執行。 +---> 提示︰ 所有的外部命令m可以以這種方式執行。 ----> 提示︰ 所有的 : 命令都必須以 <回車> 告終。 +---> 提示︰ 所有的 : 命令m必須以 <回車> 告終。 @@ -539,7 +539,7 @@ ** 要將對文件的改動保存到文件中,請輸入 :w FILENAME ** - 1. 輸入 :!dir 或者 :!ls 獲知當前目錄的內容。您應當已知道最後還得敲 + 1. 輸入 :!dir 或 :!ls 獲知當前目錄的內容。您應當已知道最後還得敲 <回車> 吧。 2. 選擇一個尚未存在文件名,比如 TEST 。 @@ -562,7 +562,7 @@ ** 要保存文件的部分內容,請輸入 :#,# w FILENAME ** - 1. 再來執行一次 :!dir 或者 :!ls 獲知當前目錄的內容,然後選擇一個合適的 + 1. 再來執行一次 :!dir 或 :!ls 獲知當前目錄的內容,然後選擇一個合適的 不重名的文件名,比如 TEST 。 2. 接著將光標移動至本頁的最頂端,然後按 CTRL-g 找到該行的行號。別忘了 @@ -700,7 +700,7 @@ Open up a line above this by typing Shift-O while the cursor is on this line. 第六講第四節︰設置類命令的選項 - ** 設置可使查找或者替換可忽略大小寫的選項 ** + ** 設置可使查找或芫懂咱i忽略大小寫的選項 ** 1. 要查找單詞 ignore 可在正常模式下輸入 /ignore 。要重復查找該詞,可以 @@ -772,7 +772,7 @@ Open up a line above this by typing Shift-O while the cursor is on this line. ** 啟用vim的功能 ** - Vim的功能特性要比vi多得多,但大部分功能都沒有缺省激活。為了啟動更多的 + Vim的功能特性要比vi多得多,但大部分功能m沒有缺省激活。為了啟動更多的 功能,您得創建一個vimrc文件。 1. 開始編輯vimrc文件,這取決于您所使用的操作系統︰ @@ -801,15 +801,15 @@ Open up a line above this by typing Shift-O while the cursor is on this line. 為了更進一步的參考和學習,以下這本書值得推薦︰ - Vim - Vi Improved - 作者︰Steve Oualline + Vim - Vi Improved - 作矷JSteve Oualline 出版社︰New Riders - 這是第一本完全講解vim的書籍。對于初學者特別有用。其中還包含有大量實例 + 這是第一本完全講解vim的書籍。對于初學肵S別有用。其中還包含有大量實例 和圖示。欲知詳情,請訪問 https://iccf-holland.org/click5.html 以下這本書比較老了而且內容主要是vi而不是vim,但是也值得推薦︰ - Learning the Vi Editor - 作者︰Linda Lamb + Learning the Vi Editor - 作矷JLinda Lamb 出版社︰O'Reilly & Associates Inc. 這是一本不錯的書,通過它您幾乎能夠了解到全部vi能夠做到的事情。此書的第 @@ -817,7 +817,7 @@ Open up a line above this by typing Shift-O while the cursor is on this line. 本教程是由來自Calorado School of Minese的Michael C. Pierce、Robert K. Ware 所編寫的,其中來自Colorado State University的Charles Smith提供了 - 很多創意。編者通信地址是︰ + 很多創意。編苀q信地址是︰ bware@mines.colorado.edu @@ -825,9 +825,9 @@ Open up a line above this by typing Shift-O while the cursor is on this line. - 譯制者附言︰ + 譯制耵言︰ =========== - 簡體中文教程翻譯版之譯制者為梁昌泰 ,還有 + 簡體中文教程翻譯版之譯制肮停蝛鰹 ,還有 另外一個聯系地址︰linuxrat@gnuchina.org。 繁體中文教程是從簡體中文教程翻譯版使用 Debian GNU/Linux 中文項目小 diff --git a/usr/share/vim/vim91/tutor/tutor.zh_cn.utf-8 b/usr/share/vim/vim91/tutor/tutor1.zh_cn.utf-8 similarity index 100% rename from usr/share/vim/vim91/tutor/tutor.zh_cn.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.zh_cn.utf-8 diff --git a/usr/share/vim/vim91/tutor/tutor.zh.utf-8 b/usr/share/vim/vim91/tutor/tutor1.zh_tw.utf-8 similarity index 100% rename from usr/share/vim/vim91/tutor/tutor.zh.utf-8 rename to usr/share/vim/vim91/tutor/tutor1.zh_tw.utf-8 diff --git a/usr/share/vim/vim91/tutor/tutor2 b/usr/share/vim/vim91/tutor/tutor2 index eaeef400354..f41b7018cdb 100644 --- a/usr/share/vim/vim91/tutor/tutor2 +++ b/usr/share/vim/vim91/tutor/tutor2 @@ -1,9 +1,7 @@ =============================================================================== = W e l c o m e t o t h e V I M T u t o r - Version 1.7 = =============================================================================== -= = -= C h a p t e r - T w o = -= = += C H A P T E R TWO = =============================================================================== Hic Sunt Dracones: if this is your first exposure to vim and you @@ -119,7 +117,7 @@ REFERENCE: Numbered Registers :h quote0 NOTE: a common conundrum when coding is moving around large chunks of code. The following technique helps avoid number line calculations associated - with operatins like "a147d or :945,1091d a or even worse using + with operations like "a147d or :945,1091d a or even worse using i=1091-945 first 1. Move the cursor to the line below marked ---> @@ -146,7 +144,7 @@ NOTE: practice this operation multiple times to become fluent ma$%"ad'a doIt() } // the taxonomy of our function has changed and it - // no longer makes alphabetical sense in it's current position + // no longer makes alphabetical sense in its current position // imagine hundreds of lines of code diff --git a/usr/share/vim/vim91/tutor/tutor2.it b/usr/share/vim/vim91/tutor/tutor2.it new file mode 100644 index 00000000000..1d04b355efe --- /dev/null +++ b/usr/share/vim/vim91/tutor/tutor2.it @@ -0,0 +1,197 @@ +=============================================================================== += Benvenuto alla G u i d a all'Editor V I M - Versione 1.7 = +=============================================================================== += C A P I T O L O DUE = +=============================================================================== + + Hic Sunt Dracones: Se questa la prima volta che vi accostate a vim + e preferite iniziare dal capitolo introduttivo, gentilmente immettete + :q e poi iniziate da quello. + + Il tempo necessario per completare questo capitolo di circa 8-10 + minuti, a seconda del tempo utilizzato per fare delle prove. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.1.1: I REGISTRI CON NOME + + + ** Copiare due parole in registri diversi e poi incollarle ** + + 1. Spostate il cursore alla riga qui sotto marcata con ---> + + 2. Andate su una lettera qualsiasi di 'Edward' e battete "ayiw + +MNEMONICO: nel registro(") di nome (a) (y)copia (i)interna (w)parola + + 3. Spostatevi alla parola 'biscotti' (fc o 2fb o $b o /bis) + e battete "byiw + + 4. Andate su una lettera qualsiasi di 'Vince' e battete ciwa + +MNEMONICO: (c)cambia (i)interna (w)parola con di nome (a) + + 5. Andate su una lettera qualsiasi di 'dolci' e battete ciwb + +---> a) Edward sar d'ora in poi responsabile della razione di biscotti + b) Come compito, Vince sar il solo a decidere riguardo ai dolci + +NOTA: Anche una parola cancellata pu essere inviata ad un registro, p.es., + "sdiw canceller (d) la parola sotto il cursore (iw) e la metter + nel registro (s) +RIFERIMENTI: Registri :h registers + Registri con nome :h quotea + Movimento :h motion.txt /inner + CTRL-R :h insert /CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lezione 2.1.2: IL REGISTRO DELLE ESPRESSIONI + + + ** Inserire al volo risultati di un calcolo ** + + 1. Spostate il cursore alla riga qui sotto marcata con ---> + + 2. Andate su un punto qualsiasi del numero fornito + + 3. Battete ciw=60*60*24 + + 4. Sulla riga seguente, entrate in modo Insert e aggiungete + la data di oggi con =system('date') + +NOTA: Tutte le chiamate a sistema dipendono dal S.O., p.es., in ambiente + Windows si usa system('date /t') o :r!date /t + +---> Non ricordo il numero esatto di secondi in un giorno, 84600? + La data di oggi : + +NOTA: Lo stesso risultato si pu ottenere con :pu=system('date') + o, ancora pi brevemente, con :r!date + +RIFERIMENTI: Registro espressioni :h quote= + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lezione 2.1.3: I REGISTRI NUMERATI + + + ** Battere yy e dd per vedere l'effetto sui registri ** + + 1. Spostate il cursore alla riga qui sotto marcata con ---> + + 2. Copiate (yy) la riga stessa e controllate i registri con :reg + + 3. Cancellate la riga che inizia con "0." con "cdd, poi controllate i + registri (Dove vi aspettate sia finita la riga cancellata?) + + 4. Continuate a cancellare ogni riga seguente, controllando ogni volta + con :reg il risultato +NOTA: Dovreste notare che le righe cancellate per prime scendono nella + lista, man mano che vengono aggiunte nuove righe cancellate + 5. Poi incollate (p) i seguenti registri nell'ordine; c, 7, 4, 8, 2.+ + ossia "cp "7p ... + +---> 0. Questo + 9. dondolante + 8. messaggio + 7. + 6. in + 5. asse + 4. un + 3. guerresco + 2. segreto + 1. tributo + +NOTA: Le cancellazioni di righe intere (dd) sopravvivono nei registri numerati + molto pi a lungo delle copie di righe intere (yy), o delle + cancellazioni che implicano movimenti minori + +RIFERIMENTI: Registri numerati :h quote0 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lezione 2.1.4: IL FASCINO DELLE MARCATURE + + + ** Evitare di contare le righe di codice ** + +NOTA: Un problema frequente quando si scrivono programmi spostare numerose + righe di codice. Il metodo seguente evita di dover calcolare numeri di + riga con operazioni tipo "a147d o :945,1091d a o, ancor peggio, + usando prima i=1091-945 + + 1. Spostate il cursore alla riga qui sotto marcata con ---> + + 2. Andate alla prima riga della funzione e marcatela con ma + +NOTA: La posizione sulla riga NON importante! + + 3. Spostatevi a fine riga e da qui alla fine del blocco di codice + con $% + + 4. Cancellate il blocco salvandolo nel registro a con "ad'a + +MNEMONICO: nel registro(") di nome (a) mettere la cancellazione (d) dal + cursore fino alla RIGA che contiene il marcatore (') (a) + + 5. Incollare il blocco the le righe BBB e CCC "ap + +NOTA: Provare pi volte quest'operazione, per impratichirsi ma$%"ad'a + +---> AAA + function cresciutaTroppoinFretta() { + if ( condizioneVera ) { + faiQualcosa() + } + // La classificazione della nostra funzione cambiata + // non ha senso mantenerla nella posizione attuale + + // ...immaginate centinaia di righe di codice + + // Ingenuamente si potrebbe andare dall'inizio alla fine + // e annotare da qualche parte il numero di righe + } + BBB + CCC + +NOTA: marcature e registri non hanno niente in comune, quindi il registro + a completamente indipendente dalla marcatura a. Questo non vale + per i nomi dei registri e quelli delle macro di Vim. + +RIFERIMENTI: Marcature :h marks + Movimenti marcature :h mark-motions (differenza fra ' e `) + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lezione 2.1 SOMMARIO + + + 1. Per inserire (copiando, cancellando) testo, e per incollarlo (incolla)) + sono disponibili 26 registri (a-z) + 2. Copiare una parola da una posizione qualsiasi al suo interno: yiw + 3. Cambiare una parola da una posizione qualsiasi al suo interno: ciw + 4. Inserire testo direttamente da registri in modo Insert: (C-r)a + + 5. Inserire il risultato di semplici operazioni aritmetiche in modo + Insert: (C-r)=60*60 + 6. Inserire il risultato di chiamate a sistema in modo Insert: + (C-r)=system('ls -1') + + 7. Controllare contenuto registri con :reg + 8. Vedere dove vanno a finire le cancellazioni di intere righe: dd + nei registri numerati, ossia discendendo dal registro 1 al 9. + Osservare che le righe intere cancellate sono disponibili nei registri + numerati pi a lungo di qualsiasi altra modifica + 9. Vedere la destinazione finale delle operazioni di copia nei registri + numerati e controllare quanto si pu aspettare che durino + + 10. Inserire marcature in modo Normale m[a-zA-Z0-9] + 11. Spostarsi a una riga marcata con il comando ' + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Qui finisce il capitolo due della guida Vim. Ci sono lavori in corso. + + Questo capitolo stato scritto da Paul D. Parker + e tradotto da Antonio Colombo +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/usr/share/vim/vim91/tutor/tutor2.it.utf-8 b/usr/share/vim/vim91/tutor/tutor2.it.utf-8 new file mode 100644 index 00000000000..a337acd1c78 --- /dev/null +++ b/usr/share/vim/vim91/tutor/tutor2.it.utf-8 @@ -0,0 +1,197 @@ +=============================================================================== += Benvenuto alla G u i d a all'Editor V I M - Versione 1.7 = +=============================================================================== += C A P I T O L O DUE = +=============================================================================== + + Hic Sunt Dracones: Se questa è la prima volta che vi accostate a vim + e preferite iniziare dal capitolo introduttivo, gentilmente immettete + :q e poi iniziate da quello. + + Il tempo necessario per completare questo capitolo è di circa 8-10 + minuti, a seconda del tempo utilizzato per fare delle prove. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Lezione 2.1.1: I REGISTRI CON NOME + + + ** Copiare due parole in registri diversi e poi incollarle ** + + 1. Spostate il cursore alla riga qui sotto marcata con ---> + + 2. Andate su una lettera qualsiasi di 'Edward' e battete "ayiw + +MNEMONICO: nel registro(") di nome (a) (y)copia (i)interna (w)parola + + 3. Spostatevi alla parola 'biscotti' (fc o 2fb o $b o /bis) + e battete "byiw + + 4. Andate su una lettera qualsiasi di 'Vince' e battete ciwa + +MNEMONICO: (c)cambia (i)interna (w)parola con di nome (a) + + 5. Andate su una lettera qualsiasi di 'dolci' e battete ciwb + +---> a) Edward sarà d'ora in poi responsabile della razione di biscotti + b) Come compito, Vince sarà il solo a decidere riguardo ai dolci + +NOTA: Anche una parola cancellata può essere inviata ad un registro, p.es., + "sdiw cancellerà (d) la parola sotto il cursore (iw) e la metterà + nel registro (s) +RIFERIMENTI: Registri :h registers + Registri con nome :h quotea + Movimento :h motion.txt /inner + CTRL-R :h insert /CTRL-R + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lezione 2.1.2: IL REGISTRO DELLE ESPRESSIONI + + + ** Inserire al volo risultati di un calcolo ** + + 1. Spostate il cursore alla riga qui sotto marcata con ---> + + 2. Andate su un punto qualsiasi del numero fornito + + 3. Battete ciw=60*60*24 + + 4. Sulla riga seguente, entrate in modo Insert e aggiungete + la data di oggi con =system('date') + +NOTA: Tutte le chiamate a sistema dipendono dal S.O., p.es., in ambiente + Windows si usa system('date /t') o :r!date /t + +---> Non ricordo il numero esatto di secondi in un giorno, è 84600? + La data di oggi è: + +NOTA: Lo stesso risultato si può ottenere con :pu=system('date') + o, ancora più brevemente, con :r!date + +RIFERIMENTI: Registro espressioni :h quote= + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lezione 2.1.3: I REGISTRI NUMERATI + + + ** Battere yy e dd per vedere l'effetto sui registri ** + + 1. Spostate il cursore alla riga qui sotto marcata con ---> + + 2. Copiate (yy) la riga stessa e controllate i registri con :reg + + 3. Cancellate la riga che inizia con "0." con "cdd, poi controllate i + registri (Dove vi aspettate sia finita la riga cancellata?) + + 4. Continuate a cancellare ogni riga seguente, controllando ogni volta + con :reg il risultato +NOTA: Dovreste notare che le righe cancellate per prime scendono nella + lista, man mano che vengono aggiunte nuove righe cancellate + 5. Poi incollate (p) i seguenti registri nell'ordine; c, 7, 4, 8, 2.+ + ossia "cp "7p ... + +---> 0. Questo + 9. dondolante + 8. messaggio + 7. è + 6. in + 5. asse + 4. un + 3. guerresco + 2. segreto + 1. tributo + +NOTA: Le cancellazioni di righe intere (dd) sopravvivono nei registri numerati + molto più a lungo delle copie di righe intere (yy), o delle + cancellazioni che implicano movimenti minori + +RIFERIMENTI: Registri numerati :h quote0 + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lezione 2.1.4: IL FASCINO DELLE MARCATURE + + + ** Evitare di contare le righe di codice ** + +NOTA: Un problema frequente quando si scrivono programmi è spostare numerose + righe di codice. Il metodo seguente evita di dover calcolare numeri di + riga con operazioni tipo "a147d o :945,1091d a o, ancor peggio, + usando prima i=1091-945 + + 1. Spostate il cursore alla riga qui sotto marcata con ---> + + 2. Andate alla prima riga della funzione e marcatela con ma + +NOTA: La posizione sulla riga NON è importante! + + 3. Spostatevi a fine riga e da qui alla fine del blocco di codice + con $% + + 4. Cancellate il blocco salvandolo nel registro a con "ad'a + +MNEMONICO: nel registro(") di nome (a) mettere la cancellazione (d) dal + cursore fino alla RIGA che contiene il marcatore (') (a) + + 5. Incollare il blocco the le righe BBB e CCC "ap + +NOTA: Provare più volte quest'operazione, per impratichirsi ma$%"ad'a + +---> AAA + function cresciutaTroppoinFretta() { + if ( condizioneVera ) { + faiQualcosa() + } + // La classificazione della nostra funzione è cambiata + // non ha senso mantenerla nella posizione attuale + + // ...immaginate centinaia di righe di codice + + // Ingenuamente si potrebbe andare dall'inizio alla fine + // e annotare da qualche parte il numero di righe + } + BBB + CCC + +NOTA: marcature e registri non hanno niente in comune, quindi il registro + a è completamente indipendente dalla marcatura a. Questo non vale + per i nomi dei registri e quelli delle macro di Vim. + +RIFERIMENTI: Marcature :h marks + Movimenti marcature :h mark-motions (differenza fra ' e `) + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Lezione 2.1 SOMMARIO + + + 1. Per inserire (copiando, cancellando) testo, e per incollarlo (incolla)) + sono disponibili 26 registri (a-z) + 2. Copiare una parola da una posizione qualsiasi al suo interno: yiw + 3. Cambiare una parola da una posizione qualsiasi al suo interno: ciw + 4. Inserire testo direttamente da registri in modo Insert: (C-r)a + + 5. Inserire il risultato di semplici operazioni aritmetiche in modo + Insert: (C-r)=60*60 + 6. Inserire il risultato di chiamate a sistema in modo Insert: + (C-r)=system('ls -1') + + 7. Controllare contenuto registri con :reg + 8. Vedere dove vanno a finire le cancellazioni di intere righe: dd + nei registri numerati, ossia discendendo dal registro 1 al 9. + Osservare che le righe intere cancellate sono disponibili nei registri + numerati più a lungo di qualsiasi altra modifica + 9. Vedere la destinazione finale delle operazioni di copia nei registri + numerati e controllare quanto si può aspettare che durino + + 10. Inserire marcature in modo Normale m[a-zA-Z0-9] + 11. Spostarsi a una riga marcata con il comando ' + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Qui finisce il capitolo due della guida Vim. Ci sono lavori in corso. + + Questo capitolo è stato scritto da Paul D. Parker + e tradotto da Antonio Colombo +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/usr/share/vim/vim91/tutor/tutor2.utf-8 b/usr/share/vim/vim91/tutor/tutor2.utf-8 index eaeef400354..f41b7018cdb 100644 --- a/usr/share/vim/vim91/tutor/tutor2.utf-8 +++ b/usr/share/vim/vim91/tutor/tutor2.utf-8 @@ -1,9 +1,7 @@ =============================================================================== = W e l c o m e t o t h e V I M T u t o r - Version 1.7 = =============================================================================== -= = -= C h a p t e r - T w o = -= = += C H A P T E R TWO = =============================================================================== Hic Sunt Dracones: if this is your first exposure to vim and you @@ -119,7 +117,7 @@ REFERENCE: Numbered Registers :h quote0 NOTE: a common conundrum when coding is moving around large chunks of code. The following technique helps avoid number line calculations associated - with operatins like "a147d or :945,1091d a or even worse using + with operations like "a147d or :945,1091d a or even worse using i=1091-945 first 1. Move the cursor to the line below marked ---> @@ -146,7 +144,7 @@ NOTE: practice this operation multiple times to become fluent ma$%"ad'a doIt() } // the taxonomy of our function has changed and it - // no longer makes alphabetical sense in it's current position + // no longer makes alphabetical sense in its current position // imagine hundreds of lines of code diff --git a/var/lib/pacman/local/mingw-w64-x86_64-git-extra-1.1.641.031e03baf-1/desc b/var/lib/pacman/local/mingw-w64-x86_64-git-extra-1.1.641.031e03baf-1/desc index 8b4fab02ef4..38f03a3a944 100644 --- a/var/lib/pacman/local/mingw-w64-x86_64-git-extra-1.1.641.031e03baf-1/desc +++ b/var/lib/pacman/local/mingw-w64-x86_64-git-extra-1.1.641.031e03baf-1/desc @@ -20,7 +20,7 @@ any 1718204260 %INSTALLDATE% -1736996549 +1737083004 %PACKAGER% Johannes Schindelin diff --git a/var/lib/pacman/local/rsync-3.4.0-1/mtree b/var/lib/pacman/local/rsync-3.4.0-1/mtree deleted file mode 100644 index ffe73f63a4d..00000000000 Binary files a/var/lib/pacman/local/rsync-3.4.0-1/mtree and /dev/null differ diff --git a/var/lib/pacman/local/rsync-3.4.0-1/desc b/var/lib/pacman/local/rsync-3.4.1-1/desc similarity index 81% rename from var/lib/pacman/local/rsync-3.4.0-1/desc rename to var/lib/pacman/local/rsync-3.4.1-1/desc index c166bce7708..76f59fab7f4 100644 --- a/var/lib/pacman/local/rsync-3.4.0-1/desc +++ b/var/lib/pacman/local/rsync-3.4.1-1/desc @@ -2,7 +2,7 @@ rsync %VERSION% -3.4.0-1 +3.4.1-1 %BASE% rsync @@ -17,16 +17,16 @@ https://rsync.samba.org x86_64 %BUILDDATE% -1736890837 +1737016422 %INSTALLDATE% -1736996547 +1737082999 %PACKAGER% -CI (msys2/msys2-autobuild/a977f9de/12776827938) +CI (msys2/msys2-autobuild/a977f9de/12804912697) %SIZE% -702380 +702890 %GROUPS% net-utils diff --git a/var/lib/pacman/local/rsync-3.4.0-1/files b/var/lib/pacman/local/rsync-3.4.1-1/files similarity index 100% rename from var/lib/pacman/local/rsync-3.4.0-1/files rename to var/lib/pacman/local/rsync-3.4.1-1/files diff --git a/var/lib/pacman/local/rsync-3.4.1-1/mtree b/var/lib/pacman/local/rsync-3.4.1-1/mtree new file mode 100644 index 00000000000..4fc5ec78139 Binary files /dev/null and b/var/lib/pacman/local/rsync-3.4.1-1/mtree differ diff --git a/var/lib/pacman/local/vim-9.1.0866-1/mtree b/var/lib/pacman/local/vim-9.1.0866-1/mtree deleted file mode 100644 index 1126347194f..00000000000 Binary files a/var/lib/pacman/local/vim-9.1.0866-1/mtree and /dev/null differ diff --git a/var/lib/pacman/local/vim-9.1.0866-1/desc b/var/lib/pacman/local/vim-9.1.1006-1/desc similarity index 78% rename from var/lib/pacman/local/vim-9.1.0866-1/desc rename to var/lib/pacman/local/vim-9.1.1006-1/desc index 89032666f20..5e9ca78357a 100644 --- a/var/lib/pacman/local/vim-9.1.0866-1/desc +++ b/var/lib/pacman/local/vim-9.1.1006-1/desc @@ -2,7 +2,7 @@ vim %VERSION% -9.1.0866-1 +9.1.1006-1 %BASE% vim @@ -17,16 +17,16 @@ https://www.vim.org x86_64 %BUILDDATE% -1734118513 +1737016730 %INSTALLDATE% -1734233452 +1737083001 %PACKAGER% -CI (msys2/msys2-autobuild/0f71ee73/12321823139) +CI (msys2/msys2-autobuild/a977f9de/12804912697) %SIZE% -60884036 +61165033 %GROUPS% editors diff --git a/var/lib/pacman/local/vim-9.1.0866-1/files b/var/lib/pacman/local/vim-9.1.1006-1/files similarity index 95% rename from var/lib/pacman/local/vim-9.1.0866-1/files rename to var/lib/pacman/local/vim-9.1.1006-1/files index 4b3dbda431e..42f8b671171 100644 --- a/var/lib/pacman/local/vim-9.1.0866-1/files +++ b/var/lib/pacman/local/vim-9.1.1006-1/files @@ -268,6 +268,7 @@ usr/share/vim/vim91/autoload/rust/ usr/share/vim/vim91/autoload/rust/debugging.vim usr/share/vim/vim91/autoload/rustfmt.vim usr/share/vim/vim91/autoload/spellfile.vim +usr/share/vim/vim91/autoload/spotbugs.vim usr/share/vim/vim91/autoload/sqlcomplete.vim usr/share/vim/vim91/autoload/syntaxcomplete.vim usr/share/vim/vim91/autoload/tar.vim @@ -328,6 +329,7 @@ usr/share/vim/vim91/colors/zaibatsu.vim usr/share/vim/vim91/colors/zellner.vim usr/share/vim/vim91/compiler/ usr/share/vim/vim91/compiler/ant.vim +usr/share/vim/vim91/compiler/bash.vim usr/share/vim/vim91/compiler/bcc.vim usr/share/vim/vim91/compiler/bdf.vim usr/share/vim/vim91/compiler/cargo.vim @@ -406,6 +408,7 @@ usr/share/vim/vim91/compiler/pip_compile.vim usr/share/vim/vim91/compiler/podchecker.vim usr/share/vim/vim91/compiler/powershell.vim usr/share/vim/vim91/compiler/pylint.vim +usr/share/vim/vim91/compiler/pytest.vim usr/share/vim/vim91/compiler/pyunit.vim usr/share/vim/vim91/compiler/raco.vim usr/share/vim/vim91/compiler/racomake.vim @@ -429,6 +432,7 @@ usr/share/vim/vim91/compiler/shellcheck.vim usr/share/vim/vim91/compiler/sml.vim usr/share/vim/vim91/compiler/spectral.vim usr/share/vim/vim91/compiler/splint.vim +usr/share/vim/vim91/compiler/spotbugs.vim usr/share/vim/vim91/compiler/stack.vim usr/share/vim/vim91/compiler/standard.vim usr/share/vim/vim91/compiler/stylelint.vim @@ -604,6 +608,7 @@ usr/share/vim/vim91/doc/version7.txt usr/share/vim/vim91/doc/version8.txt usr/share/vim/vim91/doc/version9.txt usr/share/vim/vim91/doc/vi_diff.txt +usr/share/vim/vim91/doc/vietnamese.txt usr/share/vim/vim91/doc/vim2html.pl usr/share/vim/vim91/doc/vim9.txt usr/share/vim/vim91/doc/vim9class.txt @@ -646,6 +651,7 @@ usr/share/vim/vim91/ftplugin/bst.vim usr/share/vim/vim91/ftplugin/btm.vim usr/share/vim/vim91/ftplugin/bzl.vim usr/share/vim/vim91/ftplugin/c.vim +usr/share/vim/vim91/ftplugin/c3.vim usr/share/vim/vim91/ftplugin/cabal.vim usr/share/vim/vim91/ftplugin/calendar.vim usr/share/vim/vim91/ftplugin/cdrdaoconf.vim @@ -720,6 +726,7 @@ usr/share/vim/vim91/ftplugin/fvwm.vim usr/share/vim/vim91/ftplugin/gdb.vim usr/share/vim/vim91/ftplugin/gdscript.vim usr/share/vim/vim91/ftplugin/gdshader.vim +usr/share/vim/vim91/ftplugin/gel.vim usr/share/vim/vim91/ftplugin/git.vim usr/share/vim/vim91/ftplugin/gitattributes.vim usr/share/vim/vim91/ftplugin/gitcommit.vim @@ -769,7 +776,7 @@ usr/share/vim/vim91/ftplugin/java.vim usr/share/vim/vim91/ftplugin/javacc.vim usr/share/vim/vim91/ftplugin/javascript.vim usr/share/vim/vim91/ftplugin/javascriptreact.vim -usr/share/vim/vim91/ftplugin/jj.vim +usr/share/vim/vim91/ftplugin/jjdescription.vim usr/share/vim/vim91/ftplugin/jproperties.vim usr/share/vim/vim91/ftplugin/jq.vim usr/share/vim/vim91/ftplugin/json.vim @@ -778,6 +785,7 @@ usr/share/vim/vim91/ftplugin/jsonc.vim usr/share/vim/vim91/ftplugin/jsonnet.vim usr/share/vim/vim91/ftplugin/jsp.vim usr/share/vim/vim91/ftplugin/julia.vim +usr/share/vim/vim91/ftplugin/karel.vim usr/share/vim/vim91/ftplugin/kconfig.vim usr/share/vim/vim91/ftplugin/kdl.vim usr/share/vim/vim91/ftplugin/kivy.vim @@ -796,6 +804,8 @@ usr/share/vim/vim91/ftplugin/liquid.vim usr/share/vim/vim91/ftplugin/lisp.vim usr/share/vim/vim91/ftplugin/livebook.vim usr/share/vim/vim91/ftplugin/llvm.vim +usr/share/vim/vim91/ftplugin/lnk.vim +usr/share/vim/vim91/ftplugin/lnkmap.vim usr/share/vim/vim91/ftplugin/logcheck.vim usr/share/vim/vim91/ftplugin/loginaccess.vim usr/share/vim/vim91/ftplugin/logindefs.vim @@ -831,6 +841,7 @@ usr/share/vim/vim91/ftplugin/mp.vim usr/share/vim/vim91/ftplugin/mplayerconf.vim usr/share/vim/vim91/ftplugin/mrxvtrc.vim usr/share/vim/vim91/ftplugin/msmessages.vim +usr/share/vim/vim91/ftplugin/mss.vim usr/share/vim/vim91/ftplugin/muttrc.vim usr/share/vim/vim91/ftplugin/mysql.vim usr/share/vim/vim91/ftplugin/nanorc.vim @@ -851,6 +862,7 @@ usr/share/vim/vim91/ftplugin/occam.vim usr/share/vim/vim91/ftplugin/octave.vim usr/share/vim/vim91/ftplugin/odin.vim usr/share/vim/vim91/ftplugin/ondir.vim +usr/share/vim/vim91/ftplugin/opencl.vim usr/share/vim/vim91/ftplugin/openvpn.vim usr/share/vim/vim91/ftplugin/org.vim usr/share/vim/vim91/ftplugin/pamconf.vim @@ -869,9 +881,11 @@ usr/share/vim/vim91/ftplugin/postscr.vim usr/share/vim/vim91/ftplugin/prisma.vim usr/share/vim/vim91/ftplugin/procmail.vim usr/share/vim/vim91/ftplugin/prolog.vim +usr/share/vim/vim91/ftplugin/proto.vim usr/share/vim/vim91/ftplugin/protocols.vim usr/share/vim/vim91/ftplugin/ps1.vim usr/share/vim/vim91/ftplugin/ps1xml.vim +usr/share/vim/vim91/ftplugin/ptx.vim usr/share/vim/vim91/ftplugin/purescript.vim usr/share/vim/vim91/ftplugin/pymanifest.vim usr/share/vim/vim91/ftplugin/pyrex.vim @@ -917,6 +931,7 @@ usr/share/vim/vim91/ftplugin/setserial.vim usr/share/vim/vim91/ftplugin/sexplib.vim usr/share/vim/vim91/ftplugin/sgml.vim usr/share/vim/vim91/ftplugin/sh.vim +usr/share/vim/vim91/ftplugin/shaderslang.vim usr/share/vim/vim91/ftplugin/sieve.vim usr/share/vim/vim91/ftplugin/slint.vim usr/share/vim/vim91/ftplugin/slpconf.vim @@ -952,6 +967,7 @@ usr/share/vim/vim91/ftplugin/tex.vim usr/share/vim/vim91/ftplugin/text.vim usr/share/vim/vim91/ftplugin/tf.vim usr/share/vim/vim91/ftplugin/thrift.vim +usr/share/vim/vim91/ftplugin/tiasm.vim usr/share/vim/vim91/ftplugin/tidy.vim usr/share/vim/vim91/ftplugin/tmux.vim usr/share/vim/vim91/ftplugin/toml.vim @@ -1060,6 +1076,7 @@ usr/share/vim/vim91/indent/gitconfig.vim usr/share/vim/vim91/indent/gitolite.vim usr/share/vim/vim91/indent/glsl.vim usr/share/vim/vim91/indent/go.vim +usr/share/vim/vim91/indent/graphql.vim usr/share/vim/vim91/indent/gyp.vim usr/share/vim/vim91/indent/haml.vim usr/share/vim/vim91/indent/hamster.vim @@ -1739,6 +1756,7 @@ usr/share/vim/vim91/syntax/antlr.vim usr/share/vim/vim91/syntax/antlr4.vim usr/share/vim/vim91/syntax/apache.vim usr/share/vim/vim91/syntax/apachestyle.vim +usr/share/vim/vim91/syntax/apkbuild.vim usr/share/vim/vim91/syntax/aptconf.vim usr/share/vim/vim91/syntax/arch.vim usr/share/vim/vim91/syntax/arduino.vim @@ -1805,6 +1823,7 @@ usr/share/vim/vim91/syntax/cl.vim usr/share/vim/vim91/syntax/clean.vim usr/share/vim/vim91/syntax/clipper.vim usr/share/vim/vim91/syntax/clojure.vim +usr/share/vim/vim91/syntax/cmacro.vim usr/share/vim/vim91/syntax/cmake.vim usr/share/vim/vim91/syntax/cmakecache.vim usr/share/vim/vim91/syntax/cmod.vim @@ -1925,6 +1944,7 @@ usr/share/vim/vim91/syntax/gdresource.vim usr/share/vim/vim91/syntax/gdscript.vim usr/share/vim/vim91/syntax/gdshader.vim usr/share/vim/vim91/syntax/gedcom.vim +usr/share/vim/vim91/syntax/gel.vim usr/share/vim/vim91/syntax/gemtext.vim usr/share/vim/vim91/syntax/gift.vim usr/share/vim/vim91/syntax/git.vim @@ -1946,6 +1966,7 @@ usr/share/vim/vim91/syntax/gp.vim usr/share/vim/vim91/syntax/gpg.vim usr/share/vim/vim91/syntax/gprof.vim usr/share/vim/vim91/syntax/grads.vim +usr/share/vim/vim91/syntax/graphql.vim usr/share/vim/vim91/syntax/gretl.vim usr/share/vim/vim91/syntax/groff.vim usr/share/vim/vim91/syntax/groovy.vim @@ -1982,6 +2003,7 @@ usr/share/vim/vim91/syntax/htmlcheetah.vim usr/share/vim/vim91/syntax/htmldjango.vim usr/share/vim/vim91/syntax/htmlm4.vim usr/share/vim/vim91/syntax/htmlos.vim +usr/share/vim/vim91/syntax/hyprlang.vim usr/share/vim/vim91/syntax/i3config.vim usr/share/vim/vim91/syntax/ia64.vim usr/share/vim/vim91/syntax/ibasic.vim @@ -2011,7 +2033,7 @@ usr/share/vim/vim91/syntax/javascriptreact.vim usr/share/vim/vim91/syntax/jess.vim usr/share/vim/vim91/syntax/jgraph.vim usr/share/vim/vim91/syntax/jinja.vim -usr/share/vim/vim91/syntax/jj.vim +usr/share/vim/vim91/syntax/jjdescription.vim usr/share/vim/vim91/syntax/jovial.vim usr/share/vim/vim91/syntax/jproperties.vim usr/share/vim/vim91/syntax/jq.vim @@ -2020,6 +2042,7 @@ usr/share/vim/vim91/syntax/json5.vim usr/share/vim/vim91/syntax/jsonc.vim usr/share/vim/vim91/syntax/jsp.vim usr/share/vim/vim91/syntax/julia.vim +usr/share/vim/vim91/syntax/karel.vim usr/share/vim/vim91/syntax/kconfig.vim usr/share/vim/vim91/syntax/kdl.vim usr/share/vim/vim91/syntax/kivy.vim @@ -2049,6 +2072,8 @@ usr/share/vim/vim91/syntax/lisp.vim usr/share/vim/vim91/syntax/lite.vim usr/share/vim/vim91/syntax/litestep.vim usr/share/vim/vim91/syntax/livebook.vim +usr/share/vim/vim91/syntax/lnk.vim +usr/share/vim/vim91/syntax/lnkmap.vim usr/share/vim/vim91/syntax/loginaccess.vim usr/share/vim/vim91/syntax/logindefs.vim usr/share/vim/vim91/syntax/logtalk.vim @@ -2113,6 +2138,7 @@ usr/share/vim/vim91/syntax/mrxvtrc.vim usr/share/vim/vim91/syntax/msidl.vim usr/share/vim/vim91/syntax/msmessages.vim usr/share/vim/vim91/syntax/msql.vim +usr/share/vim/vim91/syntax/mss.vim usr/share/vim/vim91/syntax/mupad.vim usr/share/vim/vim91/syntax/murphi.vim usr/share/vim/vim91/syntax/mush.vim @@ -2146,6 +2172,7 @@ usr/share/vim/vim91/syntax/odin.vim usr/share/vim/vim91/syntax/omnimark.vim usr/share/vim/vim91/syntax/ondir.vim usr/share/vim/vim91/syntax/opam.vim +usr/share/vim/vim91/syntax/opencl.vim usr/share/vim/vim91/syntax/openroad.vim usr/share/vim/vim91/syntax/openscad.vim usr/share/vim/vim91/syntax/openvpn.vim @@ -2200,6 +2227,7 @@ usr/share/vim/vim91/syntax/ps1xml.vim usr/share/vim/vim91/syntax/psf.vim usr/share/vim/vim91/syntax/psl.vim usr/share/vim/vim91/syntax/ptcap.vim +usr/share/vim/vim91/syntax/ptx.vim usr/share/vim/vim91/syntax/purifylog.vim usr/share/vim/vim91/syntax/pymanifest.vim usr/share/vim/vim91/syntax/pyrex.vim @@ -2273,6 +2301,7 @@ usr/share/vim/vim91/syntax/sgml.vim usr/share/vim/vim91/syntax/sgmldecl.vim usr/share/vim/vim91/syntax/sgmllnx.vim usr/share/vim/vim91/syntax/sh.vim +usr/share/vim/vim91/syntax/shaderslang.vim usr/share/vim/vim91/syntax/shared/ usr/share/vim/vim91/syntax/shared/context-data-context.vim usr/share/vim/vim91/syntax/shared/context-data-interfaces.vim @@ -2371,6 +2400,7 @@ usr/share/vim/vim91/syntax/texinfo.vim usr/share/vim/vim91/syntax/texmf.vim usr/share/vim/vim91/syntax/tf.vim usr/share/vim/vim91/syntax/thrift.vim +usr/share/vim/vim91/syntax/tiasm.vim usr/share/vim/vim91/syntax/tidy.vim usr/share/vim/vim91/syntax/tilde.vim usr/share/vim/vim91/syntax/tli.vim @@ -2493,83 +2523,88 @@ usr/share/vim/vim91/tutor/ usr/share/vim/vim91/tutor/en/ usr/share/vim/vim91/tutor/en/vim-01-beginner.tutor usr/share/vim/vim91/tutor/en/vim-01-beginner.tutor.json +usr/share/vim/vim91/tutor/it/ +usr/share/vim/vim91/tutor/it/vim-01-beginner.tutor +usr/share/vim/vim91/tutor/it/vim-01-beginner.tutor.json usr/share/vim/vim91/tutor/README.el.cp737.txt usr/share/vim/vim91/tutor/README.el.txt usr/share/vim/vim91/tutor/README.ru.utf-8.txt usr/share/vim/vim91/tutor/README.txt -usr/share/vim/vim91/tutor/tutor -usr/share/vim/vim91/tutor/tutor.bar -usr/share/vim/vim91/tutor/tutor.bar.utf-8 -usr/share/vim/vim91/tutor/tutor.bg.utf-8 -usr/share/vim/vim91/tutor/tutor.ca -usr/share/vim/vim91/tutor/tutor.ca.utf-8 -usr/share/vim/vim91/tutor/tutor.cs -usr/share/vim/vim91/tutor/tutor.cs.cp1250 -usr/share/vim/vim91/tutor/tutor.cs.utf-8 -usr/share/vim/vim91/tutor/tutor.da -usr/share/vim/vim91/tutor/tutor.da.utf-8 -usr/share/vim/vim91/tutor/tutor.de -usr/share/vim/vim91/tutor/tutor.de.utf-8 -usr/share/vim/vim91/tutor/tutor.el -usr/share/vim/vim91/tutor/tutor.el.cp737 -usr/share/vim/vim91/tutor/tutor.el.utf-8 -usr/share/vim/vim91/tutor/tutor.eo -usr/share/vim/vim91/tutor/tutor.eo.utf-8 -usr/share/vim/vim91/tutor/tutor.es -usr/share/vim/vim91/tutor/tutor.es.utf-8 -usr/share/vim/vim91/tutor/tutor.fr -usr/share/vim/vim91/tutor/tutor.fr.utf-8 -usr/share/vim/vim91/tutor/tutor.hr -usr/share/vim/vim91/tutor/tutor.hr.cp1250 -usr/share/vim/vim91/tutor/tutor.hr.utf-8 -usr/share/vim/vim91/tutor/tutor.hu -usr/share/vim/vim91/tutor/tutor.hu.cp1250 -usr/share/vim/vim91/tutor/tutor.hu.utf-8 -usr/share/vim/vim91/tutor/tutor.it -usr/share/vim/vim91/tutor/tutor.it.utf-8 -usr/share/vim/vim91/tutor/tutor.ja.euc -usr/share/vim/vim91/tutor/tutor.ja.sjis -usr/share/vim/vim91/tutor/tutor.ja.utf-8 -usr/share/vim/vim91/tutor/tutor.ko -usr/share/vim/vim91/tutor/tutor.ko.euc -usr/share/vim/vim91/tutor/tutor.ko.utf-8 -usr/share/vim/vim91/tutor/tutor.lt.utf-8 -usr/share/vim/vim91/tutor/tutor.lv.utf-8 -usr/share/vim/vim91/tutor/tutor.nb -usr/share/vim/vim91/tutor/tutor.nb.utf-8 -usr/share/vim/vim91/tutor/tutor.nl -usr/share/vim/vim91/tutor/tutor.nl.utf-8 -usr/share/vim/vim91/tutor/tutor.no -usr/share/vim/vim91/tutor/tutor.no.utf-8 -usr/share/vim/vim91/tutor/tutor.pl -usr/share/vim/vim91/tutor/tutor.pl.cp1250 -usr/share/vim/vim91/tutor/tutor.pl.utf-8 -usr/share/vim/vim91/tutor/tutor.pt -usr/share/vim/vim91/tutor/tutor.pt.utf-8 -usr/share/vim/vim91/tutor/tutor.ru -usr/share/vim/vim91/tutor/tutor.ru.cp1251 -usr/share/vim/vim91/tutor/tutor.ru.utf-8 -usr/share/vim/vim91/tutor/tutor.sk -usr/share/vim/vim91/tutor/tutor.sk.cp1250 -usr/share/vim/vim91/tutor/tutor.sk.utf-8 -usr/share/vim/vim91/tutor/tutor.sr.cp1250 -usr/share/vim/vim91/tutor/tutor.sr.utf-8 -usr/share/vim/vim91/tutor/tutor.sv -usr/share/vim/vim91/tutor/tutor.sv.utf-8 -usr/share/vim/vim91/tutor/tutor.tr.iso9 -usr/share/vim/vim91/tutor/tutor.tr.utf-8 usr/share/vim/vim91/tutor/tutor.tutor usr/share/vim/vim91/tutor/tutor.tutor.json -usr/share/vim/vim91/tutor/tutor.uk.utf-8 -usr/share/vim/vim91/tutor/tutor.utf-8 -usr/share/vim/vim91/tutor/tutor.vi.utf-8 usr/share/vim/vim91/tutor/tutor.vim -usr/share/vim/vim91/tutor/tutor.zh.big5 -usr/share/vim/vim91/tutor/tutor.zh.euc -usr/share/vim/vim91/tutor/tutor.zh.utf-8 -usr/share/vim/vim91/tutor/tutor.zh_cn.utf-8 -usr/share/vim/vim91/tutor/tutor.zh_tw.utf-8 +usr/share/vim/vim91/tutor/tutor1 +usr/share/vim/vim91/tutor/tutor1.bar +usr/share/vim/vim91/tutor/tutor1.bar.utf-8 +usr/share/vim/vim91/tutor/tutor1.bg.utf-8 +usr/share/vim/vim91/tutor/tutor1.ca +usr/share/vim/vim91/tutor/tutor1.ca.utf-8 +usr/share/vim/vim91/tutor/tutor1.cs +usr/share/vim/vim91/tutor/tutor1.cs.cp1250 +usr/share/vim/vim91/tutor/tutor1.cs.utf-8 +usr/share/vim/vim91/tutor/tutor1.da +usr/share/vim/vim91/tutor/tutor1.da.utf-8 +usr/share/vim/vim91/tutor/tutor1.de +usr/share/vim/vim91/tutor/tutor1.de.utf-8 +usr/share/vim/vim91/tutor/tutor1.el +usr/share/vim/vim91/tutor/tutor1.el.cp737 +usr/share/vim/vim91/tutor/tutor1.el.utf-8 +usr/share/vim/vim91/tutor/tutor1.eo +usr/share/vim/vim91/tutor/tutor1.eo.utf-8 +usr/share/vim/vim91/tutor/tutor1.es +usr/share/vim/vim91/tutor/tutor1.es.utf-8 +usr/share/vim/vim91/tutor/tutor1.fr +usr/share/vim/vim91/tutor/tutor1.fr.utf-8 +usr/share/vim/vim91/tutor/tutor1.hr +usr/share/vim/vim91/tutor/tutor1.hr.cp1250 +usr/share/vim/vim91/tutor/tutor1.hr.utf-8 +usr/share/vim/vim91/tutor/tutor1.hu +usr/share/vim/vim91/tutor/tutor1.hu.cp1250 +usr/share/vim/vim91/tutor/tutor1.hu.utf-8 +usr/share/vim/vim91/tutor/tutor1.it +usr/share/vim/vim91/tutor/tutor1.it.utf-8 +usr/share/vim/vim91/tutor/tutor1.ja.euc +usr/share/vim/vim91/tutor/tutor1.ja.sjis +usr/share/vim/vim91/tutor/tutor1.ja.utf-8 +usr/share/vim/vim91/tutor/tutor1.ko +usr/share/vim/vim91/tutor/tutor1.ko.euc +usr/share/vim/vim91/tutor/tutor1.ko.utf-8 +usr/share/vim/vim91/tutor/tutor1.lt.utf-8 +usr/share/vim/vim91/tutor/tutor1.lv.utf-8 +usr/share/vim/vim91/tutor/tutor1.nb +usr/share/vim/vim91/tutor/tutor1.nb.utf-8 +usr/share/vim/vim91/tutor/tutor1.nl +usr/share/vim/vim91/tutor/tutor1.nl.utf-8 +usr/share/vim/vim91/tutor/tutor1.no +usr/share/vim/vim91/tutor/tutor1.no.utf-8 +usr/share/vim/vim91/tutor/tutor1.pl +usr/share/vim/vim91/tutor/tutor1.pl.cp1250 +usr/share/vim/vim91/tutor/tutor1.pl.utf-8 +usr/share/vim/vim91/tutor/tutor1.pt +usr/share/vim/vim91/tutor/tutor1.pt.utf-8 +usr/share/vim/vim91/tutor/tutor1.ru +usr/share/vim/vim91/tutor/tutor1.ru.cp1251 +usr/share/vim/vim91/tutor/tutor1.ru.utf-8 +usr/share/vim/vim91/tutor/tutor1.sk +usr/share/vim/vim91/tutor/tutor1.sk.cp1250 +usr/share/vim/vim91/tutor/tutor1.sk.utf-8 +usr/share/vim/vim91/tutor/tutor1.sr.cp1250 +usr/share/vim/vim91/tutor/tutor1.sr.utf-8 +usr/share/vim/vim91/tutor/tutor1.sv +usr/share/vim/vim91/tutor/tutor1.sv.utf-8 +usr/share/vim/vim91/tutor/tutor1.tr.iso9 +usr/share/vim/vim91/tutor/tutor1.tr.utf-8 +usr/share/vim/vim91/tutor/tutor1.uk.utf-8 +usr/share/vim/vim91/tutor/tutor1.utf-8 +usr/share/vim/vim91/tutor/tutor1.vi.utf-8 +usr/share/vim/vim91/tutor/tutor1.zh.big5 +usr/share/vim/vim91/tutor/tutor1.zh.euc +usr/share/vim/vim91/tutor/tutor1.zh.utf-8 +usr/share/vim/vim91/tutor/tutor1.zh_cn.utf-8 +usr/share/vim/vim91/tutor/tutor1.zh_tw.utf-8 usr/share/vim/vim91/tutor/tutor2 +usr/share/vim/vim91/tutor/tutor2.it +usr/share/vim/vim91/tutor/tutor2.it.utf-8 usr/share/vim/vim91/tutor/tutor2.utf-8 usr/share/vim/vim91/vimrc_example.vim diff --git a/var/lib/pacman/local/vim-9.1.1006-1/mtree b/var/lib/pacman/local/vim-9.1.1006-1/mtree new file mode 100644 index 00000000000..61e5ccd890f Binary files /dev/null and b/var/lib/pacman/local/vim-9.1.1006-1/mtree differ diff --git a/var/lib/pacman/sync/clang64.db b/var/lib/pacman/sync/clang64.db index 19a7f3071bb..5e92e41b3ec 100644 Binary files a/var/lib/pacman/sync/clang64.db and b/var/lib/pacman/sync/clang64.db differ diff --git a/var/lib/pacman/sync/clang64.db.sig b/var/lib/pacman/sync/clang64.db.sig index 5122e2cadfc..dd3983dd081 100644 Binary files a/var/lib/pacman/sync/clang64.db.sig and b/var/lib/pacman/sync/clang64.db.sig differ diff --git a/var/lib/pacman/sync/clangarm64.db b/var/lib/pacman/sync/clangarm64.db index b6bc1b63e0f..e034326c3a6 100644 Binary files a/var/lib/pacman/sync/clangarm64.db and b/var/lib/pacman/sync/clangarm64.db differ diff --git a/var/lib/pacman/sync/clangarm64.db.sig b/var/lib/pacman/sync/clangarm64.db.sig index 4c3ff0b7186..b8bff8ce790 100644 Binary files a/var/lib/pacman/sync/clangarm64.db.sig and b/var/lib/pacman/sync/clangarm64.db.sig differ diff --git a/var/lib/pacman/sync/mingw64.db b/var/lib/pacman/sync/mingw64.db index 9980379edab..20088771f10 100644 Binary files a/var/lib/pacman/sync/mingw64.db and b/var/lib/pacman/sync/mingw64.db differ diff --git a/var/lib/pacman/sync/mingw64.db.sig b/var/lib/pacman/sync/mingw64.db.sig index 15ad2bf7c89..fb7dd34c831 100644 Binary files a/var/lib/pacman/sync/mingw64.db.sig and b/var/lib/pacman/sync/mingw64.db.sig differ diff --git a/var/lib/pacman/sync/msys.db b/var/lib/pacman/sync/msys.db index d6f5ea2ad89..3342899fdda 100644 Binary files a/var/lib/pacman/sync/msys.db and b/var/lib/pacman/sync/msys.db differ diff --git a/var/lib/pacman/sync/msys.db.sig b/var/lib/pacman/sync/msys.db.sig index b09835d36c1..6d358fa6fcc 100644 Binary files a/var/lib/pacman/sync/msys.db.sig and b/var/lib/pacman/sync/msys.db.sig differ diff --git a/var/lib/pacman/sync/ucrt64.db b/var/lib/pacman/sync/ucrt64.db index 3d00d413dea..354602b25d2 100644 Binary files a/var/lib/pacman/sync/ucrt64.db and b/var/lib/pacman/sync/ucrt64.db differ diff --git a/var/lib/pacman/sync/ucrt64.db.sig b/var/lib/pacman/sync/ucrt64.db.sig index 70c1922e133..20c46ee0173 100644 Binary files a/var/lib/pacman/sync/ucrt64.db.sig and b/var/lib/pacman/sync/ucrt64.db.sig differ