thanks Chris, this works! I didn't know that vim can:
define a map for just one filetype
further, just for one buffer.
that's nice!


On Wed, Dec 18, 2013 at 4:39 AM, Christian Brabandt <[email protected]>wrote:

> On Wed, December 18, 2013 10:30, ping song wrote:
> > I guess this is an old topic, at least I asked earlier some time ago.
> > but I seems never got the good resolution...
> >
> > quickfix windows is handy. the :cXXX commands are also good. current work
> > flow is sth like this:
> >
> > 1. you search via vimgrep
> > :vimgrep /abc/gj ##
> >
> > 2. :cw to open the quickfix(QF) win
> >
> > 3. navigate in the QF win and , hit enter in a match
> >
> > 4. the original buffer which contains the matched line will be displayed
> >
> > 5. at the same time you will be moved into the original buffer on to that
> > matched line
> >
> > 6. you have to jump back to the QF win manually
> >
> > 7. go to 3.
> >
> > everything is great, except step 5 & 6 here cause some extra work.
> >
> > is there a way to avoid just step 4, that is to just remain in the QF
> > window when you hit <ENTER> on a matched line ? that will be really much
> > faster when you navigate through the matched lines in QF win..
> >
> > this is a nice feature that I ever seen from notepad++ or ultraeditor
> that
> > my colleague is using...
> >
> > I was thinking to make some maps to automatically jump back after a
> > <ENTER>, but I don't know how to make that map to only work under QF
> > window.
>
> either use a ftplugin file and map <CR> only for the qf filetype
> or create an autocommand like this
>
> augroup MyQFCommand
> au!
> au FileType qf nnoremap <buffer> <CR> <CR><C-W>p
> augroup END
>
> regards,
> Christian
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to