Baffled by git
May. 1st, 2011 12:23 pmSo, I figured that I should get the code for my firefox addon into a version control system of some kind, and that this would be a good time to take git for a test run.
So I do a git init, and a git add ., and then when I do a git commit I am presented with this image:

At which point I enter the text I want, and have _no_ idea what to do next. Pressing "Esc" doesn't pull up anything useful, there's no help that I can see in the manual for what to do next, and frankly, this leaves me completely stymied.
I assume that what I've got there is basically some kind of unix text editor that I've been dropped into, but as I haven't used anything like that since 1992, this is less than useful.
I would just start pressing random buttons, but I'd rather not mess this up, and I believe that git is one of these things that's very easy to fuck up if you go wandering off randomly.
Anyone care to point me in the right direction?
Edit: Had help from lovely people, and then worked out how to replace the editor with one I know.
So I do a git init, and a git add ., and then when I do a git commit I am presented with this image:
At which point I enter the text I want, and have _no_ idea what to do next. Pressing "Esc" doesn't pull up anything useful, there's no help that I can see in the manual for what to do next, and frankly, this leaves me completely stymied.
I assume that what I've got there is basically some kind of unix text editor that I've been dropped into, but as I haven't used anything like that since 1992, this is less than useful.
I would just start pressing random buttons, but I'd rather not mess this up, and I believe that git is one of these things that's very easy to fuck up if you go wandering off randomly.
Anyone care to point me in the right direction?
Edit: Had help from lovely people, and then worked out how to replace the editor with one I know.
no subject
Date: 2011-05-01 11:36 am (UTC)type o (lower case) to open up a new line for typing.
type all your extra stuff.
Hit Esc.
Type :wq to write and quit.
no subject
Date: 2011-05-01 11:37 am (UTC)no subject
Date: 2011-05-01 11:39 am (UTC)no subject
Date: 2011-05-01 12:19 pm (UTC)no subject
Date: 2011-05-01 12:27 pm (UTC)no subject
Date: 2011-05-01 11:05 pm (UTC)no subject
Date: 2011-05-01 11:38 am (UTC)C-x C-s (which is Emacsese for Ctrl-x Ctrl-s): Save
C-x C-c: Quit
C-_ (Ctrl-underscore, usually Ctrl-shift-minus): Undo
There are many more. It's quite powerful once you get used to it: it has a "kill ring" which is like an indefinitely large clipboard history, and so on.
no subject
Date: 2011-05-01 11:39 am (UTC)no subject
Date: 2011-05-01 11:39 am (UTC)Looks more like VI to me, seeing as it says "VIM" in the title bar and all.
no subject
Date: 2011-05-01 12:34 pm (UTC)no subject
Date: 2011-05-01 11:39 am (UTC)editor = 'c:/Program Files (x86)/TextPad 5/TextPad.exe'
And now I get a text editor with shortcut keys that I know.
Hurrah!
no subject
Date: 2011-05-01 12:20 pm (UTC)no subject
Date: 2011-05-01 01:17 pm (UTC)no subject
Date: 2011-05-01 03:07 pm (UTC)It's a POS.
Glad you got help onto something decent.
no subject
Date: 2011-05-01 04:30 pm (UTC)no subject
Date: 2011-05-01 06:21 pm (UTC)no subject
Date: 2011-05-01 06:30 pm (UTC)no subject
Date: 2011-05-01 06:50 pm (UTC)And things like vi and emacs are just a social marker now -- you're a l33t hacker because you master them, and so vice versa. But that doesn't make them good either.
no subject
Date: 2011-05-01 07:01 pm (UTC)no subject
Date: 2011-05-01 07:09 pm (UTC)no subject
Date: 2011-05-01 11:08 pm (UTC)no subject
Date: 2011-05-01 11:27 pm (UTC)no subject
Date: 2011-05-01 08:31 pm (UTC)I started using vi about fifteen years ago, when I was working on a project on a system (a turquoise pizza-box SGI Indy) which had no other full-screen text editor installed. By the time the project finished, I was used to it (as you say, it was wired into my fingertips) and I carried on using it for preference, because I could pretty much guarantee that it would be available on any Unix-like system I was ever likely to find myself using.
no subject
Date: 2011-05-01 06:34 pm (UTC)no subject
Date: 2011-05-01 06:40 pm (UTC)no subject
Date: 2011-05-01 06:44 pm (UTC)But the only times I need a terminal editor is when I'm ssh-ing into a server and in those situations I'm firefighting, so I need only the essentials, and also in a UI that I don't have to fight.
Any other time, there are now decent, modern text editors available ;)
no subject
Date: 2011-05-01 06:56 pm (UTC)When your only options are vim or ed, vim starts looking a lot nicer ;)
All you actually need to know about Vim
Date: 2011-05-01 04:36 pm (UTC)arrow keys work as you'd expect, as does delete.
Backspace only works in interactive mode.
To get into interactive mode and start typing, type i
To stop typing again, hit Esc
To write your changes to the file and close, once you've hit Esc, type :wq
That doesn't allow you to get particularly good use out of Vim, but it's easy to remember and does allow you to type, delete, save and quit.
Re: All you actually need to know about Vim
Date: 2011-05-01 06:40 pm (UTC)<esc>:q!<return>
<esc> puts you into command mode, : gives you a command prompt, and q! means "quit without saving or asking me about it".
Re: All you actually need to know about Vim
Date: 2011-05-01 06:46 pm (UTC)I can just about see that esc is a logical choice. But why the fuck a colon after that? I mean, fucking WHY? Which fuckhead designed it, really, that's what I want to know. And then, yknow, give them a good kicking.
Re: All you actually need to know about Vim
Date: 2011-05-01 08:09 pm (UTC)Re: All you actually need to know about Vim
Date: 2011-05-01 08:23 pm (UTC)Re: All you actually need to know about Vim
Date: 2011-05-01 08:42 pm (UTC)Re: All you actually need to know about Vim
Date: 2011-05-01 08:46 pm (UTC)Re: All you actually need to know about Vim
Date: 2011-05-02 08:24 am (UTC)no subject
Date: 2011-05-01 05:33 pm (UTC)no subject
Date: 2011-05-01 05:48 pm (UTC)no subject
Date: 2011-05-01 06:25 pm (UTC)no subject
Date: 2011-05-01 07:41 pm (UTC)friday is vi day
... and started vi instead.
no subject
Date: 2011-05-01 07:50 pm (UTC)no subject
Date: 2011-05-01 08:18 pm (UTC)I believe