Commit Graph

39 Commits

Author SHA1 Message Date
Maxime Coste
2d8456db10 Move user mappings to <space> and keep/remove selection to , 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
Johannes Altmanninger
fea851b78b rc filetype: add some missing ModeChange hooks for trim-indent
Some languages have a trim-indent command but don't use it (for no
apparent reason). Make them trim trailing spaces when exiting insert
mode, like most other languages support scripts do.
2022-05-29 08:23:33 +02:00
Johannes Altmanninger
4c7207991a rc crystal: stop using ruby-trim-indent 2022-05-26 17:08:15 +02:00
Taupiqueur
f37633277a Fix Crystal escape string 2021-09-04 23:50:12 +02:00
John Isom
72f658f896 Replace my implementation of crystal-insert-on-new-line with already-existing ruby one
This fixed a weird bug where if you were typing in the top level scope of a
program (no indentation before statements), the `end`s wouldn't be inserted
for you.
2020-08-02 11:39:59 -06:00
John Isom
f59bdc614f Fix typo in comment 2020-08-02 11:33:56 -06:00
John Isom
6cf39a5f4f Fix auto indentation for if/case and else 2020-08-02 11:22:28 -06:00
John Isom
e858df3ca2 Add 'else' to auto deindent/align logic in context of 'case' statement 2020-08-01 12:12:48 -06:00
John Isom
dbb548af2d Fill in implementation of crystal-insert-on-new-line 2020-08-01 11:46:35 -06:00
John Isom
c36583524c Reorder definition of 3 indent/insert commands 2020-08-01 11:32:16 -06:00
John Isom
0d4dfbc349 Implement copying comment char (#) and whitespace after it 2020-08-01 11:31:28 -06:00
John Isom
8f0843978e Beautify indentation of 'crystal-indent-on-char' 2020-08-01 11:19:36 -06:00
John Isom
a6329b4bfc Fix deindentation of end to make it go to the right level 2020-08-01 11:18:41 -06:00
John Isom
145f2db741 Add rule to align 'end' with opening statement 2020-08-01 10:35:34 -06:00
John Isom
0fe71ebada Add deindentation rule for 'rescue' statement 2020-08-01 10:33:35 -06:00
John Isom
21c083f47c Add rule to align 'when' to 'case' 2020-08-01 10:32:45 -06:00
John Isom
76eadef00b Add rule to align else/elsif to opening if 2020-08-01 10:27:51 -06:00
John Isom
2c382de1e8 Add indenting after starting structure/opening statement 2020-08-01 10:08:47 -06:00
John Isom
ee842da85a Replace manual whitespace trimming to use function created in prev. commit 2020-08-01 09:59:53 -06:00
John Isom
62ac42bb23 Add 'crystal-trim-indent' command
This removes trailing whitespaces from the end of lines
2020-08-01 09:58:21 -06:00
John Isom
783fac3d61 Remove single quotes from 'execute-keys -draft ...' keys 2020-08-01 09:56:02 -06:00
John Isom
0063e4c4f5 Collapse 'try %{ execute-keys ... }' blocks to one line 2020-08-01 09:55:15 -06:00
John Isom
73f5f32385 Wrap all 'indent-on-new-line' commands in 'evaluate-commands -no-hook -draft -itersel' 2020-08-01 09:53:51 -06:00
John Isom
b23a85e747 Beautify percent string literals highlighters spacing/indentation 2020-08-01 09:50:27 -06:00
John Isom
0c591baae3 Add 'crystal-indent-on-char' and 'crystal-insert-on-new-line' hooks and functions 2020-08-01 09:49:53 -06:00
John Isom
591cb83da4 Rename 'crystal-new-line-inserted' to 'crystal-indent-on-new-line'
This gives the function clear responsibility, whereas the naming
before was unclear
2020-08-01 09:39:08 -06:00
John Isom
3248f7279c Deindent everything in the 'provide-module crystal...' block 2020-08-01 09:36:14 -06:00
John Isom
a78b6e6ccb Change 2-space indentation to 4-space 2020-08-01 09:34:55 -06:00
John Isom
5c124db5d9 Replace cat emojis with section signs
Many terminal emulators or fonts don't support the cat emoji, and the section
sign (§) is more semantically correct than a cat.
2020-08-01 09:30:12 -06:00
John Isom
dc378da87f Add section comments to crystal.kak 2020-08-01 09:27:21 -06:00
John Isom
79fa50dc3e Add namespacing to crystal hooks 2020-08-01 09:24:06 -06:00
Alex Leferry 2
23a428c9af Crystal: Slight style change 2020-05-30 23:10:22 +02:00
Alex Leferry 2
d7e2094f1c Crystal: Slight style change 2020-01-21 11:31:43 +01:00
Alex Leferry 2
c13e123096 Give an explicit name to the Crystal highlighter 2020-01-17 23:37:17 +01:00
Maxime Coste
4b7b5d077c Make quoting opt-in by using $kak_quoted_... 2019-06-23 12:04:21 +10:00
Alex Leferry 2
d97688b624 Update Crystal 2019-06-11 18:33:08 +02:00
Alex Leferry 2
cd0665d61b Update Crystal 2019-06-05 17:34:18 +02:00
Alex Leferry 2
fff7e9b064 Add support for Crystal
https://crystal-lang.org
2019-05-21 18:25:29 +02:00