I am trying to get the mouse selected text in a register in normal mode. If the selection is a substring, only the selection should be copied, not the complete word.
Currently the script has:
normal! "zyiw
I would use the script on remote servers without X too. vim is compiled without clipboard.
Any help is much appreciated.
:versionoutput? – Arun Prakash Jana Mar 30 '18 at 17:35+clipboard. – Mass Mar 30 '18 at 17:41-clipboard). Is there any other way to do this?I am trying a modify a script to highlight multiple mouse selected text (even substrings) with different colors. Currently it matches the complete word under cursor.
– Arun Prakash Jana Mar 30 '18 at 17:43normal! gv"zy(mouse has no bearing on this, it's just visual selection). – Mass Mar 30 '18 at 19:19visual selection - gv"zyand if not"zyiw. Now how do I clear the visual buffer after the text is copied to "z so I can use the technique next time? – Arun Prakash Jana Mar 30 '18 at 20:08