nvim: 快速鍵調整

This commit is contained in:
Yuan Chiu 2025-04-30 10:33:25 +08:00
parent 0f5bf1cd91
commit 9240f60445
3 changed files with 7 additions and 1 deletions

View File

@ -15,14 +15,15 @@ Yuan Neovim 備忘
* move cursor: <window>(方向鍵)
### 擴充自行設定的快速鍵
* `<F8>`: NeoTree: 查看已經開啟的檔案
* `<F9>`: NeoTree
* `<F10>`: git status
* `<leader>fT`: 浮動NeoTree
* `<leader>fB`: 已開啟的檔案
#### 預計設定
* <F8> 看看你設定了哪些變數、函數,也可以快速跳轉
* <F6> 可以回朔到開啟檔案以來的任何歷史,還會標出修改的地方
* <F7> 看看你設定了哪些變數、函數,也可以快速跳轉
### 編輯習慣(已經覆寫)
* shift+方向鍵(傳統): 選取文字(傳統習慣)

View File

@ -5,6 +5,9 @@ local map = vim.keymap.set
-- Ctrl+Enter 鍵會被視為 Ctrl+M (對策: 多增加相同功能的Ctrl+Alt+Enter)
-- <A-S-CR>
-- Ctrl+s 儲存
map("n", "<C-s>", "<cmd>write<CR>", { noremap = true, silent = true, desc = "Save file" })
map("i", "<C-s>", "<Esc><cmd>write<CR>a", { noremap = true, silent = true, desc = "Save file in insert mode" })
-- Tab切換
-- 現在由barbar控制先停用

View File

@ -64,6 +64,8 @@ return {
end,
desc = "NeoTree"
},
{ "<F8>", "<cmd>Neotree toggle buffers<cr>", desc = "NeoTree Buffers" },
{ "<leader>e", "<Cmd>Neotree reveal<CR>" },
{ "<leader>ft", "<cmd>Neotree toggle<cr>", desc = "NeoTree" },
{ "<leader>fT", "<cmd>Neotree float<cr>", desc = "NeoTree Float" },