# Are there REAL benefits to using vi/m?



## fiftyone (Sep 2, 2009)

Are there REAL benefits to using vi/m?

Not saying that vi or vim are bad in any way in fact I can see how it would be very useful to someone throwing out a mass amount of C or something. 

But for the average geek like me is it really worth the effort to learn more than just :q! ?


----------



## fiftyone (Sep 2, 2009)

fiftyone said:
			
		

> Are there REAL benefits to using vi/m?
> 
> Not saying that vi or vim are bad in any way in fact I can see how it would be very useful to someone throwing out a mass amount of C or something.
> 
> But for the average geek like me is it really worth the effort to learn more than just : q! ?



Why can't I edit my post? Damn smilie killed my poor attempt at humor


----------



## aragon (Sep 2, 2009)

If you want to remain the average geek, maybe not.  I find vi useful in that it's standard on every unix system I've ever worked on.  And once you know how to use it it really is better than most other editors out there.

Vi skills also spill over into other areas of Unix too, such as sed and other apps that adopt vi-like key bindings/operation.


----------



## vivek (Sep 2, 2009)

As a sys admin vi / vim always available on rescue cd, floppy and other media. vi is easy and not bloated.


----------



## fiftyone (Sep 2, 2009)

Good point! 
I gotta keep my geek cred up. Guess i'll never be truely 1337 if I don't learn vi. 

(it's hard BTW, just kinda wierd)


----------



## fiftyone (Sep 2, 2009)

where the hell is the editpost  button? 

that's supposed to say... 

(it's NOT hard BTW, just kinda wierd)


----------



## vivek (Sep 2, 2009)

fiftyone said:
			
		

> Good point!
> I gotta keep my geek cred up. Guess i'll never be truely 1337 if I don't learn vi.
> 
> (it's hard BTW, just kinda wierd)



Naa vi is easy.. try ex or ed


----------



## SirDice (Sep 2, 2009)

fiftyone said:
			
		

> where the hell is the editpost  button?


You can edit after 10 days and 10 posts


----------



## Carpetsmoker (Sep 2, 2009)

Vim comes with the `% vimtutor` command, this really helped me getting started with Vim back in the day (Run it several times if you forget something!)
The [cmd=:]help <command/key>[/cmd] function in Vim is also pretty good. Bram does a really good job maintaining a high standard for the Vim documentation, it's accurate and to the point, among the best I've ever seen.

Is it worth learning Vim? For me it is very fast and easy, it has a lot of very good functions. It has a steepish learning curve, but once you get the basics, it's easy to expand on them.


Notice:
New users aren't able to edit posts, there is a thread about it somewhere oin the Feedback forum.


----------



## CodeBlock (Sep 2, 2009)

Yeah `vimtutor` is very nice. I love vim, the syntax highlight stuff, the omnicomplete, the built-in regex stuff .. just all around, I love it.

Granted emacs can probably do all this stuff (and more?), but I haven't had the time to learn it, and will probably stick with vim for the time being.


----------



## wonslung (Sep 7, 2009)

fiftyone said:
			
		

> Are there REAL benefits to using vi/m?
> 
> Not saying that vi or vim are bad in any way in fact I can see how it would be very useful to someone throwing out a mass amount of C or something.
> 
> But for the average geek like me is it really worth the effort to learn more than just :q! ?



the biggest advantage is speed.  Think of it like this:

When an average person starts using a computer, they might not know how to type.  The look at the keys and they learn BAD, but easy ways to type messages.  Later, they learn to touch type...which it seems weird at first, in the long run, it allows them to type many more words per minute...

vi/m has MANY quick keyboard options that make it an AMAZING program for the person who knows how to use it.


----------



## Alt (Sep 7, 2009)

The REAL benefit is: you can use it on ANY unix os =) Never seen any distro without it))

btw i use it for setting /etc/resolv.conf, and then pkg_add -r ....


----------



## dh (Sep 7, 2009)

Knowing vim is prerequisite for reaching enlightenment.


----------



## hedwards (Sep 7, 2009)

For working with text it's just faster and more efficient than any other text editor I've encountered. Sure it has a massive learning curve to it, but you don't really need to know that much for it to be useful.

Plus it's pretty fast and doesn't make you take your hands off the keyboard like a lot of other editors do.


----------



## ckester (Sep 8, 2009)

IMHO, one of the real benefits of vi is the elegant way it delegates many tasks to external programs rather than having everything built into one huge executable (or, what amounts to the same thing, tacked on as a "plugin" or "extension".)   This "one tool for each task" approach is the Unix way of doing things, and using traditional vi is a good way to develop your Unix chops.

(When it comes to vim, I'm more than a little ambivalent.  While it still supports the traditional model, vimmers seem to relying more and more on builtins and extensions.  This is what vi looks like as it evolves into emacs, and I'm not sure I like it.)

In the same vein, other real benefits of vi is that it uses Unix-standard regular expressions for search and replace operations, and has a commandset that it roughly similar to sed's.   Again, getting familiar with these things is part of developing your Unix chops.

And if you don't care about developing those chops, why use a BSD in the first place?  You might just as well be using Windows, one of its Linux clones, or OS X.


----------



## mwatkins (Sep 8, 2009)

Yes, vi is to be found on most *nix environments. But I use it because I can do most things faster, plus it hurts my hands less (emacs and other editors which rely too much on "control-this", "control-that", make my hands ache when I have to write a lot - be it code or text. In addition the movement keys make using the mouse virtually optional - I rarely touch my mouse while my editor has focus.

I forced myself to learn vim and truthfully it wasn't love at first sight, but the geek in me did appreciate the virtually endless customizability one gains with vim so even though I wasn't smitten immediately, I stuck with it. Soon I never looked at another. 

You know you are truly hooked when you hit ESC:wq while typing in a web page text box.

ps: I like vim, even gvim (egads!) over plain ol vi; I don't do anything too funky but I do have some custom vim scripts (in vim's own language and some in python) that allow me to do my work more efficiently. gvim I use without any menus, only to get different character fonts and sizes. I find a custom colour palette a boon to development work and have my terminal (vim) and gui (gvim) configured identically.


----------



## Alt (Sep 8, 2009)

dh said:
			
		

> Knowing vim is prerequisite for reaching enlightenment.


Thinking _why_ you must know/do [something] or must not know/do [something] is prerequisite for reaching enlightenment. For example, topicstarter thinks why he must know or  not. And we see you dont think about, so reaching enlightenment through vim can be your 'other way'.



			
				mwatkins said:
			
		

> ... plus it hurts my hands less ....


 omg something like "ESC:wq![enter]" or "s/blah/blah/" hurts my brain way painful than F10 or F4 in (noobish?) mcedit



			
				mwatkins said:
			
		

> I forced myself to learn vim and ...


All vim fans i know forced themselves :e


----------



## fronclynne (Sep 8, 2009)

Alt said:
			
		

> All vim fans i know forced themselves :e



I wasn't born knowing how to ride a bicycle, either.


----------



## Alt (Sep 8, 2009)

fronclynne said:
			
		

> I wasn't born knowing how to ride a bicycle, either.


But must not know how to ride a shuttle - just for traveling to another quarter.

When you want to edit file - you want to config something or programming.. There is no target "learn to edit" - cus i know how to edit already (in 'standard' editiors). So i want to set /etc/resolv.conf and learn how to compile ports, i dont want to learn editiors(possibly one best editor or not).


----------



## mwatkins (Sep 8, 2009)

Alt said:
			
		

> omg something like "ESC:wq![enter]" or "s/blah/blah/" hurts my brain way painful than F10 or F4 in (noobish?) mcedit



The modal nature of vim is hard to appreciate until one gets comfortable with it. One can of course always (re)map keys in vim.

But hurting the brain is a short term  issue; if there is value in an approach, the brain will willingly adapt. ctrl-f-x ad nauseum will hurt my hands no matter what, and forcing hands to move to cursor control keys (arrows) or the mouse will slow down my text entry and editing no matter what.

Having a modal editor allows me to hit ESC and use hjkl as cursor control - fingers never leave the home row. Once one is used to this convenience it is hard to live without it.


----------



## Alt (Sep 8, 2009)

zealots :e


----------



## ohauer (Sep 11, 2009)

since most all of my servers have no X installed vim(-lite) is the first editor of my choice even for development.

Most used features 
syntax highlighting (self written extensions)
v)split
Visual mode (v,V, CTRL-v) to copy over large blocks to new config files (xml for example) 
move cursor over a keyword and use 'K' to jump to the manpage (coding)
many more ...

This is one of the reason vim-lite is the fist package installed on every machine


----------



## Bobarino (Sep 14, 2009)

You can also install vilearn from ports or packages. It's similar to vimtutor, but for vi.


----------

