Skip to content

Instantly share code, notes, and snippets.

@kana
Created October 9, 2008 08:36
Show Gist options
  • Save kana/15724 to your computer and use it in GitHub Desktop.
Save kana/15724 to your computer and use it in GitHub Desktop.
--- Align.vba.orig 2009-10-09 17:11:21.000000000 +0900
+++ Align.vba 2008-10-09 17:10:56.000000000 +0900
@@ -96,7 +96,7 @@
if !hasmapto('<Plug>WrapperStart')
nmap <unique> <SID>WS <Plug>AlignMapsWrapperStart
endif
-nmap <silent> <script> <Plug>AlignMapsWrapperStart :set lz<CR>:call AlignWrapperStart()<CR>
+nnoremap <silent> <Plug>AlignMapsWrapperStart :set lz<CR>:call AlignWrapperStart()<CR>
" ---------------------------------------------------------------------
" AlignWrapperStart: {{{1
@@ -139,7 +139,7 @@
if !hasmapto('<Plug>WrapperEnd')
nmap <unique> <SID>WE <Plug>AlignMapsWrapperEnd
endif
-nmap <silent> <script> <Plug>AlignMapsWrapperEnd :call AlignWrapperEnd()<CR>:set nolz<CR>
+nnoremap <silent> <Plug>AlignMapsWrapperEnd :call AlignWrapperEnd()<CR>:set nolz<CR>
" ---------------------------------------------------------------------
" AlignWrapperEnd: {{{1
@@ -191,20 +191,31 @@
" ---------------------------------------------------------------------
" Complex C-code alignment maps: {{{1
-map <silent> <Leader>a? <SID>WS:AlignCtrl mIp1P1lC ? : : : : <CR>:'a,.Align<CR>:'a,'z-1s/\(\s\+\)? /?\1/e<CR><SID>WE
-map <silent> <Leader>a, <SID>WS:'y,'zs/\(\S\)\s\+/\1 /ge<CR>'yjma'zk<Leader>jnr,<CR>:silent 'y,'zg/,/call <SID>FixMultiDec()<CR>'z<Leader>adec<SID>WE
-map <silent> <Leader>a< <SID>WS:AlignCtrl mIp1P1=l << >><CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>a= <SID>WS:AlignCtrl mIp1P1=l<CR>:AlignCtrl g :=<CR>:'a,'zAlign :\==<CR><SID>WE
-map <silent> <Leader>abox <SID>WS:let g:alignmaps_iws=substitute(getline("'a"),'^\(\s*\).*$','\1','e')<CR>:'a,'z-1s/^\s\+//e<CR>:'a,'z-1s/^.*$/@&@/<CR>:AlignCtrl m=p01P0w @<CR>:'a,.Align<CR>:'a,'z-1s/@/ * /<CR>:'a,'z-1s/@$/*/<CR>'aYP:s/./*/g<CR>0r/'zkYp:s/./*/g<CR>0r A/<Esc>:exe "'a-1,'z-1s/^/".g:alignmaps_iws."/e"<CR><SID>WE
-map <silent> <Leader>acom <SID>WS:'a,.s/\/[*/]\/\=/@&@/e<CR>:'a,.s/\*\//@&/e<CR>:'y,'zs/^\( *\) @/\1@/e<CR>'zk<Leader>tW@:'y,'zs/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
-map <silent> <Leader>adcom <SID>WS:'a,.v/^\s*\/[/*]/s/\/[*/]\*\=/@&@/e<CR>:'a,.v/^\s*\/[/*]/s/\*\//@&/e<CR>:'y,'zv/^\s*\/[/*]/s/^\( *\) @/\1@/e<CR>'zk<Leader>tdW@:'y,'zv/^\s*\/[/*]/s/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
-map <silent> <Leader>aocom :AlignPush<CR>:AlignCtrl g /[*/]<CR><Leader>acom:AlignPop<CR>
-map <silent> <Leader>ascom <SID>WS:'a,.s/\/[*/]/@&@/e<CR>:'a,.s/\*\//@&/e<CR>:silent! 'a,.g/^\s*@\/[*/]/s/@//ge<CR>:AlignCtrl v ^\s*\/[*/]<CR>:AlignCtrl g \/[*/]<CR>'zk<Leader>tW@:'y,'zs/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
-map <silent> <Leader>adec <SID>WS:'a,'zs/\([^ \t/(]\)\([*&]\)/\1 \2/e<CR>:'y,'zv/^\//s/\([^ \t]\)\s\+/\1 /ge<CR>:'y,'zv/^\s*[*/]/s/\([^/][*&]\)\s\+/\1/ge<CR>:'y,'zv/^\s*[*/]/s/^\(\s*\%(\K\k*\s\+\%([a-zA-Z_*(&]\)\@=\)\+\)\([*(&]*\)\s*\([a-zA-Z0-9_()]\+\)\s*\(\(\[.\{-}]\)*\)\s*\(=\)\=\s*\(.\{-}\)\=\s*;/\1@\2#@\3\4@\6@\7;@/e<CR>:'y,'zv/^\s*[*/]/s/\*\/\s*$/@*\//e<CR>:'y,'zv/^\s*[*/]/s/^\s\+\*/@@@@@* /e<CR>:'y,'zv/^\s*[*/]/s/^@@@@@\*\(.*[^*/]\)$/&@*/e<CR>'yjma'zk:AlignCtrl v ^\s*[*/#]<CR><Leader>t@:'y,'zv/^\s*[*/]/s/@ //ge<CR>:'y,'zv/^\s*[*/]/s/\(\s*\);/;\1/e<CR>:'y,'zv/^#/s/# //e<CR>:'y,'zv/^\s\+[*/#]/s/\([^/*]\)\(\*\+\)\( \+\)/\1\3\2/e<CR>:'y,'zv/^\s\+[*/#]/s/\((\+\)\( \+\)\*/\2\1*/e<CR>:'y,'zv/^\s\+[*/#]/s/^\(\s\+\) \*/\1*/e<CR>:'y,'zv/^\s\+[*/#]/s/[ \t@]*$//e<CR>:'y,'zs/^[*]/ */e<CR><SID>WE
-map <silent> <Leader>adef <SID>WS:AlignPush<CR>:AlignCtrl v ^\s*\(\/\*\<bar>\/\/\)<CR>:'a,.v/^\s*\(\/\*\<bar>\/\/\)/s/^\(\s*\)#\(\s\)*define\s*\(\I[a-zA-Z_0-9(),]*\)\s*\(.\{-}\)\($\<Bar>\/\*\)/#\1\2define @\3@\4@\5/e<CR>:'a,.v/^\s*\(\/\*\<bar>\/\/\)/s/\($\<Bar>\*\/\)/@&/e<CR>'zk<Leader>t@'yjma'zk:'a,.v/^\s*\(\/\*\<bar>\/\/\)/s/ @//g<CR><SID>WE
-map <silent> <Leader>afnc :set lz<CR>:silent call <SID>Afnc()<CR>:set nolz<CR>
+map <Leader>a? <SID>a?
+noremap <script> <silent> <SID>a? <SID>WS:AlignCtrl mIp1P1lC ? : : : : <CR>:'a,.Align<CR>:'a,'z-1s/\(\s\+\)? /?\1/e<CR><SID>WE
+map <Leader>a, <SID>a,
+noremap <script> <silent> <SID>a, <SID>WS:'y,'zs/\(\S\)\s\+/\1 /ge<CR>'yjma'zk<SID>jnr,<CR>:silent 'y,'zg/,/call <SID>FixMultiDec()<CR>'z<SID>adec<SID>WE
+map <Leader>a< <SID>a<
+noremap <script> <silent> <SID>a< <SID>WS:AlignCtrl mIp1P1=l << >><CR>:'a,.Align<CR><SID>WE
+map <Leader>a= <SID>a=
+noremap <script> <silent> <SID>a= <SID>WS:AlignCtrl mIp1P1=l<CR>:AlignCtrl g :=<CR>:'a,'zAlign :\==<CR><SID>WE
+map <Leader>abox <SID>abox
+noremap <script> <silent> <SID>abox <SID>WS:let g:alignmaps_iws=substitute(getline("'a"),'^\(\s*\).*$','\1','e')<CR>:'a,'z-1s/^\s\+//e<CR>:'a,'z-1s/^.*$/@&@/<CR>:AlignCtrl m=p01P0w @<CR>:'a,.Align<CR>:'a,'z-1s/@/ * /<CR>:'a,'z-1s/@$/*/<CR>'aYP:s/./*/g<CR>0r/'zkYp:s/./*/g<CR>0r A/<Esc>:exe "'a-1,'z-1s/^/".g:alignmaps_iws."/e"<CR><SID>WE
+map <Leader>acom <SID>acom
+noremap <script> <silent> <SID>acom <SID>WS:'a,.s/\/[*/]\/\=/@&@/e<CR>:'a,.s/\*\//@&/e<CR>:'y,'zs/^\( *\) @/\1@/e<CR>'zk<SID>tW@:'y,'zs/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
+noremap <script> <silent> <Leader>adcom <SID>WS:'a,.v/^\s*\/[/*]/s/\/[*/]\*\=/@&@/e<CR>:'a,.v/^\s*\/[/*]/s/\*\//@&/e<CR>:'y,'zv/^\s*\/[/*]/s/^\( *\) @/\1@/e<CR>'zk<SID>tdW@:'y,'zv/^\s*\/[/*]/s/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
+map <Leader>aocom <SID>aocom
+noremap <script> <silent> <SID>aocom :AlignPush<CR>:AlignCtrl g /[*/]<CR><SID>acom:AlignPop<CR>
+map <Leader>ascom <SID>ascom
+noremap <script> <silent> <SID>ascom <SID>WS:'a,.s/\/[*/]/@&@/e<CR>:'a,.s/\*\//@&/e<CR>:silent! 'a,.g/^\s*@\/[*/]/s/@//ge<CR>:AlignCtrl v ^\s*\/[*/]<CR>:AlignCtrl g \/[*/]<CR>'zk<SID>tW@:'y,'zs/^\(\s*\) @/\1/e<CR>:'y,'zs/ @//eg<CR><SID>WE
+map <Leader>adec <SID>adec
+noremap <script> <silent> <SID>adec <SID>WS:'a,'zs/\([^ \t/(]\)\([*&]\)/\1 \2/e<CR>:'y,'zv/^\//s/\([^ \t]\)\s\+/\1 /ge<CR>:'y,'zv/^\s*[*/]/s/\([^/][*&]\)\s\+/\1/ge<CR>:'y,'zv/^\s*[*/]/s/^\(\s*\%(\K\k*\s\+\%([a-zA-Z_*(&]\)\@=\)\+\)\([*(&]*\)\s*\([a-zA-Z0-9_()]\+\)\s*\(\(\[.\{-}]\)*\)\s*\(=\)\=\s*\(.\{-}\)\=\s*;/\1@\2#@\3\4@\6@\7;@/e<CR>:'y,'zv/^\s*[*/]/s/\*\/\s*$/@*\//e<CR>:'y,'zv/^\s*[*/]/s/^\s\+\*/@@@@@* /e<CR>:'y,'zv/^\s*[*/]/s/^@@@@@\*\(.*[^*/]\)$/&@*/e<CR>'yjma'zk:AlignCtrl v ^\s*[*/#]<CR><SID>t@:'y,'zv/^\s*[*/]/s/@ //ge<CR>:'y,'zv/^\s*[*/]/s/\(\s*\);/;\1/e<CR>:'y,'zv/^#/s/# //e<CR>:'y,'zv/^\s\+[*/#]/s/\([^/*]\)\(\*\+\)\( \+\)/\1\3\2/e<CR>:'y,'zv/^\s\+[*/#]/s/\((\+\)\( \+\)\*/\2\1*/e<CR>:'y,'zv/^\s\+[*/#]/s/^\(\s\+\) \*/\1*/e<CR>:'y,'zv/^\s\+[*/#]/s/[ \t@]*$//e<CR>:'y,'zs/^[*]/ */e<CR><SID>WE
+map <Leader>adef <SID>adef
+noremap <script> <silent> <SID>adef <SID>WS:AlignPush<CR>:AlignCtrl v ^\s*\(\/\*\<bar>\/\/\)<CR>:'a,.v/^\s*\(\/\*\<bar>\/\/\)/s/^\(\s*\)#\(\s\)*define\s*\(\I[a-zA-Z_0-9(),]*\)\s*\(.\{-}\)\($\<Bar>\/\*\)/#\1\2define @\3@\4@\5/e<CR>:'a,.v/^\s*\(\/\*\<bar>\/\/\)/s/\($\<Bar>\*\/\)/@&/e<CR>'zk<SID>t@'yjma'zk:'a,.v/^\s*\(\/\*\<bar>\/\/\)/s/ @//g<CR><SID>WE
+map <Leader>afnc <SID>afnc
+noremap <script> <silent> <SID>afnc :set lz<CR>:silent call <SID>Afnc()<CR>:set nolz<CR>
if exists("g:alignmaps_usanumber")
-" map <silent> <Leader>anum <SID>WS
+" noremap <script> <silent> <Leader>anum <SID>WS
" \:'a,'zs/\([-+]\)\=\(\d\+\%([eE][-+]\=\d\+\)\=\)\ze\%($\|[^@]\)/@\1@\2@@#/ge<CR>
" \:'a,'zs/\([-+]\)\=\(\d*\)\(\.\)\(\d*\([eE][-+]\=\d\+\)\=\)/@\1@\2@\3@\4#/ge<CR>
" \:AlignCtrl mp0P0r<CR>
@@ -212,7 +223,8 @@
" \:'a,'zs/@//ge<CR>
" \:'a,'zs/#/ /ge<CR>
" \<SID>WE
- map <silent> <Leader>anum <SID>WS:'a,'zs/\([0-9.]\)\s\+\zs\([-+]\=\d\)/@\1/ge<CR>
+ map <Leader>anum <SID>anum
+ noremap <script> <silent> <SID>anum <SID>WS:'a,'zs/\([0-9.]\)\s\+\zs\([-+]\=\d\)/@\1/ge<CR>
\:'a,'zs/\.@/\.0@/ge<CR>
\:AlignCtrl mp0P0r<CR>
\:'a,'zAlign [.@]<CR>
@@ -221,103 +233,132 @@
\:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR>
\<SID>WE
elseif exists("g:alignmaps_euronumber")
- map <silent> <Leader>anum <SID>WS:'a,'zs/\([0-9.]\)\s\+\([-+]\=\d\)/\1@\2/ge<CR>:'a,'zs/\.@/\.0@/ge<CR>:AlignCtrl mp0P0r<CR>:'a,'zAlign [,@]<CR>:'a,'zs/@/ /ge<CR>:'a,'zs/\(,\)\(\s\+\)\([-0-9.,eE+]\+\)/\1\3\2/ge<CR>:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR><SID>WE
+ map <Leader>anum <SID>anum
+ noremap <script> <silent> <SID>anum <SID>WS:'a,'zs/\([0-9.]\)\s\+\([-+]\=\d\)/\1@\2/ge<CR>:'a,'zs/\.@/\.0@/ge<CR>:AlignCtrl mp0P0r<CR>:'a,'zAlign [,@]<CR>:'a,'zs/@/ /ge<CR>:'a,'zs/\(,\)\(\s\+\)\([-0-9.,eE+]\+\)/\1\3\2/ge<CR>:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR><SID>WE
else
- map <silent> <Leader>anum <SID>WS:'a,'zs/\([0-9.]\)\s\+\([-+]\=[.,]\=\d\)/\1@\2/ge<CR>:'a,'zs/\.@/\.0@/ge<CR>:AlignCtrl mp0P0<CR>:'a,'zAlign [.,@]<CR>:'a,'zs/\([-0-9.,]*\)\(\s*\)\([.,]\)/\2\1\3/g<CR>:'a,'zs/@/ /ge<CR>:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR><SID>WE
+ map <Leader>anum <SID>anum
+ noremap <script> <silent> <SID>anum <SID>WS:'a,'zs/\([0-9.]\)\s\+\([-+]\=[.,]\=\d\)/\1@\2/ge<CR>:'a,'zs/\.@/\.0@/ge<CR>:AlignCtrl mp0P0<CR>:'a,'zAlign [.,@]<CR>:'a,'zs/\([-0-9.,]*\)\(\s*\)\([.,]\)/\2\1\3/g<CR>:'a,'zs/@/ /ge<CR>:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR><SID>WE
endif
-map <silent> <Leader>aunum <SID>WS:'a,'zs/\([0-9.]\)\s\+\([-+]\=\d\)/\1@\2/ge<CR>:'a,'zs/\.@/\.0@/ge<CR>:AlignCtrl mp0P0r<CR>:'a,'zAlign [.@]<CR>:'a,'zs/@/ /ge<CR>:'a,'zs/\(\.\)\(\s\+\)\([-0-9.,eE+]\+\)/\1\3\2/ge<CR>:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR><SID>WE
-map <silent> <Leader>aenum <SID>WS:'a,'zs/\([0-9.]\)\s\+\([-+]\=\d\)/\1@\2/ge<CR>:'a,'zs/\.@/\.0@/ge<CR>:AlignCtrl mp0P0r<CR>:'a,'zAlign [,@]<CR>:'a,'zs/@/ /ge<CR>:'a,'zs/\(,\)\(\s\+\)\([-0-9.,eE+]\+\)/\1\3\2/ge<CR>:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR><SID>WE
+noremap <script> <silent> <Leader>aunum <SID>WS:'a,'zs/\([0-9.]\)\s\+\([-+]\=\d\)/\1@\2/ge<CR>:'a,'zs/\.@/\.0@/ge<CR>:AlignCtrl mp0P0r<CR>:'a,'zAlign [.@]<CR>:'a,'zs/@/ /ge<CR>:'a,'zs/\(\.\)\(\s\+\)\([-0-9.,eE+]\+\)/\1\3\2/ge<CR>:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR><SID>WE
+noremap <script> <silent> <Leader>aenum <SID>WS:'a,'zs/\([0-9.]\)\s\+\([-+]\=\d\)/\1@\2/ge<CR>:'a,'zs/\.@/\.0@/ge<CR>:AlignCtrl mp0P0r<CR>:'a,'zAlign [,@]<CR>:'a,'zs/@/ /ge<CR>:'a,'zs/\(,\)\(\s\+\)\([-0-9.,eE+]\+\)/\1\3\2/ge<CR>:'a,'zs/\([eE]\)\(\s\+\)\([0-9+\-+]\+\)/\1\3\2/ge<CR><SID>WE
" ---------------------------------------------------------------------
" html table alignment {{{1
-map <silent> <Leader>Htd <SID>WS:'y,'zs%<[tT][rR]><[tT][dD][^>]\{-}>\<Bar></[tT][dD]><[tT][dD][^>]\{-}>\<Bar></[tT][dD]></[tT][rR]>%@&@%g<CR>'yjma'zk:AlignCtrl m=Ilp1P0 @<CR>:'a,.Align<CR>:'y,'zs/ @/@/<CR>:'y,'zs/@ <[tT][rR]>/<[tT][rR]>/ge<CR>:'y,'zs/@//ge<CR><SID>WE
+map <Leader>Htd <SID>Htd
+noremap <script> <silent> <SID>Htd <SID>WS:'y,'zs%<[tT][rR]><[tT][dD][^>]\{-}>\<Bar></[tT][dD]><[tT][dD][^>]\{-}>\<Bar></[tT][dD]></[tT][rR]>%@&@%g<CR>'yjma'zk:AlignCtrl m=Ilp1P0 @<CR>:'a,.Align<CR>:'y,'zs/ @/@/<CR>:'y,'zs/@ <[tT][rR]>/<[tT][rR]>/ge<CR>:'y,'zs/@//ge<CR><SID>WE
" ---------------------------------------------------------------------
" character-based right-justified alignment maps {{{1
-map <silent> <Leader>T| <SID>WS:AlignCtrl mIp0P0=r <Bar><CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>T# <SID>WS:AlignCtrl mIp0P0=r #<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>T, <SID>WS:AlignCtrl mIp0P1=r ,<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>Ts, <SID>WS:AlignCtrl mIp0P1=r ,<CR>:'a,.Align<CR>:'a,.s/\(\s*\),/,\1/ge<CR><SID>WE
-map <silent> <Leader>T: <SID>WS:AlignCtrl mIp1P1=r :<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>T; <SID>WS:AlignCtrl mIp0P0=r ;<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>T< <SID>WS:AlignCtrl mIp0P0=r <<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>T= <SID>WS:'a,'z-1s/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'z-1s@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'z-1s/; */;@/e<CR>:'a,'z-1s/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'z-1s/!=/\x="!\<Char-0xff>"/ge<CR>:AlignCtrl mIp1P1=r = @<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s/; *@/;/e<CR>:'a,'z-1s/; *$/;/e<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-1s/\xff/=/ge<CR><SID>WE<Leader>acom
-map <silent> <Leader>T? <SID>WS:AlignCtrl mIp0P0=r ?<CR>:'a,.Align<CR>:'y,'zs/ \( *\);/;\1/ge<CR><SID>WE
-map <silent> <Leader>T@ <SID>WS:AlignCtrl mIp0P0=r @<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>Tab <SID>WS:'a,.s/^\(\t*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\t','@','g'),'\')/<CR>:AlignCtrl mI=r @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE
-map <silent> <Leader>Tsp <SID>WS:'a,.s/^\(\s*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\s\+','@','g'),'\')/<CR>:AlignCtrl mI=r @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE
-map <silent> <Leader>T~ <SID>WS:AlignCtrl mIp0P0=r ~<CR>:'a,.Align<CR>:'y,'zs/ \( *\);/;\1/ge<CR><SID>WE
+map <Leader>T| <SID>T|
+noremap <script> <silent> <SID>T| <SID>WS:AlignCtrl mIp0P0=r <Bar><CR>:'a,.Align<CR><SID>WE
+noremap <script> <silent> <Leader>T# <SID>WS:AlignCtrl mIp0P0=r #<CR>:'a,.Align<CR><SID>WE
+map <Leader>T, <SID>T,
+noremap <script> <silent> <SID>T, <SID>WS:AlignCtrl mIp0P1=r ,<CR>:'a,.Align<CR><SID>WE
+map <Leader>Ts, <SID>Ts,
+noremap <script> <silent> <SID>Ts, <SID>WS:AlignCtrl mIp0P1=r ,<CR>:'a,.Align<CR>:'a,.s/\(\s*\),/,\1/ge<CR><SID>WE
+map <Leader>T: <SID>T:
+noremap <script> <silent> <SID>T: <SID>WS:AlignCtrl mIp1P1=r :<CR>:'a,.Align<CR><SID>WE
+noremap <script> <silent> <Leader>T; <SID>WS:AlignCtrl mIp0P0=r ;<CR>:'a,.Align<CR><SID>WE
+map <Leader>T< <SID>T<
+noremap <script> <silent> <SID>T< <SID>WS:AlignCtrl mIp0P0=r <<CR>:'a,.Align<CR><SID>WE
+map <Leader>T= <SID>T=
+noremap <script> <silent> <SID>T= <SID>WS:'a,'z-1s/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'z-1s@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'z-1s/; */;@/e<CR>:'a,'z-1s/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'z-1s/!=/\x="!\<Char-0xff>"/ge<CR>:AlignCtrl mIp1P1=r = @<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s/; *@/;/e<CR>:'a,'z-1s/; *$/;/e<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-1s/\xff/=/ge<CR><SID>WE<SID>acom
+noremap <script> <silent> <Leader>T? <SID>WS:AlignCtrl mIp0P0=r ?<CR>:'a,.Align<CR>:'y,'zs/ \( *\);/;\1/ge<CR><SID>WE
+map <Leader>T@ <SID>T@
+noremap <script> <silent> <SID>T@ <SID>WS:AlignCtrl mIp0P0=r @<CR>:'a,.Align<CR><SID>WE
+noremap <script> <silent> <Leader>Tab <SID>WS:'a,.s/^\(\t*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\t','@','g'),'\')/<CR>:AlignCtrl mI=r @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE
+map <Leader>Tsp <SID>Tsp
+noremap <script> <silent> <SID>Tsp <SID>WS:'a,.s/^\(\s*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\s\+','@','g'),'\')/<CR>:AlignCtrl mI=r @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE
+noremap <script> <silent> <Leader>T~ <SID>WS:AlignCtrl mIp0P0=r ~<CR>:'a,.Align<CR>:'y,'zs/ \( *\);/;\1/ge<CR><SID>WE
" ---------------------------------------------------------------------
" character-based left-justified alignment maps {{{1
-map <silent> <Leader>t| <SID>WS:AlignCtrl mIp0P0=l <Bar><CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>t# <SID>WS:AlignCtrl mIp0P0=l #<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>t, <SID>WS:AlignCtrl mIp0P1=l ,<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>ts, <SID>WS:AlignCtrl mIp0P1=l ,<CR>:'a,.Align<CR>:'a,.s/\(\s*\),/,\1/ge<CR><SID>WE
-map <silent> <Leader>t: <SID>WS:AlignCtrl mIp1P1=l :<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>t; <SID>WS:AlignCtrl mIp0P1=l ;<CR>:'a,.Align<CR>:'y,'zs/\( *\);/;\1/ge<CR><SID>WE
-map <silent> <Leader>t< <SID>WS:AlignCtrl mIp0P0=l <<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>t= <SID>WS:call <SID>Equals()<CR><SID>WE
-map <silent> <Leader>w= <SID>WS:'a,'zg/=/s/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zg/=/s@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zg/=/s/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'zg/=/s/!=/\="!\<Char-0xff>"/ge<CR>'zk:AlignCtrl mWp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1g/=/Align<CR>:'a,'z-1g/=/s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1g/=/s/\( \+\);/;\1/ge<CR>:'a,'z-1v/^\s*\/[*/]/s/\/[*/]/@&@/e<CR>:'a,'z-1v/^\s*\/[*/]/s/\*\//@&/e<CR>'zk<Leader>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1g/=/s/\xff/=/ge<CR>:'y,'zg/=/s/ @//eg<CR><SID>WE
-map <silent> <Leader>t? <SID>WS:AlignCtrl mIp0P0=l ?<CR>:'a,.Align<CR>:.,'zs/ \( *\);/;\1/ge<CR><SID>WE
-map <silent> <Leader>t~ <SID>WS:AlignCtrl mIp0P0=l ~<CR>:'a,.Align<CR>:'y,'zs/ \( *\);/;\1/ge<CR><SID>WE
-map <silent> <Leader>m= <SID>WS:'a,'zs/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zs@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zs/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'zs/!=/\="!\<Char-0xff>"/ge<CR>'zk:AlignCtrl mIp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-s/%\ze[^=]/ @%@ /e<CR>'zk<Leader>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1s/\xff/=/ge<CR>:'y,'zs/ @//eg<CR><SID>WE
-map <silent> <Leader>tab <SID>WS:'a,.s/^\(\t*\)\(.*\)$/\=submatch(1).escape(substitute(submatch(2),'\t',"\<Char-0xff>",'g'),'\')/<CR>:if &ts == 1<bar>exe "AlignCtrl mI=lp0P0 \<Char-0xff>"<bar>else<bar>exe "AlignCtrl mI=l \<Char-0xff>"<bar>endif<CR>:'a,.Align<CR>:exe "'y+1,'z-1s/\<Char-0xff>/".((&ts == 1)? '\t' : ' ')."/g"<CR><SID>WE
-map <silent> <Leader>tml <SID>WS:AlignCtrl mWp1P0=l \\\@<!\\\s*$<CR>:'a,.Align<CR><SID>WE
-map <silent> <Leader>tsp <SID>WS:'a,.s/^\(\s*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\s\+','@','g'),'\')/<CR>:AlignCtrl mI=lp0P0 @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE
-map <silent> <Leader>tsq <SID>WS:'a,.AlignReplaceQuotedSpaces<CR>:'a,.s/^\(\s*\)\(.*\)/\=submatch(1).substitute(submatch(2),'\s\+','@','g')/<CR>:AlignCtrl mIp0P0=l @<CR>:'a,.Align<CR>:'y+1,'z-1s/[%@]/ /g<CR><SID>WE
-map <silent> <Leader>tt <SID>WS:AlignCtrl mIp1P1=l \\\@<!& \\\\<CR>:'a,.Align<CR><SID>WE
+map <Leader>t| <SID>t|
+noremap <script> <silent> <SID>t| <SID>WS:AlignCtrl mIp0P0=l <Bar><CR>:'a,.Align<CR><SID>WE
+noremap <script> <silent> <Leader>t# <SID>WS:AlignCtrl mIp0P0=l #<CR>:'a,.Align<CR><SID>WE
+map <Leader>t, <SID>t,
+noremap <script> <silent> <SID>t, <SID>WS:AlignCtrl mIp0P1=l ,<CR>:'a,.Align<CR><SID>WE
+map <Leader>ts, <SID>ts,
+noremap <script> <silent> <SID>ts, <SID>WS:AlignCtrl mIp0P1=l ,<CR>:'a,.Align<CR>:'a,.s/\(\s*\),/,\1/ge<CR><SID>WE
+map <Leader>t: <SID>t:
+noremap <script> <silent> <SID>t: <SID>WS:AlignCtrl mIp1P1=l :<CR>:'a,.Align<CR><SID>WE
+map <Leader>t; <SID>t;
+noremap <script> <silent> <SID>t; <SID>WS:AlignCtrl mIp0P1=l ;<CR>:'a,.Align<CR>:'y,'zs/\( *\);/;\1/ge<CR><SID>WE
+map <Leader>t< <SID>t<
+noremap <script> <silent> <SID>t< <SID>WS:AlignCtrl mIp0P0=l <<CR>:'a,.Align<CR><SID>WE
+map <Leader>t= <SID>t=
+noremap <script> <silent> <SID>t= <SID>WS:call <SID>Equals()<CR><SID>WE
+noremap <script> <silent> <Leader>w= <SID>WS:'a,'zg/=/s/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zg/=/s@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zg/=/s/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'zg/=/s/!=/\="!\<Char-0xff>"/ge<CR>'zk:AlignCtrl mWp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1g/=/Align<CR>:'a,'z-1g/=/s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1g/=/s/\( \+\);/;\1/ge<CR>:'a,'z-1v/^\s*\/[*/]/s/\/[*/]/@&@/e<CR>:'a,'z-1v/^\s*\/[*/]/s/\*\//@&/e<CR>'zk<SID>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1g/=/s/\xff/=/ge<CR>:'y,'zg/=/s/ @//eg<CR><SID>WE
+map <Leader>t? <SID>t?
+noremap <script> <silent> <SID>t? <SID>WS:AlignCtrl mIp0P0=l ?<CR>:'a,.Align<CR>:.,'zs/ \( *\);/;\1/ge<CR><SID>WE
+noremap <script> <silent> <Leader>t~ <SID>WS:AlignCtrl mIp0P0=l ~<CR>:'a,.Align<CR>:'y,'zs/ \( *\);/;\1/ge<CR><SID>WE
+noremap <script> <silent> <Leader>m= <SID>WS:'a,'zs/\s\+\([*/+\-%<Bar>&\~^]\==\)/ \1/e<CR>:'a,'zs@ \+\([*/+\-%<Bar>&\~^]\)=@\1=@ge<CR>:'a,'zs/==/\="\<Char-0xff>\<Char-0xff>"/ge<CR>:'a,'zs/!=/\="!\<Char-0xff>"/ge<CR>'zk:AlignCtrl mIp1P1=l =<CR>:AlignCtrl g =<CR>:'a,'z-1Align<CR>:'a,'z-1s@\([*/+\-%<Bar>&\~^!=]\)\( \+\)=@\2\1=@ge<CR>:'a,'z-1s/\( \+\);/;\1/ge<CR>:'a,'z-s/%\ze[^=]/ @%@ /e<CR>'zk<SID>t@:'y,'zs/^\(\s*\) @/\1/e<CR>:'a,'z-1s/\xff/=/ge<CR>:'y,'zs/ @//eg<CR><SID>WE
+map <Leader>tab <SID>tab
+noremap <script> <silent> <SID>tab <SID>WS:'a,.s/^\(\t*\)\(.*\)$/\=submatch(1).escape(substitute(submatch(2),'\t',"\<Char-0xff>",'g'),'\')/<CR>:if &ts == 1<bar>exe "AlignCtrl mI=lp0P0 \<Char-0xff>"<bar>else<bar>exe "AlignCtrl mI=l \<Char-0xff>"<bar>endif<CR>:'a,.Align<CR>:exe "'y+1,'z-1s/\<Char-0xff>/".((&ts == 1)? '\t' : ' ')."/g"<CR><SID>WE
+map <Leader>tml <SID>tml
+noremap <script> <silent> <SID>tml <SID>WS:AlignCtrl mWp1P0=l \\\@<!\\\s*$<CR>:'a,.Align<CR><SID>WE
+map <Leader>tsp <SID>tsp
+noremap <script> <silent> <SID>tsp <SID>WS:'a,.s/^\(\s*\)\(.*\)/\=submatch(1).escape(substitute(submatch(2),'\s\+','@','g'),'\')/<CR>:AlignCtrl mI=lp0P0 @<CR>:'a,.Align<CR>:'y+1,'z-1s/@/ /g<CR><SID>WE
+map <Leader>tsq <SID>tsq
+noremap <script> <silent> <SID>tsq <SID>WS:'a,.AlignReplaceQuotedSpaces<CR>:'a,.s/^\(\s*\)\(.*\)/\=submatch(1).substitute(submatch(2),'\s\+','@','g')/<CR>:AlignCtrl mIp0P0=l @<CR>:'a,.Align<CR>:'y+1,'z-1s/[%@]/ /g<CR><SID>WE
+map <Leader>tt <SID>tt
+noremap <script> <silent> <SID>tt <SID>WS:AlignCtrl mIp1P1=l \\\@<!& \\\\<CR>:'a,.Align<CR><SID>WE
" ---------------------------------------------------------------------
" plain Align maps; these two are used in <Leader>acom..\afnc {{{1
-map <silent> <Leader>t@ :AlignCtrl mIp1P1=l @<CR>:'a,.Align<CR>
-map <silent> <Leader>tW@ :AlignCtrl mWp1P1=l @<CR>:'a,.Align<CR>
-map <silent> <Leader>tdW@ :AlignCtrl v ^\s*/[/*]<CR>:AlignCtrl mWp1P1=l @<CR>:'a,.Align<CR>
+map <Leader>t@ <SID>t@
+noremap <silent> <SID>t@ :AlignCtrl mIp1P1=l @<CR>:'a,.Align<CR>
+map <Leader>tW@ <SID>tW@
+noremap <silent> <SID>tW@ :AlignCtrl mWp1P1=l @<CR>:'a,.Align<CR>
+map <Leader>tdW@ <SID>tdW@
+noremap <silent> <Leader>tdW@ :AlignCtrl v ^\s*/[/*]<CR>:AlignCtrl mWp1P1=l @<CR>:'a,.Align<CR>
" ---------------------------------------------------------------------
" Joiner : maps used above {{{1
-map <silent> <Leader>jnr= :call <SID>CharJoiner("=")<CR>
-map <silent> <Leader>jnr, :call <SID>CharJoiner(",")<CR>
+noremap <script> <silent> <Leader>jnr= :call <SID>CharJoiner("=")<CR>
+map <Leader>jnr, <SID>jnr,
+noremap <silent> <SID>jnr, :call <SID>CharJoiner(",")<CR>
" ---------------------------------------------------------------------
" visual-line mode variants: {{{1
-vmap <silent> <Leader>T| :<BS><BS><BS><CR>ma'><Leader>T|
-vmap <silent> <Leader>T, :<BS><BS><BS><CR>ma'><Leader>T,
-vmap <silent> <Leader>Ts, :<BS><BS><BS><CR>ma'><Leader>Ts,
-vmap <silent> <Leader>T: :<BS><BS><BS><CR>ma'><Leader>T:
-vmap <silent> <Leader>T< :<BS><BS><BS><CR>ma'><Leader>T<
-vmap <silent> <Leader>T= :<BS><BS><BS><CR>ma'><Leader>T=
-vmap <silent> <Leader>T@ :<BS><BS><BS><CR>ma'><Leader>T@
-vmap <silent> <Leader>Tsp :<BS><BS><BS><CR>ma'><Leader>Tsp
-vmap <silent> <Leader>a? :<BS><BS><BS><CR>ma'><Leader>a?
-vmap <silent> <Leader>a, :<BS><BS><BS><CR>ma'><Leader>a,
-vmap <silent> <Leader>a< :<BS><BS><BS><CR>ma'><Leader>a<
-vmap <silent> <Leader>a= :<BS><BS><BS><CR>ma'><Leader>a=
-vmap <silent> <Leader>abox :<BS><BS><BS><CR>ma'><Leader>abox
-vmap <silent> <Leader>acom :<BS><BS><BS><CR>ma'><Leader>acom
-vmap <silent> <Leader>aocom :<BS><BS><BS><CR>ma'><Leader>aocom
-vmap <silent> <Leader>ascom :<BS><BS><BS><CR>ma'><Leader>ascom
-vmap <silent> <Leader>adec :<BS><BS><BS><CR>ma'><Leader>adec
-vmap <silent> <Leader>adef :<BS><BS><BS><CR>ma'><Leader>adef
-vmap <silent> <Leader>afnc :<BS><BS><BS><CR>ma'><Leader>afnc
-vmap <silent> <Leader>anum :<BS><BS><BS><CR>ma'><Leader>anum
-"vmap <silent> <Leader>anum :B s/\(\d\)\s\+\(-\=[.,]\=\d\)/\1@\2/ge<CR>:AlignCtrl mp0P0<CR>gv:Align [.,@]<CR>:'<,'>s/\([-0-9.,]*\)\(\s\+\)\([.,]\)/\2\1\3/ge<CR>:'<,'>s/@/ /ge<CR>
-vmap <silent> <Leader>t| :<BS><BS><BS><CR>ma'><Leader>t|
-vmap <silent> <Leader>t, :<BS><BS><BS><CR>ma'><Leader>t,
-vmap <silent> <Leader>ts, :<BS><BS><BS><CR>ma'><Leader>ts,
-vmap <silent> <Leader>t: :<BS><BS><BS><CR>ma'><Leader>t:
-vmap <silent> <Leader>t; :<BS><BS><BS><CR>ma'><Leader>t;
-vmap <silent> <Leader>t< :<BS><BS><BS><CR>ma'><Leader>t<
-vmap <silent> <Leader>t= :<BS><BS><BS><CR>ma'><Leader>t=
-vmap <silent> <Leader>t? :<BS><BS><BS><CR>ma'><Leader>t?
-vmap <silent> <Leader>t@ :<BS><BS><BS><CR>ma'><Leader>t@
-vmap <silent> <Leader>tab :<BS><BS><BS><CR>ma'><Leader>tab
-vmap <silent> <Leader>tml :<BS><BS><BS><CR>ma'><Leader>tml
-vmap <silent> <Leader>tsp :<BS><BS><BS><CR>ma'><Leader>tsp
-vmap <silent> <Leader>tsq :<BS><BS><BS><CR>ma'><Leader>tsq
-vmap <silent> <Leader>tp@ :<BS><BS><BS><CR>ma'><Leader>tp@
-vmap <silent> <Leader>tt :<BS><BS><BS><CR>ma'><Leader>tt
-vmap <silent> <Leader>Htd :<BS><BS><BS><CR>ma'><Leader>Htd
+vnoremap <script> <silent> <Leader>T| :<BS><BS><BS><CR>ma'><SID>T|
+vnoremap <script> <silent> <Leader>T, :<BS><BS><BS><CR>ma'><SID>T,
+vnoremap <script> <silent> <Leader>Ts, :<BS><BS><BS><CR>ma'><SID>Ts,
+vnoremap <script> <silent> <Leader>T: :<BS><BS><BS><CR>ma'><SID>T:
+vnoremap <script> <silent> <Leader>T< :<BS><BS><BS><CR>ma'><SID>T<
+vnoremap <script> <silent> <Leader>T= :<BS><BS><BS><CR>ma'><SID>T=
+vnoremap <script> <silent> <Leader>T@ :<BS><BS><BS><CR>ma'><SID>T@
+vnoremap <script> <silent> <Leader>Tsp :<BS><BS><BS><CR>ma'><SID>Tsp
+vnoremap <script> <silent> <Leader>a? :<BS><BS><BS><CR>ma'><SID>a?
+vnoremap <script> <silent> <Leader>a, :<BS><BS><BS><CR>ma'><SID>a,
+vnoremap <script> <silent> <Leader>a< :<BS><BS><BS><CR>ma'><SID>a<
+vnoremap <script> <silent> <Leader>a= :<BS><BS><BS><CR>ma'><SID>a=
+vnoremap <script> <silent> <Leader>abox :<BS><BS><BS><CR>ma'><SID>abox
+vmap <Leader>acom <SID>acom
+vnoremap <script> <silent> <SID>acom :<BS><BS><BS><CR>ma'><SID>acom
+vnoremap <script> <silent> <Leader>aocom :<BS><BS><BS><CR>ma'><SID>aocom
+vnoremap <script> <silent> <Leader>ascom :<BS><BS><BS><CR>ma'><SID>ascom
+vnoremap <script> <silent> <Leader>adec :<BS><BS><BS><CR>ma'><SID>adec
+vnoremap <script> <silent> <Leader>adef :<BS><BS><BS><CR>ma'><SID>adef
+vnoremap <script> <silent> <Leader>afnc :<BS><BS><BS><CR>ma'><SID>afnc
+vnoremap <script> <silent> <Leader>anum :<BS><BS><BS><CR>ma'><SID>anum
+"vnoremap <script> <silent> <Leader>anum :B s/\(\d\)\s\+\(-\=[.,]\=\d\)/\1@\2/ge<CR>:AlignCtrl mp0P0<CR>gv:Align [.,@]<CR>:'<,'>s/\([-0-9.,]*\)\(\s\+\)\([.,]\)/\2\1\3/ge<CR>:'<,'>s/@/ /ge<CR>
+vnoremap <script> <silent> <Leader>t| :<BS><BS><BS><CR>ma'><SID>t|
+vnoremap <script> <silent> <Leader>t, :<BS><BS><BS><CR>ma'><SID>t,
+vnoremap <script> <silent> <Leader>ts, :<BS><BS><BS><CR>ma'><SID>ts,
+vnoremap <script> <silent> <Leader>t: :<BS><BS><BS><CR>ma'><SID>t:
+vnoremap <script> <silent> <Leader>t; :<BS><BS><BS><CR>ma'><SID>t;
+vnoremap <script> <silent> <Leader>t< :<BS><BS><BS><CR>ma'><SID>t<
+vnoremap <script> <silent> <Leader>t= :<BS><BS><BS><CR>ma'><SID>t=
+vnoremap <script> <silent> <Leader>t? :<BS><BS><BS><CR>ma'><SID>t?
+vnoremap <script> <silent> <Leader>t@ :<BS><BS><BS><CR>ma'><SID>t@
+vnoremap <script> <silent> <Leader>tab :<BS><BS><BS><CR>ma'><SID>tab
+vnoremap <script> <silent> <Leader>tml :<BS><BS><BS><CR>ma'><SID>tml
+vnoremap <script> <silent> <Leader>tsp :<BS><BS><BS><CR>ma'><SID>tsp
+vnoremap <script> <silent> <Leader>tsq :<BS><BS><BS><CR>ma'><SID>tsq
+vnoremap <script> <silent> <Leader>tp@ :<BS><BS><BS><CR>ma'><SID>tp@
+vnoremap <script> <silent> <Leader>tt :<BS><BS><BS><CR>ma'><SID>tt
+vnoremap <script> <silent> <Leader>Htd :<BS><BS><BS><CR>ma'><SID>Htd
" ---------------------------------------------------------------------
" Menu Support: {{{1
@@ -604,8 +645,8 @@
if !hasmapto('<Plug>RestoreWinPosn')
map <unique> <Leader>rwp <Plug>RestoreWinPosn
endif
-nmap <silent> <Plug>SaveWinPosn :call SaveWinPosn()<CR>
-nmap <silent> <Plug>RestoreWinPosn :call RestoreWinPosn()<CR>
+nnoremap <silent> <Plug>SaveWinPosn :call SaveWinPosn()<CR>
+nnoremap <silent> <Plug>RestoreWinPosn :call RestoreWinPosn()<CR>
" Command Interface: {{{2
com! -bar -nargs=0 SWP call SaveWinPosn()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment