sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

filestyle : filestyle is a Vim plugin that highlights unwanted whitespace and characters.

 script karma  Rating 1/1, Downloaded by 655    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.
 

Rating scripts is only available on the HTTPS page

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
filestyle-1.1.2.zip 1.1.2 2015-08-29 7.4 Alexander Serebryakov * Fixed error messages when Vim is started in a narrow terminal
* Fixed tag and version number in help file
filestyle-1.1.1.zip 1.1.1 2015-06-20 7.4 Alexander Serebryakov * Fixed cursor positioning after FileStyleFix call
filestyle-1.1.0.zip 1.1.0 2015-06-13 7.4 Alexander Serebryakov * Added support for user-defined highlight groups
* Fixed issue with tabs switching in INSERT mode
filestyle-1.0.0.zip 1.0.0 2015-05-29 7.4 Alexander Serebryakov * Implemented ignored patterns
* Removed highlighting of trailing spaces in current line when in Insert mode
* Improved order of highlights
filestyle-0.7.1.zip 0.7.1 2015-05-02 7.4 Alexander Serebryakov * Fixed issue with highlighting after colorscheme change
filestyle-0.7.0.zip 0.7.0 2014-12-30 7.4 Alexander Serebryakov * Implemented style errors fixing (experimental)
* Commands enabling/disabling plugin globally were added
* Highlighting of the EOL fixed
* Issue with plugin disabling for specific buffer fixed
filestyle-0.6.1.zip 0.6.1 2014-12-20 7.4 Alexander Serebryakov Fixed compatibility with other plugins if Vundle is used
filestyle-0.6.0.zip 0.6.0 2014-12-16 7.4 Alexander Serebryakov * Configurable list of ignored file types
* Plugin turns off in all windows with current buffer opened
* Added highlighting of control characters
filestyle-0.5.2.zip 0.5.2 2014-12-13 7.4 Alexander Serebryakov Fixed the `undefined variable filestyle_active` error
filestyle-0.5.1.zip 0.5.1 2014-12-08 7.4 Alexander Serebryakov Initial upload
ip used for rating: 54.80.169.119

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo