Re: Vim-script question

2020-12-13 Thread 'Klaus Jantzen' via vim_use
On 12/10/20 4:03 PM, 'Klaus Jantzen' via vim_use wrote: Hi, I want to include in my .vimrc an autocommand that writes some new lines into an empty file e.g. an zsh script. So I wrote au  BufNewFile *.zsh :a "#! /usr/bin/zsh" but that does not do what I want (it does not do anything). So my

Re: Vim-script question

2020-12-10 Thread Charles Campbell
aroc...@vex.net wrote: I want to include in my .vimrc an autocommand that writes some new lines into an empty file e.g. an zsh script. A possible alternative is to use a "here" document containing whatever boilerplate you want, in a shell script that then opens vim on the resulting file. Anot

Re: Vim-script question

2020-12-10 Thread arocker
> I want to include in my .vimrc an autocommand that writes some new lines > into an empty file e.g. an zsh script. > A possible alternative is to use a "here" document containing whatever boilerplate you want, in a shell script that then opens vim on the resulting file. -- -- You received th

Re: Vim-script question

2020-12-10 Thread Gary Johnson
On 2020-12-10, 'Klaus Jantzen' via vim_use wrote: > Hi, > > I want to include in my .vimrc an autocommand that writes some new > lines into an empty file e.g. an zsh script. > > So I wrote > > au  BufNewFile *.zsh :a "#! /usr/bin/zsh" > > but that does not do what I want (it does not do anythin

Re: Vim-script question

2020-12-10 Thread Tony Mechelynck
On Thu, Dec 10, 2020 at 6:01 PM 'Klaus Jantzen' via vim_use wrote: > > Hi, > > I want to include in my .vimrc an autocommand that writes some new lines > into an empty file e.g. an zsh script. > > So I wrote > > au BufNewFile *.zsh :a "#! /usr/bin/zsh" > > but that does not do what I want (it doe

Vim-script question

2020-12-10 Thread 'Klaus Jantzen' via vim_use
Hi, I want to include in my .vimrc an autocommand that writes some new lines into an empty file e.g. an zsh script. So I wrote au  BufNewFile *.zsh :a "#! /usr/bin/zsh" but that does not do what I want (it does not do anything). So my question: How can I write with the autocommand one or mo