Emacs C / C ++ заполнение комментариев: хотите, чтобы параграфы в комментарии не объединялись

вход

// This is an example, a test, of what I want emacs filling, in this case of C++ comments, to do.
// This is a paragraph that needs to get filled.
//     But I want to start a new paragraph, within the same comment, that is indented,
// but not joined to the previous by filling.
//     And another.

Вот что я получу с моими текущими настройками. Я не хочу это. Присоединяется к абзацам.

// This is an example, a test, of what I want emacs filling,
// in this case of C++ commentrs to do.  This is a paragraph
// that needs to get filled.  But I want to start a new
// paagraph, within the same comment, that is indented, but
// not joined the the previous by filling.  And another.

Вот что я хочу

// This is an example, a test, of what I want emacs filling,
// in this case of C++ comments to do.  This is a paragraph
// that needs to get filled.
//     But I want to start a new paragraph, within the same
// comment, that is indented, but not joined to the previous
// by filling.
//     And another.

Использование адаптивной заливки.

GNU Emacs 24.1.1


Кто-то спросил: «Как emacs отличает ваш нестандартный маркер абзаца от пользователя, который был немного неаккуратен с пробелами? Стандартным маркером для нового абзаца является пустая строка».

Существуют режимы emacs, которые могут правильно заполнять абзацы стандартным английским отступом, где первая строка новых абзацев имеет больше отступа, чем соседние строки тела абзаца.

This is an example, a test, of what I want emacs filling,
in this case of non-comments to do.  This is a paragraph
that needs to get filled.
But I want to start a new paragraph, within the same
comment, that is indented, but not joined to the previous
by filling.
And another.

Все, что я хочу, это расширить это до дополнительного отступа, после префикса заполнения.

4

Решение

Вы можете контролировать это через различные переменные регулярного выражения. Вы, вероятно, можете заставить его делать то, что вы хотите, но это немного «искусство».

0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector