Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
KAK(1)			    General Commands Manual			KAK(1)

NAME
       kak - a vim inspired, selection oriented	code editor

SYNOPSIS
       kak -help

       kak -version

       kak -l

       kak -clear

       kak -f keys [-q]	[-i] file...

       kak -p session_id

       kak  -s	session_id  -d	[-n]  [-ro]  [-E  command] [+line[:column]|+:]
       file...

       kak [-c session_id|-s session_id] [-n] [-ro] [-ui ui_type] [-e command]
       [-E command] [+line[:column]|+:]	file...

DESCRIPTION
       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.

       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.

       Kakoune has a strong focus on interactivity, most commands provide  im-
       mediate	and  incremental results, while	still being competitive	(as in
       keystroke count)	with Vim.

       Kakoune works on	selections, which are  oriented,  inclusive  range  of
       characters, selections have an anchor and a cursor character. Most com-
       mands move both of them,	except when extending selection	where the  an-
       chor character stays fixed and the cursor one moves around.

       For  more information, use the :doc command after starting Kakoune, the
       Kakoune wiki at https://github.com/mawww/kakoune/wiki or	the main  Kak-
       oune web	site: https://kakoune.org/

OPTIONS
       -help  display a	help message and quit

       -version
	      display kakoune version and quit

       -n     do not load resource files on startup (kakrc, autoload, rc etc)

       -l     list existing sessions

       -d     run as a headless	session	(requires -s)

       -e command
	      execute command after the	client initialization phase

       -E command
	      execute command after the	server initialization phase

       -f keys
	      enter in filter mode: select the whole file, then	execute	keys

       -i suffix
	      backup  the  files  on which a filter is applied using the given
	      suffix

       -q     when in filter mode, don't print any errors

       -p session_id
	      send the commands	written	on the standard	input to session  ses-
	      sion_id

       -c session_id
	      connect to the given session

       -s session_id
	      set the current session name to session_id

       -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. af-
	      ter a crash)

       -ro    enter in readonly	mode, all the buffers opened will not be writ-
	      ten to disk

       +line[:column]
	      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

       file   one or more files	to edit

ENVIRONMENT
       KAKOUNE_POSIX_SHELL
	      Overrides	the posix shell	binary path to use for %sh{...}	expan-
	      sion.

       KAKOUNE_CONFIG_DIR
	      Overrides	the location of	the directory containing kakoune  user
	      configuration, defaults to $XDG_CONFIG_HOME/kak if unset.

       XDG_CONFIG_HOME
	      Path   to	  the	user   configuration  directory,  defaults  to
	      $HOME/.config if unset.

       XDG_RUNTIME_DIR
	      Path to the user session sockets,	defaults to $TMPDIR/kakoune if
	      unset.

FILES
       In the paths documented below, _rtdir_ refers to	the runtime directory,
       whose value is determined in relation to	the path to  the  kak  binary:
       _rtdir_ = _path_to_kak_binary_/../share/kak.

       If  not	started	 with  the  -n	switch,	 Kakoune  will first load _rt-
       dir_/kakrc, which will in turn load the following additional files:

	      if the $KAKOUNE_CONFIG_DIR/autoload directory exists, recursively	load every
	      *.kak files in it	and its	sub-directories

	      if it does not exist, fall back to the system-wide autoload directory
	      in _rtdir_/autoload, and recursively load	all files in a similar way

	      _rtdir_/kakrc.local, if it exists; this is a user-defined	system-wide
	      configuration

	      $KAKOUNE_CONFIG_DIR/kakrc, if it exists; this is the user	configuration

       Consequently, if	 the  $KAKOUNE_CONFIG_DIR/autoload  directory  exists,
       only scripts stored within that directory will be loaded	- the built-in
       *.kak files will	not be.

       Users who still want to have the	built-in scripts  loaded  along	 their
       own  can	 create	 a symbolic link to _rtdir_/autoload (or to individual
       scripts in it) in their user-configuration directory:

	      ln -s _rtdir_/autoload "${XDG_CONFIG_HOME:-$HOME/.config}"/kak/autoload

EXAMPLES
       Edit a file:

	      kak /path/to/file

       Edit multiple files (multiple buffers will be created):

	      kak ./file1.txt /path/to/file2.c

       Insert a	modeline that sets the tabstop variable	at  the	 beginning  of
       several source code files:

	      kak -f "ggO// kak: tabstop=8<esc>" *.c

SEE ALSO
       vi(1), vim(1), sam(1plan9)

									KAK(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | ENVIRONMENT | FILES | EXAMPLES | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=kak&sektion=1&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help