Lapce
Lightning-fast Rust code editor with modal editing.
Official WebsiteFeatures
Installation
brew install --cask lapcepacman -S lapcecargo install lapceWhy Use Lapce?
Lapce is an ultra-fast code editor written in Rust. It combines VS Code-like usability with Vim modal editing and native performance.
Lightning Fast
Native GUI using Rust and wgpu. Lightning-fast startup and smooth scrolling.
Modal Editing
Native support for Vim-like modal editing. Easy switching between modes.
Built-in LSP
Standard support for Language Server Protocol. Auto-completion, go-to-definition, diagnostics readily available.
Remote Development
Edit files on remote servers via SSH. Same experience as local editing.
Installation
# macOS (Homebrew)
brew install --cask lapce
# Linux (Flathub)
flatpak install flathub dev.lapce.lapce
# Linux (Snap)
sudo snap install lapce
# Arch Linux
sudo pacman -S lapce
# Cargo (build from source)
cargo install lapce
# Windows (Scoop)
scoop install lapce
# Windows (Winget)
winget install Lapce.Lapce
# Download from official site
# https://lapce.dev/Basic Operations
# Open a file
lapce filename.txt
# Open directory (project)
lapce .
lapce ~/projects/myapp
# Open multiple files
lapce file1.txt file2.txtModal Editing
Lapce natively supports modal editing. Enable/disable via configuration.
Normal Mode
Mode for navigation and text operations. Works like Vim.
Enter with Esc keyInsert Mode
Mode for entering text. Works like a standard editor.
Enter with i, a, o, etc.Visual Mode
Mode for selecting text.
Enter with v keyFrequently Used Keyboard Shortcuts
File Operations
| Key | Description |
|---|---|
Ctrl+P | Quick open file |
Ctrl+Shift+P | Command palette |
Ctrl+S | Save file |
Ctrl+W | Close tab |
Ctrl+E | Toggle file explorer |
Ctrl+Tab | Switch tab |
Editing (Insert Mode)
| Key | Description |
|---|---|
Ctrl+D | Add next same word to selection |
Ctrl+Shift+L | Select all matching words |
Ctrl+/ | Toggle line comment |
Ctrl+Shift+K | Delete line |
Alt+Up/Down | Move line up/down |
Ctrl+C / Ctrl+V | Copy / Paste |
Ctrl+Z / Ctrl+Shift+Z | Undo / Redo |
Modal Editing (Normal Mode)
| Key | Description |
|---|---|
h j k l | Move left, down, up, right |
w / b | Move to next / previous word |
0 / $ | Move to start / end of line |
gg / G | Move to start / end of file |
dd | Delete line |
yy | Yank (copy) line |
p | Paste |
u / Ctrl+R | Undo / Redo |
LSP and Navigation
| Key | Description |
|---|---|
gd | Jump to definition |
gr | Find references |
K | Show hover info |
Ctrl+Space | Show completion |
F2 | Rename |
Ctrl+. | Code action |
Ctrl+Shift+F | Search entire project |
Ctrl+G | Jump to line number |
Configuration
Lapce configuration is stored in ~/.config/lapce-stable/settings.toml. You can also open settings UI from command palette with "Open Settings".
# Editor settings
[editor]
# Font
font-family = "JetBrains Mono"
font-size = 14
line-height = 1.6
# Tab and indent
tab-width = 2
atomic-soft-tabs = true
# Line numbers
line-numbers = "relative" # "on", "off", "relative"
# Cursor
cursor-blink = true
# Whitespace
render-whitespace = "selection" # "all", "boundary", "selection", "none"
# Scroll
scroll-beyond-last-line = true
# Minimap
minimap.enabled = true
# Inlay hints
inlay-hints.enabled = true
# Modal editing
modal = true # Enable Vim mode
# Word wrap
word-wrap = false
# Auto-save
autosave = true
autosave-interval = 1000
# Auto-format
format-on-save = true
[ui]
# Theme
color-theme = "Lapce Dark"
# Font
font-family = "Inter"
font-size = 13
# Icon theme
icon-theme = "Material Icon Theme"
[terminal]
# Shell
shell = "/bin/zsh"
# Font
font-family = "JetBrains Mono"
font-size = 13
[core]
# File scan exclusions
file-exclusions = [
"**/node_modules",
"**/.git",
"**/target",
"**/dist",
"**/.DS_Store"
]Keymap Configuration
Customize keymaps in ~/.config/lapce-stable/keymaps.toml.
# Custom keymaps
[keymaps]
# Save file
"ctrl+s" = "file.save"
# File explorer
"ctrl+b" = "toggle_file_explorer"
# Terminal
"ctrl+`" = "toggle_terminal"
# Split
"ctrl+\" = "split_vertical"
"ctrl+shift+\" = "split_horizontal"
# Tab navigation
"ctrl+tab" = "next_tab"
"ctrl+shift+tab" = "previous_tab"
# Search
"ctrl+shift+f" = "global_search"
# Code action
"ctrl+." = "code_action"
# Normal mode (for modal editing)
[keymaps.normal]
"space f f" = "file_picker"
"space f g" = "global_search"
"space e" = "toggle_file_explorer"
"space w" = "file.save"
"space q" = "close_tab"
# Insert mode
[keymaps.insert]
"jk" = "normal_mode" # jk to enter Normal modeRemote Development
Lapce lets you edit files on remote servers just like local files.
# How to Connect Remotely
1. Open command palette (Ctrl+Shift+P)
2. Select "Connect to SSH Host"
3. Enter SSH connection info
- user@hostname
- or SSH config hostname
# Using SSH config (recommended)
# ~/.ssh/config
Host myserver
HostName example.com
User username
IdentityFile ~/.ssh/id_rsa
# After connecting
- Remote files shown in file explorer
- LSP works on remote
- Terminal connects to remote shell
# Remote configuration
# Lapce automatically installs lightweight server on remote
# ~/.lapce-proxy/Plugins (WASI)
Lapce uses a WASI-based plugin system. Language support and extensions can be added via plugins.
# Managing Plugins
1. Open command palette (Ctrl+Shift+P)
2. Select "Plugins" to open plugin panel
3. Search and install
# Popular Plugins
- rust-lang : Rust support (rust-analyzer)
- python : Python support (pylsp)
- typescript : TypeScript/JavaScript support
- go : Go support (gopls)
- html : HTML support
- css : CSS support
- toml : TOML support
- yaml : YAML support
- dockerfile : Dockerfile support
- vue : Vue.js support
- svelte : Svelte support
- tailwindcss : Tailwind CSS support
# Plugins automatically set up LSP
# Required language servers may be auto-installed
# To manually install LSP servers
npm install -g typescript-language-server typescript
pip install python-lsp-server
go install golang.org/x/tools/gopls@latestGit Integration
Lapce has built-in basic Git functionality.
# Git Features
1. Source Control Panel
- Open with Ctrl+Shift+G
- Shows list of changed files
- Stage/unstage operations
2. Inline Git Display
- Gutter shows changes on modified lines
- Added: green, Modified: blue, Deleted: red
3. Git Diff Display
- Select file to view diff
- Inline/side-by-side view
4. Basic Operations
- Staging: + button or context menu
- Commit: Enter message and commit
- Pull/Push: Toolbar buttons
# You can also use git commands in terminal
Press Ctrl+` to open terminalTips
- •Set
modal = truefor Vim-like modal editing. Recommended for Vimmers. - •Access almost all features from the command palette (
Ctrl+Shift+P). - •LSP automatically enabled when plugins installed. Manual language server setup usually unnecessary.
- •Remote development works like VS Code's remote feature. Set up SSH keys beforehand.
- •Combine
relativeline numbers with modal editing for Vim-like feel. - •Lapce is actively developed. Check for updates regularly and try new features.
- •Migration from VS Code is relatively smooth. Similar keybindings make it easy to adapt.