1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.26k stars 325 forks source link

map (keybind) | tab-navigation | K, J vs. <C-n>, <C-p> #304

Open fohrums opened 9 years ago

fohrums commented 9 years ago

For an extension that claims to mimic the powers of Vimperator/Pentadactyl how would I then be able to map:

to keys already being used by default Chrome <C-n>, <C-p>?

MY ATTEMPT

What doesn't work:

map <C-n> nextTab
map <C-p> previousTab

REFERENCE

[SOLVED]

FIX

Fruglemonkey commented 9 years ago

If you look under cncpcompletion, you'll see the following:

(requires you to set the nextCompletionResult keybinding in the chrome://extensions page (bottom right)

On that same page you can set and to next and previous tabs.

fohrums commented 9 years ago

@Fruglemonkey Thanks, that did it.

I like how it works on chrome pages, but why does it perform better than the default J,K shortcuts? What I mean is, it doesn't get that malfunction that cvim frequently gets where it just stops working. This method for applying the shortcut works much more to my liking.

Also, why I can't assign Close the current tab to <d>

Fruglemonkey commented 9 years ago

Huh?

map d closeTab

Works fine for me.

fohrums commented 9 years ago

@Fruglemonkey After seeing how you can change only a few shortcuts through chrome's extension page I also went ahead and enabled <C-w> for deleteBackWord.

I also have map d closeTab mapped in my cvimrc, but closing a tab using cvim doesn't work with chrome pages leaving me to no longer use the option for <C-w> to deleteBackWord.

RomanSC commented 6 years ago

The default keybinds that don't match Vimperator like J K and d are very very very annoying to me. But I don't mind as long as I can change it in the config, not trying to poo poo on a fine and needed chrome extension

Problem is, I can't remap them... or anything. So I don't know if this is the same issue as OP

OS: Arch Linux chrome version: Chromium 64.0.3282.186

Issue: Cannot remap J K or d

.cvimrc

let barposition = "bottom"

unmap K J gt gT R E
map K nextTab
map J previousTab

unmap X d
map d closeTab

let configpath = 'home/roman/.config/.cvimrc'
set localconfig

I run: :source ~/.config/cvim/.cvimrc

I can then switch tabs about once or twice, then it stops working for no apparent reason