News for hackers. Stuff that matters.
Re:Show HN: Rebase-editor, a simple CLI app specifically for... by eridius on Tuesday March 28, 2017 @08:33PM (#13982232)
Cute, but I can do the exact same thing in Vim. It has built-in commands :Pick, :Reword etc that change the current line, and I've just defined my own ftplugin/gitrebase.vim file that looks like:

  nnoremap <buffer> <silent> <LocalLeader>p :Pick<CR>
  nnoremap <buffer> <silent> <LocalLeader>s :Squash<CR>
  nnoremap <buffer> <silent> <LocalLeader>e :Edit<CR>
  nnoremap <buffer> <silent> <LocalLeader>r :Reword<CR>
  nnoremap <buffer> <silent> <LocalLeader>f :Fixup<CR>
  nnoremap <buffer> <silent> <LocalLeader>c :Cycle<CR>
This way I just press e.g. "\p" or "\f" (my localleader is \) to change the line, which makes it just one more keypress than your command, but I have the full power of Vim and I don't have to go about changing my editor.
Re:Show HN: Rebase-editor, a simple CLI app specifically for... by sjurba on Wednesday March 29, 2017 @04:56AM (#13984461)
Awesome. I know Vim is super awesome, flexible and very configurable (like emacs). I guess I never got around to learning it properly.. If you compare the time I spent writing this app to the time I would spend configuring and learning Vim, it might make me feel a bit stupid.. But then again, because of github and npm it is so easy to share the work I done, so that so many others don't have to spend that time at all.

Also I tried to make this app to have it do only one thing and do that one thing well. With no config, and no learning how to use it. Arrows to find your line, custom keys to change the action-word. Shift to select multiple lines, Ctrl to move/reorder line(s) and some extra niceties like undo/redo. Of course you can do all that and much more with vim. My point is that it is a strength of the app that it doesn't do anything else. I don't need it to do anything else. It only needs to do interactive rebase.

But of course I don't expect vim and emacs aficionados to take much interest in this app. My core audience are those who have to google 'how to exit vim' every time they venture a rebase. ;)

Re:Show HN: Rebase-editor, a simple CLI app specifically for... by eridius on Wednesday March 29, 2017 @03:47PM (#13989891)
The time you spent writing this app is probably good experience for writing other things though. And of course someone who's using nano or pico as their editor might find this useful.
Re:Show HN: Rebase-editor, a simple CLI app specifically for... by saurik on Tuesday March 28, 2017 @08:45PM (#13982296)
So this is just "change the word at the beginning of the line to squash"? All of the commands can be replaced by one-character aliases, so I just use "cws<esc>" to like, "change to squash". What is proving these (much longer and less general) commands like ":Squash<enter>"?
Re:Show HN: Rebase-editor, a simple CLI app specifically for... by eridius on Wednesday March 29, 2017 @12:27AM (#13983403)
Sure, you could do that, but if you're going down the list making changes to 12 lines, it's much easier just to say something like \fj\ejj\sj\sj\fjjj\e instead of ciwfixup<esc>jciwedit<esc>jjciwsquash<esc>jciwsquash<esc>jciwfixup<esc>jjjciwedit<esc>
Re:Show HN: Rebase-editor, a simple CLI app specifically for... by csswizardry on Thursday March 30, 2017 @12:44PM (#13996920)
Re:Show HN: Rebase-editor, a simple CLI app specifically for... by tekknolagi on Tuesday March 28, 2017 @11:33PM (#13983154)
You know, I have these too and I'm not sure. I can't find "Squash" or "Fixup" in my vim init directory. And yet, when I `vim -u NONE`, they don't exist...
Re:Show HN: Rebase-editor, a simple CLI app specifically for... by eridius on Wednesday March 29, 2017 @12:26AM (#13983399)
They're defined in ftplugin/gitrebase.vim in the vim runtime files.
Re:Show HN: Rebase-editor, a simple CLI app specifically for... by anaganisk on Thursday March 30, 2017 @03:52AM (#13993656)
Not everyone is a vim user.