Saturday, October 1, 2016

Re: Possible to have :e autocompletion show entries from multiple folders?

On Sat, Oct 01, 2016 at 06:33:09PM -0700, Eric Pruitt wrote:
> This is what I came up with:
>
> cabbrev E e <C-r>=$PWD<CR>/<C-r>=getchar(0) == 32 ? '' : getchar(0) == 32<CR>
>
> This will make :E+<Space> prefill :e with the value of $PWD which should
> be the folder Vim was launched in.

That attempt was horrifically broken. Here's a much better version:

cabbrev E e <C-r>=getchar(1) == 32 ? getchar(0)[9] . $PWD . "/" : ''<CR>

Eric

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment