[ale] TIP - Use VIM to color code lines in NTP.CONF
Ron Frazier (ALE)
atllinuxenthinfo at c3energy.com
Tue Mar 27 10:47:53 EDT 2012
Hi all,
I'm sure many of you know this, but ...
Here's a neat trick I just discovered. If you like to put lots of
comments in NTP.CONF, as I do, it's sometimes a challenge to find where
the active lines are and where the comments are.
I just discovered that, if you use the VIM programmer's editor to edit
the file, all the comment lines are automatically color coded blue and
all the active lines are color coded black. This makes it very easy to
see the structure of the file. Not wishing to start a firestorm
discussion of editors, you could use any programmer's editor that
recognizes and color codes the lines with # as a comment. VIM is even
smart enough to recognize in line comments after an active command.
I've also extracted almost all my explanatory comments and put them in
special sections with two blank lines before and after like so:
#########################################################
### explanatory comments
### here's the theory of how the next commands work
### so on and so forth etc etc etc
#########################################################
That also makes it easier to read the file.
See the following:
http://dl.dropbox.com/u/9879631/vim%20sample%20image.png
http://dl.dropbox.com/u/9879631/ntp.conf-normal
VIM is available for almost any platform, including graphical versions,
which I prefer. The graphical version for Ubuntu is called gnome-vim or
is it vim-gnome in the repository, and gvim once it's installed. I have
no idea if it works with Unity.
http://www.vim.org/
Sincerely,
Ron
--
(PS - If you email me and don't get a quick response, you might want to
call on the phone. I get about 300 emails per day from alternate energy
mailing lists and such. I don't always see new messages very quickly.)
Ron Frazier
770-205-9422 (O) Leave a message.
linuxdude AT c3energy.com
More information about the Ale
mailing list