blob: 1ca338441df046b283c758de11a03ee263706445 [file] [log] [blame]
Bram Moolenaar2c5c1632020-04-30 19:54:38 +02001*os_haiku.txt* For Vim version 8.2. Last change: 2020 Apr 30
Bram Moolenaarb3f74062020-02-26 16:16:53 +01002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7 *Haiku*
8This file contains the particularities for the Haiku version of Vim. For
9matters not discussed in this file, Vim behaves very much like the Unix
10|os_unix.txt| version.
11
12Haiku is an open-source operating system inspired by BeOS, that specifically
13targets personal computing.
14
15 1. General |haiku-general|
16 2. Compiling Vim |haiku-compiling|
17 3. The Haiku GUI |haiku-gui|
18 4. The $VIM directory |haiku-vimdir|
Bram Moolenaarff781552020-03-19 20:37:11 +010019 5. The $USER_SETTINGS_DIR
Bram Moolenaarb3f74062020-02-26 16:16:53 +010020 directory |haiku-user-settings-dir|
21 6. Drag & Drop |haiku-dragndrop|
22 7. Single Launch vs. Multiple
23 Launch |haiku-launch|
24 8. Fonts |haiku-fonts|
25 9. The meta key modifier |haiku-meta|
2610. Mouse key mappings |haiku-mouse|
2711. Color names |haiku-colors|
2812. Credits |haiku-support-credits|
Bram Moolenaar191acfd2020-03-27 20:42:43 +01002913. Bugs & to-do |haiku-bugs|
Bram Moolenaarb3f74062020-02-26 16:16:53 +010030
31
321. General *haiku-general*
33
34The default syntax highlighting mostly works with different foreground colors
35to highlight items. This works best if you set your Terminal window to a
36darkish background and light letters. Some middle-grey background (for
37instance (r,g,b)=(168,168,168)) with black letters also works nicely.
38
39
402. Compiling Vim *haiku-compiling*
41
42Vim can be compiled using the standard configure/make approach. Running
43./configure without any arguments or passing --enable-gui=haiku, will compile
44vim with the Haiku GUI support. Run ./configure --help , to find out other
45features you can enable/disable.
46
Bram Moolenaarff781552020-03-19 20:37:11 +010047Haiku uses "ncurses6" as its terminal library, therefore you need to have
48"ncurses6_devel" package installed from HaikuDepot in order to configure
Bram Moolenaar2c5c1632020-04-30 19:54:38 +020049the Haiku build. Just append "--with-tlib=ncurses6" to ./configure command
Bram Moolenaarff781552020-03-19 20:37:11 +010050
Bram Moolenaarb3f74062020-02-26 16:16:53 +010051Now you should use "make" to compile Vim, then "make install" to install it.
Bram Moolenaarff781552020-03-19 20:37:11 +010052For seamless integration into Haiku, the GUI-less vim binary should be
Bram Moolenaar2c5c1632020-04-30 19:54:38 +020053additionally installed over the GUI version. Typical build commands are:
Bram Moolenaarb3f74062020-02-26 16:16:53 +010054
55 ./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
56 --datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
57 --mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
58 make clean
59 make install
60
61 ./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
62 --datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
63 --mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
64 --disable-gui
65 make clean
66 make install
67
68
693. The Haiku GUI *haiku-gui*
70
71Normally Vim starts with the GUI if you start it as gvim or vim -g. The vim
72version with GUI tries to determine if it was started from the Tracker instead
Bram Moolenaar2c5c1632020-04-30 19:54:38 +020073of the Terminal, and if so, uses the GUI anyway. However, the current detection
Bram Moolenaarb3f74062020-02-26 16:16:53 +010074scheme is fooled if you use the command "vim - </dev/null".
75
76Stuff that does not work yet:
77
Bram Moolenaar2c5c1632020-04-30 19:54:38 +020078- Mouse up events are not generated when outside the window. You can notice
79 this when selecting text and moving the cursor outside the window, then
80 letting go of the mouse button. Another way is when you drag the scrollbar
81 and do the same thing. Because Vim still thinks you are still playing with
82 the scrollbar it won't change it itself. There is a workaround which kicks
83 in when the window is activated or deactivated (so it works best with focus-
84 follows-mouse turned on).
Bram Moolenaar191acfd2020-03-27 20:42:43 +010085- The cursor does not flash.
Bram Moolenaar2c5c1632020-04-30 19:54:38 +020086- Built-in terminal is not available in GUI, and does not work reliably on
87 console version as well; e.g. it is not possible to exit using the 'exit'
88 command. If you need to use it, enable at your own risk.
Bram Moolenaarb3f74062020-02-26 16:16:53 +010089
90
914. The $VIM directory *haiku-vimdir*
92
Bram Moolenaard1caa942020-04-10 22:10:56 +020093$VIM is the symbolic name for the place where Vim's support files are stored.
Bram Moolenaar2c5c1632020-04-30 19:54:38 +020094The default value for $VIM is set at compile time and can be determined with:
Bram Moolenaarb3f74062020-02-26 16:16:53 +010095
96 :version
97
Bram Moolenaarff781552020-03-19 20:37:11 +010098The normal value is /boot/system/data/vim for Haikuports version,
99/boot/system/non-packaged/data/vim for manual builds. If you don't like it
100you can set the VIM environment variable to override this, or set 'helpfile'
101in your .vimrc: >
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100102
103 :if version >= 500
104 : set helpfile=~/vim/runtime/doc/help.txt
105 : syntax on
106 :endif
107
108
1095. The $USER_SETTINGS_DIR directory *haiku-user-settings-dir*
110
111$USER_SETTINGS_DIR is the symbolic name for the place where Haiku
112configuration and settings files are stored.
113
114The normal value is /boot/home/config/settings.
115
116
1176. Drag & Drop *haiku-dragndrop*
118
119You can drop files and directories on either the Vim icon (starts a new Vim
120session, unless you use the File Types application to set Vim to be "Single
121Launch") or on the Vim window (starts editing the files). Dropping a folder
Bram Moolenaar2c5c1632020-04-30 19:54:38 +0200122sets Vim's current working directory |:cd| |:pwd|. If you drop files or
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100123folders with either SHIFT key pressed, Vim changes directory to the folder
124that contains the first item dropped. When starting Vim, there is no need to
125press shift: Vim behaves as if you do.
126
127Files dropped set the current argument list. |argument-list|
128
129
1307. Single Launch vs. Multiple Launch *haiku-launch*
131
132As distributed Vim's Application Flags (as seen in the FileTypes preference)
133are set to Multiple Launch. If you prefer, you can set them to Single Launch
134instead. Attempts to start a second copy of Vim will cause the first Vim to
135open the files instead. This works from the Tracker but also from the command
136line. In the latter case, non-file (option) arguments are not supported.
137Another drawback of the Single Launch is silent ignore of "Open With ..."
138requests by vim instance that running as non-GUI application even GUI support
139was compiled in. Vim instance running with GUI has no such problems.
140
141NB: Only the GUI version has a BApplication (and hence Application Flags).
142This section does not apply to the GUI-less version, should you compile one.
143
144
1458. Fonts *haiku-fonts*
146
147Set fonts with >
148
149 :set guifont=DejaVu_Sans_Mono/Book/12
150
151where the first part is the font family, the second part the style, and the
152third part the size. You can use underscores instead of spaces in family and
153style.
154
155Best results are obtained with monospaced fonts. Vim attempts to use all
156fonts in B_FIXED_SPACING mode but apparently this does not work for
157proportional fonts (despite what the BeBook says).
158
159To verify which encodings are supported by the current font give the >
160
161 :digraphs
162
163command, which lists a bunch of characters with their ISO Latin 1 encoding.
164If, for instance, there are "box" characters among them, or the last character
165isn't a dotted-y, then for this font the encoding does not work.
166
167If the font you specify is unavailable, you get the system fixed font.
168
Bram Moolenaar2c5c1632020-04-30 19:54:38 +0200169GUI Font Selection Dialog is available at giving the:
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100170
171 :set guifont=*
172
173command.
174
175
1769. The meta key modifier *haiku-meta*
177
178The META key modifier is obtained by the left or right OPTION keys. This is
179because the ALT (aka COMMAND) keys are not passed to applications.
180
181
18210. Mouse key mappings *haiku-mouse*
183
184Vim calls the various mouse buttons LeftMouse, MiddleMouse and RightMouse. If
185you use the default Mouse preference settings these names indeed correspond to
186reality. Vim uses this mapping:
187
188 Button 1 -> LeftMouse,
189 Button 2 -> RightMouse,
190 Button 3 -> MiddleMouse.
191
192If your mouse has fewer than 3 buttons you can provide your own mapping from
193mouse clicks with modifier(s) to other mouse buttons. See the file
194$VIM/macros/swapmous.vim for an example. |gui-mouse-mapping|
195
196
19711. Color names *haiku-colors*
198
199Vim has a number of color names built-in. Additional names are read from the
200file $VIMRUNTIME/rgb.txt, if present. This file is basically the color
201database from X. Names used from this file are cached for efficiency.
202
203
20412. GUI Toolbar Images *haiku-toolbar-images*
205
206Alternative set of toolbar images should be the PNG image of any height you
207like. Image width is calculated to contain at least 32 buttons in one-row
208cells.
209The image should be stored under the name $VIRUNTIME/bitmaps/builtin-tools.png
210More info about the buttons assignment are at |builtin-tools|.
211
212
21313. Credits *haiku-support-credits*
214
215Haiku port is based on work done for BeOS version by many people
216 - BeBox GUI support Copyright 1998 by Olaf Seibert;
217 - Ported to R4 by Richard Offer <richard@whitequeen.com> Jul 99;
218 - Those who contributed, not listed above but not forgotten;
219 - Haiku support by Siarzhuk Zharski <imker@gmx.li> Apr-Mai 2009.
220
221All the changes and patches released under vim-license.
222
223Thank you, all!
224
225
Bram Moolenaar191acfd2020-03-27 20:42:43 +010022613. Bugs & to-do *haiku-bugs*
227
228The port is under development now and far away from the perfect state. For bug
229reports, patches and wishes, please use the Vim mailing list or Vim Github
230repository.
231
232Mailing list: https://www.vim.org/maillist.php
233Vim Github repository: https://github.com/vim/vim
Bram Moolenaarb3f74062020-02-26 16:16:53 +0100234
235
236 vim:tw=78:ts=8:ft=help:norl: