84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
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?