you can get the cursor caret offset position(i.e.x,y) by this plugin, even included index getter.