Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [vim]

Vim is an open-source text editor with a steep learning curve that leads to high efficiency in many tasks related to text edition. If you wish to start with vim, try to run “vimtutor”, which will teach you basic commands.

28
votes
4answers
7k views

vim re-edit as root

I often open a file in vim, make some changes and when it's time to save the file is read-only.. (owned by another user). I'm looking for tips on how I could re-open the file as root and keep my ...
21
votes
10answers
3k views

Suggestions for entries in a sysadmins .vimrc

At the very least I always uncomment "syntax on" in /etc/vim/vimrc
3
votes
1answer
1k views

Can vim execute buffer without addons?

If editing some script in vim, a file with .py or .sh extension, is it any build-in vim command that allows to run such file? I know it's a lot of IDE-like addons for VIM that allows to execute files ...
2
votes
1answer
998 views

Linode Lish Shell Vim and Nano rendering troubles: lines not appearing / cursor positions wrong

I'm using a linode VPS and I just cloned one of my servers to my development server as I've done many times before. As usual SSH is inaccessible until /etc/network/interfaces is correctly updated. I ...
3
votes
2answers
576 views

Setting a default vim filetype for syntax highlighting

How do I tell vim to automatically use a particular filetype (usually for syntax highlighting) when none is detected?
0
votes
2answers
253 views

Unable find the right encoding for a HTML -file in Vim

I see alt text http://files.getdropbox.com/u/175564/bug-enc.png where all contents is in one line. It seems that this is the reason of bad encoding. I can see the characters ^M. How can you get ...