diff --git a/README.md b/README.md index 6d46f0f8..5b122818 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,12 @@ nnoremap n :LuaTreeFindFile - if the file is a symlink, `` will follow the symlink - type `` will open the file in a vertical split - type `` will open the file in a horizontal split +- type `` will open the file in a new tab - Double left click acts like `` - Double right click acts like `.` ## Features -- [x] Open file in current buffer or in split with FzF like bindings (``, ``, ``) +- [x] Open file in current buffer or in split with FzF like bindings (``, ``, ``, ``) - [x] File icons with vim-devicons - [x] Syntax highlighting ([exa](https://github.com/ogham/exa) like) - [x] Change directory with `.` @@ -66,7 +67,6 @@ nnoremap n :LuaTreeFindFile - sneak like cd command to find a file/directory - better default colors (use default vim groups) - create proper highlight groups or add highlight function to give the user ability to setup colors themselves -- add `` to open buffer in new tab ### Window Feature / Fixes - opening help should open on the bottom diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 7bac7cbf..34474a43 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -77,6 +77,7 @@ INFORMATIONS *nvim-tree-info* - if the file is a symlink, '' will follow the symlink - type '' will open the file in a vertical split - type '' will open the file in a horizontal split +- type '' will open the file in a new tab - Double left click acts like '' - Double right click acts like '.' diff --git a/lua/lib/winutils.lua b/lua/lib/winutils.lua index 62faf1b0..721a90f1 100644 --- a/lua/lib/winutils.lua +++ b/lua/lib/winutils.lua @@ -127,6 +127,7 @@ local function set_mappings() ['<2-RightMouse>'] = 'open_file("chdir")'; [''] = 'open_file("vsplit")'; [''] = 'open_file("split")'; + [''] = 'open_file("tabnew")'; ['.'] = 'open_file("chdir")'; a = 'edit_file("create")'; d = 'edit_file("remove")';