RepositoryRubyBEBỉ
AndrewRadev

AndrewRadev/switch.vim

A simple Vim plugin to switch segments of text with predefined replacements

764sao
31fork
4issue
4lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: vim-plugin

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: text-manipulation

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: substitutions

#1 Repository của tuần

🔁 switch.vim - Đổi giá trị dưới con trỏ chỉ bằng một phím tắt

Plugin Vim đơn giản nhưng mạ mạnh: chuyển đổi nhanh các đoạn văn bản dựa trên regex, từ true → false đến Markdown checklist - [ ] → - [x].

switch.vim là một plugin Vim nhỏ gọn do AndrewRadev phát triển, cho phép người dùng thay thế nhanh các đoạn văn bản dưới con trỏ dựa trên các mẫu regex đã định nghĩa trước. Ví dụ: đặt con trỏ lên true rồi gõ :Switch, giá trị sẽ ngay lập tức chuyển thành false. Plugin hỗ trợ ánh xạ mặc định là gs, có thể tùy biến lại qua biến g:switch_mapping.

✨ Điểm nổi bật

  • Chuyển đổi nhanh: Thực hiện thay thế ngay tại vị trí con trỏ.
  • Ánh xạ tùy biến: Thay đổi phím kích hoạt qua g:switch_mapping.
  • Ưu tiên khớ p ngắn nhất: Khi nhiều mẫu khớ n, chọn khớ p ngắn nhất.
  • Hỗ trợ Markdown: Chuyển đổi dễ dàng các checklist Markdown.
  • Định nghĩa danh sách: Sử dụng danh sách các cặp giá trị để chuyển đổi.
  • Hỗ trợ hàm sửa đổi: Áp dụng switch#NormalizedCase, switch#Words để mở rộng phạm vi khớ p.
  • Gọi hàm autoload: Sử dụng switch#Switch() với tùy chọn reverse hoặc definitions.

💡 Vì sao đáng chú ý

nswitch.vim không chỉ đơn thuần là công cụ thay thế văn bản — nó mang lại cách suy nghĩ “đối ứng” cho các giá trị thường xuyên cần chuyển đổi trong quá trình phát triển. Với ba nguyên tắc rõ ràng (vị trí con trỏ, ưu tiên khớ p ngắn nhất, thứ tự định nghĩa), plugin giúp giảm thiểu sai sót khi chỉnh sửa mã nguồn. Đặc biệt hữu ích trong các ngôn ngữ như Ruby, Markdown, ERB, hoặc bất kỳ dự án Vim nào cần tăng tốc độ soạn thảo.


#Vim #Plugin #TextManipulation #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryRuby
AndrewRadev/sideways.vim

A Vim plugin to move function arguments (and other delimited-by-something items) left and right.

487
Oct 8, 2026
RepositoryRuby
AndrewRadev/sideways.vim

A Vim plugin to move function arguments (and other delimited-by-something items) left and right.

487
Oct 8, 2026
RepositoryVim Script
AndrewRadev/splitjoin.vim

Switch between single-line and multiline forms of code

2.0k
Oct 1, 2026
Repository
x1xhlol/system-prompts-and-models-of-ai-tools

FULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Trae, Traycer AI, VSCode Agent, Warp.dev, Windsurf, Xcode, Z.ai Code, Dia & v0. (And other Open Sourced) System Prompts, Internal Tools & AI Models

145.0k
Oct 12, 2026
RepositoryJavaScript
Leonxlnx/taste-skill

Agent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages

124.6k
Nov 26, 2026
RepositoryJavaScript
addyosmani/agent-skills

Production-grade engineering skills for AI coding agents.

122.0k
Nov 24, 2026
RepositoryPython
Panniantong/Agent-Reach

Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.

116.7k
Nov 24, 2026
RepositoryTypeScript
cheaper-inference/OmniRoute

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

91.8k
Dec 2, 2026
RepositoryPython
OpenMontageInc/OpenMontage

World's first open-source, agentic video production system. 12 production pipelines, 100+ tools, 700+ agent skill and production-knowledge files. Turn your AI coding assistant into a full video production studio.

85.1k
Dec 1, 2026