Rant: Caps Lock

The forum for ranting, raving, complaining and praising
User avatar
vinsanity
Chili dog truther
Posts: 8836
Joined: July 3 06, 2:19 pm
Location: Indianapolis

Re: Rant: Caps Lock

Post by vinsanity »

Joe Shlabotnik wrote:
jim wrote:But really, vi is such a powerful editor and so fast and lightweight that when you learn it you use it literally like natural language to where you aren't even thinking about what you are doing, and in fact can't even describe to people what you are doing without actually doing it.
Jeez jim, you described me and vi to a T. Over the years I've tried emacs, Visual Studio, Eclipse. But if it doesn't have a vi emulator, I end up finding a way back because everything else is so damn slow when compared to what I can do in vi. That's why I'm using slickEdit. Adequate vi emulation.
I'm not as bood with some of the navigation, selection slightly more advanced commands as I should be. When I develop now I usually stick to Eclipse when I'm at a IBM/Open Source Shop and Visual Studio at a Windows shop - most of them have their source control and workflow stuff all integrated so it's tough to do anything else.
I just remember learning some of the commands and loved hitting 'dd' to delete a line, d# to delete multiple lines. yy to copy a line, etc.

But I think one of my single favorite features was being able to cut/copy/delete a selection inside ()'s and {}'s. And the auto indent feature - might be the single simplest and most powerful auto indenter out there.

User avatar
Joe Shlabotnik
Hall Of Famer
Posts: 24292
Joined: October 12 06, 2:21 pm
Location: Baseball Ref Bullpen
Contact:

Re: Rant: Caps Lock

Post by Joe Shlabotnik »

vinsanity wrote: But I think one of my single favorite features was being able to cut/copy/delete a selection inside ()'s and {}'s. And the auto indent feature - might be the single simplest and most powerful auto indenter out there.
And don't forget your sed interface! Nothing like doing a blanket search/replace with one easy command from the top of the file:

:.,$s/OLD/NEW/g

and you're done!

Antoher one I really like is being able to cut and paste between multiple files - yank from file a, ':e #' to the other file and drop it in.

And finally, any shell command you want to perform with a ':! cmd'. Yessir, you can create new files with shell redirection and get in and edit right away. Or compile the file you're editing to see what happened and edit some more without leaving. Very convenient.

jim
Red Lobster for the seafood lover in you
Posts: 50393
Joined: May 1 06, 2:41 pm

Re: Rant: Caps Lock

Post by jim »

Joe Shlabotnik wrote:
vinsanity wrote: But I think one of my single favorite features was being able to cut/copy/delete a selection inside ()'s and {}'s. And the auto indent feature - might be the single simplest and most powerful auto indenter out there.
And don't forget your sed interface! Nothing like doing a blanket search/replace with one easy command from the top of the file:

:.,$s/OLD/NEW/g

and you're done!

Antoher one I really like is being able to cut and paste between multiple files - yank from file a, ':e #' to the other file and drop it in.

And finally, any shell command you want to perform with a ':! cmd'. Yessir, you can create new files with shell redirection and get in and edit right away. Or compile the file you're editing to see what happened and edit some more without leaving. Very convenient.
Why go to the top?

:1,$s/OLD/NEW/g

......


My favorite feature is setting tags, so that I can easily hop back and forth. I use qwert ... and will often have several tags set at one time.

So sit on a line, type 'mq' to set your mark, '~q' to go to it. Then you can set mw,me, mr .... etc...

User avatar
Joe Shlabotnik
Hall Of Famer
Posts: 24292
Joined: October 12 06, 2:21 pm
Location: Baseball Ref Bullpen
Contact:

Re: Rant: Caps Lock

Post by Joe Shlabotnik »

jim wrote:
Why go to the top?

:1,$s/OLD/NEW/g
Becasue my line of thought is 'where do I want to be?'. My hand either does '/WHEREIWANTTOBE' or '1G' or whatever and then it's always ':.,$s/....' from there.

Like you say you think it more than do it consciously.

jim
Red Lobster for the seafood lover in you
Posts: 50393
Joined: May 1 06, 2:41 pm

Re: Rant: Caps Lock

Post by jim »

Joe Shlabotnik wrote:
jim wrote:
Why go to the top?

:1,$s/OLD/NEW/g
Becasue my line of thought is 'where do I want to be?'. My hand either does '/WHEREIWANTTOBE' or '1G' or whatever and then it's always ':.,$s/....' from there.

Like you say you think it more than do it consciously.
I'm a keystroke minimalist.

But you probably have that 1G followed by the :.,$s/... strategy burned into your brain and do it so fast that you couldn't break yourself if you wanted to.

User avatar
Joe Shlabotnik
Hall Of Famer
Posts: 24292
Joined: October 12 06, 2:21 pm
Location: Baseball Ref Bullpen
Contact:

Re: Rant: Caps Lock

Post by Joe Shlabotnik »

jim wrote:
Joe Shlabotnik wrote:
jim wrote:
Why go to the top?

:1,$s/OLD/NEW/g
Becasue my line of thought is 'where do I want to be?'. My hand either does '/WHEREIWANTTOBE' or '1G' or whatever and then it's always ':.,$s/....' from there.

Like you say you think it more than do it consciously.
I'm a keystroke minimalist.

But you probably have that 1G followed by the :.,$s/... strategy burned into your brain and do it so fast that you couldn't break yourself if you wanted to.
Exactly. I'm there before I even consciously think about it.

User avatar
vinsanity
Chili dog truther
Posts: 8836
Joined: July 3 06, 2:19 pm
Location: Indianapolis

Re: Rant: Caps Lock

Post by vinsanity »

jim wrote:
Joe Shlabotnik wrote:
jim wrote:
Why go to the top?

:1,$s/OLD/NEW/g
Becasue my line of thought is 'where do I want to be?'. My hand either does '/WHEREIWANTTOBE' or '1G' or whatever and then it's always ':.,$s/....' from there.

Like you say you think it more than do it consciously.
I'm a keystroke minimalist.

But you probably have that 1G followed by the :.,$s/... strategy burned into your brain and do it so fast that you couldn't break yourself if you wanted to.
Doesn't gg go straight to the top anyway? So it's what, one more stroke?

jim
Red Lobster for the seafood lover in you
Posts: 50393
Joined: May 1 06, 2:41 pm

Re: Rant: Caps Lock

Post by jim »

vinsanity wrote:
jim wrote:
Joe Shlabotnik wrote:
jim wrote:
Why go to the top?

:1,$s/OLD/NEW/g
Becasue my line of thought is 'where do I want to be?'. My hand either does '/WHEREIWANTTOBE' or '1G' or whatever and then it's always ':.,$s/....' from there.

Like you say you think it more than do it consciously.
I'm a keystroke minimalist.

But you probably have that 1G followed by the :.,$s/... strategy burned into your brain and do it so fast that you couldn't break yourself if you wanted to.
Doesn't gg go straight to the top anyway? So it's what, one more stroke?
What's one more stroke? Well, one more. Why? Plus my finger finds the '1' instinctively - the . isn't even on the same hand. Good luck changing that.

User avatar
vinsanity
Chili dog truther
Posts: 8836
Joined: July 3 06, 2:19 pm
Location: Indianapolis

Re: Rant: Caps Lock

Post by vinsanity »

Image

Post Reply