ML之第一周 基本语法和Emacs的使用

Emacs的基本使用

ML之第一周 基本语法和Emacs的使用_第1张图片
Emacs
  • Every buffer is edited in a mode. The most basic mode is Fundamental, which provides only the most basic Emacs editing features. There are modes for many different programming languages.

  • There are many "special" buffers that do not correspond to loaded files. The one above is called scratch. This buffer runs in Lisp Interaction mode, which means that you can interactively type and evaluate expressions in the Lisp programming language. But we won't do that.

  • C-g: Cancel current action
    核心按键: C-x (Control-x (lowercase)) or M-x (Meta-x, in windows use Alt+x)

C-x

  • C-x C-c:Quit Emacs.
  • C-x C-f: 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...)

M-x

  • M-w: Copy a highlighted region

  • C-c C-s:SML command(1. enter sml 2. use "foo.sml";)
    进入command模式以后

  • C-d退出(Process sml finished)

  • M-p上一条命令

基本语法:

  • val i = 1(没有分号)
  • ~4表示-4

你可能感兴趣的:(ML之第一周 基本语法和Emacs的使用)