mileszs / ack.vim

Vim plugin for the Perl module / CLI script 'ack'
Other
3.08k stars 396 forks source link

Keep initial search path #265

Open neur1n opened 4 years ago

neur1n commented 4 years ago

I'm using an autocmd autocmd BufEnter * silent! lcd %:p:h in my init.vim/vimrc to automatically change directory to the opened file. When I open a file from the search results, this autocmd will be triggered (sometimes). I would like to create a pull request to avoid this behavior, so that I can always search from the initial path, e.g. root directory of a project. But even I read the source code I'm not sure which line of the code opens the file from the result. Would you please point it out? Thanks.