Merge pull request #70 from stsewd/add-refresh
KeyBindings: add refresh
This commit is contained in:
@@ -156,6 +156,7 @@ INFORMATIONS *nvim-tree-info*
|
|||||||
- '<C-t>' will open the file in a new tab
|
- '<C-t>' will open the file in a new tab
|
||||||
- '<Tab>' will open the file as a preview (keeps the cursor in the tree)
|
- '<Tab>' will open the file as a preview (keeps the cursor in the tree)
|
||||||
- 'I' will toggle visibility of folders hidden via |g:lua_tree_ignore|
|
- 'I' will toggle visibility of folders hidden via |g:lua_tree_ignore|
|
||||||
|
- 'R' will refresh the tree
|
||||||
- 'gx' opens the file with the `open` command on macos and `xdg-open`
|
- 'gx' opens the file with the `open` command on macos and `xdg-open`
|
||||||
on linux.
|
on linux.
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ function M.get_bindings()
|
|||||||
edit_tab = keybindings.edit_tab or '<C-t>',
|
edit_tab = keybindings.edit_tab or '<C-t>',
|
||||||
preview = keybindings.preview or '<Tab>',
|
preview = keybindings.preview or '<Tab>',
|
||||||
toggle_ignored = keybindings.toggle_ignored or 'I',
|
toggle_ignored = keybindings.toggle_ignored or 'I',
|
||||||
|
refresh = keybindings.refresh or 'R',
|
||||||
cd = keybindings.cd or '<C-]>',
|
cd = keybindings.cd or '<C-]>',
|
||||||
create = keybindings.create or 'a',
|
create = keybindings.create or 'a',
|
||||||
remove = keybindings.remove or 'd',
|
remove = keybindings.remove or 'd',
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ local function set_mappings()
|
|||||||
[bindings.edit_split] = 'on_keypress("split")';
|
[bindings.edit_split] = 'on_keypress("split")';
|
||||||
[bindings.edit_tab] = 'on_keypress("tabnew")';
|
[bindings.edit_tab] = 'on_keypress("tabnew")';
|
||||||
[bindings.toggle_ignored] = 'on_keypress("toggle_ignored")';
|
[bindings.toggle_ignored] = 'on_keypress("toggle_ignored")';
|
||||||
|
[bindings.refresh] = 'on_keypress("refresh")';
|
||||||
[bindings.create] = 'on_keypress("create")';
|
[bindings.create] = 'on_keypress("create")';
|
||||||
[bindings.remove] = 'on_keypress("remove")';
|
[bindings.remove] = 'on_keypress("remove")';
|
||||||
[bindings.rename] = 'on_keypress("rename")';
|
[bindings.rename] = 'on_keypress("rename")';
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ local keypress_funcs = {
|
|||||||
cut = fs.cut,
|
cut = fs.cut,
|
||||||
paste = fs.paste,
|
paste = fs.paste,
|
||||||
toggle_ignored = lib.toggle_ignored,
|
toggle_ignored = lib.toggle_ignored,
|
||||||
|
refresh = lib.refresh_tree,
|
||||||
prev_git_item = gen_go_to('prev_git_item'),
|
prev_git_item = gen_go_to('prev_git_item'),
|
||||||
next_git_item = gen_go_to('next_git_item'),
|
next_git_item = gen_go_to('next_git_item'),
|
||||||
preview = function(node)
|
preview = function(node)
|
||||||
|
|||||||
Reference in New Issue
Block a user