files: kak: Add more commands for editing files within radix
parent
103dee93dd
commit
2c532eb239
|
@ -50,51 +50,69 @@ define-command -override cron \
|
|||
execute-keys ': e ~/.config/cron/'
|
||||
}
|
||||
|
||||
define-command -override todo \
|
||||
-docstring 'edit todo list' %{
|
||||
edit '~/areas/meta/todo'
|
||||
}
|
||||
|
||||
define-command -override guix-todo \
|
||||
-docstring 'edit todo list' %{
|
||||
edit '~/projects/code/org/guix-todo/todo.org'
|
||||
}
|
||||
|
||||
declare-option str radix '~/projects/code/scm/radix'
|
||||
define-command -override radix \
|
||||
-docstring 'edit files in radix repository' %{
|
||||
execute-keys ':edit ~/projects/code/scm/radix/'
|
||||
-docstring 'edit files in the radix git repository' %{
|
||||
execute-keys ":e %opt{radix}/"
|
||||
}
|
||||
|
||||
define-command -override home \
|
||||
-docstring 'edit home declaration' %{
|
||||
evaluate-commands 'radix'
|
||||
execute-keys 'home-environments/radio.scm<ret>'
|
||||
edit "%opt{radix}/home-environments/%sh{whoami}.scm"
|
||||
}
|
||||
|
||||
define-command -override system \
|
||||
-docstring 'edit system declaration' %{
|
||||
evaluate-commands 'radix'
|
||||
execute-keys 'operating-systems/buer.scm<ret>'
|
||||
edit "%opt{radix}/operating-systems/%sh{hostname}.scm"
|
||||
}
|
||||
|
||||
declare-option str radix_files "%opt{radix}/files"
|
||||
define-command -override files \
|
||||
-docstring 'edit dotfiles' %{
|
||||
evaluate-commands 'radix'
|
||||
execute-keys 'files/'
|
||||
execute-keys ":e %opt{radix_files}/"
|
||||
}
|
||||
|
||||
declare-option str radix_modules "%opt{radix}/modules/radix"
|
||||
define-command -override modules \
|
||||
-docstring 'edit radix modules' %{
|
||||
evaluate-commands 'radix'
|
||||
execute-keys 'modules/radix'
|
||||
execute-keys ":e %opt{radix_modules}"
|
||||
}
|
||||
|
||||
declare-option str radix_services "%opt{radix_modules}/services"
|
||||
define-command -override services \
|
||||
-docstring 'edit radix services' %{
|
||||
execute-keys ":e %opt{radix_services}/"
|
||||
}
|
||||
|
||||
declare-option str radix_home_services "%opt{radix_modules}/home/services"
|
||||
define-command -override home-services \
|
||||
-docstring 'edit radix home services' %{
|
||||
execute-keys ":e %opt{radix_home_services}/"
|
||||
}
|
||||
|
||||
define-command -override colorscheme-config \
|
||||
-docstring 'edit colorscheme configuration file' %{
|
||||
evaluate-commands 'files'
|
||||
execute-keys 'kak/autoload/colorscheme.kak<ret>'
|
||||
edit "%opt{radix_files}/kak/autoload/colorscheme.kak"
|
||||
}
|
||||
|
||||
define-command -override config \
|
||||
-docstring 'edit kakoune main configuration file' %{
|
||||
evaluate-commands 'files'
|
||||
execute-keys 'kak/kakrc<ret>'
|
||||
edit "%opt{radix_files}/kak/kakrc"
|
||||
}
|
||||
|
||||
define-command -override rss \
|
||||
-docstring 'edit rss feeds file' %{
|
||||
evaluate-commands 'files'
|
||||
execute-keys 'newsraft/feeds<ret>'
|
||||
edit "%opt{radix_files}/newsraft/feeds"
|
||||
}
|
||||
|
||||
define-command -override remind \
|
||||
|
@ -114,7 +132,6 @@ define-command -params 1 -override tex-project \
|
|||
edit "%arg{1}.tex"
|
||||
execute-keys '16gA<esc>'
|
||||
}
|
||||
|
||||
define-command -override open-buffer-picker \
|
||||
-docstring 'open-buffer-picker: Opens buffer picker.' %{
|
||||
prompt buffer: -buffer-completion %{ buffer %val{text} }
|
||||
|
@ -242,7 +259,7 @@ hook -group config global BufCreate 'kakrc' %{
|
|||
|
||||
hook -group config global BufCreate '.*\.(bash_profile|profile|bashrc|bash_aliases)' %{
|
||||
set-option buffer filetype sh
|
||||
} # Set bash configuration file's filetype to sh
|
||||
} # Set filetype of bash configuration files to sh
|
||||
|
||||
hook global BufCreate '\*scratch\*' %{
|
||||
execute-keys '%<a-d>'
|
||||
|
@ -252,8 +269,8 @@ hook global BufCreate .* %{
|
|||
add-highlighter buffer/ number-lines -relative -hlcursor
|
||||
} # Set relative line numbers and visual line break
|
||||
|
||||
hook global BufWritePost "%val{config}/kakrc" %{
|
||||
source "%val{config}/kakrc"
|
||||
hook global BufWritePost ".*/kakrc" %{
|
||||
source "%val{buffile}"
|
||||
} # Source kakrc on save
|
||||
|
||||
hook global BufOpenFile '.*\.clj' %{
|
||||
|
|
Loading…
Reference in New Issue