We look at more ways to create folds. We see that:
zf10j - will fold the current line and the 10 lines below it.
zk10j - will fold the current line and the 10 lines above it
:148,158fold - will fold lines 148 to 158
:148,158 fold – shows you can add a space (but you don't need to)
:148,158 fo - fo is a shortcut for fold
:,+10 fold – will fold from where the line the cursor is on to 10 lines below it
:,-10 fold – will fold from where the line the cursor is on to 10 lines above it
zfa{ - will fold the text between the two curly bracess {}
va{zf – va{ will visually select the text between curly braces {} and zf will fold the selection
See the complete Vim playlist at:
https://www.youtube.com/watch?v=1lzXr-MztOU
See the complete Vim playlist in a single video at:
https://www.youtube.com/watch?v=3G6kAEvbv2A
Website link:
https://thefrugalcomputerguy.com/linux/seriespg.php?ser=10002
5 Comments