สารบัญ
· ngaicode · Cursor · 6 min read

Cursor Tutorial 2026: สอนใช้ Cursor AI Editor ตั้งแต่เริ่มต้น

Cursor Tutorial ฉบับสมบูรณ์ 2026: เรียนรู้ Agent Mode, Composer, คีย์ลัด, MCP setup และเทคนิคขั้นสูง — เปรียบเทียบราคา Cursor Pro $20/mo vs ngaicode Cursor 4,990 บาท/ปี ประหยัดขึ้น 35%

Cursor Tutorial 2026: สอนใช้ Cursor AI Editor ตั้งแต่เริ่มต้น

TL;DR: Cursor คือ AI Code Editor (VS Code fork) ที่ดีที่สุดในปี 2026 — มี Agent Mode แก้หลายไฟล์อัตโนมัติ, Composer วางแผน refactor, MCP เชื่อมต่อ GitHub/Notion/Figma ราคา Cursor Pro $20/mo (~640 บาท) แต่ซื้อผ่าน ngaicode Cursor 4,990 บาท/ปี (~416 บาท/เดือน) ประหยัดขึ้น 35% จ่าย PromptPay ได้ ไม่ต้องใช้บัตรเครดิต

3 ลิงก์เดียวที่ต้องจำ:


Cursor คืออะไร?

Cursor คือ VS Code fork ที่ฝัง AI ไว้ในแกนหลัก ไม่ใช่ extension — ทำให้ทำสิ่งที่ extension ทั่วไป (เช่น GitHub Copilot) ทำไม่ได้:

  • Agent Mode — AI แก้หลายไฟล์อัตโนมัติ, รัน terminal, ตรวจ test
  • Composer — วางแผน + preview refactor ขนาดใหญ่ก่อน apply
  • Multi-model — สลับ Claude / GPT / Grok ได้ตามงาน
  • MCP — เชื่อมต่อ GitHub, Notion, Figma, Linear, Slack
  • Codebase indexing — index ทั้งโปรเจกต์ ให้ AI เข้าใจ context

ต่างจาก Copilot ตรงที่ Cursor integrate AI ที่ระดับ editor core → เข้าใจ codebase ทั้งโปรเจกต์ รัน terminal/debugger อัตโนมัติ และ fast apply ได้ทันที


ขั้นตอนที่ 1: ติดตั้งและตั้งค่า

ดาวน์โหลดและติดตั้ง

  1. ไปที่ cursor.com → ดาวน์โหลดตาม OS (Windows / Mac / Linux)
  2. ติดตั้งเหมือนแอปทั่วไป
  3. เปิดครั้งแรก Cursor จะ import settings, extensions, keybindings จาก VS Code อัตโนมัติ

Tip: เพราะ Cursor เป็น VS Code fork — extension เดิมทุกตัวใช้ได้ทันที

สมัครและเลือกแพ็กเกจ

Planราคาฟีเจอร์
Hobbyฟรี (14 วัน)50 requests/เดือน, โมเดลพื้นฐาน
Pro$20/เดือน (~640 บาท)500 fast requests, Claude Sonnet, GPT-4o, Agent Mode
Pro+$60/เดือน (~2,100 บาท)2,000 requests, priority access
Ultra$200/เดือน (~7,000 บาท)Unlimited, premium models ทั้งหมด

แนะนำ: เริ่มจาก 14-day free trial แล้วอัปเป็น Pro ตอนใช้จริงจัง — สั่งผ่าน ngaicode 4,990 บาท/ปี


ขั้นตอนที่ 2: ฟีเจอร์หลักและคีย์ลัด

Autocomplete (Tab)

แนะนำ code ขณะพิมพ์ กด Tab รับ — เหมาะเขียน code ใหม่ทีละบรรทัด Cursor เรียนรู้จาก codebase ยิ่งใช้ยิ่งแม่น

Cmd+K — Inline Edit

  • Mac: Cmd+K | Windows/Linux: Ctrl+K
  • ใช้แก้ code inline: เลือก code → กด Cmd+K → พิมพ์ “Add error handling” → Cursor เขียนใหม่
  • Prompt ที่ใช้บ่อย: “Add TypeScript types” / “Convert to async/await” / “Add JSDoc comments” / “Optimize this function”

Cmd+L — Chat

  • Mac: Cmd+L | Windows/Linux: Ctrl+L
  • ถามคำถามเกี่ยวกับ code, debug, ขอคำอธิบาย — Pro tip: ใช้ @filename reference ไฟล์เฉพาะ

Cmd+I → Agent Mode (แก้หลายไฟล์)

  • Mac: Cmd+I → เลือก “Agent” | Windows/Linux: Ctrl+I → เลือก “Agent”
  • AI แก้หลายไฟล์อัตโนมัติ รัน terminal ตรวจสอบผล — เหมาะ refactor 3+ ไฟล์, implement feature, debug ซับซ้อน
  • อย่าใช้ สำหรับแก้ 1 บรรทัด (ใช้ Cmd+K) — Agent Mode กิน quota 1-3 credits/task

ตัวอย่าง Agent Mode workflow:

Prompt: "Refactor user authentication จาก session เป็น JWT"
Agent: อ่าน 8 ไฟล์ → สร้าง JWT utility → แก้ทุก endpoints
     → แก้ schema → อัปเดต tests → รัน tests → เสนอ refactor ให้ review

Composer — Structured Refactoring

เปิดได้ 2 ทาง: คลิกปุ่ม “Composer” มุมขวาบน หรือกด Cmd+Shift+I (Mac) / Ctrl+Shift+I (Windows/Linux)

Workflow: เปิด Composer → พิมพ์ “Convert REST API เป็น GraphQL” → Composer แสดงแผนทีละขั้น → Review → Apply → ดู diff แต่ละไฟล์ → รับ/ปฏิเสธ

ต่างจาก Agent Mode:

  • Composer — คุณคุมทุกขั้น เห็น diff ก่อน apply
  • Agent Mode — AI ทำงานอัตโนมัติ คุณ review ตอนจบ

ขั้นตอนที่ 3: ฟีเจอร์ขั้นสูง

Multi-Model Switching

โมเดลเหมาะกับ
Claude Sonnet 3.7Refactor ซับซ้อน, long context (200K tokens)
GPT-4oเร็วสุด, autocomplete, งานทั่วไป
GPT-5.6Reasoning สำหรับ algorithm
o1-previewReasoning ขั้นสูง ปัญหายาก ๆ

Pro tip: ใช้ GPT-4o สำหรับ autocomplete (เร็ว) Claude Sonnet สำหรับ Agent Mode (เก่ง multi-file) — เปิด Settings (Cmd+,) → ค้นหา “model” → เลือก default

@Commands — เพิ่ม Context

@Files / @Folders / @Codebase / @Docs / @Web / @Git — ใส่ context เฉพาะให้ AI request

ตัวอย่าง: @Files src/auth/middleware.ts @Files src/models/user.ts “ทำไฟล์ทั้งสองนี้ให้ consistent กัน”

MCP (Model Context Protocol) Setup

MCP เชื่อม Cursor กับ external data: GitHub / Notion / Figma / Linear / Slack

วิธีตั้งค่า: Settings → Features → Model Context Protocol → ”+ Add MCP server” → เลือก server → Authenticate

ตัวอย่าง: @GitHub fetch issue #245 and fix the bug — Cursor อ่าน issue แล้ว fix ข้ามหลายไฟล์

.cursorrules — Custom Instructions

สร้างไฟล์ .cursorrules ใน project root ระบุ convention:

## Code Style — TypeScript strict mode, functional components, async/await, JSDoc
## Naming — Components PascalCase, Functions camelCase, Constants UPPER_SNAKE_CASE
## Testing — Jest + React Testing Library, coverage ≥ 80%
## Imports — Absolute imports จาก `~/`, จัดกลุ่ม: React, external, internal, styles

Cursor อ่านและทำตาม convention อัตโนมัติ


ขั้นตอนที่ 4: Workflow ในงานจริง

Workflow 1: Implement Feature ใหม่

  1. เปิด Composer → Prompt: “Add JWT authentication with login/register endpoints”
  2. Review แผน 10 ขั้น → Apply → Review diff → รัน tests → Commit
  3. เวลาที่ประหยัด: 2-3 ชม. → 20 นาที

Workflow 2: Debug Bug ซับซ้อน

  1. เปิด Chat → @Files api/auth.ts “ทำไม authentication ล้มเหลวบางครั้ง?”
  2. Cursor: “Race condition ใน token refresh logic” → “Fix it”
  3. เวลาที่ประหยัด: 1-2 ชม. → 10 นาที

Workflow 3: Refactor Legacy Code

  1. Agent Mode → “Refactor UserProfile.tsx: extract components, add types, improve performance”
  2. Agent แยกเป็น 5 components + เพิ่ม TypeScript + optimize re-renders ด้วย useMemo
  3. เวลาที่ประหยัด: 4-6 ชม. → 30 นาที

ขั้นตอนที่ 5: Pro Tips

  1. Prompt เจาะจง: ❌ “ทำให้ดีขึ้น” → ✅ “Add error handling, TypeScript types และ unit tests”
  2. แบ่งงานใหญ่เป็นขั้นเล็ก: แทน “Rewrite ทั้ง auth system” → แยก Extract JWT → Update login → Update middleware → Add refresh token
  3. Review ก่อน Accept: ตรวจ security, logic, tests, รันแอป — AI ทรงพลังแต่คุณยังเป็น engineer
  4. Pin โมเดล: Autocomplete = GPT-4o (เร็ว) | Chat/Agent = Claude Sonnet 3.7 — ป้องกัน quota รั่ว
  5. ติดตาม Quota: 500 fast requests/เดือน — 1 autocomplete = 0 credit | 1 Cmd+K = 1 credit | 1 Agent task = 1-3 credits — เช็คที่ Settings → Usage

ขั้นตอนที่ 6: แก้ปัญหาที่เจอบ่อย

  • Quota exceeded → ใช้ Cmd+K แทน Agent Mode / Pin GPT-4o / อัป Pro+ หรือใช้ API Key ส่วนตัว
  • Agent Mode ช้า → งานเร็วใช้ Cmd+K / ลดจำนวนไฟล์ที่ Agent อ่าน
  • Autocomplete ผิดบ่อย → เพิ่ม .cursorrules / ใช้ @Files ให้ context
  • ติดตั้ง extension ไม่ได้ → Cursor ใช้ VS Code extensions โดยตรง เปิด Cmd+Shift+X ติดตั้งเหมือนเดิม

ราคา Cursor Pro vs ngaicode Cursor

Planราคาจ่ายยังไง
Cursor Pro (Official)$20/เดือน (~640 บาท)บัตรเครดิตต่างประเทศ
ngaicode Cursor4,990 บาท/ปี (~416 บาท/เดือน)PromptPay โอนธนาคาร TrueMoney

ข้อดี ngaicode Cursor:

  • ✅ ประหยัดขึ้น 35% (4,990/ปี vs 7,680/ปี)
  • ✅ จ่าย PromptPay ได้ ไม่ต้องใช้บัตรเครดิต
  • ✅ ออกใบกำกับภาษีได้ (VAT 7%)
  • ✅ ต่ออายุผ่าน Line OA สะดวก
  • ✅ รับ API Key ทันทีหลังจ่าย

สั่ง ngaicode Cursor — 4,990 บาท/ปี


เปรียบเทียบกับผลิตภัณฑ์ ngaicode อื่น ๆ

ผลิตภัณฑ์ราคาเหมาะกับ
ngaicode Cursor4,990 บาท/ปีDev ที่อยากได้ IDE ครบ + Agent Mode
ngaicode Codex300 บาท/เดือนDev ที่ใช้ GPT-5.6+ / Codex CLI
ngaicode Claude Code150 บาท/เดือนDev ที่ใช้ Anthropic Claude ผ่าน API

ดูทั้ง 3 ผลิตภัณฑ์ที่ ngaicode Home


FAQ — คำถามที่ถามบ่อย

Q1: Cursor ดีกว่า GitHub Copilot ไหม?

Cursor มีฟีเจอร์ขั้นสูงกว่า (Agent Mode, Composer, multi-model) Copilot เร็วกว่าและถูกกว่า — เลือก Cursor สำหรับโปรเจกต์ซับซ้อน Copilot สำหรับ autocomplete ง่าย ๆ

Q2: ต้องเรียนคีย์ลัดใหม่ไหม?

ไม่ต้อง — Cursor ใช้ VS Code shortcuts เดิม เพิ่ม AI ใหม่แค่ Cmd+K / Cmd+L / Cmd+I

Q3: Cursor ใช้ offline ได้ไหม?

ไม่ได้ — ต้องใช้ internet สำหรับ AI features (autocomplete + edit พื้นฐานใช้ offline ได้)

Q4: Cursor ราคาเท่าไหร่?

Pro $20/เดือน (500 fast requests) มี free trial 14 วัน — สั่งผ่าน ngaicode 4,990 บาท/ปี จ่าย PromptPay ได้

Q5: Agent Mode กิน quota เท่าไหร่?

1 Agent task = 1-3 credits (ขึ้นกับความซับซ้อน) — Cmd+K = 1 credit, autocomplete = 0 credit

Q6: .cursorrules คืออะไร?

ไฟล์ Markdown ใน project root ระบุ code style, naming, testing convention — Cursor อ่านและทำตามอัตโนมัติ

Q7: MCP ใช้ทำอะไร?

เชื่อม Cursor กับ external data (GitHub, Notion, Figma) เช่น สั่ง “@GitHub fix issue #245” ได้โดยตรงจาก editor

Q8: ใบกำกับภาษี (VAT 7%) ขอได้ไหม?

ได้ — ทัก Line OA ติดต่อเรา ตอนสั่งซื้อ



พร้อมเริ่มใช้ Cursor แล้วหรือยัง?

3 ขั้นตอนง่าย ๆ: เลือก Cursor Pro — สแกน PromptPay — รับ Key ทันที

  1. สั่ง Cursor Pro ผ่าน ngaicode: ngaicode Cursor หน้าย่อย — เริ่ม 4,990 บาท/ปี
  2. สอบถาม/สั่งซื้อ: Line OA ติดต่อเรา — ตอบจริง ภายใน 5 นาที
  3. ดูภาพรวม 3 ผลิตภัณฑ์: ngaicode Home — Cursor / Codex / Claude Pro
กลับสู่บล็อก

บทความที่เกี่ยวข้อง

ดูทั้งหมด »
Line OA