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

learn more… | top users | synonyms

0
votes
0answers
15 views

Not able to see the file contents

I am using 12.04 Ubuntu cloud image.But when I am using vi for example vi p1.c to create a file I am not able to see what are the contents I am adding to it. But when I am using cat p1.c I am able to ...
9
votes
5answers
3k views

Will creating a text file in vi change my computer?

I know that Linux is an operating system built on text files. What I would like to do is create a file using vi of all the various commands I have learned. That way I could find each individual ...
1
vote
2answers
44 views

How to use `vi` when you've never used it before?

I'm using Ubuntu server edition to host a minecraft server, and I needed to changed the server properties, after using the command vi server.properties, I made the required change, but can't save ...
0
votes
0answers
19 views

can't use keyboard in Vi ubuntu serv.er

im installing ubuntu server in Vmware but now im having a problem with Vi. in console , i type normal but when i go into Vi application to edit something , my keyboard is not correct. i cant use "i" ...
3
votes
2answers
217 views

How to create php files in /var/www folder?

I am new to Ubuntu(Linux) and I am trying to create a php file in /var/www, file name hello.php. I am typing vi hello.php and then I write my code <?php......?>, however, when I am trying to ...
2
votes
1answer
66 views

Vi syntax highlighting for words followed by a parenthesis

I want to change the color of a keyword that is followed by a left parenthesis in a .R file. For instance, when I type length(), I want the word length to be highlighted (and not the parentheses), ...
0
votes
1answer
96 views

Working with plain vi not vim

I was trying to learn working with vi, the plain 'vi' that ships with most of the operating system, but that 'vi' seems to be missing lot of features. When I tried to excute ":ls", it gave me error ...
1
vote
0answers
23 views

pressing arrow keys in vi inserts alphabets? [duplicate]

I am new to vi editor.I am using to edit one of my file. But when i opened it through vi i can't edit it properly. when pressing arrowkeys it inserts ...
1
vote
2answers
248 views

Why ubuntu has vi , emacs ,nano with os default?

I am new to ubuntu ..So basically an OS has an app for a purpose.. But ubuntu has three basic text-editors..like nano, vi, emacs ... So what is the reason for that? and what are the advantages and ...
1
vote
1answer
218 views

vim NERDTree | Auto fresh the directory pane

How can you auto refresh the directory panes automatically in vim NERDTree? I know you can press R to refresh manually but I want to have it refresh automatically. This is particularly helpful when ...
1
vote
1answer
331 views

Error detected while processing /home/kiran/.vimrc:

I m getting an error message when I am opening vi editor. the error message is here. kiran@kiran-HP:~/Desktop$ vi hello.c Error detected while processing /home/kiran/.vimrc: line 1: E481: No range ...
21
votes
9answers
4k views

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

Why do I get these .vimrc errors in Ubuntu 14 after upgrade from Ubuntu 13?

I get errors for all these commands when I try to use vim (though vim then works): autocmd BufWritePre *.rb :%s/\s\+$//e set filetype off filetype plugin on filetype indent on syntax on " Turn on ...
9
votes
4answers
2k views

how to redirect bash command output to vim

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 ...
2
votes
1answer
947 views

Uninstalled vim, now can't install it again

I have removeded vim-tiny to get full installation following this tutorial and now I can't install vim by: $ sudo apt-get install vim Reading package lists... Done Building dependency tree ...
1
vote
2answers
60 views

how does ! effect sort in vim

I am trying to sort the contents in my text file using the command :1,$sort This results in lines arranged in order based on the starting character - symbols, capital letters and then small letters ...
3
votes
1answer
123 views

how to re-use last vi command

How does one re-use a just-executed command in vim? For example, I open a file with: vi myTestFile Then in normal mode, I search for a word using: /mysearchword\c <Enter> Now I want to ...
3
votes
1answer
692 views

vim command does not work

I am trying to open vim on my Ubuntu 14.04 64 bit by entering the command in the terminal : vim But i get the response : The program 'vim' can be found in the following packages: * vim * ...
0
votes
2answers
166 views

Can I write a file with only read permission?

I just set a read only permission to a file using chmod 400 filename.txt after that I open the file via vi editor and edit and try to save using :w then is says E45: 'readonly' option is set (add ! to ...
0
votes
0answers
30 views

key mismatch in vi editor

I have installed ubuntu 14.04 lts in my acer laptop. All the functions are working except vi editor. When I try to enter some text using vi editor,the responces are mismatching. For example when I ...
0
votes
0answers
77 views

How to clear the screen on vi exit?

In my experience on many different servers, vi has always cleared the screen when returning to the shell. But on my new Ubuntu VPS, it does not. The contents of the file stay on the screen until new ...
3
votes
2answers
134 views

Geany symbol menu in VIM

On the Geany editor there is symbol tab which when you pass one C program to Geany it shows all functions and classes and variables and macros in the list . So is there any ability like that in VIM? ...
15
votes
4answers
7k views

What does Vi stand for?

I was just wondering what "Vi" means in Linux (the command used for editing files)?
0
votes
1answer
85 views

show only few lines after match pattern found in vi editor

I would like to see only first 5 lines after the match found in vi editor. What is the command? I only know these commands /Incident Id: Gives all lines from first to last :g/Incident ID: gives ...
0
votes
3answers
76 views

Shell Commands for System Administration, and gudie to Vi editor [closed]

I'm very much interested in shell commands In fact,I know some basic commands. But I want to learn more about them. Are there any good resources? I'm interested to learn more about vi editor too.
5
votes
5answers
6k views

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

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?
2
votes
2answers
168 views

Unable to use 'vi' on Ubuntu 12.04

Whenever I try to open any text file using vi or vim, I get the following error, vim: error while loading shared libraries: libtcl8.5.so.0: cannot open shared object file: No such file or directory ...
0
votes
3answers
762 views

Unable to edit using vi

I'm trying to edit my /etc/network/interfaces file to add a line for a proxy server. I first "sudo su -" to be root, and then "vi /etc/network/interfaces". But once I'm in there, I'm unable to edit. ...
0
votes
1answer
87 views

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 ...
3
votes
3answers
669 views

Executing vi on directory does not list files

This seems like a new bug (feature ?) that’s creep into Ubuntu 13.10. When I execute vi on a directory it doesn't list the files which I can navigate to with the arrow keys; it just shows an empty ...
0
votes
1answer
336 views

Terminal/Putty showing control characters (^M) after updating

I updated my system yesterday afternoon using the recommended updates from Update Manager. After it completed, I shutdown my system and went home for the day. I come in this morning and I am getting ...
9
votes
3answers
16k views

Hitting arrow keys adds characters in vi editor [duplicate]

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 ...
1
vote
0answers
136 views

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

VI Editor messed up.. Even the old vi is not working now

I am a newbie in Ubuntu. I am using a Windows XP machine (32 bit) OS and in that I installed VMPlayer and got iso image of Ubuntu 12.04 (downloaded from online). I started the Ubuntu and everything ...
-2
votes
2answers
132 views

Is there a vi file editor in ubuntu like in unix?

I was a unix and redhat user, just started to use ubuntu. Is there a vi command to edit files? Is there a change mode command to change a file status to executable?
2
votes
3answers
522 views

Problem with text deletion in vi editor

When I am writing C code on the vi editor, I am not able to use the backspace keys or my arrow keys to delete or navigate through lines. Some unexpected special characters occur on the screen that is ...
0
votes
1answer
986 views

cannot type in vi when trying to edit the interfaces file

I am trying to edit the interfaces file so I can put in my network settings. This is what I'm typing: sudo vi /etc/network/interfaces The file pulls up fine. I seem to be able to delete all rows, ...
2
votes
1answer
658 views

Bash command-line in vi mode - command-line find/replace [duplicate]

New to linux :-) In my .bashrc I have set -o vi. That way when I'm in the terminal I can press CTRL +{ and then use VI commands to navigate, edit and search the command history. One thing I cannot ...
0
votes
2answers
183 views

Is using vi to view log files in PROD servers not recommended?

We have Ubuntu servers in production. Our lead architect tells me we should not use VI to view log files. Instead use cat. I want to know if there is any inherent risk associated with using vi/vim to ...
0
votes
1answer
2k views

Backspace and arrow keys not working in vi editor

The backspace is unable to erase the characters. The navigation keys produce alphabets. Can anyone tell me how to fix this?
2
votes
1answer
1k views

Solarized color name not defined

I recently installed the Solarized theme for gnome-terminal in Ubuntu 12.04, but now, every time I used vim, I receive the warning "Warning: Color name "S_base03" is not defined". This warning is ...
15
votes
3answers
27k 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
120 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 ...
4
votes
4answers
7k 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 ...
9
votes
1answer
4k 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 ...
2
votes
2answers
4k 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 ...
6
votes
2answers
420 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 ...
45
votes
7answers
114k 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.
8
votes
3answers
9k 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 ...