I'm trying to write a vim-script function, which allows me to
grep the word under cursor easily in my project.
function! CustomGrep() vimgrep expand("<cword>") **/*.h **/*.hpp **/*.c **/*.cpp endfunction
However, when I executed
:call CustomGrep() in my vim, I got an error:
E480: No match: expand("<cword>")
Did I do something wrong here?