A major mode for editing Git commit messages.
Highlight the formatting of git commit messages and indicate errors according to the guidelines for commit messages (see http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
Highlight the first line (aka "summary") specially if it exceeds 54 characters.
Enable auto-fill-mode' and set the
fill-column' to 72 according to the
aforementioned guidelines.
Provide commands to insert standard headers into commit messages.
- C-c C-x s or C-c C-s inserts Signed-off-by (`git-commit-signoff').
- C-C C-x a inserts Acked-by (`git-commit-ack').
- C-c C-x t inserts Tested-by (`git-commit-test').
- C-c C-x r inserts Reviewed-by (`git-commit-review').
- C-c C-x o inserts Cc (`git-commit-cc').
- C-c C-x p inserts Reported-by (`git-commit-reported').
C-c C-c finishes a commit. By default this means to save and kill the buffer. Customize `git-commit-commit-function' to change this behaviour.
Check a buffer for stylistic errors before committing, and ask for confirmation before committing with style errors.
To use this, move to an unknown acronym in a buffer and type the following:
M-x wtf-is RET
The `wtf-is' function may also be called noninteractively, and it will return a string (or nil) rather than displaying a message.
To add a custom acronym definition, either customize `wtf-custom-alist' or do:
M-x wtf-add RET RET RET
To remove a custom acronym definition, or mark a pre-defined acronym as "removed" in the case that no custom acronym definition exists in `wtf-custom-alist' for that acronym, do:
M-x wtf-remove RET RET
To mark a pre-defined acronym as "removed", without checking first
to see whether it is in wtf-custom-alist', customize the
wtf-removed-acronyms' option.
If you add a custom acronym definition, and feel it to be worth sharing, you are encouraged to contact [email protected] via email, providing the acronym and its definition. This increases the chance that it will appear in future versions of wtf.el.
~/.emacs.d/elpa/wget*/USAGE
- Place dependencies in your `load-path' or load them directly
- Load skewer-mode.el
- M-x `run-skewer' to attach a browser to Emacs
- From a `js2-mode' buffer, send forms to the browser to evaluate
The keybindings for evaluating expressions in the browser are just like the Lisp modes. These are provided by the minor mode `skewer-mode'.
- C-x C-e -- `skewer-eval-last-expression'
- C-M-x -- `skewer-eval-defun'
- C-c C-k -- `skewer-load-buffer'
The result of the expression is echoed in the minibuffer.
Additionally, `css-mode' gets a similar set of bindings for modifying the CSS rules on the current page. They operate on declarations and rules.
Note: run-skewer' uses
browse-url' to launch the browser. This
may require further setup depending on your operating system and
personal preferences.
Multiple browsers and browser tabs can be attached to Emacs at once. JavaScript forms are sent to all attached clients simultaneously, and each will echo back the result individually. Use `list-skewer-clients' to see a list of all currently attached clients.
Sometimes Skewer's long polls from the browser will timeout after a number of hours of inactivity. If you find the browser disconnected from Emacs for any reason, use the browser's console to call skewer() to reconnect. This avoids a page reload, which would lose any fragile browser state you might care about.
To skewer your own document rather than the provided blank one,
- Load the dependencies
- Load skewer-mode.el
- Start the HTTP server (`httpd-start')
- Include "http://localhost:8080/skewer" as a script
(see
example.html' and check your
httpd-port') - Visit the document from your browser
Skewer fully supports CORS so the document need not be hosted by Emacs itself. A Greasemonkey userscript is provided for injecting Skewer into any arbitrary page you're visiting without needing to modify the page on the host.
With skewer-repl.el loaded, a REPL into the browser can be created
with M-x skewer-repl', or C-c C-z. This should work just like a console within the browser. Messages can be logged to this REPL with
skewer.log()(just like
console.log()`).
Start by installing the dependencies:
- js2-mode https://github.com/mooz/js2-mode/
- dash https://github.com/magnars/dash.el
- multiple-cursors https://github.com/magnars/multiple-cursors.el
It is also recommended to get expand-region to more easily mark vars, method calls and functions for refactorings.
Then add this to your emacs settings:
(require 'js2-refactor)
Note: I am working on a smoother installation path through package.el, but I haven't had the time to whip this project into that sort of structure - yet.
All refactorings start with C-c C-m
and then a two-letter mnemonic shortcut.
ef
isextract-function
: Extracts the marked expressions out into a new named function.em
isextract-method
: Extracts the marked expressions out into a new named method in an object literal.ip
isintroduce-parameter
: Changes the marked expression to a parameter in a local function.lp
islocalize-parameter
: Changes a parameter to a local var in a local function.eo
isexpand-object
: Converts a one line object literal to multiline.co
iscontract-object
: Converts a multiline object literal to one line.wi
iswrap-buffer-in-iife
: Wraps the entire buffer in an immediately invoked function expressionig
isinject-global-in-iife
: Creates a shortcut for a marked global by injecting it in the wrapping immediately invoked function expressionag
isadd-to-globals-annotation
: Creates a/*global */
annotation if it is missing, and adds the var at point to it.ev
isextract-var
: Takes a marked expression and replaces it with a var.iv
isinline-var
: Replaces all instances of a variable with its initial value.rv
isrename-var
: Renames the variable on point and all occurrences in its lexical scope.vt
isvar-to-this
: Changes localvar a
to bethis.a
instead.ao
isarguments-to-object
: Replaces arguments to a function call with an object literal of named arguments. Requires yasnippets.3i
isternary-to-if
: Converts ternary operator to if-statement.sv
issplit-var-declaration
: Splits avar
with multiple vars declared, into severalvar
statements.uw
isunwrap
: Replaces the parent statement with the selected region.
There are also some minor conveniences bundled:
C-S-down
andC-S-up
moves the current line up or down. If the line is an element in an object or array literal, it makes sure that the commas are still correctly placed.
js-comint.el let's you run an inferior javascript process in emacs, and defines a few functions for sending javascript input to it quickly.
Put js-comint.el in your load path Add (require 'js-comint) to your .emacs Set inferior-js-program-command to the execution command for running your javascript REPL (setq inferior-js-program-command "/path/to/executable ") Do: M-x run-js Away you go.
I've added the following couple of lines to my .emacs to take advantage of cool keybindings for sending things to the javascript interpreter inside of Steve Yegge's most excellent js2-mode.
(add-hook 'js2-mode-hook '(lambda () (local-set-key "\C-x\C-e" 'js-send-last-sexp) (local-set-key "\C-\M-x" 'js-send-last-sexp-and-go) (local-set-key "\C-cb" 'js-send-buffer) (local-set-key "\C-c\C-b" 'js-send-buffer-and-go) (local-set-key "\C-cl" 'js-load-file-and-go) ))
YEAH.
learn it
more learning
see if it's useful
look into
look into
learn how to use ( plus all the plugins i've downloaded )
look into it ( ie, what is it )
figure it out ( plus plugins )
what what ( ....is it )
figure out how to use it, and all the plugins i've got