QUICKSTART_PHASE1.md 3.9 KB

Quick Start - Phase 1 Features

Launch the Editor

cd /Users/user/Projects/lumacs
./build/lumacs init.lua

Essential Commands to Try

1. Kill and Yank (Cut/Paste)

1. Navigate to a line
2. Press C-k to kill (cut) to end of line
3. Move to another location
4. Press C-y to yank (paste)
5. Press M-y to cycle through kill ring history

2. Mark and Region (Selection)

1. Position cursor at start of text you want to select
2. Press C-@ (or C-SPC) to set mark - you'll see "Mark set"
3. Move cursor to end of desired selection
4. Press C-w to cut, or M-w to copy
5. Press C-y to paste

3. Word Movement

1. Put cursor in middle of a word
2. Press M-f to jump forward one word
3. Press M-b to jump backward one word
4. Much faster than character-by-character!

4. Page Scrolling

1. Open a large file
2. Press C-v to scroll down one page
3. Press M-v to scroll up one page
4. Press M-< to jump to beginning
5. Press M-> to jump to end

5. Select All and Copy

1. Press C-x h to mark the whole buffer
2. Press M-w to copy everything
3. Create a new buffer
4. Press C-y to paste

Complete Command Reference

Kill Ring Commands

  • C-k - Kill to end of line (cut)
  • C-w - Kill region (cut selection)
  • M-w - Copy region (copy selection)
  • C-y - Yank (paste)
  • M-y - Yank pop (cycle kill ring) - use after C-y

Mark/Region Commands

  • C-@ - Set mark
  • C-x C-x - Exchange point and mark (swap cursor/mark)
  • C-x h - Mark whole buffer (select all)

Movement Commands

  • C-f - Forward char
  • C-b - Backward char
  • C-n - Next line
  • C-p - Previous line
  • C-a - Beginning of line
  • C-e - End of line
  • M-f - Forward word
  • M-b - Backward word
  • C-v - Page down
  • M-v - Page up
  • M-< - Beginning of buffer
  • M-> - End of buffer

Window Management

  • M-2 - Split horizontally
  • M-3 - Split vertically
  • M-0 - Close window
  • C-x o - Next window

File Operations

  • C-s - Save
  • C-x C-f - Find file (via minibuffer)
  • :e filename - Edit file (vim-style)

Other

  • C-z or C-/ - Undo
  • C-x u - Redo
  • M-x - Command mode
  • C-h m - Show current modes
  • C-l - Re-highlight buffer
  • C-q - Quit

Test Files Included

  • KILL_RING_TEST.md - Comprehensive kill ring test scenarios
  • PHASE1_COMPLETE.md - Full documentation of what was implemented
  • ROADMAP.md - Overall project roadmap

Tips

  1. C-@ and C-SPC are the same - Most terminals send C-@ when you press C-SPC
  2. Consecutive C-k presses - Kill multiple lines in a row and they'll all be in one kill ring entry
  3. M-y only works after C-y - You must yank first before you can cycle
  4. Visual feedback - Watch the message line for confirmations like "Mark set", "Region copied"

Common Workflows

Move a Block of Code

1. Go to start of block
2. C-@ (set mark)
3. Go to end of block
4. C-w (kill/cut)
5. Go to destination
6. C-y (yank/paste)

Duplicate a Line

1. Go to line
2. C-a (beginning of line)
3. C-@ (set mark)
4. C-e (end of line)
5. M-w (copy)
6. C-n (next line)
7. C-y (paste)

Quick Navigation

M-< - Jump to top
M-> - Jump to bottom
C-v C-v C-v - Scroll down 3 pages
M-v - Scroll back up
M-f M-f M-f - Jump forward 3 words

Troubleshooting

"Kill ring is empty" - You haven't killed any text yet. Try C-k first.

"No active region" - You need to set mark (C-@) before using C-w or M-w.

"Previous command was not a yank" - M-y only works right after C-y.

Meta key not working? - Make sure your terminal is sending Escape sequences for Alt/Option key.

Next Steps

Once you're comfortable with Phase 1 commands, we'll move on to Phase 2:

  • Buffer management (C-x b, C-x C-b, C-x k)
  • Switch between multiple files easily
  • Buffer list display

Enjoy your Emacs-style editing experience! 🎉