Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A small plugin to handle all your folding needs

branch: master

Bugfixes

latest commit 055e333fa4
authored
README.md

This has undergone significant changes, hopefully for the better.
If you prefer to use the earlier version, you can download it from here

vim-origami

Plugin to satisfy all your folding needs

  • Justify all the open-fold markers
  • Create new open/close foldmarkers conveniently

If you like the plugin, show some love by rating it at vim.org and spreading the word.

Screenshots

Before: foldmarkers strewn all over the place

vim-origami_unaligned

After: all the foldmarkers aligned neatly in a column

vim-origami_aligned

Staggered alignment visually showing the heirarchy

vim-origami_staggered

Force the alignment to happen on a particular column

vim-origami_column

Installation

I highly recommend using a plugin manager to do the dirty work for you. If for some reason, you do not want to use any of them then unzip it to your ~/.vim directory

Usage

So, once that's done, out of the box, the followings mappings are defined by default:

  <leader>zax  Align all folds of level 'x'  
  <leader>zox  Insert a start foldmarker of level 'x' at the end of line  
  <leader>zcx  Insert an end  foldmarker of level 'x' at the end of line  
  <leader>zOx  Insert a start foldmarker of level 'x' enclosed in comments at the end of line  
  <leader>zCx  Insert an end  foldmarker of level 'x' enclosed in comments at the end of line  
  <leader>zd   Delete a foldmarker present on the line  

  <leader>zaa  Align all the folds
  <leader>zoo  Insert an unnumbered open foldmarker
  <leader>zcc  Insert an unnumbered close foldmarker
  <leader>zOO  Insert a commented unnumbered open foldmarker
  <leader>zCC  Insert a commented unnumbered close foldmarker

where 'x' is a number from 0-9. 0 refers to unnumbered folds

Something went wrong with that request. Please try again.