r/programming • u/variance_explained • May 23 '17
Stack Overflow: Helping One Million Developers Exit Vim
https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
9.2k
Upvotes
View all comments
Show parent comment
7
u/nabrok May 24 '17
:! - run the following command
sudo - run the next thing as the root user
/bin/bash - open a shell
So this doesn't close vim but it does open a new shell with root priveleges on top of vim.
You could also use :! sudo -s