vi is a text editor of the Unix operating system.

learn more… | top users | synonyms

5
votes
1answer
715 views

Close VIM session over ssh

I work remotely some days and I left vim open with some unsaved changes at the office. Now I'd like to save and close those sessions so I can work on those files at home. I am logged into that machine ...
7
votes
4answers
12k views

How to get rid of the warnings when opening a file that has a .swp file?

How can I get rid of the annoying warnings when I open a file that has a .swp file? Or, how do I not generate the .swp files at all? Example warning: E325: ATTENTION Found a swap file by the name ...
0
votes
1answer
42 views

How do I view and edit last expression used in a find in vi?

Is there a way to bring up the last regular expression used in vi for a search? If I enter a long regular expression, it would be nice to just edit the expression if it was incorrect or other ...
1
vote
2answers
1k views

in VI and man command, how to exactly match a string?

in VI and man command, how to exactly match a string? I don't know how to exact match a string~
0
votes
1answer
210 views

Setting active window on Vim startup

I'm using MacVim with the Taglist plugin, which I want to be open all the time when I start MacVim. So in my .gvimrc I have the following :TlistToggle Which opens the sidebar when I load my MacVim ...
2
votes
2answers
16k views

How do I save changes after editing vi /etc/hosts?

I am doing a Linux installation. I installed the system fine and am trying to change the vi /etc/hosts file. I have edited the file but am not sure how to save it. I have --INSERT-- showing at the ...
4
votes
3answers
1k views

Vi-Vim like control keybindings for Windows

I've been using gVim for a while and love the interface. I'm in love with my keyboard-fu skillz. I was wondering if there was any application that would extend its functionality to all parts of ...
3
votes
9answers
1k views

emacs or vi which should a windows user learn?

I am currently reading a book on bash and it recommends learning either emacs or vi. I am primarily a windows user and not very experienced with linux yet. So which would be best to learn, or is there ...
7
votes
1answer
2k views

vi: what is verbose mode and when/how do I use it?

Sometimes When I'm using vi I accidentally hit caps lock when I'm in command mode. This apparently puts vi into verbose mode which I'm having trouble finding documentation about how to use. How and ...
1
vote
2answers
58 views

Ignoring repeated lines in a text file

I have a file with repeated lines that have particular text on them. I need to view the file content ignoring these lines. Is there anyway I can achieve this using vi?
2
votes
2answers
2k views

How do I remove a newline from text in vi on Cygwin

I'm trying to ammend a commit comment on a git commit, so I git commit --amend then vi opens with text from the last commit's comment. Then I delete all of the text on the first line, but I cannot ...
2
votes
2answers
816 views

FreeBSD console broken?

It seems my FreeBSD console is misconfigured (i guess). I cannot use home or end buttons in command line (it prints ~), and in vi left arrow is switching me from edit to command mode, which makes ...
1
vote
3answers
2k views

Linux weird problem touch : command not found?

I occurred a really weired problem, which is touch : command not found. I was going to create a blank file, so I type the touch command which didn't work. I'm running centOS 5. Any ideas? BTW: the ...
5
votes
2answers
3k views

Moving the the very bottom of the file with vi

No, I'm not talking about vim, I'm talking about old-school vi; because in vim you can actually issue a :bot and it'll move to the bottom of the file.
2
votes
1answer
1k views

What's the difference between tiny, huge and small in vim on MacPorts?

I'm trying to install vim via MacPorts. I found this port at http://trac.macports.org/browser/trunk/dports/editors/vim/Portfile. There are variants like tiny, small and huge. Is there any way to tell ...
1
vote
2answers
802 views

Vi editor key customization

Is there any way to customize the vi editor keys in Solaris Unix?
1
vote
9answers
153 views

How to make it easier when using the vim command in unix?

Recently i try to learn something about the unix. when i try to edit something using the vi command, it is very difficult for me since i have to switch the edit mode and control mode time by time. It ...
0
votes
1answer
53 views

What's the command to open a file and jump to an specific line in vi?

It was something like vi -line:123 myfile.txt
2
votes
3answers
579 views

When going from insert to escape mode in Vi or Vim, is there a way to not have it move the cursor left one space?

Changing modes shouldn't move the text cursor IMO. Any setting to disable this?
5
votes
4answers
3k views

vi visual mode doesn't work

I'm running vim (7.0.237) after sshing to a remote CentOS box, and it just won't enter visual mode. When I press 'v', it just beeps and does nothing. I'm running Ubuntu with GNOME Terminal, and the ...
6
votes
3answers
1k views

Logged in to vi, made changes, forgot to sudo first - now what

I made lengthy changes to a configuration file on a Ubuntu Linux computer with the vi editor. Unfortunately, I forgot to sudo first, so now I'm in the editor, but can't save my changes because of ...
0
votes
2answers
2k views

Help installing vim fuzzyfinder plugin

This plugin (here) looks really great but whenever I try to install it vim doesnt seem to recognize that it exists. I unzip the archive in my .vim dir but when I run vim and try to execute a ...
6
votes
5answers
6k views

Is there a VI equivalent I can use on Windows XP and later?

I get frustrated using Notepad on my Windows XP machine when I want to do more complicated text manipulation. Having used VI on various versions of UNIX I'd like to get something with its power on my ...
2
votes
2answers
339 views

Where can I get a “cheat sheet” of vi commands?

I'm writing Perl programs using vi on Solaris. I want a cheat sheet for the vi editor that provides the keyboard shortcuts, so I can perform my work faster. For example, I'd like for the sheet to list ...
1
vote
3answers
1k views

VIM has stopped using my _vimrc and I can't figure out where it is getting set?

My _vimrc looks like this set nocompatible source $VIMRUNTIME/vimrc_example.vim colorscheme pablo set backup=~/vimfiles/backup set directory=~/vimfiles/tmp set diffexpr=MyDiff() function MyDiff() ...
2
votes
4answers
2k views

Snippets in Vim not working

I've been trying to get snippets to work with Vim (specifically, MacVim). I have tried both snippetsEmu and snipMate (preferred). Other plugins are working fine. I have been able to get snippetsEmu ...
17
votes
6answers
19k views

Vim to replace Vi

Guys, anyone know how to change linux console editor from vi into vim everytime we execute vi? I'm using Ubuntu and Fedora Core
2
votes
3answers
3k views

How to get Transparent Background in VI Editor?

I am using gvim in Windows and novice to it. I want to have a transparent background for my VI (in Windows) , like console which creates a transparent command prompt. I asked the same question in ...
12
votes
5answers
3k views

How to show the current Vi mode when using Vi keybindings in the shell?

I use the vi keybindings in my tcsh shell. Now, I don't know which vi mode I'm in (insert mode or command mode), which leads to a lot of frustration. Does anyone know of a way to show the current ...
12
votes
13answers
1k views

What Vim features do you use? [closed]

I spend almost all day programming in Vim and I am sure that a lot of you do too. What features do you use that make your day to day coding that much better? One that I use is gv, which will let ...
0
votes
2answers
4k views

Tab complete in VI mode KSH 'vi-tabcomplete' gives bad options

When I try stuff like in my .profile: set -o vi-tabcomplete I get: .profile[292]: vi-tabcomplete: bad option(s) Does anyone know of a workaround?