$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Vim
Search
Iuri Fernandes
February 22, 2013
Technology
1
140
Vim
Vim basics and plugins.
Iuri Fernandes
February 22, 2013
Tweet
Share
More Decks by Iuri Fernandes
See All by Iuri Fernandes
Comredis
iurifq
1
95
A Brief Introduction to Elixir
iurifq
0
100
Phoenix channels introduction
iurifq
0
110
Git - Dicas e boas práticas
iurifq
0
740
Other Decks in Technology
See All in Technology
Reinforcement Fine-tuning 基礎〜実践まで
ch6noota
0
170
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
140
手動から自動へ、そしてその先へ
moritamasami
0
300
生成AI時代におけるグローバル戦略思考
taka_aki
0
130
日本Rubyの会の構造と実行とあと何か / hokurikurk01
takahashim
4
1k
EM歴1年10ヶ月のぼくがぶち当たった苦悩とこれからへ向けて
maaaato
0
270
Playwrightのソースコードに見る、自動テストを自動で書く技術
yusukeiwaki
13
5.3k
文字列の並び順 / Unicode Collation
tmtms
3
550
AWSを使う上で最低限知っておきたいセキュリティ研修を社内で実施した話 ~みんなでやるセキュリティ~
maimyyym
2
320
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
6
710
Kiro Autonomous AgentとKiro Powers の紹介 / kiro-autonomous-agent-and-powers
tomoki10
0
420
Lessons from Migrating to OpenSearch: Shard Design, Log Ingestion, and UI Decisions
sansantech
PRO
1
120
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Writing Fast Ruby
sferik
630
62k
Visualization
eitanlees
150
16k
Become a Pro
speakerdeck
PRO
31
5.7k
Designing for Performance
lara
610
69k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
We Have a Design System, Now What?
morganepeng
54
7.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Transcript
VIM de D20 Iuri Fernandes
Histórico • Criado por Bram Moolenaar em 1991 • Inspirado
no editor vi(1976)
Vantagens x Desvantagens • Editor poderoso • Versatilidade • Grande
comunidade • Curva de aprendizado lenta • Configuração
Modos • Inserção • Comandos(Ex) • Visual
Pra lá e pra cá – Movimentação • h j
k l = ←↓↑→ • w = percorre texto palavra por palavra • f{char} = procura caractere char à direita na linha corrente • { = bloco anterior ; } = próximo bloco • :num = vai para a linha de número num • /{padrão} = busca
Combinação e repetição de comandos • {num}{comando} = repete num
vezes comando • {comando}{movimentação} = executa comando considerando movimentação • . = repete último comando
Plugins
E como instalo plugins? • No braço == baixa e
descompacta em .vim • Gerenciadores – Pathogen – Vundle – VAM
Abrindo arquivos like a boss! • kien/ctrlp.vim • ctrl+p! •
Abrir somente arquivos do repositório git • Abrir em nova aba, split vertical ou horizontal • Exemplos
Abrindo linhas, classes, etc. • Extensões do ctrlp • CtrlPTag
• CtrlPLine • CtrlPMRUFiles • CtrlModified (plugin) • Etc.
Arrudeio - VIM Surround • tpope/vim-surround • Lida com delimitadores
que circundam texto • Exemplos: – '', “” – {}, [], () – <p>tags</p>
Arrudeio - VIM Surround • Operações – Excluir – Incluir
– Modificar
Git - VIM Fugitive • tpope/vim-fugitive • Comandos – :Gstatus
– :Gblame – :Gdiff – :Gcommit – :Gwrite – :Gread – :Git {qualquer comando do git} – :Ggrep {padrão}
Decorar e digitar todo comando? • NÃO! • Keystrokes definidos
pelo usuário no .vimrc • Exemplo
Desfazer, modificar … FUU!
Desfazer, modificar … FUU! • sjl/gundo.vim • Exemplo
Aqui tem refactor! • ecomba/vim-ruby-refactoring