2 $ !=====================================================================
4 $ ! VimTutor.com version 29-Aug-2002
6 $ ! Author: Tom Wyant <Thomas.R.Wyant-III@usa.dupont.com>
8 $ ! This DCL command procedure executes the vimtutor command
9 $ ! (suprise, suprise!) which gives you a brief tutorial on the VIM
10 $ ! editor. Languages other than the default are supported in the
11 $ ! usual way, as are at least some of the command qualifiers,
12 $ ! though you'll need to play some fairly serious games with DCL
13 $ ! to specify ones that need quoting.
15 $ ! Copyright (c) 2002 E. I. DuPont de Nemours and Company, Inc
17 $ ! This program is free software; you can redistribute it and/or
18 $ ! modify it under the terms of the VIM license as available from
19 $ ! the vim 6.1 ":help license" command or (at your option) the
20 $ ! license from any later version of vim.
22 $ ! This program is distributed in the hope that it will be useful,
23 $ ! but WITHOUT ANY WARRANTY; without even the implied warranty of
24 $ ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26 $ !=====================================================================
29 $ ! Check for the existence of VIM, and die if it isn't there.
31 $ if f$search ("vim:vim.exe") .eqs. ""
33 $ write sys$error "Error - Can't run tutoral. VIM not found."
38 $ ! Pick up the argument, if any.
43 $ if f$type (p'inx') .nes. ""
45 $ if p'inx' .nes. "" .and. f$locate ("-", p'inx') .ne. 0
48 $ assign/nolog "''xx'" xx
55 $ ! Make sure we clean up our toys when we're through playing.
57 $ on error then goto exit
60 $ ! Create the VIM foreign command if needed
62 $ if f$type (vim) .eqs. "" then vim := $vim:vim
65 $ ! Build the name for our temp file.
67 $ tutfil = "sys$login:vimtutor_" + -
68 f$edit (f$getjpi (0, "pid"), "trim") + "."
69 $ assign/nolog 'tutfil' TUTORCOPY
72 $ ! Copy the selected file to the temp file
74 $ assign/nolog/user nla0: sys$error
75 $ assign/nolog/user nla0: sys$output
76 $ vim -u "NONE" -c "so $VIMRUNTIME/tutor/tutor.vim"
81 $ assign/nolog/user sys$command sys$input
82 $ vim -u "NONE" -c "set nocp" 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' 'tutfil'
88 $ if f$type (tutfil) .nes. "" .and. f$search (tutfil) .nes. "" then -
90 $ if f$type (xx) .nes. "" then deassign xx
94 $ !=====================================================================
96 $ ! Modification history
98 $ ! 29-Aug-2002 T. R. Wyant
99 $ ! Changed license to vim.
100 $ ! Fix error "input is not from a terminal"
101 $ ! Juggle documentation (copyright and contact to front,
102 $ ! modification history to end).
103 $ ! 25-Jul-2002 T. R. Wyant