Copy & paste out and in vim

Hi there,

I want to copy & paste texts in and out of vim but I couldn’t find out why it is not working.
Currently, my “mouse” setting is set to “mouse=a”. When I change it to “mouse=r” I’m able to copy, but it will also copy the line numbers. Is there any way to copy what I marked in the VISUAL mode?

Thanks,

Regards
Ctwx

Inside vim, use yank and paste (y and p). To copy from vim to somewhere else (like the forum) or vice vera, select the text to copy with the mouse, then click the middle button (usually the wheel) inside the window where you want to paste the text.

Thanks for your answer!

yank and paste work, but copying using the mouse doesn’t work. It works if I set “mouse=r” in the vimrc. But then it will copy the line numbers as well…