Questions about the text editor "vi" or "vim"

learn more… | top users | synonyms

6
votes
2answers
162 views

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 ...
0
votes
1answer
16 views

Getting VI to auto syntax highlight and autoindent

I prefer using vi from tty1 as I hate GUI. I've just begun programming in C and would like to know how to get vi to auto indent for me. I would like the following code to appear just like the way I've ...
1
vote
1answer
36 views

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 ...
3
votes
1answer
40 views

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 ...
0
votes
0answers
26 views

Search and Replace in vi is not working

I execute the following command in vi for search and replace:- s/(searchPageEnhancements)?"|":((!isFirst)?" | ":"")/(searchPageEnhancements && ...
1
vote
1answer
273 views

How to delete the .swp files when working remotely

I opened a file in vi, but unfortunately while changing it the terminal crashed. Now when I Try to open the same file again in a new session it displays the following message E325: ATTENTION Found a ...
5
votes
2answers
106 views

Terminal got hanged when editing something in vi

I was making some changes to a remote file in vi using the terminal when I accidently pressed Ctrl+S instead of :wq. Now everything got hanged. I tried Escape,:q! and all sorts of vi commans but ...
23
votes
6answers
2k views

How to copy paste contents in VI editor?

I tried using CTRL + V for pasting contents in a VI editor document, but CTRL + V is not interpreted as a paste.
3
votes
2answers
413 views

Vi - Insert mode doesn't work in ubuntu 12.10

I am working on ubuntu 12.10, and my insert mode in vi isn't working. When I hit i to go insert mode, nothing happens. On hitting i again writes i on terminal, but <-backspace doesn't remove ...
4
votes
3answers
138 views

How do I save files edited with vim?

I can't save changes after editing sudo vi /etc/network/interfaces Text before editing: auto lo iface lo inet ... Edited to: auto eth0 iface eth0 inet dhcp What key combination or sequence ...
2
votes
2answers
56 views

use output from alias command as filename to open in vi

I set up an alias this morning to help finding the latest log file in a directory. My alias looks like alias latest="ls -lat | grep ^- | awk '{print \$8}' | head -1" In my research so far this ...
3
votes
3answers
245 views

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 ...
0
votes
2answers
350 views

How to edit a file in vi editor? [closed]

i am open the index.php in vi vi index.php new pressed the 'i' mode after that i want to go the next line is there any solution to go specified position . Here the problem is i am press the down ...
-3
votes
1answer
39 views

UNIX or Vi fixing list [closed]

this is in a file called numbers.txt in the current working directory. Starting from a UNIX prompt, give the sequence of UNIX/vi commands, that will "fix" the list of numbers in as few keystrokes as ...
3
votes
2answers
215 views

.viminfo owned by root?

The .viminfo file in my home directory is owned by root. Could anyone please explain how that could have happened without me asking it? $ ls -la | grep .viminfo -rw------- 1 root root 4175 ...
1
vote
1answer
539 views

Problem with Vi editor

I am using Vi editor on my desktop Ubuntu 12.04, and do no have any problems. But a few days ago, I installed Vi editor to my beagleboard-xm which has both Angstrom and Ubuntu 12.04 available but ...
1
vote
1answer
292 views

How to open a file when 'vi' reports it is already open?

For some reason, when I am trying to edit vi .profile, the terminal keeps telling me that I already have the .profile in the edit mode. E325: ATTENTION Found a swap file by the name ".profile.swp" ...
0
votes
1answer
217 views

Writable permission is not writable

I am running Ubuntu 12.04 x64 server on ext4 partition. I set a directory's permission to '766' as below. sudo chmod 766 /archive drwxrw-rw- 3 root root 4096 Sep 27 10:50 archive/ But, when I ...
4
votes
2answers
323 views

Copy command from vi to clipboard

What is the command to copy all the contents to the system clipboard from a file open in an instance of the vi editor on a remote server, accessed via SSH. Also, what is the shortcut for pasting from ...
0
votes
0answers
110 views

Auto-Tab completion not working in vi effectively

The Tab functionality to auto_complete the file names doesn't work when i try to run java programs with java command (have to type in the complete filename) but it's working fine when I am compiling ...
1
vote
4answers
258 views

Cannot execute shell /bin/zsh when execute a shell command in vi

I use bash. But it cannot find zsh. How to change this? ps:I don't want to install zsh.
1
vote
0answers
119 views

Converting Vim Syntax Highlight For Gedit

I found a Custom Syntax For Vim. How can i use it with gedit? http://dl.dropbox.com/u/32657135/alderz-smali-vim-ae77727.zip
10
votes
5answers
925 views

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?