Skip to content

Instantly share code, notes, and snippets.

@liopash
Created April 13, 2018 14:17
Show Gist options
  • Save liopash/1f1d88eeab24b703d518d71a408399b3 to your computer and use it in GitHub Desktop.
Save liopash/1f1d88eeab24b703d518d71a408399b3 to your computer and use it in GitHub Desktop.

Revisions

  1. @mloskot mloskot revised this gist Oct 14, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions emacs_sml_mode_shortcuts.markdown
    Original file line number Diff line number Diff line change
    @@ -44,6 +44,8 @@ A list of handy Emacs and SML REPL keyboard shortcuts:
    * ```C-x 2``` Split the window horizontally into 2 buffers, one above the other
    * ```C-x o``` Switch between windows

    See [Manage Split Windows](http://ergoemacs.org/emacs/emacs_winner_mode.html) tutorial.

    ## Commands

    * ```M-p``` previous command
  2. @mloskot mloskot revised this gist Oct 14, 2013. 1 changed file with 41 additions and 14 deletions.
    55 changes: 41 additions & 14 deletions emacs_sml_mode_shortcuts.markdown
    Original file line number Diff line number Diff line change
    @@ -1,32 +1,59 @@
    # Emacs Shortcuts

    A list of handy Emacs and SML REPL keyboard shortcuts:

    * ```C-x u``` Undo
    * ```C-x C-f``` find file or open new
    * ```C-x C-s``` save file
    ## Basics

    * ```C-x C-c``` Quit Emacs
    * ```C-g``` Cancel the current action
    * ```C-x C-f``` Find and open a file (whether or not it already exists)
    * ```C-x C-s``` Save a file
    * ```C-x C-w``` Write a file (probably more familiar to you as Save as...)

    ## Moving

    * ```C-e``` go to end of line
    * ```C-a``` go to begin of line

    ## Cut, copy, paste

    * ```C-space``` Set a mark and then move the cursor to highlight a region
    * ```C-w``` Cut a highlighted region
    * ```M-w``` Copy a highlighted region
    * ```C-k``` Cut (kill) from the cursor to the end of the line
    * ```C-y``` Paste (yank)

    ## Editing

    * ```C-x u``` Undo
    * ```M-;``` line comment - region or goes to end of line
    * ```C-u M-;``` removes line comment
    * ```C-M-\``` indent region

    * ```C-x b``` select another buffer
    * ```C-x C-b``` list all buffers
    * ```C-x 1``` get rid of buffer list
    ## Buffers

    * ```C-x b``` Switch to another buffer by entering its name
    * ```C-x C-b``` See a list of all current buffers
    * ```C-x 1``` Get rid of buffer list
    * ```C-x k``` kill a buffer

    * ```C-x 0``` dismiss this window
    * ```C-x 1``` dismiss all other windows
    * ```C-x 2``` split window in two horizontally
    * ```C-x o``` switch cursor to other window
    ## Splits

    SML mode from http://www.smlnj.org/doc/Emacs/sml-mode.html
    * ```C-x 0``` Undo window-splitting so there is only 1 buffer; dismiss this split
    * ```C-x 1``` Dismiss all other windows
    * ```C-x 2``` Split the window horizontally into 2 buffers, one above the other
    * ```C-x o``` Switch between windows

    ## Commands

    * ```M-p``` previous command
    * ```M-n``` next command


    ## SML mode from http://www.smlnj.org/doc/Emacs/sml-mode.html

    * ```C-c C-s``` SML REPL command
    * ```M-<TAB>``` Indentation
    * ```<TAB>``` Indentation
    * ```C-c C-b``` Send the contents of the current buffer to ML.
    * ```C-c C-l``` Send a `use file' command to the current ML process.

    * ```M-p``` previous command
    * ```M-n``` next command
  3. @mloskot mloskot revised this gist Oct 7, 2013. 1 changed file with 29 additions and 1 deletion.
    30 changes: 29 additions & 1 deletion emacs_sml_mode_shortcuts.markdown
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,32 @@
    A list of handy Emacs and SML REPL keyboard shortcuts:

    * ```C-x u``` Undo
    * ```C-x C-f``` find file or open new
    * ```C-x C-s``` save file
    * ```C-e``` go to end of line
    * ```C-a``` go to begin of line

    * ```M-;``` line comment - region or goes to end of line
    * ```C-u M-;``` removes line comment
    * ```C-M-\``` indent region

    * ```C-x b``` select another buffer
    * ```C-x C-b``` list all buffers
    * ```C-x 1``` get rid of buffer list
    * ```C-x k``` kill a buffer

    * ```C-x 0``` dismiss this window
    * ```C-x 1``` dismiss all other windows
    * ```C-x 2``` split window in two horizontally
    * ```C-x o``` switch cursor to other window

    SML mode from http://www.smlnj.org/doc/Emacs/sml-mode.html

    * ```C-c C-s``` SML REPL command
    * ```M-<TAB>``` Indentation
    * ```<TAB>``` Indentation
    * ```C-c C-b``` Send the contents of the current buffer to ML.
    * ```C-c C-l``` Send a `use file' command to the current ML process.

    * ```M-p``` previous command
    * ```M-n``` next command
    * ```M-n``` next command
  4. @mloskot mloskot created this gist Oct 5, 2013.
    4 changes: 4 additions & 0 deletions emacs_sml_mode_shortcuts.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    A list of handy Emacs and SML REPL keyboard shortcuts:

    * ```M-p``` previous command
    * ```M-n``` next command