📜 ⬆️ ⬇️

Vim FileStyle Update

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.

image

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:


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

Source: https://habr.com/ru/post/267765/


All Articles