I would like something similar too this in my .vimrc
.
let dir=“/home/user/Downloads/”
set path=$dir
nnoremap gr :grep '\b<cword>\b' $dir/*<CR>
The code above is wrong of course, but maybe you can understand what I am trying to do. I would like to set path
to the value of dir
to /home/user/Downloads/
, and replace the word dir
in the third line with the value of dir
. I tried and failed, can anyone tell help me out, any help appreciated!