Commit Graph

26 Commits

Author SHA1 Message Date
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
Johannes Altmanninger
0264c84742 rc: when auto-inserting comments, include trailing spaces from previous line
We already do this in most places.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
cc9447c15b rc perl.kak: highlight substitution with empty replacement, like s{foo}{} 2020-11-08 06:16:27 +01:00
Johannes Altmanninger
1f4362d0ba rc perl.kak: highlight multiple regex modifiers 2020-11-08 06:16:27 +01:00
Maxime Coste
086771593c Fix regex error in perl highlighting 2020-11-08 15:14:07 +11:00
Johannes Altmanninger
19391f8c02 rc perl: quoted heredocs can be empty
Also the closing line cannot have any trailing characters.
Leading tabs are allowed if <<~ is used.
2020-10-19 19:01:17 +02:00
Carson Riker
21fbda7c68 Fixed ending of region, as per @krobelus 2020-10-09 13:25:26 -04:00
Carson Riker
30d5aa203d Added highlighted for curly-brace based sregexes 2020-10-09 10:45:42 -04:00
Johannes Altmanninger
19b54a8a6e Highlight more Perl quoting syntaxes
This adds highlighting for

- quoting operators qw, qr, and qx, like `qw< some words >`
- angle brackets after a quoting operator, like `q<string>`
- punctuation as quoting delimiter, like `q|string|`
- POD sections, which start with ^=\w and and with ^=cut
- heredocs; the marker can be a bare word, or a quoted word, like

	print <<~ 'EOF'
		single quoted heredoc
	EOF

Closes #3736

No attempt is made to use different highlighting for interpolated (qq or
"") strings just yet. Recognizing quote boundaries is more important.
2020-09-18 20:55:12 +02:00
John Isom
9d4e33c775 Clean up my previous updates 2020-07-29 09:40:58 -06:00
John Isom
fb838b9f33 Update deindenting in perl.kak 2020-07-29 08:56:19 -06:00
John Isom
1eb34996e1 Merge branch 'deindent-closing-braces' into HEAD 2020-07-29 08:55:48 -06:00
John Isom
90988f5ee9 Merge commit '84a08982' into HEAD 2020-07-29 08:55:19 -06:00
John Isom
623743e794 Update deindenting in perl.kak 2020-07-29 08:54:19 -06:00
John Isom
507f799ce4 Fix already-existing bug in perl.kak 2020-07-28 20:52:06 -06:00
John Isom
84a08982db Update deindenting in perl.kak 2020-07-28 20:51:19 -06:00
John Isom
3bd783c337 Update deindenting in perl.kak 2020-07-28 16:04:35 -06:00
John Isom
85d5f50376 Fix indentation rule for perl.kak 2020-07-28 12:55:21 -06:00
buffet
7870685248 Fix perl regex for operator // 2020-05-05 16:22:30 +00:00
Maxime Coste
2209b5d415 Improve perl regex and qq string highlighting 2019-11-26 21:32:52 +11:00
Frank LENORMAND
21614cb06e src: Create a <semicolon> named key
This commit allows using the <semicolon> expansion in commands, instead
of `\;`.

It makes commands look more elegant, and prevents new-comers from
falling into the trap of using <a-;> without escaping the semicolon.
2019-10-22 11:02:06 +02:00
Maxime Coste
e4fb70ebec Replace ModeChange hooks by ModePush and ModePop
Remove deprecated InsertBegin, InsertEnd, NormalBegin, NormalEnd
hooks.

Closes #2545
2019-10-16 20:45:53 +11:00
Justin Frank
48abc3cbf3 Changed '🦀' to '§' for complex module quoting 2019-04-13 12:57:57 -07:00
Justin Frank
80ac46e09d Fixed many of the filetype support modules to not use BufSetOption to load 2019-04-09 20:54:19 -07:00
Justin Frank
1fab727f2b Modified a bunch of language support files to use modules 2019-04-08 17:02:44 -07:00
Alex Leferry 2
c0dccdd90d Add categories in rc/
Closes #2783
2019-03-21 01:06:16 +01:00