home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vim53os2.zip / vim-5.3 / doc / os_riscos.txt < prev    next >
Text File  |  1998-08-30  |  11KB  |  306 lines

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