>> In the quickfix window I mostly do <CTRL-W><Enter> instead of <Enter>
>> because mostly I want to open the matching file in a new window. This
>> all works fine.
>>
>> But now I wanted to map <Enter> to <CTRL-W><Enter> so that by pressing
>> <Enter> the matching filename would open in a new window (the old
>> <CTRL-W><Enter> behavior). Actually it seems a bit tricky and I
>> couldn't accomplish this.
>>
>> These are the things I tried
>>
>> " Doesn't work, pressing <Enter> does nothing
>> :map <buffer> <Enter> <CTRL-W><Enter>
>>
>> " Just to try if I can map <Enter> to somthing else, this works
>> :map <buffer> <Enter> any-command-with-only-letters-in-it
>>
>> So the problem seems to be that I can map <Enter> to almost anything,
>> except more complicated stuff like <CTRL-W><Enter>.
>
> Got it, this works:
>
> map <buffer> <Enter> <C-w><Enter>

Actually, there is still one mystifying thing about this. If the
quickfix list includes a file that is already open and it is selected
in the quickfix window with <CTRL-W><Enter> so that it is opened in a
new window then vim will jump to the window where the file is already
open (which is good) but will also open an empty window called No Name
right above the quickfix window. Is this intentional? How do I get rid
of this behavior? What I'm aiming for is have vim open the matching
file in a new window if the file is not open yet and if it already
open then just jump to it in its already opened window.

Any ideas?
Daniel

-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to