vi

Navigating multiples files vi editor

According to http://www.lagmonster.org/docs/vi2.html the command :p would make vi go to the previous file. Unfortunately, this isn't working for me. However :n works and goes to the next page. What should I use to go to the previous file? For :p I get the message, Hit Return to continue and it stays in the same page. Thanks. Edit: I a...

Understading internals of vi editor

Hi, I am currently writing my own shell program. My current shell can just execute commands. I want to go a step future and execute vi from this new shell. I am trying to understand the internals of how a vi editor works , but no good articles on net. Any pointers or links would be helpful. Thanks ...

undo continually vi

Hi, I am using vi(not Vim) and I would like to continually undo the changes made. u works for a single command undo and Ufor a single line undo. But Is there a way to undo continuously like vim(I recall a command in vim can even undo changes by time!) in vi? Thanks in Advance. Edit: I am using vi version 3.10 ...

Smart search/replace in Vim

I have a file with the following expressions: something[0] Where instead of 0 there could be different numbers. I want to replace all these occurances with somethingElse0 Where the number should be the same as in the expression I replaced. How do I do that? ...

syntax highlighting in vi

Is syntax highlighting there on vi?. I am sshing to an AIX box via putty in windows xp and using vi. I would like to know if there is syntax highlighting feature in vi.(My google-fu failed as all the results pertaining to vi point to vim). If this exists, Is it possible to get the colors in putty?.(I doubt it though, as sending the color...

Using vim, how do you quickly refresh a web page you're working on?

I've been using VIM for a few weeks now while messing with various web languages and I'm really enjoying it. I find it cumbersome having to tab or click into my browser and refresh the page to see the effect of a code change. It's even more annoying as I'm using Virtual Box and I tend to be working from PDF files on the host system so I...

How to delete selected text in VI editor

I am using putty and vi editor if select 5 lines using mouse and i want to delete those lines how can i do that Also how can i select the lines from keyboard like in windows i pres shift and move the arrows to select the text. how can i do that in vi ...

Bash vi mode - bind "C-c" to escape from insert mode

Hi, I just discover the magic of using vi style in bash. Immediately, I'm trying to use C-c to escape from insert mode (into what's called movement mode) as I'm used to C-c to escape to command mode in vim. I searched around and found the command to rebind key in bash: "bind -m vi-insert C-c:vi-movement-mode" Then, I used "bind -P"...

Backward search in vi-mode.

I just discovered the possibility to use vi-mode in zsh. Pretty awesome. But I used CTRL-r in emacs-mode pretty much and really really miss it. Is there something alike or can I get that functionality in vi-mode as well? ...

How do I make this change in my VIM config?

Control + Right = end Control + Left = home Control + down = page down COntrol + up = page up I want these to work, regardless of what mode (insert or not) I'm in. What do I put into my .vimrc? ...

Execute a script directly within vim/mvim/gvim

TextMate has a nice feature that allows you to execute a script from within the current context and shows you the output in a separate window. This lets you write and test code on the go. I'm almost certain there is a similar feature with MacVim/gVIM, but I'm not sure what it is. Currently I save my buffers to disk, then go to the comman...

Linux shell (bash) on vi's splitview

Hi all, I've been searching with no results for an integration of bash inside vi, as featured in emacs; the problem is: I have vi open with 2 views, one open with :split command, and I want to use bash through the second view, while I'm editing a file in the first; if I do :sh while editing the second view, the whole session pauses and a...

How to use Vim as Python, C, C++, C# IDE

I am finding it very difficult to use VIM as IDE for programming. Help me get a solution. ...

What can I do in VIM that I cant already do in Visual Studio?

I heard it takes 30 days minimum to get comfortable with vi. I'm on day 2 hehe. Right now, I seem to be merely memorizing different shortcuts for things I already did in visual studio. (incremental search, prev/next word, etc) So far the most powerful aspect seems to be the numeric keys combined with commands (5 * next line), and the i...

Hidden features of Vim

Over the years, I thought I'm a Vim master! Recently I visited a real Vim master! oops! My knowledge is awfully superficial! For example I didn't know it's possible to add a \c to make search case insensitive. (instead of :set ignorecase) I clearly remember when how I'm surprised when I found SuperTab or TagList plugins first time. Vim...

Convert file one word per line

I would like to convert a text file containing words, space separate to a file where each word appears on a separate line sdf sdfsd= sdfsdf sdfsdf will become sdf sdfsd= sdfsdf sdfsdf thanks ...

getting vi and rxvt to work in cygwin

I am trying to use rxvt on my cygwin w win XP but the terminal appears and disappears. What could be wrong? This is true for all except rxvt-native . I have tried a few commands found online but with no success. I include 2 I have tried: start C:\cygwin\bin\rxvt.exe -sb -sl 3000 -fg gray -bg black -fn "Lucida Console-14" -e /bin/bash --...

visual selection in bash / cli

Is there a way to make bash use visual selections for text replacement? Standard text input conventions don't work: If you press Shift+Left Arrow, the character to the left should be visually selected If you press Ctrl+Left Arrow, the cursor should move to the beginning of the previous word If you press Shift+Ctrl+Left Arrow, the wo...

How do I make vim open all files matching a pattern in different tabs?

In a given working directory, if I do :tabe **/test*.py vim complains with E77: Too many file names. What if I want it to open every matching file in a separate tab? There must be a way to do it, but I can't find it. ...

VIM better way to replace line from the first symbol

Hi, Having the code: [Test] public void ShouldDoSomethingMeaningFull() { Assert.Fail(); } I often need to overwrite the line (3) Assert.Fail();. What I currently do is this: Go to that line 3G. Select everything starting from first non-whitespace ^v$. Change it - c. The whole sequence is: 3G^v$c. While this works for me but ...