Skip to content

Commit

Permalink
feat(docs): add Tips (#60)
Browse files Browse the repository at this point in the history
* feat: add Tips

* style: use <kbd> for shortcuts

* fix: fix header level

* feat(tips): add tips for handling SIGINT and SIGHUP

* fix: use "UNIX-like" instead of "Linux-like"

* feat: try restarting CP Editor after changing the UI style 946abec
  • Loading branch information
ouuan committed Sep 25, 2020
1 parent db4d1f8 commit 579a00e
Show file tree
Hide file tree
Showing 39 changed files with 1,362 additions and 82 deletions.
2 changes: 1 addition & 1 deletion 404.html
Expand Up @@ -142,7 +142,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down
2 changes: 1 addition & 1 deletion about/index.html
Expand Up @@ -145,7 +145,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down
4 changes: 2 additions & 2 deletions blog/2020/04/28/cp-editor-v6.4/index.html
Expand Up @@ -150,7 +150,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -181,7 +181,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down
4 changes: 2 additions & 2 deletions blog/2020/04/28/use-language-server-in-cp-editor/index.html
Expand Up @@ -150,7 +150,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -181,7 +181,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down
4 changes: 2 additions & 2 deletions blog/index.html
Expand Up @@ -143,7 +143,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -174,7 +174,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down
4 changes: 2 additions & 2 deletions blog/news/index.html
Expand Up @@ -143,7 +143,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -174,7 +174,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down
4 changes: 2 additions & 2 deletions blog/releases/index.html
Expand Up @@ -143,7 +143,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -174,7 +174,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down
2 changes: 1 addition & 1 deletion community/index.html
Expand Up @@ -143,7 +143,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down
29 changes: 27 additions & 2 deletions docs/faq/index.html
Expand Up @@ -143,7 +143,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -174,7 +174,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -438,6 +438,29 @@



<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/docs/tips/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Tips</a>
</li>
<ul>
<li class="collapse " id="docstips">



</li>
</ul>
</ul>











<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/docs/source-code/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Source Code</a>
Expand Down Expand Up @@ -625,6 +648,8 @@ <h1>FAQ</h1>








Expand Down
36 changes: 34 additions & 2 deletions docs/index.html
Expand Up @@ -143,7 +143,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -174,7 +174,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -438,6 +438,29 @@



<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/docs/tips/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Tips</a>
</li>
<ul>
<li class="collapse show" id="docstips">



</li>
</ul>
</ul>











<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/docs/source-code/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Source Code</a>
Expand Down Expand Up @@ -596,6 +619,15 @@ <h5>



<div class="entry">
<h5>
<a href="/docs/tips/">Tips</a>
</h5>
<p>Some tips that may help</p>
</div>





<div class="entry">
Expand Down
9 changes: 5 additions & 4 deletions docs/index.xml
Expand Up @@ -92,10 +92,10 @@
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then you can use &lt;code>int main&lt;/code> as the regex, &lt;code>end&lt;/code> as the offset type, and &lt;code>9&lt;/code> as the offset characters. After that, when opening a new tab, the cursor will be at the first line in the &lt;code>main&lt;/code> function.&lt;/p>
&lt;h2 id="snippets">Snippets&lt;/h2>
&lt;h3 id="manage-snippets">Manage Snippets&lt;/h3>
&lt;p>You can add/delete/rename snippets in &amp;ldquo;Language-&amp;gt;XXX-&amp;gt;XXX Snippet&amp;rdquo;. You can use &lt;code>Ctrl+N&lt;/code> for &amp;ldquo;Add&amp;rdquo;, &lt;code>Ctrl+W&lt;/code> for &amp;ldquo;Del&amp;rdquo; and &lt;code>F2&lt;/code> for &amp;ldquo;Rename&amp;rdquo;.&lt;/p>
&lt;p>You can add/delete/rename snippets in &amp;ldquo;Language-&amp;gt;XXX-&amp;gt;XXX Snippet&amp;rdquo;. You can use &lt;kbd>Ctrl+N&lt;/kbd> for &amp;ldquo;Add&amp;rdquo;, &lt;/kbd>Ctrl+W&lt;/kbd> for &amp;ldquo;Del&amp;rdquo; and &lt;/kbd>F2&lt;/kbd> for &amp;ldquo;Rename&amp;rdquo;.&lt;/p>
&lt;p>You can also import snippets from files or extract your snippets to files in the &amp;ldquo;More&amp;rdquo; menu in the snippet page.&lt;/p>
&lt;h3 id="use-snippets">Use Snippets&lt;/h3>
&lt;p>You can insert a snippet into the code editor by either clicking &amp;ldquo;Actions-&amp;gt;Use Snippets&amp;rdquo; or pressing &lt;code>Ctrl+T&lt;/code>.&lt;/p>
&lt;p>You can insert a snippet into the code editor by either clicking &amp;ldquo;Actions-&amp;gt;Use Snippets&amp;rdquo; or pressing &lt;/kbd>Ctrl+T&lt;/kbd>.&lt;/p>
&lt;p>When choosing a snippet, you can enter the first few characters of the snippet name, and it will be auto-completed.&lt;/p>
&lt;h2 id="parentheses">Parentheses&lt;/h2>
&lt;p>You can set the parentheses settings for each language and each parenthesis.&lt;/p>
Expand All @@ -112,6 +112,7 @@
&lt;p>The style used for the UI. The available options are different on different platforms.&lt;/p>
&lt;p>The &amp;ldquo;default&amp;rdquo; style is either the most appropriate style on your platform, or the style specified by the &lt;code>--style&lt;/code> command line option.&lt;/p>
&lt;p>On Windows, there&amp;rsquo;s an extra option &amp;ldquo;Auto Fusion&amp;rdquo;. &amp;ldquo;Auto Fusion&amp;rdquo; is either dark or light depending on the system theme (i.e. whether the Windows application theme is dark or light).&lt;/p>
&lt;p>If there&amp;rsquo;s anything wrong after you change the UI style, you can try restarting CP Editor.&lt;/p>
&lt;h3 id="editor-theme">Editor Theme&lt;/h3>
&lt;p>The syntax highlighting theme for the code editor.&lt;/p>
&lt;h3 id="editor-font">Editor Font&lt;/h3>
Expand All @@ -131,7 +132,7 @@
&lt;p>Use &amp;ldquo;¶&amp;rdquo; to visualize the end-of-line in the diff viewer. It is useful if you want to see differences of the end-of-line (i.e. extra empty lines at the end).&lt;/p>
&lt;h3 id="add-extra-margin-at-the-bottom-of-the-code-editor">Add extra margin at the bottom of the code editor&lt;/h3>
&lt;p>Add an extra margin at the bottom of the code editor, so that you can scroll less.&lt;/p>
&lt;p>Due to technical reasons, it could slightly affect the operation history, i.e. you might be able undo the margin change by &lt;code>Ctrl+Z&lt;/code>.&lt;/p>
&lt;p>Due to technical reasons, it could slightly affect the operation history, i.e. you might be able undo the margin change by &lt;kbd>Ctrl+Z&lt;/kbd>.&lt;/p>
&lt;h3 id="custom-application-font">Custom Application Font&lt;/h3>
&lt;p>Use a custom font for the UI (except for code editor, test cases, messages, etc.), instead of the system font.&lt;/p></description></item><item><title>Docs: Actions</title><link>/docs/preferences/actions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/preferences/actions/</guid><description>
&lt;h2 id="save">Save&lt;/h2>
Expand Down Expand Up @@ -190,7 +191,7 @@
&lt;p>If this setting is disabled, external changes won&amp;rsquo;t be loaded.&lt;/p>
&lt;p>&lt;a href="#auto-load-external-file-changes-if-theres-no-unsaved-modification">Auto-load external file changes if there&amp;rsquo;s no unsaved modification&lt;/a> overrides this setting. i.e. if &lt;a href="#auto-load-external-file-changes-if-theres-no-unsaved-modification">Auto-load external file changes if there&amp;rsquo;s no unsaved modification&lt;/a> is enabled, external file changes will be loaded without confrimation regardless of &lt;a href="#ask-whether-to-load-external-file-changes">Ask whether to load external file changes&lt;/a> ; if &lt;a href="#auto-load-external-file-changes-if-theres-no-unsaved-modification">Auto-load external file changes if there&amp;rsquo;s no unsaved modification&lt;/a> is disabled, the user will be asked whether to load the changes only when &lt;a href="#ask-whether-to-load-external-file-changes">Ask whether to load external file changes&lt;/a> is enabled, otherwise the changes won&amp;rsquo;t be loaded.&lt;/p></description></item><item><title>Docs: Extensions</title><link>/docs/preferences/extensions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/preferences/extensions/</guid><description>
&lt;h2 id="clang-format">Clang Format&lt;/h2>
&lt;p>Clang Format is used to format the C++ codes. You can click Actions-&amp;gt;Format Code or press the shortcut &lt;code>Ctrl+Shift+I&lt;/code> to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted.&lt;/p>
&lt;p>Clang Format is used to format the C++ codes. You can click Actions-&amp;gt;Format Code or press the shortcut &lt;kbd>Ctrl+Shift+I&lt;/kbd> to format the codes. If you have selected a part of the code, only the selection (and its necessary adjacent codes) will be formatted.&lt;/p>
&lt;p>&lt;strong>See also&lt;/strong> &lt;a href="../../setup#setup-clang-format">Setup Clang Format&lt;/a>.&lt;/p>
&lt;h3 id="path">Path&lt;/h3>
&lt;p>The path to the &lt;code>clang-format&lt;/code> executable, or simply &lt;code>clang-format&lt;/code> if it&amp;rsquo;s in the &lt;code>PATH&lt;/code> environment variable.&lt;/p>
Expand Down
29 changes: 27 additions & 2 deletions docs/installation/build-from-aur/index.html
Expand Up @@ -143,7 +143,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -174,7 +174,7 @@
aria-label="Search this site…"
autocomplete="off"

data-offline-search-index-json-src="/offline-search-index.10092cf7560485c58429ea19e7b01360189b68f7a68de6732eb57ad21a80cbb8381560578b7ff6a07db41c57a629001ad790896e1105095790794ba68f66f58e.json"
data-offline-search-index-json-src="/offline-search-index.ed600ebae7bc6d63c8419fcf45b4621c684bb8cfce3c73d07f72d204b59d91d30f3db5748990e3f2d7ecabd8539a86aaf4392b114f91dbf29b6b1da2a514dd6b.json"
data-offline-search-base-href="/"
data-offline-search-max-results="10"
>
Expand Down Expand Up @@ -438,6 +438,29 @@



<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/docs/tips/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Tips</a>
</li>
<ul>
<li class="collapse " id="docstips">



</li>
</ul>
</ul>











<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/docs/source-code/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Source Code</a>
Expand Down Expand Up @@ -607,6 +630,8 @@ <h1>Build from AUR</h1>








Expand Down

0 comments on commit 579a00e

Please sign in to comment.