KAKOUNE(1) ========== NAME ---- shortcuts - a Insert mode ----------- **:: leave insert mode **:: delete characters before cursors **:: delete characters under cursors **, **, **, **:: move the cursors in given direction **:: move cursors to line begin **:: move cursors to end of line **:: select next completion candidate **:: select previous completion candidate **:: explicit insert completion query, followed by: *f*::: explicit file completion *w*::: explicit word completion *l*::: explicit line completion **:: disable automatic completion for this insert session **:: insert contents of the register given by next key **:: insert next keystroke directly into the buffer, without interpreting it **:: commit changes up to now as a single undo group **:: escape to normal mode for a single command Movement -------- 'word' is a sequence of alphanumeric characters or underscore, and 'WORD' is a sequence of non whitespace characters *h*:: select the character on the left of selection end *j*:: select the character below the selection end *k*:: select the character above the selection end *l*:: select the character on the right of selection end *w*:: select the word and following whitespaces on the right of selection end *b*:: select preceding whitespaces and the word on the left of selection end *e*:: select preceding whitespaces and the word on the right of selection end **:: same as [wbe] but select WORD instead of word *f*:: select to the next occurrence of given character *t*:: select until the next occurrence of given character **:: same as [ft] but in the other direction *m*:: select to matching character *M*:: extend selection to matching character *x*:: select line on which selection end lies (or next line when end lies on an end-of-line) **:: expand selections to contain full lines (including end-of-lines) **:: trim selections to only contain full lines (not including last end-of-line) *%*:: select whole buffer **:: select to line begin **:: select to line end */*:: search (select next match) **:: search (select previous match) *?*:: search (extend to next match) **:: search (extend to previous match) *n*:: select next match *N*:: add a new selection with next match **:: select previous match **:: add a new selection with previous match *pageup*:: scroll up *pagedown*:: scroll down *'*:: rotate selections (the main selection becomes the next one) *;*:: reduce selections to their cursor **:: flip the selections direction **:: ensure selections are in forward direction (cursor after anchor) Changes ------- *i*:: enter insert mode before current selection *a*:: enter insert mode after current selection *d*:: yank and delete current selection *c*:: yank and delete current selection and enter insert mode *.*:: repeat last insert mode change (*i*, *a*, or *c*, including the inserted text) *I*:: enter insert mode at current selection begin line start *A*:: enter insert mode at current selection end line end *o*:: enter insert mode in a new line below current selection end *O*:: enter insert mode in a new line above current selection begin *y*:: yank selections *p*:: paste after current selection end *P*:: paste before current selection begin **:: paste all after current selection end, and select each pasted string **:: paste all before current selection begin, and select each pasted string *R*:: replace current selection with yanked text *r*:: replace each character with the next entered one **:: join selected lines **:: join selected lines and select spaces inserted in place of line breaks *>*:: indent selected lines *>*:: indent selected lines, including empty lines *<*:: deindent selected lines **:: deindent selected lines, do not remove incomplete indent (3 leading spaces when indent is 4) *|*:: pipe each selection through the given external filter program and replace the selection with its output **:: pipe each selection through the given external filter program and ignore its output *!*:: insert command output before selection *a-!*:: append command output after selection *u*:: undo last change *U*:: redo last change *&*:: align selection, align the cursor of selections by inserting spaces before the first character of the selection **:: copy indent, copy the indentation of the main selection (or the count one if a count is given) to all other ones *`*:: to lower case *~*:: to upper case **:: swap case *@*:: convert tabs to spaces in current selections, uses the buffer tabstop option or the count parameter for tabstop **:: convert spaces to tabs in current selections, uses the buffer tabstop option or the count parameter for tabstop **:: rotate selections content, if specified, the count groups selections, so the following command ---------- 3 ---------- rotate (1, 2, 3) and (3, 4, 6) independently Goto Commands ------------- If a count is given prior to hitting *g*, *g* will jump to the given line *gh*:: select to line begin *gl*:: select to line end *gg*, *gk*:: go to the first line *gj*:: go to the last line *ge*:: go to last char of last line *gt*:: go to the first displayed line *gc*:: go to the middle displayed line *gb*:: go to the last displayed line *ga*:: go to the previous (alternate) buffer *gf*:: open the file whose name is selected *g.*:: go to last buffer modification position View commands ------------- *V*:: lock view mode until is hit *vv*, *vc*:: center the main selection in the window *vt*:: scroll to put the main selection on the top line of the window *vb*:: scroll to put the main selection on the bottom line of the window *vh*:: scroll the window count columns left *vj*:: scroll the window count line downward *vk*:: scroll the window count line upward *vl*:: scroll the window count columns right Marks ----- Marks use the *^* register by default. *Z*:: will save the current selections to the register *z*:: will restore the selections from the register **:: will add the selections from the register to the existing ones Macros ------ Macros use the *@* register by default *Q*:: record a macro *q*:: play a recorded macro Searching --------- Searches use the */* register by default ***:: set the search pattern to the current selection (automatically detects word boundaries) **:: set the search pattern to the current selection (verbatim, no smart detection) Jump list --------- **:: Jump forward **:: Jump backward **:: save current selections Multiple selections ------------------- *s*:: create a selection **:: split the current selections on line boundaries *S*:: split the current selection *C*:: copy the current selection to the next line **:: copy the current selection to the previous line **:: clear a multiple selection **:: clear the current selection **:: keep the selections that match the given regex **:: clear selections that match the given regex *$*:: pipe each selection to the given shell command and keep the ones for which the shell returned 0 Object Selection ---------------- **:: selects the whole object **:: selects the inner object, that is the object excluding it's surrounder *[*:: selects to object start *]*:: selects to object end *{*:: extends selections to object start *}*:: extends selections to object end After these keys, you need to enter a second key in order to specify which object you want *b*, *(*, *)*:: select the enclosing parenthesis *B*, *{*, *}*:: select the enclosing {} block *r*, *[*, *]*:: select the enclosing [] block *a*, *<*, *>*:: select the enclosing <> block *"*:: select the enclosing double quoted string *'*:: select the enclosing single quoted string *`*:: select the enclosing grave quoted string *w*:: select the whole word *W*:: select the whole WORD *s*:: select the sentence *p*:: select the paragraph *␣*:: select the whitespaces *i*:: select the current indentation block *n*:: select the number *:*:: select user defined object, will prompt for open and close text Prompt Commands --------------- **:: validate prompt **:: abandon without **, **:: move cursor to previous character **, **:: move cursor to previous character **:: move cursor to first character **:: move cursor to passed last character **, **:: erase character before cursor **, **:: erase character under cursor **:: avance to next word begin **:: advance to next WORD begin **:: go back to previous word begin **:: go back to previous WORD begin **:: advance to next word end **:: advance to next word end **, **:: select previous entry in history **, **:: select next entry in history **:: select next completion candidate **:: select previous completion candidate **:: insert then content of the register given by next key **:: insert next keystroke without interpreting it **:: disable auto completion for this prompt Key mapping ----------- Mapping a combination of keys to another one (a.k.a. key mapping or binding) can be done with the following command: ------------------------------- map ------------------------------- *scope*:: can be one of *global*, *window* or *buffer* *mode*:: can be one of *insert*, *normal*, *prompt*, *menu*, *user* or a one character long arbitrary prefix (the *user* mode uses the *,* prefix) *key*:: the key to which the combination will be bound *keys*:: string that lists the keys that will be executed when *key* is hit Keys are always executed within the *normal* mode.