Terminal GuideTerminal Guide
lapce icon

Lapce

Text Editors
macOSLinuxWindows
Rust

Lightning-fast Rust code editor with modal editing.

Official Website

Features

FastModal EditingBuilt-in LSPRemote DevelopmentWASI Plugins

Installation

Homebrew
brew install --cask lapce
Pacman (Arch)
pacman -S lapce
Cargo (Rust)
cargo install lapce

Why 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

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

CLI Operations
# Open a file
lapce filename.txt

# Open directory (project)
lapce .
lapce ~/projects/myapp

# Open multiple files
lapce file1.txt file2.txt

Modal Editing

Lapce natively supports modal editing. Enable/disable via configuration.

Normal Mode

Mode for navigation and text operations. Works like Vim.

Enter with Esc key

Insert 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 key

Frequently Used Keyboard Shortcuts

File Operations

KeyDescription
Ctrl+PQuick open file
Ctrl+Shift+PCommand palette
Ctrl+SSave file
Ctrl+WClose tab
Ctrl+EToggle file explorer
Ctrl+TabSwitch tab

Editing (Insert Mode)

KeyDescription
Ctrl+DAdd next same word to selection
Ctrl+Shift+LSelect all matching words
Ctrl+/Toggle line comment
Ctrl+Shift+KDelete line
Alt+Up/DownMove line up/down
Ctrl+C / Ctrl+VCopy / Paste
Ctrl+Z / Ctrl+Shift+ZUndo / Redo

Modal Editing (Normal Mode)

KeyDescription
h j k lMove left, down, up, right
w / bMove to next / previous word
0 / $Move to start / end of line
gg / GMove to start / end of file
ddDelete line
yyYank (copy) line
pPaste
u / Ctrl+RUndo / Redo

LSP and Navigation

KeyDescription
gdJump to definition
grFind references
KShow hover info
Ctrl+SpaceShow completion
F2Rename
Ctrl+.Code action
Ctrl+Shift+FSearch entire project
Ctrl+GJump 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".

~/.config/lapce-stable/settings.toml
# 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.

~/.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 mode

Remote Development

Lapce lets you edit files on remote servers just like local files.

Remote Development
# 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.

Plugin Management
# 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@latest

Git Integration

Lapce has built-in basic Git functionality.

Git Integration
# 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 terminal

Tips

  • Set modal = true for 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 relative line 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.
Written by Dai AokiPublished: 2026-01-20

Related Articles

Explore More