jalvesaq / Nvim-R

Vim plugin to work with R
GNU General Public License v2.0
968 stars 125 forks source link

Delay in sending code to R with nvim #732

Closed DasHammett closed 1 year ago

DasHammett commented 1 year ago

Hi I am transitioning from vim to neovim and I am noticing a delay when sending code to R with neovim.

There is aprox 1sec delay between sending the code to the R console and seeing being passed to it.

With vim sending the code is instantaneous.

Is there a config I am missing in neovim?

Thanks

jalvesaq commented 1 year ago

If you have two Normal mode key binding, <Space>a and <Space>ab, when you press a, (Neo)Vim will wait 'timeoutlen' for the letter 'b' to not be pressed before executing the command associated with <Space>a.

DasHammett commented 1 year ago

Hi, I have mapped the sending of code to a single space bar press: vim.keymap.set("v", "<Space>", "<Plug>RDSendSelection")

jalvesaq commented 1 year ago

The command :vmap will show what key bindings are defined in Visual mode. So, you can check if there are others starting with <Space>. For Normal mode, :nmap.

DasHammett commented 1 year ago

The command :vmap will show what key bindings are defined in Visual mode. So, you can check if there are others starting with <Space>. For Normal mode, :nmap.

That was it! Thanks for the help and this awesome plugin :)