Here is random list of useful emacs tricks I keep on forgetting. This page is a work in progess :-)

  • To append say 4 underscores to a whole region:
    M-x replace-regexp
    replace regexp: ^
    replace regexp ^ with: ____
  • Whitespace cleanup:
    M-x whitespace-cleanup
  • Replace tabs with spaces:
    M-x untabify