1*os_haiku.txt* For Vim version 8.2. Last change: 2020 May 13 2 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| 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| 2610. Mouse key mappings |haiku-mouse| 2711. Color names |haiku-colors| 2812. GUI Toolbar Images |haiku-toolbar-images| 2913. Credits |haiku-support-credits| 3014. Bugs & to-do |haiku-bugs| 31 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 48Haiku uses "ncurses6" as its terminal library, therefore you need to have 49"ncurses6_devel" package installed from HaikuDepot in order to configure 50the Haiku build. Just append "--with-tlib=ncurses6" to ./configure command 51 52Now you should use "make" to compile Vim, then "make install" to install it. 53For seamless integration into Haiku, the GUI-less vim binary should be 54additionally 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 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 74of the Terminal, and if so, uses the GUI anyway. However, the current detection 75scheme is fooled if you use the command "vim - </dev/null". 76 77Stuff that does not work yet: 78 79- 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). 86- The cursor does not flash. 87 88 894. The $VIM directory *haiku-vimdir* 90 91$VIM is the symbolic name for the place where Vim's support files are stored. 92The default value for $VIM is set at compile time and can be determined with: 93 94 :version 95 96The normal value is /boot/system/data/vim for Haikuports version, 97/boot/system/non-packaged/data/vim for manual builds. If you don't like it 98you can set the VIM environment variable to override this, or set 'helpfile' 99in your .vimrc: > 100 101 :if version >= 500 102 : set helpfile=~/vim/runtime/doc/help.txt 103 : syntax on 104 :endif 105 106 1075. The $USER_SETTINGS_DIR directory *haiku-user-settings-dir* 108 109$USER_SETTINGS_DIR is the symbolic name for the place where Haiku 110configuration and settings files are stored. 111 112The normal value is /boot/home/config/settings. 113 114 1156. Drag & Drop *haiku-dragndrop* 116 117You can drop files and directories on either the Vim icon (starts a new Vim 118session, unless you use the File Types application to set Vim to be "Single 119Launch") or on the Vim window (starts editing the files). Dropping a folder 120sets Vim's current working directory |:cd| |:pwd|. If you drop files or 121folders with either SHIFT key pressed, Vim changes directory to the folder 122that contains the first item dropped. When starting Vim, there is no need to 123press shift: Vim behaves as if you do. 124 125Files dropped set the current argument list. |argument-list| 126 127 1287. Single Launch vs. Multiple Launch *haiku-launch* 129 130As distributed Vim's Application Flags (as seen in the FileTypes preference) 131are set to Multiple Launch. If you prefer, you can set them to Single Launch 132instead. Attempts to start a second copy of Vim will cause the first Vim to 133open the files instead. This works from the Tracker but also from the command 134line. In the latter case, non-file (option) arguments are not supported. 135Another drawback of the Single Launch is silent ignore of "Open With ..." 136requests by vim instance that running as non-GUI application even GUI support 137was compiled in. Vim instance running with GUI has no such problems. 138 139NB: Only the GUI version has a BApplication (and hence Application Flags). 140This section does not apply to the GUI-less version, should you compile one. 141 142 1438. Fonts *haiku-fonts* 144 145Set fonts with > 146 147 :set guifont=DejaVu_Sans_Mono/Book/12 148 149where the first part is the font family, the second part the style, and the 150third part the size. You can use underscores instead of spaces in family and 151style. 152 153Best results are obtained with monospaced fonts. Vim attempts to use all 154fonts in B_FIXED_SPACING mode but apparently this does not work for 155proportional fonts (despite what the BeBook says). 156 157To verify which encodings are supported by the current font give the > 158 159 :digraphs 160 161command, which lists a bunch of characters with their ISO Latin 1 encoding. 162If, for instance, there are "box" characters among them, or the last character 163isn't a dotted-y, then for this font the encoding does not work. 164 165If the font you specify is unavailable, you get the system fixed font. 166 167GUI Font Selection Dialog is available at giving the: 168 169 :set guifont=* 170 171command. 172 173 1749. The meta key modifier *haiku-meta* 175 176The META key modifier is obtained by the left or right OPTION keys. This is 177because the ALT (aka COMMAND) keys are not passed to applications. 178 179 18010. Mouse key mappings *haiku-mouse* 181 182Vim calls the various mouse buttons LeftMouse, MiddleMouse and RightMouse. If 183you use the default Mouse preference settings these names indeed correspond to 184reality. Vim uses this mapping: 185 186 Button 1 -> LeftMouse, 187 Button 2 -> RightMouse, 188 Button 3 -> MiddleMouse. 189 190If your mouse has fewer than 3 buttons you can provide your own mapping from 191mouse clicks with modifier(s) to other mouse buttons. See the file 192$VIM/macros/swapmous.vim for an example. |gui-mouse-mapping| 193 194 19511. Color names *haiku-colors* 196 197Vim has a number of color names built-in. Additional names can be defined in 198|v:colornames|. See |:colorscheme| for details. 199 200 20112. GUI Toolbar Images *haiku-toolbar-images* 202 203Alternative set of toolbar images should be the PNG image of any height you 204like. Image width is calculated to contain at least 32 buttons in one-row 205cells. 206The image should be stored under the name $VIRUNTIME/bitmaps/builtin-tools.png 207More info about the buttons assignment are at |builtin-tools|. 208 209 21013. Credits *haiku-support-credits* 211 212Haiku port is based on work done for BeOS version by many people 213 - BeBox GUI support Copyright 1998 by Olaf Seibert; 214 - Ported to R4 by Richard Offer <[email protected]> Jul 99; 215 - Those who contributed, not listed above but not forgotten; 216 - Haiku support by Siarzhuk Zharski <[email protected]> Apr-Mai 2009. 217 218All the changes and patches released under vim-license. 219 220Thank you, all! 221 222 22314. Bugs & to-do *haiku-bugs* 224 225The port is under development now and far away from the perfect state. For bug 226reports, patches and wishes, please use the Vim mailing list or Vim Github 227repository. 228 229Mailing list: https://www.vim.org/maillist.php 230Vim Github repository: https://github.com/vim/vim 231 232 233 vim:tw=78:ts=8:ft=help:norl: 234