home/rc/filetype
Johannes Altmanninger bf239ba77a rc diff: introduce diff-jump, replacing git-diff-goto-source
git-diff-goto-source is specific to diffs produced by Git.  This patch
generalizes the logic and moves it to a new diff-jump in diff.kak.

The main differences are:
- diff-jump handles plain file diffs (i.e. without the -r option). These
  have no "diff" line. This means that it needs to parse +++/--- instead.
- diff-jump can go to the old file, not just the new one.
- diff-jump allows to override the base directory and the number of
  directory components to strip.

git-diff-goto-source was implemented with several nested try/catch
blocks.  Implementing the extra features would have added more
nesting, redundancy or hidden options. To avoid that, I ported the
parsing logic to Perl (which git.kak already depends on). Maybe
it's possible to do the same in awk.

Potential concerns:
- We could move diff-jump to a new rc/tools/diff.kak but then it's not
  obvious where the "diff" module belongs to.
- Should diff "diff-jump -1" be spelled "diff-jump -p1"?

In future, the diff parser could be reused to implement a vimdiff-style
feature: given a diff and the "old" line number, we can compute the
corresponding "new" line number. Perhaps diff-jump should get a -client
argument.
2022-01-25 14:15:01 +01:00
..
arch-linux.kak Add categories in rc/ 2019-03-21 01:06:16 +01:00
asciidoc.kak Fix AsciiDoc blocks 2021-10-17 00:19:53 +02:00
awk.kak Update deindentation rule for awk.kak, cabal.kak, go.kak 2020-07-29 15:06:27 -06:00
c-family.kak c-family.kak: properly quote shell variable 2021-04-30 11:53:18 +02:00
cabal.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
clojure.kak rc: Make docstrings more readable 2020-02-03 20:53:28 +01:00
cmake.kak Update remaining files to new provide/require format 2019-04-11 15:54:58 -07:00
coffee.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
coq.kak fix indent behavior for lines without indent 2020-05-03 17:48:44 +08:00
crystal.kak Fix Crystal escape string 2021-09-04 23:50:12 +02:00
css.kak Update deindenting in css.kak 2020-07-29 09:35:36 -06:00
cucumber.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
cue.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
d.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
dart.kak dart: add extension to the list of keywords 2021-07-01 16:03:30 +02:00
dhall.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
diff.kak rc diff: introduce diff-jump, replacing git-diff-goto-source 2022-01-25 14:15:01 +01:00
dockerfile.kak *sh.kak: do not highlight expansions if their $ is escaped 2020-09-19 08:06:46 +02:00
elixir.kak update sigil highlighter to be less error prone 2021-12-02 17:49:28 -07:00
elm.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
erlang.kak Erlang syntax highlighting: Improved support for numeric literals, refs, ports and pids 2021-10-28 12:43:00 +05:30
eruby.kak Add missing eRuby indent group 2021-06-15 14:30:35 +02:00
etc.kak Fixed several more support files. 2019-04-10 16:48:46 -07:00
exherbo.kak Update remaining files to new provide/require format 2019-04-11 15:54:58 -07:00
fennel.kak add fennel filetype 2021-03-01 19:51:36 +03:00
fish.kak rc fish: fix keyword highlighting false positive 2021-08-09 22:45:52 +02:00
fsharp.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
gas.kak src: Create a <semicolon> named key 2019-10-22 11:02:06 +02:00
gdscript.kak rc: add gdscript.kak 2021-06-06 14:08:13 +03:00
gentoo-linux.kak Add gentoo linux ebuild filetype detection. 2021-08-06 11:30:06 -07:00
git.kak rc diff: make it a module 2022-01-25 14:11:06 +01:00
gluon.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
go.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
graphql.kak chore(rc): support nested field strings in graphql 2021-01-14 15:46:50 -05:00
haml.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
haskell.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
hbs.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
html.kak [html] Fix indentation when entering a newline while in the middle of a tag 2019-11-03 12:25:02 +01:00
i3.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
ini.kak rc ini: More leniently highlight section names 2020-05-14 10:25:38 +03:00
janet.kak Add basic support for the Janet language 2021-04-23 14:49:24 -03:00
java.kak Java: add highlighting for char literal 2021-05-17 21:15:30 +02:00
javascript.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
jinja.kak rc jinja: Highlight Jinja statements/expressions 2020-01-08 12:22:34 +01:00
json.kak Clean up my previous updates 2020-07-29 09:40:58 -06:00
julia.kak rc julia: add multiline comments 2021-02-21 19:20:03 +01:00
just.kak just: highlight function expressions 2020-09-22 00:24:29 -05:00
kakrc.kak rc kakrc: Add the rename-buffer keyword 2020-11-17 15:58:58 +03:00
kickstart.kak Update remaining files to new provide/require format 2019-04-11 15:54:58 -07:00
kotlin.kak Change highlight of character literals 2021-12-11 02:04:10 +01:00
latex.kak rc latex: Add missing scope arg to remove-hooks 2021-09-12 17:31:12 -03:00
ledger.kak src: Create a <semicolon> named key 2019-10-22 11:02:06 +02:00
lisp.kak {clojure,lisp}.kak: handle doubled brackets 2020-01-03 15:14:56 -05:00
lua.kak lua.kak: Add some test cases, and also fix a bug 2021-09-26 11:19:58 -03:00
mail.kak Highlight mail References headers 2020-04-21 13:21:35 +10:00
makefile.kak *sh.kak: do not highlight expansions if their $ is escaped 2020-09-19 08:06:46 +02:00
markdown.kak markdown.kak: erlang, elixir and ocaml code should be highlighted in markdown 2021-11-17 20:38:12 +05:30
mercurial.kak Update remaining files to new provide/require format 2019-04-11 15:54:58 -07:00
mercury.kak rc: make insertion hooks more consistent 2021-04-17 20:56:23 +02:00
meson.kak meson: improve highlighting, add static words 2021-01-13 15:44:38 +01:00
mlb.kak Add highlighters for Standard ML 2020-06-23 19:22:35 +01:00
moon.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
nim.kak Merge remote-tracking branch 'SolitudeSF/suffix' 2021-04-18 17:07:30 +10:00
ninja.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
nix.kak Fix regex for nix paths 2021-08-23 11:06:14 +01:00
ocaml.kak OCaml: Add a command to shift between .ml and .mli files and vice versa 2021-11-10 12:22:08 +05:30
pascal.kak make pascal filetype compatible with bash 2021-07-17 20:01:12 +02:00
perl.kak Allowed for references of strings 2021-05-17 14:30:33 -04:00
php.kak Fix unterminated string in rc/filetype/php.kak 2021-09-02 14:54:47 -07:00
pony.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
protobuf.kak Fix deindentation in protobuf.kak 2020-07-29 20:41:18 -06:00
pug.kak src: Create a <semicolon> named key 2019-10-22 11:02:06 +02:00
purescript.kak Fix purescript comments and keywords 2021-05-30 15:39:58 +03:00
python.kak Add new '_', 'case', and 'match' keywords to Python highlighter 2021-10-24 12:56:18 +01:00
r.kak R file highliight change. Merged into single highlighter for math, summary and complex functions. 2021-07-30 11:29:29 -05:00
ragel.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
restructuredtext.kak rc restructuredtext: don't highlight first character of next line as code 2021-02-10 21:09:16 +01:00
ruby.kak Rename exec->execute-keys for consistency 2021-06-06 14:28:28 +06:00
rust.kak add TODO comment highlighting 2021-05-02 20:38:42 -04:00
sass.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
scala.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
scheme.kak add sps and sls file extensions for scheme 2021-05-28 20:51:06 +10:00
scss.kak Replace ModeChange hooks by ModePush and ModePop 2019-10-16 20:45:53 +11:00
sh.kak sh filetype: do not highlight an empty array as a function 2021-11-18 13:51:53 -03:00
sml.kak Add highlighters for Standard ML 2020-06-23 19:22:35 +01:00
sql.kak Fix function highlighting by adding lazy instead of greedy regexp quantifier 2020-10-14 14:54:43 -06:00
svelte.kak Improve svelte highlighter 2020-11-13 00:21:05 +01:00
swift.kak rc swift: Add open and internal keywords 2021-06-24 14:29:10 +03:00
systemd.kak Add categories in rc/ 2019-03-21 01:06:16 +01:00
taskpaper.kak src: Create a <semicolon> named key 2019-10-22 11:02:06 +02:00
terraform.kak Add filetype for terraform files with syntax hl 2019-11-18 20:41:42 +00:00
toml.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
troff.kak Add comment highlighter for troff files. 2021-02-25 20:18:10 +01:00
tupfile.kak Fixed many of the filetype support modules to not use BufSetOption to load 2019-04-09 20:54:19 -07:00
vhdl.kak [VHDL] Add 'character' to types highlight. 2021-04-29 13:38:15 +02:00
void-linux.kak Add categories in rc/ 2019-03-21 01:06:16 +01:00
yaml.kak rc: use a separate *-insert hook to auto-insert comments 2021-04-17 20:56:23 +02:00
zig.kak rc/filetype/zig: update for zig 0.9.0 release 2021-12-31 05:00:35 +00:00