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

建议, " :W to sudo & write a file #138

Open
e788b1 opened this issue Sep 12, 2015 · 1 comment
Open

建议, " :W to sudo & write a file #138

e788b1 opened this issue Sep 12, 2015 · 1 comment

Comments

@e788b1
Copy link

e788b1 commented Sep 12, 2015

" w!! to sudo & write a file
cmap w!! w !sudo tee >/dev/null %

下面这个比较好用, 建议替换

" :W to sudo & write a file
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
@wklken
Copy link
Owner

wklken commented Sep 13, 2015

我下个版本发布前看下, 感谢:)

the-eric-kwok added a commit to the-eric-kwok/k-vim that referenced this issue Oct 17, 2018
修改了 issue wklken#138 中提到的地方,优化了强制写入的命令
the-eric-kwok added a commit to the-eric-kwok/vim-for-server that referenced this issue Dec 4, 2018
参照 [#138](wklken/k-vim#138) 的建议,将 w!! 从 keymap 改成了 command,现在输入W或Wq即可强制保存(退出)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants