Mercurial > vim
view runtime/doc/os_amiga.txt @ 33674:021e5bb88513 v9.0.2074
patch 9.0.2074: Completion menu may be wrong
Commit: https://github.com/vim/vim/commit/daef8c74375141974d61b85199b383017644978c
Author: Christian Brabandt <cb@256bit.org>
Date: Fri Oct 27 19:16:26 2023 +0200
patch 9.0.2074: Completion menu may be wrong
Problem: Completion menu may be wrong
Solution: Check for the original direction of the completion menu,
add more tests, make it work with 'noselect'
completion: move in right direction when filling completion_info()
When moving through the insert completion menu and switching directions,
we need to make sure we start at the correct position in the list and
move correctly forward/backwards through it, so that we do not skip
entries and the selected item points to the correct entry in the list
of completion entries generated by the completion_info() function.
The general case is this:
1) CTRL-X CTRL-N, we will traverse the list starting from
compl_first_match and then go forwards (using the cp->next pointer)
through the list (skipping the very first entry, which has the
CP_ORIGINAL_TEXT flag set (since that is the empty/non-selected entry
2) CTRL-X CTRL-P, we will traverse the list starting from
compl_first_match (which now points to the last entry). The previous
entry will have the CP_ORIGINAL_TEXT flag set, so we need to start
traversing the list from the second prev pointer.
There are in fact 2 special cases after starting the completion menu
with CTRL-X:
3) CTRL-N and then going backwards by pressing CTRL-P again.
compl_first_match will point to the same entry as in step 1 above,
but since compl_dir_foward() has been switched by pressing CTRL-P
to backwards we need to pretend to be in still in case 1 and still
traverse the list in forward direction using the cp_next pointer
4) CTRL-P and then going forwards by pressing CTRL-N again.
compl_first_match will point to the same entry as in step 2 above,
but since compl_dir_foward() has been switched by pressing CTRL-N
to forwards we need to pretend to be in still in case 2 and still
traverse the list in backward direction using the cp_prev pointer
For the 'noselect' case however, this is slightly different again. When
going backwards, we only need to go one cp_prev pointer back. And
resting of the direction works again slightly different. So we need to
take the noselect option into account when deciding in which direction
to iterate through the list of matches.
related: #13402
related: #12971
closes: #13408
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 27 Oct 2023 19:30:05 +0200 |
parents | f8116058ca76 |
children | 4635e43f2c6f |
line wrap: on
line source
*os_amiga.txt* For Vim version 9.0. Last change: 2010 Aug 14 VIM REFERENCE MANUAL by Bram Moolenaar *Amiga* This file contains the particularities for the Amiga version of Vim. There is also a section specifically for |MorphOS| below. NOTE: The Amiga code is still included, but has not been maintained or tested. Installation on the Amiga: - Assign "VIM:" to the directory where the Vim "doc" directory is. Vim will look for the file "VIM:doc/help.txt" (for the help command). Setting the environment variable $VIM also works. And the other way around: when $VIM used and it is not defined, "VIM:" is used. - With DOS 1.3 or earlier: Put "arp.library" in "libs:". Vim must have been compiled with the |+ARP| feature enabled. Make sure that newcli and run are in "C:" (for executing external commands). - Put a shell that accepts a command with "-c" (e.g. "Csh" from Fish disk 624) in "c:" or in any other directory that is in your search path (for executing external commands). If you have sufficient memory you can avoid startup delays by making Vim and csh resident with the command "rez csh vim". You will have to put "rezlib.library" in your "libs:" directory. Under 2.0 you will need rez version 0.5. If you do not use digraphs, you can save some memory by recompiling without the |+digraphs| feature. If you want to use Vim with other terminals you can recompile with the TERMCAP option. Vim compiles with Manx 5.x and SAS 6.x. See the makefiles and feature.h. If you notice Vim crashes on some files when syntax highlighting is on, or when using a search pattern with nested wildcards, it might be that the stack is too small. Try increasing the stack size. In a shell use the Stack command before launching Vim. On the Workbench, select the Vim icon, use the workbench "Info" menu and change the Stack field in the form. If you want to use different colors set the termcap codes: t_mr (for inverted text) t_md (for bold text) t_me (for normal text after t_mr and t_md) t_so (for standout mode) t_se (for normal text after t_so) t_us (for underlined text) t_ue (for normal text after t_us) t_ZH (for italic text) t_ZR (for normal text after t_ZH) Standard ANSI escape sequences are used. The codes are: 30 grey char 40 grey cell >0 grey background 0 all attributes off 31 black char 41 black cell >1 black background 1 boldface 32 white char 42 white cell >2 white background 2 faint 33 blue char 43 blue cell >3 blue background 3 italic 34 grey char 44 grey cell >4 grey background 4 underscore 35 black char 45 black cell >5 black background 7 reverse video 36 white char 46 white cell >6 white background 8 invisible 37 blue char 47 blue cell >7 blue background The codes with '>' must be the last. The cell and background color should be the same. The codes can be combined by separating them with a semicolon. For example to get white text on a blue background: > :set t_me=^V<Esc>[0;32;43;>3m :set t_se=^V<Esc>[0;32;43;>3m :set t_ue=^V<Esc>[0;32;43;>3m :set t_ZR=^V<Esc>[0;32;43;>3m :set t_md=^V<Esc>[1;32;43;>3m :set t_mr=^V<Esc>[7;32;43;>3m :set t_so=^V<Esc>[0;31;43;>3m :set t_us=^V<Esc>[4;32;43;>3m :set t_ZH=^V<Esc>[3;32;43;>3m When using multiple commands with a filter command, e.g. > :r! echo this; echo that Only the output of the last command is used. To fix this you have to group the commands. This depends on the shell you use (that is why it is not done automatically in Vim). Examples: > :r! (echo this; echo that) :r! {echo this; echo that} Commands that accept a single file name allow for embedded spaces in the file name. However, when using commands that accept several file names, embedded spaces need to be escaped with a backslash. ------------------------------------------------------------------------------ Vim for MorphOS *MorphOS* [this section mostly by Ali Akcaagac] For the latest info about the MorphOS version: http://www.akcaagac.com/index_vim.html Problems ~ There are a couple of problems which are not MorphOS related but more Vim and UN*X related. When starting up Vim in ram: it complains with a nag requester from MorphOS please simply ignore it. Another problem is when running Vim as is some plugins will cause a few problems which you can ignore as well. Hopefully someone will be fixing it over the time. To pass all these problems for now you can either run: vim <file to be edited> or if you want to run Vim plain and enjoy the motion of Helpfiles etc. it then would be better to enter: vim --noplugins <of course you can add a file> Installation ~ 1) Please copy the binary 'VIM' file to c: 2) Get the Vim runtime package from: ftp://ftp.vim.org/pub/vim/amiga/vim62rt.tgz and unpack it in your 'Apps' directory of the MorphOS installation. For me this would create following directory hierarchy: MorphOS:Apps/Vim/Vim62/... 3) Add the following lines to your s:shell-startup (Important!). ;Begin VIM Set VIM=MorphOS:Apps/Vim/Vim62 Assign HOME: "" ;End VIM 4) Copy the '.vimrc' file to s: 5) There is also a file named 'color-sequence' included in this archive. This will set the MorphOS Shell to show ANSI colors. Please copy the file to s: and change the s:shell-startup to: ;Begin VIM Set VIM=MorphOS:Apps/Vim/Vim62 Assign HOME: "" Execute S:Color-Sequence Cls ;End VIM vim:tw=78:ts=8:noet:ft=help:norl: