Setup profissional para desenvolvimento poliglota: Elixir/Phoenix, Ruby/Rails, JS/React/Node, Python, Go, Rust.
Baseado no amix/vimrc, refatorado com CoC.nvim como LSP client, fzf como busca unificada, e 314 testes automatizados.
configs.vim ← arquivo principal — edite aqui
vimrcs/
options.vim ← opcoes do Vim (set commands)
filetypes.vim ← deteccao de filetype e indent por linguagem
plugins.vim ← Pathogen + config de plugins terceiros
editor.vim ← undo persistente, GUI, helpers
plugins/ ← 45 plugins (Pathogen)
test/ ← suite de testes (vader, jest, shell)
docs/ ← documentacao
keybindings.md ← cheatsheet completo de atalhos
test_plan.md ← plano e arquitetura de testes
⚠️ O repo precisa ficar em~/.vim_runtime— os paths sao hardcoded (sources, undodir). Use exatamente o caminho do clone abaixo.
Automatica (recomendada):
git clone --recursive https://github.com/albertosca/vim-runtime.git ~/.vim_runtime
bash ~/.vim_runtime/install.shO install.sh e idempotente e faz backup do que ja existir. Ele:
inicializa os submodules, cria ~/.vimrc apontando para vimrc_example, e
linka coc-settings.json em ~/.vim/coc-settings.json (config do LSP).
Manual:
git clone --recursive https://github.com/albertosca/vim-runtime.git ~/.vim_runtime
ln -sf ~/.vim_runtime/vimrc_example ~/.vimrc # carrega o runtime
mkdir -p ~/.vim
ln -sf ~/.vim_runtime/coc-settings.json ~/.vim/coc-settings.json # config do CoCEsqueceu o
--recursive? Recupere os plugins com:git -C ~/.vim_runtime submodule update --init --recursive
O ~/.vimrc (via vimrc_example) carrega nesta ordem — a ultima definicao vence:
source ~/.vim_runtime/autoload/pathogen.vim
call pathogen#infect('~/.vim_runtime/plugins/{}')
source ~/.vim_runtime/vimrcs/options.vim
source ~/.vim_runtime/vimrcs/filetypes.vim
source ~/.vim_runtime/vimrcs/plugins.vim
source ~/.vim_runtime/vimrcs/editor.vim
source ~/.vim_runtime/configs.vim| Categoria | Plugins |
|---|---|
| LSP / Completion | coc.nvim (21 extensoes), vim-snippets |
| IA | copilot-chat.vim, vim-claude-code |
| Busca | fzf, fzf.vim |
| Navegacao | NERDTree, vim-rooter, vim-projectionist, vim-rails, vim-tmux-navigator |
| Git | vim-fugitive, vim-gitgutter, gv.vim |
| Edicao | vim-surround, auto-pairs, vim-visual-multi, vim-commentary, vim-endwise, vim-repeat, tabular, vim-expand-region, vim-indent-object, vim-unimpaired, vim-abolish, vim-closetag, vim-matchup, vim-sleuth |
| Testes | vim-test, vimux |
| Linguagens | vim-elixir, vim-mix-format, vimix, vim-go, rust.vim, vim-jsx-improve, vim-js-pretty-template, vim-mdx-js, vim-markdown |
| Database | vim-dadbod, vim-dadbod-ui, vim-dadbod-completion |
| UI | lightline.vim, gruvbox, vim-devicons, vim-nerdtree-syntax-highlight, undotree, goyo.vim, vim-obsession, set_tabline |
Atualizar plugins:
cd ~/.vim_runtime/plugins && bash update_plugins.shmapleader = , (virgula). Cheatsheet completo em docs/keybindings.md.
Destaques:
| Atalho | Acao |
|---|---|
Ctrl+f |
Buscar arquivos (fzf) |
Ctrl+b |
Buscar buffers (fzf) |
K |
Documentacao (CoC hover) |
gd |
Goto definition |
,tn |
Rodar teste sob o cursor |
:A |
Alternar codigo/teste |
,gv |
Git log navegavel |
,db |
Database UI |
| Extensao | Cobertura |
|---|---|
| coc-elixir | Elixir LSP (ElixirLS) |
| coc-solargraph | Ruby LSP |
| coc-tsserver | TypeScript, JavaScript, React |
| coc-pyright | Python LSP |
| coc-css, coc-tailwindcss | CSS, Tailwind |
| coc-eslint, coc-prettier | Linting e formatacao |
| coc-emmet | Expansao HTML/JSX |
| coc-snippets | Snippets (vim-snippets) |
| coc-sql | SQL completion |
| coc-html, coc-json, coc-yaml, coc-xml, coc-sh | Markup e config |
| coc-git, coc-yank | Git inline, historico de yanks |
| coc-docker, coc-browser, coc-markdownlint | Docker, browser APIs, markdown |
309 testes automatizados em 5 suites:
bash test/run.sh # compacto — uma linha por suite
bash test/run.sh -v # expandido — cada caso com check/X
bash test/run.sh -vv # raw — debug completo
bash test/run.sh unit # rodar uma suite especifica Vim Config Test Suite
─────────────────────────────────────────────────────
✓ shell 41 passed 1 warn 0 failed
✓ unit 90 passed 0 failed
✓ integration 131 passed 0 failed
✓ e2e 19 passed 0 failed
✓ jest 28 passed 0 failed
─────────────────────────────────────────────────────
✓ 309 passed all green
Detalhes da arquitetura de testes em docs/test_plan.md.
- Navegacao por projeto:
,gf(so arquivos git) e mais rapido queCtrl+fem projetos grandes - Busca + substituicao global:
,rg palavra→ seleciona comTab→:cfdo %s/old/new/g | update - Sessao por projeto: Cada projeto tem seu
Session.vim. Entre no diretorio evimrestaura tudo - Blame em linha:
,gmmostra autor, hash e mensagem do commit da linha atual em popup - Diagnosticos rapidos:
]gpula pro proximo erro,,asugere correcao automatica - Auto-save: Todos os buffers sao salvos ao sair do foco do Vim (troca de app/tmux pane)
- Raiz do projeto automatica: vim-rooter detecta
.git,mix.exs,Gemfile,package.jsone fazcdautomatico
MIT