thank you for accompanying me.
thank you for being my companion.
谢谢你伴我左右,上面是正式的说法.
for 是介词,后面只能接名词或者动名词.