Created
July 25, 2012 22:31
-
-
Save guygurari/3179114 to your computer and use it in GitHub Desktop.
Vim paragraph text-object for latex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" Defines a paragraph text-object that stops at \\begin / \\end , as well as at ordinary | |
" paragraph boundaries. | |
" | |
" Example: dap deletes the text paragraph and avoids any adjoining environments. | |
" | |
autocmd BufRead,BufNewFile *.tex vnoremap ip ?^\s*$\\|\\end<CR>jO/^\s*$\\|\\begin<CR>k$ | |
autocmd BufRead,BufNewFile *.tex vmap ap ip | |
autocmd BufRead,BufNewFile *.tex omap ip :normal Vip<CR> | |
autocmd BufRead,BufNewFile *.tex omap ap :normal Vap<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment