filestyle : filestyle is a Vim plugin that highlights unwanted whitespace and characters.
| script karma |
Rating 1/1,
Downloaded by 4948 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Alexander Serebryakov |
| |
| script type |
| utility |
| |
| description |
**filestyle** automatically checks each opened file.
##### Commands
* `:FileStyleEnable` - enable plugin globally
* `:FileStyleDisable` - disable plugin globally
* `:FileStyleActivate` - enable plugin for current buffer
* `:FileStyleDeactivate` - disable plugin for current buffer
* `:FileStyleCheck` - check current buffer
* `:FileStyleFix` - fix style errors
##### Highlighting rules
1. If `'expandtab'` is set, highlight tabs (RED), if not, highlight spaces at
the beginning of a line (YELLOW).
2. Highlight trailing spaces (CYAN)
3. Highlight line parts that exceed `'textwidth'` (INVERT)
4. Highlight control characters (BLUE)
##### FileStyleFix rules
1. Remove control characters
2. Remove trailing spaces
3. If `'expandtab'` is set, replace tabs with spaces, if not, replace spaces
at the beginning of a line with tabs
##### Ignore file types
By default, **filestyle** checks all file types. To ignore a file type, for
example `text`, add the following line to your `.vimrc`:
let g:filestyle_ignore = ['text']
##### Ignore patterns
**filestyle** allows you to specify patterns that should be ignored. To ignore
a pattern, for example quoted lines starting with `>`, add the following line
to your `.vimrc`:
let g:filestyle_ignore_patterns = ['^\(> \?\)\+$']
##### Known issues
* **filestyle** cannot detect `'textwidth'` changes. If you change `'textwidth'`,
execute `:FileStyleCheck` to ensure the new width is used for highlighting long
lines.
* Error E315 is be thrown by Vim in case of `'splitbelow'` option is set
when `'help'` command is called
Contribution
------------
Source code and issues are hosted on GitHub:
https://github.com/aserebryakov/filestyle
License
-------
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
Credits
-------
* Alexander Serebryakov, original author ([GitHub](https://github.com/aserebryakov))
* Markus Weimar ([GitHub](https://github.com/Markus00000))
|
| |
| install details |
Pathogen:
$ cd ~/.vim/bundle
$ git clone https://github.com/aserebryakov/filestyle.git
NeoBundle:
NeoBundle 'aserebryakov/filestyle'
Without plugin manager
Clone this repository and copy the content to your `~/.vim/` directory. |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|