<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CP Editor – Preferences</title><link>/ru/docs/preferences/</link><description>Recent content in Preferences on CP Editor</description><generator>Hugo -- gohugo.io</generator><language>ru</language><atom:link href="/ru/docs/preferences/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: Code Edit</title><link>/ru/docs/preferences/code-edit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/code-edit/</guid><description>
&lt;h3 id="tab-width">Tab Width&lt;/h3>
&lt;p>The width (number of characters) of an indent. It is used when displaying the tab characters. It is also used in
&lt;a href="#auto-indent" >Auto Indent&lt;/a>
and
&lt;a href="#replace-tabs-by-spaces" >Replace tabs by spaces&lt;/a>
.&lt;/p>
&lt;h3 id="cursor-width">Cursor Width&lt;/h3>
&lt;p>The width of the text cursor in pixels.&lt;/p>
&lt;h3 id="auto-indent">Auto Indent&lt;/h3>
&lt;ol>
&lt;li>When you start a new line, the new line will have the same indent (i.e. white spaces at the beginning of the line) as the old line.&lt;/li>
&lt;li>If the old line ends with &lt;code>{&lt;/code>, an extra indent (a tab character or
&lt;a href="#tab-width" >Tab Width&lt;/a>
spaces, depending on whether
&lt;a href="#replace-tabs-by-spaces" >Replace tabs by spaces&lt;/a>
is enabled) will be inserted at the beginning of the new line.&lt;/li>
&lt;/ol>
&lt;h3 id="wrap-text">Wrap Text&lt;/h3>
&lt;p>If a line is too long to fit in a single line, the line will be separated into several lines.&lt;/p>
&lt;h3 id="auto-complete-parentheses">Auto Complete Parentheses&lt;/h3>
&lt;p>Automatically add the right parenthesis when you type the left one. For example, when you type &lt;code>(&lt;/code>, &lt;code>)&lt;/code> will be added.&lt;/p>
&lt;p>When the character next to the cursor is a right parenthesis and you type this parenthesis, instead of typing this parenthesis, the cursor will jump out of the parenthesis.&lt;/p>
&lt;p>You can choose the parentheses to auto-complete in the
&lt;a href="../../../ru/docs/preferences/language/#parentheses" >Parentheses&lt;/a>
settings.&lt;/p>
&lt;h3 id="auto-remove-parentheses">Auto Remove Parentheses&lt;/h3>
&lt;p>When you delete a left parenthesis, if a corresponding right parenthesis is next to it, the right parenthesis will also be deleted.&lt;/p>
&lt;p>You can choose the parentheses to auto-remove in the
&lt;a href="../../../ru/docs/preferences/language/#parentheses" >Parentheses&lt;/a>
settings.&lt;/p>
&lt;h3 id="jump-out-of-a-parenthesis-by-pressing-tab">Jump out of a parenthesis by pressing Tab&lt;/h3>
&lt;p>When the cursor is next to a right parenthesis, you can use the Tab key to jump out of it. If
&lt;a href="#auto-complete-parentheses" >Auto Complete Parentheses&lt;/a>
is enabled, this is an alternative of typing the right parenthesis.&lt;/p>
&lt;p>You can choose the parentheses to jump out by Tab in the
&lt;a href="../../../ru/docs/preferences/language/#parentheses" >Parentheses&lt;/a>
settings.&lt;/p>
&lt;h3 id="replace-tabs-by-spaces">Replace tabs by spaces&lt;/h3>
&lt;p>When you insert an indent, insert spaces instead of a tab character. The number of spaces is equal to the
&lt;a href="#tab-width" >Tab Width&lt;/a>
.&lt;/p>
&lt;p>Note that this won&amp;rsquo;t replace the existing tab characters. In
&lt;a href="#auto-indent" >Auto Indent&lt;/a>
, the tab characters in the old line will remain in the new line (however, the new indent inserted after &lt;code>{&lt;/code> will be spaces).&lt;/p></description></item><item><title>Docs: Language</title><link>/ru/docs/preferences/language/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/language/</guid><description>
&lt;h2 id="general">General&lt;/h2>
&lt;h3 id="default-language">Default Language&lt;/h3>
&lt;p>The default programming language. It&amp;rsquo;s used when opening a new tab and some other places.&lt;/p>
&lt;h2 id="commands">Commands&lt;/h2>
&lt;h3 id="c-commands">C++ Commands&lt;/h3>
&lt;h4 id="c-compile-command">C++ Compile Command&lt;/h4>
&lt;p>The compilation command for C++. For example: &lt;code>g++ -Wall&lt;/code>.&lt;/p>
&lt;p>The command shouldn&amp;rsquo;t contain the source file and the output file, CP Editor automatically adds them.&lt;/p>
&lt;p>For compilation flags, please refer to the manual of the compiler. For example, you may want to add &lt;code>-std=c++14&lt;/code> in the compile command to use C++14.&lt;/p>
&lt;h4 id="c-executable-file-path">C++ Executable File Path&lt;/h4>
&lt;p>The path of the executable file, i.e. the argument of the &lt;code>-o&lt;/code> option of the compiler.&lt;/p>
&lt;p>If this path is relative, then it&amp;rsquo;s relative to the source file (if it&amp;rsquo;s an untitled tab, then relative to the
&lt;a href="../../../ru/docs/preferences/general/#temporary-directory" >Temporary Directory&lt;/a>
).&lt;/p>
&lt;p>You can use some place holders for this setting:&lt;/p>
&lt;ul>
&lt;li>&lt;code>${filename}&lt;/code>: The complete name of the source file. If it&amp;rsquo;s an untitled tab (i.e. an unsaved file), the complete file name is &lt;code>sol.cpp&lt;/code>.&lt;/li>
&lt;li>&lt;code>${basename}&lt;/code>: &lt;code>${filename}&lt;/code> without the suffix (i.e. without &lt;code>.cpp&lt;/code>, etc.).&lt;/li>
&lt;li>&lt;code>${tmpdir}&lt;/code> or &lt;code>${tempdir}&lt;/code>: The path of the
&lt;a href="../../../ru/docs/preferences/general/#temporary-directory" >Temporary Directory&lt;/a>
.&lt;/li>
&lt;/ul>
&lt;p>For example, you can use &lt;code>${tmpdir}/${basename}&lt;/code> if you don&amp;rsquo;t want to keep the executable files, or &lt;code>executables/${basename}&lt;/code> if you want to keep all executable files in the &lt;code>executables&lt;/code> directory under the directory of the source file.&lt;/p>
&lt;h4 id="c-run-arguments">C++ Run Arguments&lt;/h4>
&lt;p>The arguments passed to the program when executing it. It&amp;rsquo;s usually not needed in competitive programming.&lt;/p>
&lt;h4 id="c-compiler-output-codec">C++ Compiler Output Codec&lt;/h4>
&lt;p>The text codec of the compiler output (warnings, errors, etc.), used to display the messages from the compiler in CP Editor.&lt;/p>
&lt;p>It could be useful if you are using locales for your compiler and the compiler messages are not English.&lt;/p>
&lt;h3 id="java-commands">Java Commands&lt;/h3>
&lt;h4 id="java-compile-command">Java Compile Command&lt;/h4>
&lt;p>The compilation command for Java. For example: &lt;code>javac&lt;/code>.&lt;/p>
&lt;p>The command shouldn&amp;rsquo;t contain the source file and the class path, CP Editor automatically adds them.&lt;/p>
&lt;h4 id="java-class-path">Java Class Path&lt;/h4>
&lt;p>The path to save the class files.&lt;/p>
&lt;p>Please refer to
&lt;a href="#c-executable-file-path" >C++ Executable File Path&lt;/a>
for the details.&lt;/p>
&lt;h4 id="java-class-name">Java Class Name&lt;/h4>
&lt;p>The name of the main class of your solution.&lt;/p>
&lt;p>You can use an arbitrary name for your source file. When compiling, CP Editor automatically saves your code to a file with the class name.&lt;/p>
&lt;h4 id="java-run-command">Java Run Command&lt;/h4>
&lt;p>The command to run your solution. For example &lt;code>java&lt;/code>.&lt;/p>
&lt;p>This command shouldn&amp;rsquo;t contain the class path or the class name, CP Editor automatically adds them.&lt;/p>
&lt;h4 id="java-run-arguments">Java Run Arguments&lt;/h4>
&lt;p>The arguments passed to the program when executing it. It&amp;rsquo;s usually not needed in competitive programming.&lt;/p>
&lt;h4 id="java-compiler-output-codec">Java Compiler Output Codec&lt;/h4>
&lt;p>Please refer to
&lt;a href="#c-compiler-output-codec" >C++ Compiler Output Codec&lt;/a>
.&lt;/p>
&lt;h3 id="python-commands">Python Commands&lt;/h3>
&lt;h4 id="python-run-command">Python Run Command&lt;/h4>
&lt;p>The command to run a python code. It&amp;rsquo;s usually one of &lt;code>python&lt;/code>/&lt;code>python2&lt;/code>/&lt;code>python3&lt;/code>.&lt;/p>
&lt;h4 id="python-run-arguments">Python Run Arguments&lt;/h4>
&lt;p>The arguments passed to the program when executing it. It&amp;rsquo;s usually not needed in competitive programming.&lt;/p>
&lt;h2 id="template">Template&lt;/h2>
&lt;p>The code template is a file. When opening a new tab, the content of the template will be the initial content in the code editor.&lt;/p>
&lt;h3 id="template-path">Template Path&lt;/h3>
&lt;p>The path to the code template.&lt;/p>
&lt;h3 id="template-cursor-position">Template Cursor Position&lt;/h3>
&lt;p>The initial position of the text cursor when opening the template.&lt;/p>
&lt;p>It contains three parts:&lt;/p>
&lt;ol>
&lt;li>
&lt;a href="../../../ru/docs/preferences/general/#regular-expression" >Regex&lt;/a>
&lt;/li>
&lt;li>Offset type: start or end.&lt;/li>
&lt;li>Offset characters: a number, could be negative.&lt;/li>
&lt;/ol>
&lt;p>It works as below:&lt;/p>
&lt;ol>
&lt;li>Find the first match of the regex in the template.&lt;/li>
&lt;li>If nothing matches the regex, the cursor will be at the end of the template.&lt;/li>
&lt;li>Otherwise, depending on the offset type, the cursor will be at the start/end of the first match, and then moved to the right by the number of the offset characters.&lt;/li>
&lt;/ol>
&lt;p>For example, if your template contains the following snippet:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cpp" data-lang="cpp">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">int&lt;/span> &lt;span style="color:#000">main&lt;/span>&lt;span style="color:#000;font-weight:bold">()&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&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;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 on 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;/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>
&lt;p>Each setting has three states: enable, disable and default. If it&amp;rsquo;s default, it uses the settings in the
&lt;a href="../../../ru/docs/preferences/code-edit/" >Code Edit&lt;/a>
page. Otherwise, it overwrites the settings in the
&lt;a href="../../../ru/docs/preferences/code-edit/" >Code Edit&lt;/a>
page.&lt;/p>
&lt;h3 id="auto-complete">Auto Complete&lt;/h3>
&lt;p>See
&lt;a href="../../../ru/docs/preferences/code-edit/#auto-complete-parentheses" >Code Edit/Auto Complete Parentheses&lt;/a>
.&lt;/p>
&lt;h3 id="auto-remove">Auto Remove&lt;/h3>
&lt;p>See
&lt;a href="../../../ru/docs/preferences/code-edit/#auto-remove-parentheses" >Code Edit/Auto Remove Parentheses&lt;/a>
.&lt;/p>
&lt;h3 id="tab-jump-out">Tab Jump Out&lt;/h3>
&lt;p>See
&lt;a href="../../../ru/docs/preferences/code-edit/#jump-out-of-a-parenthesis-by-pressing-tab" >Code Edit/Jump out of a parenthesis by pressing Tab&lt;/a>
.&lt;/p></description></item><item><title>Docs: Appearance</title><link>/ru/docs/preferences/appearance/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/appearance/</guid><description>
&lt;h2 id="general">General&lt;/h2>
&lt;h3 id="ui-language">UI Language&lt;/h3>
&lt;p>The natural language used in the UI.&lt;/p>
&lt;h3 id="ui-style">UI Style&lt;/h3>
&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="opacity">Opacity&lt;/h3>
&lt;p>The opacity of the main window.&lt;/p>
&lt;h3 id="test-case-maximum-height">Test Case Maximum Height&lt;/h3>
&lt;p>The maximum height of a test case before the scrollbar occurs.&lt;/p>
&lt;h3 id="show-compile-and-run-only">Show Compile And Run Only&lt;/h3>
&lt;p>Hide the compile only and run only buttons.&lt;/p>
&lt;p>It can be useful if you don&amp;rsquo;t care about the time used on compilation.&lt;/p>
&lt;h3 id="display-eoln-in-diff">Display EOLN in Diff&lt;/h3>
&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;h2 id="font">Font&lt;/h2>
&lt;h3 id="show-only-monospaced-font">Show only Monospaced Font&lt;/h3>
&lt;p>When checked the font picker dialog shows only monospaced fonts.&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>/ru/docs/preferences/actions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/actions/</guid><description>
&lt;h2 id="save">Save&lt;/h2>
&lt;h3 id="save-files-faster">Save Files Faster&lt;/h3>
&lt;p>Use
&lt;a href="https://doc.qt.io/qt-5/qfile.html" target="_blank" >&lt;code>QFile&lt;/code>&lt;/a>
instead of
&lt;a href="https://doc.qt.io/qt-5/qsavefile.html" target="_blank" >&lt;code>QSaveFile&lt;/code>&lt;/a>
to save files.&lt;/p>
&lt;p>This is slightly unsafer but notably faster.&lt;/p>
&lt;h3 id="save-testcases-on-save">Save Testcases on Save&lt;/h3>
&lt;p>Save the test cases on the disk when saving the code.&lt;/p>
&lt;p>You can choose where to save the test cases in
&lt;a href="../../../ru/docs/preferences/file-path/#testcases" >File Path/Testcases&lt;/a>
.&lt;/p>
&lt;h2 id="auto-save">Auto Save&lt;/h2>
&lt;h3 id="auto-save-interval-type">Auto Save Interval Type&lt;/h3>
&lt;p>It is easier to describe if we explain a little bit about the internal implementation: There is a countdown timer. When we &amp;ldquo;reset&amp;rdquo; it, it will be &amp;ldquo;running&amp;rdquo; in the next &lt;em>Auto Save Interval&lt;/em> milliseconds, and after &lt;em>Auto Save Interval&lt;/em> milliseconds, the timer will &amp;ldquo;timeout&amp;rdquo; and the code is auto-saved.&lt;/p>
&lt;h4 id="after-the-last-modification">After the last modification&lt;/h4>
&lt;p>The timer is reset whenever you modify the code. i.e. Your codes will be saved if you haven&amp;rsquo;t modified it for &lt;em>Auto Save Interval&lt;/em> milliseconds.&lt;/p>
&lt;p>This mode is suitable for a small &lt;em>Auto Save Interval&lt;/em> so that your codes will be auto-saved every time you take a short break from typing. If the interval is too long, likely, your codes will never be auto-saved.&lt;/p>
&lt;h4 id="after-the-first-modification">After the first modification&lt;/h4>
&lt;p>The timer is reset when you modify the code if the timer is not running. i.e. Your codes will be saved if you modified it &lt;em>Auto Save Interval&lt;/em> milliseconds ago.&lt;/p>
&lt;p>This mode is suitable for a long &lt;em>Auto Save Interval&lt;/em>, otherwise, it&amp;rsquo;s likely that the save happens when you are typing, which could affect your typing experience.&lt;/p>
&lt;h4 id="without-modification">Without modification&lt;/h4>
&lt;p>The timer is reset when it timeouts. i.e. Your codes will be saved every &lt;em>Auto Save Interval&lt;/em> milliseconds, no matter you have modified it or not.&lt;/p>
&lt;p>This mode is suitable for saving test cases, etc. In the other modes, the test cases are not auto-saved if you don&amp;rsquo;t modify the codes.&lt;/p>
&lt;h2 id="detached-execution">Detached Execution&lt;/h2>
&lt;h3 id="terminal-program">Terminal Program&lt;/h3>
&lt;h3 id="terminal-arguments">Terminal Arguments&lt;/h3>
&lt;p>This setting is only available on Linux.&lt;/p>
&lt;p>The terminal program is the name/path of the terminal emulator you want to use.&lt;/p>
&lt;p>The arguments are used to execute a given command. i.e. &lt;code>&amp;lt;Terminal Program&amp;gt; &amp;lt;Terminal Arguments&amp;gt; &amp;lt;command&amp;gt;&lt;/code> can be used to execute &lt;code>&amp;lt;command&amp;gt;&lt;/code> in the terminal emulator.&lt;/p>
&lt;p>In most terminal emulators including &lt;code>konsole&lt;/code>, &lt;code>xterm&lt;/code> and &lt;code>xfce-terminal&lt;/code>, the argument is &lt;code>-e&lt;/code>.&lt;/p>
&lt;p>In &lt;code>gnome-terminal&lt;/code>, it is &lt;code>--&lt;/code>.&lt;/p>
&lt;p>You can read the manual of your terminal emulator to get the suitable arguments.&lt;/p>
&lt;h2 id="save-session">Save Session&lt;/h2>
&lt;h3 id="restore-last-session-at-startup">Restore last session at startup&lt;/h3>
&lt;p>Save the status of the editor, and restore most status from the last session when you start CP Editor.&lt;/p>
&lt;p>You can use the &lt;code>--no-restore-session&lt;/code> command-line option to temporarily disable this, in case that the last session is too big and the application hangs.&lt;/p>
&lt;h3 id="auto-save-the-current-session-periodically">Auto-save the current session periodically&lt;/h3>
&lt;p>Save the current session periodically instead of only when exiting the application.&lt;/p>
&lt;p>This is useful if you don&amp;rsquo;t want to lose your codes after abnormal terminations, such as power outage, forced shutdown, killing CP Editor, etc. However, if the files and test cases are too large, the editor hangs each time the auto-save happens.&lt;/p>
&lt;h2 id="bind-file-and-problem">Bind file and problem&lt;/h2>
&lt;h3 id="restore-the-problem-url-when-opening-a-file">Restore the problem URL when opening a file&lt;/h3>
&lt;p>If a problem URL was set for a file, when you open that file again, the problem URL will be restored.&lt;/p>
&lt;h3 id="open-the-old-file-when-parsing-an-old-problem-url">Open the old file when parsing an old problem URL&lt;/h3>
&lt;p>If a problem URL was set for a file, when parsing that problem from Competitive Companion again, the old file will be opened.&lt;/p>
&lt;h2 id="test-cases">Test Cases&lt;/h2>
&lt;h3 id="run-your-codes-on-empty-test-cases">Run your codes on empty test cases&lt;/h3>
&lt;p>Run your code on all non-hidden test cases even if the input is empty.&lt;/p>
&lt;h3 id="check-your-answer-on-test-cases-with-empty-output">Check your answer on test cases with empty output&lt;/h3>
&lt;p>Check your answer even if your output or the expected output is empty.&lt;/p>
&lt;h3 id="auto-uncheck-accepted-testcases">Auto Uncheck Accepted Testcases&lt;/h3>
&lt;p>After the code is executed, the accepted test cases will be automatically unchecked. When test cases are unchecked, they are collapsed and won&amp;rsquo;t be tested on when you execute your code.&lt;/p>
&lt;h2 id="load-external-file-changes">Load External File Changes&lt;/h2>
&lt;h3 id="auto-load-external-file-changes-if-theres-no-unsaved-modification">Auto-load external file changes if there&amp;rsquo;s no unsaved modification&lt;/h3>
&lt;p>If the file on the disk and the code in CP Editor was the same, and then the file is changed outside of CP Editor, load the external change without confirmation.&lt;/p>
&lt;h3 id="ask-whether-to-load-external-file-changes">Ask whether to load external file changes&lt;/h3>
&lt;p>If the file is changed outside of CP Editor, ask whether to load the change or not.&lt;/p>
&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 confirmation 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>
&lt;h2 id="stopwatch">Stopwatch&lt;/h2>
&lt;h3 id="display-stopwatch">Display Stopwatch&lt;/h3>
&lt;p>Show a stopwatch in the UI. You can use it to track your time spent on solving a problem.&lt;/p>
&lt;h3 id="startstop-stopwatch-on-tab-switch">Start/Stop stopwatch on tab switch&lt;/h3>
&lt;p>When switching to a different tab, automatically start the stopwatch on the current tab and pause the stopwatch on the previous tab.&lt;/p>
&lt;p>If you switch to the correct tab when solving a problem, with this setting enabled, you won&amp;rsquo;t need to manually start/stop the stopwatch.&lt;/p>
&lt;h3 id="show-stopwatch-result-only-when-the-button-is-pressed">Show stopwatch result only when the button is pressed&lt;/h3>
&lt;p>Hide the time of the stopwatch and only show the time when the &amp;ldquo;Show&amp;rdquo; button is pressed.&lt;/p>
&lt;p>This may reduce distractions caused by stopwatch updates.&lt;/p></description></item><item><title>Docs: Extensions</title><link>/ru/docs/preferences/extensions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/extensions/</guid><description>
&lt;h2 id="code-formatting">Code Formatting&lt;/h2>
&lt;h3 id="clang-format">Clang Format&lt;/h3>
&lt;p>Clang Format is used to format the C/C++ and Java 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="../../../ru/docs/setup/#setup-clang-format" >Setup Clang Format&lt;/a>
.&lt;/p>
&lt;h4 id="program">Program&lt;/h4>
&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>
&lt;h4 id="arguments">Arguments&lt;/h4>
&lt;p>The arguments passed to &lt;code>clang-format&lt;/code>. It should NOT contain &lt;code>-i&lt;/code> (the in-place modification option).&lt;/p>
&lt;h4 id="style">Style&lt;/h4>
&lt;p>The Clang Format style. The content here is the same as the content of a &lt;code>.clang-format&lt;/code> file.&lt;/p>
&lt;p>You can read
&lt;a href="https://clang.llvm.org/docs/ClangFormatStyleOptions.html" target="_blank" >Clang-Format Style Options documentation&lt;/a>
or search for other materials to learn how to write the styles.&lt;/p>
&lt;h3 id="yapf">YAPF&lt;/h3>
&lt;p>YAPF is used to format the Python 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 these lines will be formatted.&lt;/p>
&lt;p>&lt;strong>See also&lt;/strong>
&lt;a href="../../../ru/docs/setup/#setup-yapf" >Setup YAPF&lt;/a>
.&lt;/p>
&lt;h4 id="program-1">Program&lt;/h4>
&lt;p>The program of YAPF. It could be one of:&lt;/p>
&lt;ul>
&lt;li>&lt;code>yapf&lt;/code>: You should be able to run &lt;code>yapf&lt;/code> in the command line. The arguments can be empty.&lt;/li>
&lt;li>A Python interpreter, i.e. &lt;code>python&lt;/code>, &lt;code>python2&lt;/code>, etc. or the path to an interpreter. The arguments should be &lt;code>-m yapf&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>Note that
&lt;a href="https://github.com/google/yapf#python-versions" target="_blank" >you need to use Python 2 to format Python 2, use Python 3 to format Python 3&lt;/a>
. So you may need to choose the correct Python interpreter.&lt;/p>
&lt;h4 id="arguments-1">Arguments&lt;/h4>
&lt;p>The arguments passed to the YAPF program. This should be &lt;code>-m yapf&lt;/code> if the program is a Python interpreter. It should NOT contain &lt;code>-i&lt;/code> (the in-place modification option).&lt;/p>
&lt;h4 id="style-1">Style&lt;/h4>
&lt;p>The YAPF Format style. The content here is the same as the content of a &lt;code>.style.yapf&lt;/code> file. You can check all possible configurations by running &lt;code>yapf --style-help&lt;/code>, read the
&lt;a href="https://github.com/google/yapf#formatting-style" target="_blank" >documentation&lt;/a>
or search for other materials to learn how to write the styles.&lt;/p>
&lt;h2 id="language-server">Language Server&lt;/h2>
&lt;p>&lt;strong>See also&lt;/strong>
&lt;a href="../../../ru/docs/setup/#setup-language-server" >Setup Language Server&lt;/a>
.&lt;/p>
&lt;h3 id="use-linting-with-language-server">Use Linting with Language Server&lt;/h3>
&lt;p>Use language server to lint errors, warnings, hints, etc.&lt;/p>
&lt;p>You can hover over the squiggles to see the tooltips for the explanation of the errors/warnings.&lt;/p>
&lt;h3 id="delay-in-linting">Delay in Linting&lt;/h3>
&lt;p>Update linting if you haven&amp;rsquo;t been typing for &lt;em>delay&lt;/em> milliseconds.&lt;/p>
&lt;h3 id="path-to-lsp-executable">Path to LSP executable&lt;/h3>
&lt;p>The path to the language server program, or the name if it&amp;rsquo;s in the &lt;code>PATH&lt;/code> environment variable.&lt;/p>
&lt;h3 id="arguments-for-language-server">Arguments for Language Server&lt;/h3>
&lt;p>Additional arguments for the language server program. See the documentation of the language server program you are using for more information.&lt;/p>
&lt;p>For example, if you are using &lt;code>pyls&lt;/code> for Python, you probably want to use &lt;code>python&lt;/code> as the language server program, and use &lt;code>-m pyls&lt;/code> as the arguments.&lt;/p>
&lt;h2 id="competitive-companion">Competitive Companion&lt;/h2>
&lt;p>&lt;strong>See also&lt;/strong>
&lt;a href="../../../ru/docs/setup/#setup-competitive-companion" >Setup Competitive Companion&lt;/a>
.&lt;/p>
&lt;h3 id="open-new-tabs">Open New Tabs&lt;/h3>
&lt;p>Open a new tab when a problem is parsed.&lt;/p>
&lt;p>If this is disabled, when parsing a problem, the test cases in the current tab will be replaced by the new test cases.&lt;/p>
&lt;h3 id="connection-port">Connection Port&lt;/h3>
&lt;p>Usually, you don&amp;rsquo;t have to modify this setting. The default port &lt;code>10045&lt;/code> is supported by Competitive Companion, so if you are using the default port, you don&amp;rsquo;t have to add custom ports in Competitive Companion. However, in case of port conflicts, etc., you can change the port and add custom ports in Competitive Companion.&lt;/p>
&lt;h3 id="use-the-time-limit-from-competitive-companion">Use the time limit from Competitive Companion&lt;/h3>
&lt;p>Use the time limit parsed by Competitive Companion as the time limit of the corresponding tab.&lt;/p>
&lt;h3 id="head-comments">Head Comments&lt;/h3>
&lt;p>The head comments are added at the head of the code when parsing a problem.&lt;/p>
&lt;h4 id="content-of-the-head-comments">Content of the head comments&lt;/h4>
&lt;p>The content of the head comments. You can use the following place holders:&lt;/p>
&lt;ul>
&lt;li>&lt;code>${time}&lt;/code>: The time when the problem was parsed. The time format can be set in
&lt;a href="#time-format-for-the-head-comments" >Time format for the head comments&lt;/a>
.&lt;/li>
&lt;li>&lt;code>${json.X.Y}&lt;/code>: An attribute of the data provided by Competitive Companion. You can read more about the attributes in
&lt;a href="https://github.com/jmerle/competitive-companion#explanation" target="_blank" >the documentation of Competitive Companion&lt;/a>
. For example, &lt;code>${json.name}&lt;/code> is the name of the problem.&lt;/li>
&lt;/ul>
&lt;h4 id="time-format-for-the-head-comments">Time format for the head comments&lt;/h4>
&lt;p>The format of the &lt;code>${time}&lt;/code> place holder in the head comments. You can read the Qt documentation for available expressions:&lt;/p>
&lt;ul>
&lt;li>
&lt;a href="https://doc.qt.io/qt-5/qdate.html#toString-3" target="_blank" >Date Format&lt;/a>
&lt;/li>
&lt;li>
&lt;a href="https://doc.qt.io/qt-5/qtime.html#toString" target="_blank" >Time Format&lt;/a>
&lt;/li>
&lt;/ul>
&lt;h2 id="cf-tool">CF Tool&lt;/h2>
&lt;p>You can use
&lt;a href="https://github.com/xalanq/cf-tool/" target="_blank" >CF Tool&lt;/a>
to submit your solutions to
&lt;a href="https://codeforces.com" target="_blank" >Codeforces&lt;/a>
.&lt;/p>
&lt;p>To submit a solution, you have to either parse a problem by
&lt;a href="#competitive-companion" >Competitive Companion&lt;/a>
from Codeforces or manually set the problem URL of a tab in the context menu of it.&lt;/p>
&lt;p>&lt;strong>See also&lt;/strong>
&lt;a href="../../../ru/docs/setup/#setup-cf-tool" >Setup CF Tool&lt;/a>
.&lt;/p>
&lt;h3 id="path">Path&lt;/h3>
&lt;p>The path to the &lt;code>cf&lt;/code> executable file, or simply &lt;code>cf&lt;/code> if it&amp;rsquo;s in the &lt;code>PATH&lt;/code> environment variable.&lt;/p>
&lt;h3 id="show-toast-messages-for-submission-verdicts">Show toast messages for submission verdicts&lt;/h3>
&lt;p>Show a toast message when the verdict of a submission is determined.&lt;/p>
&lt;p>A toast message is a &amp;ldquo;system notification&amp;rdquo;, which is visible outside of CP Editor.&lt;/p>
&lt;p>This is useful if you want to get the verdict of the previous problem when reading/solving the next problem.&lt;/p>
&lt;h2 id="wakatime">WakaTime&lt;/h2>
&lt;p>
&lt;a href="https://wakatime.com/" target="_blank" >WakaTime&lt;/a>
can help you to track your time usage.&lt;/p>
&lt;p>&lt;strong>See also&lt;/strong>
&lt;a href="../../../ru/docs/setup/#setup-wakatime" >Setup WakaTime&lt;/a>
.&lt;/p>
&lt;h3 id="enable-wakatime">Enable WakaTime&lt;/h3>
&lt;p>Use WakaTime to track your time usage.&lt;/p>
&lt;h3 id="path-1">Path&lt;/h3>
&lt;p>The path to the &lt;code>wakatime&lt;/code> executable file, or simply &lt;code>wakatime&lt;/code> if it&amp;rsquo;s in the &lt;code>PATH&lt;/code> environment variable.&lt;/p>
&lt;h3 id="api-key">Api Key&lt;/h3>
&lt;p>Can be found at
&lt;a href="https://wakatime.com/settings/account" target="_blank" >WakaTime Settings&lt;/a>
.&lt;/p>
&lt;p>It can be empty if you have the global wakatime config file &lt;code>~/.wakatime.cfg&lt;/code>.&lt;/p>
&lt;h3 id="use-proxy">Use Proxy&lt;/h3>
&lt;p>Use
&lt;a href="../../../ru/docs/preferences/advanced/#network-proxy" >Network Proxy&lt;/a>
to send data to WakaTime.&lt;/p></description></item><item><title>Docs: File Path</title><link>/ru/docs/preferences/file-path/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/file-path/</guid><description>
&lt;h2 id="testcases">Testcases&lt;/h2>
&lt;h3 id="input-file-save-path">Input File Save Path&lt;/h3>
&lt;h3 id="answer-file-save-path">Answer File Save Path&lt;/h3>
&lt;p>The path where the test cases are
&lt;a href="../../../ru/docs/preferences/actions/#save-testcases-on-save" >saved&lt;/a>
. If it is a relative path, it is relative to the source file.&lt;/p>
&lt;p>You can use the following place holders:&lt;/p>
&lt;ul>
&lt;li>&lt;code>${filename}&lt;/code>: the complete filename&lt;/li>
&lt;li>&lt;code>${basename}&lt;/code>: the base file name without the suffix&lt;/li>
&lt;li>&lt;code>${0-index}&lt;/code>: the index of the test case started from 0&lt;/li>
&lt;li>&lt;code>${1-index}&lt;/code>: the index of the test case started from 1&lt;/li>
&lt;/ul>
&lt;p>For example, a test case is the 3-rd test case of the source file &lt;code>/a/b/c.cpp&lt;/code>, the place holders are:&lt;/p>
&lt;ul>
&lt;li>&lt;code>${filename}&lt;/code>: &lt;code>c.cpp&lt;/code>&lt;/li>
&lt;li>&lt;code>${basename}&lt;/code>: &lt;code>c&lt;/code>&lt;/li>
&lt;li>&lt;code>${0-index}&lt;/code>: &lt;code>2&lt;/code>&lt;/li>
&lt;li>&lt;code>${1-index}&lt;/code>: &lt;code>3&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>If the path is &lt;code>testcases/${basename}-${1-index}.in&lt;/code>, the input of this test case will be saved in &lt;code>/a/b/testcases/c-3.in&lt;/code>.&lt;/p>
&lt;h3 id="testcases-matching-rules">Testcases Matching Rules&lt;/h3>
&lt;p>The rules used to match test cases when loading pairs of test cases.&lt;/p>
&lt;p>Each rule is a pair of
&lt;a href="../../../ru/docs/preferences/general/#regular-expression" >regular expression patterns&lt;/a>
. The first regex matches the whole input file name, and the second pattern is a replacement pattern which is the name of the answer file.&lt;/p>
&lt;p>For example, you can use &lt;code>(.+)\.in&lt;/code> and &lt;code>\1.out&lt;/code> to match &lt;code>test-1.in&lt;/code> and &lt;code>test-1.out&lt;/code>, or use &lt;code>(.+)\.in\.(\d+)&lt;/code> and &lt;code>\1.ans.\2&lt;/code> to match &lt;code>test.in.3&lt;/code> and &lt;code>test.ans.3&lt;/code>.&lt;/p>
&lt;p>When loading pairs of test cases, each rule which matches an input file will be used to try to find the corresponding answer file to the input file.&lt;/p>
&lt;h2 id="problem-url">Problem URL&lt;/h2>
&lt;h3 id="default-file-path-for-problem-urls">Default File Path For Problem URLs&lt;/h3>
&lt;p>The default path when choosing where to save an untitled tab with problem URL.&lt;/p>
&lt;p>Each rule is a pair of
&lt;a href="../../../ru/docs/preferences/general/#regular-expression" >regular expression patterns&lt;/a>
. The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path.&lt;/p>
&lt;p>When saving a file with a problem URL, if the problem URL matches at least one regex in the rules, the default save path will be the replacement of the first matching regex.&lt;/p>
&lt;p>Here&amp;rsquo;s an example of a rule:&lt;/p>
&lt;p>The problem URL regex: &lt;code>codeforces.com/contest/([1-9]\d*)/problem/([A-Z][1-9]?)&lt;/code>&lt;/p>
&lt;p>The file path: &lt;code>/home/username/Codeforces/\1/\2&lt;/code>&lt;/p>
&lt;h2 id="default-paths">Default Paths&lt;/h2>
&lt;p>The default path used when the user is asked for a file path.&lt;/p>
&lt;p>There are several actions, different actions can use different default paths.&lt;/p>
&lt;p>The user can set multiple default paths, each default path has a name. A default path can be used as a place holder in the default path of an action. When the user chooses a path for an action, several default paths can be set to this path.&lt;/p>
&lt;p>For example:&lt;/p>
&lt;ul>
&lt;li>The default path for the action &amp;ldquo;Save File&amp;rdquo; is &lt;code>${file}&lt;/code>, and &amp;ldquo;Save File&amp;rdquo; changes &lt;code>file&lt;/code> and &lt;code>testcase&lt;/code>.&lt;/li>
&lt;li>The default path for the action &amp;ldquo;Load Single Test Case&amp;rdquo; is &lt;code>${testcase}&lt;/code>, and &amp;ldquo;Load Single Test Case&amp;rdquo; only changes &lt;code>testcase&lt;/code>.&lt;/li>
&lt;li>At the beginning, &lt;code>file&lt;/code> is &lt;code>/a/b&lt;/code> and &lt;code>testcase&lt;/code> is &lt;code>/a/c&lt;/code>.&lt;/li>
&lt;/ul>
&lt;ol>
&lt;li>You are asked to choose the path for &amp;ldquo;Load Single Test Case&amp;rdquo;. The default path is &lt;code>/a/c&lt;/code>, and you choose &lt;code>/a/d&lt;/code> as the path. Now &lt;code>file&lt;/code> is still &lt;code>/a/b&lt;/code>, but &lt;code>testcase&lt;/code> is changed to &lt;code>/a/d&lt;/code>.&lt;/li>
&lt;li>You are asked to choose the path for &amp;ldquo;Save File&amp;rdquo;. The default path is &lt;code>/a/b&lt;/code>, and you choose &lt;code>/a/e&lt;/code> as the path. Now both &lt;code>file&lt;/code> and &lt;code>testcase&lt;/code> are &lt;code>/a/e&lt;/code>.&lt;/li>
&lt;li>You are asked to choose the path for &amp;ldquo;Load Single Test Case&amp;rdquo;. The default path is &lt;code>/a/e&lt;/code> because &lt;code>testcase&lt;/code> was modified by choosing &lt;code>/a/e&lt;/code> for &amp;ldquo;Save File&amp;rdquo;.&lt;/li>
&lt;/ol>
&lt;p>In the preferences window, the default paths changed by an action is a comma-separated list.&lt;/p></description></item><item><title>Docs: Key Bindings</title><link>/ru/docs/preferences/key-bindings/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/key-bindings/</guid><description>
&lt;p>You can set custom key bindings for many actions. You can change the key by clicking the edit and press the key you want. You can delete a custom key binding by clicking the button on the right.&lt;/p></description></item><item><title>Docs: Advanced</title><link>/ru/docs/preferences/advanced/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/advanced/</guid><description>
&lt;h2 id="update">Update&lt;/h2>
&lt;h3 id="check-for-updates-on-startup">Check for updates on startup&lt;/h3>
&lt;p>When CP Editor starts, checks whether there are new versions of CP Editor.&lt;/p>
&lt;p>If there are new versions, a pop-up window will ask you whether to update or not.&lt;/p>
&lt;h3 id="use-the-beta-version">Use the beta version&lt;/h3>
&lt;p>When checking for updates, check for beta versions. The beta versions usually have more features and improvements, but they are not as stable as the stable versions.&lt;/p>
&lt;h2 id="limits">Limits&lt;/h2>
&lt;h3 id="default-time-limit">Default Time Limit&lt;/h3>
&lt;p>The default time limit when executing programs.&lt;/p>
&lt;p>The program will be killed if it doesn&amp;rsquo;t terminate within the time limit.&lt;/p>
&lt;h3 id="output-length-limit">Output Length Limit&lt;/h3>
&lt;p>The maximum number of characters in the output of the program.&lt;/p>
&lt;p>The program will be killed if either of its stdout or stderr is too long.&lt;/p>
&lt;h3 id="output-display-length-limit">Output Display Length Limit&lt;/h3>
&lt;p>The maximum number of characters to be displayed for the output of the program.&lt;/p>
&lt;p>If the output is too long, it will be elided.&lt;/p>
&lt;h3 id="message-length-limit">Message Length Limit&lt;/h3>
&lt;p>The maximum number of characters in each message in the top-right corner of the main window.&lt;/p>
&lt;p>The message will be elided if it&amp;rsquo;s too long.&lt;/p>
&lt;h3 id="html-diff-viewer-length-limit">HTML Diff Viewer Length Limit&lt;/h3>
&lt;p>The maximum number of characters in the HTML Diff Viewer.&lt;/p>
&lt;p>The Diff Viewer will fall back to plain text if either of the output or the expected output is too long.&lt;/p>
&lt;h3 id="open-file-length-limit">Open File Length Limit&lt;/h3>
&lt;p>The maximum number of characters in a source file to open.&lt;/p>
&lt;p>A source file won&amp;rsquo;t be opened if it&amp;rsquo;s too long.&lt;/p>
&lt;h3 id="display-test-case-length-limit">Display Test Case Length Limit&lt;/h3>
&lt;p>The maximum number of characters in a test case to be displayed.&lt;/p>
&lt;p>A test case will be elided and read-only if it&amp;rsquo;s too long.&lt;/p>
&lt;h2 id="network-proxy">Network Proxy&lt;/h2>
&lt;p>The proxy server used to check for updates.&lt;/p></description></item><item><title>Docs: General</title><link>/ru/docs/preferences/general/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/ru/docs/preferences/general/</guid><description>
&lt;h3 id="temporary-directory">Temporary Directory&lt;/h3>
&lt;p>In CP Editor, each file has a temporary directory, it can be used to save the executable files, etc.&lt;/p>
&lt;p>You can treat it as a place to safely save something for each tab (i.e. each file) without affecting other files on your disk, and it will be automatically deleted when the tab is closed.&lt;/p>
&lt;p>On Linux, it&amp;rsquo;s &lt;code>/tmp/cpeditor-XXXXXX&lt;/code>. On Windows, it&amp;rsquo;s &lt;code>C:\Users\&amp;lt;username&amp;gt;\AppData\Local\Temp\cpeditor-XXXXXX&lt;/code>.&lt;/p>
&lt;h3 id="regular-expression">Regular Expression&lt;/h3>
&lt;p>The
&lt;a href="https://en.wikipedia.org/wiki/Regular_expression" target="_blank" >regular expression&lt;/a>
is used to match patterns in a string and find and replace substrings.&lt;/p>
&lt;p>You can find many online regex courses, for example
&lt;a href="https://regexone.com/" target="_blank" >https://regexone.com/&lt;/a>
.&lt;/p>
&lt;p>In CP Editor, you can use &lt;code>\1&lt;/code>, &lt;code>\2&lt;/code>, etc. for the content of the first/second capture group in the replacement patterns.&lt;/p></description></item></channel></rss>