From decf0f8e1d3298b21afbfe8a89f06f2eb1ef551c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sun, 17 Apr 2016 13:16:00 +0200 Subject: [PATCH] Remove paragraph text objects and motions (#320) --- README.md | 1 - autoload/vimtex.vim | 10 ---------- autoload/vimtex/motion.vim | 10 ---------- autoload/vimtex/text_obj.vim | 15 --------------- doc/vimtex.txt | 17 ----------------- 5 files changed, 53 deletions(-) diff --git a/README.md b/README.md index 1b05ac7..9b97b3e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ disabled if desired. - `id ad` Delimiters - `ie ae` LaTeX environments - `i$ a$` Inline math structures - - `ip ap` Paragraphs - Other mappings - Delete the surrounding command or environment with `dsc`/`dse`/`ds$` - Change the surrounding command or environment with `csc`/`cse`/`cs$` diff --git a/autoload/vimtex.vim b/autoload/vimtex.vim index d574299..ca28bb2 100644 --- a/autoload/vimtex.vim +++ b/autoload/vimtex.vim @@ -376,12 +376,6 @@ function! s:init_mappings() " {{{1 endif if g:vimtex_motion_enabled - call s:map('n', '}', '(vimtex-})') - call s:map('n', '{', '(vimtex-{)') - call s:map('x', '}', '(vimtex-})') - call s:map('x', '{', '(vimtex-{)') - call s:map('o', '}', '(vimtex-})') - call s:map('o', '{', '(vimtex-{)') call s:map('n', ']]', '(vimtex-]])') call s:map('n', '][', '(vimtex-][)') call s:map('n', '[]', '(vimtex-[])') @@ -418,10 +412,6 @@ function! s:init_mappings() " {{{1 call s:map('x', 'a$', '(vimtex-a$)') call s:map('o', 'i$', '(vimtex-i$)') call s:map('o', 'a$', '(vimtex-a$)') - call s:map('x', 'ip', '(vimtex-ip)') - call s:map('x', 'ap', '(vimtex-ap)') - call s:map('o', 'ip', '(vimtex-ip)') - call s:map('o', 'ap', '(vimtex-ap)') endif if g:vimtex_toc_enabled diff --git a/autoload/vimtex/motion.vim b/autoload/vimtex/motion.vim index 90c8e7e..0359524 100644 --- a/autoload/vimtex/motion.vim +++ b/autoload/vimtex/motion.vim @@ -66,16 +66,6 @@ function! vimtex#motion#init_buffer() " {{{1 xmap (vimtex-%) (vimtex-%) onoremap (vimtex-%) :execute "normal \(v)\(vimtex-%)" - " Paragraphs - nnoremap (vimtex-}) :call vimtex#motion#next_paragraph(0,0) - nnoremap (vimtex-{) :call vimtex#motion#next_paragraph(1,0) - xnoremap (vimtex-}) :call vimtex#motion#next_paragraph(0,1) - xnoremap (vimtex-{) :call vimtex#motion#next_paragraph(1,1) - xmap (vimtex-}) (vimtex-}) - xmap (vimtex-{) (vimtex-{) - onoremap (vimtex-}) :execute "normal \(v)\(vimtex-})" - onoremap (vimtex-{) :execute "normal \(v)\(vimtex-{)" - " Sections nnoremap (vimtex-]]) :call vimtex#motion#next_section(0,0,0) nnoremap (vimtex-][) :call vimtex#motion#next_section(1,0,0) diff --git a/autoload/vimtex/text_obj.vim b/autoload/vimtex/text_obj.vim index 8987ae1..54fd68c 100644 --- a/autoload/vimtex/text_obj.vim +++ b/autoload/vimtex/text_obj.vim @@ -23,7 +23,6 @@ function! vimtex#text_obj#init_buffer() " {{{1 \ ['d', 'delimited', 'delim_all'], \ ['e', 'delimited', 'env'], \ ['$', 'delimited', 'env_math'], - \ ['p', 'paragraphs', ''], \] let l:p1 = 'noremap (vimtex-' let l:p2 = l:map . ') :call vimtex#text_obj#' . l:name @@ -111,20 +110,6 @@ function! vimtex#text_obj#delimited(is_inner, type) " {{{1 call cursor(l2, c2) endfunction -" }}}1 -function! vimtex#text_obj#paragraphs(is_inner) " {{{1 - " Define selection - normal! 0j - call vimtex#motion#next_paragraph(1,0) - normal! jV - call vimtex#motion#next_paragraph(0,0) - - " Go back one line for inner objects - if a:is_inner - normal! k - endif -endfunction - " }}}1 " vim: fdm=marker sw=2 diff --git a/doc/vimtex.txt b/doc/vimtex.txt index 08b859d..f1e17e5 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -105,7 +105,6 @@ Feature overview~ - `id` `ad` Delimiters - `ie` `ae` LaTeX environments - `i$` `a$` Inline math structures - - `ip` `ap` Paragraphs - Other mappings - Delete the surrounding command or environment with `dsc`/`dse`/`ds$` - Change the surrounding command or environment with `csc`/`cse`/`cs$` @@ -325,15 +324,11 @@ This feature is explained in more detail later, see |vimtex-imaps|. ie |(vimtex-ie)| `nxo` a$ |(vimtex-a$)| `nxo` i$ |(vimtex-i$)| `nxo` - ap |(vimtex-ap)| `nxo` - ip |(vimtex-ip)| `nxo` % |(vimtex-%)| `nxo` ]] |(vimtex-]])| `nxo` ][ |(vimtex-][)| `nxo` [] |(vimtex-[])| `nxo` [[ |(vimtex-[[)| `nxo` - } |(vimtex-})| `nxo` - { |(vimtex-{)| `nxo` -------------------------------------------------------------~ ------------------------------------------------------------------------------ @@ -1213,12 +1208,6 @@ Map definitions~ *(vimtex-i$)* Text object for inline math (exclusive). -*(vimtex-ap)* - Text object for paragraphs (inclusive). - -*(vimtex-ip)* - Text object for paragraphs (exclusive). - *(vimtex-%)* Find matching pair. @@ -1234,12 +1223,6 @@ Map definitions~ *(vimtex-[[)* Section backward (exclusive). -*(vimtex-})* - Paragraph forward. - -*(vimtex-{)* - Paragraph backward. - ------------------------------------------------------------------------------ Insert mode mappings~ *vimtex-imaps*