5

I am trying to map the tab-key to the down-arrow-key , which works perfectly fine. However, I am trying to find a way to do that only for a specific URL. Tried to use autocommand the following way:

autocmd LocationChange www.google.de :map -modes=i,t <TAB> <DOWN>

However, that actually applies to all URLs I navigate to later on. Is there a way to either setting the scope for the URL in another way; or can I somehowe use the autocmd! to destroy that keybinding? Thanks in advance for any hints, Oli

1 Answer 1

2

Try adding this to your .pentadactylrc:

group googlythings -Description "Google sites" -locations google.de
map -modes input,text-edit <Tab> <Down>

From the docs:

:help group

In order to facilitate script writing, especially scripts which only apply to certain web sites, many types of commands and mappings can be assigned to a named group.

[snip]

After invocation, {group} becomes the default group for all further commands issued in the current script.

Make sure that any commands you have after these lines are meant for "Google sites" only, or you might waste a lot of time wondering why some command only works there! You can, of course, just use another group command, too.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .