Compare and set up the best AI-powered code editors for developers.
Modern code editors come with AI built in. Instead of memorising every function or hunting through documentation, you can describe what you want in plain English and the editor writes the code, explains it, and fixes your bugs. Choosing the right editor is the single biggest productivity upgrade you can make as a developer — and this lesson shows you exactly how to set up the best one for your workflow.
This lesson is organized into 3 tiers so you only pay for the depth you need:
Here's the short version before we dive in — all four are excellent, they just fit different needs:
code.visualstudio.com and click the blue "Download" button for your operating system (Windows, macOS, or Linux).Ctrl+W.Ctrl+Shift+P and type Shell Command: Install 'code' command in PATH (macOS/Linux) so you can launch the editor from your terminal with code .code . opens VS Code in the current folder. This one command saves more time than almost any setting you'll configure.When VS Code opens, you'll see four key areas. Knowing their names helps you follow any tutorial:
Ctrl+B to hide/show it.Click the Extensions icon in the left Activity Bar (or press Ctrl+Shift+X), search for each name, and click Install:
| Extension | What It Does | Who Needs It |
|---|---|---|
| Python (by Microsoft) | IntelliSense, linting, debugging, Jupyter support | Data science & general Python |
| LaTeX Workshop | Compile .tex files, preview PDF, bibliography tools | Academic papers & theses |
| GitLens | Inline blame, history, branch exploration | Anyone using Git |
| Live Server | One-click local server with auto-refresh for HTML | Web development |
| Prettier | Auto-formats your code on save | Everyone — clean code for free |
| GitHub Copilot | AI suggestions as you type | Everyone (free with Student Pack) |
// function to add two numbers — Copilot suggests the code in grey. Press Tab to accept.Prefer the terminal? Install OpenCode globally with npm:
npm i -g opencode-ai
mkdir TerminalProjects
cd TerminalProjects
opencodeThe opencode command starts an interactive session where you describe a task and it edits files, runs commands, and explains its work — all inside your terminal.
mkdir my-first-ai-project then cd my-first-ai-project.code .main.py.# read a CSV file and print the average of the 'score' column, then press Enter.Ctrl+`) with python main.py.Alt+Enter to force a suggestion on the current line.Learn these five and you'll navigate faster than 90% of VS Code users:
| Shortcut | Action |
|---|---|
Ctrl+Shift+P | Command Palette — run any command |
Ctrl+D | Select next occurrence (multi-cursor editing) |
Ctrl+` | Toggle integrated terminal |
Ctrl+P | Quick file picker — jump to any file by name |
Ctrl+/ | Toggle line comment |
Shift+Alt+F | Format document (trigger Prettier) |
Ctrl+P, then type @ to jump straight to a function or : to jump to a line number. It's the fastest way to move around a big file.code.visualstudio.comCtrl+`) is a terminal inside your editor — you never have to leave VS Code to run your scripts or Git commands.The complete core setup: choose the right editor, install VS Code with the essential extensions, activate Copilot with your Student Pack, and run your first AI-assisted project.
| Editor | Type | AI Models | Free Tier | Best For |
|---|---|---|---|---|
| VS Code | Classic + extensions | Copilot (GPT / Claude) | Editor free; Copilot free w/ Student Pack | General-purpose coding, data science, maximum flexibility |
| Cursor | AI-native fork of VS Code | Claude, GPT-4, custom models | Limited free AI usage per month | Developers who want an AI-first experience |
| Windsurf | AI-native editor | Proprietary + top models | Limited free credits | Large codebases needing deep project context |
| OpenCode | Terminal / TUI agent | Many (bring your own model key) | Open-source, free CLI | SSH workflows, lightweight servers, keyboard purists |
| Model | Strong At | Typical Cost Context |
|---|---|---|
| Claude (Sonnet / Opus) | Long-context edits, careful reasoning, multi-file changes | Included in Cursor & Windsurf subscriptions; also free tiers via CLI tools |
| GPT-4 / GPT-4o | General codegen, chat, explanation | Used by Cursor and Copilot plans |
| Copilot models | Inline completions tuned for speed | Free with GitHub Student Pack |
| Local models (Ollama) | Privacy, offline, no subscription | Free software; needs a decent GPU or runs slowly on CPU |
For a student budget the sweet spot is: Copilot (₵0 with Student Pack) for inline suggestions + a free Gemini/Claude CLI for deep questions. Only pay for Cursor/Windsurf when you want their agent workflows.
Press Ctrl+Shift+P (macOS: Cmd+Shift+P) and type to run any command: Format Document, Toggle Terminal, Change Color Theme, Preferences: Open Settings (JSON). In Cursor and Windsurf, the same palette also gives you AI actions.
Hold Alt and click to place a second cursor; press Ctrl+D to select the next match of your selection and keep extending. Type once and it edits everywhere. This is how you rename variables across a file in seconds.
Ctrl+L, and ask "what does this do?" or "why is this failing?"@ in chat to attach specific files, folders, or docs for context.Windsurf's flagship feature is Cascade — an agent that is always aware of your whole project. It can detect the file you're working on, offer to explain errors before you ask, and run multi-step refactors across directories with one instruction. Use it for large, unfamiliar codebases where you need context fast.
Both Cursor (.cursorrules) and Windsurf (global rules) let you teach the AI your project's conventions:
# .cursorrules example
- This project uses Python 3.11 and type hints everywhere.
- Always write tests for new functions using pytest.
- Prefer dataclasses over plain dictionaries for models.
- Never use the print() function; use the logging module.Place this file in your project root and the AI will follow it for every future request.
Modern editors support MCP (Model Context Protocol) — a standard way to give the AI access to databases, file systems, and APIs. In Cursor, enable it under Settings → MCP and add a server like GitHub or a database connector. The AI can then query your real data instead of guessing.
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.minimap.enabled": false,
"editor.fontSize": 14,
"files.autoSave": "onFocusChange",
"editor.wordWrap": "on",
"workbench.colorTheme": "Default Dark+"
}Open Ctrl+Shift+P → Preferences: Open Settings (JSON) and paste these — Prettier will now format your code automatically every time you save.
.cursorrules or consistent prompts, the AI won't match your style.@st.knust.edu.gh email.Everything in Basic + the full four-editor comparison, pro techniques (multi-cursor, Cursor Composer, Windsurf Cascade, rules files, MCP), settings.json snippets, and the common-mistakes guide.
Paste this into Preferences: Open Settings (JSON) for a fully optimised dev environment:
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.minimap.enabled": false,
"files.autoSave": "onFocusChange",
"workbench.startupEditor": "none",
"terminal.integrated.fontSize": 13,
"git.autofetch": true,
"git.confirmSync": false,
"emmet.includeLanguages": {"javascript": "javascriptreact"},
"python.linting.enabled": true,
"extensions.ignoreRecommendations": false
}Open Ctrl+Shift+P → Preferences: Open Keyboard Shortcuts (JSON) and add your most-used actions:
[
{
"key": "ctrl+shift+enter",
"command": "editor.action.insertLineAfter"
},
{
"key": "ctrl+shift+t",
"command": "workbench.action.terminal.new"
},
{
"key": "ctrl+shift+p",
"command": "workbench.action.showAllSymbols",
"when": "editorTextFocus"
}
]Ctrl+Shift+T for a new terminal and Ctrl+Shift+Enter to insert a line below are favourites that save hundreds of keypresses a day.code . works — launch from terminal successfullygit config --global user.name and user.email setCtrl+` opens and runs a script.cursorrules or equivalent in your main repoCtrl+Shift+P, Ctrl+D, Ctrl+`1. Code review:
"Review [FILE/PASTE CODE]. List bugs, security issues, and style problems
in priority order. Show the corrected version."
2. Explain:
"Explain what this function does line by line, assuming I'm new to
[LANGUAGE]. Then give a simpler alternative."
3. Refactor:
"Refactor this code to be more readable. Keep the behaviour identical.
Show me a before/after diff."
4. Tests:
"Write pytest unit tests for [FUNCTION]. Cover edge cases: empty input,
wrong types, and very large inputs."
5. Debugging:
"Here is the error message and my file. What is the root cause and the
minimum change to fix it?"Ctrl+Shift+P → Developer: Reload Window.code? — Reinstall and tick Add to PATH, or run the Shell Command: Install 'code' command in PATH command.editor.defaultFormatter) and that you've pressed Format Document at least once to trigger it.Ctrl+L chat only when you need it.sudo or fix npm's global prefix; on Windows run PowerShell as administrator.node_modules from the file explorer (Settings → Files: Exclude), and enable search.useIgnoreFiles.git fetch and make sure you're on the latest branch; GitLens reads your local history.Watch these tutorials to go deeper, and keep these resources handy for the full workflow:
Everything in Basic + Advanced + the full settings.json template, a 10-point setup checklist, 5 ready-to-use AI prompt templates, and troubleshooting for the 6 most common editor problems.
Payments are processed securely by Paystack. Your card details never reach our servers.
Lesson access unlocked. Check your email for confirmation.