[vim/vim] runtime(zip)!: Customizable zip/unzip commands (PR #20832)
curbe454 (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/[email protected]> |
I'd like to change another program other than `zip`/`unzip` to open a zip file such as `7z`.
According to the [doc](https://github.com/vim/vim/blob/975e191dc817d8d00abca7197c4529a417c2f805/runtime/doc/pi_zip.txt#L51:L66), I changed the global variable `g:zip_unzipcmd` in my `.vimrc`:
```vim
let g:zip_unzipcmd = "7z"
```
It didn't work. This is because this plugin is primarily only for these two `zip` and `unzip` binary executable files, with some CLI options hard encoded. For example, [this below codes in `runtime/autoload/zip.vim`](https://github.com/vim/vim/blob/975e191dc817d8d00abca7197c4529a417c2f805/runtime/autoload/zip.vim#L252):
```vim
let gnu_cmd = "keepj sil r! " . g:zip_unzipcmd . " -Z1 -- " . s:Escape(a:zipfile, 1)
```
**In this pr, these hard coded options are eliminated, so that users can choose their program to open `.zip` files.**
You can view, comment on, or merge this pull request online at:
https://github.com/vim/vim/pull/20832
-- Commit Summary --
* runtime(zip)!: Customizable zip/unzip commands
-- File Changes --
M runtime/autoload/zip.vim (78)
M src/testdir/test_plugin_zip.vim (20)
-- Patch Links --
https://github.com/vim/vim/pull/20832.patch
https://github.com/vim/vim/pull/20832.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20832
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/pull/[email protected]>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20832%40github.com.