Can not download plugins for jEdit (help!!)

Neil Cerutti horpner at yahoo.com
Thu Nov 9 15:11:19 CET 2006


On 2006-11-09, Ant <antroy at gmail.com> wrote:
>> Vim, it can handle all the things.http://www.vim.org/
>
> I'm not convinced of that quite yet. jEdit's syntax
> highlighting seems more robust (see SocketServer.py in the
> standard library for an example - vim gets the highlighting of
> the first doc-comment wrong).

Code inside strings, e.g., doctests, breaks the synchronization
code. I fixed this for myself by adopting the convention in my
code that all closing """ are at the end of a line, while opening
""" never are. Then I changed the synchronize declarations in
/syntax/python.vim to the following:

  syn sync match pythonSync grouphere NONE '"""$'
  syn sync maxlines=300

The above is no good for random Python code, though.

But in random Python code you can simply increase the number of
lines inspected as high as your machine can handle, as documented
in python.vim.

> I've also not found anything like jEdit's Console plugin for
> vim. It's interactive. You can run the current buffer in the
> console window. The console interacts with an error reporting
> pane which allows you to click on the error and it will take
> you to the appropriate line in the code that the stack trace
> indicates.

I haven't got that working in Vim, because I haven't been
irritated enough by its lack to try. Python's extremely verbose
error reports make designing errorformat a little tricky, but it
can be done, and the day may come soon.

The reason I haven't adapted quickfix mode to Python is that Vim
would hide most of the Traceback. I'd constantly be executing the
command to show the entire error message, so I've chosen to
eschew quickfix mode for Python code.

If there's some quickfix mode settings that solve these problems
I'd be happy to purloin it.

> I'm very interested in other people's vim setup for Python coding
> however, as I do use vim more than Python these days, mainly because I
> have to use it a great deal on headless servers (jEdit would be no good
> here of course) and I got fed up with adding artefacts such as
> extraneous i's, o's and :w's into my code when working with jEdit ;-)
> And it starts faster of course.

The default Python plugin provides the [[, ]] and [m, ]m commands
for jumping to the next function or method respectively. They are
a nice help once you're aware of them. There's a more powerful
plugin available on the internet, but it the code-jumps were the
main commands I wanted.

pytags should be in your Tools directory. I haven't found it
terribly useful, but in theory it's invaluable (my project is
piddly in size at the moment).

If you set shiftwidth to your preferred Python indent, then
indenting and unindenting code blocks is as easy as the < and >
commands.

-- 
Neil Cerutti



More information about the Python-list mailing list