在使用 @file 标签后,
可以简单的使用 @others标签来包含当前结点以下的所有结点
象XSL 中的<xsl:for-each select="//."> 哈哈哈
Copies the body text of all nodes except section definition nodes in an @file tree to the corresponding external file.
These control how Leo places text when writing external files. They are two of the most important directives in Leo.
@all
Copies all descendant nodes to the external file. Use @all to place unrelated data in an external file.
The @all directive is valid only in the body of @file trees.
Within the range of an @all directive, Leo ignores the @others directive and section references, so Leo will not complain about orphan nodes.
@others
Writes the body text of all unnamed descendant into the external file, in outline order.
Whitespace appearing before @others directive adds to the indentation of all nodes added by the @others directive.
A single node may contain only one @others directive, but descendant nodes may have other @others directives.
Leo 的 /Import To @file 命令,支持对 C/C++/C#;Java;语言的自动分析文章化组织的导入
@language python }}}
是不属于 @file 管理范围的,
在 @root限定处理下,各子结点的引用,与包含处理是使用 <<章节>> 标记
菜单命令:"/Tangle" - 混出
菜单命令:"/Untangle" - 混入
大多数情况中 @thin 如同 @file 一样的工作. 实际上,你可以简单的将 @file 替换为 @thin 进行正常的 outline 操作.
这里是主要几点 @file 与 @thin 不同之处:
@file 树比 @root 树使用起来方便很多:
但是, @root 树比 @file 树要 柔韧很多:
@root 树与 @file 树不同之处在于:
只有 @root 树可以包含章节定义行(不过 @file 中可以使用 "<< class declarations >>"类声明的专用章节)
The following table summarizes the various ways of creating external files.
Kind | Sentinels in external file? | Sections and @others expanded on write? | File data stored in .leo file? |
@asis | no | no | yes |
@auto | no | yes | no |
@edit | no | no | no |
@nosent | no | yes | yes |
@shadow | Note 1 | yes | no |
@file @thin Note 2 | yes | yes | no |
Note 1: @shadow nodes create two files, a public file without sentinels and a private file with sentinels.
Note 2: @file and @thin nodes are synonyms.
只是不能象 @root 那样在正文中使用@root expfile.t2t 模式的声明,而必须在 outline 树节点中显要的指明
如此就可以使用 Leo 方便的管理,编辑不支持 # 为注释的各种语言文件了
You can bind keys to the commands created by script buttons:
Enables syntax coloring until the next @nocolor directive.
@killcolor
Disables syntax coloring in a node, overriding all @color, @nocolor or @nocolor-node directives in the same node.
@nocolor
Disables syntax coloring until the next @nocolor directive.
@nocolor-node
Disables coloring for only the node containing it. The @nocolor-node directive overrides the @color and @nocolor directives within the same node.
These directives start a doc part. @doc is a synonym for @. Doc parts continue until an @c directive or the end of the body text. For example:
When writing external files, Leo writes doc parts as comments.
Leo does not recognize @ or @doc in @asis trees or when the @all or @delims directives are in effect.
Ends any doc part and starts a code part.
@code is a deprecated synonym for @c.
Leo does not recognize this directive in @asis trees or when the @all or @raw directives are
Specifies the Unicode encoding for an external file. For example:
When reading external files, the encoding given must match the encoding actually used in the external file or “byte hash” will result.
Places lines at the very start of an external file, before any Leo sentinels. @first lines must be the very first lines in an @<file> node. More then one @first lines may appear.
This creates two first lines, a shebang line and a Python encoding line:
Here is a perl example:
Places lines at the very end of external files.
This directive must occur at the very end of top-level @<file> nodes. More than one @last directive may exist. For example:
Leo does not recognize @last directive in @asis trees.
Tells Leo to ignore the subtree in which it appears.
In the body text of most top-level @<file> nodes, the @ignore directive causes Leo not to write the tree. However, Leo ignores @ignore directives in @asis trees.
Plugins and other parts of Leo sometimes @ignore for their own purposes. For example, Leo’s unit testing commands will ignore trees containing @ignore. In such cases, the @ignore directive may appear in the headline or body text.
When reading @edit nodes, Leo reads the entire file into the @edit node. Lines that look like sentinels will be read just as they are.
When writing @edit nodes, @edit nodes must not have children and section references and @others are not allowed.
The @shadow directive creates two external files, a public file without sentinels, and a private file containing sentinels.
When reading an @shadow node, Leo uses a brilliant algorithm devised by Bernhard Mulder that compares the public and private files, and then updates the outline based on changes to the public file. In this way, @shadow provides many of the benefits of @file trees without writing sentinels in the (public) external file.
Leo can do an initial import of @shadow trees by parsing the corresponding public file, exactly as is done for @auto nodes.
Sets the page width used to break doc parts into lines. <n> should be a positive integer. For example:
The @pagewidth directive overrides the @int page_width setting.
Sets the width of tabs. Negative tab widths cause Leo to convert tabs to spaces.
Specifies the language in effect, including comment delimiters. If no @language directive is in effect, Leo uses the defaults specified by the @string target-language setting.
A node may contain at most one @language directive.
The valid language names are: actionscript, ada, autohotkey, batch, c, config, cpp, csharp, css, cweb, elisp, forth, fortran, fortran90, haskell, haxe, html, ini, java, javascript, kshell, latex, lua, noweb, pascal, perl, perlpod, php, plain, plsql, python, rapidq, rebol, rest, rst, ruby, shell, tcltk, tex, unknown, unknown_language, vim, vimoutline, xml, xslt.
Note: Shell files have comments that start with #.
Case is ignored in the language names. For example, the following are equivalent:
The @language directive also controls syntax coloring. For language x, the file leo/modes/x.py describes how to colorize the language. To see the languages presently supported, look in the leo/modes directory. There are over 100 such languages.
Sets the line endings for external files. This directive overrides the @string output_newline setting.
The valid forms of the @lineending directive are:
@lineending nl The default, Linux. @lineending cr Mac @lineending crlf Windows @lineending lf Same as ‘nl’, not recommended @lineending platform Same as platform value for output_newline setting.
Sets the path prefix for relative filenames for all @<file> tree.(@nosent也管用呀)
This directive may appear in headlines or body text, and may appear in top-level @<file> nodes.
The path is an absolute path if it begins with c: or /, otherwise the path is a relative paths.
Multiple @path directives may contribute to the path prefix. Absolute paths overrides any ancestor @path directives. Relative paths add to the path prefix.
If no @path directives are in effect, the default path prefix is the directory containing the .leo file.
Within @path and @<file> paths, {{exp}} gets evaluated with the following symbols known: c, g, p, os and sys. For example:
refers to the file abc.py in (absolute path of) the current directory.
Enables line wrapping in Leo’s body pane.
Only the first @wrap or @nowrap directive in a node has any effect.
@wrap may appear in either headlines or body text.
Disables line wrapping the Leo’s body pane.
Only the first @wrap or @nowrap directive in a node has any effect.
@nowrap may appear in either headlines or body text.
@raw starts a section of “raw” text that ends only with the @end_raw directive or the end of the body text containing the @raw directive. Within this range, Leo ignores all section references and directives, and Leo generates no additional leading whitespace.
本文发布于:2024-01-28 06:21:14,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17063940805422.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |