feat: script: edit-clipboard

This commit is contained in:
js0ny 2025-11-14 08:17:38 +00:00
parent 4977346e60
commit f80d83bbd7
14 changed files with 133 additions and 71 deletions

View file

@ -62,6 +62,7 @@ vim:ft=gotmpl
.config/krunnerrc
.config/fcitx5
.config/niri
.config/neovide
.local/share/kio/**
.local/share/fonts/**
{{ end }}

View file

@ -10,55 +10,6 @@ key_bindings = KeyBindings()
def in_navigation_mode():
return ip.pt_app.app.vi_state.input_mode == InputMode.NAVIGATION
# colemak keymap hnei
@key_bindings.add("n", filter=in_navigation_mode)
def _(event):
"Move cursor down by visual line"
event.current_buffer.auto_down(count=event.arg)
@key_bindings.add("e", filter=in_navigation_mode)
def _(event):
"Move cursor up by visual line"
event.current_buffer.auto_up(count=event.arg)
@key_bindings.add("i", filter=in_navigation_mode)
def _(event):
"Move cursor right"
event.current_buffer.cursor_right(count=event.arg)
# Insert with 'l' and 'L'
@key_bindings.add("l", filter=in_navigation_mode)
def _(event):
"Enter insert mode (similar position to 'i' in Colemak)"
event.app.vi_state.input_mode = InputMode.INSERT
@key_bindings.add("L", filter=in_navigation_mode)
def _(event):
"Enter insert mode at the beginning of the line"
event.current_buffer.cursor_position += event.current_buffer.document.get_start_of_line_position()
# Ne[k]st
@key_bindings.add("k", filter=in_navigation_mode)
def _(event):
"Find next match"
event.current_buffer.forward_search()
@key_bindings.add("K", filter=in_navigation_mode)
def _(event):
"Find previous match"
event.current_buffer.reverse_search()
# [J]ump
@key_bindings.add("j", filter=in_navigation_mode)
def _(event):
"Move to end of next word"
event.current_buffer.cursor_right_word()
@key_bindings.add("J", filter=in_navigation_mode)
def _(event):
"Move to end of next word with capital E"
event.current_buffer.cursor_right_word(end=True)
# Yank to end of line with 'Y'
@key_bindings.add("Y", filter=in_navigation_mode)
def _(event):

View file

@ -18,8 +18,5 @@ vsync = true
wsl = false
[font]
normal = [
"Maple Mono NF",
"Iosevka Nerd Font",
] # Will use the bundled Fira Code Nerd Font by default
normal = ["Maple Mono NF CN",]
size = 14.0

View file

@ -88,13 +88,13 @@ return {
img_dirs = { "90 - System/Assets" },
},
},
-- keys = {
-- {
-- "<leader>ft",
-- function()
-- require("snacks").explorer()
-- end,
-- desc = "Toggle File Explorer",
-- },
-- },
keys = {
{
"<leader>ba",
function()
require("snacks").dashboard()
end,
desc = "Toggle Dashboard";
},
},
}