Vi is a screen-oriented text editor originally created for the Unix operating system.

learn more… | top users | synonyms

-1
votes
1answer
22 views

Why does nvi think I have files being editing?

I've got a couple of FreeBSD servers that throw several copies of the following error on reboot: On Wed Oct 10 15:13:16 2012, the user root was editing a file named /tmp/crontab.s00huOAZD2 on the ...
1
vote
1answer
33 views

Modifying xml definition of a running KVM domain via script

How can I modify the xml definition of a VM over ssh? I know that I can do this interactively by logging into the host and using: virsh edit <domain name> But I want to automate this ...
4
votes
1answer
276 views

Linux: Lost internet while using vipw. How can I unlock the file?

I was editing the passwd file with vipw, when I briefly lost internet connectivity. When I logged back in and tried to edit again I get the error: vipw: Couldn't lock file: Interrupted system call ...
-1
votes
1answer
99 views

is it possible to know whether someone else has opened file in ec2-linux [closed]

We guys work collaboratively. Sometimes more then 1 have opened same file in vi editor. Can I know there who else has opened that file in amazon ec2 instance? Also if I can know what changes made by ...
-2
votes
1answer
191 views

Unable to set a cron job in Centos [closed]

I recently got an VPS to experiment, I have installed Centos and is trying to see if I can setup hostbill and run it from there. The installation all worked out well but I am stumped when it comes to ...
-3
votes
1answer
94 views

editing files on remote server with Vi not recognised when I refresh my browser [closed]

My server is running on Apache Linux. I'm very new to this area. Is there a default folder where the website files are stored? I mean I thought I had it - the first one in the list below, but it ...
1
vote
5answers
556 views

Is there an option to open file with line number from command line in 'vi'?

I've seen so many examples/usages about how to display/hide line numbers in vi edit mode. To turn on line numbers: Type :set number in edit mode To turn off line numbers: Type :set nonumber in edit ...
0
votes
1answer
69 views

how to monitor any changes to any file by using vi command

Im looking for a tools (script) for monitoring my systems for any changes on any files by using vi command. For example: one dba open alert.log with vi and modify it and save.. i need to trace these ...
4
votes
2answers
174 views

best ways allowing a group to edit some /etc files

we have a group called JBossAdmins and users of this group must edit some /etc files on a RHEL 6: /etc/httpd/* /etc/java/* /etc/jboss/* my first idea was to give the following sudo permissions: ...
2
votes
1answer
587 views

Linode Lish Shell Vim and Nano rendering troubles: lines not appearing / cursor positions wrong

I'm using a linode VPS and I just cloned one of my servers to my development server as I've done many times before. As usual SSH is inaccessible until /etc/network/interfaces is correctly updated. I ...
2
votes
5answers
352 views

Textmate alternative with vim?

Is there a way to use the vim editor like the mac textmate editor ? I am searching a easy configuration or plugin. a split screen or a panel for directorys currently opend files or many cool ...
7
votes
3answers
7k views

How to enable color in Vim over SSH?

I have two remote servers: Server 1: Linux 2.6.18-238.12.1.el5PAE i686 / VIM - Vi IMproved - version 7.0.237 Server 2: Linux 2.6.18-338.19.1.el5.lve0.8.36 x86_64 / VIM - Vi IMproved version 7.0.237 ...
-2
votes
1answer
168 views

Vi how to search for numbers [closed]

I want to search for the occurrence of 100169200 I typed /100169200 but vi says Pattern not found Edit Since the question has been downvotes, I would like to make it clear that grep can find the ...
4
votes
2answers
14k views

How to save + close file when editing in bash?

OK - I am linux newbie - I am trying to edit a file from bash via edit <filename> command in whatever the default mode is (I am assuming 'vi'?). Problem is for the hell of me I cannot how to ...
2
votes
2answers
64 views

How to keep the top lines of a file while scrolling down the page in vi editor

I have a file opened with vim, how do I keep the top 10 header lines at the top all the time while I scroll down the page?
0
votes
2answers
728 views

cat or vi a file, hangs

we're having some issue on a SUN 5.8 machine. first of all, the server is on his network (i.e. 10.x.x.x) and we can login using an ssh server which is on another network (196.x.x.x), so there're ...
1
vote
3answers
158 views

alias to replace a text in file

here is a practical situation.I facing some of my files where there is a common string in these files.I usually will open vi and do some thing like :%s/text/replacement/g and I have to do it in ...
3
votes
1answer
226 views

Command output in vi editor

I open a text file using vi editor in linux and want to insert date command output without exiting vi editor. What is the trick? Thanks
8
votes
3answers
653 views

Can I log vi activity?

Is there any method to log vi activities? I suspect that another user is issuing command by going into the shell inside the vi editor, apparently those command doesn't record into history. Thanks
1
vote
4answers
829 views

How to set up “vi” shell environment as default

It could by silly question, but I can not find answer anywhere. So, I'd like to use vi (you know set -o vi can do the trick) as default in my shell instead of emacs, but I do not want to put it into ...
2
votes
2answers
636 views

ctrl-v key on AIX

I'm new to AIX and I miss some tricks that work well on other *nix flavors. I need a CTRL sequence in a ksh scripts, like ^[ (CTRL-[) and to do that I'm habit to use the ctrl-v[ , but here it doesn't ...
15
votes
6answers
7k views

Why do I not have syntax highlighting when I sudo vi <filename>?

I don't understand how to allow syntax highlighting in files I'm editing via vi when using sudo. When I 'sudo vi ' the terminal is only black & white of my terminal settings. In vi if I enter ...
1
vote
4answers
661 views

Is linux VI editor different from vim editor

I want to use one editor which is available across all the system. Someone told me VIM is best and i tried on ubuntu and VIM was not there but vi is there. SO which one should i use
3
votes
3answers
798 views

How to use cursor keys in vi under screen?

If you run vi/vim in screen, when you press a cursor in insert mode, you get a new line + a character, which is a pain. Configure vim to move around instead.
17
votes
4answers
11k views

How to make a global ~/.vimrc?

Right now, I make everyone do ~/.vimrc and put their settings there. How can I make a global, default .vimrc for new users? Edit: I am using CentOS
0
votes
7answers
854 views

vi syntax to comment out non-commented lines (cron)

Anyone know if it's possible in vi to replace only uncommented/non-blank lines with comments? If I want to replace a commented line with something I know I can use :%s/^#/##foo##/g -- but I am ...
1
vote
4answers
1k views

how do I use the # key in vi?

How can I make a number sign show up???
2
votes
3answers
2k views

VI Editor on Ubuntu using VIM Short Cuts?

I installed Ubuntu and I tried to use the terminal's vi editor. The editor is using a different set of short cut keys that I'm not familiar with. Someone told me it's probably using the VIM short ...
13
votes
4answers
3k views

Save file after forgetting to open as root / sudo vi [duplicate]

Possible Duplicate: vim re-edit as root I could have sworn I saw this question asked. But after looking though every search result for "vi" I'm stumped/lazy. I've opened a file, made an edit ...
3
votes
1answer
864 views

Can vim execute buffer without addons?

If editing some script in vim, a file with .py or .sh extension, is it any build-in vim command that allows to run such file? I know it's a lot of IDE-like addons for VIM that allows to execute files ...
3
votes
3answers
2k views

bad interpreter: Text file busy

For ages I've gotten used to editing Perl CGI scripts in "vi" and simultaneously having a browser open to test them. Lately, I've been getting "500" server errors when I do that, and when I run the ...
3
votes
4answers
7k views

Change default crontab editor to nano in FreeBSD

When I edit the crontab using crontab -e it opens the crontab in vi. I'd prefer it to use nano. How can I change this? EDIT: For some reason the export command returns command not found. And ...