machakann / vim-sandwich

Set of operators and textobjects to search/select/edit sandwiched texts.
1.44k stars 37 forks source link

set timeoutlen=100 breaks the plugin #118

Open Callendor opened 3 years ago

Callendor commented 3 years ago

I really want to be able to use this plugin but I'm running into an unknown issue -- that or I'm just missing something very obvious.

I'm installing via vim-plug. I'm running on mac (big Sur). I've tried using iterm2 and alacritty terminals.

I have removed all my plugins except for machakann/vim-sandwich.

vim-plug installs without any errors.

Once it installs, I open up a vim window and type foo.

I try running saiw( on foo and I don't get passed typing 's' as I immediately go into insert mode. Is there a configuration step I'm missing?

machakann commented 3 years ago

Could you check the output with executing :nmap sa? If no mapping, the plugin is not installed properly.

Or could you show me a minimal working vimrc to reproduce the problem?

Callendor commented 3 years ago

Found it --

set timeoutlen=100 breaks it.

too fast of a setting.... :)

machakann commented 3 years ago

I see. Then you have several options. One is to set longer 'timeoutlen', another is to give up using s command with

nmap s <Nop>
xmap s <Nop>

, or use vim-surround style keymappings if you like it.