Questions tagged [vi]

Questions about the text editor "vi"

"Vi" is a screen-oriented text editor originally created for the Unix operating system.

The portable subset of the behaviour of vi and programs based on it, and the ex editor language supported within these programs, is described by (and thus standardised by) the Single Unix Specification and POSIX.

The name vi is derived from the shortest unambiguous abbreviation for the command visual in ex; the command in question switches the line editor ex to visual mode.

bib ref : From Wikipedia, the free encyclopedia

131 questions
98
votes
4 answers

Backspace in insert mode in vi doesn't erase the character

I am new to vi, actually I have started learning vi from today and I have got stuck at the behavior of the backspace key. Actually when I fired up vi on my Ubuntu 12.04 for the first time my backspace key was working normally but after that it has…
Saprativa Bhattacharjee
  • 1,337
  • 3
  • 11
  • 10
64
votes
6 answers

How do I install and get started with vim/vi?

I really hope someone on this subject can help me. I recently enrolled for a programming course and one subject requires me to program in c/c++ on Linux os. I've had previous c++ experience on the .net framework building console apps and winforms.…
user3306195
  • 657
  • 1
  • 5
  • 3
23
votes
10 answers

Are there cases where vi is the only option?

Are there scenarios where vi is the only option to create, edit or modify a file in an Ubuntu environment? My question is basically to really know if there is such a case where I would be forced to use vi because it would be the only option…
Luis Alvarado
  • 211,503
9
votes
1 answer

How to remove carriage return in vi

I have a file that's failing due to a single carriage return at the end (0x0D). It was originally a carriage return/new line combination (0x0D, 0x0A). I've tried: deleting it in INSERT mode (deletes the last printing character and leaves the…
CJ Dennis
  • 453
8
votes
3 answers

Using vi to edit a file in terminal

I have a question, I have installed Ubuntu 14.04 and on this machine is icinga software. when I opened the terminal and typed: sudo vi /etc/icinga/objects/localhost.cfg then the terminal opened the file, but I can't type in this file. When I type…
7
votes
0 answers

How to edit a file in vi editor (arrow keys prints letters)?

I am open a file in vi: vi index.php Here the problem is: when I press the down arrow and it prints 'B'. Why it prints 'B'?
naveen
  • 8,057
  • 4
  • 15
  • 14
6
votes
1 answer

How to uninstall the vi text editor preinstalled in Ubuntu?

I would like to uninstall the vi text editor which is pre-installed in Ubuntu. How would I achieve that?
3
votes
2 answers

What is the difference between /: and : in vi?

Is the a difference between /: and : in vi?
JJA
  • 31
3
votes
2 answers

Problem with `vi` editor

When I open a new file using vi command: vi After entering into file and typing the data I am getting the characters like A, B, C, D when I use <, > arrows in order to move up the line or down the line
user821483
1
vote
0 answers

backspace in vi editor in ubuntu12.04.2 LTS doesn't work

As we know that vi editor has three modes namely: command mode,input mode & ex mode.By default,we get the command mode when the editor is evoked. Also we can navigate to other modes by using suitable commands like "i",":" etc. My problem is that…
rosemary
  • 111
0
votes
3 answers

How to replace a word using "vi editor"?

I have here a sample text file called employees.txt. It contains the name, streets and cities of the employees. My question is: How can I replace all city instances of "Victoria" with "City of Victoria". Only the city is affected, not places like…
-1
votes
2 answers

vi settings look off in 16.04

After starting to use Ubuntu 16.04, I find that many reasonable vi settings are off (before that I was on Scientific Linux, don't remember which version). This includes things like language highlighting, remembering the cursor's last line, search…
Helen
  • 101
  • 9
-1
votes
1 answer

What do these vi commands do?

The first one is: .,+15s/first/second/g I know that the . simply repeats the last operation but i'm not familiar with the rest of it. The other vi command I would like to know is: 10yy (followed by) p