mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:ef21bcaab145
runtime(rust): Respect no_plugin_maps and no_rust_maps globals (vim/vim#14221)
ef21bcaab1
Co-authored-by: MyyPo <110892040+MyyPo@users.noreply.github.com>
This commit is contained in:
parent
e3bd04f2af
commit
920ef1fd71
@ -1,7 +1,7 @@
|
|||||||
" Language: Rust
|
" Language: Rust
|
||||||
" Description: Vim ftplugin for Rust
|
" Description: Vim ftplugin for Rust
|
||||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||||
" Last Change: 2023-09-11
|
" Last Change: 2024-03-17
|
||||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
@ -94,14 +94,15 @@ if has('conceal') && get(g:, 'rust_conceal', 0)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Motion Commands {{{1
|
" Motion Commands {{{1
|
||||||
|
if !exists("g:no_plugin_maps") && !exists("g:no_rust_maps")
|
||||||
" Bind motion commands to support hanging indents
|
" Bind motion commands to support hanging indents
|
||||||
nnoremap <silent> <buffer> [[ :call rust#Jump('n', 'Back')<CR>
|
nnoremap <silent> <buffer> [[ :call rust#Jump('n', 'Back')<CR>
|
||||||
nnoremap <silent> <buffer> ]] :call rust#Jump('n', 'Forward')<CR>
|
nnoremap <silent> <buffer> ]] :call rust#Jump('n', 'Forward')<CR>
|
||||||
xnoremap <silent> <buffer> [[ :call rust#Jump('v', 'Back')<CR>
|
xnoremap <silent> <buffer> [[ :call rust#Jump('v', 'Back')<CR>
|
||||||
xnoremap <silent> <buffer> ]] :call rust#Jump('v', 'Forward')<CR>
|
xnoremap <silent> <buffer> ]] :call rust#Jump('v', 'Forward')<CR>
|
||||||
onoremap <silent> <buffer> [[ :call rust#Jump('o', 'Back')<CR>
|
onoremap <silent> <buffer> [[ :call rust#Jump('o', 'Back')<CR>
|
||||||
onoremap <silent> <buffer> ]] :call rust#Jump('o', 'Forward')<CR>
|
onoremap <silent> <buffer> ]] :call rust#Jump('o', 'Forward')<CR>
|
||||||
|
endif
|
||||||
|
|
||||||
" Commands {{{1
|
" Commands {{{1
|
||||||
|
|
||||||
@ -176,12 +177,12 @@ let b:undo_ftplugin = "
|
|||||||
\|delcommand -buffer RustInfoToClipboard
|
\|delcommand -buffer RustInfoToClipboard
|
||||||
\|delcommand -buffer RustInfoToFile
|
\|delcommand -buffer RustInfoToFile
|
||||||
\|delcommand -buffer RustTest
|
\|delcommand -buffer RustTest
|
||||||
\|nunmap <buffer> [[
|
\|silent! nunmap <buffer> [[
|
||||||
\|nunmap <buffer> ]]
|
\|silent! nunmap <buffer> ]]
|
||||||
\|xunmap <buffer> [[
|
\|silent! xunmap <buffer> [[
|
||||||
\|xunmap <buffer> ]]
|
\|silent! xunmap <buffer> ]]
|
||||||
\|ounmap <buffer> [[
|
\|silent! ounmap <buffer> [[
|
||||||
\|ounmap <buffer> ]]
|
\|silent! ounmap <buffer> ]]
|
||||||
\|setlocal matchpairs-=<:>
|
\|setlocal matchpairs-=<:>
|
||||||
\|unlet b:match_skip
|
\|unlet b:match_skip
|
||||||
\"
|
\"
|
||||||
|
Loading…
Reference in New Issue
Block a user