Commit Graph

11 Commits

Author SHA1 Message Date
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
0a9c90fecf rc: use a separate *-insert hook to auto-insert comments
This should cover all filetypes that already auto-insert comments,
except for rust.kak, which is left for a follow-up.

Most of these are straightforward, some explanation for special cases:

rc/filetype/zig.kak rc/filetype/cue.kak

  These indent hooks used their own logic to indent after "{" only if
  no comment was inserted. Replace this logic by checking if a comment
  was inserted. This works because these "*-insert" hooks are run
  before their respective "*-indent" hooks.
 
rc/filetype/php.kak

  This also has some logic to insert "*" after "/*" lines. Basic
  usage seems to work still. In future this should borrow from the
  c-family one, which works a bit better.
2021-04-17 20:56:23 +02:00
Isa Cichon
0fc91b9576 Fix usages of ModeChange hook
hook param always begins with either push: or pop:

Fixes #4078
2021-02-28 21:07:21 +01:00
Johannes Altmanninger
ab76ec981a Avoid extra indent when line does not end on keyword
For example there was an indent after a line like "echo todo" with filetype sh
because the "do" in "todo" was recognised as keyword.
2020-08-23 19:15:52 +02:00
John Isom
cc30131e16 Fix my issues in gluon.kak 2020-07-29 21:22:20 -06:00
John Isom
e02a3711fa Fix my issues in gluon.kak 2020-07-29 21:07:43 -06:00
John Isom
9560ef3dd5 Update deindentation in gluon.kak 2020-07-29 15:13:36 -06:00
John Isom
c0e14b1cfd Fix existing error regarding indent after opening brace
This is in gluon.kak, right above my addition
2020-07-27 13:39:52 -06:00
John Isom
931b90a451 Fix indentation rule for gluon.kak 2020-07-27 13:39:02 -06:00
lePerdu
6aab2f54dd Copy doc comment (///) prefix to new lines 2019-11-09 09:41:11 -05:00
lePerdu
2167374496 Add Gluon highlighting/indent 2019-11-09 09:22:19 -05:00