Skip to content

Impatient html mode. See your changes in the browser as you type

Notifications You must be signed in to change notification settings

tkita/impatient-mode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Impatient Mode

This version is for markdown only.

Screenshots

  • realtime previewing by firefox.

  • realtime previewing other buffer by xwidget-webkit.

  • on MS Windows

Installation

This version requires simple-httpd.el , marked.js , github-markdown.css and mermaid.js . Put follow files in the same directory.

or, run command make get

$ make get

Add impatient-mode to your load path and require it:

  (add-to-list 'load-path "~/.emacs.d/impatient-mode")
  (require 'impatient-mode)

Using impatient-mode

  • Open markdown file with emacs, and edit buffer.

    or execute command M-x imp-new.

  • Publish buffers for browser-preview,

    M-x imp-visit-buffer
    
    • previewing web browser specified by variable browse-url-browser-function.

      Even better if you set the keymap in markdown mode.

      (define-key markdown-mode-map (kbd "<f12>") 'imp-visit-buffer)
    • If emacs builded configure option --with-xwidgets, previewing in other buffer by xwidget-webkit on emacs.

      system-configuration-options [C-j]
      => "--with-xwidgets"
      
  • key operation of emacs also works with web browser via http-header X-Imp-Ctrl:.

    • common

      impatient-mode/emacs xwidget-webkit, web browser
      M-< (beginning-of-buffer) window.scrollTo( 0, 0 );
      M-> (end-of-buffer) window.scrollTo( 0, bottom );
      C-l (recenter-top-bottom) window.scrollTo( 0, documentElement.scrollHeight * (/ (point) (point-max)));
    • xwidget-webkit

      impatient-mode/emacs xwidget-webkit-mode/emacs
      C-<up> (xwidget-webkit-scroll-up-line -1)
      C-<down> (xwidget-webkit-scroll-up-line 1)
    • other browser

      impatient-mode/emacs web browser
      M-p (imp-browser-scroll-up-line -1) window.scrollByLines( -1 * imp-browser-scroll-lines );
      M-n (imp-browser-scroll-up-line 1) window.scrollByLines( imp-browser-scroll-lines );

About

Impatient html mode. See your changes in the browser as you type

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 73.5%
  • JavaScript 14.5%
  • Makefile 7.4%
  • HTML 4.0%
  • CSS 0.6%