bind <tab> to vimpulse-abbrev-expand-before in insert mode
Titus von der Malsburg
malsburg at gmail.com
Fri Dec 17 18:23:09 CET 2010
Štěpán, many thanks for your response!
On Fri, Dec 17, 2010 at 5:24 PM, Štěpán Němec <stepnem at gmail.com> wrote:
> You can see what is going on using `C-h c TAB', which will show you how
> Emacs understands what your Tab key sends.
C-h c TAB says: "TAB runs the command indent-for-tab-command" in emacs -nw
I can say
(global-set-key (kbd "TAB") 'vimpulse-abbrev-expand-before)
and that works. But
(vimpulse-imap (kbd "TAB") 'vimpulse-abbrev-expand-before)
throws an error:
Debugger entered--Lisp error: (args-out-of-range [] -1)
aref([] -1)
(eq (aref temp-sequence (1- ...)) t)
(if (eq (aref temp-sequence ...) t) nil (setq temp-sequence (vconcat temp-seq$
(unless (eq (aref temp-sequence ...) t) (setq temp-sequence (vconcat temp-seq$
(cond ((featurep ...) (vimpulse-xemacs-def-binding keymap temp-sequence def c$
(let ((temp-sequence ...)) (unless define-func (setq define-func ...)) (cond $
vimpulse-default-binding((keymap (tab . vimpulse-abbrev-expand-before) (27 . $
(if (keymapp (lookup-key keymap key-vector)) (vimpulse-default-binding keymap$
(cond ((not def) (funcall define-func keymap key-vector def) (while ... ... .$
(let (key-vector temp-sequence current-binding previous-binding) (setq define$
vimpulse-make-careful-binding((keymap (tab . vimpulse-abbrev-expand-before) ($
(let ((viper-current-state new-viper-state)) (viper-normalize-minor-mode-map-$
(progn (viper-set-mode-vars-for new-viper-state) (let (...) (viper-normalize-$
(unwind-protect (progn (viper-set-mode-vars-for new-viper-state) (let ... ...$
(let ((new-viper-state state) (old-viper-state viper-current-state)) (unwind-$
(vimpulse-with-state state (vimpulse-make-careful-binding basic-map key def))
(if modes (dolist (mode modes) (if ... ... ...)) (vimpulse-with-state state ($
(let* ((map ...) (basic-map ...)) (if modes (dolist ... ...) (vimpulse-with-s$
vimpulse-map-state(insert-state " " vimpulse-abbrev-expand-before nil)
vimpulse-imap(" " vimpulse-abbrev-expand-before)
eval((vimpulse-imap (kbd "TAB") (quote vimpulse-abbrev-expand-before)))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
>> The other problem I'm having is that C-v does not activate block
>> selection but inserts text. I'd be happy about any suggestion!
>
> No idea. `C-v' does the right thing for me both in the terminal and the
> GUI.
C-h c C-v says "C-v runs the command cua-paste" although vimpulse.el
(which executed without errors) contains:
(define-key viper-vi-basic-map "\C-v" 'vimpulse-visual-toggle-block)
Executing this line doesn't throw an error but also doesn't fix the problem.
Titus
More information about the implementations-list
mailing list