Skip to content

How to configure leap.nvim to work with (n)vim-surround? #38

Answered by ggandor
nullchilly asked this question in Q&A
Discussion options

You must be logged in to vote

I'm totally open for better ideas!

let g:surround_no_mappings = 1
" Just the defaults copied here.
nmap ds       <Plug>Dsurround
nmap cs       <Plug>Csurround
nmap cS       <Plug>CSurround
nmap ys       <Plug>Ysurround
nmap yS       <Plug>YSurround
nmap yss      <Plug>Yssurround
nmap ySs      <Plug>YSsurround
nmap ySS      <Plug>YSsurround

" The conflicting ones. Note that `<Plug>(leap-cross-window)`
" _does_ work in Visual mode, if jumping to the same buffer,
" so in theory, `gs` could be useful for Leap too...
xmap gs       <Plug>VSurround
xmap gS       <Plug>VgSurround

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ggandor
Comment options

Answer selected by nullchilly
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants