vim-hoogle
vim-hoogle copied to clipboard
Use searchpos to get the full enclosed word instead of expanding <cword>
When you use :Hoogle without passing any parameters, it uses expand("<cword>") to get the underlying word under the cursor.
For fully qualified module names, like Graphics.Gloss.Data.ViewPort, it would only get the word between the dots around your cursor position.
By using searchpos instead, it matches with the surrounding spaces either side and/or the newline characters, resulting in capturing the full text object (even operators like '<$>').