Showing posts with label emacs. Show all posts
Showing posts with label emacs. Show all posts

Friday, March 29, 2013

Emacs: press F5 to reload Firefox browser

this is great for web developers. Press a key in Emacs to save your work, then reload a page in a real browser!  If you're doing debugging with Python logging, this is all you need to do for rapid development.



(require 'net-utils)

(defun save-buffers-reload-browser ()
  (interactive)
  (save-some-buffers t)
  (run-network-program "Firefox" "localhost" 32000 "reload"))

(global-set-key (kbd "") 'save-buffers-reload-browser)

Wednesday, March 27, 2013

Web Editing with Emacs tricks


this is awesome and very useful:

C-c C-f
Skip across a balanced tag group (which extends from an opening tag through its corresponding closing tag) (sgml-skip-tag-forward).   (Backward = C-c C-b)



C-c C-d
Delete the tag at or after point, and delete the matching tag too (sgml-delete-tag). If the tag at or after point is an opening tag, delete the closing tag too; if it is a closing tag, delete the opening tag too.       



C-c /
Insert a close tag for the innermost unterminated tag (sgml-close-tag). If called within a tag or a comment, close it instead of inserting a close tag.       


HTML Mode -- Emacs Manual

Wednesday, April 8, 2009

Makefile for Python testing

This version supports Emacs's awesome Flymake syntax checker:

RECENT_PY := $(shell ls -1t *.py | awk '!/flymake/ {print; exit}')

all test test-fast:
./$(RECENT_PY)

Thursday, April 2, 2009

show Java problems in realtime in Emacs

after installing Flymake, create this Makefile:

all:

check-syntax:
javac -Xlint $(CHK_SOURCES)