Christian Brabandt | b4ddc6c | 2024-01-02 16:51:11 +0100 | [diff] [blame] | 1 | *os_haiku.txt* For Vim version 9.1. Last change: 2020 May 13 |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 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| |
Bram Moolenaar | ff78155 | 2020-03-19 20:37:11 +0100 | [diff] [blame] | 19 | 5. The $USER_SETTINGS_DIR |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 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| |
Bram Moolenaar | 7ceefb3 | 2020-05-01 16:07:38 +0200 | [diff] [blame] | 28 | 12. GUI Toolbar Images |haiku-toolbar-images| |
| 29 | 13. Credits |haiku-support-credits| |
| 30 | 14. Bugs & to-do |haiku-bugs| |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 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 | |
Bram Moolenaar | ff78155 | 2020-03-19 20:37:11 +0100 | [diff] [blame] | 48 | Haiku uses "ncurses6" as its terminal library, therefore you need to have |
| 49 | "ncurses6_devel" package installed from HaikuDepot in order to configure |
Bram Moolenaar | 3c053a1 | 2022-10-16 13:11:12 +0100 | [diff] [blame] | 50 | the Haiku build. Just append "--with-tlib=ncurses" to ./configure command. |
Bram Moolenaar | ff78155 | 2020-03-19 20:37:11 +0100 | [diff] [blame] | 51 | |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 52 | Now you should use "make" to compile Vim, then "make install" to install it. |
Bram Moolenaar | ff78155 | 2020-03-19 20:37:11 +0100 | [diff] [blame] | 53 | For seamless integration into Haiku, the GUI-less vim binary should be |
Bram Moolenaar | 2c5c163 | 2020-04-30 19:54:38 +0200 | [diff] [blame] | 54 | additionally installed over the GUI version. Typical build commands are: |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 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 \ |
Bram Moolenaar | 76db9e0 | 2022-11-09 21:21:04 +0000 | [diff] [blame] | 59 | --with-tlib=ncurses |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 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 \ |
Bram Moolenaar | 3c053a1 | 2022-10-16 13:11:12 +0100 | [diff] [blame] | 66 | --with-tlib=ncurses \ |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 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 |
Bram Moolenaar | 2c5c163 | 2020-04-30 19:54:38 +0200 | [diff] [blame] | 76 | of the Terminal, and if so, uses the GUI anyway. However, the current detection |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 77 | scheme is fooled if you use the command "vim - </dev/null". |
| 78 | |
| 79 | Stuff that does not work yet: |
| 80 | |
Bram Moolenaar | 2c5c163 | 2020-04-30 19:54:38 +0200 | [diff] [blame] | 81 | - Mouse up events are not generated when outside the window. You can notice |
| 82 | this when selecting text and moving the cursor outside the window, then |
| 83 | letting go of the mouse button. Another way is when you drag the scrollbar |
| 84 | and do the same thing. Because Vim still thinks you are still playing with |
| 85 | the scrollbar it won't change it itself. There is a workaround which kicks |
| 86 | in when the window is activated or deactivated (so it works best with focus- |
| 87 | follows-mouse turned on). |
Bram Moolenaar | 191acfd | 2020-03-27 20:42:43 +0100 | [diff] [blame] | 88 | - The cursor does not flash. |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 89 | |
| 90 | |
| 91 | 4. The $VIM directory *haiku-vimdir* |
| 92 | |
Bram Moolenaar | d1caa94 | 2020-04-10 22:10:56 +0200 | [diff] [blame] | 93 | $VIM is the symbolic name for the place where Vim's support files are stored. |
Bram Moolenaar | 2c5c163 | 2020-04-30 19:54:38 +0200 | [diff] [blame] | 94 | The default value for $VIM is set at compile time and can be determined with: |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 95 | |
| 96 | :version |
| 97 | |
Bram Moolenaar | b59ae59 | 2022-11-23 23:46:31 +0000 | [diff] [blame] | 98 | The normal value is /boot/system/data/vim for Haikuports version, |
Bram Moolenaar | ff78155 | 2020-03-19 20:37:11 +0100 | [diff] [blame] | 99 | /boot/system/non-packaged/data/vim for manual builds. If you don't like it |
| 100 | you can set the VIM environment variable to override this, or set 'helpfile' |
| 101 | in your .vimrc: > |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 102 | |
| 103 | :if version >= 500 |
| 104 | : set helpfile=~/vim/runtime/doc/help.txt |
| 105 | : syntax on |
| 106 | :endif |
| 107 | |
| 108 | |
| 109 | 5. The $USER_SETTINGS_DIR directory *haiku-user-settings-dir* |
| 110 | |
| 111 | $USER_SETTINGS_DIR is the symbolic name for the place where Haiku |
| 112 | configuration and settings files are stored. |
| 113 | |
| 114 | The normal value is /boot/home/config/settings. |
| 115 | |
| 116 | |
| 117 | 6. Drag & Drop *haiku-dragndrop* |
| 118 | |
| 119 | You can drop files and directories on either the Vim icon (starts a new Vim |
| 120 | session, unless you use the File Types application to set Vim to be "Single |
| 121 | Launch") or on the Vim window (starts editing the files). Dropping a folder |
Bram Moolenaar | 2c5c163 | 2020-04-30 19:54:38 +0200 | [diff] [blame] | 122 | sets Vim's current working directory |:cd| |:pwd|. If you drop files or |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 123 | folders with either SHIFT key pressed, Vim changes directory to the folder |
| 124 | that contains the first item dropped. When starting Vim, there is no need to |
| 125 | press shift: Vim behaves as if you do. |
| 126 | |
| 127 | Files dropped set the current argument list. |argument-list| |
| 128 | |
| 129 | |
| 130 | 7. Single Launch vs. Multiple Launch *haiku-launch* |
| 131 | |
| 132 | As distributed Vim's Application Flags (as seen in the FileTypes preference) |
| 133 | are set to Multiple Launch. If you prefer, you can set them to Single Launch |
| 134 | instead. Attempts to start a second copy of Vim will cause the first Vim to |
| 135 | open the files instead. This works from the Tracker but also from the command |
| 136 | line. In the latter case, non-file (option) arguments are not supported. |
| 137 | Another drawback of the Single Launch is silent ignore of "Open With ..." |
| 138 | requests by vim instance that running as non-GUI application even GUI support |
| 139 | was compiled in. Vim instance running with GUI has no such problems. |
| 140 | |
| 141 | NB: Only the GUI version has a BApplication (and hence Application Flags). |
| 142 | This section does not apply to the GUI-less version, should you compile one. |
| 143 | |
| 144 | |
| 145 | 8. Fonts *haiku-fonts* |
| 146 | |
| 147 | Set fonts with > |
| 148 | |
| 149 | :set guifont=DejaVu_Sans_Mono/Book/12 |
| 150 | |
| 151 | where the first part is the font family, the second part the style, and the |
| 152 | third part the size. You can use underscores instead of spaces in family and |
| 153 | style. |
| 154 | |
| 155 | Best results are obtained with monospaced fonts. Vim attempts to use all |
| 156 | fonts in B_FIXED_SPACING mode but apparently this does not work for |
| 157 | proportional fonts (despite what the BeBook says). |
| 158 | |
| 159 | To verify which encodings are supported by the current font give the > |
| 160 | |
| 161 | :digraphs |
| 162 | |
| 163 | command, which lists a bunch of characters with their ISO Latin 1 encoding. |
| 164 | If, for instance, there are "box" characters among them, or the last character |
| 165 | isn't a dotted-y, then for this font the encoding does not work. |
| 166 | |
| 167 | If the font you specify is unavailable, you get the system fixed font. |
| 168 | |
Bram Moolenaar | 2c5c163 | 2020-04-30 19:54:38 +0200 | [diff] [blame] | 169 | GUI Font Selection Dialog is available at giving the: |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 170 | |
| 171 | :set guifont=* |
| 172 | |
| 173 | command. |
| 174 | |
| 175 | |
| 176 | 9. The meta key modifier *haiku-meta* |
| 177 | |
| 178 | The META key modifier is obtained by the left or right OPTION keys. This is |
| 179 | because the ALT (aka COMMAND) keys are not passed to applications. |
| 180 | |
| 181 | |
| 182 | 10. Mouse key mappings *haiku-mouse* |
| 183 | |
| 184 | Vim calls the various mouse buttons LeftMouse, MiddleMouse and RightMouse. If |
| 185 | you use the default Mouse preference settings these names indeed correspond to |
| 186 | reality. Vim uses this mapping: |
| 187 | |
| 188 | Button 1 -> LeftMouse, |
| 189 | Button 2 -> RightMouse, |
| 190 | Button 3 -> MiddleMouse. |
| 191 | |
| 192 | If your mouse has fewer than 3 buttons you can provide your own mapping from |
| 193 | mouse clicks with modifier(s) to other mouse buttons. See the file |
| 194 | $VIM/macros/swapmous.vim for an example. |gui-mouse-mapping| |
| 195 | |
| 196 | |
| 197 | 11. Color names *haiku-colors* |
| 198 | |
Drew Vogel | e30d102 | 2021-10-24 20:35:07 +0100 | [diff] [blame] | 199 | Vim has a number of color names built-in. Additional names can be defined in |
| 200 | |v:colornames|. See |:colorscheme| for details. |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 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 | |
Bram Moolenaar | 7ceefb3 | 2020-05-01 16:07:38 +0200 | [diff] [blame] | 225 | 14. Bugs & to-do *haiku-bugs* |
Bram Moolenaar | b59ae59 | 2022-11-23 23:46:31 +0000 | [diff] [blame] | 226 | |
Bram Moolenaar | 191acfd | 2020-03-27 20:42:43 +0100 | [diff] [blame] | 227 | The port is under development now and far away from the perfect state. For bug |
| 228 | reports, patches and wishes, please use the Vim mailing list or Vim Github |
| 229 | repository. |
Bram Moolenaar | b59ae59 | 2022-11-23 23:46:31 +0000 | [diff] [blame] | 230 | |
Bram Moolenaar | 191acfd | 2020-03-27 20:42:43 +0100 | [diff] [blame] | 231 | Mailing list: https://www.vim.org/maillist.php |
| 232 | Vim Github repository: https://github.com/vim/vim |
Bram Moolenaar | b3f7406 | 2020-02-26 16:16:53 +0100 | [diff] [blame] | 233 | |
| 234 | |
| 235 | vim:tw=78:ts=8:ft=help:norl: |