Maxime Coste
cad5f37efd
Fix register saving post -save-regs behaviour change
2018-07-05 07:54:28 +10:00
Maxime Coste
ec16969609
Do not reparse %sh{...} strings
...
Automatic reparsing of %sh{...}, while convenient in many cases,
can be surprising as well, and can lead to security problems:
'echo %sh{ printf "foo\necho bar" }' runs 'echo foo', then 'echo bar'.
we make this danger explicit, and we fix the 'nop %sh{...}' pattern.
To reparse %sh{...} strings, they can be passed to evaluate-commands,
which has been fixed to work in every cases where %sh{...} reparsing
was used..
2018-07-05 07:54:28 +10:00
Maxime Coste
86616c207d
Merge remote-tracking branch 'lenormf/synchronized-write'
2018-07-04 19:46:40 +10:00
Frank LENORMAND
ab2eade28d
rc: Synchronize important file writes
...
Fixes #2178
2018-07-04 09:55:05 +03:00
Maxim Baz
44f0230fe1
Add missing python3 keyword: nonlocal
2018-07-02 23:28:25 +02:00
Tim Allen
3d0c19f8fb
Prevent the :format command from triggering hooks.
...
The :format command is often called from a BufWritePre hook to format the
current buffer, however the :format command itself calls `:write` to store the
buffer in a temporary location, potentially causing an infinite recursion.
If we disable hooks while running :format, there's no danger of that occurring.
2018-06-20 21:11:58 +10:00
Delapouite
5305c6b1ff
Add 'nop' keyword highlighting in .kak files
2018-06-01 10:46:05 +02:00
Delapouite
bbf484c596
Limit highlighter to line in grep buffers
2018-05-30 14:40:29 +02:00
Alyssa Ross
08c948f52b
Insert spaces after line comment markers
...
Every other text editor I've ever used does this, and this makes Kakoune
consistent with how comments work in e.g. its own source code.
2018-05-22 12:24:54 +01:00
Maxime Coste
8c6af54db3
c-family.kak: Fix comment line continuation behaviour
...
Fixes #2043
2018-05-19 14:15:16 +10:00
Maxime Coste
8e1646b702
c-family.kak: Remove unneeded itersel
...
itersel can get very expensive with many selections, it should only
be used when necessary.
2018-05-17 07:41:32 +10:00
gspia
bbd1fd6576
Comments for Idris
2018-05-04 10:22:17 +03:00
Maxime Coste
869736359a
Make all fifo cleanup hooks run always
...
Those should not get prevented from running just because the user
disabled hooks, they are important for cleanup.
2018-04-26 08:31:36 +10:00
Maxime Coste
f99f0020dc
Fix (again) C++ raw string highlighting
2018-04-25 21:19:04 +10:00
Maxime Coste
fea6bc9524
c-family.kak: Fix highlighting of raw strings
2018-04-22 09:40:45 +10:00
Maxime Coste
57baad4afd
Make FaceRegistry scoped
...
set-face now takes a scope argument, and faces can be overridden on
a buffer or window basis.
colorscheme apply on global scope, which should be good enough for
now.
Fixes #1411
2018-04-07 16:27:50 +10:00
Maxime Coste
8eee5500ea
Revert "Simplify comment-line command using trimming primitive"
...
This reverts commit e661fece72
.
2018-03-30 09:29:05 +11:00
Maxime Coste
4a2125f752
make.kak: Fix Ninja compatibility for directory entering messages
2018-03-30 09:18:06 +11:00
Delapouite
e661fece72
Simplify comment-line command using trimming primitive
2018-03-27 19:53:13 +02:00
Frank LENORMAND
66f99a3802
rc kakrc: Highlight boolean values
2018-03-25 10:27:12 +03:00
Maxime Coste
42404ddb3a
Merge remote-tracking branch 'Delapouite/kakrc'
2018-03-23 07:42:38 +11:00
Delapouite
754a96eb3e
Add hl for declare-user-mode and enter-user-mode in kakrc.kak
2018-03-22 15:08:59 +01:00
gspia
056560131a
Add a space to haskell commment-line comment string.
2018-03-22 13:56:07 +02:00
Maxime Coste
c6c501eb5b
asciidoc.kak: Fix highlighting of _itallic_ markup
...
`_` is a word character, so the regex cannot be exactly the same
as for `*`.
2018-03-05 11:20:56 +11:00
Maxime Coste
5c247bf1dd
c-family.kak: Do not mistake '\"' for a double quoted string start
...
Fixes #1893
2018-03-01 14:01:09 +11:00
Maxime Coste
3e50d39f8e
comment.kak: recognize xml files
2018-02-28 15:07:25 +11:00
Maxime Coste
4d11bb20c3
Always collapse jumps in exec/eval, remove -collapse-jumps switch
...
There does not seem to be any reasonable use cases of not collapsing
jumps when the input is not comming from the user. Always collapse
them.
It could make sense to move jump collapsing out of context_wrap as
in general any action not comming directly from the user should
collapse them, at the moment a comment or mapping will not collapse
jumps, which is unfortunate.
2018-02-24 19:02:15 +11:00
Maxime Coste
e93c31ff0d
doc.kak: stricter parsing of formatted text
...
Format markers such as *, _ or ` must be followed/preceeded by a non
whitespace character to be considered formatting marker.
2018-02-22 22:22:13 +11:00
Maxime Coste
026cf8af3a
doc.kak: fix handling of lines begining with * or -
...
Those were considered as any other lines for paragraph joining,
threat them as a new paragraph start, to correctly handle asciidoc
lists.
2018-02-22 22:09:00 +11:00
Maxime Coste
9755f7f8f2
make.kak: Fix echoing of error message when jumping
...
The use of `%{...%reg{...}}` was not being expanded correctly, as
the enclosing %{...} prevents the internal %expand{...} from being
considered.
The introduction of an additional command allows us to bypass
quoting hell as the expansion of %reg{5} could contain arbitrary
text.
2018-02-19 21:43:43 +11:00
Maxime Coste
f8861734cf
rc/: Replace simple uses of sed with tr
2018-02-18 15:00:30 +11:00
Maxime Coste
43f50c0852
Convert bundled scripts to ModeChange hook
2018-01-21 10:35:05 +11:00
Dan Rosén
a612432c8d
Highlight python operators
2018-01-07 23:36:41 +01:00
Dan Rosén
40aaf63338
Highlight python doctests in docstrings
2018-01-07 23:36:41 +01:00
Maxime Coste
4740dbf9fa
doc.kak: Fix anchor name completion
2017-12-29 09:37:04 +11:00
Maxime Coste
7072e65a28
Merge remote-tracking branch 'danr/typescript-comment'
2017-12-07 10:46:26 +08:00
Dan Rosén
fbe312e0d0
Add typescript to comment.kak
2017-12-06 20:50:05 +01:00
Maxime Coste
1b44056fce
man.kak: Better support for renaming a man buffer
...
Fixes #1718
2017-12-06 14:49:38 +08:00
Maxime Coste
a9f1a23f35
man.kak: use shell-candidates instead of shell-completions
2017-12-06 14:10:10 +08:00
Maxime Coste
363a0c3a0d
man.kak: Fix behaviour when called with no params with Posix shells
...
Seems dash nevers falls back for ${@-$blah}, it does not considers $@
to be empty. Use ${1-$blah} instead as we never have more than one
parameter.
2017-12-06 13:23:39 +08:00
Maxime Coste
35d2b2b4bc
c-family.kak: Use regex custom text object to simplify some indent
2017-12-03 17:48:04 +08:00
Maxime Coste
1a38849086
c-family.kak: indent after parenthesis at end of line
2017-12-03 17:47:44 +08:00
Maxime Coste
74b0c98769
Merge remote-tracking branch 'occivink/comment'
2017-11-24 16:29:30 +08:00
Olivier Perret
ee117b9499
set registers directly instead of expanding options in exec
2017-11-23 10:30:10 +01:00
Frank LENORMAND
58ccf6b295
rc python: Highlight built-in exceptions
2017-11-18 11:56:47 +03:00
Maxime Coste
77b0ee1e19
Merge remote-tracking branch 'lenormf/extend-python-highlighters'
2017-11-14 18:08:27 +08:00
Frank LENORMAND
105d7a1276
rc python: Extend highlighted keywords and numbers
2017-11-14 12:50:20 +03:00
Maxime Coste
2ab9f65b36
c-family.kak: Use <a-S> in various auto indent hooks
2017-11-14 13:32:46 +08:00
Maxime Coste
9c964e97f0
c-family.kak: Highlight character literals later
...
That way it overrides integer literal highlighters in the case where
they conflict.
2017-11-14 11:45:30 +08:00
fsub
ee695ecf95
c-familiy.kak: improve highlighting of C++ literals
2017-11-12 18:16:20 +01:00