Remove paragraph text objects and motions (#320)
This commit is contained in:
parent
381973407c
commit
decf0f8e1d
@ -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$`
|
||||
|
@ -376,12 +376,6 @@ function! s:init_mappings() " {{{1
|
||||
endif
|
||||
|
||||
if g:vimtex_motion_enabled
|
||||
call s:map('n', '}', '<plug>(vimtex-})')
|
||||
call s:map('n', '{', '<plug>(vimtex-{)')
|
||||
call s:map('x', '}', '<plug>(vimtex-})')
|
||||
call s:map('x', '{', '<plug>(vimtex-{)')
|
||||
call s:map('o', '}', '<plug>(vimtex-})')
|
||||
call s:map('o', '{', '<plug>(vimtex-{)')
|
||||
call s:map('n', ']]', '<plug>(vimtex-]])')
|
||||
call s:map('n', '][', '<plug>(vimtex-][)')
|
||||
call s:map('n', '[]', '<plug>(vimtex-[])')
|
||||
@ -418,10 +412,6 @@ function! s:init_mappings() " {{{1
|
||||
call s:map('x', 'a$', '<plug>(vimtex-a$)')
|
||||
call s:map('o', 'i$', '<plug>(vimtex-i$)')
|
||||
call s:map('o', 'a$', '<plug>(vimtex-a$)')
|
||||
call s:map('x', 'ip', '<plug>(vimtex-ip)')
|
||||
call s:map('x', 'ap', '<plug>(vimtex-ap)')
|
||||
call s:map('o', 'ip', '<plug>(vimtex-ip)')
|
||||
call s:map('o', 'ap', '<plug>(vimtex-ap)')
|
||||
endif
|
||||
|
||||
if g:vimtex_toc_enabled
|
||||
|
@ -66,16 +66,6 @@ function! vimtex#motion#init_buffer() " {{{1
|
||||
xmap <silent><buffer> <plug>(vimtex-%) <sid>(vimtex-%)
|
||||
onoremap <silent><buffer> <plug>(vimtex-%) :execute "normal \<sid>(v)\<sid>(vimtex-%)"<cr>
|
||||
|
||||
" Paragraphs
|
||||
nnoremap <silent><buffer> <plug>(vimtex-}) :call vimtex#motion#next_paragraph(0,0)<cr>
|
||||
nnoremap <silent><buffer> <plug>(vimtex-{) :call vimtex#motion#next_paragraph(1,0)<cr>
|
||||
xnoremap <silent><buffer> <sid>(vimtex-}) :<c-u>call vimtex#motion#next_paragraph(0,1)<cr>
|
||||
xnoremap <silent><buffer> <sid>(vimtex-{) :<c-u>call vimtex#motion#next_paragraph(1,1)<cr>
|
||||
xmap <silent><buffer> <plug>(vimtex-}) <sid>(vimtex-})
|
||||
xmap <silent><buffer> <plug>(vimtex-{) <sid>(vimtex-{)
|
||||
onoremap <silent><buffer> <plug>(vimtex-}) :execute "normal \<sid>(v)\<sid>(vimtex-})"<cr>
|
||||
onoremap <silent><buffer> <plug>(vimtex-{) :execute "normal \<sid>(v)\<sid>(vimtex-{)"<cr>
|
||||
|
||||
" Sections
|
||||
nnoremap <silent><buffer> <plug>(vimtex-]]) :call vimtex#motion#next_section(0,0,0)<cr>
|
||||
nnoremap <silent><buffer> <plug>(vimtex-][) :call vimtex#motion#next_section(1,0,0)<cr>
|
||||
|
@ -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 <silent><buffer> <plug>(vimtex-'
|
||||
let l:p2 = l:map . ') :<c-u>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
|
||||
|
@ -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 |<plug>(vimtex-ie)| `nxo`
|
||||
a$ |<plug>(vimtex-a$)| `nxo`
|
||||
i$ |<plug>(vimtex-i$)| `nxo`
|
||||
ap |<plug>(vimtex-ap)| `nxo`
|
||||
ip |<plug>(vimtex-ip)| `nxo`
|
||||
% |<plug>(vimtex-%)| `nxo`
|
||||
]] |<plug>(vimtex-]])| `nxo`
|
||||
][ |<plug>(vimtex-][)| `nxo`
|
||||
[] |<plug>(vimtex-[])| `nxo`
|
||||
[[ |<plug>(vimtex-[[)| `nxo`
|
||||
} |<plug>(vimtex-})| `nxo`
|
||||
{ |<plug>(vimtex-{)| `nxo`
|
||||
-------------------------------------------------------------~
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@ -1213,12 +1208,6 @@ Map definitions~
|
||||
*<plug>(vimtex-i$)*
|
||||
Text object for inline math (exclusive).
|
||||
|
||||
*<plug>(vimtex-ap)*
|
||||
Text object for paragraphs (inclusive).
|
||||
|
||||
*<plug>(vimtex-ip)*
|
||||
Text object for paragraphs (exclusive).
|
||||
|
||||
*<plug>(vimtex-%)*
|
||||
Find matching pair.
|
||||
|
||||
@ -1234,12 +1223,6 @@ Map definitions~
|
||||
*<plug>(vimtex-[[)*
|
||||
Section backward (exclusive).
|
||||
|
||||
*<plug>(vimtex-})*
|
||||
Paragraph forward.
|
||||
|
||||
*<plug>(vimtex-{)*
|
||||
Paragraph backward.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Insert mode mappings~
|
||||
*vimtex-imaps*
|
||||
|
Loading…
Reference in New Issue
Block a user