[implementations-list] vimpulse - visual select with emacs -nw
I just discovered vimpulse and was very happy to find it! Thank you. One oddity: Visual selecting (with v or Ctrl-v) doesn't seem to work when I run emacs in a terminal with 'emacs -nw'. For example, in normal mode I can hit vllld and nothing will be deleted. Visual selecting works fine when I run emacs in its own window. Why would this be? Is there any way to get vimpulse working fully in terminal mode emacs? I don't subscribe to this list, so please cc me in replies. John
Hi John, It actually works for me. I tried it in xterm, konsole, konsole+screen. Are you using the latest version (downloaded from emacs wiki) or using the multi file setup? Of course I don't think it's important at all, as the code is the same. Just wondering which version :) Also, which emulator are you using? Cheers, Alessandro 2009/7/29 John MacFarlane <[email protected]>:
I just discovered vimpulse and was very happy to find it! Thank you.
One oddity:
Visual selecting (with v or Ctrl-v) doesn't seem to work when I run emacs in a terminal with 'emacs -nw'. For example, in normal mode I can hit vllld and nothing will be deleted. Visual selecting works fine when I run emacs in its own window. Why would this be? Is there any way to get vimpulse working fully in terminal mode emacs?
I don't subscribe to this list, so please cc me in replies.
John
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
I'm using the latest version from the wiki, with a recent emacs-snapshot (emacs 23 from CVS via http://emacs.orebokech.com/) and gnome-terminal. (But I tried just it with xterm as well, with the same results.) I'm not sure what "the multi file setup" refers to, but I'm not doing anything special in my .emacs: just (setq viper-mode t) ; enable Viper at load time (setq viper-ex-style-editing nil) ; can backspace past start of insert / line (require 'viper) ; load Viper (setq vimpulse-experimental nil) ; don't load bleeding edge code (see 6. installation instruction) (require 'vimpulse) ; load Vimpulse (setq woman-use-own-frame nil) ; don't create new frame for manpages (setq woman-use-topic-at-point t) ; don't prompt upon K key (manpage display) (require 'redo) ; enables C-r (redo key) (require 'rect-mark) ; enables nice-looking block visual mode Best, John +++ Alessandro Piras [Jul 29 09 17:00 ]:
Hi John, It actually works for me. I tried it in xterm, konsole, konsole+screen. Are you using the latest version (downloaded from emacs wiki) or using the multi file setup? Of course I don't think it's important at all, as the code is the same. Just wondering which version :) Also, which emulator are you using? Cheers, Alessandro
2009/7/29 John MacFarlane <[email protected]>:
I just discovered vimpulse and was very happy to find it! Thank you.
One oddity:
Visual selecting (with v or Ctrl-v) doesn't seem to work when I run emacs in a terminal with 'emacs -nw'. For example, in normal mode I can hit vllld and nothing will be deleted. Visual selecting works fine when I run emacs in its own window. Why would this be? Is there any way to get vimpulse working fully in terminal mode emacs?
I don't subscribe to this list, so please cc me in replies.
John
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
On Wed, Jul 29, 2009 at 3:34 PM, John MacFarlane <[email protected]> wrote:
I'm using the latest version from the wiki, with a recent emacs-snapshot (emacs 23 from CVS via http://emacs.orebokech.com/) and gnome-terminal. (But I tried just it with xterm as well, with the same results.) I'm not sure what "the multi file setup" refers to, but I'm not doing anything special in my .emacs: just
(setq viper-mode t) ; enable Viper at load time (setq viper-ex-style-editing nil) ; can backspace past start of insert / line (require 'viper) ; load Viper (setq vimpulse-experimental nil) ; don't load bleeding edge code (see 6. installation instruction) (require 'vimpulse) ; load Vimpulse (setq woman-use-own-frame nil) ; don't create new frame for manpages (setq woman-use-topic-at-point t) ; don't prompt upon K key (manpage display)
(require 'redo) ; enables C-r (redo key) (require 'rect-mark) ; enables nice-looking block visual mode
Best, John
Try using an otherwise-empty .emacs -- remove all lines except the ones you mentioned above. Does that work? Try using GNU Emacs 22. Does that work? If not: Is your computer always, or usually on? Would you like me (or Alessandro, if he wants to do it) to SSH in and take a look? If so, contact me at +1-416-992-3445 or by instant messaging at jasonspiro at gmail.com / jasonspiro at hotmail.com. If you want to watch me while I am working, please install tcl, expect, and kibitz before you contact me. If your distro doesn't package kibitz, perhaps inside its expect package, you can download it online; I think it's just a single expect script.
Hi Jason, I asked John to toggle debug on error and check what the error is. It works in emacs cvs for me, but I don't know if we have the same revision. 2009/7/29 Jason Spiro <[email protected]>:
On Wed, Jul 29, 2009 at 3:34 PM, John MacFarlane <[email protected]> wrote:
I'm using the latest version from the wiki, with a recent emacs-snapshot (emacs 23 from CVS via http://emacs.orebokech.com/) and gnome-terminal. (But I tried just it with xterm as well, with the same results.) I'm not sure what "the multi file setup" refers to, but I'm not doing anything special in my .emacs: just
(setq viper-mode t) ; enable Viper at load time (setq viper-ex-style-editing nil) ; can backspace past start of insert / line (require 'viper) ; load Viper (setq vimpulse-experimental nil) ; don't load bleeding edge code (see 6. installation instruction) (require 'vimpulse) ; load Vimpulse (setq woman-use-own-frame nil) ; don't create new frame for manpages (setq woman-use-topic-at-point t) ; don't prompt upon K key (manpage display)
(require 'redo) ; enables C-r (redo key) (require 'rect-mark) ; enables nice-looking block visual mode
Best, John
Try using an otherwise-empty .emacs -- remove all lines except the ones you mentioned above. Does that work?
Try using GNU Emacs 22. Does that work?
If not: Is your computer always, or usually on? Would you like me (or Alessandro, if he wants to do it) to SSH in and take a look? If so, contact me at +1-416-992-3445 or by instant messaging at jasonspiro at gmail.com / jasonspiro at hotmail.com. If you want to watch me while I am working, please install tcl, expect, and kibitz before you contact me. If your distro doesn't package kibitz, perhaps inside its expect package, you can download it online; I think it's just a single expect script.
+++ Jason Spiro [Jul 29 09 19:18 ]:
On Wed, Jul 29, 2009 at 3:34 PM, John MacFarlane <[email protected]> wrote:
I'm using the latest version from the wiki, with a recent emacs-snapshot (emacs 23 from CVS via http://emacs.orebokech.com/) and gnome-terminal. (But I tried just it with xterm as well, with the same results.) I'm not sure what "the multi file setup" refers to, but I'm not doing anything special in my .emacs: just
(setq viper-mode t) ; enable Viper at load time (setq viper-ex-style-editing nil) ; can backspace past start of insert / line (require 'viper) ; load Viper (setq vimpulse-experimental nil) ; don't load bleeding edge code (see 6. installation instruction) (require 'vimpulse) ; load Vimpulse (setq woman-use-own-frame nil) ; don't create new frame for manpages (setq woman-use-topic-at-point t) ; don't prompt upon K key (manpage display)
(require 'redo) ; enables C-r (redo key) (require 'rect-mark) ; enables nice-looking block visual mode
Best, John
Try using an otherwise-empty .emacs -- remove all lines except the ones you mentioned above. Does that work?
I tried using -q to suppress loading of .emacs, and just loading the vimpulse stuff manually. No change. I tried it with emacs 22. That didn't help. I even tried it in a console. No change. But then I noticed something -- visual mode actually *does* work when I move the cursor using hjkl. But when I use the arrow keys, it causes vimpulse to leave visual mode. Visual mode works fine with arrow keys when I run gtk emacs. One more clue: when this happens, if you check *Messages*, it contains the line: Toggling vimpulse-visual-mode off; better pass an explicit argument. This seems to be caused by the use of arrow keys. Best, John
On Wed, Jul 29, 2009 at 8:22 PM, John MacFarlane <[email protected]> wrote:
I tried using -q to suppress loading of .emacs, and just loading the vimpulse stuff manually. No change. I tried it with emacs 22. That didn't help. I even tried it in a console. No change.
But then I noticed something -- visual mode actually *does* work when I move the cursor using hjkl. But when I use the arrow keys, it causes vimpulse to leave visual mode. Visual mode works fine with arrow keys when I run gtk emacs.
One more clue: when this happens, if you check *Messages*, it contains the line: Toggling vimpulse-visual-mode off; better pass an explicit argument. This seems to be caused by the use of arrow keys.
Best, John
Try running these two commands in order to start Emacs: export ESCDELAY=1000 emacs Does this solve the problem? If so, then the arrow keys are sending "Esc" then a few more characters (which is fine), and Emacs is processing the "Esc" part by itself, then the next part by itself (which is bad). Do you have debug-on-error on? Try M-x view-lossage RET. Do the arrow keys really send <Up> / <Down> / <Left> / <Right>? How about the arrow keys on the numeric keypad?
Yeah, Jason is right I think. Didn't check because I'm too lazy to reboot now. I never tried to export EXDELAY, but I got rid of my ESC problems with this piece of elisp in my .emacs: (when tty-erase-char (set-input-mode t nil t) (setq viper-no-multiple-ESC t)) This should get rid of the stupid ALT=ESC problem that bugs everyone that uses viper in terminals, but I've no idea at all if it works in gnome terminal. It works for me in konsole, konsole+screen and xterm too iirc. Try it and let me know :) Also, check if M-x continues to work. Bye, Alessandro 2009/7/29 Jason Spiro <[email protected]>:
On Wed, Jul 29, 2009 at 8:22 PM, John MacFarlane <[email protected]> wrote:
I tried using -q to suppress loading of .emacs, and just loading the vimpulse stuff manually. No change. I tried it with emacs 22. That didn't help. I even tried it in a console. No change.
But then I noticed something -- visual mode actually *does* work when I move the cursor using hjkl. But when I use the arrow keys, it causes vimpulse to leave visual mode. Visual mode works fine with arrow keys when I run gtk emacs.
One more clue: when this happens, if you check *Messages*, it contains the line: Toggling vimpulse-visual-mode off; better pass an explicit argument. This seems to be caused by the use of arrow keys.
Best, John
Try running these two commands in order to start Emacs:
export ESCDELAY=1000 emacs
Does this solve the problem? If so, then the arrow keys are sending "Esc" then a few more characters (which is fine), and Emacs is processing the "Esc" part by itself, then the next part by itself (which is bad).
Do you have debug-on-error on?
Try M-x view-lossage RET. Do the arrow keys really send <Up> / <Down> / <Left> / <Right>?
How about the arrow keys on the numeric keypad?
On Wed, Jul 29, 2009 at 4:25 PM, Alessandro Piras<[email protected]> wrote:
Yeah, Jason is right I think. Didn't check because I'm too lazy to reboot now. I never tried to export EXDELAY,
You mean ESCDELAY :-)
but I got rid of my ESC problems with this piece of elisp in my .emacs:
(when tty-erase-char (set-input-mode t nil t) (setq viper-no-multiple-ESC t)) This should get rid of the stupid ALT=ESC problem that bugs everyone that uses viper in terminals, but I've no idea at all if it works in gnome terminal. It works for me in konsole, konsole+screen and xterm too iirc. Try it and let me know :)
I haven't tried it: my Linux box is currently shut off. But I'm curious: What does it do? And why doesn't Viper (not Vimpulse) enable it by default?
+++ Alessandro Piras [Jul 29 09 22:25 ]:
Yeah, Jason is right I think. Didn't check because I'm too lazy to reboot now. I never tried to export EXDELAY, but I got rid of my ESC problems with this piece of elisp in my .emacs:
(when tty-erase-char (set-input-mode t nil t) (setq viper-no-multiple-ESC t)) This should get rid of the stupid ALT=ESC problem that bugs everyone that uses viper in terminals, but I've no idea at all if it works in gnome terminal. It works for me in konsole, konsole+screen and xterm too iirc. Try it and let me know :)
Sorry, that didn't work for me either. John
On Wed, Jul 29, 2009 at 7:41 PM, John MacFarlane<[email protected]> wrote:
+++ Alessandro Piras [Jul 29 09 22:25 ]:
Yeah, Jason is right I think. Didn't check because I'm too lazy to reboot now. I never tried to export EXDELAY, but I got rid of my ESC problems with this piece of elisp in my .emacs:
(when tty-erase-char (set-input-mode t nil t) (setq viper-no-multiple-ESC t)) This should get rid of the stupid ALT=ESC problem that bugs everyone that uses viper in terminals, but I've no idea at all if it works in gnome terminal. It works for me in konsole, konsole+screen and xterm too iirc. Try it and let me know :)
Sorry, that didn't work for me either.
Sorry, I don't know how to fix the problem. I don't know why ESCDELAY didn't work; the most likely explanation is that Emacs doesn't use ncurses. You can try waiting a while to see if someone else on this list replies. Or you can try the help-gnu-emacs list (if you do, then please crosspost to this list.) Or you can switch to running Emacs in your windowing system instead of a terminal. Either way, let us know what you decide to do in the end -- I am curious.
+++ Jason Spiro [Jul 29 09 20:16 ]:
On Wed, Jul 29, 2009 at 7:41 PM, John MacFarlane<[email protected]> wrote:
+++ Alessandro Piras [Jul 29 09 22:25 ]:
Yeah, Jason is right I think. Didn't check because I'm too lazy to reboot now. I never tried to export EXDELAY, but I got rid of my ESC problems with this piece of elisp in my .emacs:
(when tty-erase-char (set-input-mode t nil t) (setq viper-no-multiple-ESC t)) This should get rid of the stupid ALT=ESC problem that bugs everyone that uses viper in terminals, but I've no idea at all if it works in gnome terminal. It works for me in konsole, konsole+screen and xterm too iirc. Try it and let me know :)
Sorry, that didn't work for me either.
Sorry, I don't know how to fix the problem. I don't know why ESCDELAY didn't work; the most likely explanation is that Emacs doesn't use ncurses. You can try waiting a while to see if someone else on this list replies. Or you can try the help-gnu-emacs list (if you do, then please crosspost to this list.) Or you can switch to running Emacs in your windowing system instead of a terminal.
Either way, let us know what you decide to do in the end -- I am curious.
Thanks for all your help -- at least we know what the problem is now. I guess I'll have to learn to use hjkl for navigation and stop using the arrow keys! John
I got rid of the problem. I don't really know if it will work on a slow ssh session, but better than nothing :) place this in your .emacs after the vimpulse stuff: ;; advice viper-intercept-ESC-key to exit visual mode with esc (defadvice viper-intercept-ESC-key (around vimpulse-esc-exit-visual-mode activate) (when (and vimpulse-visual-mode (not (input-pending-p))) (vimpulse-visual-mode nil)) ad-do-it) This should do the job. Anyway, using hjkl is a nice thing to learn :) 2009/7/30 John MacFarlane <[email protected]>:
+++ Jason Spiro [Jul 29 09 20:16 ]:
On Wed, Jul 29, 2009 at 7:41 PM, John MacFarlane<[email protected]> wrote:
+++ Alessandro Piras [Jul 29 09 22:25 ]:
Yeah, Jason is right I think. Didn't check because I'm too lazy to reboot now. I never tried to export EXDELAY, but I got rid of my ESC problems with this piece of elisp in my .emacs:
(when tty-erase-char (set-input-mode t nil t) (setq viper-no-multiple-ESC t)) This should get rid of the stupid ALT=ESC problem that bugs everyone that uses viper in terminals, but I've no idea at all if it works in gnome terminal. It works for me in konsole, konsole+screen and xterm too iirc. Try it and let me know :)
Sorry, that didn't work for me either.
Sorry, I don't know how to fix the problem. I don't know why ESCDELAY didn't work; the most likely explanation is that Emacs doesn't use ncurses. You can try waiting a while to see if someone else on this list replies. Or you can try the help-gnu-emacs list (if you do, then please crosspost to this list.) Or you can switch to running Emacs in your windowing system instead of a terminal.
Either way, let us know what you decide to do in the end -- I am curious.
Thanks for all your help -- at least we know what the problem is now. I guess I'll have to learn to use hjkl for navigation and stop using the arrow keys!
John
better: (defadvice viper-intercept-ESC-key (around vimpulse-esc-exit-visual-mode activate) (when (and vimpulse-visual-mode (not (input-pending-p))) (vimpulse-visual-mode '-)) ad-do-it) 2009/7/30 Alessandro Piras <[email protected]>:
I got rid of the problem. I don't really know if it will work on a slow ssh session, but better than nothing :) place this in your .emacs after the vimpulse stuff: ;; advice viper-intercept-ESC-key to exit visual mode with esc (defadvice viper-intercept-ESC-key (around vimpulse-esc-exit-visual-mode activate) (when (and vimpulse-visual-mode (not (input-pending-p))) (vimpulse-visual-mode nil)) ad-do-it)
This should do the job. Anyway, using hjkl is a nice thing to learn :) 2009/7/30 John MacFarlane <[email protected]>:
+++ Jason Spiro [Jul 29 09 20:16 ]:
On Wed, Jul 29, 2009 at 7:41 PM, John MacFarlane<[email protected]> wrote:
+++ Alessandro Piras [Jul 29 09 22:25 ]:
Yeah, Jason is right I think. Didn't check because I'm too lazy to reboot now. I never tried to export EXDELAY, but I got rid of my ESC problems with this piece of elisp in my .emacs:
(when tty-erase-char (set-input-mode t nil t) (setq viper-no-multiple-ESC t)) This should get rid of the stupid ALT=ESC problem that bugs everyone that uses viper in terminals, but I've no idea at all if it works in gnome terminal. It works for me in konsole, konsole+screen and xterm too iirc. Try it and let me know :)
Sorry, that didn't work for me either.
Sorry, I don't know how to fix the problem. I don't know why ESCDELAY didn't work; the most likely explanation is that Emacs doesn't use ncurses. You can try waiting a while to see if someone else on this list replies. Or you can try the help-gnu-emacs list (if you do, then please crosspost to this list.) Or you can switch to running Emacs in your windowing system instead of a terminal.
Either way, let us know what you decide to do in the end -- I am curious.
Thanks for all your help -- at least we know what the problem is now. I guess I'll have to learn to use hjkl for navigation and stop using the arrow keys!
John
On Wed, Jul 29, 2009 at 9:49 PM, Alessandro Piras <[email protected]> wrote: ...
(defadvice viper-intercept-ESC-key (around vimpulse-esc-exit-visual-mode activate) (when (and vimpulse-visual-mode (not (input-pending-p))) (vimpulse-visual-mode '-)) ad-do-it)
I haven't tested the above code. But do you think it should be shipped as part of Vimpulse?
+++ Alessandro Piras [Jul 30 09 04:49 ]:
better: (defadvice viper-intercept-ESC-key (around vimpulse-esc-exit-visual-mode activate) (when (and vimpulse-visual-mode (not (input-pending-p))) (vimpulse-visual-mode '-)) ad-do-it)
I tried putting this in my .emacs, and it did allow the arrow keys to be used with visual mode in console emacs. I noticed another glitch that doesn't seem connected with the above code (since it happens even without it). If I do a visual block select (Ctrl-v then movement keys), then y, then P to paste the buffer, I get the string ^BVimpulseVisualBlockMode^C rather than the text I selected. John
+++ Jason Spiro [Jul 29 09 20:49 ]:
On Wed, Jul 29, 2009 at 8:22 PM, John MacFarlane <[email protected]> wrote:
I tried using -q to suppress loading of .emacs, and just loading the vimpulse stuff manually. No change. I tried it with emacs 22. That didn't help. I even tried it in a console. No change.
But then I noticed something -- visual mode actually *does* work when I move the cursor using hjkl. But when I use the arrow keys, it causes vimpulse to leave visual mode. Visual mode works fine with arrow keys when I run gtk emacs.
One more clue: when this happens, if you check *Messages*, it contains the line: Toggling vimpulse-visual-mode off; better pass an explicit argument. This seems to be caused by the use of arrow keys.
Best, John
Try running these two commands in order to start Emacs:
export ESCDELAY=1000 emacs
Does this solve the problem? If so, then the arrow keys are sending "Esc" then a few more characters (which is fine), and Emacs is processing the "Esc" part by itself, then the next part by itself (which is bad).
Do you have debug-on-error on?
Try M-x view-lossage RET. Do the arrow keys really send <Up> / <Down> / <Left> / <Right>?
The right arrow key sends ESC O C in console emacs. In a windowed emacs, it sends <right> So that explains the difference. However, setting ESCDELAY=1000 did not fix it.
How about the arrow keys on the numeric keypad?
It's a laptop, so no numeric keypad. John
participants (3)
-
Alessandro Piras -
Jason Spiro -
John MacFarlane