Here is what I do
:syntax match conceal Test +[A-Z0-9]\{6}+
:set conceallevel=2
:set concealcursor=nvi
So when I write 123456 in vim I expect it to be nothing there. But what actually happens when I move over that area is that I have to move 6 times in the direction I want to move for the cursor to pass that area.
Is there a way to work around this? I want vim to see it as if there is nothing there and that when I move over that area it’s like there is nothing there. But I still want to be able to search for it and delete it.
Currently there is no built-in way to do this. You can use
synconcealed()to determine whether there is a concealed character under the cursor and what it is concealed to and remap all moving keys to respect it: like this:. Note: this does the thing for one single motion (
l) and in normal mode, just to show the way it may be done.