Как я могу сделать строки обтекания gq, начинающиеся с `*`, не вставляя больше звездочек? - PullRequest
0 голосов
/ 01 февраля 2019

Рассмотрим следующую длинную строку.

 * Explain that core policies were created to give applications the ability to control the mapping of (user) threads to cores, and why they might want to do this.

Вот токовый выход gq.

 * Explain that core policies were created to give applications the ability to
 * control the mapping of (user) threads to cores, and why they might want to
 * do this.

Вот желаемый вывод gq

 * Explain that core policies were created to give applications the ability to
   control the mapping of (user) threads to cores, and why they might want to
   do this.

Вот текущее значение моего formatoptions:

formatoptions=tqn

Я просмотрел :help formatoptions и попытался получить желаемое поведение, удалив c из параметров, а также q но, похоже, ни один из них не влияет на вывод gq.

Есть ли способ получить желаемый вывод через некоторые настройки форматирования?


Обновление: один из предложенных ответов состоял в том, чтобы удалить q, но это привело к следующему выводу (также нежелательно).

 * Explain that core policies were created to give applications the ability to
 control the mapping of (user) threads to cores, and why they might want to do
 this.

1 Ответ

0 голосов
/ 01 февраля 2019

Я думаю, вам нужно:

set formatoptions+=n
set comments=fb:*,fb:-
set autoindent

Это позволяет список либо с * или с -.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...