Commit Graph

2628 Commits

Author SHA1 Message Date
JacobTravers
cac2167540 case directly to $kak_opt_grepcmd 2023-04-06 10:20:52 -07:00
Michał Kruszewski
0a2541f73a troff filetype: Add support for pic syntax highlighting 2023-04-06 09:30:53 +02:00
JacobTravers
d8b9b13d07 apply literal flag according to grep tool 2023-04-05 15:34:37 -07:00
Adrià Arrufat
cea35cf5f4 Delete commenting prefix on empty lines in Python 2023-04-02 21:09:57 +09:00
JacobTravers
4d9b853561 Use grep -F when no argument is passed (literal string match)
Why?
Most users who pass the current selection to grep likely do not intend to pass
the selection as a regex input string.

This makes the grepcmd use an additional -F flag to perform literal-string
matching for the current selection. The -F flag seems to be the standard flag
for literal-string matching in every grep implementation I've found.
2023-03-31 14:11:14 -07:00
Răzvan C. Rădulescu
1e597eb010 fix improper set/get = highlight for Godot v4.x GDScript 2023-03-25 07:14:34 +02:00
Răzvan C. Rădulescu
6ff293ad3a Add missing in to Godot v4.x GDScript keywrods 2023-03-24 09:16:53 +02:00
Răzvan C. Rădulescu
1882d76392 Add unique names (%NodeName) highlight for Godot v4.x GDScript 2023-03-22 06:24:23 +02:00
Răzvan C. Rădulescu
0e298ca62e Clean up Godot 4.x GDScript highlights & fix const highlight overtaking numbers 2023-03-20 12:52:23 +02:00
Răzvan C. Rădulescu
d6326f609c Highlight all uppercase words for constants & enums Godot v4.x GDScript 2023-03-20 07:31:08 +02:00
Răzvan C. Rădulescu
80f0cda8b5 Update GDScript highlighting for Godot v4.0 2023-03-19 18:55:27 +02:00
PoweredByPie
db348bc6b3 rc/filetype/svelte.kak: Set buffer rather than window filetype 2023-03-14 23:02:53 -07:00
Maxime Coste
86dc4130e1 Merge branch 'fix/hare-comment-insert' of http://github.com/stacyharper/kakoune 2023-03-13 21:38:01 +11:00
Maxime Coste
58ead47fb4 Merge remote-tracking branch 'krobelus/tmux' 2023-03-13 21:33:31 +11:00
Bob Qi
4f0334c476 add zellij-action command 2023-02-26 07:29:39 +08:00
Bob Qi
02bc786fb7 remove the option and provide session name explictly 2023-02-24 12:21:16 +08:00
Bob Qi
f33126c2a9 give up to wrap command into a shell to avoid conflict with connect.kak 2023-02-22 15:57:22 +08:00
Bob
4ff5de6273 Create zellij.kak 2023-02-22 13:17:04 +08:00
Maxime Coste
6b7ed51be1 Merge branch 'hare-packed' of http://github.com/stacyharper/kakoune 2023-01-27 11:26:17 +11:00
Maxime Coste
9763ce4fe9 Merge remote-tracking branch 'razetime/master' 2023-01-27 10:58:32 +11:00
Maxime Coste
247e4885e8 Merge remote-tracking branch 'm-kru/troff_headings_highlighting' 2023-01-18 07:46:36 +11:00
razetime
b794855c70 add APL highlighting 2023-01-14 11:04:16 +05:30
Adrià Arrufat
f92df3ec96 Add reset to git command docstring 2023-01-06 00:17:38 +09:00
Stacy Harper
8c4b591a9e
Add @packed to hare highlighter
ref: https://todo.sr.ht/~sircmpwn/hare/783
2023-01-02 20:38:12 +01:00
Michał Kruszewski
dddadce7e8 troff filetype: Fix headings highlighting 2022-12-30 21:45:17 +01:00
Răzvan C. Rădulescu
86bd4efd25 Add Python f-string interpolation highlights 2022-12-17 10:08:33 +11:00
Maxime Coste
e7e46ef76a Fix gas palign2 directive highlight 2022-12-06 17:47:32 +11:00
Maxime Coste
084fc5eb5a Merge remote-tracking branch 'lobre/fix-gopls-def-integration' 2022-12-03 08:41:10 +11:00
Maxime Coste
760a45556c Merge remote-tracking branch '2xsaiko/outgoing/newlines-for-iterm2' 2022-11-21 08:51:21 +11:00
Marco Rebhan
5530f49c14 Deduplicate iterm2 escaping code
This fixes PATH and TMPDIR not being escaped in the iterm-terminal-window and
iterm-terminal-tab commands.
2022-11-20 14:00:34 +01:00
Marco Rebhan
c57805a926 Handle spawning iTerm and screen commands with arguments containing newlines
Before, sed would add quotes to every line of the single multiline argument,
causing the final quoted argument to "split ... command" or screen to contain
unquoted newlines such as this (from kakoune-cr):

	tell application "iTerm"
	    tell current session of current window
	        tell (split vertically with same profile command "env PATH='...' 'sh' '-c' ''
	'    export KAKOUNE_SESSION=$1'
	'    export KAKOUNE_CLIENT=$2'
	'    shift 3'
	''
	'    [ $# = 0 ] && set \"$SHELL\"'
	''
	'    \"sh\"'
	'  ' '--' '51909' 'client0' 'terminal' ") to select
	    end tell
	end tell

Instead of using sed to do this which operates on single lines at a time, simply
use printf to insert ' quotes before and after the entire argument.
2022-11-20 14:00:09 +01:00
Stacy Harper
db93e776c5
Fix hare new line insert indentation after comments
At the moment, inserting a new line while being in a comment result in a
"//<indentation>" instead of "<indentation>//".

To fix this, we just paste the comment and indent after the newline
initial indentation.
2022-11-20 10:39:46 +01:00
Maxime Coste
d1e1f5df32 Merge remote-tracking branch 'Ssamm45/master' 2022-11-20 17:06:12 +11:00
Maxime Coste
5314e2375e Merge branch 'fix/hare-comment-insert' of http://github.com/stacyharper/kakoune 2022-11-20 17:03:14 +11:00
Johannes Altmanninger
f69d8c3e12 rc repl tmux: always spawn repl in calling client
Just like the parent commit but for tmux-repl-* commands.

Note that tmux-repl-set-pane without arguments is kind of broken; it
increments the current pane ID, which only works in the most basic
scenarios. We should probably replace it with something better,
with menu completions etc.
2022-11-19 15:21:38 +01:00
Johannes Altmanninger
cfea884cf2 rc windowing tmux: always spawn tmux-terminal-window in calling client
The tmux-terminal-window command always spawns windows in the tmux
session where the Kakoune session was started - even if the calling
Kakoune client lives in a different tmux session.

Fix this by always creating the window in the tmux
session of the calling client. We already do the same for
tmux-terminal-{horizontal,vertical}.

I call tmux-terminal-impl with "new-window -a" (instead of
"new-window"), so make sure the fix works for my use case.

I considered retrieving the tmux session ID from the $TMUX environment
variable but the tmux manpage only specifies that $TMUX contains
"some internal data".
2022-11-19 15:21:38 +01:00
Johannes Altmanninger
37dcba9089 rc repl tmux: do not record repl session/window since pane might move
A pane's ID is immutable for the lifetime of the tmux server.
Same with window/session IDs.
When creating a new tmux repl, we record all three IDs to later use
them to send text to the repl.
The window/session IDs can be invalidating when a pane is moved to
a different window/session (via "tmux move-pane", "tmux move-window"
etc). This will cause repl-send-text to fail.
Fix this by dropping the redundant and potentially incorrect
window/session IDs.  The immutable pane ID is enough.
2022-11-19 15:21:38 +01:00
Johannes Altmanninger
9891f11157 rc repl tmux: remove bashisms 2022-11-19 15:21:38 +01:00
Johannes Altmanninger
79db90349d rc repl tmux: show error when the repl pane is gone
tmux-send-text would silently fail when the repl is no more.  Let's
instead print an error, pointing the user to the *debug* buffer which
has tmux' stderr.
2022-11-19 15:21:38 +01:00
Stacy Harper
becb1ef843
Fix hare new line insert indentation after comments
At the moment, inserting a new line while being in a comment result in a
"//<indentation>" instead of "<indentation>//".

To fix this, we just re-order both InsertChar hooks.
2022-11-19 08:34:54 +01:00
Loric Brevet
84d72eb4ba
Make ctags.kak compatible with original awk
Positional arguments in awk’s printf is a feature that is only available
in the GNU implementation of awk (gawk). So the ctags auto-completion feature
was broken in Kakoune if the installed version of awk was nawk or mawk.
This simple change makes it retro-compatible with those versions.

See https://www.gnu.org/software/gawk/manual/html_node/Printf-Ordering.html
2022-11-18 12:37:55 +01:00
Sam Larkin
acee9d8328 switch from using '&' to '<a-&>' when indenting javascript comments to allow the
type of indentation to be preserved
2022-11-17 13:52:22 -07:00
Loric Brevet
199b7ea165
Adjust regex in gopls-def for when filepath contains a dash
When calling `:gopls definition`, the gopls LSP server returns the location of
the selected definition. Then, `gopls.kak` tries to parse this output to
feed the `:edit` command and open the file in Kakoune. To do this, it
uses `sed` to transform `<path>.go:<line>:<colstart>-<colend>` to `<path>.go
<line> <colstart>`. However, if the `<path>` contains a dash character,
the `sed` will fail and strip everything after this first dash, removing
the line and columns information.

Closes #4776
2022-11-15 10:10:24 +01:00
James Wainwright
078e5900a4 Add "union" as a keyword for Rust syntax 2022-11-01 21:29:07 +00:00
Maxime Coste
cb33918fa2 Merge remote-tracking branch 'eraserhd/codeowners' 2022-10-19 20:39:11 +11:00
Maxime Coste
b42cb090ee Merge remote-tracking branch 'krobelus/fix-man-jump' 2022-10-19 20:37:19 +11:00
Maxime Coste
e43c7d6aba Use complete-command for the :doc command 2022-10-19 20:35:05 +11:00
Maxime Coste
d1bfc5ecdc Shell-highlight complete-command shell completion parameters 2022-10-19 20:34:35 +11:00
Maxime Coste
65f4bf78e9 Merge remote-tracking branch 'krobelus/file-completion' 2022-10-19 20:23:39 +11:00
Maxime Coste
5de90920d4 Merge remote-tracking branch 'krobelus/modeline-readonly-fix' 2022-10-19 20:22:25 +11:00
Maxime Coste
39fe2438f7 Merge remote-tracking branch 'krobelus/url-at-word-boundary' 2022-10-19 20:20:47 +11:00
Maxime Coste
e8eb1c8732 Merge branch 'typescript-filetype' of http://github.com/clarfonthey/kakoune 2022-10-19 20:20:07 +11:00
Maxime Coste
aa77078a2e Merge remote-tracking branch 'krobelus/select-make-buffer-at-last' 2022-10-19 20:19:03 +11:00
Maxime Coste
bd23dbda00 Merge branch 'patch-4' of https://github.com/blaggacao/kakoune 2022-10-19 20:17:28 +11:00
Johannes Altmanninger
62bd1af3f0 rc modeline: fix error trying to write readonly global variable
When running modeline-parse on this file:

	# kakoune: filetype=ledger:indentwidth=4

I get this error from dash (and a similar one from bash):

	sh: 53: readonly: key: is read only

This is because the readonly variable "key" is used elsewhere, both
times as global. Fix this by making both variables local. While
at it, remove an unused variable.

Fixes #4478
2022-10-17 19:23:30 +02:00
ltdk
ab8b02720b Treat .cts and .mts as typescript 2022-10-16 20:23:05 -04:00
Johannes Altmanninger
daabb5da4e rc make: make-next-error to switch toolsclient to *make* buffer
This is equivalent to a change to grep.kak in 649e252f7 (bring *grep*
buffer to front in context of toolsclient, 2020-08-14).

If a toolsclient is set, make-next-error (and make-previous-error) will
jump to %opt{make_current_error_line}. This is wrong if the toolsclient
does not show the *make* buffer. In that case make_current_error_line
is undefined and we end up showing the goto menu. This has occasionally
been annoying me for a long time but I never bothered investigating.

Fix this by switching to the *make* buffer. The potential downside
is if make-next-error is run from the toolsclient, where we no longer
jump to the error but that's fine because we can use <ret>.

We can maybe improve this later by extending the logic, see
https://github.com/mawww/kakoune/pull/3656#pullrequestreview-472052285
2022-10-16 20:00:22 +02:00
Johannes Altmanninger
f7c3faa2e1 rc markdown taskpaper: require bare URL to start at word boundary
I can't think of a case where a URL would not start at a word boundary.
Let's add that to the regex. In addition to correctness, this also
slightly improves performance because matching can stop earlier.

	$ HOME=$PWD hyperfine -w 1 'git checkout HEAD'{~,}' -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy'
	Benchmark 1: git checkout HEAD~ -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy
	  Time (mean ± σ):      1.123 s ±  0.022 s    [User: 1.100 s, System: 0.027 s]
	  Range (min … max):    1.093 s …  1.174 s    10 runs
	 
	Benchmark 2: git checkout HEAD -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy
	  Time (mean ± σ):      1.019 s ±  0.026 s    [User: 1.001 s, System: 0.021 s]
	  Range (min … max):    0.984 s …  1.051 s    10 runs
	 
	Summary
	  'git checkout HEAD -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy' ran
	    1.10 ± 0.04 times faster than 'git checkout HEAD~ -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy'
2022-10-16 19:49:43 +02:00
Johannes Altmanninger
79b2218754 rc detection editorconfig: use file completions for editorconfig-load 2022-10-16 09:57:46 +02:00
Caleb Heuer
10a90ad631 Fix slicing operator not being highlighted 2022-10-10 23:47:22 -06:00
Caleb Heuer
ca8cab0439 Fix function highlighting with numbers 2022-10-09 01:19:21 -06:00
Caleb Heuer
b0ac6c8eb4 Improve Hare syntax highlighting 2022-10-07 00:29:21 -06:00
Maxime Coste
8f7b1df9ab Merge remote-tracking branch 'krobelus/generic-language-highlighting' 2022-09-15 13:21:25 +02:00
kjduncan
674053935d rc:filetype:kotlin.kak add-highlighter fun_tests prohibited tokens added :/ with face attributes changed to +iuf 2022-09-10 10:20:27 +02:00
Johannes Altmanninger
9fc62609b1 rc restructuredtext: only add language highlighters for actual code blocks in buffer
Analogous to markdown.kak.
2022-09-10 07:35:29 +02:00
Johannes Altmanninger
907ad84f46 rc markdown: only add language highlighters for actual code blocks in buffer
There have been proposals to add more language aliases to markdown.kak
(#4592) and allow users to add their own aliases (#4489).

To recap: various markdown implementations allow specifying aliases
for languages. For example, here is a code block that should be
highlighted as filetype "haskell" but isn't:

	```hs
	-- highlight as haskell
	```

There are lots of aliases out in the wild - "pygmentize -L" lists
some but I don't think there is a canonical list.

Today we have a hardcoded list of supported filetypes. This is hard
to mainta, extend, and it can impact performance.
This patch simply attempts to load the module "hs" and the shared
highlighter "hs". This means that users can use this (obvious?) snippet
to add their own aliases:

	provide-module hs %{
		require-module haskell
		add-highlighter shared/hs ref haskell
	}

Untrusted Markdown files can load arbitrary modules, but that was
already true before, and modules are assumed to be trusted anyway.

Since language highlighters are now loaded *after* the generic
code-block highlighter, we need to make sure the language highlighters
take precedence. Do this by making them sub-regions of the generic one.

Closes #4489

This improves performance on the [5MB Markdown
file](https://github.com/mawww/kakoune/issues/4685#issuecomment-1208129806).

	$ HOME=$PWD hyperfine -w 1 'git checkout HEAD'{~,}' -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy'
	Benchmark 1: git checkout HEAD~ -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy
	  Time (mean ± σ):      3.225 s ±  0.074 s    [User: 3.199 s, System: 0.027 s]
	  Range (min … max):    3.099 s …  3.362 s    10 runs
	 
	Benchmark 2: git checkout HEAD -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy
	  Time (mean ± σ):      1.181 s ±  0.030 s    [User: 1.162 s, System: 0.021 s]
	  Range (min … max):    1.149 s …  1.234 s    10 runs
	 
	Summary
	  'git checkout HEAD -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy' ran
	    2.73 ± 0.09 times faster than 'git checkout HEAD~ -- :/rc/filetype/markdown.kak && ./kak.opt big_markdown.md -e "hook global NormalIdle .* quit" -ui dummy'

(These numbers depend on another optimization.)
2022-09-10 07:35:29 +02:00
Johannes Altmanninger
647e568d3b rc kakrc: add kak=kakrc highlighter alias for markdown/restructuredtext
Filetypes markdown and restructuredtext reuse highlighters from other
filetypes to highlight code blocks. For example, to highlight a code
block of language foo they essentially do

	require-module foo
	add-highlighter [...] ref foo

This works great if the module name matches the shared
highlighter. This is the case almost all scripts in rc/filetype*.
The only exception is kakrc.kak: the highlighter is named "kakrc"
(just like the filetype) but the module is named "kak".

This requires weird hacks in markdown/restructuredtext.  Ideally we
could remove this inconsistency by renaming both the filetype and the
highlighter to "kak" but that's a breaking change.  Until we do that,
let's add an alias so we can treat filetypes uniformly.  This helps
the following commits, which otherwise would need to add ugly extra
code for kakrc highlighters.

The following commit will generalize this approach, allowing users
to add arbitrary aliases.
2022-09-10 07:35:29 +02:00
Maxime Coste
1a8f379a43 Merge remote-tracking branch 'krobelus/embrace-menu-3' 2022-09-09 17:10:53 +02:00
Maxime Coste
1b478c0ace Merge remote-tracking branch 'inahga/inahga-dockerfile-detection' 2022-09-09 17:05:33 +02:00
Maxime Coste
9270047e2c Merge remote-tracking branch 'krobelus/optimize-ledger' 2022-09-09 15:43:55 +02:00
Maxime Coste
2922b2bc32 Merge remote-tracking branch 'm-kru/vhdl_time_vector' 2022-09-09 15:42:37 +02:00
Maxime Coste
03d1c81f3a Merge remote-tracking branch 'm-kru/vhdl_real_type' 2022-09-09 15:41:41 +02:00
Michał Kruszewski
753483f466 VHDL filetype: Highlight real type. 2022-08-30 10:14:54 +02:00
Michał Kruszewski
0c8ca326c3 VHDL filetype: Highlight time_vector type 2022-08-29 10:02:10 +02:00
Johannes Altmanninger
21469c553d rc ledger: don't use region highlighter for simple keywords
As reported in
https://github.com/mawww/kakoune/issues/4685#issuecomment-1200530001
ledger.kak defines a region end that matches every character of
the buffer. This causes performance issues for large buffers.
Since the affected regions are only ever filled with a single color,
just use a regex highlighter instead of a region highlighter.
This improves performance when loading the file for the first time.

Speedup on [example.journal.txt](https://github.com/mawww/kakoune/issues/4685#issuecomment-1193243588)

	$ HOME=$PWD hyperfine -w 1 'git checkout HEAD'{~,}' -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy'
	Benchmark 1: git checkout HEAD~ -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy
	  Time (mean ± σ):     362.1 ms ±   5.1 ms    [User: 336.6 ms, System: 30.2 ms]
	  Range (min … max):   352.6 ms … 369.1 ms    10 runs
	 
	Benchmark 2: git checkout HEAD -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy
	  Time (mean ± σ):     271.2 ms ±  16.7 ms    [User: 252.8 ms, System: 24.0 ms]
	  Range (min … max):   253.9 ms … 305.0 ms    10 runs
	 
	Summary
	  'git checkout HEAD -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy' ran
	    1.33 ± 0.08 times faster than 'git checkout HEAD~ -- :/rc/filetype/ledger.kak && ./kak.opt example.journal.txt -e "modeline-parse; hook global NormalIdle .* quit" -ui dummy'
2022-08-28 08:21:57 +02:00
Maxime Coste
884490aaa3 Merge remote-tracking branch 'm-kru/vhdl_real_type' 2022-08-21 18:47:25 +02:00
Maxime Coste
48408de698 Merge remote-tracking branch 'm-kru/vhdl_file_type_fixes' 2022-08-21 18:47:18 +02:00
Johannes Altmanninger
feb912fb9f rc markdown: use language highlighting also for indented code blocks inside lists 2022-08-17 00:38:58 +02:00
Johannes Altmanninger
615ec3ef7e rc markdown: use language highlighting also for indented code blocks 2022-08-17 00:38:58 +02:00
Johannes Altmanninger
9d362b8b3e rc markdown: fix loading language highlighter module given multiple code blocks
After opening a markdown file

	```b
	```
	```c
	int main() {}
	```

markdown-load-languages will run an "evaluate-commands -itersel".
The first selection makes us run "require-module b", which fails
because that module can't be found.  Since -itersel only ignores the
"no selection remaining" error we fail to run "require-module c". Fix
this by ignoring errors.
2022-08-17 00:38:58 +02:00
Johannes Altmanninger
b633b6f9c3 rc restructuredtext: fix code block regex
Commit 9ea6b88c1 (Fix remaining kak scripts to use the new highlighter
syntax, 2018-07-01) changed the regex that detects HTML code blocks
from

	\.\.\h*code::\h*html\h*\n

to

	\.\.\h*html::\h*c\h*\n

the stray c looks wrong. According to
https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#showing-code-examples
a code block looks like

	.. code-block:: html

	   Some HTML code.

Correct the regex accordingly.

The original version used "code" instead of "cod- block".  That was
incorrect because "code" requires a different syntax (no "..") and
creates inline code blocks (for which we could add highlighting
later), see
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-code
2022-08-17 00:38:58 +02:00
Ameer Ghani
91cadb2150 rc/filetype/dockerfile: detect filenames that contain special characters
Dockerfiles of the form `Dockerfile.foo-bar` were not detected for syntax
highlighting.

Mainly meaning for this to capture _ and -, but I don't see why we wouldn't
capture any special character.
2022-08-16 11:50:30 -04:00
Michał Kruszewski
ce18ac9918 VHDL filetype: Fix if statement behavior. 2022-08-15 13:41:07 +02:00
Michał Kruszewski
f3a05d41cb VHDL filetype: Fix behavior for case statement. 2022-08-15 13:37:28 +02:00
Michał Kruszewski
ed7078230f VHDL filetype: Fix adding closing tags. 2022-08-15 12:45:32 +02:00
Michał Kruszewski
0f3aaa0ecd VHDL filetype: Don't increase indent after when in case statement. 2022-08-15 10:39:13 +02:00
Michał Kruszewski
ae991e8a94 VHDL filetype: Highlight real type. 2022-08-03 13:44:53 +02:00
Johannes Altmanninger
395f438378 Remove unnecessary leading space in prompt from mappings
We often use the pattern «map global normal ": foo"».  The space
after the colon is unnecessary since execution of the mapping won't
add to history anyway, since 217dd6a1d (Disable history when executing
maps, 2015-11-10).
With the parent commit, the space is no longer necessary for user
mappings, so there is no reason to continue the cargo-cult.

Remove the space from mappings to set a good example.
2022-08-01 07:37:02 +02:00
Johannes Altmanninger
45aad1ed2c rc man: fix man-jump when selection contains first character of man link
If I use "man dirname" and select "basename" 

	SEE ALSO
	       basename(1), readlink(1)
	       ^------^

then pressing <ret> to trigger man-jump selects everything from "ALSO"
until "basename(1)" Obviously that's not the name of a man page,
so it fails. When I select only "asename" it works.

The bad selection happens because we use a combination of <a-?> and ?
to extend the selection to a full link. This is more complicated than
it needs to be; let's just select the surrounding WORD.  This works
fine because man page links never start mid-word, and trailing
characters are ignored anyway.
2022-07-30 22:17:32 +02:00
Johannes Altmanninger
329b215494 rc man: hide helper command "man-search"
This undocumented command is only used to share logic between the
various man-link-* commands. Let's hide it to avoid confusion.
2022-07-30 22:17:32 +02:00
Johannes Altmanninger
0b5dcf062f Use menu behavior when completing doc
We can complete every valid argument.
2022-07-30 22:17:32 +02:00
Maxime Coste
e83dbdcd2c Merge remote-tracking branch 'krobelus/embrace-menu-2' 2022-07-28 21:34:31 +10:00
Maxime Coste
ab20fa9360 Merge remote-tracking branch 'krobelus/tmux-repl-completion' 2022-07-28 21:23:30 +10:00
Johannes Altmanninger
3e9ca0e5c3 rc windowing: use menu behavior for focus
We can complete every possible client argument.
2022-07-21 16:48:44 +02:00
Johannes Altmanninger
9190fa9b5f rc repl: complete tmux-repl with shell commands, not Kakoune commands 2022-07-21 16:48:44 +02:00
Jeroen de Haas
5a1b0ac2cb Also escape path and tmpdir in iterm.kak
This fixes an issue with where paths containing spaces would
break iterm support
2022-07-16 16:07:42 +02:00
Johannes Altmanninger
b6afd5dbd6 rc comment: fix comment-block regression from "Select pasted text on paste"
Fixes #4665
2022-07-10 23:07:46 +02:00
Maxime Coste
2d8456db10 Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
Maxime Coste
266d1c37d0 Select pasted text on paste
This is more consistent with the recently changed ! and <a-!>
behaviour
2022-07-05 08:43:40 +10:00
Maxime Coste
ef8a11b3db Make x just select the full lines
`x` is often criticized as hard to predict due to its slightly complex
behaviour of selecting next line if the current one is fully selected.

Change `x` to use the previous `<a-x>` behaviour, and change `<a-x>` to
trim to fully selected lines as `<a-X>` did.

Adapt existing indentation script to the new behaviour
2022-07-05 08:43:40 +10:00