Add commenting shortcuts

main
Julius Riegel 7 months ago
parent 26db3fe460
commit f2e5eeb591

@ -40,10 +40,14 @@ esc = ["collapse_selection", "normal_mode"]
[keys.normal] [keys.normal]
esc = ["collapse_selection", "keep_primary_selection"] esc = ["collapse_selection", "keep_primary_selection"]
C-j = "half_page_down" C-j = ["half_page_down", "goto_window_center", "align_view_center"]
C-k = "half_page_up" C-k = ["half_page_up", "goto_window_center", "align_view_center"]
[keys.select] [keys.select]
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"] esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
C-j = "half_page_down" C-j = ["half_page_down", "goto_window_center"]
C-k = "half_page_up" C-k = ["half_page_up", "goto_window_center"]
[keys.normal."A-/"]
j = ["goto_line_start", ":insert-output use ide.nu; ide doc-comment java-style", "normal_mode", "move_visual_line_up", "insert_at_line_end"]
r = ["goto_line_start", ":insert-output use ide.nu; ide doc-comment rust-style", "normal_mode", "insert_at_line_end"]

@ -65,6 +65,16 @@ export def last-notification [] {
$notif $notif
} }
export def `doc-comment java-style` [] {
print `/**
*
*/`
}
export def `doc-comment rust-style` [] {
print `/// `
}
def open-editor [path: string] { def open-editor [path: string] {
zellij ac move-focus right zellij ac move-focus right
zellij ac write-chars $":open ($path)\r" zellij ac write-chars $":open ($path)\r"

Loading…
Cancel
Save