29

I made a small plugin that other people might find handy. It checks if the file open in the current buffer has write access and if not, prompts for sudo (or any other command at your choice) and copies the file.

No longer do you need to care about forgetting to use sudoedit or anything else, just edit the files you want to edit! This could change the world!!1!

But in all seriousness, this is my first neovim plugin and I barely spent an hour on it but it's simple and it gets the job done. It scratches a minor itch and maybe you'll also find it useful.

top 1 comments
sorted by: hot top controversial new old
[-] lakemalcom10@lemm.ee 5 points 2 weeks ago

cmap w!! w !sudo tee > /dev/null %

this post was submitted on 20 Jun 2024
29 points (96.8% liked)

Neovim

1967 readers
53 users here now

founded 1 year ago
MODERATORS