vim - How can I get quickfix to open results in the previously focused window? -


I have written the following command to search help for VIM:

  command! -n = 1 -complete = Help SearchHelp \ help | Executed "grep! -i  $ VIMRUNTIME / doc / -r" | For example, when I forget the key to increase the number under the cursor, I can:  
 : SearchHel increment  

help To answer searches through files (Answer Done.)

The problem is ... I have some windows open, And I want quickfix to leave them immediately. When I & lt; Enter & gt; Hit in the Quickfix list, I want it to open Open Results in that Help window , which I open at the beginning of the command.

But it does not do this. It seems that it is always preferred to open the bottom result of all of its edits window, regardless of the window I have been focusing on, and with the complete indifference of the help window I opened it clearly Anything done for editing in the file is deleted (yes, I have : hidden ), in which & lt; Ctrl-O & gt; A arbitrary number of keys is required

Then how can I get to the first in the Focus window to get it instantly (ideally the help window that was split open) ?

(By coincidence, I occasionally use the Egappan Laxman's old grep.vim plugin, and in some way it does open it : In the Face the focus window was focused on the results window I had previously run : Grep . I'm not sure what is different between the two situations.)

behavior (with other people like : sbuffer ) 'switchbuf' / Code> option. With the value of useopen , if you already show help page, then you can reuse it window if you need more control than that option, then you can use the custom command / Mapping is required to use.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -