{"id":9407104,"url":"https://github.com/lambdalisue/vim-suda","last_synced_at":"2025-04-10T06:18:55.816Z","repository":{"id":37484576,"uuid":"111917273","full_name":"lambdalisue/vim-suda","owner":"lambdalisue","description":"🥪 An alternative sudo.vim for Vim and Neovim, limited support sudo in Windows","archived":false,"fork":false,"pushed_at":"2024-12-08T03:53:55.000Z","size":81,"stargazers_count":767,"open_issues_count":9,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-03T03:57:40.186Z","etag":null,"topics":["neovim","sudo","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdalisue.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},"funding":{"github":"lambdalisue"}},"created_at":"2017-11-24T12:41:48.000Z","updated_at":"2025-03-30T18:01:55.000Z","dependencies_parsed_at":"2024-01-16T07:23:11.139Z","dependency_job_id":"f458acf4-aae7-41a9-9e33-29d8615d7629","html_url":"https://github.com/lambdalisue/vim-suda","commit_stats":{"total_commits":65,"total_committers":10,"mean_commits":6.5,"dds":0.5692307692307692,"last_synced_commit":"08abd39dfe1cee681b8ce3e7321da5fa03e045c1"},"previous_names":["lambdalisue/vim-suda","lambdalisue/suda.vim"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fvim-suda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fvim-suda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fvim-suda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fvim-suda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdalisue","download_url":"https://codeload.github.com/lambdalisue/vim-suda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166864,"owners_count":21058481,"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":["neovim","sudo","vim"],"created_at":"2024-05-10T18:03:57.527Z","updated_at":"2025-04-10T06:18:55.798Z","avatar_url":"https://github.com/lambdalisue.png","language":"Vim Script","funding_links":["https://github.com/sponsors/lambdalisue"],"categories":["HarmonyOS","Vim Script"],"sub_categories":["Windows Manager"],"readme":"# 🥪 suda.vim\n\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)\n[![Doc](https://img.shields.io/badge/doc-%3Ah%20suda-orange.svg?style=flat-square)](doc/suda.txt)\n\n_suda_ is a plugin to read or write files with `sudo` command.\n\nThis plugin was built while `:w !sudo tee % \u003e /dev/null` trick does not work on [neovim][].\n\nhttps://github.com/neovim/neovim/issues/1716\n\nThis plugin is strongly inspired by [sudo.vim][] but the interfaces was aggressively modified for modern Vim script.\n\n[sudo.vim]: https://github.com/vim-scripts/sudo.vim\n[neovim]: https://github.com/neovim/neovim\n\n## Usage\n\nUse `SudaRead` to open unreadable files like:\n\n```\n\" Re-open a current file with sudo\n:SudaRead\n\n\" Open /etc/sudoers with sudo\n:SudaRead /etc/sudoers\n```\n\nOr `SudaWrite` to write unwritable files like:\n\n```\n\" Forcedly save a current file with sudo\n:SudaWrite\n\n\" Write contents to /etc/profile\n:SudaWrite /etc/profile\n```\n\nYou can change the prompt string with `g:suda#prompt`.\n\n```vim\n\" 'Password' in french\nlet g:suda#prompt = 'Mot de passe: '\n```\n\n### Smart edit\n\nWhen `let g:suda_smart_edit = 1` is written in your vimrc, suda automatically switch a buffer name when the target file is not readable or writable.\n\nIn short,\n\n```\n$ vim /etc/hosts\n```\n\nor\n\n```\n:e /etc/shadow\n```\n\nWill open `suda:///etc/hosts` or `suda:///etc/shadow` instead of `/etc/hosts` or `/etc/shadow` because that files are not writable or not readable.\n\n### Windows\n\nInstall [mattn/sudo](https://github.com/mattn/sudo) or [gerardog/gsudo](https://github.com/gerardog/gsudo) to enable this plugin in Windows.\nMake sure that the following shows `1`.\n\n```vim\n: echo executable('sudo')\n```\n\n### Use sudo without a password\n\nWhen `let g:suda#noninteractive = 1` is written in your vimrc, suda won't ask you for a password. Use at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalisue%2Fvim-suda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdalisue%2Fvim-suda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalisue%2Fvim-suda/lists"}