Question

I am experiencing a weird problem: vim doesn't expand my foldings sometimes when I use a horizontal gesture like l. It always expands if I use zo though. I can see hor option in my foldopen settings variable. I am experiencing this when foldmethod is set either to indent or expr. What may I be missing? I don't seem to be mapping l anywhere.

Thanks

Was it helpful?

Solution

If you cursor is on an empty line inside the fold then the left move (l) will not work, thus it won't open the fold.

The same happens if your cursor is at the last column in the line. But in this case an h will make the fold open.

You can check if the a movement command fails by paying attention to the error beep, the same it issues when you hit Esc when you are in normal mode. If you are unable to hear it, you could try using the 'visualbell' option.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top