{"id":16139522,"url":"https://github.com/bergercookie/vim-deb-preview","last_synced_at":"2025-04-06T17:43:39.192Z","repository":{"id":78140283,"uuid":"250271100","full_name":"bergercookie/vim-deb-preview","owner":"bergercookie","description":"Preview debian packages with vim","archived":false,"fork":false,"pushed_at":"2024-06-12T10:09:36.000Z","size":2607,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T23:45:47.717Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bergercookie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-26T13:49:25.000Z","updated_at":"2024-06-12T10:09:39.000Z","dependencies_parsed_at":"2024-12-20T05:12:04.459Z","dependency_job_id":"1434a642-19c8-4c5a-81ff-6928841ca0a6","html_url":"https://github.com/bergercookie/vim-deb-preview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergercookie%2Fvim-deb-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergercookie%2Fvim-deb-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergercookie%2Fvim-deb-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergercookie%2Fvim-deb-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bergercookie","download_url":"https://codeload.github.com/bergercookie/vim-deb-preview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526675,"owners_count":20953141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T23:49:15.284Z","updated_at":"2025-04-06T17:43:39.170Z","avatar_url":"https://github.com/bergercookie.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deb-preview\n\n```\n\n\n     _      _                                _\n  __| | ___| |__        _ __  _ __ _____   _(_) _____      __\n / _` |/ _ \\ '_ \\ _____| '_ \\| '__/ _ \\ \\ / / |/ _ \\ \\ /\\ / /\n| (_| |  __/ |_) |_____| |_) | | |  __/\\ V /| |  __/\\ V  V /\n \\__,_|\\___|_.__/      | .__/|_|  \\___| \\_/ |_|\\___| \\_/\\_/\n                       |_|\n\n\n```\n\n## Description\n\nI always loved the zip / tar plugins of vim, where you would just point vim to\nan archive and it would show you its contents. However, there's nothing like\nthis when working with Debian packages even though they're not that different\nthan regular tarballs.\n\nCurrent vim/neovim plugin offers an archive-like preview of Debian packages in\nvim. On top of that it lets you edit the contents of the Debian package and if\nit detects modifications, it repackages the Debian package and if it finds an\n`md5sums` file in the package, recalculates all hashes and replaces that file.\n\n## Usage:\n\nJust point vim to a Debian package and it will list its contents automatically\n```\nvim \u003cpath-to-debian-package.deb\u003e\n\n```\n## Demo\n\nHere's a demo of the plugin, where I view a debian package, make a modification\nto one of the files and then, on exit, `deb-preview` repackages the deb package\ninto `\u003coriginal-name.deb\u003e.new`.\n\n![](/misc/demo.gif)\n\nHere's also a demo of the plugin where I modify the metadata (CONTROL file)\n\n![](/misc/demo2.gif)\n\n## Features\n\n* View contents of a Debian package.\n* Navigate and inspect directories/files of the Debian package\n* Edit the contents of a Debian package and repackage automatically on exit\n\n## Options\n\n```vim\n\" Set to 1 to overwrite .deb file in case of modifications [default=0]\nlet g:debpreview_overwrite = 1\n\" Set to the desired extension. deb-preview will use this extension when\n\" repackaging in case of modifications. In effect only when\n\" g:debpreview_overwrite if 0.\nlet g:debpreview_newdebfile_ext =\".new\"\n```\n\n## FAQ\n\n### How do I navigate the debian package, edit files, copy, rename files etc?\n\nSpend some time familiarising with\n[netrw](https://www.vim.org/scripts/script.php?script_id=1075). It's the default\nvim tool for navigating and manipulating directories. Here's an excellent\ncheatsheet with many of its options:\nhttps://gist.github.com/danidiaz/37a69305e2ed3319bfff9631175c5d0f\n\n### I just don't like navigating the debian package with `netrw`\n\nYou can always switch to using ranger instead. Install\n[Ranger](https://en.wikipedia.org/wiki/Ranger_(file_manager)) as well as the\n[ranger.vim](https://github.com/francoiscabrol/ranger.vim) plugin. Make sure you\nconfigure it to [open directories with ranger.vim by\ndefault](https://github.com/francoiscabrol/ranger.vim#opening-ranger-instead-of-netrw-when-you-open-a-directory)\nand `vim-deb-preview` will use ranger.\n\n\n## Installation\n\nPlatform: Linux Debian Flavors (Ubuntu, Debian etc.)\n\n| Plugin manager | How to install |\n| :------------- | :------------- |\n| [Dein][1] | `call dein#add('bergercookie/vim-deb-preview')` |\n| [minpac][2] | `call minpac#add('bergercookie/vim-deb-preview')` |\n| [Pathogen][3] | `git clone https://github.com/bergercookie/vim-deb-preview.git ~/.vim/bundle/vim-deb-preview` |\n| [Plug][4] | `Plug 'bergercookie/vim-deb-preview'` |\n| [Vundle][5] | `Plugin 'bergercookie/vim-deb-preview'` |\n| manual | copy all of the files into their corresponding directories under `.vim` directory (or `~/.config/nvim` if you're using neovim)|\n\n[1]: https://github.com/Shougo/dein.vim\n[2]: https://github.com/k-takata/minpac\n[3]: https://github.com/tpope/vim-pathogen\n[4]: https://github.com/junegunn/vim-plug\n[5]: https://github.com/VundleVim/Vundle.vim\n\n### Dependencies\n\ndebugstring depends on the following binaries on linux:\n\n* `dpkg-deb`\n* `fakeroot`\n* `awk`\n* `md5sum`\n\nOn ubuntu this should take care of the installation:\n\n```\nsudo apt install dpkg-deb fakeroot awk md5sum\n```\n\n## License\n\nCurrent plugin is distributed under the same terms as Vim itself. See the\n[LICENSE](https://github.com/bergercookie/vim-dpkg-preview/blob/master/LICENSE)\nfile\n\n## TODO\n\n- [ ] Handle error codes from `system()` commands\n- [ ] Use fakeroot - handle permissions issue and verify it's working fine.\n\n## Self Promotion\n\nIn case you like the plugin, you might as well [star it on\nGithub](https://github.com/bergercookie/vim-dpkg-preview) or [rate it on\nvim.org](TODO) TODO. Also feel free to check my [other\nplugins](https://github.com/bergercookie?tab=repositories)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbergercookie%2Fvim-deb-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbergercookie%2Fvim-deb-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbergercookie%2Fvim-deb-preview/lists"}