├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .python-version ├── .ruby-version ├── .stylelintrc.json ├── 404.html ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── README.md ├── _config.yml ├── _includes ├── footer.html ├── fork-note.html ├── head.html ├── header.html ├── meta-theme-color.html ├── nav.html └── toggle-navbar.coffee ├── _layouts ├── default.html ├── home.html ├── page.html └── post.html ├── _sass ├── kbd.scss ├── menu-icon.scss ├── nav-folder-menu.scss └── sticky-footer.scss ├── assets ├── favicon.ico ├── main.coffee └── main.scss ├── coffeelint.json ├── docs ├── comments.md ├── default.md ├── delimiters.md ├── folding_in_code.md ├── folding_in_comment.md ├── introduction.md ├── keywords.md ├── numbers.md └── operators.md ├── images ├── comments_01.png ├── comments_02.png ├── comments_03.png ├── comments_04.png ├── comments_05.png ├── comments_06.png ├── comments_07.png ├── comments_08.png ├── comments_09.png ├── comments_10.png ├── comments_11.png ├── comments_12.png ├── comments_13.png ├── comments_14.png ├── comments_15.png ├── comments_16.png ├── comments_17.png ├── comments_18.png ├── comments_19.png ├── default_01.png ├── default_02.png ├── delimiters_01.png ├── delimiters_02.png ├── delimiters_03.png ├── delimiters_04.png ├── delimiters_05.png ├── delimiters_06.png ├── delimiters_07.png ├── delimiters_08.png ├── delimiters_09.png ├── delimiters_10.png ├── delimiters_11.png ├── delimiters_12.png ├── delimiters_13.png ├── folding_in_code_01.png ├── folding_in_code_02.png ├── folding_in_code_03.png ├── folding_in_code_04.png ├── folding_in_comment_01.png ├── folding_in_comment_02.png ├── folding_in_comment_03.png ├── folding_in_comment_04.png ├── folding_in_comment_05.png ├── folding_in_comment_06.png ├── introduction_01.png ├── introduction_02.png ├── introduction_03.png ├── introduction_04.png ├── introduction_05.png ├── keywords.png ├── numbers_01.png ├── numbers_02.png ├── operators_01.png └── operators_02.png └── index.md /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root=true 5 | 6 | [*] 7 | charset=utf-8 8 | # end_of_line=lf # text=auto in .gitattributes 9 | indent_style=tab 10 | insert_final_newline=true 11 | 12 | [{*.yml,*.yaml,bower.json,package.json,package-lock.json}] 13 | indent_style=space 14 | indent_size=2 15 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.bash text eol=lf 4 | *.fish text eol=lf 5 | *.sh text eol=lf 6 | *.bat text eol=crlf 7 | *.cmd text eol=crlf 8 | *.ps1 text eol=crlf 9 | 10 | *.png binary 11 | *.jpg binary 12 | *.jpeg binary 13 | *.gif binary 14 | *.ico binary 15 | *.svg text 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # this repo 2 | # ========= 3 | 4 | .bundle/* 5 | vendor/* 6 | 7 | # Jekyll default 8 | # ============== 9 | 10 | _site/ 11 | .sass-cache/ 12 | .jekyll-metadata 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "_sass/bootstrap"] 2 | path = _sass/bootstrap 3 | url = https://github.com/twbs/bootstrap.git 4 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.9.13 2 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "indentation": "tab" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | weight: 50 4 | --- 5 | 6 | 19 | 20 |
21 |

404

22 | 23 |

Page not found :(

24 |

The requested page could not be found.

25 |
26 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing The UDL Site 2 | 3 | > *tl;tr* For pull request, please do check **Allow edits from maintainers**, and merge from **your new branch** into **my gh-pages branch**. 4 | 5 | Thank you for efforts on improving this web site. There are two ways to contribute to this repo: 6 | 7 | 1. Simple way: Directly propose file change(s) in Github 8 | 2. Standard way: Fork and pull request model 9 | 10 | ## Proposing File Change 11 | 12 | Sometimes you may want to fix a typo, or do some small changes that doesn't need a test, you can **propose file change** directly. 13 | 14 | > reference: [Editing files in another user's repository - Github Help](https://help.github.com/articles/editing-files-in-another-user-s-repository/) 15 | 16 | ## Modifying This Site 17 | 18 | If you are going to create a new feature or fix a bug, please follow the "fork and pull" model. 19 | 20 | The best way is to edit and preview in your local machine. Running on local machine requires: `git`, `Ruby`, `RubyGems` and `bundler`. In terminal, feel free to run: 21 | 22 | ```shell 23 | git clone 24 | bundle install # to install github-pages gem, jekyll, etc. 25 | source build.sh 26 | bundle exec jekyll serve # http://localhost:4000/udl-documentation/ 27 | ``` 28 | 29 | ## Optional Modification in Your Local Env 30 | 31 | To reduce dev env across machines, Ruby and bundler versions are fixed in config files. If you have difficulty on `bundle update` (Look at you, Windows!), please consider to change some configs: 32 | 33 | - Remove a line in ``: `ruby '~> 2.x.x'` to tentatively use older Ruby. 34 | - Change the bundler version in ``: `BUNDLED WITH 2.x.x` to tentatively use the Bundler version in your system. 35 | 36 | Remember: Don't commit these changes. 37 | 38 | ## Little Notes on Site Design 39 | 40 | For better user experience, here are some directions to follow: 41 | 42 | - Keep the layout clean and simple 43 | - Easy to read; Responsive for difference screen size, including split mode 44 | - Prefer less loading for slow machine or connection over eye candy 45 | - Prefer Github Pages (Jekyll in safe mode) mechanism and practice 46 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | ruby "~> 2.7" 4 | 5 | # In short: 6 | # 7 | # - `bundle install` to install gems using Bundler in Ruby. 8 | # - `bundle exec jekyll serve` to start Jekyll server locally. 9 | # - `bundle update` to update all gems. 10 | # - `bundle lock --update` to update Gemfile.lock. 11 | 12 | gem "github-pages", "227", group: :jekyll_plugins 13 | # i.e. Not gem "jekyll" 14 | 15 | # The github-pages gem already includes the following dependencies: 16 | # - gem "minima" 17 | # - gem "jekyll-feed" 18 | # - gem "kramdown-parser-gfm" 19 | # Therefore, you don't need to include them in this Gemfile. 20 | # Run `bundle exec github-pages versions` to see the list. 21 | 22 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 23 | # and associated library. 24 | install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do 25 | gem "tzinfo", "~> 1.2" 26 | gem "tzinfo-data" 27 | end 28 | 29 | # Performance-booster for watching directories on Windows 30 | gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform? 31 | 32 | # Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem 33 | # do not have a Java counterpart. 34 | gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] 35 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (6.0.5.1) 5 | concurrent-ruby (~> 1.0, >= 1.0.2) 6 | i18n (>= 0.7, < 2) 7 | minitest (~> 5.1) 8 | tzinfo (~> 1.1) 9 | zeitwerk (~> 2.2, >= 2.2.2) 10 | addressable (2.8.0) 11 | public_suffix (>= 2.0.2, < 5.0) 12 | coffee-script (2.4.1) 13 | coffee-script-source 14 | execjs 15 | coffee-script-source (1.11.1) 16 | colorator (1.1.0) 17 | commonmarker (0.23.5) 18 | concurrent-ruby (1.1.10) 19 | dnsruby (1.61.9) 20 | simpleidn (~> 0.1) 21 | em-websocket (0.5.3) 22 | eventmachine (>= 0.12.9) 23 | http_parser.rb (~> 0) 24 | ethon (0.15.0) 25 | ffi (>= 1.15.0) 26 | eventmachine (1.2.7) 27 | execjs (2.8.1) 28 | faraday (2.5.2) 29 | faraday-net_http (>= 2.0, < 3.1) 30 | ruby2_keywords (>= 0.0.4) 31 | faraday-net_http (3.0.0) 32 | ffi (1.15.5) 33 | forwardable-extended (2.6.0) 34 | gemoji (3.0.1) 35 | github-pages (227) 36 | github-pages-health-check (= 1.17.9) 37 | jekyll (= 3.9.2) 38 | jekyll-avatar (= 0.7.0) 39 | jekyll-coffeescript (= 1.1.1) 40 | jekyll-commonmark-ghpages (= 0.2.0) 41 | jekyll-default-layout (= 0.1.4) 42 | jekyll-feed (= 0.15.1) 43 | jekyll-gist (= 1.5.0) 44 | jekyll-github-metadata (= 2.13.0) 45 | jekyll-include-cache (= 0.2.1) 46 | jekyll-mentions (= 1.6.0) 47 | jekyll-optional-front-matter (= 0.3.2) 48 | jekyll-paginate (= 1.1.0) 49 | jekyll-readme-index (= 0.3.0) 50 | jekyll-redirect-from (= 0.16.0) 51 | jekyll-relative-links (= 0.6.1) 52 | jekyll-remote-theme (= 0.4.3) 53 | jekyll-sass-converter (= 1.5.2) 54 | jekyll-seo-tag (= 2.8.0) 55 | jekyll-sitemap (= 1.4.0) 56 | jekyll-swiss (= 1.0.0) 57 | jekyll-theme-architect (= 0.2.0) 58 | jekyll-theme-cayman (= 0.2.0) 59 | jekyll-theme-dinky (= 0.2.0) 60 | jekyll-theme-hacker (= 0.2.0) 61 | jekyll-theme-leap-day (= 0.2.0) 62 | jekyll-theme-merlot (= 0.2.0) 63 | jekyll-theme-midnight (= 0.2.0) 64 | jekyll-theme-minimal (= 0.2.0) 65 | jekyll-theme-modernist (= 0.2.0) 66 | jekyll-theme-primer (= 0.6.0) 67 | jekyll-theme-slate (= 0.2.0) 68 | jekyll-theme-tactile (= 0.2.0) 69 | jekyll-theme-time-machine (= 0.2.0) 70 | jekyll-titles-from-headings (= 0.5.3) 71 | jemoji (= 0.12.0) 72 | kramdown (= 2.3.2) 73 | kramdown-parser-gfm (= 1.1.0) 74 | liquid (= 4.0.3) 75 | mercenary (~> 0.3) 76 | minima (= 2.5.1) 77 | nokogiri (>= 1.13.6, < 2.0) 78 | rouge (= 3.26.0) 79 | terminal-table (~> 1.4) 80 | github-pages-health-check (1.17.9) 81 | addressable (~> 2.3) 82 | dnsruby (~> 1.60) 83 | octokit (~> 4.0) 84 | public_suffix (>= 3.0, < 5.0) 85 | typhoeus (~> 1.3) 86 | html-pipeline (2.14.2) 87 | activesupport (>= 2) 88 | nokogiri (>= 1.4) 89 | http_parser.rb (0.8.0) 90 | i18n (0.9.5) 91 | concurrent-ruby (~> 1.0) 92 | jekyll (3.9.2) 93 | addressable (~> 2.4) 94 | colorator (~> 1.0) 95 | em-websocket (~> 0.5) 96 | i18n (~> 0.7) 97 | jekyll-sass-converter (~> 1.0) 98 | jekyll-watch (~> 2.0) 99 | kramdown (>= 1.17, < 3) 100 | liquid (~> 4.0) 101 | mercenary (~> 0.3.3) 102 | pathutil (~> 0.9) 103 | rouge (>= 1.7, < 4) 104 | safe_yaml (~> 1.0) 105 | jekyll-avatar (0.7.0) 106 | jekyll (>= 3.0, < 5.0) 107 | jekyll-coffeescript (1.1.1) 108 | coffee-script (~> 2.2) 109 | coffee-script-source (~> 1.11.1) 110 | jekyll-commonmark (1.4.0) 111 | commonmarker (~> 0.22) 112 | jekyll-commonmark-ghpages (0.2.0) 113 | commonmarker (~> 0.23.4) 114 | jekyll (~> 3.9.0) 115 | jekyll-commonmark (~> 1.4.0) 116 | rouge (>= 2.0, < 4.0) 117 | jekyll-default-layout (0.1.4) 118 | jekyll (~> 3.0) 119 | jekyll-feed (0.15.1) 120 | jekyll (>= 3.7, < 5.0) 121 | jekyll-gist (1.5.0) 122 | octokit (~> 4.2) 123 | jekyll-github-metadata (2.13.0) 124 | jekyll (>= 3.4, < 5.0) 125 | octokit (~> 4.0, != 4.4.0) 126 | jekyll-include-cache (0.2.1) 127 | jekyll (>= 3.7, < 5.0) 128 | jekyll-mentions (1.6.0) 129 | html-pipeline (~> 2.3) 130 | jekyll (>= 3.7, < 5.0) 131 | jekyll-optional-front-matter (0.3.2) 132 | jekyll (>= 3.0, < 5.0) 133 | jekyll-paginate (1.1.0) 134 | jekyll-readme-index (0.3.0) 135 | jekyll (>= 3.0, < 5.0) 136 | jekyll-redirect-from (0.16.0) 137 | jekyll (>= 3.3, < 5.0) 138 | jekyll-relative-links (0.6.1) 139 | jekyll (>= 3.3, < 5.0) 140 | jekyll-remote-theme (0.4.3) 141 | addressable (~> 2.0) 142 | jekyll (>= 3.5, < 5.0) 143 | jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) 144 | rubyzip (>= 1.3.0, < 3.0) 145 | jekyll-sass-converter (1.5.2) 146 | sass (~> 3.4) 147 | jekyll-seo-tag (2.8.0) 148 | jekyll (>= 3.8, < 5.0) 149 | jekyll-sitemap (1.4.0) 150 | jekyll (>= 3.7, < 5.0) 151 | jekyll-swiss (1.0.0) 152 | jekyll-theme-architect (0.2.0) 153 | jekyll (> 3.5, < 5.0) 154 | jekyll-seo-tag (~> 2.0) 155 | jekyll-theme-cayman (0.2.0) 156 | jekyll (> 3.5, < 5.0) 157 | jekyll-seo-tag (~> 2.0) 158 | jekyll-theme-dinky (0.2.0) 159 | jekyll (> 3.5, < 5.0) 160 | jekyll-seo-tag (~> 2.0) 161 | jekyll-theme-hacker (0.2.0) 162 | jekyll (> 3.5, < 5.0) 163 | jekyll-seo-tag (~> 2.0) 164 | jekyll-theme-leap-day (0.2.0) 165 | jekyll (> 3.5, < 5.0) 166 | jekyll-seo-tag (~> 2.0) 167 | jekyll-theme-merlot (0.2.0) 168 | jekyll (> 3.5, < 5.0) 169 | jekyll-seo-tag (~> 2.0) 170 | jekyll-theme-midnight (0.2.0) 171 | jekyll (> 3.5, < 5.0) 172 | jekyll-seo-tag (~> 2.0) 173 | jekyll-theme-minimal (0.2.0) 174 | jekyll (> 3.5, < 5.0) 175 | jekyll-seo-tag (~> 2.0) 176 | jekyll-theme-modernist (0.2.0) 177 | jekyll (> 3.5, < 5.0) 178 | jekyll-seo-tag (~> 2.0) 179 | jekyll-theme-primer (0.6.0) 180 | jekyll (> 3.5, < 5.0) 181 | jekyll-github-metadata (~> 2.9) 182 | jekyll-seo-tag (~> 2.0) 183 | jekyll-theme-slate (0.2.0) 184 | jekyll (> 3.5, < 5.0) 185 | jekyll-seo-tag (~> 2.0) 186 | jekyll-theme-tactile (0.2.0) 187 | jekyll (> 3.5, < 5.0) 188 | jekyll-seo-tag (~> 2.0) 189 | jekyll-theme-time-machine (0.2.0) 190 | jekyll (> 3.5, < 5.0) 191 | jekyll-seo-tag (~> 2.0) 192 | jekyll-titles-from-headings (0.5.3) 193 | jekyll (>= 3.3, < 5.0) 194 | jekyll-watch (2.2.1) 195 | listen (~> 3.0) 196 | jemoji (0.12.0) 197 | gemoji (~> 3.0) 198 | html-pipeline (~> 2.2) 199 | jekyll (>= 3.0, < 5.0) 200 | kramdown (2.3.2) 201 | rexml 202 | kramdown-parser-gfm (1.1.0) 203 | kramdown (~> 2.0) 204 | liquid (4.0.3) 205 | listen (3.7.1) 206 | rb-fsevent (~> 0.10, >= 0.10.3) 207 | rb-inotify (~> 0.9, >= 0.9.10) 208 | mercenary (0.3.6) 209 | mini_portile2 (2.8.0) 210 | minima (2.5.1) 211 | jekyll (>= 3.5, < 5.0) 212 | jekyll-feed (~> 0.9) 213 | jekyll-seo-tag (~> 2.1) 214 | minitest (5.16.3) 215 | nokogiri (1.13.8) 216 | mini_portile2 (~> 2.8.0) 217 | racc (~> 1.4) 218 | nokogiri (1.13.8-x86_64-linux) 219 | racc (~> 1.4) 220 | octokit (4.25.1) 221 | faraday (>= 1, < 3) 222 | sawyer (~> 0.9) 223 | pathutil (0.16.2) 224 | forwardable-extended (~> 2.6) 225 | public_suffix (4.0.7) 226 | racc (1.6.0) 227 | rb-fsevent (0.11.1) 228 | rb-inotify (0.10.1) 229 | ffi (~> 1.0) 230 | rexml (3.2.5) 231 | rouge (3.26.0) 232 | ruby2_keywords (0.0.5) 233 | rubyzip (2.3.2) 234 | safe_yaml (1.0.5) 235 | sass (3.7.4) 236 | sass-listen (~> 4.0.0) 237 | sass-listen (4.0.0) 238 | rb-fsevent (~> 0.9, >= 0.9.4) 239 | rb-inotify (~> 0.9, >= 0.9.7) 240 | sawyer (0.9.2) 241 | addressable (>= 2.3.5) 242 | faraday (>= 0.17.3, < 3) 243 | simpleidn (0.2.1) 244 | unf (~> 0.1.4) 245 | terminal-table (1.8.0) 246 | unicode-display_width (~> 1.1, >= 1.1.1) 247 | thread_safe (0.3.6) 248 | typhoeus (1.4.0) 249 | ethon (>= 0.9.0) 250 | tzinfo (1.2.10) 251 | thread_safe (~> 0.1) 252 | tzinfo-data (1.2022.3) 253 | tzinfo (>= 1.0.0) 254 | unf (0.1.4) 255 | unf_ext 256 | unf_ext (0.0.8.2) 257 | unicode-display_width (1.8.0) 258 | wdm (0.1.1) 259 | zeitwerk (2.6.0) 260 | 261 | PLATFORMS 262 | ruby 263 | x86_64-linux 264 | 265 | DEPENDENCIES 266 | github-pages (= 227) 267 | http_parser.rb (~> 0.6.0) 268 | tzinfo (~> 1.2) 269 | tzinfo-data 270 | wdm (~> 0.1.0) 271 | 272 | RUBY VERSION 273 | ruby 2.7.2p137 274 | 275 | BUNDLED WITH 276 | 2.3.20 277 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # About This Repo 2 | 3 | This repo is the source of UDL documentation site, that is based on Jekyll and hosted on Github Pages. 4 | 5 | This site serves to demonstrate and document new UDL (User Defined Language), it is a feature of Notepad++ editor through which users can define their own syntax highlighting. 6 | 7 | Original web address: 8 | 9 | ## Contribution 10 | 11 | > *tl;tr* For pull request, please do check **Allow edits from maintainers**, and merge from **your new branch** into **my gh-pages branch**. 12 | 13 | Two ways to contribute to this repo: 14 | 15 | 1. Simple way: Directly propose file change(s) in Github.com 16 | 2. Standard way: Fork and pull request model 17 | 18 | For details, please see [CONTRIBUTING.md](CONTRIBUTING.md). There are some design matters for your reference. 19 | 20 | ## Development Note 21 | 22 | This site is built using Jekyll based on Ruby. To build this site in your local machine, you'll need: 23 | 24 | 1. Ruby v2.7.x: Best version is stated in ".ruby-version" file. 25 | 1. Bundler and Gemfile to install and update gems. Please do `bundle install`. 26 | 1. Optional: If you have problem while `bundle install`, you may want to lock your Python version stated in ".python-version" file. 27 | 1. Bootstrap SCSS via `git submodule update` (Not using RubyGems). 28 | 1. Do `bundle exec jekyll serve` to start your local server. 29 | 30 | ## Other things 31 | 32 | For changes of UDL rules and help, please discuss on [official Notepad\+\+ community](https://community.notepad-plus-plus.org). 33 | 34 | This repo is for documentation only, source code is available at [Notepad\+\+ repo on Github](https://github.com/notepad-plus-plus/notepad-plus-plus). 35 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Welcome to Jekyll! 2 | # 3 | # This config file is meant for settings that affect your whole blog, values 4 | # which you are expected to set up once and rarely edit after that. If you find 5 | # yourself editing this file very often, consider using Jekyll's data files 6 | # feature for the data you need to update frequently. 7 | # 8 | # For technical reasons, this file is *NOT* reloaded automatically when you use 9 | # 'bundle exec jekyll serve'. If you change this file, please restart the server process. 10 | 11 | # Site settings 12 | # These are used to personalize your new site. If you look in the HTML files, 13 | # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. 14 | # You can create any custom variable you would like, and they will be accessible 15 | # in the templates via {{ site.myvariable }}. 16 | 17 | # Site Info 18 | # ========= 19 | 20 | title: UDL docs 21 | tagline: User Defined Language for Notepad++ 22 | description: This site serves to demonstrate and document new UDL 2.1. UDL stands for User Defined Language, it is a feature of Notepad++ editor through which users can define their own syntax highlighting. 23 | original_site_url: https://ivan-radic.github.io/udl-documentation 24 | author: Ivan Radić 25 | author_id: ivan-radic 26 | author_url: https://github.com/ivan-radic 27 | # note: do not change author info, unless ownership of original repo is changed 28 | 29 | # Dev Env 30 | # ======= 31 | 32 | repository: ivan-radic/udl-documentation # required by github-pages gem 33 | baseurl: /udl-documentation # for hosting in Github Pages 34 | host: 0.0.0.0 35 | exclude: 36 | - CONTRIBUTING.md 37 | - README.md 38 | - coffeelint.json 39 | # includes the list by Jekyll defaults: 40 | - Gemfile 41 | - Gemfile.lock 42 | - node_modules 43 | - vendor/bundle/ 44 | - vendor/cache/ 45 | - vendor/gems/ 46 | - vendor/ruby/ 47 | # note: dotfiles are excluded by default 48 | 49 | # Build Settings 50 | # ============== 51 | 52 | theme: minima 53 | npp_ui_green: "#ADCC6E" 54 | markdown: kramdown 55 | show_downloads: false 56 | # plugins: 57 | # - jekyll-feed 58 | 59 | # Information from Official Doc 60 | # ============================= 61 | 62 | # https://help.github.com/en/github/working-with-github-pages/about-github-pages-and-jekyll#plugins 63 | 64 | # GitHub Pages uses plugins that are enabled by default and cannot be disabled: 65 | 66 | # - jekyll-coffeescript 67 | # - jekyll-default-layout 68 | # - jekyll-gist 69 | # - jekyll-github-metadata 70 | # - jekyll-optional-front-matter 71 | # - jekyll-paginate 72 | # - jekyll-readme-index 73 | # - jekyll-titles-from-headings 74 | # - jekyll-relative-links 75 | 76 | # Here are some notable gems. 77 | # To enable an optional plugin, you must add it to your _config.yml file. 78 | 79 | # plugins: 80 | # - jekyll-feed 81 | # - jekyll-redirect-from 82 | # - jekyll-seo-tag 83 | # - jekyll-sitemap 84 | # - jekyll-avatar 85 | # - jemoji 86 | # - jekyll-mentions 87 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /_includes/fork-note.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Note: 5 |

6 |

7 | This is a fork (copy) from original developer, {{ site.author | default: site.github.owner_name | escape }}. Please refer to this link for updated docs. 8 |

9 |

10 | This piece of note will not be rendered in original site. Thanks for your work, developers. 11 |

12 |
13 |
14 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% seo %} 5 | {%- unless site.github.owner_name == site.author_id %} 6 | 7 | {%- endunless %} 8 | 9 | 10 | 11 | {% include meta-theme-color.html %} 12 | 15 | 16 | -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /_includes/meta-theme-color.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /_includes/nav.html: -------------------------------------------------------------------------------- 1 | {% assign pages = site.html_pages | sort: 'weight' %} 2 | {% assign home_position = include.home_position | default: 'top' %} 3 |
    4 | {% if home_position == 'top' and page.url == '/' %} 5 |
  • 6 | Home 7 |
  • 8 | {% elsif home_position == 'top' %} 9 |
  • 10 | Home 11 |
  • 12 | {% endif %} 13 | {% for p in pages %} 14 | {% unless p.weight == 0 %} 15 | {% if p.url == page.url %} 16 |
  • 17 | {{ p.navigation }} 18 |
  • 19 | {% else %} 20 |
  • 21 | {{ p.navigation }} 22 |
  • 23 | {% endif %} 24 | {% endunless %} 25 | {% endfor %} 26 | {% if home_position == 'bottom' and page.url =='/' %} 27 |
  • 28 | Home 29 |
  • 30 | {% elsif home_position == 'bottom' %} 31 |
  • 32 | Home 33 |
  • 34 | {% endif %} 35 |
36 | -------------------------------------------------------------------------------- /_includes/toggle-navbar.coffee: -------------------------------------------------------------------------------- 1 | navbarEle = document.getElementById('navbar-toggle-action') 2 | navbarMenuEle = document.getElementById('navbar-toggle-menu') 3 | 4 | hasClass = (ele, selector) -> 5 | classList = (' ' + ele.className + ' ').replace(/[\n\t\r]/g, " ") 6 | if ele.nodeType is 1 and classList.indexOf(' ' + selector + ' ') > 1 7 | return true 8 | return false 9 | 10 | removeClass = (ele, className) -> 11 | regex = new RegExp('(?:^|\\s)'+ className + '(?:\\s|$)') 12 | ele.className = ele.className.replace(regex, '') 13 | 14 | toggleClass = (ele, className) -> 15 | if hasClass(ele, className) 16 | regex = new RegExp('(?:^|\\s)'+ className + '(?:\\s|$)') 17 | ele.className = ele.className.replace(regex, '') 18 | else 19 | ele.className += ' ' + className 20 | return null 21 | 22 | toggleNavbar = () -> 23 | toggleClass(navbarMenuEle, 'show') 24 | 25 | # debounce function calls based on Remy Sharp's post 26 | # https://remysharp.com/2010/07/21/throttling-function-calls 27 | debounce = (fn, delay) -> 28 | timer = null 29 | return -> 30 | context = this 31 | args = arguments 32 | clearTimeout(timer) 33 | timer = setTimeout(-> 34 | fn.apply(context, args) 35 | , delay) 36 | return null 37 | 38 | handleResize = (event) -> 39 | breakPoint = 992 # Bootstrap large devices (desktops, 992px and up) 40 | resizedWidth = window.innerWidth 41 | # close the navbar menu no matter its status 42 | removeClass(navbarMenuEle, 'show') 43 | if resizedWidth < breakPoint 44 | # expand navbar when click the navbar 45 | navbarEle.addEventListener('click', toggleNavbar) 46 | # set the cursor to pointer because it has action 47 | navbarEle.style.cursor = 'pointer' 48 | else 49 | navbarEle.removeEventListener('click', toggleNavbar) 50 | # set the cursor to default because it has no action anymore 51 | navbarEle.style.cursor = 'default' 52 | return null 53 | 54 | window.addEventListener 'resize', debounce(handleResize, 250) 55 | handleResize() # do it once when page load 56 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 | 52 | 53 | {% include footer.html %} 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /_layouts/home.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {{ content }} 6 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {{ content }} 6 | -------------------------------------------------------------------------------- /_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {{ content }} 6 | -------------------------------------------------------------------------------- /_sass/kbd.scss: -------------------------------------------------------------------------------- 1 | kbd { 2 | color: dimgray; 3 | font-size: 80%; 4 | font-weight: bold; 5 | background-color: white; 6 | border-radius: .3rem; 7 | border: 2px solid gray; 8 | box-shadow: 0 3px gray, 1px -1px 2px 3px rgba(0, 0, 0, .1); 9 | vertical-align: .2rem; 10 | cursor: pointer; 11 | transition: vertical-align .25s; 12 | &:active { 13 | background-color: lightgray; 14 | box-shadow: 0 1px gray, 1px -1px 1px 1px rgba(0, 0, 0, .1); 15 | vertical-align: 0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /_sass/menu-icon.scss: -------------------------------------------------------------------------------- 1 | // pure css menu-icon 2 | 3 | // setup 4 | $menu-icon-height: 16px; // pixel in even number; be pixel perfect 5 | $menu-icon-line-width: 2px; 6 | $menu-icon-line-color: rgba(black, 0.6); 7 | 8 | 9 | $menu-icon-border: $menu-icon-line-width solid $menu-icon-line-color; 10 | $menu-icon-width: $menu-icon-height * 1.5; 11 | $menu-icon-offset: $menu-icon-line-width * 2; 12 | 13 | .menu-icon { 14 | border-top: $menu-icon-border; 15 | width: $menu-icon-width; 16 | height: $menu-icon-height - $menu-icon-line-width; 17 | margin-bottom: $menu-icon-offset; 18 | &:before { 19 | position: absolute; 20 | top: ($menu-icon-height - $menu-icon-line-width) / 2; 21 | left: 0; 22 | width: $menu-icon-width; 23 | height: $menu-icon-height - $menu-icon-line-width; 24 | border-top: $menu-icon-border; 25 | content: ''; 26 | } 27 | &:after { 28 | position: absolute; 29 | top: $menu-icon-height - $menu-icon-line-width; 30 | left: 0; 31 | width: $menu-icon-width; 32 | // height: $menu-icon-height - $menu-icon-line-width; 33 | border-top: $menu-icon-border; 34 | content: ''; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /_sass/nav-folder-menu.scss: -------------------------------------------------------------------------------- 1 | $nav-folder-menu-font-color: slategray !default; 2 | $nav-folder-menu-hover-bg-color: slategray !default; 3 | $nav-folder-menu-hover-font-color: white !default; 4 | $nav-folder-menu-dot-color: slategray !default; 5 | $nav-folder-menu-current-font-color: darkslategray !default; 6 | $nav-folder-line-height: 16px * 3; 7 | $nav-folder-dot-line-size: 1px; 8 | $nav-folder-border-style: $nav-folder-dot-line-size dotted $nav-folder-menu-dot-color; 9 | 10 | .nav-folder-menu { 11 | padding: 1rem 0 2rem 0; 12 | a { 13 | display: block; 14 | width: 100%; 15 | color: $nav-folder-menu-font-color; 16 | &:hover, 17 | &:active { 18 | background-color: $nav-folder-menu-hover-bg-color; 19 | border-radius: 2px; 20 | color: $nav-folder-menu-hover-font-color; 21 | text-decoration: none; 22 | } 23 | } 24 | ul { 25 | display: inline-block; 26 | list-style: none; 27 | width: 100%; 28 | margin: 0; 29 | padding: 0 0 0 2rem; 30 | line-height: $nav-folder-line-height; 31 | } 32 | li { 33 | position: relative; 34 | padding-left: 0.2rem; 35 | font-size: 1.1rem; 36 | &.current { 37 | color: $nav-folder-menu-current-font-color; 38 | font-weight: 500; 39 | } 40 | &.current:hover { 41 | background: none; 42 | cursor: default; 43 | } 44 | &:hover { 45 | background-color: $nav-folder-menu-hover-bg-color; 46 | border-radius: 2px; 47 | } 48 | &:before { 49 | content: ''; 50 | position: absolute; 51 | top: -1px; 52 | left: -15px; 53 | display: block; 54 | width: 11px; 55 | height: 25px; 56 | border-bottom: $nav-folder-border-style; 57 | border-left: $nav-folder-border-style; 58 | } 59 | &:after { 60 | content: ''; 61 | position: absolute; 62 | left: -15px; 63 | bottom: 2px; 64 | display: block; 65 | height: 21px; 66 | border-left: $nav-folder-border-style; 67 | } 68 | &:first-child { 69 | margin: 0 0 0 -1.33rem; 70 | &:before { 71 | display: none; 72 | } 73 | &:after { 74 | display: none; 75 | } 76 | } 77 | &:last-child { 78 | &:after { 79 | display: none; 80 | } 81 | } 82 | } 83 | } 84 | .nav-folder-menu-bottom { 85 | padding: 1.5rem 0; 86 | li { 87 | &:before { 88 | top: 16px * 1.5; 89 | height: 27px; 90 | border-top: $nav-folder-border-style; 91 | border-bottom: none; // override .nav-folder-menu 92 | } 93 | &:after { 94 | bottom: 25px; 95 | } 96 | &:first-child { 97 | margin: 0; 98 | &:before { 99 | display: block; // override .nav-folder-menu 100 | } 101 | } 102 | &:last-child { 103 | margin: 0 0 0 -1.33rem; 104 | &:before { 105 | display: none; 106 | } 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /_sass/sticky-footer.scss: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | height: 100%; 4 | } 5 | 6 | body { 7 | display: flex; 8 | flex-direction: column; 9 | } 10 | 11 | .sticky-footer-content { 12 | flex: 1 0 auto; 13 | } 14 | 15 | .sticky-footer { 16 | flex-shrink: 0; 17 | } 18 | -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/assets/favicon.ico -------------------------------------------------------------------------------- /assets/main.coffee: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | {% include toggle-navbar.coffee %} 5 | -------------------------------------------------------------------------------- /assets/main.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | // favored Notepad++ styles 5 | // ======================== 6 | 7 | $npp-green: {{ site.npp_ui_green }}; 8 | $npp-orange: #e2911e; 9 | $npp-green-title: #2c3f18; // rgba(0, 0, 0, 0.7) on $npp-green 10 | $npp-green-subtitle: #516731; // rgba(0, 0, 0, 0.5) on $npp-green 11 | $npp-line-number-bar-bg-color: #e4e4e4; 12 | $npp-folding-bar-bg-color: hsl(0, 0%, 95%); // inspect by human eye 13 | $npp-status-bar-bg-color: #f0f0f0; // unused; for record only 14 | $body-border-style: 6px solid $npp-green; 15 | $p-margin-space: 1.5rem; 16 | 17 | // override Bootstrap default styles 18 | 19 | $body-bg: $npp-green; 20 | $theme-colors: ( 21 | "primary": $npp-green, 22 | "secondary": $npp-orange 23 | ); 24 | $link-color: $npp-orange; 25 | $link-hover-color: $npp-orange; 26 | $headings-font-family: 27 | // the font being used by NPP official website 28 | "Miriam Libre", 29 | // copy from $font-family-sans-serif in Bootstrap 30 | -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 31 | $paragraph-margin-bottom: $p-margin-space; 32 | $headings-margin-bottom: $p-margin-space; 33 | 34 | // override nav-folder-menu defaults 35 | $nav-folder-menu-font-color: $npp-green-subtitle; 36 | $nav-folder-menu-hover-bg-color: $npp-green-subtitle; 37 | $nav-folder-menu-dot-color: $npp-green-subtitle; 38 | $nav-folder-menu-current-font-color: $npp-green-title; 39 | 40 | // Miriam Libre weighted 700: the font used in NPP official webite 41 | @import url("https://fonts.googleapis.com/css2?family=Miriam+Libre:wght@700&display=swap"); 42 | 43 | @import "bootstrap/scss/bootstrap"; 44 | @import "menu-icon"; 45 | @import "nav-folder-menu"; 46 | @import "sticky-footer"; 47 | @import "kbd"; 48 | 49 | 50 | // quick fix 51 | // ========= 52 | 53 | body { 54 | font-size: 16px; 55 | } 56 | 57 | img { 58 | display: block; 59 | margin-left: auto; 60 | margin-right: auto; 61 | max-width: 100%; 62 | text-align: center; 63 | } 64 | 65 | .below-header-fix { 66 | margin-top: 3rem; 67 | padding-top: 1rem; 68 | } 69 | 70 | .navbar-row { 71 | position: relative; 72 | align-items: center; 73 | display: flex; 74 | flex-wrap: wrap; 75 | width: 100%; 76 | } 77 | 78 | // intentionally copy the styles from Github; easier to identify as code block 79 | .main code { 80 | margin: 0; 81 | padding: 0.2rem 0.4rem; 82 | border-radius: 3px; 83 | background-color: #eff0f1; // same as stack-overflow 84 | color: #24292e; 85 | } 86 | .main pre { 87 | margin-bottom: $p-margin-space; 88 | padding: 1rem; 89 | border-radius: 3px; 90 | line-height: 1.45; 91 | background-color: #eff0f1; // same as stack-overflow 92 | } 93 | .main pre code { 94 | padding: 0; 95 | border: none; 96 | background-color: transparent; 97 | } 98 | 99 | 100 | // site styles 101 | // =========== 102 | 103 | .site .navbar { 104 | .navbar-brand { 105 | font-family: $headings-font-family; 106 | color: $npp-green-title; 107 | } 108 | .navbar-text { 109 | color: $npp-green-subtitle; 110 | font-weight: 500; 111 | } 112 | } 113 | 114 | .nav-sidebar { 115 | max-width: 310px; /* inc padding of 15px each */ 116 | } 117 | 118 | .line-number-sidebar { 119 | margin-right: auto; 120 | width: 5rem; 121 | height: 100%; 122 | border-right: 1.5rem solid $npp-folding-bar-bg-color; 123 | background-color: $npp-line-number-bar-bg-color; 124 | &-container { 125 | min-height: 98vh; 126 | } 127 | } 128 | 129 | .note { 130 | margin-bottom: 1rem; 131 | padding: 1rem; 132 | border-left: 0.25rem solid khaki; 133 | background-color: lightgoldenrodyellow; 134 | } 135 | 136 | #navbar-toggle { 137 | &-action { 138 | cursor: pointer; 139 | } 140 | &-menu { 141 | max-height: 90vh; 142 | overflow: auto; 143 | } 144 | } 145 | 146 | // override styles in Bootstrap's Reboot 147 | .main ul, 148 | .main ol, 149 | .main dl { 150 | margin-bottom: $p-margin-space; 151 | } 152 | 153 | .sticky-sidebar { 154 | position: sticky; 155 | top: 6rem; 156 | } 157 | 158 | .site-footer { 159 | background-color: #6b5000; 160 | color: wheat; 161 | p { 162 | margin-bottom: 0; 163 | font-size: .8rem; 164 | } 165 | .nav { 166 | margin-bottom: .6rem; 167 | text-align: center; 168 | } 169 | .nav-item + .nav-item { 170 | // margin-left: 1rem; 171 | :before { 172 | content: "|"; 173 | color: wheat; 174 | margin: .5rem; 175 | } 176 | } 177 | } 178 | 179 | // Small devices (landscape phones, 576px and up) 180 | @media (min-width: 576px) { 181 | body { 182 | border-top: $body-border-style; 183 | border-right: $body-border-style; 184 | border-left: $body-border-style; 185 | } 186 | .site-footer { 187 | border-bottom: $body-border-style; 188 | } 189 | } 190 | 191 | // large devices (landscape tablets, 992px and up) 192 | @media (min-width: 992px) and (min-height: 576px) { 193 | .site-footer { 194 | position: fixed; 195 | bottom: 0; 196 | left: 0; 197 | right: 0; 198 | border-right: $body-border-style; 199 | border-left: $body-border-style; 200 | } 201 | // add bottom margin 202 | .below-header-fix { 203 | margin-bottom: 10rem; 204 | padding-bottom: 1rem; 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /coffeelint.json: -------------------------------------------------------------------------------- 1 | { 2 | "max_line_length": { 3 | "level": "warn" 4 | }, 5 | "indentation": { 6 | "value": 1, 7 | "level": "warn" 8 | }, 9 | "no_tabs": { 10 | "level": "ignore" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /docs/comments.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 80 3 | navigation: Comments 4 | permalink: /comments/ 5 | --- 6 | 7 | # Comments 8 | 9 | This section describes new options user have when defining comments. 10 | 11 | ![]({{ site.baseurl}}/images/comments_01.png) 12 | 13 | Comments handling in UDL 2.1 changed significantly.
14 | Let's start with the most obvious part, the GUI. 15 | 16 | 17 | ## Line comments 18 | 19 | Line comments now support three set of keywords: open, continue and close. 20 | 21 | UDL2.1 has an option to force line comments to start at the beginning of line.
22 | When this option is switched on, line comments will be recognized only if they are located at the beginning of line. Anywhere else, they will be treated as default text. 23 | 24 | ### Open 25 | 26 | In most languages this is the only one you'll need. Define your comment line starters here: `#`, `//`, `!`
27 | Example: 28 | 29 | ``` 30 | // line comment 31 | ``` 32 | 33 | ### Continue 34 | 35 | If this string is at the end of line comment, than line comment extends to following line: e.g. `\`
36 | Example: 37 | 38 | ``` 39 | // line comment \ 40 | that extends to next line 41 | ``` 42 | ### Close 43 | 44 | This is a very rare feature, but in some languages comments have start and end markers, but if end marker is missing, a comment automatically becomes a line comment and ends at the end of current line. This is where you need to define close string, e.g.: `!`
45 | Example: 46 | 47 | ``` 48 | // line comment ! text that doesn't belong to a comment 49 | ``` 50 | 51 | This is a very "basic" demonstration, but it serves its purpose well. 52 | 53 | ![]({{ site.baseurl}}/images/comments_02.png) 54 | 55 | - line 1, this is what line comments look like in most languages. They start somewhere, and end at the EOL (end of line) 56 | - line3, if your language supports line comment continuation to next line, like in this C++like example, you may define that too 57 | - line 6, this is demonstrator of a special case where line comments have a closing string. So, they end at EOL or closing string whichever is reached first. 58 | 59 | 60 | ## Comments 61 | 62 | Comments are defined in a way that is similar to UDL 1.0. You just create a list of strings that represent comment start position and comment end position. But there is a hidden feature here. In picture 1, notice vertical position of Open and Close edit boxes! Notice how I defined two separate comment pairs and how they align vertically. I wanted to define these two comment sets: 63 | 64 | ``` 65 | /* this is a C language comment */ 66 | /+ this is a D language comment +/ 67 | ``` 68 | 69 | Now, lets try to nest these two comment types, to see the difference between UDL 1.0 and UDL 2.x 70 | 71 | This is an UDL 1.0 screen capture. 72 | 73 | ![]({{ site.baseurl}}/images/comments_03.png) 74 | 75 | Comments are underlined so it would be more obvious where they end. Notice how `*/` string always ends a comment!! This happens because UDL 1.0 simply goes through a list of comment close strings, and as soon as it finds the first one to match, it accepts it as a comment end. UDL 1.0 has no way to connect matching open/close strings. It simply settles with the first one it can find, which works great if you have just one pair. If you have more, nesting will break, as demonstrated in line 4. 76 | 77 | This is an UDL 2.1 screen capture. 78 | 79 | ![]({{ site.baseurl}}/images/comments_04.png) 80 | 81 | Notice how in line 4, UDL 2.1 correctly highlights D-style comments, even if there is a `*/` within comment. This is possible because UDL 2.1 uses indexes to match correct close string. When Open string is found, its index is recorded internally (e.g. for `/+`, index is 1). That means that a comment can be closed only by a Close string of the same index. 82 | 83 | So, users can just vertically align open and close strings, and UDL 2.1 will take care of the rest. 84 | 85 | 86 | ## Nesting of comments 87 | 88 | ### Example 1 89 | 90 | Comments in UDL 2.1 support nesting. The only thing user needs to do is to select which keyword type can be nested. Do this by selecting appropriate check box in nesting section of Styler dialog. In our first example we are going to allow nesting of comments within comments. 91 | 92 | ![]({{ site.baseurl}}/images/comments_05.png) 93 | 94 | ![]({{ site.baseurl}}/images/comments_06.png) 95 | 96 | As you can see, UDL 2.1 happily allows you to have nested comments. But there is a better way to do the same thing as demonstrated in example 2. 97 | 98 | ### Example 2 99 | 100 | ![]({{ site.baseurl}}/images/comments_07.png) 101 | 102 | 1. Define Delimiter 1 exactly the same as Comments 103 | 2. Allow Delimiter 1 to have nested Comments 104 | 3. Likewise, allow Comments to have nested Delimiter 1 105 | 4. Delimiter 1 and Comments will have similar but slightly different color 106 | 107 | ![]({{ site.baseurl}}/images/comments_08.png) 108 | 109 | ![]({{ site.baseurl}}/images/comments_09.png) 110 | 111 | And voila !!!
112 | Now your nesting is not only allowed, it is also highlighted.
113 | Call me a geek that gets excited over nothing, but I think this is really cool :-) 114 | 115 | ![]({{ site.baseurl}}/images/comments_10.png) 116 | 117 | ### Example 3 118 | 119 | In this example we will highlight nested line comments.
120 | Just like in example 2, we define similar yet different styles, and allow nesting of Line comments within Comments. 121 | 122 | ![]({{ site.baseurl}}/images/comments_11.png) 123 | 124 | ### Example 4 125 | 126 | If you want Line comments to look like Comments, but to be highlighted when nested (and only when nested), that can be done too. 127 | 128 | ![]({{ site.baseurl}}/images/comments_12.png) 129 | 130 | Just define Delimiter 2 (any delimiter will do, I'll use this one for demonstration) like in previous picture. "((EOL))" is a special keyword that is expanded to a vector of three strings: 131 | 132 | ``` 133 | \r\n 134 | \n 135 | \r 136 | ``` 137 | 138 | So, that every new line combination is covered.
139 | "((EOL))" has been introduced just for this reason. It allows users to define Delimiter equivalent of Line comments. 140 | 141 | Notice how I wrapped EOL with special **double brace operator**. This operator has a special meaning in UDL 2.1 and it is explained in more detail in [Delimiters section]({{ site.baseurl }}/delimiters/). For this example it is enough to remember that it **expands EOL into an end of line character**. 142 | 143 | As you can see, nesting of delimiters that imitate line comments works just as good. 144 | 145 | ![]({{ site.baseurl}}/images/comments_13.png) 146 | 147 | ### Example 5 148 | 149 | 1. define standard C++ line comments 150 | 1. allow nesting of Delimiter1 within line comments. 151 | 1. define Delimiter1 as in this example 152 | 1. Notice how you need to define separate EOL for each open keyword (and make sure EOL's are separated with spaces !!) 153 | 1. now you have your TODO's highlighted 154 | 155 | ![]({{ site.baseurl}}/images/comments_14.png) 156 | 157 | ![]({{ site.baseurl}}/images/comments_15.png) 158 | 159 | 160 | ## Folding of comments 161 | 162 | If you were not scrolling too fast, you might have noticed a small check box at the top: Allow folding of comments 163 | 164 | Such small feature, but it took so much time to develop it.
165 | Let's explore it. 166 | 167 | ![]({{ site.baseurl}}/images/comments_16.png) 168 | 169 | ### Example 6 170 | 171 | When option Allow folding of comments is set, UDL 2.1 automatically tracks comment lines and allows folding of two or more consecutive comment lines. 172 | 173 | - line 1, two consecutive line comments can be folded 174 | - line4, a multi-line comment can be folded 175 | - line 8, comments can be mixed with line comments 176 | - line 11, another multi-line comment, this time it contains some non comment text in first and last line 177 | 178 | Notice how last example can be folded only in "pure" comment lines. Folding of comments never folds non comment text !! 179 | 180 | ![]({{ site.baseurl}}/images/comments_17.png) 181 | 182 | ### Example 7 183 | 184 | If you want to document code with heavy use of comments, trade off is code readability. There will be a lot of scrolling. A lot !! 185 | 186 | ![]({{ site.baseurl}}/images/comments_18.png) 187 | 188 | And UDL 2.1 is here to help. 189 | 190 | Set Allow folding of comments, and you'll get rid of annoying comments simply by folding them. Just like in the next picture. 191 | 192 | ![]({{ site.baseurl}}/images/comments_19.png) 193 | 194 | And there you go.
195 | No more unnecessary scrolling :-) 196 | 197 | On the other hand, if you find this feature tiresome, just disable it. 198 | 199 | ## Conclusion 200 | 201 | As you can see, comment handling in UDL 2.1 changed quite a bit from UDL 1.0.
202 | I tried to make it intuitive and easy, and I hope users will like it as much as I do. 203 | -------------------------------------------------------------------------------- /docs/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 20 3 | navigation: Default 4 | permalink: /default/ 5 | --- 6 | 7 | # Defaults 8 | 9 | This is the simplest option. You can only change styler of default text. 10 | 11 | ![]({{ site.baseurl}}/images/default_01.png) 12 | 13 | After you click "Styler" button, you will see "Styler Dialog" window. 14 | 15 | ![]({{ site.baseurl}}/images/default_02.png) 16 | 17 | Font options did not change from UDL 1.0, you can select fonts used, their size or color, background color, as well as bold, italic and underline options. Nesting options are disabled as default text cannot have nested sub-strings. Generally, if some keyword type does not support nesting, than nesting option in Styler dialog will be grayed out (disabled). 18 | -------------------------------------------------------------------------------- /docs/delimiters.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 90 3 | navigation: Delimiters 4 | permalink: /delimiters/ 5 | --- 6 | 7 | # Delimiters 8 | 9 | This section describes new options users have when defining delimiters. 10 | 11 | Delimiters changed a lot in UDL 2.1.
12 | The most obvious difference is the GUI, so we'll start with that. 13 | 14 | ![]({{ site.baseurl}}/images/delimiters_01.png) 15 | 16 | Just like in case of keywords, number of delimiter lists has been expanded to eight (as suggested by Don), if more is needed, please state so in discussion on Notepad++ forum. And each Delimiter now accepts its own Escape char. There have been numerous changes under the hood also, and we'll cover them here through a series of short examples. 17 | 18 | 19 | ## Usage examples 20 | 21 | ### Example 1 22 | 23 | First example is a simple C++ string.
24 | Nothing fancy here. 25 | 26 | ![]({{ site.baseurl}}/images/delimiters_02.png) 27 | 28 | ![]({{ site.baseurl}}/images/delimiters_03.png) 29 | 30 | ### Example 2 31 | 32 | This is little more interesting.
33 | It is an attempt to define a line comment. 34 | 35 | Notice how UDL's special operator "(( ))" **transforms string "EOL" into an end of line character**. In fact it transforms it into a vector of three strings: 36 | 37 | ``` 38 | \r\n 39 | \n 40 | \r 41 | ``` 42 | 43 | So, it will find a line end regardless of your file format (unix/dos/osx) 44 | 45 | ![]({{ site.baseurl}}/images/delimiters_04.png) 46 | 47 | ![]({{ site.baseurl}}/images/delimiters_05.png) 48 | 49 | ### Example 3 50 | 51 | Another interesting example.
52 | C++ line comments support continuation to the next line, and there is just one continue character: backslash `\` 53 | 54 | But there is a catch, C++ standard also defines something call digraphs and trigraphs. And a trigraph sequence for backslash is a `??/` (question mark twice than forward slash) 55 | 56 | So, to have complete definition of C++ line comments, one must define both continue sequences. In UDL 2.1 you do that with special operator "(( ))". So, if two or more strings are defined inside of a special operator "(( ))", they are interchangeable. 57 | 58 | ![]({{ site.baseurl}}/images/delimiters_06.png) 59 | 60 | ![]({{ site.baseurl}}/images/delimiters_07.png) 61 | 62 | ### Example 4 63 | 64 | In this example we define two different line comments. 65 | 66 | ``` 67 | first one is C++ style: // 68 | second one is Python style: # 69 | ``` 70 | 71 | First thing to notice is how I aligned everything vertically.
72 | In general, white space is not important when defining keywords, so you can use it any way you like it. It will be filtered out automatically. 73 | 74 | Second thing to understand is grouping of Continue characters.
75 | C++ line comment (the first group), defines two continue characters, Python line comment defines just one. 76 | 77 | By using grouping with operator "(( ))" I was able to keep the logic of indexing and vertical aligning (both explained in [comments section]({{ site.baseurl }}/comments/)) and to make sure that "??/" applies only to C++ line comments. 78 | 79 | ![]({{ site.baseurl}}/images/delimiters_08.png) 80 | 81 | ![]({{ site.baseurl}}/images/delimiters_09.png) 82 | 83 | ### Example 5 84 | 85 | If you need to use "((" and "))" as delimiter's open/close keywords, just define them inside of "(( ))" operator.
86 | Also this is the only exception of the rule that **whitespace can be used freely**. When defining "))" inside of special operator "(( ))" you must "glue" four consecutive close braces. Otherwise you will define an empty keyword set. 87 | 88 | ![]({{ site.baseurl}}/images/delimiters_10.png) 89 | 90 | ![]({{ site.baseurl}}/images/delimiters_11.png) 91 | 92 | 93 | ## Nesting of delimiters 94 | 95 | Comments and delimiters support nesting, and this can be used to define some complex operations. 96 | 97 | ### Example 6 98 | 99 | CoffeScript language defines its own regular expression syntax that is called hereRegex.
100 | Funny thing about hereRegex syntax is that supports comments inside regular expression, but: 101 | 102 | ``` 103 | # this is a comment 104 | #{ this is not a comment 105 | ``` 106 | 107 | Comments within hereRegex are everything after `#` character, but only if it is not followed by `{`. How do we solve this puzzle in UDL 2.1? 108 | 109 | We need to define three delimiters. 110 | 111 | - Delimiter 1 represents hereRegex 112 | - Delimiter 2 represents special case when `#` followed by a `{` does not start a line comment 113 | - Delimiter 3 are line comments inside hereRegex 114 | 115 | Delimiter 1 and 2 have the same styling (so they would blend) and Delimiter 3 has a different style. Also, Delimiter 1 allows nesting of Delimiter 2 and 3. When all is set, hereRegex is highlighted as expected, with line comments in separate style. 116 | 117 | This is possible because UDL 2.1 checks Delimiters by starting with Delimiter 1 and going up to Delimiter 8. When it reaches position `#{` it detects Delimiter 2 simply because it tests for Delimiter 2 before testing for Delimiter 3. 118 | 119 | So, when Delimiters overlap, always put longer strings first ! 120 | 121 | ![]({{ site.baseurl}}/images/delimiters_12.png) 122 | 123 | ![]({{ site.baseurl}}/images/delimiters_13.png) 124 | -------------------------------------------------------------------------------- /docs/folding_in_code.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 30 3 | navigation: Folding in code 4 | permalink: /folding-in-code/ 5 | --- 6 | 7 | # Folding in code 8 | 9 | Folding in code is quite different in UDL 2.1. Instead of two keyword sets (open and close), now we have three keyword sets (open, middle and close). Also, there are two Folding in code groups: one for [forward (style1)]({{ site.baseurl }}/introduction/) and one for [backward (style2)]({{ site.baseurl }}/introduction/) search. 10 | 11 | ## Example 1 12 | 13 | This is a typical C++ folding definition.
14 | Curly braces represent folding points in the code and preprocessor is also supported (for this demo not all statements were defined) 15 | 16 | ![]({{ site.baseurl}}/images/folding_in_code_01.png) 17 | 18 | There are two important things here.
19 | As you can see both Folding 1 and Folding 2 create folding points, but they work differently. 20 | 21 | - Folding 1 (the curly braces) is detected using forward search. It means these keywords can be "glued" to some other keyword. In this case opening curly brace stands next to closing round brace, and in line 12 around word `int` 22 | - Folding 2 (preprocessor stuff) works when surrounded by white space, but not when glued to word `UNICODE`, as demonstrated in line 14 23 | 24 | ![]({{ site.baseurl}}/images/folding_in_code_02.png) 25 | 26 | Note: forward and backward search concept is explained in more detail in [Introduction]({{ site.baseurl }}/introduction/) page.
27 | You should read that part if you haven't already. 28 | 29 | ## Example 2 30 | 31 | UDL 2.1 will automatically create middle folding point if open folding point is followed by a close folding point on the same line. 32 | 33 | ![]({{ site.baseurl}}/images/folding_in_code_03.png) 34 | 35 | ## Example 3 36 | 37 | Use of multi-part keywords is supported in Folder in code 2, as you can see in this example. 38 | 39 | ![]({{ site.baseurl}}/images/folding_in_code_04.png) 40 | -------------------------------------------------------------------------------- /docs/folding_in_comment.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 40 3 | navigation: Folding in comment 4 | permalink: /folding-in-comment/ 5 | --- 6 | 7 | # Folding in comment 8 | 9 | This keyword set is new in UDL 2.1.
10 | It allows you to fold anything as long as your language supports comments.
11 | Let's demonstrate it by using C++ comments. 12 | 13 | ## Example 1 14 | 15 | ![]({{ site.baseurl}}/images/folding_in_comment_01.png) 16 | 17 | Note: When selecting keywords that turn comments into folding points, it is important to select unique keywords. Don't use stuff that is part of your source code, that will create unexpected folding points when you comment out parts of your source code. 18 | 19 | ![]({{ site.baseurl}}/images/folding_in_comment_02.png) 20 | 21 | Notice how comments that have "folding in comment" keywords embedded in them, create folding points in your code. I even mixed line comments and normal comments, and it works. So, any comment with "folding in comment" keywords embedded can become a folding point. And remember, these are just comments, you can put them anywhere you like. In fact, you can use this feature to organize your code. For one way to do it, see next example. 22 | 23 | ## Example 2 24 | 25 | Let's steal some ideas from C#. Our code will be organized in "regions". 26 | 27 | ![]({{ site.baseurl}}/images/folding_in_comment_03.png) 28 | 29 | One keyword group will be anything that starts with "at sign" `@`, so check Prefix mode option. 30 | 31 | ![]({{ site.baseurl}}/images/folding_in_comment_04.png) 32 | 33 | We'll define comments as standard C++ comments: 34 | 35 | ``` 36 | /* cpp comment */ 37 | // cpp line comment 38 | ``` 39 | 40 | The important thing here is to allow nesting of keyword group two (words that start with `@` sign) 41 | 42 | ![]({{ site.baseurl}}/images/folding_in_comment_05.png) 43 | 44 | Finally, the magic happens.
45 | I organized my code in three logical groups: 46 | 47 | - initialization 48 | - execution 49 | - clean up 50 | 51 | These three keywords are not defined anywhere, I can call my regions anything I like, as long as I use `@` prefix. 52 | 53 | Notice how `region` and `end` keywords have the same color as comments, but `@region_name` uses distinct color to be easily noticeable. 54 | 55 | ![]({{ site.baseurl}}/images/folding_in_comment_06.png) 56 | 57 | Folding in comment keywords support multi-part keywords too. 58 | 59 | In the end, I would just like to say that, if used properly, this could be the single most useful feature of UDL 2.1. 60 | -------------------------------------------------------------------------------- /docs/introduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 15 3 | navigation: Introduction 4 | permalink: /introduction/ 5 | --- 6 | 7 | # Introduction to UDL 2 code parser 8 | 9 | This section explains what "backward" and "forward" search is.
10 | Users should understand this part before proceeding to read about other UDL 2.1 features. 11 | 12 | 13 | ## Introduction to UDL 1.0 internal logic 14 | 15 | ![]({{ site.baseurl}}/images/introduction_01.png) 16 | 17 | In this picture you can see a set of three keywords.
18 | How did UDL 1.0 recognized each one?
19 | The simplest explanation would be something like this: 20 | 21 | 1. identification starts in position 0, so first "search start point" is set to 0 22 | 1. when first space char is reached (in position 5), UDL 1.0 detects new "word" (characters from position 0 through position 5), and tries to compare string that consists of characters on positions from 0 to 5 (in this case word is `first`), with UDL's own keyword list. 23 | 1. if it detects a keyword, it sets appropriate styler (in this case keyword1 styler), and sets new "search start point" one char after space, i.e. position 6. 24 | 1. now it repeats the process for other keywords. 25 | 26 | One obvious limitation is that you have to have space around your keywords, otherwise UDL 1.0 won't recognize them. There were some exceptions from this rule, e.g. operators in UDL 1.0 are just one charecter long, so it was possible to test each character directly and detect an operator. But generally, keywords had to be surounded by whitespace to be correctly recognized. 27 | 28 | I call this approach "backwards" detection, because **keywords are detected in backward direction** (e.g. keyword `first` is detected only after UDL reaches position 5). And yes, I do understand what "backwards" means in English, but I am not a native speaker, so bear with me, I mean nothing offensive. 29 | 30 | 31 | ## Introduction to UDL 2.1 internal logic 32 | 33 | ![]({{ site.baseurl}}/images/introduction_02.png) 34 | 35 | What we have here is a combination of two keywords (`first` and `second`) connected by a two-character operator `<<`, and closed with another operator `;` (Note that operators are underlined so you could see them more easily). So, how does UDL 2.1 work then? Again, this is just a simplified description: 36 | 37 | 1. identification starts in position 0, so first "search start point" is set to 0 38 | 1. in each position UDL 2.1 performs a "forward" scan of operators. 39 | 1. when UDL reaches position 5 (first `<` character), it detects an operator. 40 | 1. now UDL 2.1 does two things: 41 | - it performs "backward" scan (the same way UDL 1.0 does it) by comparing everything from last "search start point" until current position (in this case string `first`) and it correctly identifies it as a keyword. 42 | - it applies keyword styler (for `first`) and a styler for operator `<<`, and sets new "search start point" to position 7 (letter `s`) 43 | 1. in the same way UDL 2.1 detects second operator `;` with "forward" search and second keyword `second` with backward search. 44 | 45 | So, UDL 2.1 uses a combination of "forward" and "backward" search in order to detect keywords that are "glued" together. And all keywords in UDL 2.1 are diveded in two basic groups which I call "backwards" and "forwards" (feel free to suggest a better name for these). 46 | 47 | 48 | ## Complete list of "backwards" and "forwards" keywords 49 | 50 | Backwards: 51 | 52 | - Keywords 1-8 53 | - Folding in comment 54 | - Operators2 55 | 56 | Forwards: 57 | 58 | - Folding in code 59 | - Comments 60 | - Operators1 61 | - Delimiters 1-8 62 | - Numbers 63 | 64 | 65 | ## More on "forward" and "backward" detection logic 66 | 67 | Understanding dual logic of UDL 2.1 (detecting keyword in both backward and forward direction) is very important. So, before we proceed with details of UDL 2.1, let's first explain why is it important and where things can go wrong. The simplest way to demonstrate "backward" and "forward" logic is to define two sets of operators: 68 | 69 | C++ style: 70 | 71 | ``` 72 | && || ! 73 | ``` 74 | 75 | Python style: 76 | 77 | ``` 78 | and or not 79 | ``` 80 | 81 | ### Forward search example 82 | 83 | ![]({{ site.baseurl}}/images/introduction_03.png) 84 | 85 | C++ boolean operators are special characters. They can never be part of variable name. That's why they can be "glued" to preceding or following keyword. And this is demonstrated in line three. There are no white spaces in line three, but each operator is recognized by UDL 2.1. 86 | 87 | Let's follow what happens in the background. For example, we'll focus on `&&` operator in line three. 88 | 89 | 1. when UDL reaches first `&` character it performs "forward" search and it detects that next two characters form an operator. 90 | 1. at this point UDL does not care what follows after `&&` it simply treats `&&` as an operator 91 | 92 | Let's repeat that again.
93 | In C++ an operator is always an operator and can never be something else, like part of another keyword or variable name. So, in forward search, there are no false positives, and it is not important what follows before or after forward keyword. 94 | 95 | ### Backward search example 96 | 97 | ![]({{ site.baseurl}}/images/introduction_04.png) 98 | 99 | ![]({{ site.baseurl}}/images/introduction_05.png) 100 | 101 | Python boolean operators are normal English words and or not, very similar to other Python keywords. Unlike in C++, Python operators can easily be part of other keywords or variable names. 102 | 103 | So, if we define Python operators as forward search keywords, we end up with more than we asked for. Let's explain first picture (again operators are underlined to be easily recognized): 104 | 105 | - in line one, Python operators work as expected 106 | - in line three, operators are highlighted even if syntax is not correct 107 | - in lines 5,6,7, operators are detected in random words that have `and` or `not` in them 108 | 109 | Obviously, this is not acceptable. 110 | 111 | That's why I defined a two sets of operators: Operators1 and Operators2: 112 | 113 | - Operators1 are found using forward search. 114 | - Operators2 are found using backward search. 115 | 116 | Second picture shows what happens when we redefine Python operators as Operators2. This time around, there are no ugly surprises. Operators are detected only if surrounded by white space or forward search keywords like Operators1 (demonstrated in lines 9,10,11) 117 | 118 | To sum up: both forward and backward search logic must be implemented in UDL 2.1 and it is the user's job to decide which one should be applied on a given set of keywords. The rule of thumb is: if your keyword can be "glued" to other keywords, like C++ boolean operators, use forward search; if your keyword must be separated from the rest of the source code by white space or special characters, use backward search. 119 | 120 | This option is given in case of operators and folding in code keywords. All other keyword sets simply fall into one of two search directions, and are not user selectable. Complete list is given in the paragraph above. 121 | -------------------------------------------------------------------------------- /docs/keywords.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 70 3 | navigation: Keywords 4 | permalink: /keywords/ 5 | --- 6 | 7 | # Keywords 8 | 9 | This section describes new options user have when defining keyword lists. 10 | 11 | ![Keywords dialog]({{ site.baseurl}}/images/keywords.png) 12 | 13 | Number of keyword lists has been expanded to eight (as suggested by Don, if more is needed, please state so in discussion on Notepad++ forum). Functionality is the same as in UDL 1.0. You can set "font options" (font type, color, size and so on), and you can turn on "prefix mode". Prefix mode simply means that anything that starts with your string will be identified as keyword. 14 | 15 | But there is something new, an idea that comes from CChris: In UDL 2.0 you can *define multi-part keywords*. To do it, just *put two or more words in quotation marks*. e.g "else if" 16 | 17 | ## Double quotes around multi-part keywords 18 | 19 | Assuming that "else" and "if" are not defined as separate keywords, **multi part keyword "else if" will be recognized as a keyword only if both strings are present**. So, `else if` will be a keyword, but just `else`, or just `if`, will be treated as default text. Also note that any number of white space characters might separate "else" and "if".
20 | All these combinations will be correctly recognized: 21 | 22 | ``` 23 | else if # one space 24 | else if # three spaces 25 | else\tif # one tab 26 | else\t\tif # two tabs 27 | else\nif # one new line 28 | else\n\nif # two new lines 29 | ``` 30 | 31 | That's right, you can even hit Enter in the middle of multi-part keyword and it will still be recognized! 32 | 33 | ## Single quotes around multi-part keywords 34 | 35 | Now, what if you want to limit multi-part keywords to be recognized only on the same line? You can do that simply by using single quotes instead of double quotes. So, if you define "else if", than "else" and "if" can be separated by any number of spaces and tabs, but **not new lines**. This is important if you are defining multi-part keywords that are embedded (nested) in line comments. 36 | 37 | ## Prefix mode 38 | 39 | Prefix mode for multi-part keywords simply means "next word" will be highlighted too. 40 | -------------------------------------------------------------------------------- /docs/numbers.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 60 3 | navigation: Numbers 4 | permalink: /numbers/ 5 | --- 6 | 7 | # Numbers 8 | 9 | This section describes new options user have when defining numbers. 10 | 11 | ![Numbers dialog]({{ site.baseurl}}/images/numbers_01.png) 12 | 13 | UDL number panel received major update in Notepad++ version 6.3. If you are using version 6.2, please scroll below. 14 | 15 | Number handling is quite different in UDL 2.1 than it was in UDL 1.0 (or UDL 2.0).
16 | New interface and logical organization of code designed by CChris was used in version 2.0, and user suggestions lead to improvements and extensions in version 2.1. Let's break it down, feature by feature. 17 | 18 | ## Decimal digits 19 | 20 | Are supported automatically by UDL. 21 | 22 | ``` 23 | 0123456789 24 | 123 25 | 987 26 | ``` 27 | 28 | ## Number prefixes 1 29 | 30 | Allows to define number prefixes that will be used with **decimal digits only**: 31 | 32 | ``` 33 | B1011 34 | O12345670 35 | D1234567890 36 | ``` 37 | 38 | ## Number prefixes 2 39 | 40 | Allows to define number prefixes that will be used with decimal digits and **extended with Extras1**: 41 | 42 | ``` 43 | 0x1234567890ABCDEF 44 | ``` 45 | 46 | - This will be mostly used for hex prefixes. 47 | - Note that even standard C/C++ prefix "0x" must be defined here, as it is not supported by default. 48 | 49 | ## Extra characters 1 50 | 51 | If you define "0x" hex prefix in Number prefixes 2, then add here "A B C D E F a b c d e f" 52 | 53 | ``` 54 | 0x1234 55 | 0xABC 56 | ``` 57 | 58 | ## Extra characters 2 59 | 60 | These extra characters are used exactly like Extras1 but Extras2 are used in combination with Suffix1. e.g. "A B C D E F a b c d e f" 61 | 62 | ## Suffix characters 1 63 | 64 | Some languages define HEX notifications as a suffix. Let's use "'H" as an example: 65 | 66 | ``` 67 | 1234567890ABCDEF'H 68 | ABC'H 69 | 123'H 70 | ``` 71 | 72 | ## Suffix characters 2 73 | 74 | This one works exactly like Prefix1 option, just works from the other end : Let's use "B O D" as examples: 75 | 76 | ``` 77 | 1011B 78 | 01234567O 79 | 0123456789D 80 | ``` 81 | 82 | Or, you can use it for financial records, e.g. `100€` or `200$` 83 | 84 | ## Range symbols 85 | 86 | Sometimes you want to express number ranges: 87 | 88 | ``` 89 | 100-200 90 | 200::300 91 | 300-->400 92 | ``` 93 | 94 | ## Sum up 95 | 96 | - **Prefix1** and **Suffix2** accept **numbers only** 97 | - **Prefix2** accepts numbers and **Extras1** 98 | - **Suffix1** accepts numbers and **Extras2** 99 | 100 | Also worth noting is the fact that UDL 2.0 restricts numbers to have just one decimal dot (in UDL 1.0 stuff like `1.2.3.4.5.6.7.8.9` was treated as a single number). 101 | 102 | UDL 2.1 allows user selection of decimal point character (dot, comma or both). 103 | 104 | That's it with numbers. 105 | 106 | 107 | ## Old version, UDL 2.0 (used in Notepad++ v 6.2) 108 | 109 | ![Numbers dialog]({{ site.baseurl}}/images/numbers_02.png) 110 | 111 | Note: this section is left here for people stuck with old version, if you use newer version, you can safely ignore this section !!! 112 | 113 | Number handling is quite different in UDL 2.0 than it was in UDL 1.0. New interface and logical organization of code was designed by CChris. I simply adopted his idea without adding anything to it. I had to significantly change the code to integrate it with UDL 2.0, but I closely followed his superb interface. Let's break it down, feature by feature. 114 | 115 | ### Number prefixes 116 | 117 | This will be mostly used for hex prefixes.
118 | Note that even standard C/C++ prefix "0x" must be defined here, as it is not supported by default. 119 | 120 | ### Extra characters in numbers with prefix 121 | 122 | e.g. If you define "0x" hex prefix, then add here "A B C D E F a b c d e f" 123 | 124 | ### Optional sufixes for numbers 125 | 126 | This one is useful for financial records, e.g. `100€` or `200$` 127 | 128 | ### Range symbols 129 | 130 | Sometimes you want to express number ranges: 131 | 132 | ``` 133 | 100-200 134 | 200::300 135 | 300-->400 136 | ``` 137 | 138 | Also worth noting is the fact that UDL 2.0 restricts numbers to have just one decimal dot (in UDL 1.0 stuff like `1.2.3.4.5.6.7.8.9` was treated as a single number). 139 | 140 | User is restricted to dot character for decimal point. If you need to use comma, please upgrade. 141 | 142 | That's it with numbers. I really think CChris did a great job here, and covered almost anything user might need regarding numbers. If you think something is missing, please state so in discussion on Notepad++ forum. 143 | -------------------------------------------------------------------------------- /docs/operators.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 50 3 | navigation: Operators 4 | permalink: /operators/ 5 | --- 6 | 7 | # Operators 8 | 9 | This section gives short explanation of operator options.
10 | For detailed discussion about "forward" and "backward" search, please read section [Introduction]({{ site.baseurl }}/introduction/). 11 | 12 | ![Operators dialog]({{ site.baseurl}}/images/operators_01.png) 13 | 14 | Operators are split into two groups: Operators1 and Operators2. 15 | 16 | ## Operators1 17 | 18 | This is a "forward" search group.
19 | These operators can be "glued" to other keywords. You can use it to define operators like: 20 | 21 | ``` 22 | ! && << >> + - _ % 23 | ``` 24 | 25 | In short: these should be special non-alphanumeric characters 26 | 27 | ## Operators2 28 | 29 | This is a "backward" search group.
30 | These operators can NOT be "glued" to other keywords. They must be separated from rest of the code by whitespace or by other "forward" search keywords.You can use it to define operators like: 31 | 32 | ``` 33 | and or not in out like 34 | ``` 35 | 36 | In short: operators that look like keywords 37 | 38 | Operators2 group is just another keyword group, Keyword group 9 if you will. I added it here just for easier use of UDL 2.1 GUI, and for better understanding of how operators work. Users could define the same keyword list in keywords groups 1 through 8 and there would be no difference. 39 | 40 | ![Operators example 1]({{ site.baseurl}}/images/operators_02.png) 41 | 42 | As demonstrated in picture above, Operators1 are always highlighted, and Operators2 are highlighted only if separated from rest of the code. 43 | -------------------------------------------------------------------------------- /images/comments_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_01.png -------------------------------------------------------------------------------- /images/comments_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_02.png -------------------------------------------------------------------------------- /images/comments_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_03.png -------------------------------------------------------------------------------- /images/comments_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_04.png -------------------------------------------------------------------------------- /images/comments_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_05.png -------------------------------------------------------------------------------- /images/comments_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_06.png -------------------------------------------------------------------------------- /images/comments_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_07.png -------------------------------------------------------------------------------- /images/comments_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_08.png -------------------------------------------------------------------------------- /images/comments_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_09.png -------------------------------------------------------------------------------- /images/comments_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_10.png -------------------------------------------------------------------------------- /images/comments_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_11.png -------------------------------------------------------------------------------- /images/comments_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_12.png -------------------------------------------------------------------------------- /images/comments_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_13.png -------------------------------------------------------------------------------- /images/comments_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_14.png -------------------------------------------------------------------------------- /images/comments_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_15.png -------------------------------------------------------------------------------- /images/comments_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_16.png -------------------------------------------------------------------------------- /images/comments_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_17.png -------------------------------------------------------------------------------- /images/comments_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_18.png -------------------------------------------------------------------------------- /images/comments_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/comments_19.png -------------------------------------------------------------------------------- /images/default_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/default_01.png -------------------------------------------------------------------------------- /images/default_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/default_02.png -------------------------------------------------------------------------------- /images/delimiters_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_01.png -------------------------------------------------------------------------------- /images/delimiters_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_02.png -------------------------------------------------------------------------------- /images/delimiters_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_03.png -------------------------------------------------------------------------------- /images/delimiters_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_04.png -------------------------------------------------------------------------------- /images/delimiters_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_05.png -------------------------------------------------------------------------------- /images/delimiters_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_06.png -------------------------------------------------------------------------------- /images/delimiters_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_07.png -------------------------------------------------------------------------------- /images/delimiters_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_08.png -------------------------------------------------------------------------------- /images/delimiters_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_09.png -------------------------------------------------------------------------------- /images/delimiters_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_10.png -------------------------------------------------------------------------------- /images/delimiters_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_11.png -------------------------------------------------------------------------------- /images/delimiters_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_12.png -------------------------------------------------------------------------------- /images/delimiters_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/delimiters_13.png -------------------------------------------------------------------------------- /images/folding_in_code_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_code_01.png -------------------------------------------------------------------------------- /images/folding_in_code_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_code_02.png -------------------------------------------------------------------------------- /images/folding_in_code_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_code_03.png -------------------------------------------------------------------------------- /images/folding_in_code_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_code_04.png -------------------------------------------------------------------------------- /images/folding_in_comment_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_comment_01.png -------------------------------------------------------------------------------- /images/folding_in_comment_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_comment_02.png -------------------------------------------------------------------------------- /images/folding_in_comment_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_comment_03.png -------------------------------------------------------------------------------- /images/folding_in_comment_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_comment_04.png -------------------------------------------------------------------------------- /images/folding_in_comment_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_comment_05.png -------------------------------------------------------------------------------- /images/folding_in_comment_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/folding_in_comment_06.png -------------------------------------------------------------------------------- /images/introduction_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/introduction_01.png -------------------------------------------------------------------------------- /images/introduction_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/introduction_02.png -------------------------------------------------------------------------------- /images/introduction_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/introduction_03.png -------------------------------------------------------------------------------- /images/introduction_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/introduction_04.png -------------------------------------------------------------------------------- /images/introduction_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/introduction_05.png -------------------------------------------------------------------------------- /images/keywords.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/keywords.png -------------------------------------------------------------------------------- /images/numbers_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/numbers_01.png -------------------------------------------------------------------------------- /images/numbers_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/numbers_02.png -------------------------------------------------------------------------------- /images/operators_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/operators_01.png -------------------------------------------------------------------------------- /images/operators_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivan-radic/udl-documentation/c2ec62332a636f64f009073f473dd2d2836ffc10/images/operators_02.png -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 0 3 | navigation: Home 4 | permalink: // 5 | --- 6 | 7 | # Welcome to UDL documentation site 8 | 9 | This page serves to demonstrate and document new UDL 2.1. 10 | 11 | UDL stands for **User Defined Language**, it is a feature of [Notepad++ editor](https://notepad-plus-plus.org/) through which users can define their own syntax highlighting. 12 | 13 | Also, please note that this is documentation site only, source code is available at [official Notepad++ github page](https://github.com/notepad-plus-plus/notepad-plus-plus) 14 | 15 | Thank you and best regards,
16 | Ivan Radić 17 | --------------------------------------------------------------------------------