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