About the past
Last December, I
wrote about a plugin that allows you to see the non-compliance with certain aspects of the coding standard when opening a file.

Time passed and the plugin got a new functionality.
Enable / Disable the plugin in session
Implemented by teams:
:FileStyleEnable :FileStyleDisable
Works for all open buffers.
')
Automatically fix formatting issues
Implemented by the team:
:FileStyleFix
Works as follows:
- Removes escape sequences
- Removes spaces at the end of a line.
- If the
expandtab
option expandtab
on, replaces tabs with spaces, otherwise replaces spaces at the beginning of a line with tabs
Plugin highlighting overrides
The lighting used by the plugin may not suit everyone, so it is possible to override it through the explicit definition in
vimrc
or in the color scheme file of one or several groups:
FileStyleTabsError FileStyleTrailingSpacesError FileStyleSpacesError FileStyleControlCharacter FileStyleTooLongLine
For example:
highlight FileStyleTabsError ctermbg=3 guibg=Yellow
Ignored patterns
If you need to remove the highlighting of a specific pattern by the plugin, you can add a salt-adding line containing the pattern to
vimrc
:
let g:filestyle_ignore_patterns = ['^\(> \?\)\+$']
In the console for working in the color scheme, the
Normal
group must be explicitly defined with the
ctermbg
parameter.
hi Normal ctermbg=15
Ignored file types
By default, the plugin checks all types of files, but you can determine the list of types ignored by the plugin:
let g:filestyle_ignore = ['text']
Download can be on the links:
vim.org |
Github