Commits

Shlomi Fish committed 986564a

Add the XML spell-check enhancement to the vimrc.

  • Participants
  • Parent commits ab433cf

Comments (0)

Files changed (1)

File shlomif-settings/vim-conf/vimrc.vim

 map <F6> <ESC>:Ack -ai <C-R><C-W> t2 lib<CR>
 
 set t_Co=256
+
+" Spell freeform text inside XML tags.
+" See:
+" http://stackoverflow.com/questions/9234925/spell-check-with-vim-and-xml-automatically
+function Shlomif_XML_file_type()
+    let fn = expand("<afile>:p")
+    " Only for XML files under my homepage for now.
+    if (match(fn, "Docs/homepage/") >= 0)
+        syn spell toplevel
+    end
+endfunction
+
+autocmd FileType xml call Shlomif_XML_file_type()