I'm trying to improve my vim-abilities. I'm writing a command and a function to find the current Word under the cursor. What I want to be able to do is type
:FindFile and have the word under the current cursor open.
" Find the file under the current W word. function! FindFile() let l:contents = @" normal viWy find l:contents set @" = l:contents endfunction command! FindFile :call FindFile()