Skip to content

immortal-tofu/emacs.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emacs.js Build Status

Ready-to-use Emacs setup for JavaScript coders.

Screencast: http://www.youtube.com/watch?v=4iSfLy8qfbM&feature=youtu.be

Installation

$ cd ~
$ git clone https://github.com/azer/emacs.js
$ cd emacs.js
$ make

Once you have emacs.js installed in your home directory, backup your existing configuration by the below command;

$ mkdir ~/emacsbak && mv ~/.emacs* ~/emacsbak/.

Now emacs.js can be your default configuration;

$ ln -s ~/emacs.js/init.el ~/.emacs

To check for updates;

$ make update

It comes with

Indention, Syntax Check and Accurate Highlighting

Snippets & Auto-completion

Refactoring:

Interpreter:

Code Navigation:

and powerline, jade-mode, zsh, smex, undo-tree, markdown-mode etc...

Keybindings

Arrow Buttons

Left: Undo

Right: Redo

Up: Jump to up

Down: Jump to down

NPM (Meta-n)

M-n n: Create a new NodeJS Project

M-n d: Install and save new dependency

M-n i: Run npm install on current directory

M-n p: Publish the library on NPM

M-n t: Run the test command

M-n v: Bump NPM version

Others

* M-i       ido-goto-symbol
* C-c C-m   Start Refactoring. More info: https://github.com/magnars/js2-refactor.el
* m-g n     run-js
* m-g m     js-send-region
* m-s s     er/expand-region
* C-j       zencoding-expand-yas
* up        jump to up
* down      jump to down
* left      undo
* right     redo
* m-r       replace-regexp
* m-g g     go to line
* m-down    go to forward line
* m-up      go to previous line
* C-x \     align=
* m-c       run-last-command
* m-g c     run-new-command
* m-z       zsh

Snippets

emacs.js comes with a wide variety of JavaScript snippets. If you're not familiar with yasnippet yet, open a JavaScript file and type "new", then hit the control and space buttons.

It'll let you initialize a new NodeJS module with require and export code, based on this template; https://github.com/azer/yasnippet/blob/master/snippets/js2-mode/mod.yasnippet

Try also rq, exp, fn, invoc, it, desc keywords. To browse/fork all the snippets, visit;

https://github.com/azer/yasnippet/blob/master/snippets/js2-mode

Troubleshooting

  • js2-mode not working? Recompile js2-mode: make install-js2mode

Notes

  • If you have magit installed on your system, enable related config from profiles/default.el
  • If you have emacs-w3m installed on your system, enable related config from profiles/default.el

About

ready-to-use Emacs setup for JavaScript coders.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%