r/programming • • Feb 06 '15

Git 2.3 has been released

https://github.com/blog/1957-git-2-3-has-been-released
622 Upvotes

307 comments sorted by

View all comments

Show parent comments

1

u/Eurynom0s Feb 07 '15

I love working in text...my issue isn't with text-only, my issue is with older *nix text editors with rather archaic functionality. Like, ctrl-a/ctrl-e are nice, but what if I want to jump to the middle of a long line? That's a pain in the ass.

1

u/ForeverAlot Feb 07 '15

I don't disagree, but

  • Alt + F(orward)

  • Alt + B(ackawrd)

  • Ctrl + W to delete the whole "word" (set of contiguous characters) to the left of the cursor; useful for removing arguments.

  • Alt + Backspace to delete only a part of it; useful for editing path and flag arguments.

1

u/Eurynom0s Feb 07 '15

Didn't know about alt-f/alt-b sound useful if those move you a whole word, but yeah, still a lot less helpful than just grabbing my mouse to click to a specific spot in the middle of a paragraph.

1

u/benjumanji Feb 09 '15

/xzy will jump to first occurent of xyz (vim). Useful for arbitrary jumps. There is also (this)[https://github.com/Lokaltog/vim-easymotion] if you are into efficient jumps. And honestly even vim has pretty decent mouse support now.

1

u/gfixler Feb 07 '15

Do you have jump-to-the-middle-of-a-long-line functionality elsewhere?

0

u/Eurynom0s Feb 07 '15

In Microsoft Word, I can grab my mouse and just click to where I want to be. I can do the same in Sublime, or Notepad++, or...

Stuff like vi, whatever you want to say about it, is clearly not conforming to modern expectations about how people interact with software.

1

u/gfixler Feb 07 '15

Stuff like vi, whatever you want to say about it, is clearly not conforming to modern expectations about how people interact with software.

You've made me feel appreciative of the fact that I have Vim at home on Linux, and at work on Linux and Windows, and that it works amazingly well - far beyond every GUI editor I've used, and for all of the languages I work and play in. I shuddered for a moment at the thought of being held back by modern expectations. I presume we'll move to coding by tapping pictures on tiny glass screens in the not-too-distant future :(

1

u/Eurynom0s Feb 07 '15

1

u/gfixler Feb 07 '15

When I was a youngin, I mucked things up, constantly. I wouldn't ask more of modern-day youngins. It takes a good decade or two of mucking things up before you sort out the huge number of things that there are to avoid mucking up.

1

u/[deleted] Feb 07 '15

So why can't you do that in gVim?

Also, you can probably get to the middle of your long line in a few keystrokes using any number of Vim commands. And if you really need a "jump to position length/2" for some reason (which you can't do with your mouse efficiently anyway) it's trivial to code up a little function in vimscript and map it.

1

u/slrz Feb 08 '15

Then use your mouse? For the vim implementation of vi, enable it for all modes with :set mouse=a. For the gvim one it's obviously not necessary.

Also see :help mouse.