New answers tagged

0 votes
Accepted

How can add the comment lines when call function?

Function append works with list of lines which you initially had in your boilerplate variable. Then you have added to the second line something that vim can't understand presumably you wanted to add ...
  • 12k
1 vote

Why the comment can't be set at the second line instead of first line?

I came up with a solution that coexists with the XDG file template mechanism. Part 1: create a file template containing the shebang etc. File ~/Templates/python.py: #!/usr/bin/env python3 # -*- coding:...
  • 238
0 votes
Accepted

Why the comment can't be set at the second line instead of first line?

First, you should :help append() a list instead of calling append() several times and keeping track of the current line and all: let boilerplate = [ \ "#!/usr/bin/env python3", \ &...
  • 36k

Top 50 recent answers are included