Bram Moolenaar, 23.02.2009:
>
> Markus Heidelberg wrote:
>
> > Bram Moolenaar, 22.02.2009:
> > >
> > > Patch 7.2.123
> > > Problem: Typing 'q' at more prompt for ":map" output still displays
> > > another
> > > line, causing another more prompt. (Markus Heidelberg)
> > > Solution: Quit listing maps when 'q' typed.
> > > Files: src/getchar.c
> >
> > This only fixes a few of the examples from the bug report.
> > It still occurs for both :map and :tselect
>
> Each of these have to be dealt with separately. I just found and fixed
> the ":tselect" problem. Any others? Please give a reproducable
> example.
In Konsole terminal emulator with $LINES=24 and $COLUMNS=80:
./vim -u NONE -U NONE -N
:so AlignMapsPlugin.vim
:map<CR>ddjjq
or
:map<CR>dddddddddq (9 times d)
Seems to be dependent on the line wrapping as you suggested in a
previous mail.
The AlignMapsPlugin.vim is the latest from vim.org, just to get enough
mappings with long lines.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
" AlignMapsPlugin: Alignment maps based upon
and
" Maintainer: Dr. Charles E. Campbell, Jr.
" Date: Oct 24, 2008
"
" NOTE: the code herein needs vim 6.0 or later
" needs v6 or later
" needs v5 or later
" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" AlignMaps.vim is provided *as is* and comes with no warranty
" of any kind, either expressed or implied. By using this
" plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software.
"
" Usage: {{{1
" Use 'a to mark beginning of to-be-aligned region, Alternative: use V
" move cursor to end of region, and execute map. (linewise visual mode) to
" The maps also set up marks 'y and 'z, and retain mark region, execute same
" 'a at the beginning of region. map. Uses 'a, 'y, and 'z.
"
" The start/end wrappers save and restore marks 'y and 'z.
"
" Although the comments indicate the maps use a leading backslash,
" actually they use (:he mapleader), so the user can
" specify that the maps start how he or she prefers.
"
" Note: these maps all use .
"
" Romans 1:20 For the invisible things of Him since the creation of the {{{1
" world are clearly seen, being perceived through the things that are
" made, even His everlasting power and divinity; that they may be
" without excuse.
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" =====================================================================
" Maps: {{{1
" ---------------------------------------------------------------------
" WS: wrapper start map (internal) {{{2
" Produces a blank line above and below, marks with 'y and 'z
if !hasmapto('WrapperStart')
map WS AlignMapsWrapperStart
endif
nmap > AlignMapsWrapperStart :set lz:call AlignMaps#WrapperStart(0)
vmap > AlignMapsWrapperStart :set lz:call AlignMaps#WrapperStart(1)
" ---------------------------------------------------------------------
" WE: wrapper end (internal) {{{2
" Removes guard lines, restores marks y and z, and restores search pattern
if !hasmapto('WrapperEnd')
nmap WE AlignMapsWrapperEnd
endif
nmap > AlignMapsWrapperEnd :call AlignMaps#WrapperEnd():set nolz
" ---------------------------------------------------------------------
" Complex C-code alignment maps: {{{2!= ""
if !hasmapto('AM_a?') |map a? AM_a?|endif
if !hasmapto('AM_a,') |map a, AM_a,|endif
if !hasmapto('AM_a<') |map a< AM_a<|endif
if !hasmapto('AM_a=') |map a= AM_a=|endif
if !hasmapto('AM_abox') |map abox AM_abox|endif
if !hasmapto('AM_acom') |map acom AM_acom|endif
if !hasmapto('AM_adcom')|map adcom AM_adcom|endif
if !hasmapto('AM_aocom')|map aocom AM_aocom|endif
if !hasmapto('AM_ascom')|map ascom AM_ascom|endif
if !hasmapto('AM_adec') |map adec AM_adec|endif
if !hasmapto('AM_adef') |map adef AM_adef|endif
if !hasmapto('AM_afnc') |map afnc AM_afnc|endif
if !hasmapto('AM_afnc') |map afnc AM_afnc|endif
if !hasmapto('AM_aunum')|map aunum AM_aenum|endif
if !hasmapto('AM_aenum')|map aenum AM_aunum|endif
if exists("g:alignmaps_euronumber") && !exists("g:alignmaps_usanumber")
if !hasmapto('AM_anum')|map anum AM_aenum|endif
else
if !hasmapto('AM_anum')|map anum AM_aunum|endif
endif
map > AM_a? WS:AlignCtrl mIp1P1lC ? : : : : :'a,.Align:'a,'z-1s/\(\s\+\)? /?\1/eWE
map > AM_a, WS:'y,'zs/\(\S\)\s\+/\1 /ge'yjma'zk:call AlignMaps#CharJoiner(","):silent 'y,'zg/,/call AlignMaps#FixMultiDec()'z:exe "norm \AM_adec"WE
map > AM_a< WS:AlignCtrl mIp1P1=l << >>:'a,.AlignWE
map > AM_a= WS:AlignCtrl mIp1P1=l:AlignCtrl g :=:'a,'zAlign :\==WE
map > AM_abox WS:let g:alignmaps_iws=substitute(getline("'a"),'^\(\s*\).*$','\1','e'):'a,'z-1s/^\s\+//e:'a,'z-1s/^.*$/@&@/:AlignCtrl m=p01P0w @:'a,.Align:'a,'z-1s/@/ * /:'a,'z-1s/@$/*/'aYP:s/./*/g0r/'zkYp:s/./*/g0r A/:exe "'a-1,'z-1s/^/".g:alignmaps_iws."/e"WE
map > AM_acom WS:'a,.s/\/[*/]\/\=/@&@/e:'a,.s/\*\//@&/e:'y,'zs/^\( *\) @/\1@/e'zk:call AlignMaps#StdAlign(2):'y,'zs/^\(\s*\) @/\1/e:'y,'zs/ @//egWE
map > AM_adcom WS:'a,.v/^\s*\/[/*]/s/\/[*/]\*\=/@&@/e:'a,.v/^\s*\/[/*]/s/\*\//@&/e:'y,'zv/^\s*\/[/*]/s/^\( *\) @/\1@/e'zk:call AlignMaps#StdAlign(3):'y,'zv/^\s*\/[/*]/s/^\(\s*\) @/\1/e:'y,'zs/ @//egWE
map > AM_aocom WS:AlignPush:AlignCtrl g /[*/]:exe "norm \AM_acom":AlignPopWE
map > AM_ascom WS:'a,.s/\/[*/]/@&@/e:'a,.s/\*\//@&/e:silent! 'a,.g/^...@\/[*/]/s/@//ge:AlignCtrl v ^\s*\/[*/]:AlignCtrl g \/[*/]'zk:call AlignMaps#StdAlign(2):'y,'zs/^\(\s*\) @/\1/e:'y,'zs/ @//egWE
map > AM_adec WS:'a,'zs/\([^ \t/(]\)\([*&]\)/\1 \2/e:'y,'zv/^\//s/\([^ \t]\)\s\+/\1 /ge:'y,'zv/^\s*[*/]/s/\([^/][*&]\)\s\+/\1/ge:'y,'zv/^\s*[*/]/s/^\(\s*\%(\K\k*\s\+\%([a-zA-Z_*(&]\)\...@=\)\+\)\([*(&]*\)\s*\([a-zA-Z0-9_()]\+\)\s*\(\(\[.\{-}]\)*\)\s*\(=\)\=\s*\(.\{-}\)\=\s*;/\...@\2#@\...@\6@\7;@/e:'y,'zv/^\s*[*/]/s/\*\/\s*$/@*\//e:'y,'zv/^\s*[*/]/s/^\s\+\*/@@@@@* /e:'y,'zv/^\s*[*/]/s/^@@@@@\*\(.*[^*/]\)$/&@*/e'yjma'zk:AlignCtrl v ^\s*[*/#]:call AlignMaps#StdAlign(1):'y,'zv/^\s*[*/]/s/@ //ge:'y,'zv/^\s*[*/]/s/\(\s*\);/;\1/e:'y,'zv/^#/s/# //e:'y,'zv/^\s\+[*/#]/s/\([^/*]\)\(\*\+\)\( \+\)/\1\3\2/e:'y,'zv/^\s\+[*/#]/s/\((\+\)\( \+\)\*/\2\1*/e:'y,'zv/^\s\+[*/#]/s/^\(\s\+\) \*/\1*/e:'y,'zv/^\s\+[*/#]/s/[ \...@]*$//e:'y,'zs/^[*]/ */eWE
map > AM_adef WS:AlignPush:AlignCtrl v ^\s*\(\/\*\\/\/\):'a,.v/^\s*\(\/\*\\/\/\)/s/^\(\s*\)#\(\s\)*define\s*\(\I[a-zA-Z_0-9(),]*\)\s*\(.\{-}\)\($\\/\*\)/#\1\2define @\...@\4@\5/e:'a,.v/^\s*\(\/\*\\/\/\)/s/\($\\*\/\)/@&/e'zk:call AlignMaps#StdAlign(1)'yjma'zk:'a,.v/^\s*\(\/\*\\/\/\)/s/ @//gWE
map > AM_afnc :set lz:silent call AlignMaps#Afnc():set nolz
map > AM_aunum WS:'a,'zs/\%([0-9.]\)\s\+\zs\([-+.]\=\d\)/@\1/ge:'a,'zs/\(\(^\|\s\)\d\+\)\(\s\+\)@/\...@\3@/ge:'a,'zs/\.@/\.0@/ge:AlignCtrl mp0P0r:'a,'zAlign [...@]:'a,'zs/@/ /ge:'a,'zs/\(\.\)\(\s\+\)\([0-9.,eE+]\+\)/\1\3\2/ge:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/geWE
map > AM_aenum WS:'a,'zs/\%([0-9.]\)\s\+\([-+]\=\d\)/\...@\2/ge:'a,'zs/\.@/\.0@/ge:AlignCtrl mp0P0r:'a,'zAlign [,@]:'a,'zs/@/ /ge:'a,'zs/\(,\)\(\s\+\)\([-0-9.,eE+]\+\)/\1\3\2/ge:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/geWE
" ---------------------------------------------------------------------
" html table alignment {{{2
if !hasmapto('AM_Htd')|map Htd AM_Htd|endif
map >