Skip to content
January 3, 2011 / Pratik

Weather Cameras

Last night, I wrote a small web application that grabed weather camera infomation from the Weather Underground, because I needed to learn how to develop with Adobe Flex.

I tryed out other tools to edit mxml files and ActionScript files. I ended using Emacs with the Flex SDK. I used nXml mode to edit mxml files, since mxml files are xml files. nXml mode checks for errors in xml files while I type it out and it does syntax highlighting for xml in Emacs.

I used the following settings with Emacs in my init.el file.

;; nXml mode settings
(add-hook 'nxml-mode-hook (lambda ()
			    ;; This makes emacs use spaces instead of tabs
			    ;; in nXml mode. It's important to apply this to just files
			    ;; in nXml mode, because sometimes tabs are needed in other
			    ;; files like Makefiles.
			    (setq-default indent-tabs-mode nil)
			    ;; Auto indent with in all files that are edited in nXml mode
			    (local-set-key (kbd "RET") 'newline-and-indent)))

;; Sets the indents for files edited in nXml mode to be 4 characters
;; (the default is 2 characters)
(setq nxml-child-indent 4)
(setq nxml-outline-child-indent 4)

;; Adds files that end with .mxml to a list of files that will be edited
;; in nxml mode.
(add-to-list 'auto-mode-alist '("\\.mxml$" . nxml-mode))
Advertisements

One Comment

Leave a Comment
  1. Seoul Skin แป้ง / Oct 13 2015 3:21 am

    I am regular reader, how are you everybody? This piece of writing posted at this site is actually nice.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: