diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-13 20:46:59 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-13 20:46:59 +0900 |
| commit | 3b0cb73407b303d4de2b2f279baab2f5f14fc6df (patch) | |
| tree | 14a532c55820dca77afe953b52c27a3172b5ae1c /mac/.local | |
| parent | d384f51704aa1d0d47b737533827ce575cc9d572 (diff) | |
modified shell/bm-dirs, modified yazi/keymap-default.toml, modified bin/bmshortcuts
Diffstat (limited to 'mac/.local')
| -rwxr-xr-x | mac/.local/bin/bmshortcuts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mac/.local/bin/bmshortcuts b/mac/.local/bin/bmshortcuts index 51a6c66..fa3d8c5 100755 --- a/mac/.local/bin/bmshortcuts +++ b/mac/.local/bin/bmshortcuts @@ -42,7 +42,7 @@ eval "echo \"$(cat "$bmdirs")\"" | printf(\"vim.keymap.set('n', '<localleader><leader>%s', '<cmd>Explore %s<cr>', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, desc_path) >> \"$nvim_shortcuts\" ; printf(\"vim.keymap.set('n', '<localleader><localleader>%s', function() require('mini.files').open('%s') end, { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, desc_path) >> \"$nvim_shortcuts\" ; desc_path = \$2; gsub(\"^/home/$USER/\",\"~/\",desc_path); - key_array = \"\\\"\\\\\\\\\\\"\"; for(i=1; i<=length(\$1); i++) { key_array = key_array \", \\\"\" substr(\$1,i,1) \"\\\"\" } + key_array = \"\"; for(i=1; i<=length(\$1); i++) { if(i==1) key_array = \"\\\"\" substr(\$1,i,1) \"\\\"\"; else key_array = key_array \", \\\"\" substr(\$1,i,1) \"\\\"\" } printf(\"\\t{ on = [ %s ], run = \\\"cd %s\\\", desc = \\\"Go to %s\\\" },\\n\",key_array,\$2,desc_path) >> \"$yazi_shortcuts.tmp\"}" # Format the `files` file in the correct syntax and sent it to both configs. @@ -65,7 +65,7 @@ eval "echo \"$(cat "$bmfiles")\"" | printf(\"vim.keymap.set('c', ';%s', '%s<cr>', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, desc_path) >> \"$nvim_shortcuts\" ; printf(\"vim.keymap.set('n', '<localleader><localleader>%s', '<cmd>e %s<cr>', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, desc_path) >> \"$nvim_shortcuts\" ; desc_path = \$2; gsub(\"^/home/$USER/\",\"~/\",desc_path); - key_array = \"\\\"\\\\\\\\\\\"\"; for(i=1; i<=length(\$1); i++) { key_array = key_array \", \\\"\" substr(\$1,i,1) \"\\\"\" } + key_array = \"\"; for(i=1; i<=length(\$1); i++) { if(i==1) key_array = \"\\\"\" substr(\$1,i,1) \"\\\"\"; else key_array = key_array \", \\\"\" substr(\$1,i,1) \"\\\"\" } printf(\"\\t{ on = [ %s ], run = \\\"open %s\\\", desc = \\\"Open %s\\\" },\\n\",key_array,\$2,desc_path) >> \"$yazi_shortcuts.tmp\"}" # Merge bookmarks into keymap-default.toml |
