Monday, November 5, 2012

Re: Difficulty in using VIM

>> THere are plugins which try to emulate it such as ConcqueTerm, but the
>
> nyou can't use Vim keybindings, because each key is forwarded to the
>
> "shell" or "lisp" intepreter.
>
>
> Marc Weber

Well Marc, as everybody in this group remarked, I am not proficient in vim (or in Emacs, by the way). However, I have spent a couple of hours learning vim (I learned how to move the cursor, insert text, and perform search). Therefore I am not going to give up without a few more hours of practicing.

After reading your post, I revisited ConqueTerm. My problems stems from my lack of experience with vim, of course. I can deal with Emacs because it has a lot of scripts that transform it in something else. For instance, Emacs-IDE is an example of application built on top of Emacs.

Perhaps you can help me with a vim script that will improve the behaviour of REPL under ConqueTerm. I have downloaded, built and installed rlwrap-0.37.tar.gz, and also readline-6.2.tar.gz. Then I installed conqueterm_2.2.vmb.

Now, from vim (text only version), I used the :split command in order to get two windows.

:split

I put vim in insertion mode, and type the command:

Ctrl-O :ConqueTerm rlwrap sbcl

It seems that rlwrap provides a better behave to the REP Loop. The arrows work as expecteced: they bring the command history. The error handling is also correct. Therefore, your suggestion of trying ConqueTerm again seems to be a good idea.

What I need now is a script that prevents user from entering the command mode when the cursor is on the REPL window. The editor, rlwrap and sbcl go crazy if I enter command mode on the REPL window. He/she must switch windows using Ctrl-O Ctrl-ww. I believe that it is not difficult to write a script that will inhibit command mode on the REPL window. Is it possible to remap the keys on the REPL window only?

I suppose there is a way to give a tag to the REPL window. Then one could remap the ESC key. The new ESC key could check whether the REPL window in on focus. If the REPL window is on focus, the ESC key issues a message explaining that one cannot enter the command mode from the REPL window. ESC will behave normally on any window different from the REPL window.

I am afraid that I cannot write this kind of script right now. As I told you, I have read only a couple of chapters from the manual. I hope that you or Taylor sketch this kind of script for me. I guess I will need at least another week before being able to write scripts. With a draft to work with, I would get results much faster.



--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: