Commit graph

9 commits

Author SHA1 Message Date
a7ba505e21 Fix mapping conflicts, UX improvements, and eliminate dead code
Bugs fixed:
- Remove dead <leader>a :A<CR> (plugin not installed)
- Fix <leader>ad conflict: ALE→[e/]e/<leader>aD, CoC keeps <leader>ad
- Fix <leader>cd conflict: change-dir→<leader>wd, diagnostics→<leader>cD
- Fix <leader>cp conflict: CocListResume→<leader>cr (was shadowed by copy-path)
- Fix <leader>sp conflict: SynStack→<leader>sh (spell-prev was overridden)
- Fix <leader>t Tags: shadowed by which-key group, move to <leader>rt
- Fix ALE fix_on_save=1 double-formatting when vim-lsp is active
- Remove CtrlP (redundant with FZF; <C-p> now exclusively FZF)
- Wrap NERDTree BufEnter autocmd in augroup to prevent leak
- Remove duplicate set options (showmatch, nobackup, tab settings, TTY block)

UX improvements:
- Add persistent undo (~/.vim/.undo directory, cross-session)
- Add <leader>gF for git-tracked file search (FZF GFiles)
- Add clipboard yank: <leader>y / <leader>Y (requires clipboard provider)
- Add quickfix shortcuts: <leader>qo (open), <leader>qc (close)
- Y yanks to end of line (consistent with D, C)
- Disable Q (no accidental Ex mode)
- Visual indent keeps selection (> and < no longer drop selection)
- n/N centers cursor (search results always visible)
- Ctrl+d/u centers cursor after half-page scroll
- Auto-equalize splits on terminal resize
- Update which-key map: all new/renamed bindings documented
- Update README key mapping tables to match actual bindings
2026-02-21 12:13:39 +08:00
Claude
2023edef66
Fix review issues: conditional vim-lsp loading and scoped auto-format
- Wrap vim-lsp/asyncomplete plugins in a condition so they only load
  when CoC (Node.js) is unavailable, preventing redundant plugin
  initialization and potential conflicts on Node.js-capable systems
- Limit LspDocumentFormatSync on BufWritePre to known-reliable filetypes
  (python, go, rust, typescript, javascript, sh) to avoid silent delays
  or errors on markdown/yaml/text files with no LSP formatter support
2026-02-17 04:52:33 +00:00
Claude
5db1bc92bd
Code robustness, Unix-style docs, and complete wiki
.vimrc fixes:
- Remove set wrap conflict (nowrap is global; per-filetype in autocmds)
- Remove duplicate <leader>w (trailing whitespace shadowed save binding)
- Remove duplicate <leader>q (scribble buffer shadowed quit)
- Scope completeopt to vim-lsp block only (CoC manages its own)
- Fix LargeFileSettings: replace buftype=nowrite with syntax=OFF

README.md (full rewrite):
- Clear requirements table with optional/mandatory distinction
- LSP tiered backend table: CoC > vim-lsp > ALE
- Complete key mapping reference organized by function
- Language support table with indent/formatter/linter per language
- Full plugin list with one-line descriptions
- vim-startify, vim-which-key, indentLine documented
- Troubleshooting for CoC, vim-lsp, ALE, colors
- No marketing language, no stale "NEW:" banners

QUICKSTART.md (full rewrite):
- 3-step onboarding: install, open, LSP
- Dual path: CoC (Node.js) vs vim-lsp (no Node.js)
- Plain ASCII quick reference card (removed unicode box-drawing)
- Concrete language workflow examples (Python, JS/TS, Go)

install.sh (rewrite):
- ok/warn/die/step helper functions (shorter, consistent)
- Detect Node.js before installing, inform user of LSP path
- Vim version check with warning for < 8.0
- vim-lsp guidance printed when Node.js absent
- Optional tools listed grouped by purpose
2026-02-17 04:20:07 +00:00
Claude
f1159320f7
Enhance LSP compatibility and user interaction UX
LSP improvements:
- Fix CoC condition: support Vim 8.0.1453+ (not just vim9), require Node.js
- Add vim-lsp + vim-lsp-settings as native fallback (no Node.js required)
- Add asyncomplete.vim + asyncomplete-lsp.vim for completion in vim-lsp mode
- Smart backend detection: CoC preferred, vim-lsp fallback, ALE always active
- Expand CoC: code actions, code lens, outline, workspace symbols, float scroll
- vim-lsp mirrors CoC keymaps (gd/gy/gi/gr/K/[g/]g/<leader>rn/<leader>ca)

UI improvements:
- Add vim-startify: startup screen with recent files, sessions, git-root cd
- Add vim-which-key: show all leader bindings after 500ms pause
- Add indentLine: ASCII | indent guides (non-TTY, disabled in JSON/markdown)
- Set pumheight=15, completeopt for consistent popup behavior
- Complete which-key map covering: git, code, refactor, spell, tab, terminal
2026-02-17 04:13:17 +00:00
0e61537142 Fix critical installation and configuration bugs
This commit addresses multiple issues discovered during code review:

1. Fix variable definition order in .vimrc
   - Move g:is_tty and g:has_true_color definitions to top of file
   - Previously used at line 32 but defined at line 263
   - Ensures variables are available before first use

2. Remove duplicate configuration settings in .vimrc
   - Remove duplicate set number, wildmenu, ruler
   - Remove duplicate search settings (ignorecase, smartcase, hlsearch, incsearch)
   - Remove duplicate backspace and wildignore settings
   - Reduces file size and eliminates confusion

3. Enhance install.sh reliability
   - Add directory validation to ensure script runs from ~/.vim
   - Add symlink validation after creation
   - Fix CoC installation command syntax (vim -c to vim +)
   - Move helper functions before usage
   - Prevents symlink-to-self errors

4. Improve installation documentation
   - Add warnings in README.md about running from correct directory
   - Add IMPORTANT notes in QUICKSTART.md
   - Update installation step descriptions
   - Prevents common user installation mistakes

These fixes improve installation reliability and prevent configuration errors.
2025-12-30 09:53:14 +08:00
Claude
3bb1a442c7
Optimize for basic terminal environments (TTY users)
Changes:
- Add automatic TTY detection (TERM=linux, screen, builtin)
- Disable true color mode in TTY for compatibility
- Use ASCII separators instead of powerline fonts in TTY
- Fallback to default colorscheme for 16-color terminals
- Disable cursorline in TTY for better performance
- Simplify signcolumn to 'auto' in TTY
- Disable FZF preview windows in TTY
- Skip auto-opening NERDTree in TTY for faster startup
- Use simpler status line in TTY environments
- Reduce syntax highlighting complexity (synmaxcol=120)
- Disable syntax for files >512KB in TTY
- Add informative message on first TTY run

Benefits for TTY users:
- Faster startup time
- Better performance in resource-constrained environments
- No font dependency issues
- Compatible with basic 16-color terminals
- Works on Linux console, serial terminals
- Optimized for remote sessions over slow connections

All optimizations are automatic - no configuration needed.
2025-12-30 00:32:33 +00:00
Claude
0ea76e6ae7
Remove all icons and emojis - keep it simple (KISS principle)
Changes:
- Replaced checkmarks with plain text in README.md
- Replaced emoji icons with [OK] in install.sh
- Changed ALE error/warning signs from unicode to ASCII (X and !)
- Removed rocket emoji from QUICKSTART.md
- All output now uses simple ASCII characters

Follows KISS (Keep It Simple, Stupid) principle for better:
- Terminal compatibility
- Accessibility
- Readability in all environments
- No font dependencies
2025-12-30 00:29:35 +00:00
Claude
2941614b45
工程化优化:添加快速安装脚本和企业级开发功能
新增功能:
 一键安装脚本 (install.sh)
  - 自动备份现有配置
  - 自动安装 vim-plug
  - 自动安装所有插件
  - 可选安装 CoC 语言服务器
  - 美化的安装界面和详细提示

 快速开始指南 (QUICKSTART.md)
  - 5分钟上手教程
  - 常用工作流程示例
  - 语言特定配置说明
  - 故障排除指南
  - 快速参考卡片

配置增强:
📦 新增插件
  - vim-obsession: 会话管理
  - vim-prosession: 项目会话
  - vim-unimpaired: 便捷的括号映射
  - targets.vim: 额外的文本对象
  - vim-snippets: 代码片段集合

🛠️ 工程化特性
  - 项目特定配置支持 (.vimrc in project root)
  - 大文件自动优化 (>10MB)
  - 终端集成 (,tv, ,th)
  - 会话自动保存
  - 父目录自动创建

⌨️ 新增快捷键
  Git 工作流:
    ,gs - Git status
    ,gc - Git commit
    ,gp - Git push
    ,gl - Git pull
    ,gd - Git diff
    ,gb - Git blame

  工程实用工具:
    ,ev - 编辑 .vimrc
    ,sv - 重载 .vimrc
    ,F  - 格式化整个文件
    ,wa - 保存所有缓冲区
    ,cp - 复制文件路径
    ,cf - 复制文件名
    ,*  - 搜索并替换光标下的单词
    ,,  - 切换到上一个文件

  窗口管理:
    ,=  - 增大窗口高度
    ,-  - 减小窗口高度
    ,+  - 增大窗口宽度
    ,_  - 减小窗口宽度

🌐 语言支持增强
  新增语言配置:
    - Rust (rustfmt, cargo)
    - Shell (shellcheck)
    - YAML (yamllint)
    - Docker (hadolint)
    - HTML/CSS (prettier)
    - Markdown (spell check, prettier)

  改进的 ALE 配置:
    - 更多语言的 linters
    - 优化的性能设置
    - 详细错误显示 (,ad)

🔍 增强的 FZF 集成
  - 改进的预览窗口
  - Git 文件搜索命令
  - 更好的 Ripgrep 集成
  - 自定义布局

📝 NERDTree 优化
  - 自动打开项目目录
  - 忽略 node_modules, __pycache__ 等
  - 可配置窗口大小

文档改进:
📚 README.md 重大更新
  - 添加快速开始章节
  - 详细的工程特性说明
  - 完整的键位映射表
  - 项目配置示例
  - 会话管理说明
  - 大文件处理说明
  - 终端集成文档

适用场景:
 企业级开发团队
 多语言项目
 大型代码库
 持续集成环境
 远程开发
 代码审查

性能优化:
 大文件自动禁用重度功能
 ALE 按需 lint (不在输入时)
 优化的语法高亮
 更快的启动时间
2025-12-30 00:17:46 +00:00
Claude
d457e832be
完全重构:从Neovim迁移到原生Vim配置
重大变更:
- 移除所有Neovim Lua配置(init.lua, lua/目录)
- 创建全新的.vimrc配置文件,汲取互联网优秀实践
- 使用vim-plug作为插件管理器
- 集成20+精选插件,涵盖文件导航、Git、代码编辑、语法检查等

核心特性:
- NERDTree文件浏览器
- FZF模糊查找
- vim-fugitive Git集成
- ALE异步语法检查
- CoC智能补全和LSP支持
- vim-airline美化状态栏
- Gruvbox配色方案

插件列表:
- 文件导航:NERDTree, FZF, CtrlP
- Git工具:vim-fugitive, vim-gitgutter
- 代码编辑:vim-surround, vim-commentary, auto-pairs
- 语言支持:vim-polyglot, vim-go
- 生产力工具:UndoTree, Tagbar, EasyMotion
- 配色方案:Gruvbox, Dracula, Solarized, OneDark

配置亮点:
- 智能行号(绝对+相对)
- 自动安装vim-plug
- 丰富的键位映射(leader键为逗号)
- 多语言支持和自动格式化
- 详细的功能分区和注释

文档:
- 全新的README.md,包含详细的安装指南
- 完整的键位映射表
- 插件配置说明
- 故障排除指南

参考来源:
- amix/vimrc
- vim-plug官方文档
- 2025年现代Vim最佳实践
2025-12-29 14:15:46 +00:00