Skip to content

Commit

Permalink
Map ctrl-e to oemph instead of emph
Browse files Browse the repository at this point in the history
  • Loading branch information
mgunyho committed Jul 3, 2022
1 parent c1eb005 commit 2ee47fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ftplugin/tex.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ inoremap <buffer> ¤ %
" Ctrl+e for italics
"TODO: <C-i> overrides <Tab> in insert mode, fix that (?)
inoremap <buffer> <C-e> \emph{}<Esc>i
"inoremap <buffer> <C-e> \emph{}<Esc>i
inoremap <buffer> <C-e> \oemph{}<Esc>i
"TODO: use onoremap? how does it work?
vnoremap <buffer> <C-e> <Esc>`>a}<Esc>`<i\emph{<Esc>lviB
"vnoremap <buffer> <C-e> <Esc>`>a}<Esc>`<i\emph{<Esc>lviB
vnoremap <buffer> <C-e> <Esc>`>a}<Esc>`<i\oemph{<Esc>lviB
" slightly more concise, but breaks if there's a newline in the selection.
"vnoremap <buffer> <C-i> s\emph{ <Esc>vpa}<Esc>gv

Expand Down

0 comments on commit 2ee47fb

Please sign in to comment.