mirror of
https://github.com/mawww/kakoune.git
synced 2024-10-05 17:18:00 +03:00
Page:
Regex
Pages
Ambiguous Keys
Annotated examples of "Kakoune script"
Avoid the escape key
Bar
Bc
Building
Clang
Community
Ctags
Distinguish between focused and unfocused clients in Tmux
Documenting Plugins
EditorConfig
Eval Exec
Fuzzy finder
Git integration via Tig
Grep
HTML editing
Hacking
Header files
Highlighters
Home
IDE
Implementing user mode
Increment and Decrement
Indentation and Tabulation
Info boxes
Installing Plugins
Integrating Other CLI apps
JSON RPC
Jumplist
Kak daemon helper : 1 session per project
Languages
Line flags
Manipulating dates with Chronic
Migrating from Vim popular plugins
Migrating from Vim
Normal mode commands
OpenBSD
Plugin Managers
Qalculate
Ranger
Readline
Regex
Registers & Clipboard
Registers Clipboard
Reverse search
Running commands at startup
Rust
Selections combinations
Selections
Setting Plugin Options
Shell scripting
Status line
String syntax
TUI
The window scope
Tips for building from source
Undo tree
Wc
Windows tips
Wrapping
Writing Plugins
kak ‐p
macOS tips
zsh zle
6
Regex
Bruno Heridet edited this page 2020-06-16 19:23:53 +02:00
In kakoune, many prompts or commands require a regex:
- search
/
,?
- select
s
- split
S
- keep
<a-k>
- not keep
<a-K>
- …
The regex engine used by kakoune is a custom one, based on an ECMAScript standard. More info in the documentation
This page lists common patterns you may need to better express your intent.
You can set user mappings to pre-fill prompts with the ones you need often. Here's an example with search
and the \Q\E
mentioned below:
map global user / ':exec /<ret>\Q\E<left><left>'
(<left><left>
move the cursor back where you need it to be)
Case insensitive search
It is possible to make case insensitive regex by prefixing the expression with (?i)
.
Disable regex during search
Use the Quote flags, by surrounding your query with \Q
and \E
. Everything in between will be treated literally.
Remove non-ASCII characters from a buffer
%s[^\x00-\x7F]<ret>d
See also
Wiki Home Page
Onboarding
Keys
- Normal mode commands
- Avoid the escape key
- Implementing user mode (Leader key)
- Kakoune explain
- Kakoune TV
Editing
User Interface
Integration with OS and other tools
- Languages
- IDE
- Bar
- Kak daemon helper : 1 session per project
- Registers & Clipboard
- macOS tips
- Windows tips
- Fuzzy finders
- JSON-RPC UI
- bc
- Qalculate!
- wc
- Shell Scripting
- Manipulating dates with Chronic
- Integrating Other CLI apps