Debian Codegraph @

docs/users_guide/editors.rst

raw
1 Visual Editors
2 ==============
3
4
5 This chapter is about maintaining Cheetah templates with visual
6 editors, and the tradeoffs between making it friendly to both text
7 editors and visual editors.
8
9 Cheetah's main developers do not use visual editors. Tavis uses
10 {emacs}; Mike uses {vim}. So our first priority is to make
11 templates easy to maintain in text editors. In particular, we don't
12 want to add features like Zope Page Template's
13 placeholder-value-with-mock-text-for-visual-editors-all-in-an-XML-tag.
14 The syntax is so verbose it makes for a whole lotta typing just to
15 insert a simple placeholder, for the benefit of editors we never
16 use. However, as users identify features which would help their
17 visual editing without making it harder to maintain templates in a
18 text editor, we're all for it.
19
20 As it said in the introduction, Cheetah purposely does not use
21 HTML/XML tags for $placeholders or #directives. That way, when you
22 preview the template in an editor that interprets HTML tags, you'll
23 still see the placeholder and directive source definitions, which
24 provides some "mock text" even if it's not the size the final
25 values will be, and allows you to use your imagination to translate
26 how the directive output will look visually in the final.
27
28 If your editor has syntax highlighting, turn it on. That makes a
29 big difference in terms of making the template easier to edit.
30 Since no "Cheetah mode" has been invented yet, set your
31 highlighting to Perl mode, and at least the directives/placeholders
32 will show up in different colors, although the editor won't
33 reliably guess where the directive/placeholder ends and normal text
34 begins.
35
36