diff --git a/rc/base/dlang.kak b/rc/base/d.kak similarity index 63% rename from rc/base/dlang.kak rename to rc/base/d.kak index ed210621..a080a776 100644 --- a/rc/base/dlang.kak +++ b/rc/base/d.kak @@ -6,13 +6,13 @@ hook global BufCreate .*\.di? %{ set buffer mimetype "" - set buffer filetype dlang + set buffer filetype d } # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code dlang \ +addhl -group / regions -default code d \ string '"' (? } @@ -89,12 +89,12 @@ def -hidden _dlang-indent-on-new-line %~ = ~ -def -hidden _dlang-indent-on-opening-curly-brace %[ +def -hidden _d-indent-on-opening-curly-brace %[ # align indent with opening paren when { is entered on a new line after the closing paren try %[ exec -draft -itersel h)M \`\(.*\)\h*\n\h*\{\' s \`|.\' 1 ] ] -def -hidden _dlang-indent-on-closing-curly-brace %[ +def -hidden _d-indent-on-closing-curly-brace %[ # align to opening curly brace when alone on a line try %[ exec -itersel -draft ^\h+\}$hms\`|.\'1 ] ] @@ -102,22 +102,22 @@ def -hidden _dlang-indent-on-closing-curly-brace %[ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group dlang-highlight global WinSetOption filetype=dlang %{ addhl ref dlang } +hook -group d-highlight global WinSetOption filetype=d %{ addhl ref d } -hook global WinSetOption filetype=dlang %{ +hook global WinSetOption filetype=d %{ # cleanup trailing whitespaces when exiting insert mode - hook window InsertEnd .* -group dlang-hooks %{ try %{ exec -draft s^\h+$d } } - hook window InsertChar \n -group dlang-indent _dlang-indent-on-new-line - hook window InsertChar \{ -group dlang-indent _dlang-indent-on-opening-curly-brace - hook window InsertChar \} -group dlang-indent _dlang-indent-on-closing-curly-brace + hook window InsertEnd .* -group d-hooks %{ try %{ exec -draft s^\h+$d } } + hook window InsertChar \n -group d-indent _d-indent-on-new-line + hook window InsertChar \{ -group d-indent _d-indent-on-opening-curly-brace + hook window InsertChar \} -group d-indent _d-indent-on-closing-curly-brace set window formatcmd "dfmt" set window comment_selection_chars "/+:+/" } -hook -group dlang-highlight global WinSetOption filetype=(?!dlang).* %{ rmhl dlang } +hook -group d-highlight global WinSetOption filetype=(?!d).* %{ rmhl d } -hook global WinSetOption filetype=(?!dlang).* %{ - rmhooks window dlang-hooks - rmhooks window dlang-indent +hook global WinSetOption filetype=(?!d).* %{ + rmhooks window d-hooks + rmhooks window d-indent } diff --git a/rc/base/golang.kak b/rc/base/go.kak similarity index 61% rename from rc/base/golang.kak rename to rc/base/go.kak index 5ffe02dc..bbb83092 100644 --- a/rc/base/golang.kak +++ b/rc/base/go.kak @@ -6,25 +6,25 @@ hook global BufCreate .*\.go %{ set buffer mimetype "" - set buffer filetype golang + set buffer filetype go } # Highlighters # ‾‾‾‾‾‾‾‾‾‾‾‾ -addhl -group / regions -default code golang \ +addhl -group / regions -default code go \ back_string '`' '`' '' \ double_string '"' (? } @@ -71,12 +71,12 @@ def -hidden _golang-indent-on-new-line %~ = ~ -def -hidden _golang-indent-on-opening-curly-brace %[ +def -hidden _go-indent-on-opening-curly-brace %[ # align indent with opening paren when { is entered on a new line after the closing paren try %[ exec -draft -itersel h)M \`\(.*\)\h*\n\h*\{\' s \`|.\' 1 ] ] -def -hidden _golang-indent-on-closing-curly-brace %[ +def -hidden _go-indent-on-closing-curly-brace %[ # align to opening curly brace when alone on a line try %[ exec -itersel -draft ^\h+\}$hms\`|.\'1 ] ] @@ -84,21 +84,21 @@ def -hidden _golang-indent-on-closing-curly-brace %[ # Initialization # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -hook -group golang-highlight global WinSetOption filetype=golang %{ addhl ref golang } +hook -group go-highlight global WinSetOption filetype=go %{ addhl ref go } -hook global WinSetOption filetype=golang %{ +hook global WinSetOption filetype=go %{ # cleanup trailing whitespaces when exiting insert mode - hook window InsertEnd .* -group golang-hooks %{ try %{ exec -draft s^\h+$d } } - hook window InsertChar \n -group golang-indent _golang-indent-on-new-line - hook window InsertChar \{ -group golang-indent _golang-indent-on-opening-curly-brace - hook window InsertChar \} -group golang-indent _golang-indent-on-closing-curly-brace + hook window InsertEnd .* -group go-hooks %{ try %{ exec -draft s^\h+$d } } + hook window InsertChar \n -group go-indent _go-indent-on-new-line + hook window InsertChar \{ -group go-indent _go-indent-on-opening-curly-brace + hook window InsertChar \} -group go-indent _go-indent-on-closing-curly-brace set window formatcmd "gofmt" } -hook -group golang-highlight global WinSetOption filetype=(?!golang).* %{ rmhl golang } +hook -group go-highlight global WinSetOption filetype=(?!go).* %{ rmhl go } -hook global WinSetOption filetype=(?!golang).* %{ - rmhooks window golang-hooks - rmhooks window golang-indent +hook global WinSetOption filetype=(?!go).* %{ + rmhooks window go-hooks + rmhooks window go-indent } diff --git a/rc/base/markdown.kak b/rc/base/markdown.kak index d5e1a9b0..04a31639 100644 --- a/rc/base/markdown.kak +++ b/rc/base/markdown.kak @@ -23,12 +23,12 @@ addhl -group / regions -default content markdown \ cpp ```cpp ``` '' \ css ```css ``` '' \ cucumber ```cucumber ``` '' \ + d ```d ``` '' \ diff ```diff ``` '' \ - dlang ```dlang ``` '' \ dockerfile ```dockerfile ``` '' \ fish ```fish ``` '' \ gas ```gas ``` '' \ - golang ```golang ``` '' \ + go ```go ``` '' \ haml ```haml ``` '' \ haskell ```haskell ``` '' \ html ```html ``` '' \ @@ -71,12 +71,12 @@ addhl -group /markdown/coffee ref coffee addhl -group /markdown/cpp ref cpp addhl -group /markdown/css ref css addhl -group /markdown/cucumber ref cucumber +addhl -group /markdown/d ref d addhl -group /markdown/diff ref diff -addhl -group /markdown/dlang ref dlang addhl -group /markdown/dockerfile ref dockerfile addhl -group /markdown/fish ref fish addhl -group /markdown/gas ref gas -addhl -group /markdown/golang ref golang +addhl -group /markdown/go ref go addhl -group /markdown/haml ref haml addhl -group /markdown/haskell ref haskell addhl -group /markdown/html ref html