nvim-neo-tree / neo-tree.nvim

Neovim plugin to manage the file system and other tree like structures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FEATURE: Keybind to unzip ZIP, RAR, TAR, GZ, 7Z

avih7531 opened this issue · comments

Did you check the docs?

  • I have read all the docs.

Is your feature request related to a problem? Please describe.

Not really an issue, but sometimes I have to download my assignments in the form of a zip folder and I feel that it would be more convenient to unzip them from neo-tree rather than opening a terminal, cd to the directory, and unzip or 7z x the archive.

Describe the solution you'd like.

In the same way pressing d on a file brings up a "Are you sure you want to delete '{file/directory}'?" prompt, I envision pressing u or another key and a prompt comes up saying "Are you sure you want to unzip '{archive file}' ?" And then it unzips it in the current directory

Describe alternatives you've considered.

Manually cd, and then an unzip or 7z x, but that is annoying

Additional Context

No response

I actually figured out how to do:

unzip = function(state)
						local node = state.tree:get_node()
						local path = node:get_id()
						vim.api.nvim_input(":!unzip " .. path .. "<cr>")
					end,

But I still think native function with a check, and ability to unzip lots of different types of archive files is worth it.