autofill new html files with a skeleton template, like other file types
Generated by Mistral Vibe.
This commit is contained in:
+5
-6
@@ -224,6 +224,10 @@ endfunction
|
||||
function! TESTSFile()
|
||||
silent! 0r $HOME/.vim/templates/skeleton_tests.hpp
|
||||
endfunction
|
||||
" to autofill a new html file
|
||||
function! HTMLFile()
|
||||
silent! 0r $HOME/.vim/templates/skeleton.html
|
||||
endfunction
|
||||
|
||||
" autofill calls
|
||||
autocmd BufNewFile *.hpp call HPPFile()
|
||||
@@ -231,6 +235,7 @@ autocmd BufNewFile *.cpp if @% == 'main.cpp' | call MAINCPPFile() | else | call
|
||||
autocmd BufNewFile Makefile call MAKEFile()
|
||||
autocmd BufNewFile colors.h call COLORFile()
|
||||
autocmd BufNewFile tests.hpp call TESTSFile()
|
||||
autocmd BufNewFile *.html call HTMLFile()
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" pour mettre en gras dans des fichiers txt
|
||||
@@ -253,9 +258,3 @@ au filetype text syn match Asterisks contained "\*\*" conceal
|
||||
au filetype text syn match EscapedAsterisks contained "\\" conceal
|
||||
au filetype text syn match AsteriskBold "\*\*.*\*\*" contains=Asterisks,EscapedAsterisks
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" remplis les elements de base d'un fichier html
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
command! Html 0s/^/<!DOCTYPE html>\r<html lang="en" dir="ltr">\r\t<head>\r\t\t<meta charset="UTF-8">\r\t\t<meta name="viewport" content="width=device-width, initial-scale=1.0">\r\t\t<title><\/title>\r\t\t<meta name="description" content="description du site web">\r\t\t<meta name="keywords" content="truc, bidule, chouette">\r\t\t<link href=".\/style.css" type="text\/css" rel="stylesheet">\r\t\t<script type="text\/javascript" src="script.js" defer><\/script>\r\t<\/head>\r\t<body>\r\r\t<\/body>\r<\/html>
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title></title>
|
||||
<meta name="description" content="description du site web">
|
||||
<meta name="keywords" content="truc, bidule, chouette">
|
||||
<link href="./style.css" type="text/css" rel="stylesheet">
|
||||
<script type="text/javascript" src="script.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user