Thursday, July 1, 2010

Re: percentage of vim users running python

Hi Ted:

You're writing code for a system you've been using. You say its not
ready for release. Still you care much about portability and other users
(?). One design goal should be : Never over engineer. Do what you have
to do because things are going to change anyway.

Such a change could be a team mate popping up who loves Emacs.
If you have a Python module he can hack the module and Emacs and reuse
your code. If you use VimL ..

Same applies if you want to offer the functionality in web application
or whatsoever.

About plugin / addon / extension? I didn't care much. I just tried to
get the job done.

Have a look from a historical point of view: VimL was great when it was
invented. That time it was ahead of the time by years. There was no
Python or X which could be used instead. However today those languages
exist. VimL can get jobs done. However its only used within Vim.
You can use Python. However the language bindings are rather limited. Eg
Vim module doesn't provide a call function which allows you to call vim
function without caring about quoting.. Nevertheless you can hack this
up fast.

When should you use VimL?
- you're going to use many Vim commands (regex, cursor movements etc)

When should you be using Python or something else?
- you're going to implement heavy stuff such as language parsers.
You want to operate on syntax trees etc.

Sometimes a solution which only gets done 90% can be implemented *much*
faster in Vim using commands you already know. So if you task is about
finding paragraphs and adding characters or joining those paragraphs
probably I'd try to get up a quick and dirty Vim script

Do whatever you feel most comfortable with.

Python:

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

Post a Comment