NppFileMagic plug-in for Notepad++
NppFileMagic is a plug-in for Notepad++ that is inspired by file(1) and libmagic(3). It is especially useful for people who work on cross platform projects. It tries to determine the file type of a file when it is opened and set the syntax highlighting. It also tries to recognize VIM modelines and adjust settings for that file accordingly.
To download version 1.0.0, click here.
How to install
NppFileMagic.dll to the
plugins directory and (re)start Notepad++.
Set syntax highlighting based on information found in the first line of a file
- SheBang (
Support for VIM modelines to override default settings
ts: set the tab width
et: tab key produces spaces
noet: tab key produces tabs
Support more VIM modelines items, if possible
wrap: wrap lines
nowrap: don't wrap lines
tw: at what line does the text wrap
syn: specify the syntax highlighting used for the file
- Support the modeline concept found in Emacs and Kate Editor and maybe other editors as well.
- Filename based language recognition
- Modeline Generator to add a modeline to the current file or edit the existing one.
- This plug-in can cause unexpected results if you use it together with the EditorConfig plug-in. When both plug-ins are installed and a
.editorconfigfile exists and sets tabs and a VIM modeline with tab settings is opened, it depends on the order the are found in the
Pluginsmenu of Notepad++ which plug-in does its thing first. To fix this these two plugins need to become aware of each other most likely with the message
- Every time a file is activated (like when switching tabs), the plug-in will do its thing, not just when the file is opened. When a file is saved the plug-in is not actived (yet).
Version 1.0.0 (23 September 2015)
- Initial release