setline(1,"\"use strict\"")No.
setline(1,"\"use strict\"")
小伙看你根骨奇佳,潜力无限,来学PHP伐。
Use the automated build tool gulp to write ES6 directly after configuration
function! s:add_title() if &filetype == 'javascript' call setline(1, 'use strict') call append(line('.'), '') endif endfunction autocmd BufNewFile *.js execute "call s:add_title()"
This is convenient for adding similar functions to other types of files in the future. See Vim to automatically add file headers when creating new files
Or just for this usage scenario:
function! s:add_title_js() call setline(1,'use strict') call append(line('.'), '') endfunction autocmd FileType javascript execute "call s:add_title_js()"
What editor are you using?
Use the automated build tool gulp to write ES6 directly after configuration
This is convenient for adding similar functions to other types of files in the future. See Vim to automatically add file headers when creating new files
Or just for this usage scenario:
What editor are you using?