Skip to main content
added 372 characters in body
Source Link
antony
  • 161
  • 1
  • 7

I know that vim can open files within zip or tar{,.gz} archives interactively: open the archive first, then navigate to the correct entry and press enter.

lesspipe (https://github.com/wofr06/lesspipe) (which is a preprocessor for less) provides the additional convenience of allowing one to directly input both the archive name and the name of the file within the archive at the same time (less foo.tgz:file-within-foo) (yes, I know, such a scheme leads, in theory, to issues with files containing colons in their names; in practice this is rare...). I was wondering if a similar ability was available (perhaps as a plugin) for vim.

Clarification: Fundamentally, what I'm asking for should be "relatively" simple (and mostly focused on a usability POV), because most of the archive-handling ability is actually already present in vim: I am just looking for a plugin that will transform, say, vim foo.tgz:file-within to vim foo.tgz followed by selecting file-within in the listing offered by vim.

I know that vim can open files within zip or tar{,.gz} archives interactively: open the archive first, then navigate to the correct entry and press enter.

lesspipe (https://github.com/wofr06/lesspipe) (which is a preprocessor for less) provides the additional convenience of allowing one to directly input both the archive name and the name of the file within the archive at the same time (less foo.tgz:file-within-foo) (yes, I know, such a scheme leads, in theory, to issues with files containing colons in their names; in practice this is rare...). I was wondering if a similar ability was available (perhaps as a plugin) for vim.

I know that vim can open files within zip or tar{,.gz} archives interactively: open the archive first, then navigate to the correct entry and press enter.

lesspipe (https://github.com/wofr06/lesspipe) (which is a preprocessor for less) provides the additional convenience of allowing one to directly input both the archive name and the name of the file within the archive at the same time (less foo.tgz:file-within-foo) (yes, I know, such a scheme leads, in theory, to issues with files containing colons in their names; in practice this is rare...). I was wondering if a similar ability was available (perhaps as a plugin) for vim.

Clarification: Fundamentally, what I'm asking for should be "relatively" simple (and mostly focused on a usability POV), because most of the archive-handling ability is actually already present in vim: I am just looking for a plugin that will transform, say, vim foo.tgz:file-within to vim foo.tgz followed by selecting file-within in the listing offered by vim.

edited tags
Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k
Source Link
antony
  • 161
  • 1
  • 7

Opening files within archives from vim

I know that vim can open files within zip or tar{,.gz} archives interactively: open the archive first, then navigate to the correct entry and press enter.

lesspipe (https://github.com/wofr06/lesspipe) (which is a preprocessor for less) provides the additional convenience of allowing one to directly input both the archive name and the name of the file within the archive at the same time (less foo.tgz:file-within-foo) (yes, I know, such a scheme leads, in theory, to issues with files containing colons in their names; in practice this is rare...). I was wondering if a similar ability was available (perhaps as a plugin) for vim.