When searching string with notepad++, new window opens and shows find results. I want to use this feature in vim. After googling I found out some suggestions:
Those two commands can be shortened and chained: :vim foo %|co
. You can pull the word under the cursor like this: :vim
.
Here is a quick normal mode mapping that you can use to list all the occurrences of the word under your cursor in the quickfix window:
nnoremap :vimgrep //j % cwindow
You can also use :il[ist] foo
to display a list of all the occurrences of foo
or [I
to display the same list for the word under your cursor.
When the list is displayed, use :{line number}
to jump to the corresponding line.