Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggest a 'write read-only file' command #75

Closed
cuter44 opened this issue Jun 15, 2015 · 3 comments
Closed

suggest a 'write read-only file' command #75

cuter44 opened this issue Jun 15, 2015 · 3 comments

Comments

@cuter44
Copy link
Contributor

cuter44 commented Jun 15, 2015

Though not a basic command, but :w !sudo tee % is quite useful on Ubuntu.
Also some pseudo-commands are important but a hidden trick to newbie, such as 'enable line-no', 'enable syntax-highlight', 'change file type'... Maybe a new section is needed to include them.
Just depends on you. ╮(‾▽‾)╭

@rtorr
Copy link
Owner

rtorr commented Jun 15, 2015

I'm open to new suggestions, and welcome pull requests if you flush that idea out

@cascer1
Copy link
Contributor

cascer1 commented Oct 18, 2016

Wouldn't :w! also write a read-only file?

@cuter44
Copy link
Contributor Author

cuter44 commented Oct 18, 2016

@cascer1 :w! works only you are the owner of file, :w !sudo tee % always works if you are a sudoer(disregarding the ownership). As I just tested.
So these two may be used in different scenario, I think.
Anyway, thank you. You enlightened me. ("ㅍ‿ㅍ)

@rtorr rtorr closed this as completed Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants