-- Leo's gemini proxy
-- Connecting to perso.pw:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini;
Author: Solène
Date: 02 December 2020
Tags: kakoune editor cheatsheet
This is a simple kakoune cheat sheet to help me (and readers) remember some very useful features.
To see kakoune in action.
Use `Z` to mark start and `alt+z i` to select unti current position.
Type `C` to add a new cursor below your current cursor.
Type `space` to remove all cursors except one.
You have to use "disable hook" command before inserting text. This is done with `\i` with `\` disabling hooks.
When you make a selection, you can use `s` and type a pattern, this will create a new cursor at the start of every pattern match.
This is useful to make replacements for words or characters.
A pattern can be a word, a letter, or even `^` to tell the beginning of each line.
In kakoune there are often multiples way to do operations.
Go to first line, press `J` to create cursors below and press `X` to select whole lines of every cursors.
Press `Z` on first line, and `alt+z i` on last line and then press `X` to select whole lines of every lines.
Press `X` until you reach the last line.
Make a selection and type `|`, you are then asked for a shell command, you have to use `sed`.
Sed can be used, but you can also select the lines and split the selection to make a new cursor before each word and replace the content by typing it, using the `s` command.
For my blog I format paragraphs so lines are not longer than 80 characters. This can be done by selecting lines and run `fmt` using a pipe command. You can use other software if fmt doesn't please you.
-- Response ended
-- Page fetched on Fri Mar 29 09:25:47 2024