Sunday, April 6, 2025

Setting Javascript Identation in Emacs

 To set the indent width when editing Javascript files in Emacs, set the variable js-indent-level to the desired width.  This can be done by calling setq in the init file, but these days I just invoke the describe variable function by C-h v, then customize the variable there, this also sets the variable in the init file.

  1. C-h v
  2. js-indent-level [Enter]
  3. Focus on the customize link and hit enter
  4. Chang the indent value in the customize page
  5. Focus on the Apply and Save button and hit enter

Enable SSH Agent for Magit in Emacs

  1. M-x package-install [Enter]
  2. ssh-agency [Enter]

This package will invoke SSH Agent for entering private key passphrase when needed such as pushing or fetching.