Thursday, 15 April 2010

how to open multiple files in vim after vimgrep -


I am using gvim *. Using vimgrep on current directory to get text in Sql files. When searching for files, it only shows me the file name at a time and finally opens a file

Is it possible to open all the files in tabs? Actually I want to open all the files because I want to change the 'vimgrepped' pattern with any other text to automate action on QuickFix list places, I've written a command like : bufdo

or : windo which executes a command for each item.

  command! Call the -nargs = + Qfixdo QuickFixDo (& lt; q-args & gt;) function! For buffnam = {} for QuickFixDo (CMD) Q, go to bufnam [q.bufnr] = bufnr (q.bufnr) for k in n (bufnam) exe 'buffer' n exe a: endfunction for cmd update end  

Using one of the following files, you can open all the files mentioned in the QuickFix list.

 : Qfixdo tab sp  

Additionally, the replacement can be repeated in the same way.

 : Qfixdo% s / pattern / string /  

No comments:

Post a Comment