vim: how to grep from current directory?
grep, vim
Solution
I have the `<leader>cd` to `%:p:h`mapping too, it is nice.
However for your needs, this line may be better
:grep [options] 'pattern' %:p:h/*
this will do `grep` from the path of current open file, and keep your real current directory (`pwd`) untouched.
Problem
I run `vim .` in some directory. Inside vim I move to another directory. There I run `:grep` command which searches from the first directory where I run `vim .`. How to configure vim to `:grep` from the path where currently it is?