Any option to make nvim-tree window keep current window width when opening another file from nvim-tree? #2915
-
Sometimes name of files are long and I change the width of the nvim-tree window to view the full names. Then I may open that file from nvim-tree. The nvim-tree window gets reset to pre-defined width after I open the file, and I need to resize the nvim-tree window again to see the full name of files. Is there an option that can let nvim-tree window keep the width? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You have a lot of options for width, including a function to define whatever behaviour you want. See You could try dynamic width: set a min and max to suit. I have a mapping |
Beta Was this translation helpful? Give feedback.
You have a lot of options for width, including a function to define whatever behaviour you want. See
:help nvim-tree.view.width
You could try dynamic width: set a min and max to suit.
I have a mapping
A
that toggles between fixed width 30 and unlimited (adaptive) width: https://github.com/alex-courtis/arch/blob/master/config/nvim/lua/amc/plugins/nvt.lua#L103