diff --git a/content/docs/Preferences/General/_index.md b/content/docs/General/Information/_index.md similarity index 88% rename from content/docs/Preferences/General/_index.md rename to content/docs/General/Information/_index.md index 31f3bf379..cbb13680a 100644 --- a/content/docs/Preferences/General/_index.md +++ b/content/docs/General/Information/_index.md @@ -1,6 +1,7 @@ --- -title: "General" +title: "Information" weight: 1000 +description: Information regarding terminologies or methodologies used in Documentations --- ### Temporary Directory diff --git a/content/docs/Preferences/General/_index.ru.md b/content/docs/General/Information/_index.ru.md similarity index 97% rename from content/docs/Preferences/General/_index.ru.md rename to content/docs/General/Information/_index.ru.md index 31f3bf379..0754deac9 100644 --- a/content/docs/Preferences/General/_index.ru.md +++ b/content/docs/General/Information/_index.ru.md @@ -1,5 +1,5 @@ --- -title: "General" +title: "Information" weight: 1000 --- diff --git a/content/docs/Preferences/General/_index.zh.md b/content/docs/General/Information/_index.zh.md similarity index 100% rename from content/docs/Preferences/General/_index.zh.md rename to content/docs/General/Information/_index.zh.md diff --git a/content/docs/General/Vim Commands/_index.md b/content/docs/General/Vim Commands/_index.md new file mode 100644 index 000000000..0662ebb89 --- /dev/null +++ b/content/docs/General/Vim Commands/_index.md @@ -0,0 +1,154 @@ +--- +title: "Vim Commands" +weight: 1000 +description: List of supported vim commands in Vim Emulation +--- + +### Vim Commands + +#### Supported Features + +Most of supported commands can be followed by motion command or executed in visual mode, work with registers or can be prefixed with number of repetitions. + +Here is list of emulated commands with description where it can diverge from Vim in functionality. + +#### Modes + +- normal +- insert and replace +- visual +- command line (`:`) + +#### Normal and Visual Modes + +- basic movement -- `h`/`j`/`k`/`l`, ``, ``, ``, ``, `gg`, `G`, `0`, `^`, `$` etc. +- word movement -- `w`, `e`, `b` etc. +- "inner/a" movement -- `ciw`, `3daw`, `ya{` etc. +- `f`, `t` movement +- `[`, `]` movement +- `{`, `}` -- paragraph movement +- delete/change/yank/paste with register +- undo/redo +- ``, `` -- increase or decrease number in decimal/octal/hexadecimal format (e.g. `128` on or before "0x0ff" changes it to "0x17f") +- `.` -- repeat last change +- `/search`, `?search`, `*`, `#`, `n`, `N` -- most of regular expression syntax used in Vim except `\<` and `\>` just is the same as `\b` in QRegExp +- `@`, `q` (macro recording, execution) -- special keys are saved as `` +- marks +- `gv` -- last visual selection; can differ if text is edited around it +- indentation -- `=`, `<<`, `>>` etc. with movement, count and in visual mode +- "to upper/lower" -- `~`, `gU`, `gu` etc. +- `i`, `a`, `o`, `I`, `A`, `O` -- enter insert mode +- scroll window -- `zt`, `zb`, `zz` etc. +- wrap line movement -- `gj`, `gk`, `g0`, `g^`, `g$` + +#### Command Line Mode + +- `:map`, `:unmap`, `:inoremap` etc. +- `:source` -- very basic line-by-line sourcing of vimrc files +- `:substitute` -- substitute expression in range +- `:'<,'>!cmd` -- filter through an external command (e.g. sort lines in file with `:%!sort`) +- `:.!cmd` -- insert standard output of an external command +- `:read` +- `:yank`, `:delete`, `:change` +- `:move`, `:join` +- `:20` -- go to address +- `:history` +- `:registers`, `:display` +- `:nohlsearch` +- `:undo`, `:redo` +- `:normal` +- `:<`, `:>` + +#### Insert Mode + +- `` -- execute single command and return to insert mode +- `` -- insert raw character +- `` -- toggle replace mode + +#### Options (:set ...) + +- `autoindent` +- `clipboard` +- `backspace` +- `expandtab` +- `hlsearch` +- `ignorecase` +- `incsearch` +- `indent` +- `iskeyword` +- `scrolloff` +- `shiftwidth` +- `showcmd` +- `smartcase` +- `smartindent` +- `smarttab` +- `startofline` +- `tabstop` +- `tildeop` +- `wrapscan` + +#### Example Vimrc + +```vimrc +" highlight matched +set hlsearch +" case insensitive search +set ignorecase +set smartcase +" search while typing +set incsearch +" wrap-around when searching +set wrapscan +" show pressed keys in lower right corner +set showcmd +" tab -> spaces +set expandtab +set tabstop=4 +set shiftwidth=4 +" keep a 5 line buffer for the cursor from top/bottom of window +set scrolloff=5 +" X11 clipboard +set clipboard=unnamed +" use ~ with movement +set tildeop + +" mappings +nnoremap ; : +inoremap jj + +" clear highlighted search term on space +noremap :nohls + +" reselect visual block after indent +vnoremap < >gv + +" MOVE LINE/BLOCK +nnoremap :m+== +nnoremap :m-2== +inoremap :m+==gi +inoremap :m-2==gi +vnoremap :m'>+gv=gv +vnoremap :m-2gv=gv +``` + +### Custom vim commands + +In this section we present a list of all custom vim commands that are supported to perform different operation in CP Editor. + +| Command | Shorthand | Description | Usage | +| :----------: | :-------: | :-----------------------------------------------------------------------------------------------------------------------: | :-------------------------: | +| `new` | `new` | Opens a new tab, if no langauge is specified, a tab in default editor langauge will open | `new cpp` or `new` | +| `open` | `opn` | Opens a new file, Only C++/Java/Python files will be opened. Without arguments it is same as open in Action menu. | `open` or `opn ~/cf/a.cpp` | +| `compile` | `cmp` | Compiles the code, It is like clicking "Compile" button in a tab. | `compile` or `cmp` | +| `crun` | `crn` | Compiles and run, It is like clicking "Compile and Run" button in a tab. | `crun` or `crn` | +| `run` | `run` | Run, if no argument is provided all testcases are ran, otherwise nth testcase is ran. Counting includes hidden testcases. | `run` or `run 2` | +| `drun` | `drn` | Detached run, It is same as clicking "Detached Run" in menu. | `drun` or `drn` | +| `killall` | `kap` | Kill all process, It is same as clicking "Kill Process" in menu | `killall` or `kap` | +| `format` | `fmt` | Format Code, It is same as clicking "Format Code" in menu | `format` or `fmt` | +| `snippet` | `snp` | Open snippet dialog, It is same as clicking "Use Snippets" in menu | `snippet` or `snp` | +| `vmode` | `vmd` | View mode, Changes the view mode. It can only toggle to "edit" and "split" mode | `vmode edit` or `vmd split` | +| `preference` | `prf` | Preferences, It is same as clicking "Preference" in menu | `preference` or `prf` | +| `chlang` | `chl` | Language, It can be used to change the language of a tab. | `chlang cpp` or `chl java` | +| `clear` | `clr` | Clear Message logger text | `clear` or `clr` | +| `exit` | `ext` | Exit, It is same as pressing "Quit" in menu. | `exit` or `ext` | diff --git a/content/docs/General/Vim Commands/_index.ru.md b/content/docs/General/Vim Commands/_index.ru.md new file mode 100644 index 000000000..1b7313743 --- /dev/null +++ b/content/docs/General/Vim Commands/_index.ru.md @@ -0,0 +1,4 @@ +--- +title: "Vim Commands" +weight: 1000 +--- diff --git a/content/docs/General/Vim Commands/_index.zh.md b/content/docs/General/Vim Commands/_index.zh.md new file mode 100644 index 000000000..1b7313743 --- /dev/null +++ b/content/docs/General/Vim Commands/_index.zh.md @@ -0,0 +1,4 @@ +--- +title: "Vim Commands" +weight: 1000 +--- diff --git a/content/docs/General/_index.md b/content/docs/General/_index.md new file mode 100644 index 000000000..f97810676 --- /dev/null +++ b/content/docs/General/_index.md @@ -0,0 +1,6 @@ +--- +title: "General" +linkTitle: "General" +weight: 60 +description: General Information regarding Setup and documentation +--- diff --git a/content/docs/General/_index.ru.md b/content/docs/General/_index.ru.md new file mode 100644 index 000000000..f97810676 --- /dev/null +++ b/content/docs/General/_index.ru.md @@ -0,0 +1,6 @@ +--- +title: "General" +linkTitle: "General" +weight: 60 +description: General Information regarding Setup and documentation +--- diff --git a/content/docs/General/_index.zh.md b/content/docs/General/_index.zh.md new file mode 100644 index 000000000..f97810676 --- /dev/null +++ b/content/docs/General/_index.zh.md @@ -0,0 +1,6 @@ +--- +title: "General" +linkTitle: "General" +weight: 60 +description: General Information regarding Setup and documentation +--- diff --git a/content/docs/Preferences/Code Edit/_index.md b/content/docs/Preferences/Code Editing/_index.md similarity index 64% rename from content/docs/Preferences/Code Edit/_index.md rename to content/docs/Preferences/Code Editing/_index.md index 5a00079e3..812b6d30d 100644 --- a/content/docs/Preferences/Code Edit/_index.md +++ b/content/docs/Preferences/Code Editing/_index.md @@ -1,5 +1,5 @@ --- -title: "Code Edit" +title: "Code Editing" weight: 10 --- @@ -41,3 +41,19 @@ You can choose the parentheses to jump out by Tab in the [Parentheses](../langua When you insert an indent, insert spaces instead of a tab character. The number of spaces is equal to the [Tab Width](#tab-width). Note that this won't replace the existing tab characters. In [Auto Indent](#auto-indent), the tab characters in the old line will remain in the new line (however, the new indent inserted after `{` will be spaces). + +### Default cursor overwrites + +There are two modes in text editing, Insert and Replace mode. Insert mode is common and most widely used, this is CP Editor and other editor’s default mode. In Replace mode, the cursor replaces the next character with the pressed character. If this option is enabled the cursor for newly opened tab will be in Replace mode. It can be toggled for individual tabs by pressig INS or Insert on your keyboard. + +### Highlight Current Line + +If enabled the current line number is highlighted from the rest of the lines. In Vim mode, current line is never highlighted. + +### Enable Vim emulation + +If enabled code editor uses vim emulation. In Vim emulation, Control Key such as Ctrl+N will not be intercepted by CP Editor but by Code Editor. We provide some custom commands that can perform most of these tasks. You can check a list of all supported custom commands and its usage [here](../../general/vim-commands/#custom-vim-commands) + +### Vim Configuration + +The configuration to use in vim mode. The list of all supported vim commands are listed [here](../../general/vim-commands/#vim-commands) diff --git a/content/docs/Preferences/Code Edit/_index.ru.md b/content/docs/Preferences/Code Editing/_index.ru.md similarity index 100% rename from content/docs/Preferences/Code Edit/_index.ru.md rename to content/docs/Preferences/Code Editing/_index.ru.md diff --git a/content/docs/Preferences/Code Edit/_index.zh.md b/content/docs/Preferences/Code Editing/_index.zh.md similarity index 100% rename from content/docs/Preferences/Code Edit/_index.zh.md rename to content/docs/Preferences/Code Editing/_index.zh.md diff --git a/content/docs/Preferences/File Path/_index.md b/content/docs/Preferences/File Path/_index.md index 97464d0cc..98c20e57e 100644 --- a/content/docs/Preferences/File Path/_index.md +++ b/content/docs/Preferences/File Path/_index.md @@ -29,7 +29,7 @@ If the path is `testcases/${basename}-${1-index}.in`, the input of this test cas The rules used to match test cases when loading pairs of test cases. -Each rule is a pair of [regular expression patterns](../general#regular-expression). 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. +Each rule is a pair of [regular expression patterns](../../general/information#regular-expression). 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. For example, you can use `(.+)\.in` and `\1.out` to match `test-1.in` and `test-1.out`, or use `(.+)\.in\.(\d+)` and `\1.ans.\2` to match `test.in.3` and `test.ans.3`. @@ -41,7 +41,7 @@ When loading pairs of test cases, each rule which matches an input file will be The default path when choosing where to save an untitled tab with problem URL. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. +Each rule is a pair of [regular expression patterns](../../general/information#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. When saving a file with 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. diff --git a/content/docs/Preferences/File Path/_index.ru.md b/content/docs/Preferences/File Path/_index.ru.md index 97464d0cc..98c20e57e 100644 --- a/content/docs/Preferences/File Path/_index.ru.md +++ b/content/docs/Preferences/File Path/_index.ru.md @@ -29,7 +29,7 @@ If the path is `testcases/${basename}-${1-index}.in`, the input of this test cas The rules used to match test cases when loading pairs of test cases. -Each rule is a pair of [regular expression patterns](../general#regular-expression). 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. +Each rule is a pair of [regular expression patterns](../../general/information#regular-expression). 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. For example, you can use `(.+)\.in` and `\1.out` to match `test-1.in` and `test-1.out`, or use `(.+)\.in\.(\d+)` and `\1.ans.\2` to match `test.in.3` and `test.ans.3`. @@ -41,7 +41,7 @@ When loading pairs of test cases, each rule which matches an input file will be The default path when choosing where to save an untitled tab with problem URL. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. +Each rule is a pair of [regular expression patterns](../../general/information#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. When saving a file with 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. diff --git a/content/docs/Preferences/File Path/_index.zh.md b/content/docs/Preferences/File Path/_index.zh.md index 97464d0cc..98c20e57e 100644 --- a/content/docs/Preferences/File Path/_index.zh.md +++ b/content/docs/Preferences/File Path/_index.zh.md @@ -29,7 +29,7 @@ If the path is `testcases/${basename}-${1-index}.in`, the input of this test cas The rules used to match test cases when loading pairs of test cases. -Each rule is a pair of [regular expression patterns](../general#regular-expression). 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. +Each rule is a pair of [regular expression patterns](../../general/information#regular-expression). 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. For example, you can use `(.+)\.in` and `\1.out` to match `test-1.in` and `test-1.out`, or use `(.+)\.in\.(\d+)` and `\1.ans.\2` to match `test.in.3` and `test.ans.3`. @@ -41,7 +41,7 @@ When loading pairs of test cases, each rule which matches an input file will be The default path when choosing where to save an untitled tab with problem URL. -Each rule is a pair of [regular expression patterns](../general#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. +Each rule is a pair of [regular expression patterns](../../general/information#regular-expression). The first regex matches a part of the problem URL, and the second pattern is a replacement pattern which is the default save path. When saving a file with 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. diff --git a/content/docs/Preferences/Language/_index.md b/content/docs/Preferences/Language/_index.md index 69f66db44..76a117e57 100644 --- a/content/docs/Preferences/Language/_index.md +++ b/content/docs/Preferences/Language/_index.md @@ -25,13 +25,13 @@ For compilation flags, please refer to the manual of the compiler. For example, The path of the executable file, i.e. the argument of the `-o` option of the compiler. -If this path is a relative path, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general#temporary-directory)). +If this path is a relative path, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../../general/information#temporary-directory)). You can use some place holders for this setting: - `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. - `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). -- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general#temporary-directory). +- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../../general/information#temporary-directory). For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory under the directory of the source file. @@ -103,7 +103,7 @@ The initial position of the text cursor when opening the template. It contains three parts: -1. [Regex](../general#regular-expression) +1. [Regex](../../general/information#regular-expression) 2. Offset type: start or end. 3. Offset characters: a number, could be negative. @@ -142,16 +142,16 @@ When choosing a snippet, you can enter the first few characters of the snippet n You can set the parentheses settings for each language and each parenthesis. -Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit) page. +Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Editing](../code-editing) page. Otherwise, it overwrites the settings in the [Code Editing](../code-editing) page. ### Auto Complete -See [Code Edit/Auto Complete Parentheses](../code-edit#auto-complete-parentheses). +See [Code Editing/Auto Complete Parentheses](../code-editing#auto-complete-parentheses). ### Auto Remove -See [Code Edit/Auto Remove Parentheses](../code-edit#auto-remove-parentheses). +See [Code Editing/Auto Remove Parentheses](../code-editing#auto-remove-parentheses). ### Tab Jump Out -See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit#jump-out-of-a-parenthesis-by-pressing-tab). +See [Code Editing/Jump out of a parenthesis by pressing Tab](../code-editing#jump-out-of-a-parenthesis-by-pressing-tab). diff --git a/content/docs/Preferences/Language/_index.ru.md b/content/docs/Preferences/Language/_index.ru.md index b2f099066..df8b54b11 100644 --- a/content/docs/Preferences/Language/_index.ru.md +++ b/content/docs/Preferences/Language/_index.ru.md @@ -25,13 +25,13 @@ For compilation flags, please refer to the manual of the compiler. For example, The path of the executable file, i.e. the argument of the `-o` option of the compiler. -If this path is a relative path, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../general#temporary-directory)). +If this path is a relative path, then it's relative to the source file (if it's an untitled tab, then relative to the [Temporary Directory](../../general/information#temporary-directory)). You can use some place holders for this setting: - `${filename}`: The complete name of the source file. If it's an untitled tab (i.e. an unsaved file), the complete file name is `sol.cpp`. - `${basename}`: `${filename}` without the suffix (i.e. without `.cpp`, etc.). -- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../general#temporary-directory). +- `${tmpdir}` or `${tempdir}`: The path of the [Temporary Directory](../../general/information#temporary-directory). For example, you can use `${tmpdir}/${basename}` if you don't want to keep the executable files, or `executables/${basename}` if you want to keep all executable files in the `executables` directory in the parent directory of the source file. @@ -103,7 +103,7 @@ The initial position of the text cursor when opening the template. It contains three parts: -1. [Regex](../general#regular-expression) +1. [Regex](../../general/information#regular-expression) 2. Offset type: start or end. 3. Offset characters: a number, could be negative. @@ -142,16 +142,16 @@ When choosing a snippet, you can enter the first few characters of the snippet n You can set the parentheses settings for each language and each parenthesis. -Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Edit](../code-edit) page. Otherwise, it overwrites the settings in the [Code Edit](../code-edit) page. +Each setting has three states: enable, disable and default. If it's default, it uses the settings in the [Code Editing](../code-editing) page. Otherwise, it overwrites the settings in the [Code Editing](../code-editing) page. ### Auto Complete -See [Code Edit/Auto Complete Parentheses](../code-edit#auto-complete-parentheses). +See [Code Editing/Auto Complete Parentheses](../code-editing#auto-complete-parentheses). ### Auto Remove -See [Code Edit/Auto Remove Parentheses](../code-edit#auto-remove-parentheses). +See [Code Editing/Auto Remove Parentheses](../code-editing#auto-remove-parentheses). ### Tab Jump Out -See [Code Edit/Jump out of a parenthesis by pressing Tab](../code-edit#jump-out-of-a-parenthesis-by-pressing-tab). +See [Code Editing/Jump out of a parenthesis by pressing Tab](../code-editing#jump-out-of-a-parenthesis-by-pressing-tab). diff --git a/content/docs/Preferences/Language/_index.zh.md b/content/docs/Preferences/Language/_index.zh.md index bbb8cbbc5..ed4a1f0aa 100644 --- a/content/docs/Preferences/Language/_index.zh.md +++ b/content/docs/Preferences/Language/_index.zh.md @@ -25,13 +25,13 @@ weight: 20 设置可执行文件的路径,即编译命令中 `-o` 选项后的参数。 -如果使用了相对路径,则可执行文件的位置将和源代码位置有关(如果当前标签是未命名标签,则可执行文件位置将和 [临时文件夹](../general#临时文件夹) 的位置有关)。 +如果使用了相对路径,则可执行文件的位置将和源代码位置有关(如果当前标签是未命名标签,则可执行文件位置将和 [临时文件夹](../../general/information/#临时文件夹) 的位置有关)。 该设置中,你可以使用如下参数: - `${filename}`:源代码的完整文件名。如果当前标签是未命名标签,则完整文件名是 `sol.cpp`。 - `${basename}`:将 `${filename}` 去掉扩展名(`.cpp` 等)后的文件名。 -- `${tmpdir}` 或 `${tempdir}`:[临时文件夹](../general#临时文件夹) 的路径。 +- `${tmpdir}` 或 `${tempdir}`:[临时文件夹](../../general/information/#临时文件夹) 的路径。 例如,使用 `${tmpdir}/${basename}` 将会把可执行文件存储在临时文件夹下。如果你不想要存储可执行文件的话,可以这样设定路径。而 `executables/${basename}` 将会把可执行文件存储在源代码所在目录的下的 `executables` 文件夹。 @@ -103,7 +103,7 @@ weight: 20 该设置包含三部分。 -1. [正则表达式](../general#正则表达式) +1. [正则表达式](../../general/information#正则表达式) 2. 偏移类型:开头或末尾。 3. 偏移量:一个数字,可以为负值。 @@ -142,16 +142,16 @@ int main() 你可以为各编程语言设置相应的括号补全选项。 -每个设置有三种状态:开启,关闭或默认。如果处于默认状态,将应用 [代码编辑](../code-edit) 中的设置,否则将会使用这里的设置。 +每个设置有三种状态:开启,关闭或默认。如果处于默认状态,将应用 [代码编辑](../code-editing) 中的设置,否则将会使用这里的设置。 ### 自动补全 -详见 [代码编辑/自动补全括号](../code-edit#自动补全括号)。 +详见 [代码编辑/自动补全括号](../code-editing#自动补全括号)。 ### 自动删除 -详见 [代码编辑/自动删除括号](../code-edit#自动删除括号)。 +详见 [代码编辑/自动删除括号](../code-editing#自动删除括号)。 ### 按 Tab 键跳出 -详见 [代码编辑/在按下 Tab 键时跳出括号](../code-edit#在按下-tab-键时跳出括号)。 +详见 [代码编辑/在按下 Tab 键时跳出括号](../code-editing#在按下-tab-键时跳出括号)。 diff --git a/content/docs/Tips/_index.md b/content/docs/Tips/_index.md index 1836c9ae6..78732d8a0 100644 --- a/content/docs/Tips/_index.md +++ b/content/docs/Tips/_index.md @@ -14,6 +14,12 @@ You can use Ctlr+Tab and Ctlr+Shift+Tab to go through the Besides the shortcuts in the menu, you can use the [Read-only Key Bindings](https://doc.qt.io/qt-5/qtextedit.html#read-only-key-bindings) and the [Editing Key Bindings](https://doc.qt.io/qt-5/qtextedit.html#editing-key-bindings). There are also some hidden shortcuts: Tab (when there's a selection) and Shift+Tab for indent and unindent, Ctrl+Enter and Ctrl+Shift+Enter for inserting line after and before, Shift+Delete for deleting the current line. +## Vim Emulation + +You can enable vim emulation in code editor. [Most basic vim commands](../general/vim-commands#vim-commands) and some [custom commands](../general/vim-commands#custom-vim-commands) of CP Editor are supported. Many code editor settings like Tab width, Indentation, Current line highlighting are disabled when using vim mode but you can set them in [Vim configuration](../preferences/code-editing/#vim-configuration). + +You can switch to next or previous tab using `tabn` and `tabp` respectively. + ## Drag and Drop You can drag files and drop them into the main editor or the input/expected part of test cases.