Tuesday, March 30, 2010

Re: Why no window-local mapping?

Am 30.03.2010 14:18, schrieb Jeenu:
> Hi,
>
> I know of<buffer> local mapping and global mapping. I wonder why
> there isn't a<window>/<tab> local mapping option for Vim. I use some
> Vim windows/tabs exclusively for navigating quick fix lists. On those
> windows, I keep<C-N> nd<C-P> globally mapped to :lnext (or :cnext)
> and :lprevious. The problem with buffer-local mappings here is that
> every time the list will load a new buffer which might not have this
> mapping set. Had the mappings been window- or tab-local, I could have
> reused the same mappings on other windows for something else - may be
> page navigation.
>
> Any reason why those are omitted, and any plans to have them in Vim?

Do you think of
:map <window>
:map <tabpage>
next to
:map <buffer>
?

Hmm, logic says using more modifiers is a bit wrong, as
<window>, <tabpage>, <buffer> cannot be combined in one mapping.

There have been similar requests for mappings local to the filetype
(why have duplicated mappings in all buffers sharing the same
filetype?), and mappings local to a specific syntax region (inspired
by TextMate?).

But I guess, all these will just make Vim overly complicated; and with
some scripting it is already possible.


Another problem:
how do you think windows should be identified -- by number?

--
Andy

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: