Add /src/vim/release.sh, a script to compile and install vim
[msysgit.git] / share / vim / vim58 / doc / os_riscos.txt
blob37600f61af63f4aa3dbbe684ffefdc4bfeb4f3c6
1 *os_riscos.txt* For Vim version 5.8.  Last change: 1999 Sep 14
4                   VIM REFERENCE MANUAL    by Thomas Leonard
7                                                 *riscos* *RISCOS* *RISC-OS*
8 This file contains the particularities for the RISC OS version of Vim.
10 The RISC OS port is a completely new port and is not based on the old `archi'
11 port.
13 1.  File locations              |riscos-locations|
14 2.  Filename munging            |riscos-munging|
15 3.  Command-line use            |riscos-commandline|
16 4.  Desktop (GUI) use           |riscos-gui|
17 5.  Remote use (telnet)         |riscos-remote|
18 6.  Temporary files             |riscos-temp-files|
19 7.  Interrupting                |riscos-interrupt|
20 8.  Memory usage                |riscos-memory|
21 9.  Filetypes                   |riscos-filetypes|
22 10. The shell                   |riscos-shell|
23 11. Porting new releases        |riscos-porting|
25 If I've missed anything, email me and I'll try to fix it.  In fact, even if I
26 haven't missed anything then email me anyway to give me some confidence that it
27 actually works!
29 Thomas Leonard <tal197@ecs.soton.ac.uk>
31  Port homepage: http://www.ecs.soton.ac.uk/~tal197/
32         or try: http://www.soton.ac.uk/~tal197/
34 ==============================================================================
35                                                         *riscos-locations*
36 1. File locations
38 The Vim executable and shared resource files are all stored inside the !Vim
39 application directory.
41 When !Vim is first seen by the filer, it aliases the *vi and *ex commands to
42 run the command-line versions of Vim (see |riscos-commandline|).
44 !Vim.Resources and !Vim.Resources2 contain the files from the standard Vim
45 distribution, but modified slightly to work within the limits of ADFS, plus
46 some extra files such as the window templates.
48 User choices are read from `Choices:*' and are saved to `<Choices$Write>.*'.
49 If you have the new !Boot structure then these should be set up already. If
50 not, set Choices$Path to a list of directories to search when looking for
51 user configuration files. Set Choices$Write to the directory you want files
52 to be saved into (so your search patterns and marks can be remembered between
53 sessions).
55 ==============================================================================
56                                                         *riscos-munging*
57 2. Filename munging
59 All pathname munging is disabled by default, so Vim should behave like a
60 normal RISC OS application now. So, if you want to edit `doc/html' then you
61 actually type `*vi doc/html'.
63 The only times munging is done is when:
65 - Searching included files from C programs, since these are always munged.
66   See |[I|.
67   Note: make sure you are in the right directory when you use this
68         command (ie the one with subdirectories 'c' and 'h').
70 - Sourcing files using |:so|.
71   Paths starting `$VIM/' are munged like this:
73   $VIM/syntax/help.vim  ->  Vim:syntax.help
75   Also, files ending in `.vim' have their extensions removed, and slashes
76   replaced with dots.
78 Some tag files and script files may have to be edited to work under this port.
80 ==============================================================================
81                                                         *riscos-commandline*
82 3. Command-line use
84 To use Vim from the command-line use the `*vi' command (or '*ex' for
85 |Ex-mode|).
87 Type `*vi -h' for a list of options.
89 Running the command-line version of Vim in a large high-color mode may cause
90 the scrolling to be very slow. Either change to a mode with less colors or
91 use the GUI version.
93 Also, holding down Ctrl will slow it down even more, and Ctrl-Shift will
94 freeze it, as usual for text programs.
96 ==============================================================================
97                                                         *riscos-gui*
98 4. Desktop use
100 Limitations:
102 - Left scrollbars don't work properly (right and bottom are fine).
103 - Doesn't increase scroll speed if it gets behind.
105 You can resize the window by dragging the lower-right corner, even though
106 there is no icon shown there.
108 You can use the --rows and --columns arguments to specifiy the initial size of
109 the Vim window, like this:
111 > *Vi -g --rows 20 --columns 80
113 The global clipboard is supported, so you can select some text and then
114 paste it directly into another application (provided it supports the
115 clipboard too).
117 Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift
118 when clicking Menu to paste (from the global clipboard).
120 Dragging a file to the window replaces the CURRENT buffer (the one with the
121 cursor, NOT the one you dragged to) with the file.
123 Dragging with Ctrl held down causes a new Vim window to be opened for the
124 file (see |:sp|).
126 Dragging a file in with Shift held down in insert mode inserts the pathname of
127 the file.
129 :browse :w opens a standard RISC OS save box.
130 :browse :e opens a directory viewer.
132 For fonts, you have the choice of the system font, an outline font, the system
133 font via ZapRedraw and any of the Zap fonts via ZapRedraw:
135 > :set guifont=
136                         To use the system font via the VDU drivers. Supports
137                         bold and underline.
139 > :set guifont=Corpus.Medium
140                         Use the named outline font. You can use any font, but
141                         only monospaced ones like Corpus look right.
143 > :set guifont=Corpus.Medium:w8:h12:b:i
144                         As before, but with size of 8 point by 12 point, and
145                         in bold italic.
146                         If only one of width and height is given then that
147                         value is used for both. If neither is given then 10
148                         point is used.
150 Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name
151 with '!' (or '!!' for double height), like this:
153 > :set guifont=!!
154                         Use the system font, but via ZapRedraw.  This gives a
155                         faster redraw on StrongARM processors, but you can't
156                         get bold or italic text. Double height.
158 > :set guifont=!script
159                         Uses the named Zap font (a directory in VimFont$Path).
160                         The redraw is the same speed as for '!!', but you get
161                         a nicer looking font.
162                         Only the "man+" and "script" fonts are supplied
163                         currently, but you can use any of the Zap fonts if
164                         they are in VimFont$Path.
165                         Vim will try to load font files '0', 'B', 'I' and 'IB'
166                         from the named directory. Only '0' (normal style) MUST
167                         be present. Link files are not currently supported.
169 Note that when using ZapRedraw the edit bar is drawn in front of the character
170 you are on rather than behind it. Also redraw is incorrect for screen modes
171 with eigen values of 0. If the font includes control characters then you can
172 get Vim to display them by changing the 'isprint' option.
174 If you find the scrolling is too slow on your machine, try experimenting
175 with the 'scrolljump' and 'ttyscroll' options.
177 In particular, StrongARM users may find that:
179 > :set ttyscroll=0
181 makes scrolling faster in high-color modes.
183 =============================================================================
184                                                         *riscos-remote*
185 5. Remote use (telnet)
187 I have included a built-in termcap entry, but you can edit the termcap file to
188 allow other codes to be used if you want to use Vim from a remote terminal.
190 Although I do not have an internet connection to my Acorn, I have managed to
191 run Vim in a FreeTerm window using the loopback connection.
193 It seems to work pretty well now, using '*vi -T ansi'.
195 ==============================================================================
196                                                         *riscos-temp-files*
197 6. Temporary files
199 If Vim crashes then the swap and backup files (if any) will be in the
200 directories set with the 'directory' and 'bdir' options.  By default the swap
201 files are in <Wimp$ScrapDir> (ie inside !Scrap) and backups are in the
202 directory you were saving to. Vim will allow you to try and recover the file
203 when you next try to edit it.
205 To see a list of swap files, press <F12> and type `*vi -r'.
207 Vim no longer brings up ATTENTION warnings if you try to edit two files with
208 the same name in different directories.
210 However, it also no longer warns if you try to edit the same file twice (with
211 two copies of Vim), though you will still be warned when you save that the
212 datestamp has changed.
214 ==============================================================================
215                                                         *riscos-interrupt*
216 7. Interrupting
218 To break out of a looping macro, or similar, hold down Escape in the
219 command-line version, or press CTRL-C in the GUI version.
221 ==============================================================================
222                                                         *riscos-memory*
223 8. Memory usage
225 Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on
226 older machines then edit the !RunTxt and GVim files. I don't know what UnixLib
227 does by default on these machines so I'm playing safe.
229 It doesn't work at all well without dynamic areas, since it can't change its
230 memory allocation once running. Hence you should edit `!Vim.GVim' and
231 `!Vim.!RunTxt' to choose the best size for you. You probably need at least
232 about 1400K.
234 ==============================================================================
235                                                         *riscos-filetypes*
236 9. Filetypes
238 You can now specify that autocommands are only executed for files of certain
239 types. The filetype is given in the form &xxx, when xxx is the filetype.
241 Filetypes must be specified by number (eg &fff for Text).
243 The system has changed from verson 5.3. The new sequence of events is:
245 - A file is loaded. |'osfiletype'| is set to the RISC OS filetype.
246 - Based on the filetype and pathname, Vim will try to set |'filetype'| to the
247   Vim-type of the file.
248 - Setting this option may load syntax files and perform other actions.
249 - Saving the file will give it a filetype of |'osfiletype'|.
251 Some examples may make this clearer:
253 > Kind of file loaded   osfiletype      filetype
254   C code 'c.hellow'     Text (&fff)     C
255   LaTeX document        LaTeX (&2a8)    TeX
256   Draw document         DrawFile (&aff) (not changed)
258 ==============================================================================
259                                                         *riscos-shell*
260 10. The shell
262 - Bangs (!s) are only replaced if they are followed by a space or end-of-line,
263   since many pathnames contain them.
265 - You can prefix the command with '~', which stops any output from being
266   displayed. This also means that you don't have to press Return afterwards,
267   and stops the screen from being redrawn. {only in the GUI version}
269 ==============================================================================
270                                                         *riscos-porting*
271 11. Porting new releases to RISC OS
273 Downloading everything you need:
275 - Get the latest source distribution (see www.vim.org)
276 - Get the runtime environment files (eg these help files)
277 - Get the `extra' archive (contains the RISC OS specific bits)
278 - Get the RISC OS binary distribution (if possible)
281 Unarchiving:
283 - Create a raFS disk and put the archives on it.
284 - Un-gzip them
285 - Un-tar them   (*tar xELf 50 archive/tar)
288 Recompiling the sources:
290 - Create c, s, and h directories.
291 - Put all the header files in 'h'            \
292 - Put all the C files in `c'                 | And lose the extensions
293 - Put the assembler file (`swis/s') in 's'   /
294 - Rename all the files in `proto' to `h', like this:
295     raFS::VimSrc.source.proto.file/pro
296           becomes
297     raFS::VimSrc.source.h.file_pro
298 - In the files `h.proto' and `c.termlib', search and replace
299     .pro"
300        with
301     _pro.h"
302 - Create a simple Makefile if desired and do '*make -k'
303   Use 'CC = gcc -DRISCOS -DUSE_GUI -O2 -x c' in the Makefile
304 - Save the binary as !Vim.Vim in the binary distribution
307 Updating the run-time environment:
309 - Replace old or missing files inside !Vim.Resources with the
310   new files.
311 - Remove files in `doc' not ending in `/txt', except for `tags'.
312 - Lose the extensions from the files in `doc'.
313 - Edit the `doc.tags' file. Remove extensions from the second column:
314 > :%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/
315 - Remove extensions from the syntax files. Split them into two directories
316   to avoid the 77 entry limit on old ADFS filesystems.
317 - Edit `Vim:FileType' to match `*.c.*' as well as `*/c' and so on.
318   Add filetype checking too.
319 - Edit `Vim:Menu' and remove all the keys from the menus:
320 > :%s/<Tab>[^ \t]*//
322  vim:ts=8:sw=8:tw=78: