I am working in macvim with a latex file where I have an index where terminology is being stored (using \usepackage{imakeidx} and \makeindex).
I have a command for inserting terminology with emphasis and then indexing said terminology:
autocmd Filetype tex inoremap :nx \emph{<++>} \index{<++>}<++><Esc>01k<C-j>
The issue is that I have to type the same word or term twice which gets a bit annoying.
Is there a way of typing in both places at once?