Commit Graph

6085 Commits

Author SHA1 Message Date
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
bedb98220c Ranges: add unit test and fix corner case in split view 2017-12-07 01:58:19 +08:00
Maxime Coste
2f48bbf6ff Tweak unescape template function to unescape the escape char as well
Test that more thouroughly in the unit tests.
2017-12-07 01:56:02 +08:00
Maxime Coste
99636c6230 Remove Vector returning split functions, use range adaptor
Do not allocate temporary vectors to store splitted data, use the
'split' range adaptor along with transform(unescape) to provide the
same feature with less allocations.
2017-12-06 17:18:44 +08: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
70e2122ae6 InsertCompleter: only accept words matching the target buffer word definition
The words we store in the WordDB are dependent on the extra_word_chars
options, which can be different for different buffers. When completing
words in a buffer based on the WordDB from another buffer, some candidates
might contains characters that are not considered word character for
the target buffer, ignore those words.
2017-12-06 14:15:36 +08:00
Maxime Coste
a9f1a23f35 man.kak: use shell-candidates instead of shell-completions 2017-12-06 14:10:10 +08:00
Maxime Coste
86fcc55e53 RankedMatch: Make punctuation ordered *before* alphanumeric characters 2017-12-06 13:58:34 +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
936b95ac34 Ensure that normal mode restores disabled hook status on disabled
Fixes #1744
2017-12-06 12:59:31 +08:00
Frank LENORMAND
e5742fd6b1 - Fix: proper escaping of kak_{session, client} 2017-12-06 02:30:42 +03:00
Nicholas Ochiel
494d046fb2 * Integrate ranger with GNU Screen.
- Ensure ranger opens with the currently focused client tty if multiple screen clients are connected to the same session.
- Ensure args are passed to ranger correctly.
- Ensure command-line args are passed to ranger correctly. (Only strict long format works e.g. `ranger --cmd="echo foo"`)
- Change the current directory because `screen -X` uses screen's cwd not kakoune's.
- Use heredoc to make escaping and quoting easier to debug and slightly less unpredictable.
- Use ranger's `--choosefiles` option instead of mapping keys and having to do multiple levels of escaping and quoting of args esp. command-line args which were unusable in `screen -X eval`.
- Remove screen region when user quits ranger.
2017-12-06 02:29:40 +03:00
Maxime Coste
274367116a Replace uses of getpwuid which is incompatible with static linking
Introduce a get_user_name function which parses '/etc/passwd' to find
the username associated with a user id.
2017-12-04 15:19:57 +08:00
Nicholas Ochiel
908e0c1f8c * Crude implementation of focus: use the current region to switch to the desired window.
- The proper way to do this would be to switch focus to the target client's region but GNU Screen offers no obvious way to do that.

- Remove screen region after client is closed.

- Assumed: Kak server runs in screen.
2017-12-03 20:05:02 +03:00
Maxime Coste
7d32b3fc36 Merge remote-tracking branch 'Qeole/master' 2017-12-03 18:14:32 +08:00
Maxime Coste
23fdb914bf Merge remote-tracking branch 'lenormf/fix-dockerfile' 2017-12-03 18:13:39 +08:00
Maxime Coste
c83f7d5b1e Merge remote-tracking branch 'lenormf/nim-support' 2017-12-03 18:13:30 +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
73a239d3be Text-Objects: Use regex to select surroundings
Fixes #925
2017-12-03 17:15:24 +08:00
Maxime Coste
c8f5935c48 test/: Add more tests for object selection corner cases 2017-12-03 17:12:33 +08:00
Maxime Coste
1371148588 test: fix support for '(' in initial selected text 2017-12-03 17:12:33 +08:00
Maxime Coste
9a4b5de772 Regex: Introduce backward_regex_search helper function 2017-12-03 17:12:33 +08:00
Maxime Coste
b34bb6b794 Regex: make RegexIterator iterable and able to iter backwards 2017-12-02 14:02:41 +08:00
Frank LENORMAND
f3238f4e65 rc dockerfile: Remove a left-over debug instruction 2017-12-01 17:12:41 +03:00
Maxime Coste
413f880e9e Regex: Support forward and backward matching code in the same CompiledRegex
No need to have two separate regexes to handle forward and backward
matching, just passing RegexCompileFlags::Backward will add support
for backward matching to the regex. For backward only regex, pass
RegexCompileFlags::NoForward as well to disable generation of
forward matching code.
2017-12-01 19:57:02 +08:00
Maxime Coste
e9e3dc862c Merge git://github.com/valerdi/kakoune 2017-12-01 16:40:31 +08:00
Maxime Coste
90c91ca3a2 Merge remote-tracking branch 'lenormf/fix-dockerfile' 2017-12-01 16:39:50 +08:00
Maxime Coste
7bfb695c45 Regex: Do not allow private use codepoints literals
We use them to encode non-literals in lookarounds, so they can
trigger bugs.

Fixes #1737
2017-12-01 16:37:18 +08:00
Maxime Coste
8d892eeb62 Regex: use StartDesc to early out when not searching
Early out as well if we do not find any potential start position.
2017-12-01 15:03:03 +08:00
Maxime Coste
65b057f261 Regex: rename StartChars to StartDesc
It only contains chars for now, but its still more generally
describing where matches can start.
2017-12-01 14:46:18 +08:00
valerdi
4d4c6aa82b
added AbstractString to keywords 2017-11-30 15:44:12 +01:00
Maxime Coste
b91f43b031 Regex: optimize parsing a bit 2017-11-30 14:32:29 +08:00
Maxime Coste
c1f0efa3f4 Regex: smarter handling of start chars computation for character class 2017-11-30 14:19:41 +08:00
Qeole
a54b6129de README: minor fixes
- `make doc` does not work, users should use `make man` instead.
- Fix a formatting mistake: escape a back quote.
2017-11-29 22:17:41 +00:00
Qeole
57b3ecb684 Qeole Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
2017-11-29 22:17:41 +00:00
Frank LENORMAND
e102251880 rc: Implement basic Nim support 2017-11-29 19:15:00 +03:00
Maxime Coste
839da764e7 Regex: avoid unneeded allocations and moves by reusing MatchResults storage 2017-11-29 14:07:04 +08:00
Maxime Coste
f950fe3376 hooks.asciidoc: Fix few rendering problems 2017-11-28 19:40:07 +08:00
Maxime Coste
380ff553b5 Wrap: try to rework and simplify the algorithms further
Fixes #1731
2017-11-28 19:04:21 +08:00
Maxime Coste
ae0911b533 Regex: Various small code tweaks 2017-11-28 01:03:54 +08:00
Maxime Coste
4598832ed5 Regex: optimize compilation by reserving data 2017-11-28 00:59:57 +08:00
Maxime Coste
a52da6fe34 Regex: Tweak is_ctype implementation style 2017-11-28 00:13:42 +08:00
Maxime Coste
d142db80f2 Fix compute_modified_ranges corner case that would crash on undo
Fixes #1506
Fixes #1215
2017-11-27 20:29:01 +08:00
Maxime Coste
40352aed9d Merge remote-tracking branch 'Delapouite/advance' 2017-11-27 16:53:41 +08:00
Delapouite
9c5fa1d68b Docs: fix typo avance → advance in keys 2017-11-25 17:18:12 +01:00
Maxime Coste
8b40f57145 Regex: Replace generic 'Matchers' with specialized functionality
Introduce CharacterClass and CharacterType Regex Op, and optimize
their evaluation.
2017-11-25 18:14:15 +08:00
Maxime Coste
0d44cf9591 Regex: do not decode utf8 in accept calls as they always run on ascii 2017-11-25 18:13:27 +08:00
Maxime Coste
ec6ecd5772 Add an InsertCompletionSelect hook
InsertCompletionSelect will be called whenever the selected insert
completion changes. If the original text is selected back, the hook
parameter will be empty. If another candidate is selected, the hook
parameter will be its text content.

Fixes #1676
2017-11-25 13:57:47 +08:00