Install syntax highlighting in popular text editors
NiceShaper package includes a syntax highlighting files for popular text editors.
Vim and Midnight Commander (mcedit) are supported. However, Vim support is much better, even enables some syntax checking.
Vim
Installation of syntax highlighting for root user can be achieved by copying the editors/vim/niceshaper.vim file into the /root/.vim/syntax/ directory. If the /root/.vim/syntax/ directory doesn't exist, it needs to be created manually. Then in order to register a new configuration file type, there is needed to add the following rules into the /root/.vimrc file:
:syntax on
autocmd BufNewFile,BufRead *niceshaper*/*.conf set filetype=niceshaper
Thanks to this rules, syntax highlighting is enabled for all of text files with the ".conf" extension, placed within the path that contains the "niceshaper" word.
Midnight Commander - mcedit
In the case of mcedit, there is disadvantage of syntax highlighting installation for the user, thus shared installation is recommended. Shared installation can be achieved by copying the editors/mc/niceshaper.syntax into the /usr/share/mc/syntax/ directory.
Finally, the Syntax file contained within this directory needs to be appended with the following rules:
file .\*niceshaper.\*\\.conf$ NiceShaper\sconfiguration ^#\sNiceShaper
include niceshaper.syntax
New rules have to be inserted before the last rules which already exist at the end of the Syntax file. It means before:
file .\* unknown
include unknown.syntax
Syntax highlighting works for files with the ".conf" extension placed within the path that contains the "niceshaper" word or contains '# NiceShaper' at first line.
Warning! After upgrade of the Midnight Commander package, it could be needed to redo this installation.