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