> python << EOF
> import os
> import sys
> import vim
> for p in sys.path:
>      if p!="" and os.path.isdir(p):
>          vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
> EOF
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?

https://github.com/MarcWeber/scion-backend-vim shows how to it can be
done.
That's what I did in all plugins using more than 5 lines of python.

I use <<< EOF only for interfacing with the external code.

>          vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
this just proofs my point.

There should be a vim.set_option(path, p) like API (for both: VimL and
all language interfaces)

If you write C/C++ mainly and learn JS, then you can also write client
side code for browsers.. If you learn VimL .. then what? The only real
advantage I can think about is that it provides autoloading feature.

The arguments that if you learn Vim then you also know VimL are void.
If there was a nice JS REPL (as seen in all browsers today).. Then the
same would be true for javascript.

But: You could also optimize your browser behaviour using cutom JS
scripts then.

I agree that plugins like matchit just get their job done - there is no
need to rewrite those.

I don't want to offend anybody. Just trying to understand whether
having JS support would change anything. So please consider this thread
as being a test whether such a change would pay off in the long run for
the community.

Unless there is more positive feedback - we can stick to VimL. I learned
to cope with it.

Marc Weber

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

Reply via email to