Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vim like movement keys

See original GitHub issue

Hi, just installed cerebro and I have to say that I’m quite enjoying it. I was opening this issue to check whether you’d be happy for me to implement a feature that I would quite like to have.

I use spacemacs and vimium and am quite used to using vim-like command keys to navigate around. I was wondering if it would be ok for me to add these to cerebro.

For instance, Ctrl+j would go down Ctrl+k would go up, Ctrl+h would go left and Ctrl+l would go right.

If it’s not wanted generally we could put them behind a feature flag in the settings. What do you think?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

maximbazcommented, Mar 5, 2017

It doesn’t have to be one or another, the shortcuts <kbd>Ctrl+j/k/h/l/n/p</kbd> are unused now and can be added right away, for everyone, not controlled by any settings - and for some people that would be enough.

The command mode is a different beast, it has to be hidden in the settings and disabled by default, otherwise people will just be confused a lot. But it potentially provides much more control than a simple navigation.

KELiONcommented, Mar 13, 2017

Ok, summarizing:

There are two steps of implementation.

Lightweight vim-mode

On first step we just add few more shortcuts: <kbd>ctrl+hjkl</kbd> – navigate in results (the same as arrows now) <kbd>ctrl+o</kbd> – select (=== <kbd>enter</kbd>)

Hardcore vim-mode

  • We add a checkbox to settings to active this feature
  • We introduce two modes:

Insert mode

It works, like Cerebro works now. Only one exception <kbd>esc</kbd> switches app to command mode, instead of closing the window

Command mode

In this mode you can’t change input term, but you have more powerfull commands, like

<kbd>hjkl</kbd> – navigate in results (the same as arrows in insert mode) <kbd>o</kbd> – select (=== <kbd>enter</kbd>) <kbd>i</kbd> – switch app back to insert mode <kbd>q</kbd> – close the window

Any more thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vim Movements Part I
The Basics · h – Moves the cursor left · j – Moves the cursor down · k – Moves the cursor up...
Read more >
Vim Cheat Sheet
Cursor movement · h - move cursor left · j - move cursor down · k - move cursor up · l -...
Read more >
Vim in Ten Keys
You can hit it as many times as you like, it will even wrap around to the next line. Moving one word to...
Read more >
vi Complete Key Binding List
complete key binding reference ; v, UNBOUND ; w, move foreward one word ; x, delete single character ; y, yank command, cursor...
Read more >
Here is why vim uses hjkl keys as arrow keys
I was reading about vim the other day and found out why it used hjkl keys as arrow keys. When Bill Joy created...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found