Setting Up Your AI Coding Environment
Setting Up Your AI Coding Environment
Now that you understand the landscape of AI coding tools, let’s get your environment configured so you can start using them effectively. A well-configured setup means faster iterations, better suggestions, and fewer frustrations.
Prerequisites
Before you start, make sure you have:
- A code editor installed (VS Code, JetBrains IDE, Vim, etc.)
- An active internet connection (most AI tools are cloud-based)
- A subscription or free trial to at least one AI coding tool
- Basic familiarity with your editor’s extension/plugin system
GitHub Copilot Setup
GitHub Copilot is the most accessible starting point. Here’s how to set it up:
Step 1: Get a Subscription
Visit github.com/features/copilot and:
- Click “Start a free trial”
- Follow the GitHub login/signup flow
- Choose your billing preference (monthly or yearly)
Note: GitHub offers free Copilot to verified students and open-source maintainers.
Step 2: Install the Extension
For VS Code:
- Open the Extensions sidebar (Ctrl+Shift+X)
- Search for “GitHub Copilot”
- Click “Install” on the official extension by GitHub
- Restart VS Code
For JetBrains IDEs (IntelliJ, PyCharm, WebStorm):
- Go to Settings → Plugins
- Search for “GitHub Copilot”
- Click “Install” and restart your IDE
For Vim/Neovim:
- Install via your plugin manager:
" vim-plug Plug 'github/copilot.vim' - Run
:PlugInstalland restart
Step 3: Authenticate
When you first use Copilot, it will prompt you to authenticate:
- Accept the GitHub authentication flow
- A browser window opens asking for authorization
- Click “Authorize github”
- You’ll see a device code — copy it
- Return to your editor and paste the code when prompted
You’re now authenticated!
Step 4: Configure Copilot Settings
In VS Code, open Settings and search for “Copilot”:
Essential settings:
{
"github.copilot.enable": {
"*": true,
"plaintext": false,
"markdown": true
},
"editor.inlineSuggest.enabled": true,
"editor.inlineSuggest.suppressSuggestions": false,
"github.copilot.advanced": {
"length": 500,
"temperature": 0.1
}
}
What these do:
enable: Toggle Copilot for different file typesinlineSuggest.enabled: Show suggestions inline as you typelength: Max length of suggestions (500 chars is reasonable)temperature: Lower values = more conservative suggestions
Step 5: Key Bindings
Customize how you trigger Copilot:
{
"key": "ctrl+;",
"command": "github.copilot.generateCodePalette"
},
{
"key": "alt+/",
"command": "github.copilot.openSymbolFromReferences"
}
Default key bindings:
- Tab: Accept suggestion
- Escape: Reject suggestion
- Ctrl+Enter: Show alternative suggestions
- Alt+[ or Alt+]: Cycle through suggestions
Cursor Setup
Cursor is a VS Code fork with AI baked in. Setup is simpler than adding extensions.
Step 1: Install Cursor
- Download from cursor.com
- Install like any other application
- Open Cursor (it’s a full editor, not an extension)
Step 2: Sign In
- Click your profile icon (top right)
- Choose “Sign in with GitHub” or “Sign in with Google”
- Complete the authentication
- You’ll get a subscription prompt
Step 3: Configure Model and Behavior
Open Settings (Ctrl+,):
Models tab:
Primary model: GPT-4 (or Claude 3.5 Sonnet)
Tab completion model: gpt-4
Chat model: Same as primary
Features tab:
Enable codebase indexing: ON
Enable plagiarism detection: ON (recommended)
Auto-save before chat: ON
Keybindings:
Cmd+K (Mac) or Ctrl+K (Windows): Open chat
Cmd+Shift+L: Open long context
Cmd+I: Open inline edit
Claude Code Setup (Web-Based)
Claude Code is available through Claude.com without installation.
Step 1: Create Account
- Go to claude.ai
- Sign up with email or Google/Apple account
- Verify your email address
Step 2: Enable Claude Code
- In the chat interface, look for the “Claude Code” button
- Click to enable it for your chat
- Grant file access permissions when prompted
Step 3: Using with Local Projects
To work on your local code:
Option A: Drag and drop files
1. Select files/folders in your file manager
2. Drag into the Claude.ai chat
3. Claude can now read and understand them
Option B: Copy-paste code
Select code → Ctrl+C → paste into chat
Claude can reference it and generate related code
Option C: Upload as archive
Zip your project → Upload to chat
Claude has full project context
VS Code General Optimization
Regardless of which AI tool you use, optimize VS Code for faster feedback:
Performance Settings
{
"editor.fontLigatures": true,
"editor.wordWrap": "on",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.watcherExclude": {
"**/node_modules": true,
"**/dist": true,
"**/.git": true
},
"[python]": {
"editor.defaultFormatter": "ms-python.python",
"editor.formatOnSave": true
}
}
Recommended Extensions
Beyond your AI tool, install these for better development:
| Extension | Purpose |
|---|---|
| Prettier | Auto-formatting |
| ESLint | JavaScript linting |
| Python | Python language support |
| GitLens | Git integration |
| Rest Client | Test API requests |
| Thunder Client | API testing UI |
IDE-Specific Optimizations
PyCharm (Python Development)
- Go to Settings → Languages & Frameworks → Python → AI Assistant
- Choose your AI tool (Copilot, Cody, or built-in)
- Enable inline suggestions:
- Editor → Inlay Hints → Code Vision → Enable
WebStorm (JavaScript/TypeScript)
- Settings → Languages & Frameworks → TypeScript
- Enable TypeScript language service for better completions
- Install Prettier for consistent formatting
- Add this to Run Configurations:
{ "node": true, "browser": true, "es2021": true }
Vim/Neovim Advanced Setup
For Copilot in Vim:
" init.vim
Plug 'github/copilot.vim'
" Key mappings
imap <silent><script><expr> <C-g> copilot#Accept("\<CR>")
let g:copilot_no_tab_map = v:true
For better Copilot experience in Vim, add Copilot-compatible commands:
" Use Ctrl+] to cycle through suggestions
imap <C-]> <Plug>(copilot-next)
imap <C-[> <Plug>(copilot-previous)
Project-Level Configuration
Create a .cursorrules or .clinerules file in your project root to give AI tools context about your project:
.cursorrules Example
# Project Guidelines
## Code Style
- Use TypeScript strictly (no `any` types)
- Follow Prettier config (see .prettierrc)
- Use arrow functions for anonymous functions
- Maximum line length: 80 characters
## Architecture
- Use React hooks, not class components
- Store in Redux with immer middleware
- API calls through services/ directory
- Environment variables in .env.local
## Testing
- Jest for unit tests
- Playwright for E2E tests
- Minimum 80% coverage
- Test files co-located with source
## Git
- Branch naming: feature/*, bugfix/*, docs/*
- Commit messages: conventional commits
- Always open PRs before merging to main
## Security
- Never commit secrets (use .env)
- Validate all user input
- Sanitize HTML in templates
- Check dependencies for vulnerabilities
## Files to Ignore
- node_modules/
- .env
- Build outputs
This file guides your AI assistant’s suggestions to match your project’s standards.
Authentication and Security
Protect Your API Keys
If you’re using Copilot or other tools that interact with your code:
-
Never commit credentials:
echo ".env" >> .gitignore echo "*.key" >> .gitignore -
Use environment variables:
import os api_key = os.getenv('API_KEY') -
For Copilot specifically:
- It respects your
.gitignore - It won’t suggest code from public
.envfiles in your context - Your code is processed on Microsoft servers (review their privacy policy)
- It respects your
Privacy Considerations
GitHub Copilot:
- Code is processed on Microsoft servers
- Microsoft may use snippets to improve the model (you can opt out)
- Disabled by default for files containing certain patterns
Cursor/Claude Code:
- Different privacy policies (check their documentation)
- Claude Code offers an option for local processing
- Smaller context windows for privacy-conscious users
Keyboard Shortcuts Quick Reference
GitHub Copilot
| Action | Shortcut |
|---|---|
| Accept suggestion | Tab |
| Reject suggestion | Escape |
| Show next suggestion | Alt+] |
| Show previous suggestion | Alt+[ |
| Open Copilot palette | Ctrl+Enter |
Cursor
| Action | Shortcut |
|---|---|
| Open chat | Cmd+K (Mac) / Ctrl+K (Windows) |
| Inline edit | Cmd+I / Ctrl+I |
| Accept edit | Cmd+Y / Ctrl+Y |
| Reject edit | Cmd+N / Ctrl+N |
VS Code General
| Action | Shortcut |
|---|---|
| Open command palette | Ctrl+Shift+P |
| Open settings | Ctrl+, |
| Open terminal | `Ctrl+“ |
Testing Your Setup
Once everything is installed, test your setup:
For Copilot:
- Create a new Python file:
test.py - Type:
def fibonacci( - Wait 2 seconds — Copilot should suggest the full function
- Press Tab to accept
For Cursor:
- Open chat with
Ctrl+K - Type: “Create a function to validate email addresses”
- Watch Cursor write the code with inline chat
For Claude Code:
- Go to claude.ai
- Enable Claude Code
- Type: “Write a simple web server in Python using Flask”
- Watch Claude generate code
If you see suggestions appearing, your setup is working!
Troubleshooting Common Issues
Copilot Not Showing Suggestions
# Check if extension is enabled
# VS Code: Extensions → GitHub Copilot → Check "Enable"
# Clear authentication
# VS Code: GitHub Copilot: Sign Out (from command palette)
# Then sign in again
Slow Suggestions
Check your internet connection and:
{
"github.copilot.advanced.length": 300,
"github.copilot.advanced.temperature": 0
}
Lower values mean faster, more predictable suggestions.
Extension Not Installing
# Try manual installation
code --install-extension GitHub.Copilot
Next Steps
Now that your environment is set up:
- Create a test project to practice with your chosen tool
- Write code with AI for 1 hour to build muscle memory
- Read through your AI tool’s documentation specific to your editor
- Join communities (GitHub Copilot discussions, Cursor Discord, etc.)
The best way to learn is by doing, so don’t spend too long optimizing settings — get coding!
Exercises
-
Setup Verification: Complete the setup for your chosen tool and get one suggestion working. Screenshot the suggestion and verify the shortcut keys work as expected.
-
Configuration Audit: Check your current VS Code settings. Write down:
- What format/linter do you use?
- What’s your line length preference?
- Create a
.cursorrulesfile for your current project
-
Keyboard Muscle Memory: Practice the three acceptance/rejection shortcuts 10 times without looking them up. Time yourself.
-
Team Documentation: If you work in a team, create a setup guide for your preferred AI tool specific to your project. Include:
- Installation steps
- Configuration file contents
- Common troubleshooting
- Which files should be ignored by AI