Hi Tony,
Thanks a lot for such a fast response.
However, I realise now I was not clear in my first post. I didn't mean to use a language that VIM is compiled with. I was simply talking about passing the selected text to your custom script with
<.>! my_script.py
But I have to say you have a good point: "your favourite language might not be my favourite language"
Cheers,
Jose
El dom, 28 abr 2024 a las 20:44, Tony Mechelynck (<antoine.mechelynck@gmail.com>) escribió:
On Sun, Apr 28, 2024 at 9:27 PM Jose Caballero <jcaballero.hep@gmail.com> wrote:
>
> Hello,
>
> I am just curious about it. I have just been experimenting with it, and it is possible to send the selected range of lines, or even the entire buffer, to an external script. Right? In my case, in python.
> I find python, or even bash, to be more readable and friendly than vimscript.
>
> What would be the advantage of keeping using vimscript instead of writing plugins in your favourite language? What am I missing?
>
> Cheers,
> Jose
What you're missing, I think, is that your favourite language might
not be my favourite language. Indeed, it is possible to write plugins
in Python, Perl, Ruby, Lua, Mzscheme, Tcl, etc., but only a Vim
compiled with the corresponding interpreter interface built-in could
use them; while Vim script uses as commands the very same verbs used
as ex-commands when running Vim interactively, and it is guaranteed
that every Vim executable can use it. For all these reasons (and also
because all these additional languages are foreign to me while I had
to learn Vim ex-commands anyway in order to use it interactively),
_my_ favourite language for use with Vim is Vim script itself.
Best regards,
Tony.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACUP1u_pwJtgXU60GBELZE-%3DxaF8-C5L4QvfV%2BJ_4AfztF%2Bm3g%40mail.gmail.com.
No comments:
Post a Comment