VIP 👤
🏠 Inicio
Pruebas de rendimiento
📊 Todos los benchmarks 🦖 Dinosaurio v1 🦖 Dinosaurio v2 ✅ Aplicaciones To-Do List 🎨 Páginas libres creativas 🎯 FSACB - Showcase definitivo 🌍 Benchmark de traducción
Modelos
🏆 Top 10 modelos 🆓 Modelos gratuitos 📋 Todos los modelos ⚙️ Kilo Code
Recursos
💬 Biblioteca de prompts 📖 Glosario de IA 🔗 Enlaces útiles 🔌 API y routers
beginner

Thay thế văn bản trong vi

#vi #replace #search #editing

Cách tìm và thay thế văn bản trong trình soạn thảo vi

Để thay thế văn bản trong vi, sử dụng lệnh :s/old/new để thay lần xuất hiện đầu tiên trong dòng hiện tại. Để thay tất cả trong dòng hiện tại, dùng :s/old/new/g. Để thay trong toàn bộ tài liệu, dùng :%s/old/new/g. Nếu muốn xác nhận mỗi lần thay thế, thêm c vào cuối: :%s/old/new/gc.