I recently switched to using Vim mode in LeetCode to enhance my productivity while solving LeetCode problems. However, I soon encountered a strange issue: when I tried to use Ctrl+C to copy code from the editor, it didn't work as expected.
After some trial and error, I discovered that the issue is due to the fact that the Vim mode in LeetCode uses the Insert key instead of Ctrl+C for copying. To copy code, I realized I need to press Ctrl+Insert instead.
I initially tried using the 'y' command to copy the code into a specific register, but when I opened Vim locally and used the 'reg' command to check the register content, the code was not copied as expected. This method also failed.
To paste the copied code in LeetCode, I need to use Ctrl+Shift+v.
I hope this saves someone else the frustration and time I spent troubleshooting this issue. If you have any alternative solutions or know of a better way to handle this, please let me know in the comments below.