Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

(vim with) ctags and zpt, genericsetup xml and zcml

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


flo at chaoflow

Oct 23, 2009, 7:57 AM

Post #1 of 2 (273 views)
Permalink
(vim with) ctags and zpt, genericsetup xml and zcml

I use vim with ctags which works fine for python code but I would like
to give it some understanding for page templates, genericsetup xml files
and zcml files.

Is anybody doing this and would like to share the necessary language
definitions?

To also use this mail to transport knowledge ;)

" fast switching between .py .pt and .txt
let g:alternateExtensions_py = "pt,txt"
let g:alternateExtensions_pt = "py,txt"
let g:alternateExtensions_txt = "py,pt"

in combination with http://www.vim.org/scripts/script.php?script_id=31
enables fast switching (:A) between these files. If all three are
present, txt will not be reached (yet) by fast switching.


florian


marius at gedmin

Oct 23, 2009, 12:37 PM

Post #2 of 2 (224 views)
Permalink
Re: (vim with) ctags and zpt, genericsetup xml and zcml [In reply to]

On Fri, Oct 23, 2009 at 04:57:27PM +0200, Florian Friesdorf wrote:
> I use vim with ctags

And so do I.

> which works fine for python code but I would like
> to give it some understanding for page templates, genericsetup xml files
> and zcml files.
>
> Is anybody doing this and would like to share the necessary language
> definitions?

No and maybe.

> To also use this mail to transport knowledge ;)
>
> " fast switching between .py .pt and .txt
> let g:alternateExtensions_py = "pt,txt"
> let g:alternateExtensions_pt = "py,txt"
> let g:alternateExtensions_txt = "py,pt"
>
> in combination with http://www.vim.org/scripts/script.php?script_id=31
> enables fast switching (:A) between these files. If all three are
> present, txt will not be reached (yet) by fast switching.

In that vein, I've got a plugin that lets me switch between Python code
and unit tests for that code with a single keystroke, assuming that
filename conventions follow the patterns used in Zope over the years:

foo.py <-> tests/test_foo.py OR foo.txt

It's py-test-switcher.vim together with py_test_switcher.py you can find
at http://mg.pov.lt/vim/plugin/ along with a bunch of other things.

Cheers!
Marius Gedminas
--
http://pov.lt/ -- Zope 3 consulting and development
Attachments: signature.asc (0.19 KB)

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.