Top "Vi" questions

vi is a family of text mode-oriented text editors.

/etc/apt/sources.list" E212: Can't open file for writing

I am trying to edit sources.list using vi editor but getting the following error while saving the file: /etc/…

vi ubuntu-11.04
Find and replace strings in vim on multiple lines

I can do :%s/<search_string>/<replace_string>/g for replacing a string across a file, …

vim vi
Copy and paste content from one file to another file in vi

I am working with two files, and I need to copy a few lines from one file and paste into …

vim copy-paste vi cut
Vim delete blank lines

What command can I run to remove blank lines in Vim?

vim vi
Replace tabs with spaces in vim

I would like to convert tab to spaces in gVim. I added the following line to my _vimrc: set tabstop=2 …

vim vi
How can I delete multiple lines in vi?

I have tried to follow the following: How to delete selected text in VI editor but 5dd gives E492: Not …

vi
How do I fix the indentation of an entire file in Vi?

In Vim, what is the command to correct the indentation of all the lines? Often times I'll copy and paste …

vim vi indentation
Setting the Vim background colors

When I try to change the background colors in .vimrc or directly in Vim using the command: set background=dark ... …

linux background vim vi
How do I use vim registers?

I only know of one instance using registers is via CtrlR* whereby I paste text from a clipboard. What are …

vim vi
vi/vim editor, copy a block (not usual action)

In vi/vim editor, I need to copy a block. There are many ways, but one way is very quick. …

vim copy-paste vi