New answers tagged comments
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
Related Tags
comments × 110formatting × 15
vimscript × 12
vimrc × 10
neovim × 9
syntax-highlighting × 7
indentation × 7
folding × 7
plugin-vim-commentary × 7
key-bindings × 6
visual-mode × 5
plugin-nerdcommenter × 5
autocmd × 4
filetype-markdown × 4
substitute × 3
colorscheme × 3
filetype × 3
filetype-c++ × 3
alignment × 3
filetype-javascript × 3
regular-expression × 2
command-line × 2
cut-copy-paste × 2
highlight × 2
visual-block × 2