1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-22 05:03:56 +03:00
Commit Graph

780 Commits

Author SHA1 Message Date
Johannes Altmanninger
12473583a5 doc expansions: mention the advantage of %exp{} over doubly quoted strings
The other advantage is that %exp{} is seamlessly nestable; I guess
that one is kind of implied by the context.
2024-11-04 07:15:34 +11:00
Johannes Altmanninger
54992c08ae rc git: teach "git apply" to work on content, not just diffs
Staging/unstaging/reverting (parts of) the current buffer's file can
be a common use case.

Today "git apply" can do that based on a selection within a diff.
When the selection is on uncommitted content, we can probably assume
that the intent is to use the part of the selection that overlaps
with the +-side of "git diff" (or "git diff --cached" for
"git apply --cached").

Make "git apply" treat selections as content if the buffile is
tracked by Git. This differentiator is not perfect but I don't know
why anyone would want to use the existing "git apply" semantics on
a tracked file. Maybe we should pick a different name.

This feature couples well with "git show-diff", which shows all
lines with unstaged changes (in future it should probably show staged
changes as well).

Whereas on diffs, "git apply" stages the entire hunk if the selection
contains no newline, this does not happen when operating on content.
I didn't yet try implementing that.  I guess the hunks are not as
explicit here.

Closes #5225
2024-09-16 15:23:18 +10:00
Maxime Coste
be5f059f26 Merge remote-tracking branch 'arrufat/patch-1' 2024-09-09 19:57:45 +10:00
Maxime Coste
040f683ca6 Remove out-of-date documentation about <esc> ending macro recording
Fixes #5223
2024-09-08 22:01:14 +10:00
Maxime Coste
7e05dc8d2e Add terminal_title terminal ui_option to control the title
Use a separate option from terminal_set_title for simplicity.

Fixes #2217
Closes #4265
2024-09-08 21:59:27 +10:00
Adrià
c0118f2fba
Remove trailing space in scopes.asciidoc
Closes #5226
2024-09-05 16:06:26 +09:00
Maxime Coste
203e3704d8 Fix json-ui scroll support
Add cursor coordinate parameters, and fix encoding to match the
new one.
2024-08-14 21:32:03 +10:00
Adrià Arrufat
2ab35fbb23 Add support for double underline 2024-08-04 20:55:21 +09:00
JustTaken
02aa8debcb Review some buffer names in documentation
Now `\*debug*` and `\*scratch*` are used when refering these buffers
for prettier presentation.
2024-07-22 18:02:15 -04:00
Maxime Coste
e3ffa05ff0 Avoid doc renderer corner case in execeval page
The doc renderer is not expected to fully support asciidoc and can need
a bit of help by avoiding corner cases in pages

Closes #5198
2024-07-17 19:53:53 +10:00
Maxime Coste
c0013dcab2 Merge remote-tracking branch 'lobre/hooks-doc' 2024-07-15 20:43:22 +10:00
Loric Brevet
caa3d93ea5
Remove whitespace in hooks documentation 2024-07-05 18:02:09 +02:00
Maxime Coste
e0bbd1e7ca Merge remote-tracking branch 'PJungkamp/directory-changed' 2024-07-01 21:31:17 +10:00
Philipp Jungkamp
0a10612786 Add EnterDirectory hook
This hook runs on `change-directory` and is also emitted just before
KakBegin after kakrc has been sourced.
2024-06-24 16:16:33 +02:00
Tobias Pisani
6493ddad42 Allow individual show-whitespace options to be turned off
This is especially useful to use the indent guides without the  other
parameters, but in general it can be a useful option.

It could be worth considering cleaning up these options to default off instead, but
the default also seems useful, so i consider this ok, as it might be the more advanced
usecase.
2024-06-23 11:03:03 +10:00
Coleman McFarland
a35a7dc4a4
Fix up %val{buflist} description in expansions.asciidoc
The output is not quoted by default. Fixes #5158
2024-06-10 19:43:08 -04:00
Maxime Coste
1bdae3f9c4 Also check shell parameters for kak_* references
This makes it easier to pass shell fragments as arguments so that
%sh{ eval "$@" } just works even if arguments refer to Kakoune's
vars.
2024-06-07 18:59:30 +10:00
Tobias Pisani
1c352e996c Add <quote> and <dquote> key name aliases.
These two can also be annoying to have to escape, so this should make it slightly easier to manage
2024-06-05 20:02:38 +10:00
Maxime Coste
5c97efacb9 Add v< and v> to scroll cursor to the leftmost/rightmost column 2024-05-31 12:38:28 +10:00
Coleman McFarland
2c1e238a0c
doc: declare C++20 as the language version
Technically we seem to be compiling with `-std=c++2a` which (if I
understand correctly) is "all the features we have from 23 and up.

But 20 is the earliest version that compiles for me (with clang). 14 and 17 didn't work.
2024-05-22 19:18:47 -04:00
Maxime Coste
1bd50261c8 Kakoune 2024.05.18 2024-05-18 14:43:06 +10:00
Maxime Coste
8bb0f44c2b Kakoune 2024.05.09 2024-05-09 20:15:32 +10:00
Maxime Coste
1c71fc0c09 Add local scope to user commands 2024-04-29 12:21:02 +10:00
Maxime Coste
3d7d0fecca Introduce "local" scope in evaluate-commands
When using `eval` a new scope named 'local' gets pushed for the
whole evaluation, this makes it possible to temporarily set
an option/hook/alias...

Local scopes nest so nested evals do work as expected.

Remove the now trivial with-option command
2024-04-12 15:28:40 +10:00
Tobias Pisani
a1880a5441 Add SessionRenamed hook 2024-03-27 17:59:05 +01:00
Tobias Pisani
5515383ae4 Add ClientRenamed hook 2024-03-27 17:59:05 +01:00
Tobias Pisani
b9c60e2578 Add -indent option to show-whitespace highlighter
A couple of semi-opinionated choices were made in this implementation:

 1. The guide is hidden in the first column.
 2. The indent guides are highlighted using a new `WhitespaceIndent` face.
 3. Nothing is done to continue the guide through empty lines. I believe this to be the correct approach,
    at least as long as it is kept as a part of the show-whitespaces highlighter. However some people's
    oppinion may differ, and if so, that could be implemented.
 4. The guides default to on, like the other show-whitespace options. Default character is "│".
 5. Spaces between the indent guides are currently highlighted as other spaces.
    Other reasonable options would be no replacement, -tabpad, or a similar -indentpad.
 6. Guides are disabled by passing `-indent ""`.
 7. Indent guides are separate from tab highlighting.

Additionally, we could consider adding a separate face for the "current" indent level as many editors do,
but this is a bit harder in kakoune because of multiple selections.

Closes #2323
2024-03-27 04:07:12 +01:00
Maxime Coste
cf95043b14 Merge remote-tracking branch 'krobelus/changelog' 2024-02-10 21:55:09 +11:00
Johannes Altmanninger
7cea09d327 Changelog entries for new blame features 2024-02-05 21:42:02 +11:00
Maxime Coste
c124c8f517 Support -after switch for flag-lines highlighter 2024-01-30 08:20:13 +11:00
Johannes Altmanninger
556c7633ba Update changelog 2023-12-16 12:19:09 +01:00
Maxime Coste
c93c57a46f Merge remote-tracking branch 'krobelus/fuzzy-menu' 2023-12-02 10:56:29 +11:00
Johannes Altmanninger
1f11529837 rc tools menu: replace menu builtin with a prompt-based implementation
prompt has fuzzy filtering which is more discoverable than the menu
mode's regex filtering (because that one needs / to trigger it).
There are no important differences left, so replace the menu builtin
with a prompt-based command.

prompt does not support markup in the completion menu, so drop that
feature for now.
2023-11-20 20:47:22 +01:00
Johannes Altmanninger
0bb5b28f7e Update changelog 2023-11-17 19:41:55 +01:00
Maxime Coste
11f0ace9b6 Make shell-script-candidates completer run in the background
Read output from the script as it comes and update the candidate
list progressively.

Disable updating of the list when a completion has been explicitely
selected.
2023-11-14 21:39:03 +11:00
Maxime Coste
fc7be678ed Change window_range to emit each element as a separate string 2023-11-13 19:22:33 +11:00
Tim Allen
5d55ecc879 Fix typo that broke the mapping page rendering.
Previously, `:doc mapping` hid everything from the beginning of the "expansions"
link up to the "keys" link in the next section (the next occurring comma). Now
the end of the "Mapping commands" section and the beginning of the "Mapping
keys" section are properly visible inside Kakoune.
2023-10-08 13:05:23 +11:00
Tim Allen
4065a4c99e Document that mappings are not recursive. 2023-10-08 13:04:15 +11:00
Loric Brevet
a2fd401cfa
Add an InlineInformation face distinct from Information 2023-09-28 15:06:29 +02:00
Maxime Coste
23afed056b Add a daemonize-session command and refactor local client handling
Make it possible to move the current session to a daemon one after
the fact, which is useful to ensure the session state survives client
disconnecting, for example when working from ssh.
2023-09-26 17:50:56 +10:00
Maxime Coste
dd5b624003 Merge remote-tracking branch 'divarvel/show-trailing-whitespace' 2023-09-08 05:50:11 +10:00
Maxime Coste
6942a4c0c9 Change + command not to duplicate identical selections more than once
The current exponential behaviour does not seem that useful, it seems
more predictible that pressing `+` twice would end up with 3 copies
of the original selections instead of 4.

Fixes #4533
2023-08-14 22:50:22 +10:00
Maxime Coste
e605ad8582 Kakoune 2023.08.05 2023-08-05 11:02:11 +10:00
Maxime Coste
f58d686066 Kakoune 2023.07.29 2023-07-29 15:53:23 +10:00
Masanori Ogino
58058d1213 Fixup documentation on history navigation commands
Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>
2023-06-21 10:25:59 +09:00
Maxime Coste
5901d2e06b Revert "Switch undo storage from a tree to a plain list"
Moving across history moved to <c-j>/<c-k> to keep <a-u>/<a-U>
for selection undo/redo

This reverts commit e0d33f51b3.
2023-06-17 17:31:57 +10:00
Maxime Coste
b2a853cfc2 Add a few missing entries to the changelog 2023-06-17 17:10:05 +10:00
Maxime Coste
5b1ad0bd0c Add a -previous switch to show-matching highlighter
This switch makes show-matching fallback to the character preceeding
the cursor if the character under the cursor is not a matching
character, which should make show-matching more useful in insert mode.
2023-06-14 22:53:39 +10:00
Andrew Browne
034f68394d
Update mapping.asciidoc for key swap.
https://github.com/mawww/kakoune/issues/2524
2023-06-01 10:25:12 -07:00
Tim Allen
45c01c2109 Document the new <c-g> key, and <c-c> too while we're at it.
Sometimes we get people asking why <c-c> can't be mapped. It should be
mentioned in the `:help mapping` documentation, along with any other
unmappable keys.
2023-05-21 20:26:30 +10:00