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

learn more… | top users | synonyms

0
votes
1answer
241 views

vi is coded and I cannot read it

I don't know why, but my vi editor seems to be encrypted. This is the test I ran. gnome-open /usr/share/doc/xdemorse/examples/xdemorserc.example.gz When I did this I could read it just fine. ...
0
votes
2answers
23 views

vim mapping from q! to Q!

I was trying to map 'q!' to 'Q!' in .vimrc ? I tried the following but not working. :command Q! q! Please provide any suggestion to mitigate this issue. Thank you.
2
votes
2answers
40 views

Remove vim indents when I paste directly from system clipboard

I have a problem with vim when I paste something it puts them in by placing in each newline. How can I set default settings of vim.
1
vote
1answer
30 views

plain text can be enctypted like password in vi editor? [duplicate]

Can anyone tell me, How to plain text can be enctypted like password (********) in vi editor or using vi editor or any other method ?
1
vote
1answer
56 views

Using “dd” in Vi (delete multi lines) not accepted if number of lines > file length

I often edit a file locally then cut and paste it into a remote ssh session inside a vi session. The first step is to delete the entire contents by doing something like 9999dd Which will delete ...
0
votes
1answer
25 views

How to make geany or vi understand Maxima (or any other less known) syntax

I tend to program a lot in a symbolic language called Maxima, but I haven't found any editor that highlights its syntax. Is there I way I can make vi or geany (or whatever) understand this syntax and ...
1
vote
1answer
27 views

Vim not displaying Input mode (14.04)

When I open up the Vim editor, it's supposed to show at the bottom of the screen whether I'm in Input mode or not. But it stays blank whether I'm in Command mode or in Input mode. Also, vimtutor ...
0
votes
0answers
20 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
59 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
24 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
512 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
78 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
131 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
343 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 ...
2
votes
1answer
403 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
627 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
1k 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 ...
10
votes
4answers
3k 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
1k 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
82 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
130 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
1k 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
279 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
37 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 ...
3
votes
2answers
145 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? ...
16
votes
4answers
8k views

What does Vi stand for?

I was just wondering what "Vi" means in Linux (the command used for editing files)?
0
votes
1answer
98 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
83 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
10k 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
749 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
197 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
1k 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
92 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
807 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
370 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 ...
12
votes
3answers
22k 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
148 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
391 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
138 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
602 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
1k 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
828 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
228 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 ...
17
votes
3answers
35k 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
133 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 ...