" Stefans vim-file plugin " ---- " TABS " ---- setlocal noexpandtab setlocal shiftwidth=4 setlocal tabstop=4 setlocal formatoptions=tcroq command! -nargs=1 -range HtmlAddTag call HtmlAddTag("", , ) function! HtmlAddTag(tag, line1, line2) let s:visualStart = '`<' let s:visualEnd = '`>' " für Endtag nur das erste Wort verwenden: let l:endtag = substitute(a:tag, '\s*\(\w\+\).*', '\1', '') execute('normal ' . s:visualStart . '"vd' \ . s:visualEnd . 'i<' . a:tag . ">\v') endfunction " Tag Select/Wrapper " These mappings and TagSelection function will allow you to place " an XML tag around either the current word, or the current selected " text "nmap _t viw_t "vnoremap _t :call TagSelection() " "nmap _t viw_t "vnoremap _t :call TagSelection() " "function! TagSelection() " let l:tag = input("Tag name? ") " " exec "normal `>a\e" " " Strip off all but the first work in the tag for the end tag " exec "normal `>a\).*', '\1>\e', "" ) " exec "normal `\e', "" ) "endfunction " commenting "let b:commentstring = '"' " Grep options let b:GrepFiles = '*.html *.htm'