Hi, Rosangela.

On Sun, Jun 8, 2014 at 4:28 PM, Rosangela Medeiros da Silva <
rosangelame...@gmail.com> wrote:

> Hi.
> Excuse me for my poor English and lack of knowledge about computers. I am
> a lawyer. Therefore I have to make a lot of batch text processing:
> pleadings, counselling in e-petions, outline of laws, etc.
>
> People who sold me the Common Lisp packages for law practice told me that
> the Steel Bank Common Lisp is very fast for text processing, therefore I
> should run the scripts they sold me in this particular brand of Common
> Lisp. They gave me the following explanation about how it works.  In my
> .emacs configuration file there is a small elisp program that install Evil
> and Steel Bank Common Lisp scripting. At the end of this article there is a
> simplified version of my .emacs configuration file and two examples of
> Steel Bank Common Lisp to test them.
>
> What I would like from the members of this discussion list is the Vim
> equivalent of my .emacs configuration file, so I can run my scripts and
> define new keybindings in Common Lisp.


I guess I'm just wondering why you feel you should switch. Is there
something about Emacs+Evil that isn't working well?

However, since (as far as I can gather from your email) you are just taking
text from Emacs and sending it to an external process (sbcl), this should
be perfectly possible in Vim. If you're using SLIME to achieve some of this
functionality, things become a lot more complicated.


> By the way, I use the C-c p keybinding to change the name of the Common
> Lisp program that I want to run. For instance, if I want to run the
> reverse.lisp program, I type 'reverse.' somewhere on my document:
>
> reverse.
>
> Then I press Esc to enter <N>ormal state, place the cursor on the first
> letter of the file name, and press vf.Ctrl-c p and finally d to remove the
> name of the program and exit <V>isual state.
>
> The name of the file is removed from the text, and the program I want to
> use is installed in the C-c e keybinding. Now, I write a list and put the
> cursor inside the list and press C-c e to execute the program:
>
> (badly sing cats)Reversed list:
> (CATS SING BADLY)
>
> By the way, I use Common Lisp functions in regexps too. That is the reason
> for not using arguments in my functions. An example will make things clear.
> Let us assume that I have a function without argument to convert pinyin to
> Chines ideograms. Let us put this function inside an org-mode SRC block.
>
> #+BEGIN_SRC emacs-lisp
> (defun fn()
>   (cond ((equal (match-string 1) "zhong") "中")
>         ((equal (match-string 1) "hua")  "华")
>         (t "nada")))
> ; :s/\(\<[a-z]+\>\)/\,(fn)/gc
> #+END_SRC
>
> After pressing C-c C-c inside the block, I can start converting pinyin to
> Chinese characters. Of course, in the example, there is only two
> characters; since I need hundreds of them, I put the fn function in a file
> and only the code to load it goes into the SRC block.  I tried this in Vim,
> but it refused to accept the function inside the replacement expression. I
> mean, it did not accept \,(fn) in the replacement expression. The reason, I
> suppose is that I did not configure Vim to accept Common Lisp scripts.
>

As far as I can tell, your fn function is executed as Emacs Lisp rather
than Common Lisp. In any event, though, I would hesitate to use that code
for Chinese, since it can only do a one-to-one mapping of pinyin to hanzi;
your two example words don't even indicate tone, and even with tone
indicated you would have some words that sound the same with different
hanzi.


>
> That is all. Thank you for helping me. Since Evil is an emulation of Vim,
> I suppose that Vim is vastly superior to Evil. Therefore, I am looking
> forward for receiving the Vim configuration that accept SBCL scripting.
>

I wouldn't conclude that Vim is *inherently* vastly superior; it's just
that Evil has fewer features at the moment because it hasn't been developed
as long. It is, however, extensible in a way similar to Vim (albeit in a
different scripting language). Again, I wonder if you really need to switch.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to