public
Created

vimrc snippet

  • Download Gist
.vimrc
VimL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
function! Printit()
echo synIDattr(synID(line("."), col("."), 1), "name") "(".synID(line("."), col("."), 1).")"
endfunction
 
map <expr> <F2> Printit()
 
function! NonComment(nonComment, comment, style)
let cur = synIDattr(synID(line("."), col("."), 1), "name")
if a:style == cur
return a:comment
else
return a:nonComment
endif
endfunction
 
au FileType tex inoremap <expr> æ NonComment("{\\ae}", "æ", "texComment")

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.