Rate this post
 *os_beos.txt*        For Vim version 5.4. Last change: 1998 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar This is a port of Vim 5.1 to the BeOS Preview Release 2 (also known as PR2)
or later. This file contains the particularities for the BeBox/BeOS version of Vim. For
matters not discussed in this file, Vim behaves very much like the Unix
|os_unix.txt| version. 1. General |beos-general| 2. Compiling Vim |beos-compiling| 3. Timeout in the Terminal      |beos-timeout| 4. Unicode vs. Latin-1 |beos-unicode| 5. The BeOS GUI |beos-gui| 6. The $VIM directory |beos-vimdir| 7. Drag & Drop |beos-dragndrop| 8. Single Launch vs. Multiple Launch |beos-launch| 9. Fonts |beos-fonts|
10. The meta key modifier       |beos-meta|
11. Mouse key mappings |beos-mouse|
12. Color names |beos-colors|
13. Compiling with Perl |beos-perl|
14. WARNING: Intel "architecture" detected!   |beos-ppc| *beos-general*
The default syntax highlighting mostly works with different foreground colors
to highlight items. This works best if you set your Terminal window to a
darkish background and light letters. Some middle-grey background (for
instance (r,g,b)=(168,168,168)) with black letters also works nicely. If you
use the default light background and dark letters, it may look better to
simply reverse the notion of foreground and background color settings. To do
this, add this to your .vimrc file (where  may need to be replaced with
the escape character):  if &term == "beos-ansi"
 set t_AB=[3%dm
 set t_AF=[4%dm
 endif Compiling Vim *beos-compiling* From the Advanced Access Preview Release (AAPR) on, Vim can be configured with
the standard configure script. To get the compiler and its flags right, use
the following command-line in the shell (you can cut and paste it in one go): CC=$BE_C_COMPILER CFLAGS="$BE_DEFAULT_C_FLAGS -O7" \ ./configure --prefix=/boot/home/config \ --disable-perlinterp --disable-pythoninterp $BE_C_COMPILER is usually "mwcc", $BE_DEFAULT_C_FLAGS is usually "-I- -I." When configure has run, and you wish to enable GUI support, you must edit the
config.mk file so that the lines with GUI_xxx refer to $(BEOSGUI_xxx) instead
of $(NONE_xxx).
Alternatively you can make this change in the Makefile; it will have a
more permanent effect. Search for "NONE_". After compilation you need to add the resources to the binary. Add the
following few lines near the end (before the line with "exit $exit_value") of
the link.sh script to do this automatically. rmattr BEOS:TYPE vim copyres os_beos.rsrc vim mimeset vim Also, create a dummy file "strip": #!/bin/sh mimeset $1 exit 0 You will need it when using "make install" to install Vim. Now type "make" to compile Vim, then "make install" to install it. If you want to install Vim by hand, you must copy Vim to $HOME/config/bin, and
create a bunch of symlinks to it ({g,r,rg}{vim,ex,view}). Furthermore you must
copy Vims configuration files to $HOME/config/share/vim:
vim-5.0s/{*.vim,doc,syntax}. For completeness, you should also copy the nroff
manual pages to $HOME/config/man/man1. Don't forget ctags/ctags and xxd/xxd! Obviously, you need the unlimited linker to actually link Vim. See http://www.metrowerks.com for purchasing the CodeWarrior compiler for BeOS.
There are currently no other linkers that can do the job. This won't be able to include the Perl or Python interfaces even if
you have the appropriate files installed. |beos-perl| Timeout in the Terminal *beos-timeout* Because some POSIX/UNIX features are still missing[1], there is no direct OS
support for read-with-timeout in the Terminal. This would meat that you cannot
use :mappings of more than one character, unless you also :set notimeout.
|'timeout'| To circumvent this problem, I added a workaround to provide the necessary
input with timeout by using an extra thread which reads ahead one character.
As a side effect, it also makes Vim recognize when the Terminal window
resizes. The current implementation has one disadvantage: when starting a
subshell or other external command that reads input from the terminal, the
first character may still be read by Vim, and acted upon when the subshell
ends. To revert to the old situation, edit os_beos.h. Function keys are not supported in the Terminal since they produce very
indistinctive character sequences. These problems do not exist in the GUI. [1]: there is no select() on file descriptors; also the termios VMIN and VTIME
settings do not seem to work properly. This has been the case since DR7 at
least and still has not been fixed as of PR2. *beos-unicode* Unicode vs. Latin-1 *beos-utf8* BeOS uses Unicode and UTF-8 for text strings (16-bit characters encoded to
8-bit characters). Vim assumes ISO-Latin-1 or other 8-bit character codes.
This does not produce the desired results for non-ASCII characters. Try the
command :digraphs to see. If they look messed up, use :set isprint=@ to
(slightly) improve the display of ISO-Latin-1 characters 128-255. This works
better in the GUI, depending on which font you use (below). You may also use the /boot/bin/xtou command to convert UTF-8 files from (xtou
-f iso1 filename) or to (xtou -t iso1 filename) ISO-Latin-1 characters. Some remarks about the GUI: *beos-gui* Normally Vim starts with the GUI if you start it as gvim or vim -g. The BeOS
version tries to determine if it was started from the Tracker instead of the
Terminal, and if so, use the GUI anyway. However, the current detection scheme
is fooled if you use the command "vim -