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 <[email protected]> > 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 [email protected]. > > 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 [email protected]. 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.
