New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Lol, vi is pretty easy to use after you learn how to use it.
But is it better than nano?
Yes. Even if it had nothing else, taking some lines and saying "pipe these to awk or sed or whatever with this command and return the result" makes it worth using. Ditto for regex in the editor.
vi is highly optimized for speed. I'm willing to accept that emacs can be faster since it is infinitely extensible and you can make semantic commands, but otherwise it's vi.
vi is a power tool. nano is a pretty good tool, too.
Why would i need speed for editing config files or so?
I assume they mean editing speed. Once you grok vi(m) you can edit text very quickly especially in large files. I use vim exclusively now (apart from at work - .NET )
I am in the shell all day, popping in and out of files constantly. Anything that makes that faster saves me time.
vim also allows you to have multiple files open at the same time. I spent last night switching constantly between css/html. oh, syntax highlighting is nice, too :-)
vim runs on Windows :-)
I just use nano and then CONTROL W to search what I need :P
No, the point is that vi is so much faster to use.
Example of something I did today:
Had a text file with hundreds of lines like this:
Want to:
In vi (recreating these commands from memory so please excuse any typos):
...and then make the other changes by hand as they were all different per line.
In nano? Forget it. You'd have to edit every single line. What takes seconds turns into 5-10 minutes.
Yes, you could do what I did with perl, shell, etc. outside the shell (and then I guess you could use nano to edit a shell script to do that :-) But the point is that if you're editing a file in vi, you always have regex, shell, sed/awk/anything you can pipe in/out, etc. at your disposal. That makes it very fast to work with.
The only real alternative in my mind is emacs, which is a completely different approach.
thread derailed, mission accomplished!
":D"
/^http/(control-V)(control-I)https/
:1,20s/artemis/hades/
So you can actually just use vi as a more powerful editor if you know dark wizardry
I have it installed for quick edits, but sadly writing C# without VS is like sawing your leg off with a toothpick.