All Projects → lambdalisue → Suda.vim

lambdalisue / Suda.vim

Licence: mit
🥪 An alternative sudo.vim for Vim and Neovim, limited support sudo in Windows

Projects that are alternatives of or similar to Suda.vim

Dot Files
⚡️ Well documented, terminal centric web developer's dot files. Neovim, Zsh, Tmux, Git, etc.
Stars: ✭ 209 (-15.38%)
Mutual labels:  neovim
Vim Tmux Clipboard
seamless integration for vim and tmux's clipboard
Stars: ✭ 225 (-8.91%)
Mutual labels:  neovim
Rnvimr
Make Ranger running in a floating window to communicate with Neovim via RPC
Stars: ✭ 238 (-3.64%)
Mutual labels:  neovim
Vim Deep Space
An intergalactically friendly color scheme for Vim.
Stars: ✭ 214 (-13.36%)
Mutual labels:  neovim
Vim Sayonara
👺 Sane buffer/window deletion.
Stars: ✭ 219 (-11.34%)
Mutual labels:  neovim
Indent Blankline.nvim
Indent guides for Neovim
Stars: ✭ 203 (-17.81%)
Mutual labels:  neovim
Nvim Go
Go development plugin for Neovim written in pure Go
Stars: ✭ 207 (-16.19%)
Mutual labels:  neovim
Node Client
Nvim Node.js client and plugin host
Stars: ✭ 243 (-1.62%)
Mutual labels:  neovim
Neomake
Asynchronous linting and make framework for Neovim/Vim
Stars: ✭ 2,512 (+917%)
Mutual labels:  neovim
Vim Vsnip
Snippet plugin for vim/nvim that supports LSP/VSCode's snippet format.
Stars: ✭ 224 (-9.31%)
Mutual labels:  neovim
Dotfiles
My dotfiles repo, here you can find all my window manager configs as well as documentation and a guide on how to make your own desktop environment.
Stars: ✭ 208 (-15.79%)
Mutual labels:  neovim
Spaceline.vim
vim statusline like spacemacs
Stars: ✭ 216 (-12.55%)
Mutual labels:  neovim
Dot
These are my dot files. I've primarily been a MacOS user for most of the time I've been collecting dotfiles, but I've recently switched to Linux. I primarily use Arch, Arco, Manjaro, or some other Arch based distro; so that's where I take my que.
Stars: ✭ 232 (-6.07%)
Mutual labels:  neovim
Lush.nvim
Define Neovim themes as a DSL in lua, with real-time feedback.
Stars: ✭ 204 (-17.41%)
Mutual labels:  neovim
Async.vim
normalize async job control api for vim and neovim
Stars: ✭ 242 (-2.02%)
Mutual labels:  neovim
Nvim Hs
Neovim API for Haskell plugins as well as the plugin provider
Stars: ✭ 208 (-15.79%)
Mutual labels:  neovim
Vim Yoink
Vim plugin that maintains a yank history to cycle between when pasting
Stars: ✭ 225 (-8.91%)
Mutual labels:  neovim
Vim Ghost
Vim/Nvim client for GhostText - Edit browser text areas in Vim/Neovim
Stars: ✭ 245 (-0.81%)
Mutual labels:  neovim
Dotfiles
😈 Vim, git, zsh, tmux, and other goodies.
Stars: ✭ 240 (-2.83%)
Mutual labels:  neovim
Vim Lsp Cxx Highlight
Vim plugin for C/C++/ObjC semantic highlighting using cquery, ccls, or clangd
Stars: ✭ 231 (-6.48%)
Mutual labels:  neovim

🥪 suda.vim

MIT License Doc

suda is a plugin to read or write files with sudo command.

This plugin was built while :w !sudo tee % > /dev/null trick does not work on neovim.

https://github.com/neovim/neovim/issues/1716

This plugin is strongly inspired by sudo.vim but the interfaces was aggressively modified for modern Vim script.

Usage

Use SudaRead to open unreadable files like:

" Re-open a current file with sudo
:SudaRead

" Open /etc/sudoers with sudo
:SudaRead /etc/sudoers

Or SudaWrite to write unwritable files like:

" Forcedly save a current file with sudo
:SudaWrite

" Write contents to /etc/profile
:SudaWrite /etc/profile

You can change the prompt string with g:suda#prompt.

" 'Password' in french
let g:suda#prompt = 'Mot de passe: '

Smart edit

When 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.

In short,

$ vim /etc/hosts

or

:e /etc/shadow

Will open suda:///etc/hosts or suda:///etc/shadow instead of /etc/hosts or /etc/shadow because that files are not writable or not readable.

Windows

Install mattn/sudo to enable this plugin in Windows. Make sure that the following shows 1.

: echo executable('sudo')
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].