genindent.vim : Generic function for indentexpr
| script karma |
Rating 13/4,
Downloaded by 2400 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| moshe kamensky |
| |
| script type |
| indent |
| |
| description |
This is a function meant to deal with a simple case of indentation:
The assumption is that you have blocks whose begining and end can be identified by a pattern. In this case, you just set b:indent_block_start and b:indent_block_end to these patterns, and the function returns the indent of a line based on the assumption that all lines within a block should be indented by one shiftwidth. It is also possible to ignore lines matching a certain pattern (e.g., comments) using a third variable b:indent_ignore. For an example, see the fluxbox indent file (vimscript #679). |
| |
| install details |
| Put this in the plugin subdir of your favorite part in the runtimepath (e.g., ~/.vim/plugin). Alternatively, put it somewhere else and source it from an indent file where you'd like to use it. |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.216.107
|