Reindent : Reindent a complete file based on indent information taken out of indent file.
script karma |
Rating 13/6,
Downloaded by 1152 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Jörg Tretter |
|
script type |
utility |
|
description |
If you like well formatted files use this plugin to chage the indention of a complete file.
Annotations:
The indention information is taken out of the VIM Indent-files. This
script processes them in a little different way than vim itself, therefore
it is possible that the indent-functions have to be rewritten before they
work.
This script tries to rewrite the indent functions automatically (during
this a file "reindent.tmp" will be created in your current working
directory).
There may be indent functions out there that don't work with this script because they are too complex to be rewriten automatically with my
code.
Preconditions:
- A indent function has to exist for your current file (indentexpr is set)
- Your current working directory has to be writable if Indent-function has to be rewritten.
Usage:
1. Copy this file to your plugin directory
2. start vim with i.E. a HTML-File
3. Hit <Lead>R (If you don't know what <Leader> is read :help leader
or press \R to reindent).
If using menus you will find a new menu item "Reindent" in menu
"Syntax".
4. Customize the Keystroke with an Entry in your .vimrc i.E.:
map ff <Plug>reindent " call reindent by pressing ff |
|
install details |
Copy this file to your plugin directory
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.226.34.107
|