+20
config/kak/kakrc
+20
config/kak/kakrc
···
134
134
}
135
135
}
136
136
137
+
# Run command
138
+
define-command -params 1.. -command-completion -file-completion -docstring \
139
+
"Run a command and show the output the *m-run* scratch buffer" \
140
+
m-run %{
141
+
try %{ delete-buffer! *m-run* }
142
+
edit -scratch *m-run*
143
+
execute-keys "!%arg{@}<ret>jd"
144
+
}
145
+
146
+
# Run command from selection
147
+
define-command -docstring \
148
+
"Run a command from a selection and show the output the *m-run-select* scratch buffer" \
149
+
m-run-select %{
150
+
declare-option -hidden str m_select_command %val{selection}
151
+
try %{ delete-buffer! *m-run-select* }
152
+
edit -scratch *m-run-select*
153
+
execute-keys "!%opt{m_select_command}<ret>jd"
154
+
}
155
+
137
156
# Keybinds
138
157
## User
139
158
map global user c ':comment-line<ret>' -docstring 'comment line'
···
142
161
map global user p '!wl-paste<ret>' -docstring 'Paste from System Clipboard (Wayland)'
143
162
map global user y '<a-|>wl-copy<ret>' -docstring 'Copy to System Clipboard (Wayland)'
144
163
map global user . ':source ".kakrc.local"<ret>' -docstring 'Load the kakrc file in the current directory'
164
+
map global user r ':m-run-select<ret>' -docstring 'Run the selected command'
145
165
146
166
# Set termcmd
147
167
hook global ModuleLoaded wayland %{