ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Hosts

Scrupulous syntax highlighting for /etc/hosts

Details

Installs

  • Total 6K
  • Win 3K
  • Mac 2K
  • Linux 749
Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3
Windows 0 1 0 0 0 1 0 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 2 0 1 1 5 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 2 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
012345Jun 16Jun 13Jun 10Jun 7Jun 4Jun 1May 29May 26May 23May 20May 17May 14May 11May 8May 5Jun 16 Linux: 0 Mac: 0 Windows: 0Jun 15 Linux: 0 Mac: 1 Windows: 1Jun 14 Linux: 0 Mac: 0 Windows: 0Jun 13 Linux: 0 Mac: 0 Windows: 0Jun 12 Linux: 0 Mac: 0 Windows: 0Jun 11 Linux: 0 Mac: 0 Windows: 1Jun 10 Linux: 0 Mac: 1 Windows: 0Jun 9 Linux: 0 Mac: 0 Windows: 1Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 1Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 1 Windows: 0Jun 4 Linux: 0 Mac: 0 Windows: 1Jun 3 Linux: 0 Mac: 0 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 0Jun 1 Linux: 0 Mac: 1 Windows: 0May 31 Linux: 0 Mac: 2 Windows: 0May 30 Linux: 0 Mac: 1 Windows: 1May 29 Linux: 0 Mac: 0 Windows: 0May 28 Linux: 1 Mac: 1 Windows: 0May 27 Linux: 0 Mac: 0 Windows: 0May 26 Linux: 1 Mac: 0 Windows: 0May 25 Linux: 0 Mac: 0 Windows: 1May 24 Linux: 0 Mac: 1 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 0May 22 Linux: 0 Mac: 0 Windows: 0May 21 Linux: 0 Mac: 0 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 1May 17 Linux: 0 Mac: 0 Windows: 5May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 0May 13 Linux: 0 Mac: 0 Windows: 0May 12 Linux: 0 Mac: 0 Windows: 0May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 0May 9 Linux: 0 Mac: 0 Windows: 0May 8 Linux: 0 Mac: 0 Windows: 0May 7 Linux: 0 Mac: 0 Windows: 0May 6 Linux: 0 Mac: 0 Windows: 0May 5 Linux: 0 Mac: 0 Windows: 0May 4 Linux: 0 Mac: 0 Windows: 0May 3 Linux: 0 Mac: 0 Windows: 0Jun 16 Linux: 0 Mac: 0 Windows: 0Jun 15 Linux: 0 Mac: 1 Windows: 1Jun 14 Linux: 0 Mac: 0 Windows: 0Jun 13 Linux: 0 Mac: 0 Windows: 0Jun 12 Linux: 0 Mac: 0 Windows: 0Jun 11 Linux: 0 Mac: 0 Windows: 1Jun 10 Linux: 0 Mac: 1 Windows: 0Jun 9 Linux: 0 Mac: 0 Windows: 1Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 1Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 1 Windows: 0Jun 4 Linux: 0 Mac: 0 Windows: 1Jun 3 Linux: 0 Mac: 0 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 0Jun 1 Linux: 0 Mac: 1 Windows: 0May 31 Linux: 0 Mac: 2 Windows: 0May 30 Linux: 0 Mac: 1 Windows: 1May 29 Linux: 0 Mac: 0 Windows: 0May 28 Linux: 1 Mac: 1 Windows: 0May 27 Linux: 0 Mac: 0 Windows: 0May 26 Linux: 1 Mac: 0 Windows: 0May 25 Linux: 0 Mac: 0 Windows: 1May 24 Linux: 0 Mac: 1 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 0May 22 Linux: 0 Mac: 0 Windows: 0May 21 Linux: 0 Mac: 0 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 1May 17 Linux: 0 Mac: 0 Windows: 5May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 0May 13 Linux: 0 Mac: 0 Windows: 0May 12 Linux: 0 Mac: 0 Windows: 0May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 0May 9 Linux: 0 Mac: 0 Windows: 0May 8 Linux: 0 Mac: 0 Windows: 0May 7 Linux: 0 Mac: 0 Windows: 0May 6 Linux: 0 Mac: 0 Windows: 0May 5 Linux: 0 Mac: 0 Windows: 0May 4 Linux: 0 Mac: 0 Windows: 0May 3 Linux: 0 Mac: 0 Windows: 0Jun 16 Linux: 0 Mac: 0 Windows: 0Jun 15 Linux: 0 Mac: 1 Windows: 1Jun 14 Linux: 0 Mac: 0 Windows: 0Jun 13 Linux: 0 Mac: 0 Windows: 0Jun 12 Linux: 0 Mac: 0 Windows: 0Jun 11 Linux: 0 Mac: 0 Windows: 1Jun 10 Linux: 0 Mac: 1 Windows: 0Jun 9 Linux: 0 Mac: 0 Windows: 1Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 1Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 1 Windows: 0Jun 4 Linux: 0 Mac: 0 Windows: 1Jun 3 Linux: 0 Mac: 0 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 0Jun 1 Linux: 0 Mac: 1 Windows: 0May 31 Linux: 0 Mac: 2 Windows: 0May 30 Linux: 0 Mac: 1 Windows: 1May 29 Linux: 0 Mac: 0 Windows: 0May 28 Linux: 1 Mac: 1 Windows: 0May 27 Linux: 0 Mac: 0 Windows: 0May 26 Linux: 1 Mac: 0 Windows: 0May 25 Linux: 0 Mac: 0 Windows: 1May 24 Linux: 0 Mac: 1 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 0May 22 Linux: 0 Mac: 0 Windows: 0May 21 Linux: 0 Mac: 0 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 1May 17 Linux: 0 Mac: 0 Windows: 5May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 0May 13 Linux: 0 Mac: 0 Windows: 0May 12 Linux: 0 Mac: 0 Windows: 0May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 0May 9 Linux: 0 Mac: 0 Windows: 0May 8 Linux: 0 Mac: 0 Windows: 0May 7 Linux: 0 Mac: 0 Windows: 0May 6 Linux: 0 Mac: 0 Windows: 0May 5 Linux: 0 Mac: 0 Windows: 0May 4 Linux: 0 Mac: 0 Windows: 0May 3 Linux: 0 Mac: 0 Windows: 0

Readme

Source
raw.​githubusercontent.​com

hosts.tmLanguage

Scrupulous Syntax Highlighting for /etc/hosts

Screenshot

Features

  • It highlights IPv4 and IPv6 addresses rigidly. For example: it won't match the impossible movie IP-address 189.23.290.13. This makes it easier to spot errors.
  • It uses different scopes (i.e. different colors) for some special IP ranges:
    • Loopback: ::1 and 127.0.0/8
    • Private: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and fc00::/7
  • Hostnames are in the local index: Ctrl+R (MacOS: Cmd+R)
  • Hoverable tooltips on Punycode hostname segments to render internationalized domain names.
  • Command Palette item to open Hosts file.

Installation

Install via Package Control.

Acknowledgements

The regular expressions for IPv6 by David M. Syzdek were found on stackoverflow.com. I had to rewrite them in a different format, so any faults or mistakes are probably mine.

Michael Lyons provided fixes and some great additions. And after that he rewrote the whole thing to add support for IPv6 (though still based on David M. Szydek).