Community
    • Login

    Feature request: Regular expressions in UDL

    Scheduled Pinned Locked Moved General Discussion
    regexregexudlideaideas
    1 Posts 1 Posters 1.8k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Крафтист ОфициальныйК Offline
      Крафтист Официальный
      last edited by

      As no one was looking at my GitHub post, I’d like to post it here.
      If Notepad++ team will implement this feature, I’ll be very glad.
      Because this’ll improve UDL usability and readability.
      Because we would create conditional words, we would create templates for words, we could create such operators like this: when there’s only one char in ’ ’ operator pair, highlight it like blue, but if there’s greater than one char (for example, ‘string’, not ‘s’), highlight it like gray or even not highlight.

      Hello! There’s my ideas for UDL:

      1. REGEX keywords:

      image
      If Regex checkbox was checked, UDL will parse items below like Regular Expressions.
      For example:
      This
      image
      means that in your language will higlight all of english words that are 8 symbols length (only small) and words look, good and super in all cases.
      Regexes must be delimited by new line.

      2. New “styler” window:

      image
      Changed: color shape -> color text field with button that’ll open standard color dialog

      3. New “comment” section:

      image
      Added: documentation comment (have higher priority than standard multiline comment)
      Changed: decimal separator radiobox -> decimal separator text field

      4. New “Folder & Default” section:

      image
      Added: start highlighting & stop highlighting text fields:
      means the code part which to highlight.
      For example PHP: Notepad++ highlights only code in <? and ?> tags.
      <? is a start highlighting and ?> is a stop highlighting.
      Code not in this frame will be black (or like in “Default style”)

      @donho Please look at it.
      For russians (I don’t speak English very well):

      Привет! Это мои идеи для UDL:

      1. Ключевые слова, парсящиеся через регулярку:

      <Картинку смотрите выше>
      Если флажок REGEX отмечен, то будут подсвечиваться не просто ключевые слова, а регулярки. Удобно же :D
      К примеру:
      Это
      <Картинку смотрите выше>
      значит, что в моем языке будут подсвечиваться все слова, написанные на латинице и длиной в 8 символов (только с маленького регистра) и слова look, good и super в любом регистре.
      Регулярки должны разделяться новой строкой.

      2. Новое окно “стиль”:

      <Картинку смотрите выше>
      Изменено: фигура с цветом -> однострочное поле с цветом, а так же кнопкой, открывающей обычный диалог цвета

      3. Новое окно “комментарий”:

      <Картинку смотрите выше>
      Добавлено: комментарий документации (имеет приоритет выше, чем обычный комментарий)
      Изменено: разделитель дробных чисел в виде переключателей -> разделитель дробных чисел в виде однострочного поля

      4. Новое окно “Стандартный”:

      <Картинку смотрите выше>
      Добавлено: поля “Начало подсветки” и “Конец подсветки”.
      Они ограничивают ту часть, которая будет подсвечиваться.
      Приведу пример: PHP. В Notepad++ при выбранном языке PHP будет подсвечиваться код только внутри тегов <? и ?>.
      <? - это “Начало подсветки”, а ?> - это “Конец подсветки”.
      Код вне этих тегов будет подсвечен черным (или выбранным в “Стиль по-умолчанию”)
      Прошу перевести мой кривой английский, или редактированием поста, или в комментариях.

      1 Reply Last reply Reply Quote 1

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors