nvim: undolist
This commit is contained in:
parent
7ad0d308e5
commit
216df53a1e
@ -15,6 +15,7 @@ Yuan Neovim 備忘
|
|||||||
* move cursor: <window>(方向鍵)
|
* move cursor: <window>(方向鍵)
|
||||||
|
|
||||||
### 擴充自行設定的快速鍵
|
### 擴充自行設定的快速鍵
|
||||||
|
* `<F6>` 可以回朔到開啟檔案以來的任何歷史,還會標出修改的地方
|
||||||
* `<F8>`: NeoTree: 查看已經開啟的檔案
|
* `<F8>`: NeoTree: 查看已經開啟的檔案
|
||||||
* `<F9>`: NeoTree
|
* `<F9>`: NeoTree
|
||||||
* `<F10>`: git status
|
* `<F10>`: git status
|
||||||
@ -22,7 +23,6 @@ Yuan Neovim 備忘
|
|||||||
* `<leader>fB`: 已開啟的檔案
|
* `<leader>fB`: 已開啟的檔案
|
||||||
|
|
||||||
#### 預計設定
|
#### 預計設定
|
||||||
* <F6> 可以回朔到開啟檔案以來的任何歷史,還會標出修改的地方
|
|
||||||
* <F7> 看看你設定了哪些變數、函數,也可以快速跳轉
|
* <F7> 看看你設定了哪些變數、函數,也可以快速跳轉
|
||||||
|
|
||||||
### 編輯習慣(已經覆寫)
|
### 編輯習慣(已經覆寫)
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"jiaoshijie/undotree",
|
||||||
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
|
config = true,
|
||||||
|
keys = { -- load the plugin only when using it's keybinding:
|
||||||
|
{ "<F6>", "<cmd>lua require('undotree').toggle()<cr>" },
|
||||||
|
{ "<leader>u", "<cmd>lua require('undotree').toggle()<cr>" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
float_diff = true, -- using float window previews diff, set this `true` will disable layout option
|
||||||
|
layout = "left_bottom", -- "left_bottom", "left_left_bottom"
|
||||||
|
position = "right", -- "left", "right", "bottom"
|
||||||
|
ignore_filetype = { 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' },
|
||||||
|
window = {
|
||||||
|
winblend = 30,
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
['j'] = "move_next",
|
||||||
|
['k'] = "move_prev",
|
||||||
|
['gj'] = "move2parent",
|
||||||
|
['J'] = "move_change_next",
|
||||||
|
['K'] = "move_change_prev",
|
||||||
|
['<cr>'] = "action_enter",
|
||||||
|
['p'] = "enter_diffbuf",
|
||||||
|
['q'] = "quit",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user