Есть ли способ использовать подстановочные знаки в PhraseExpress?

424
Doug

Я использую PhraseExpress v10.1.59d. Предположим, я хочу следующее:

### Introduction ### 

подлежит замене на:

<h3>Introduction</h3> 

Как мне перехватить текст между префиксом и постфиксом (т. Е. Введение)? Какими должны быть поля с содержимым автотекста и фразы ? Я не хочу запрашивать ввод у пользователя. Должен ли я использовать переменные? Или есть какой-то более простой способ? Что-то вроде:

Autotext: ### [*] ### Phrase content: <h3>[*]</h3> 
1
почему входной вопрос исключен, если я могу спросить? Я разместил возможное решение ниже. user 99572 is fine 9 лет назад 0

2 ответа на вопрос

1
user 99572 is fine

You can't use wildcards except for numbers.

Cursor macro

For this case I would recommend the {#cursor} macro.

  • Title: Heading 3 HTML (or something else)
  • Content: <h3>{#cursor}</h3>
  • Autotext: ,h3

After typing ,h3, the cursor will be between the tags. Type your text, then press end.

This has the advantage that you can set your own trigger. Disadvantage: you have to create a phrase for every case.

Autotext macro

If you want to put everything in one phrase and don't need a special trigger character like the comma above, you may want to use the {#autotext} macro in addition to the {#cursor} macro.

  • Title: HTML tags (or something else)
  • Content: <{#autotext}>{#cursor}</{#autotext}>
  • Autotext: h1|h2|h3 (add what you want here, but separate with a vertical line)
-1
Andrea

Work with {#autotext} which inserts the triggering Autotext.

Похожие вопросы