Got "RangeError: Maximum call stack size exceeded" when using the "o" vim keybinding

I got the error as shown in the image below every time I use the “o” vim keybinding which is to add a new line below.

May I ask if anyone has similar issue and how to fix it?

Thanks.

1 Like

It seems that removing all the lines from the line implements many features from vim-surround in my .obsidian.vimrc file can solve this issue, as shown below.

But I stil don’t know why…

" use jk to esc
cmap jk <Esc>
imap jk <Esc>
vmap jk <Esc>
xmap jk <Esc>

" yank to system clipboard
set clipboard=unnamed

" implements many features from vim-surround
exmap surround_wiki surround [[ ]]
exmap surround_double_quotes surround " "
exmap surround_single_quotes surround ' '
exmap surround_brackets surround ( )
exmap surround_square_brackets surround [ ]
exmap surround_curly_brackets surround { }

" NOTE: must use 'map' and not 'nmap'
map [[ :surround_wiki
nunmap s
vunmap s
map s" :surround_double_quotes
map s' :surround_single_quotes
map sb :surround_brackets
map s( :surround_brackets
map s) :surround_brackets
map s[ :surround_square_brackets
map s[ :surround_square_brackets
map s{ :surround_curly_brackets
map s} :surround_curly_brackets

I get the same error. In another thread a user traced it to the surround functionality, specifically

nunmap s
vunmap s

I’m not sure why and I haven’t confirmed.

This seems to be a bug.