From cb8c29e935582655f80aa98048093fc839f6f9b5 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Sun, 23 Apr 2017 13:27:30 +0100 Subject: [PATCH] Add html shortcuts --- .vimrc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 053c464..4a581a4 100644 --- a/.vimrc +++ b/.vimrc @@ -77,7 +77,7 @@ let g:airline_theme='dark' " Functions {{{1 function! NextMark() - execute "normal! /(<.>)\da(" + execute "normal! /(<.>)\zvda(" execute "startinsert" endfunction @@ -178,8 +178,21 @@ endfun " File Type Specific {{{1 augroup file_web autocmd! - "autocmd FileType html,css,less,javascript,php setlocal foldmethod=indent foldenable + autocmd FileType html,css,less,javascript,php setlocal foldmethod=indent foldenable augroup END + +augroup htmlShortcuts + autocmd FileType html inoremap ;b (<.>)FbT>i + autocmd FileType html inoremap ;i (<.>)FeT>i + autocmd FileType html inoremap ;1

(<.>)2kf ;2

(<.>)2kf ;3

(<.>)2kf ;p

(<.>)02kf>a + autocmd FileType html inoremap ;a href="">(<.>)(<.>)F"i + autocmd FileType html inoremap ;ul
(<.>)03kf ;li o
  • F>a + autocmd FileType html inoremap ;ol
    (<.>)03kf