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