vnoremap h :<c-u>set foldmethod=manual<bar> 1,'<lt>-fold<bar>'>+,$fold<cr>

What is the <c-u> for? I don't see any :help for it and ctrl-u just goes up a page normally

When in visual mode, when you press the colon, Vim prepopulates the command-line with "'<,'>". The ^U clears the line of that text.

        :help c_CTRL-u

Otherwise, the resulting line would be

        :'<,'>set foldmethod=manual<bar>...

and you'd get an error that "set" doesn't take a range.

-tim






        

Reply via email to