blob: d1ce4a3cffddc6fe6ac37a0a9529352a3b524c06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
" ~/.vim/ftplugin/html/html.vim
" HTML-specific vim configuration
"
" Syntastic linter: tidy
" Tabs are expanded to 2 spaces
setlocal tabstop=2 shiftwidth=2 expandtab
" Show existing tabs (they can be deleted with :retab)
setlocal list
" Column marker: 100 characters
call matchadd('ColorColumn', '\%101v', 100)
setlocal textwidth=100
let mapleader = " "
nnoremap <buffer> <leader>o :w<CR>:!$BROWSER % &<CR><CR>
nnoremap <buffer> <leader>f :!firefox --new-window % &<CR><CR>
nnoremap <buffer> <leader>C :sp ~/.vim/ftplugin/html/html.vim<CR>
nnoremap <buffer> <leader>e :Errors<CR>
nnoremap <buffer> <leader>temp :-1r ~/.vim/ftplugin/html/snips/template.txt<CR>Gdd?<+++><CR>cf>
let mapleader = ","
" Layout elements
inoremap <buffer> <leader>header <header><Enter><Enter></header><Enter><++><Esc>kki
inoremap <buffer> <leader>nav <nav><Enter><Enter></nav><Enter><++><Esc>kki
inoremap <buffer> <leader>section <section><Enter><Enter></section><Enter><++><Esc>kki
inoremap <buffer> <leader>article <article><Enter><Enter></article><Enter><++><Esc>kki
inoremap <buffer> <leader>footer <footer><Enter><Enter></footer><Enter><++><Esc>kki
inoremap <buffer> <leader>aside <aside><Enter><Enter></aside><Enter><++><Esc>kki
inoremap <buffer> <leader>div <div class=""><Enter><++><Enter></div><Enter><++><Esc>?""<Enter>a
" Headers and paragraphs
inoremap <buffer> <leader>h1 <h1></h1><Enter><++><Esc>?</h1><Enter>i
inoremap <buffer> <leader>h2 <h2></h2><Enter><++><Esc>?</h2><Enter>i
inoremap <buffer> <leader>h3 <h3></h3><Enter><++><Esc>?</h3><Enter>i
inoremap <buffer> <leader>h4 <h4></h4><Enter><++><Esc>?</h4><Enter>i
inoremap <buffer> <leader>h5 <h5></h5><Enter><++><Esc>?</h5><Enter>i
inoremap <buffer> <leader>h6 <h6></h6><Enter><++><Esc>?</h6><Enter>i
inoremap <buffer> <leader>p <p></p><Enter><++><Esc>?</p><Enter>i
" Text formatting
inoremap <buffer> <leader>b <b></b><++><Esc>?</b><Enter>i
inoremap <buffer> <leader>i <i></i><++><Esc>?</i><Enter>i
inoremap <buffer> <leader>em <em></em><++><Esc>?</em><Enter>i
inoremap <buffer> <leader>code <code></code><++><Esc>?</code><Enter>i
inoremap <buffer> <leader>sub <sub></sub><++><Esc>?</sub><Enter>i
inoremap <buffer> <leader>sup <sup></sup><++><Esc>?</sup><Enter>i
inoremap <buffer> <leader>cite <cite></cite><++><Esc>?</cite><Enter>i
" Tables
inoremap <buffer> <leader>table <table border=""><Enter><caption><++></caption><Enter><thead><Enter><tr><Enter><++><Enter></tr><Enter></thead><Enter><tbody><Enter><++><Enter></tbody><Enter></table><Enter><++><Esc>?""<Enter>a
inoremap <buffer> <leader>tr <tr><Enter><Enter></tr><Enter><++><Esc>kki
inoremap <buffer> <leader>th <th></th><Enter><++><Esc>?</<Enter>i
inoremap <buffer> <leader>td <td></td><Enter><++><Esc>?</<Enter>i
" Lists
inoremap <buffer> <leader>ul <ul><Enter><li></li><Enter><++><Enter></ul><Enter><++><Esc>?</l<Enter>i
inoremap <buffer> <leader>ol <ol><Enter><li></li><Enter><++><Enter></ol><Enter><++><Esc>?</l<Enter>i
inoremap <buffer> <leader>li <li></li><Enter><++><Esc>?</<Enter>i
" Forms
inoremap <buffer> <leader>form <form><Enter><fieldset><Enter><Enter></fieldset><Enter></form><Enter><++><Esc>3ki
inoremap <buffer> <leader>fs <fieldset><Enter><Enter></fieldset><Enter><++><Esc>kki
inoremap <buffer> <leader>legend <legend></legend><Enter><++><Esc>?</<Enter>i
inoremap <buffer> <leader>label <label><input type="<++>"></label><Enter><++><Esc>?<i<Enter>i
" Media
inoremap <buffer> <leader>a <a href=""><++></a><Enter><++><Esc>?""<Enter>a
inoremap <buffer> <leader>img <img src="" alt="<++>"><Enter><++><Esc>?""<Enter>a
" Misc
" Comment a line
nnoremap <buffer> <leader>c I<!-- <Esc>A --><Esc>0
" Uncomment a line
nnoremap <buffer> <leader>C 05x/--><Enter>3x0
|