A powerful web-based code editor with Emacs keybindings, built with React, Express, and CodeMirror 6.
- CodeMirror 6 Integration: Advanced code editor with syntax highlighting
- Emacs Keybindings: Full support for Emacs-style key combinations
- Multi-Language Support: JavaScript, Python, HTML, CSS, JSON, Markdown, XML, SQL
- File Management: Create, open, save, and manage files
- Tabbed Interface: Work with multiple files simultaneously
- File Explorer: Navigate and select files easily
- Customizable Settings: Theme, font size, line numbers, word wrap
- Real-time Updates: Live cursor position and modification tracking
- Responsive Design: Works on desktop and mobile devices
- React 18 with TypeScript
- CodeMirror 6 for code editing
- Tailwind CSS + shadcn/ui for styling
- TanStack Query for state management
- Wouter for routing
- Node.js + Express
- TypeScript
- In-memory storage with PostgreSQL schema
- RESTful API design
- Node.js 18 or higher
- npm or yarn
- Clone the repository:
git clone https://github.com/EdSwarthout/CodeMirrorEmacsReplit.git
cd CodeMirrorEmacsReplit- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser to
http://localhost:5000
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run db:push- Push database schema
The editor supports standard Emacs keybindings:
Ctrl+x Ctrl+s- Save fileCtrl+x Ctrl+f- Open fileCtrl+x k- Close fileCtrl+g- Cancel operationCtrl+a- Beginning of lineCtrl+e- End of lineCtrl+k- Kill lineCtrl+y- Yank (paste)Alt+w- CopyCtrl+w- CutCtrl+/- UndoCtrl+s- Search forwardCtrl+r- Search backward
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utilities and configs
│ │ └── pages/ # Page components
├── server/ # Backend Express application
│ ├── index.ts # Server entry point
│ ├── routes.ts # API routes
│ ├── storage.ts # Data storage layer
│ └── vite.ts # Vite integration
└── shared/ # Shared types and schemas
└── schema.ts # Database schema
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
MIT License - see LICENSE file for details
- CodeMirror for the excellent code editor
- Emacs for the keybinding inspiration
- shadcn/ui for the beautiful UI components