You are not logged in.

#1 2013-08-28 20:37:17

ardagnir
Member
From: USA
Registered: 2012-12-04
Posts: 16
Website

hackhack - use the commandline in vim mode

I've always been annoyed that readline's vi-mode isn't as functional as vim, so I wrote this vim plugin that does what I always wished a "vim-mode" would do.

Hackhack uses conqueterm to run a shell within a vim buffer, but also allows you to edit the shell input and browse history using vim commands.

It's still super rough around the edges, but any vim enthusiasts should check it out. (github.com/ardagnir/hackhack)

Offline

#2 2013-08-28 23:46:52

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,358

Re: hackhack - use the commandline in vim mode

Not that there's any harm in duplication, but how does this compare to vi-mode in zsh, for example?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2013-08-29 14:07:19

ardagnir
Member
From: USA
Registered: 2012-12-04
Posts: 16
Website

Re: hackhack - use the commandline in vim mode

Well, I don't use zsh so I'm not sure how much of this (other than 4) zsh's vi-mode can do.

But the advantages over the bash's readline-based vi-mode are that:
1) You can use all your vim mappings without setting them twice using different syntaxes. (three times if you use screen also)
2) It shares all the registers with vim.
3) You can also easily yank from results of commands and paste into other commands without the mouse.
4) It shows you what mode (insert/normal) you're in. I've heard zsh can also do this one but bash can't. Since bash keeps switching to insert and I often exit out of insert unconciously, I never know what mode my terminal will be in.
5) The history is done differently. I wouldn't say "better", but in a way that I certainly like more.
6) ci) and ya" and such work in hackhack.
7) Also, you can do things like d?hello or y/othertext. These don't work in bash's vi-mode and are a lot faster than counting how many h's you need to delete in a dF command. I hope to soon add something like g/ and g? for search-based movement within a line.

It's also less stable than vi-mode and definitly has some problems. But it's works well for what I (and hopefully some other people) need to do.

Last edited by ardagnir (2013-08-29 20:11:24)

Offline

Board footer

Powered by FluxBB