Skip to content

Commit

Permalink
feat: change default map for context menu
Browse files Browse the repository at this point in the history
refer: #1541
  • Loading branch information
lervag committed Feb 21, 2021
1 parent a1c629e commit a62ae0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions autoload/vimtex.vim
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function! s:init_default_mappings() abort " {{{1
call s:map(0, 'n', '<localleader>lX', '<plug>(vimtex-reload-state)')
call s:map(1, 'n', '<localleader>ls', '<plug>(vimtex-toggle-main)')
call s:map(0, 'n', '<localleader>lq', '<plug>(vimtex-log)')
call s:map(1, 'n', '<localleader>la', '<plug>(vimtex-context-menu)')

call s:map(1, 'n', 'ds$', '<plug>(vimtex-env-delete-math)')
call s:map(1, 'n', 'cs$', '<plug>(vimtex-env-change-math)')
Expand All @@ -137,8 +138,6 @@ function! s:init_default_mappings() abort " {{{1
call s:map(1, 'n', '<F7>', '<plug>(vimtex-cmd-create)')
call s:map(1, 'x', '<F7>', '<plug>(vimtex-cmd-create)')

call s:map(1, 'n', '<cr>', '<plug>(vimtex-context-menu)')

call s:map(1, 'n', 'dsd', '<plug>(vimtex-delim-delete)')
call s:map(1, 'n', 'csd', '<plug>(vimtex-delim-change-math)')
call s:map(1, 'n', 'tsd', '<plug>(vimtex-delim-toggle-modifier)')
Expand Down
4 changes: 2 additions & 2 deletions doc/vimtex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ This feature is explained in more detail later, see |vimtex-imaps|.
<localleader>lx |<plug>(vimtex-reload)| `n`
<localleader>lX |<plug>(vimtex-reload-state)| `n`
<localleader>ls |<plug>(vimtex-toggle-main)| `n`
<localleader>la |<plug>(vimtex-context-menu)| `n`
dse |<plug>(vimtex-env-delete)| `n`
dsc |<plug>(vimtex-cmd-delete)| `n`
ds$ |<plug>(vimtex-env-delete-math)| `n`
Expand Down Expand Up @@ -790,7 +791,6 @@ This feature is explained in more detail later, see |vimtex-imaps|.
[/ |<plug>(vimtex-[/| `nxo`
[* |<plug>(vimtex-[star| `nxo`
K |<plug>(vimtex-doc-package)| `n`
<CR> |<plug>(vimtex-context-menu)| `n`
---------------------------------------------------------------------~

------------------------------------------------------------------------------
Expand Down Expand Up @@ -4713,7 +4713,7 @@ CONTEXT MENU *vimtex-context-menu*

VimTeX provides the command |:VimtexContextMenu| to open a context menu for
the item below the cursor. The menu allows various actions relevant to the
current context. It is mapped by default to `<cr>`.
current context. It is mapped by default to `<localleader>la`.

The available contexts are listed below.

Expand Down

0 comments on commit a62ae0f

Please sign in to comment.