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

learn more… | top users | synonyms

0
votes
1answer
15 views

facing problems with vi editor in CLT

My keyboard keys are not working properly in Command line terminal when i use "vi" command to edit a file or write a program.backspace doesn't work. arrow keys doesn't work and are printing A B C D ...
0
votes
1answer
13 views

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

What is the difference between /: and : in vi? Is there a difference?
1
vote
1answer
192 views

How do I set line number in VI Editor [duplicate]

I am using the VI editor in Ubuntu and I have maximum usage of VI editor. to see the line number in vi i am using like below: :set nu I want to set it default when I open a file in vi editor, that ...
0
votes
1answer
85 views

Why is vi not working in Ubuntu 15.10? [closed]

I have recently downloaded Ubuntu 15.10 and i use vi command to create a new file and when I type i to get into insert mode, nothing happen. Can someone tell me why this happen and how to fix it?
0
votes
0answers
21 views

E:unable to locate package?

I have uploaded screen shot for better understanding. Let me know how to get rid of it?
0
votes
0answers
30 views
0
votes
1answer
40 views

Problem on terminal of Ubuntu 12.04 LTS [duplicate]

I installed Ubuntu 12.04 LTS in Windows 8.1 using vmware workstation. When I open a file in the terminal using vi filename.c, the arrow buttons will not work properly, pressing up arrow prints A, down ...
0
votes
1answer
101 views

Remap Caps Lock to Esc and Ctrl

After watching some videos about tmux and vim collaboration I wanna remap Caps Lock on my ubuntu. Remapping Caps Lock to Esc is easy I used gnome-tweak-tool, but now I wanna change Caps Lock ...
0
votes
2answers
50 views

apt-get problem and arrow

hey guys I am new to ubuntu I am trying to use the command "apt-get install vim" but it actually not installing I cannot understand what that means so i am copying it down what the terminal is ...
4
votes
4answers
213 views

How to copy a line in vi and paste it to console?

There is a text file with bash commands. Is there a way to copy a line from that file using vi and paste it to console? It may be nano as well. It is console only server installation. No mouse to be ...
1
vote
1answer
36 views

Vim in shell allows <alt>[a-z] to circumvent having to press <escape> to get out of INSERT mode. How can I apply this to Gui implimentations of Vim?

Vim in shell allows <alt>[a-z] to circumvent having to press Esc to get out of INSERT mode. For example, Open up a terminal and set its editing mode away from emacs, to vi set -o vi Now ...
0
votes
0answers
13 views

Key behaviour in vi editor [duplicate]

I have noticed strange key behaviour in my vi editor. During insert mode key Home returns cursor to line beginning (that was expected) and inserts one line above current one and writes letter H: ...
0
votes
1answer
252 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
84 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
78 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
48 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
2answers
487 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
59 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
97 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 ...
1
vote
1answer
47 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
4k 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
74 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 ...
3
votes
2answers
3k 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
142 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
240 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
24 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
524 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
809 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
1k 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
2k 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 ...
19
votes
4answers
6k views

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 ...
2
votes
1answer
2k 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
123 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
165 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
3k 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
458 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 ...
3
votes
2answers
173 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? ...
17
votes
4answers
11k views

What does Vi stand for?

I was just wondering what "Vi" means in Linux (the command used for editing files)?
0
votes
1answer
138 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
95 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
28k 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
2k 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
243 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
2k 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
114 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
1k 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
465 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 ...
26
votes
3answers
41k 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
166 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 ...