]> code.delx.au - dotemacs/commitdiff
ternjs
authorJames Bunton <jamesbunton@delx.net.au>
Fri, 28 Apr 2017 14:52:40 +0000 (00:52 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Fri, 28 Apr 2017 14:53:11 +0000 (00:53 +1000)
README_KEYBINDINGS.md
lisp/my-file-modes.el
packages/tern [new symlink]

index 67872af0644e8bb981ada45e7d2d37c0faf24455..91a7cdb4a8c3e9f322d174096f42a31e7b8dff6f 100644 (file)
@@ -279,6 +279,15 @@ C-c C-c                                         Compile and load the top-level f
 C-c M-k                                         Compile (but not load) the current buffer's file
 ```
 
 C-c M-k                                         Compile (but not load) the current buffer's file
 ```
 
+
+# Javascript
+```
+C-c C-r                                         Rename variable
+C-c C-c                                         Find type
+C-c C-d                                         Find docs
+```
+
+
 # Shell
 ```
 M-!                                             Execute command
 # Shell
 ```
 M-!                                             Execute command
index 6f1dd34e027efccdb3452014458b86c049db50ad..b3832f1c762200658998c5738555d92d22e20205 100644 (file)
@@ -34,6 +34,8 @@
 (setq js2-mode-show-parse-errors nil)
 (setq js2-mode-show-strict-warnings nil)
 (setq js--declaration-keyword-re "x^") ; declarations should have normal indentation
 (setq js2-mode-show-parse-errors nil)
 (setq js2-mode-show-strict-warnings nil)
 (setq js--declaration-keyword-re "x^") ; declarations should have normal indentation
+(when (require 'tern nil 'noerror)
+  (add-hook 'js2-mode-hook (lambda () (tern-mode t))))
 
 (require 'markdown-mode)
 (define-key markdown-mode-map (kbd "M-{") 'markdown-beginning-of-block)
 
 (require 'markdown-mode)
 (define-key markdown-mode-map (kbd "M-{") 'markdown-beginning-of-block)
diff --git a/packages/tern b/packages/tern
new file mode 120000 (symlink)
index 0000000..870434d
--- /dev/null
@@ -0,0 +1 @@
+/home/jbunton/.node/lib/node_modules/tern/emacs
\ No newline at end of file