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

132 questions
342
votes
16 answers

Hitting arrow keys adds characters in vi editor

When I tried to use arrow keys in insert mode in vi editor the following characters are being inserted in the editor: for ↓ I get B, for ↑ I get A, for ← I get D, for → I get C. Please help me in resolve this problem.
bvb
  • 3,521
243
votes
13 answers

How to copy paste contents in the vi editor

I tried using Ctrl + V for pasting contents in a vi editor document, but Ctrl + V is not interpreted as a paste.
Rpj
  • 3,129
133
votes
7 answers

How do I redirect command output to vim in bash?

I am trying to redirect the output of a bash command into a new file. If I try the pipe as below : ls -la | vim Bash shows me the errors : Vim: Error reading input, exiting... Vim: preserving files... Vim: Finished. I know that I can open Vim and…
faizal
  • 3,037
123
votes
11 answers

vim is not remembering last position

My Ubuntu LTS 12.04 has vim editor. If I open a file, move to a paragraph and reopen vim, then the cursor goes to beginning of the file always. This is not the expected behavior. How the vim can remember last read position after closing a file? I…
101
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…
94
votes
7 answers

vi, getting multiple "Sorry, the command is not available in this version..." after reinstall

From my .vimrc, getting: line 16: E319: Sorry, the command is not available in this version: filetype on line 17: E319: Sorry, the command is not available in this version: filetype plugin on line 18: E319: Sorry, the command is not available…
73
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.…
36
votes
10 answers

What editor can I use as a simple vi/vim alternative?

I'm a Windows user coming to Ubuntu's Bash thanks to WSL. Now I need to edit some files and I really hate Vi. Do I just have to deal with it, or is there a simpler alternative? The features I am looking for are: CLI based easy to use (typing…
35
votes
5 answers

ubuntu terminal is not working properly in vi editor

Recently I installed ubuntu in my laptop for using c programming. but when I open the terminal and typed vi test.c, It open it but it will not work properly. when i pressed backspace it will not work and when i press arrow key it will print some…
Ashish
  • 451
29
votes
1 answer

What is '@!' file?

I have a filename @! in my home folder. When I open it, it has the same content that my other bash file myscript.sh has. I have not assign execute permission to original bash file. When I have checked properties, the only difference between two file…
d a i s y
  • 5,551
27
votes
3 answers

How to open two different files using the vi editor?

I have two files in different locations and I want to open these two files with the same vi command. How can I do it? File 1 location: /home/rs/rest.pl File 2 location: /home/dev/grd.pl
sandy
  • 273
26
votes
2 answers

Edit crontab with an editor other than the default

I would like to edit crontab with vi once. My default editor is nano, and I want to keep it that way. I only want to edit with vi one time. I don't want to change the default to vi then back to nano after editing. Can this be done?
D. Clancy
  • 261
25
votes
4 answers

What does Vi stand for?

I was just wondering what "Vi" means in Linux (the command used for editing files)?
Umair Ayub
  • 1,070
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
  • 216,643
22
votes
6 answers

How to make Vi default?

Apparently Ubuntu 11.10 uses Vim when I type vi filename How do I force Ubuntu to use Vi instead?
Pomario
  • 2,078
1
2 3
8 9