setlocal shiftwidth=4 setlocal tabstop=4 " create closing xml tag when typing > " first write the actual closing bracket (>), then got to normal mode (), find " opening bracket (F<), go one step to the right (l), yank the tag name (yiw), " find the closing bracket (f>), start appending opening bracket and slash (a"), add closing bracket (>), leave " insert mode (), go back to opening bracket (F<), enter insert mode (i) inoremap > >Fa">F