Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am wheelsandmetal on github.
  • I am schmutz (https://keybase.io/schmutz) on keybase.
  • I have a public key ASDixfC3QEALln1RG5XbutnEQq4i76vPnO3xny7IBoKvmAo

To claim this, I am signing this object:

@wheelsandmetal
wheelsandmetal / latex-custom-begin-no-plugins.vim
Last active July 14, 2020 08:24
Creating a custom begin command in latex and have the matching end command auto inserted. All pure vim script
function! FindAndReplaceInputWordInNext3Lines()
call inputsave()
let word = input("> ")
call inputrestore()
execute printf(":.,.+3s/THISISAWORD/%s/g", word)
endfunction
au! FileType tex inoremap ,beg \begin{THISISAWORD}<Enter><Enter>\end{THISISAWORD}<Enter><Enter><++><Esc>4k0fR:call FindAndReplaceInputWordInNext3Lines()<cr>ka