Книга: Learning GNU Emacs, 3rd Edition

8.3.2.5 Using completion

8.3.2.5 Using completion

HTML helper mode supports completion. You type the beginning of a tag and press M-Tab (for tempo-complete-tag).[49] If there's more than one possibility, a window of possible completions appears. Let's say you are working on a bulleted list.

Type: <olM-Tab


Emacs inserts the tags to begin and end the list and the tag for one list item.

Note, however, that completion is sometimes case-sensitive. For example, typing <s M-Tab shows the following completions:

<select                                       <span>

<span style =                                       <strike>
<strong>                                       <samp>

Notice that the <script> tag is missing. But if you try typing <S M-Tab, the script tag and its attributes are inserted, as in:

<SCRIPT TYPE="text/javascript">
</SCRIPT>

The distinction between upper- and lowercase shows that HTML helper mode is moving toward XHTML compliance, but hasn't quite arrived. XHTML requires that all tags be lowercase. On the positive side, note that the attribute is in quotation marks, another XHTML requirement.

Оглавление книги


Генерация: 0.800. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз