diff --git a/dotfiles/kakrc b/dotfiles/kakrc index ff285dd4..c17f0d9f 100644 --- a/dotfiles/kakrc +++ b/dotfiles/kakrc @@ -1,7 +1,3 @@ -## Highlight whitespace at end of line -add-highlighter global/ regex '^.*[^ ]( +)$' 1:black,red -add-highlighter global/ number-lines -relative -hlcursor - hook global WinSetOption .* %{ remove-highlighter global/show-ws add-highlighter global/show-ws show-whitespaces -tabpad ' ' @@ -19,11 +15,7 @@ hook global WinSetOption filetype=(verilog|nix|vhdl) %{ set buffer indentwidth 2 } -hook global WinSetOption filetype=vhdl %{ - set buffer comment_block_begin '/*' - set buffer comment_block_end '/*' - set buffer comment_line '--' -} +set-option global ignored_files "^(\..*|.*\.(o|so|a)|__pycache__)$" ## == keybinds == @@ -48,26 +40,6 @@ map global normal '' '!pbpaste' map global user 'b' ':enter-user-mode buffers' -docstring 'buffer mode' map global user 'B' ':enter-user-mode -lock buffers' -docstring 'buffer mode (lock)' -# command to copy : into the clipboard (useful for pasting into debugger) -define-command copy-location -docstring "Copies : for the current cursor into the clipboard" %{ - evaluate-commands %sh{ - set -e - printf "%s" "$kak_bufname:$kak_cursor_line" | pbcopy - echo "echo 'Copied $kak_bufname:$kak_cursor_line into clipboard'" - } -} - -define-command copy-location-path -docstring "Copies : for the current cursor into the clipboard" %{ - evaluate-commands %sh{ - set -e - printf "%s" "$kak_buffile:$kak_cursor_line" | pbcopy - echo "echo 'Copied $kak_buffile:$kak_cursor_line into clipboard'" - } -} - -map global user 'y' ':copy-location' -docstring "Copy location" -map global user 'Y' ':copy-location-path' -docstring "Copy location (full path)" - ## == plugin configuration == # Custom function surround @@ -86,16 +58,14 @@ define-command -hidden surround-Tag %{ execute-keys "xZgihyzxZO""%val{text}zo""%val{text}z" } } -define-command -hidden surround-ins %{ - prompt 'prefix: ' %{ - execute-keys "Z;ha%val{text}Lu" - } +define-command -hidden surround-space %{ + execute-keys "i Ha " } map global mirror 'f' ':surround-function' -docstring 'function' -map global mirror 't' ':surround-tag' -docstring 'function' -map global mirror 'T' ':surround-Tag' -docstring 'function' -map global mirror 'i' ':surround-ins' -docstring 'function' +map global mirror 't' ':surround-tagmjau' -docstring 'tag' +map global mirror 'T' ':surround-Tag' -docstring 'tag, break line' +map global mirror ' ' ':surround-space' -docstring 'spaces' map global normal ö ':enter-user-mode mirror' -docstring 'mirror mode' @@ -112,14 +82,16 @@ map global lsp '"' ':lsp-clear-references' -docstring "Clear references" face global Reference white,rgb:550055 face global ReferenceBind white,rgb:552200 -map global insert '' ':enter-user-mode lsps' - #TODO # map global user '&' ':qhl-word' -docstring "Highlight current word" # map global user '"' ':unqhl' -docstring "Remove highlight" ## == Colors == +## Highlight whitespace at end of line +add-highlighter global/ regex '^.*[^ ]( +)$' 1:black,red +add-highlighter global/ number-lines -relative -hlcursor + define-command update-cursor-style %{ evaluate-commands %sh{ if [ $(echo "$kak_selection" | wc -c) -eq 2 ] ; then @@ -163,11 +135,3 @@ hook global WinSetOption filetype=python %{ set-option window formatcmd 'black -q -' } -set-option global ignored_files "^(\..*|.*\.(o|so|a)|__pycache__)$" - -## APL execute on = - -define-command -hidden dyalog-execute %{ - execute-keys -itersel 'i⎕←HH|dyalogscript /dev/fd/0' -} -map global normal '=' ':dyalog-execute'