> Seems to be buggy for `q/', for me it returns `\' then.
>
>
>
> --
>
> Andy
Andy,
My function is buggy or expand("") is buggy? I tried:
au CmdwinEnter * let g:foo = expand('')
and
au CmdwinEnter * let g:foo = getcmdwintype()
both gave the same result ('/'). Anyway I think there
Am 25.07.2014 21:04, schrieb Jacob Niehus:
I think this is a useful function to allow different mappings
depending on the type of command window (ex, search, input, etc.). I
can add documentation if people agree.
-Jake
You can already check expand("") on CmdWinEnter.
Seems to be buggy for `q/
Jacob Niehus wrote:
> I think this is a useful function to allow different mappings depending
> on the type of command window (ex, search, input, etc.). I can add
> documentation if people agree.
I suppose it could be useful.
For adding new features, it's actually a good idea to write the
docum
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On July 25, 2014 11:04:09 PM GMT+03:00, Jacob Niehus
wrote:
>I think this is a useful function to allow different mappings depending
>on the type of command window (ex, search, input, etc.). I can add
>documentation if people agree.
>
>-Jake
>
>dif
Kind of, except this is for the command line window, not the command line.
getcmdtype() doesn't give the type of command line window you're in, and it
shouldn't because you can be in the command line window and use the command
line for a different type of command. In that case the two functions
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On July 26, 2014 4:07:01 AM GMT+03:00, James McCoy
wrote:
>On Fri, Jul 25, 2014 at 12:04:09PM -0700, Jacob Niehus wrote:
>> I think this is a useful function to allow different mappings
>> depending on the type of command window (ex, search, input,
On Fri, Jul 25, 2014 at 12:04:09PM -0700, Jacob Niehus wrote:
> I think this is a useful function to allow different mappings
> depending on the type of command window (ex, search, input, etc.). I
> can add documentation if people agree.
This is just reimplementing getcmdtype().
Cheers,
--
James
I should add that I know it's possible to do maps based on the CmdwinEnter
autocommand, but here's an example where this is useful. I have a map to delete
a history entry from the command line window. The way to do that now is to have
several autocommands to modify the map with which type of his
I think this is a useful function to allow different mappings depending on the
type of command window (ex, search, input, etc.). I can add documentation if
people agree.
-Jake
diff --git a/src/eval.c b/src/eval.c
--- a/src/eval.c
+++ b/src/eval.c
@@ -554,6 +554,7 @@
static void f_getcmdline __