# Install syntax highlighting in popular text editors

Niceshaper package comes with syntax files included.

Vim and Midnight Commander are supported. But Vim support is better ahead. It even fulfills some syntax check.

## Vim

Vim have two methods to install syntax highlighting. Globally and per user. Making per user installation let assume that root user are the only one who needs this feature. Copy editors/vim/niceshaper.vim file to /root/.vim/syntax directory. Create this directory if does not exist. To file /root/.vimrc append:

:syntax on
autocmd BufNewFile,BufRead */etc/niceshaper*.conf set filetype=niceshaper

Syntax highlighting will work for all files with .conf extension placed in /etc/niceshaper directory or subdirectory.

## Midnight Commander

Copy file editors/mc/niceshaper.syntax to proper directory of Midnight Commander. For example in Debian it is /usr/share/mc/syntax.

There is a Syntax file, in which you need to append 2 lines:

file .\*/etc/niceshaper.\*\\.conf$ NiceShaper\sconfiguration ^#\sNiceShaper
include niceshaper.syntax

Syntax highlighting will work for files with .conf extension placed in /etc/niceshaper directory or subdirectory. It will also work for files contains '# NiceShaper' in first line.

After Midnight Commander upgrade you may need to redo this installation.