os_haiku.txt 8.3 KB

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