On Jan 12, 1:17 pm, Marc Weber <[email protected]> wrote: > > Are you sure its the best way ? Do you have python syntax highlighting > in .vim? Do you have python completion support in .vim? > More important: Do you have python syntax checking in .vim files? > > Don't you think a > vim.load_py_file('foo.py') makes more sense for those reasons? > > [snip] > > There should be a vim.set_option(path, p) like API (for both: VimL and > all language interfaces) >
Yes, by all means, we should improve the APIs to allow easy operations in Vim. Loading new files, passing variables back and forth, setting options...all should be supported with a very easy interface. I understand all of these areas are lacking, but that isn't a good reason to abandon VimL, it's a good reason to improve the interfaces with the various scripting languages. > If you write C/C++ mainly and learn JS, then you can also write client > side code for browsers. I'm pretty sure any javascript interface for controlling the Vim editor will be vastly different from the APIs and interfaces you would use to control a web browser. Not to mention, when writing good javascript, you need to take into account, probe, and/or work around the various quirks and limitations of a wide range of browsers. Learning the basic syntax needed to run the Vim editor will make it only a tiny bit easier to write good client-side browser code. Just because you know how to use an oven to bake a cake, doesn't mean you know how to use it to make filet mignon. I exaggerate in my metaphor, but my point is controlling a text editor and scripting a browser page are two entirely different skills. I personally like VimL, and find it very well suited to controlling Vim. If I were to see a new language be used for most of Vim's scripting, I'd like to see a good solid general-purpose language in wide use, like Perl or Python. I gather from this discussion that it is possible, but I've never heard before of anyone using Javascript for general-use purposes. Python in particular has the added benefit, that Vim's "official" repository is hosted with Mercurial, so Vim power-users would also be more inclined to tinker with the Hg source code. I'd prefer to keep VimL around and improve it as needed. But if there is to be a new "standard" language, even a de facto standard used by most Vim plugins, I guess I prefer it NOT be Javascript. I simply have no use for the language. If I must learn a new language to hack Vim, beyond VimL which I feel even in the expression syntax grows fairly naturally from basic editor use (maybe I'm just weird), I'd like to be able to use it immediately on a wide variety of platforms for a wide variety of purposes. By the way, I think the best idea I've seen out of this entire discussion, is for someone to make a focused effort to provide Vim wrappers for commonly-used libraries for the various scripting languages supported by Vim. Or a plugin for loading arbitrary libraries in one of the supported languages. -- 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
