I want to write a mapping that does
feedkeys(":cd " . getcwd()), waits for me to edit the directory and then press enter, and then runs a command such as
:Rg from the fzf plugin.
I tried doing this:
function! Rg_choose_dir() call feedkeys(":cd " . getcwd()) :Rg endfunction
but that has the effect of
:Rg with the argument to
feedkeys as the pattern. How can I get the behaviour I want?