Search code examples
vimmousefolding

Gvim fold toggle using mouse


Is it possible to open and close folds in Gvim using mouse clicks ?

Say double click opens and closes folds ?


Solution

  • This was what I was looking for

    :noremap <2-LeftMouse> za
    

    Toggles folds with mouse double click

    Or may be triple click to avoid conflicting with text selecting command of vim

    :noremap <3-LeftMouse> za