2016-02-04 15:54:53 +03:00
|
|
|
kak(1)
|
|
|
|
======
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2016-02-04 15:54:53 +03:00
|
|
|
kak - a vim inspired, selection oriented code editor
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2018-08-17 20:57:54 +03:00
|
|
|
*kak* [-help] [-version] [-q] [-n] [-l] [-ro] [-clear] [-ui ui_type] [-e command] [-E command] [-f keys] [-p session_id] [-c session_id|[[-d] -s session_id] [+line[:column]|+:] file ...
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2016-02-03 18:04:20 +03:00
|
|
|
Kakoune is a code editor heavily inspired by Vim, as such most of its commands are similar to Vi's ones, and it
|
|
|
|
shares Vi's "keystrokes as a text editing language" model.
|
2016-02-03 15:51:32 +03:00
|
|
|
|
2016-02-03 18:04:20 +03:00
|
|
|
Kakoune can operate in two modes, normal and insertion. In insertion mode, keys are directly inserted into the
|
|
|
|
current buffer. In normal mode, keys are used to manipulate the current selection and to enter insertion mode.
|
2016-02-03 15:51:32 +03:00
|
|
|
|
2016-02-03 18:04:20 +03:00
|
|
|
Kakoune has a strong focus on interactivity, most commands provide immediate and incremental results, while still
|
|
|
|
being competitive (as in keystroke count) with Vim.
|
2016-02-03 15:51:32 +03:00
|
|
|
|
2016-02-03 18:04:20 +03:00
|
|
|
Kakoune works on selections, which are oriented, inclusive range of characters, selections have an anchor and
|
|
|
|
a cursor character. Most commands move both of them, except when extending selection where the anchor character
|
|
|
|
stays fixed and the cursor one moves around.
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2017-03-07 18:11:29 +03:00
|
|
|
-help::
|
|
|
|
display a help message and quit
|
|
|
|
|
2018-08-17 20:57:54 +03:00
|
|
|
-version::
|
|
|
|
display kakoune version and quit
|
|
|
|
|
2016-02-03 15:51:32 +03:00
|
|
|
-n::
|
2016-10-29 10:48:42 +03:00
|
|
|
do not load resource files on startup ('kakrc', 'autoload', 'rc' etc)
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
-l::
|
|
|
|
list existing sessions
|
|
|
|
|
|
|
|
-d::
|
|
|
|
run as a headless session (requires -s)
|
|
|
|
|
|
|
|
-e <command>::
|
2017-05-15 22:11:51 +03:00
|
|
|
execute *command* after the client initialization phase
|
|
|
|
|
|
|
|
-E <command>::
|
|
|
|
execute *command* after the server initialization phase
|
2016-02-03 15:51:32 +03:00
|
|
|
|
2016-10-29 10:48:42 +03:00
|
|
|
-f <keys>::
|
|
|
|
enter in 'filter mode' and execute *keys* on the files passed as arguments
|
|
|
|
|
2017-11-18 19:33:13 +03:00
|
|
|
-i <suffix>::
|
|
|
|
backup the files on which a filter is applied using the given suffix
|
|
|
|
|
2016-10-29 10:48:42 +03:00
|
|
|
-q::
|
|
|
|
when in 'filter mode', don't print any errors
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
-p <session_id>::
|
2016-10-29 10:48:42 +03:00
|
|
|
send the commands written on the standard input to session *session_id*
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
-c <session_id>::
|
2016-10-29 10:48:42 +03:00
|
|
|
connect to the given session
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
-s <session_id>::
|
2017-01-19 02:47:51 +03:00
|
|
|
set the current session name to *session_id*
|
2016-10-29 10:48:42 +03:00
|
|
|
|
|
|
|
-ui <type>::
|
|
|
|
select the user interface, can be one of 'ncurses', 'dummy' or 'json'
|
|
|
|
|
|
|
|
-clear::
|
|
|
|
remove sessions that terminated in an incorrect state (e.g. after a crash)
|
|
|
|
|
|
|
|
-ro::
|
|
|
|
enter in 'readonly mode', all the buffers opened will not be written to disk
|
2016-02-03 15:51:32 +03:00
|
|
|
|
2017-01-20 00:56:27 +03:00
|
|
|
+line[:column]::
|
2017-03-07 18:11:29 +03:00
|
|
|
specify a target line and column for the first file; when the plus sign is followed by only a colon,
|
|
|
|
then the cursor is sent to the last line of the file
|
2017-01-20 00:56:27 +03:00
|
|
|
|
2016-02-03 15:51:32 +03:00
|
|
|
file::
|
|
|
|
one or more files to edit
|
|
|
|
|
2016-02-03 18:04:20 +03:00
|
|
|
At startup, if -n is not specified, Kakoune will try to source the file '../share/kak/kakrc' relative to the
|
|
|
|
kak binary. This kak file will then try to recursively source any files in *$XDG_CONFIG_HOME*'/kak/autoload'
|
|
|
|
(with *$XDG_CONFIG_HOME* defaulting to *$HOME*'/.config', and falling back to '../share/kak/autoload' if that
|
|
|
|
autoload directory does not exist), and finally *$XDG_CONFIG_HOME*'/kak/kakrc'.
|
2016-02-03 15:51:32 +03:00
|
|
|
|
2016-02-03 18:04:20 +03:00
|
|
|
That leads to the following behaviour: by default, with no user autoload directory, the system wide autoload
|
|
|
|
directory is used, once the user wants control on autoloading, they can create an autoload directory and eventually
|
|
|
|
symlink individual scripts, or the whole system wide autoload directory. They can as well add any new scripts not
|
|
|
|
provided with Kakoune.
|
2016-02-03 15:51:32 +03:00
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
--------
|
|
|
|
kak /path/to/file::
|
|
|
|
Edit a file
|
|
|
|
|
|
|
|
kak ./file1.txt /path/to/file2.c::
|
|
|
|
Edit multiple files (multiple buffers will be created)
|
|
|
|
|
|
|
|
kak -f "ggO// kak: tabstop=8<esc>" *.c::
|
|
|
|
Insert a modeline that sets the tabstop variable at the beginning of several source code files
|
|
|
|
|
|
|
|
FILES
|
|
|
|
-----
|
2016-02-03 18:04:20 +03:00
|
|
|
If not started with the -n switch, Kakoune will source the '../share/kak/kakrc' file relative to the kak binary,
|
|
|
|
which will source additional files:
|
2016-02-03 15:51:32 +03:00
|
|
|
|
2016-02-03 18:04:20 +03:00
|
|
|
* if the *$XDG_CONFIG_HOME*'/kak/autoload' directory exists, load every '*.kak' files in it, and load
|
|
|
|
recursively any subdirectory
|
2017-04-21 13:32:47 +03:00
|
|
|
* if it does not exist, fall back to the system wide autoload directory in '../share/kak/autoload'
|
2016-02-03 15:51:32 +03:00
|
|
|
|
2016-02-03 18:04:20 +03:00
|
|
|
After that, if it exists, source the *$XDG_CONFIG_HOME*'/kak/kakrc' file which should be used for user
|
|
|
|
configuration. In order to continue autoloading site-wide files with a local autoload directory, just add a symbolic
|
|
|
|
link to '../share/kak/autoload' into your local autoload directory.
|