]> git.nbdom.net Git - nb.git/commitdiff
/etc/vim/source/map.vim
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 27 Jul 2026 21:22:50 +0000 (23:22 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 27 Jul 2026 21:22:50 +0000 (23:22 +0200)
etc/vim/source/map.vim

index 8b264a2db0c69d6cfa8392e37f1391dae755241b..998cbde98d257a05c03ff9ffdb107368e36aa722 100644 (file)
@@ -20,6 +20,16 @@ func!MapHelpAdd(key,lib)
     endif
   endfor
   call add(g:MapHelp,[a:key,a:lib])
+
+  let matches = matchlist(a:key, '\vAlt\+(\a)')
+  if len(matches) > 1
+    for m in matches[1:]   " m is the captured letter
+      if !empty(m)
+        " NB 27.07.26 echo m a:key
+        execute "set <A-".m.">=\e".m
+      endif
+    endfor
+  endif
 endfunc
 
 func!_MapHelpSort(x,y)
@@ -165,9 +175,9 @@ map <C-b> :bp<C-M>
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 " F1 - Last Cmd
-call MapHelpAdd('F1, Alt+x','Last shell command executed')
-map <F1> :!<C-UP><C-M>
-map \ex :!<C-UP><C-M>
+call MapHelpAdd('F1, Alt+x','Last command executed')
+map <F1> :<C-UP><C-M>
+map \ex :<C-UP><C-M>
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 " F2 - Script, formated text verification