execute an alias with vim

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

execute an alias with vim

Mathieu
Hello,

I use many text files to write many things on my laptop, and i use
aliases to access them.
For exemple, suppose that i have the alias "foo" to access ~/bar with
vim.

alias foo='vim ~/bar'

So it works when i write   "foo"    in my terminal.

But I also want to use this alias in vim.
When i am in vim, i do "C-w n" to open one new window.
And then i try    :!foo

But it writes:

"/bin/bash: foo: command not found

le shell a retourné 127"

Can you help me?
Best regards,
Mathieu

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5918a9198df7dd2f6a0abf18a0666277cec85065.camel%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

tooth pik
On Wed, Jul 10, 2019 at 3:30 AM Mathieu Roux <[hidden email]> wrote:
>
> Hello,
>
> I use many text files to write many things on my laptop, and i use
> aliases to access them.

why?

> For exemple, suppose that i have the alias "foo" to access ~/bar with
> vim.
>
> alias foo='vim ~/bar'
>
> So it works when i write   "foo"    in my terminal.

sure -- but it would also work if you created a 'foo' in ~/bin with a
#!/bin/bash shebang
and a 'vim ~/bar' -- why not use that?  what is your fascination with aliases?

wherever you are defining your aliases (~/.bashrc?) is not being
executed by vim when
it needs a shell -- but really -- why not create a script on ~/bin?

> But I also want to use this alias in vim.
> When i am in vim, i do "C-w n" to open one new window.
> And then i try    :!foo
>
> But it writes:
>
> "/bin/bash: foo: command not found
>
> le shell a retourné 127"
>
> Can you help me?
> Best regards,
> Mathieu
>
> --
> --
> 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 [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5918a9198df7dd2f6a0abf18a0666277cec85065.camel%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CALfSX1y__nAp9v19ZxRVEo7snKBqNH9trw-9S9RV2nbUtmd2vA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Tony Mechelynck
In reply to this post by Mathieu
On Wed, Jul 10, 2019 at 10:30 AM Mathieu Roux <[hidden email]> wrote:

>
> Hello,
>
> I use many text files to write many things on my laptop, and i use
> aliases to access them.
> For exemple, suppose that i have the alias "foo" to access ~/bar with
> vim.
>
> alias foo='vim ~/bar'
>
> So it works when i write   "foo"    in my terminal.
>
> But I also want to use this alias in vim.
> When i am in vim, i do "C-w n" to open one new window.
> And then i try    :!foo
>
> But it writes:
>
> "/bin/bash: foo: command not found
>
> le shell a retourné 127"
>
> Can you help me?
> Best regards,
> Mathieu

When called from Vim to run an external :!command, the shell does not
source all the same startup files. I also have noticed that, for
instance, :!ll doesn't work in Vim (in a "normal" bash shell on my
system, ll is aliased to ls -l) so I have to use ls -l instead.

I think bash-from-Vim doesn't regard itself as an interactive shell
when used to run a :!command. If I type ":shell" (without the quotes)
in Vim, then ll gives me a long directory list.

Rather than call vim inside vim through the shell, why don't you do

        :new ~/bar

? That would open the file ~/bar in a split-window in the same Vim.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXvASJ_HvUGoXFcDHPvq%2BhpPjnBd%3DrDTQcSqmdRcGqR7ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Mathieu
In reply to this post by tooth pik
Thanks for your answer.

I love aliases since i am a child! i am absolutely fascinated by them!
i dream of them every night :-)

Hmmmm in fact aliases was the best way i found to do what i want. Just
a ligne in ~/.bashrc, so simple. And just to type "bar" in my terminal
to access the file.

So, I tried to create one file with shebang (in one directory in my
$PATH, ~/bin is not my path).

But when i do "c-w n" in vim, and then :!bar, the file is open in
another vim, not in my window i have just created!







On mer., 2019-07-10 at 03:45 -0500, tooth pik wrote:

> On Wed, Jul 10, 2019 at 3:30 AM Mathieu Roux <[hidden email]>
> wrote:
> >
> > Hello,
> >
> > I use many text files to write many things on my laptop, and i use
> > aliases to access them.
>
> why?
>
> > For exemple, suppose that i have the alias "foo" to access ~/bar
> > with
> > vim.
> >
> > alias foo='vim ~/bar'
> >
> > So it works when i write   "foo"    in my terminal.
>
> sure -- but it would also work if you created a 'foo' in ~/bin with a
> #!/bin/bash shebang
> and a 'vim ~/bar' -- why not use that?  what is your fascination with
> aliases?
>
> wherever you are defining your aliases (~/.bashrc?) is not being
> executed by vim when
> it needs a shell -- but really -- why not create a script on ~/bin?
>
> > But I also want to use this alias in vim.
> > When i am in vim, i do "C-w n" to open one new window.
> > And then i try    :!foo
> >
> > But it writes:
> >
> > "/bin/bash: foo: command not found
> >
> > le shell a retourné 127"
> >
> > Can you help me?
> > Best regards,
> > Mathieu
> >
> > --
> > --
> > 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 [hidden email].
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/vim_use/5918a9198df7dd2f6a0abf18a0666277cec85065.camel%40gmail.com
> > .
> > For more options, visit https://groups.google.com/d/optout.
>
> --

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/63a7d024c12fd4a6e6648928c9ab4b9bd2324d91.camel%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Tony Mechelynck
On Wed, Jul 10, 2019 at 11:25 AM Mathieu Roux <[hidden email]> wrote:

>
> Thanks for your answer.
>
> I love aliases since i am a child! i am absolutely fascinated by them!
> i dream of them every night :-)
>
> Hmmmm in fact aliases was the best way i found to do what i want. Just
> a ligne in ~/.bashrc, so simple. And just to type "bar" in my terminal
> to access the file.
>
> So, I tried to create one file with shebang (in one directory in my
> $PATH, ~/bin is not my path).
>
> But when i do "c-w n" in vim, and then :!bar, the file is open in
> another vim, not in my window i have just created!

That is because your alias invokes a new instance of Vim.

See :help clientserver to make a new shell talk to an existing instance of Vim.

Best regards,
Tony.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXsJZPmm6G9uzNyT9xWrLgx_gQCrz5Q_7Nxik3vt%2Bd8KxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Kit
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Kit
In reply to this post by Mathieu
> I love aliases since i am a child! i am absolutely fascinated by them!
> i dream of them every night :-)

Try this alias:
alias .bashrc="vim $HOME/.bashrc; . $HOME/.bashrc"

> Hmmmm in fact aliases was the best way i found to do what i want. Just
> a ligne in ~/.bashrc, so simple. And just to type "bar" in my terminal
> to access the file.

Try this:
:new .
select and <Enter>

> So, I tried to create one file with shebang (in one directory in my
> $PATH, ~/bin is not my path).

add "$HOME/bin" into your PATH. This is the standard for your binaries.
--
Kit

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAAVKVq-A%3Dkp0PzB-tOqtbn9YpnWTtTY3hTjOBDj50u99MtMfLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Mathieu
I really don't understand what you want with your alias .bashrc???


And when you write
:new .
select and <Enter>
What do you mean? select what?



On mer., 2019-07-10 at 14:24 +0200, Kit wrote:

> > I love aliases since i am a child! i am absolutely fascinated by
> > them!
> > i dream of them every night :-)
>
> Try this alias:
> alias .bashrc="vim $HOME/.bashrc; . $HOME/.bashrc"
>
> > Hmmmm in fact aliases was the best way i found to do what i want.
> > Just
> > a ligne in ~/.bashrc, so simple. And just to type "bar" in my
> > terminal
> > to access the file.
>
> Try this:
> :new .
> select and <Enter>
>
> > So, I tried to create one file with shebang (in one directory in my
> > $PATH, ~/bin is not my path).
>
> add "$HOME/bin" into your PATH. This is the standard for your
> binaries.
> --
> Kit
>
> --

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/345517c830af8d84ffb3305dda1950e7cc430d1b.camel%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Kit
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Kit
> I really don't understand what you want with your alias .bashrc???

I use this alias for edit ~/.bashrc and reload it.

> And when you write
> :new .
> select and <Enter>
> What do you mean? select what?

Select file in Vim. Simply open directory and select file. Enter will
open this file.
--
Kit

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAAVKVq-fqbBeq3PME3CrKF37zeCdM0%2BV%2BqiYormsp%2B1MRQAp5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Mathieu
I am not sure it helps me a lot.

Of course i can explore and select manually my file... but i prefer
something quicker!



On mer., 2019-07-10 at 14:50 +0200, Kit wrote:

> > I really don't understand what you want with your alias .bashrc???
>
> I use this alias for edit ~/.bashrc and reload it.
>
> > And when you write
> > :new .
> > select and <Enter>
> > What do you mean? select what?
>
> Select file in Vim. Simply open directory and select file. Enter will
> open this file.
> --
> Kit
>
> --

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/dcbc485429e6b24a8f5cef75bab9e8464c36eeff.camel%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Andreas Perstinger
In reply to this post by Mathieu
On 10.07.19 10:30, Mathieu Roux wrote:
> I use many text files to write many things on my laptop, and i use
> aliases to access them.
> For exemple, suppose that i have the alias "foo" to access ~/bar with
> vim.
>
> alias foo='vim ~/bar'
>
> So it works when i write   "foo"    in my terminal.

I suppose you use the aliases because your filenames are rather long
and/or the files are in a deeply nested directory (e.g.
/very/long/path/to/the/file/foo.txt)

If that's the case I would suggest to

a) create a directory in your $HOME and create symbolic links to all the
files you want to access with a short name in that directory.

b) in vim set the 'path' option to that directory

c) to open the files use :find instead of :new or :edit.

See also :help path and :help find

Bye, Andreas

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/476d7625-15a9-257f-04c5-a330d884c776%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Mathieu
Very good solution! thank you very much!




On mer., 2019-07-10 at 16:22 +0200, Andreas Perstinger wrote:

> On 10.07.19 10:30, Mathieu Roux wrote:
> > I use many text files to write many things on my laptop, and i use
> > aliases to access them.
> > For exemple, suppose that i have the alias "foo" to access ~/bar
> > with
> > vim.
> >
> > alias foo='vim ~/bar'
> >
> > So it works when i write   "foo"    in my terminal.
>
> I suppose you use the aliases because your filenames are rather long
> and/or the files are in a deeply nested directory (e.g.
> /very/long/path/to/the/file/foo.txt)
>
> If that's the case I would suggest to
>
> a) create a directory in your $HOME and create symbolic links to all
> the
> files you want to access with a short name in that directory.
>
> b) in vim set the 'path' option to that directory
>
> c) to open the files use :find instead of :new or :edit.
>
> See also :help path and :help find
>
> Bye, Andreas
>
> --

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/4b1d8c56a2833cf10c7b42bdf33719edec268c8c.camel%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

OT: aliases vs functions vs executables

Grant Taylor-2
In reply to this post by Mathieu
On 7/10/19 3:25 AM, Mathieu Roux wrote:
> I love aliases since i am a child! i am absolutely fascinated by them!
> i dream of them every night:-)

Aliases can be quite useful.  But they generally only work /in/ /the/
/shell/.  If you want to use (something like) an alias /outside/ /of/
/the/ /shell/ you quite likely need to use something other than an alias.

Scripts or other executables—that are in the $PATH—are quite good for this.

The 3rd alternative, function, will likely have the same limitations as
aliases.

As a general rule, if I want to use something outside of the interactive
shell, I use an executable.  This applies equally as well to things like
running :!theCommand from within vim to running theCommand remotely via
ssh to creating desktop shortcuts that search the $PATH.



--
Grant. . . .
unix || die

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/bb591a4f-b655-0aba-7b80-96143fda1377%40spamtrap.tnetconsulting.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: OT: aliases vs functions vs executables

Timothy Rice
> As a general rule, if I want to use something outside of the interactive
> shell, I use an executable.  This applies equally as well to things like
> running :!theCommand from within vim to running theCommand remotely via ssh
> to creating desktop shortcuts that search the $PATH.

According to the Bash manual (man 1 bash), one can use shopt to set
expand_aliases to true. This should allow access to aliases in
non-interactive settings. (I have not tested it, though.)

A workaround I came across a long time ago was to keep aliases in a
separate file, which gets sourced by ~/.bashrc, but which can also be
sourced by a wrapper script like so:

```
#! /bin/bash
. ~/bashrc.d/aliases.sh

ALIAS=$1
ARGS=${@:2}

bash -c "${BASH_ALIASES[$ALIAS]} $ARGS"
```

So, if ~/bashrc.d/aliases.sh contains the line `alias foo="vim ~/bar"`, and
if that wrapper script is named `baz` somewhere in my $PATH, this should
work in non-interactive settings:

baz foo

It will source the aliases file, find the alias foo, and thus execute
`vim ~/bar`.

But if using shopt to set expand_aliases works, it is probably a superior
approach to my workaround.

~ Tim

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190710230345.GA22826%40sleipnir.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Enno
In reply to this post by Mathieu
Le mercredi 10 juillet 2019 05:30:19 UTC-3, Mathieu Roux a écrit :

> Hello,
>
> I use many text files to write many things on my laptop, and i use
> aliases to access them.
> For exemple, suppose that i have the alias "foo" to access ~/bar with
> vim.
>
> alias foo='vim ~/bar'
>
> So it works when i write   "foo"    in my terminal.
>
> But I also want to use this alias in vim.
> When i am in vim, i do "C-w n" to open one new window.
> And then i try    :!foo
>
> But it writes:
>
> "/bin/bash: foo: command not found
>
> le shell a retourné 127"
>
> Can you help me?
> Best regards,
> Mathieu
If you use bash, then define the aliases in `~/.bash_profile` and add

let $BASH_ENV = $HOME.'/.bash_profile'

to your vimrc. See also

http://stackoverflow.com/questions/4642822/commands-executed-from-vim-are-not-recognizing-bash-command-aliases/19819036#19819036

and

and http://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables/117470#117470


If you use zsh, then add them in `~/.zshenv` (instead of ~/.zshrc`) as well as the line 'setopt aliases'.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/cb014739-5208-4d8c-b103-cf70eec66d33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: OT: aliases vs functions vs executables

arocker
In reply to this post by Timothy Rice

Something to bear in mind with all this aliasing, linking, and
environmental trickery is the effect on subsequent maintainability.

Even if you ensure that it's properly documented and generally understood,
how many hours are going to be spent figuring out what's going on before
any real problem gets addressed? How much time and effort do you have to
save to justify it?

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/e00ecbc91d628acc8bfb406a40a394f9.squirrel%40webmail.vybenetworks.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: OT: aliases vs functions vs executables

Grant Taylor-2
On 7/11/19 7:57 AM, [hidden email] wrote:
> Something to bear in mind with all this aliasing, linking, and
> environmental trickery is the effect on subsequent maintainability.
>
> Even if you ensure that it's properly documented and generally understood,
> how many hours are going to be spent figuring out what's going on before
> any real problem gets addressed? How much time and effort do you have
> to save to justify it?

All very good points.

IMHO that's another reason for actual scripts that are in the $PATH.



--
Grant. . . .
unix || die

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/0ccc69a8-3aa1-d955-1f15-a52a871d83d0%40spamtrap.tnetconsulting.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: execute an alias with vim

Christian Brabandt
In reply to this post by Mathieu

On Mi, 10 Jul 2019, Mathieu Roux wrote:

> Hello,
>
> I use many text files to write many things on my laptop, and i use
> aliases to access them.
> For exemple, suppose that i have the alias "foo" to access ~/bar with
> vim.
>
> alias foo='vim ~/bar'
>
> So it works when i write   "foo"    in my terminal.
>
> But I also want to use this alias in vim.
> When i am in vim, i do "C-w n" to open one new window.
> And then i try    :!foo
>
> But it writes:
>
> "/bin/bash: foo: command not found
>
> le shell a retourné 127"

I believe, if you set the shellcmdflag  to -ic Vim will run an
interactive shell (which in turn should read your alias file).

Mit freundlichen Grüßen
Christian
--
Wir sind doch alle nur Schachfiguren, sagte der König zum Bauern.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190714132804.GE31610%40256bit.org.
For more options, visit https://groups.google.com/d/optout.