Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
[PL] Jak napisać prosty plugin do VIMa w Pythonie
Search
Łukasz Balcerzak
November 12, 2012
Programming
0
250
[PL] Jak napisać prosty plugin do VIMa w Pythonie
Łukasz Balcerzak
November 12, 2012
Tweet
Share
More Decks by Łukasz Balcerzak
See All by Łukasz Balcerzak
Python 3 w 2013 i trochę o przyszłości
lukaszb
0
210
[PL] Porunga - narzędzie do testowania algorytmów
lukaszb
0
52
[PL] Automatyzacja Testów
lukaszb
2
130
Other Decks in Programming
See All in Programming
Claude Code + Container Use と Cursor で作る ローカル並列開発環境のススメ / ccc local dev
kaelaela
11
6.1k
The Modern View Layer Rails Deserves: A Vision For 2025 And Beyond @ RailsConf 2025, Philadelphia, PA
marcoroth
2
510
NPOでのDevinの活用
codeforeveryone
0
860
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
120
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
930
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
110
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
600
おやつのお供はお決まりですか?@WWDC25 Recap -Japan-\(region).swift
shingangan
0
140
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
860
RailsGirls IZUMO スポンサーLT
16bitidol
0
190
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
280
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
790
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
1.9k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Code Review Best Practice
trishagee
69
19k
How STYLIGHT went responsive
nonsquared
100
5.6k
How to Ace a Technical Interview
jacobian
278
23k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
It's Worth the Effort
3n
185
28k
Writing Fast Ruby
sferik
628
62k
Embracing the Ebb and Flow
colly
86
4.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Transcript
Jak napisać prosty plugin do VIMa w Pythonie Łukasz Balcerzak
Tuesday, November 13, 12
O mnie • Łukasz Balcerzak •
[email protected]
• github.com/lukaszb •
bitbucket.org/lukaszb • @lbalcerzak Tuesday, November 13, 12
Plan • Struktura plugin’ów VIM’a • Podstawowy skrypt .vim (klej)
• Testowanie • Problemy Tuesday, November 13, 12
Struktura • myplugin/ • myplugin/plugin/ • myplugin/plugin/myplugin/ <= pliki *.py
• myplugin/plugin/myplugin.vim <= klej • myplugin/doc/myplugin.txt Tuesday, November 13, 12
Struktura 2 • Taka struktura ułatwia innym użytkownikom używanie plugin’u
• zazwyczaj wystarczy wrzucić do ~/.vim/ bundle/ Tuesday, November 13, 12
Klej • Nawet najprostszy plugin musimy zacząć od pisania w
... vim scripting language Tuesday, November 13, 12
Klej 2 Tuesday, November 13, 12
Klej 3 Tuesday, November 13, 12
Python - nareszcie Tuesday, November 13, 12
Python - i tyle? • Oczywiście, że nie ... Tuesday,
November 13, 12
Python - i tyle? Tuesday, November 13, 12
+ testy • Testowanie to tak naprawdę najciekawsza część tworzenie
plugin’a Tuesday, November 13, 12
+ testy • Standardowo: - uruchamiamy vim’a - wpisujemy tekst/otwieramy
bufor z przygotowanym tekstem - ustawiamy kursor w odpowiednim miejscu - odpalamy :MyPluginFunction() Tuesday, November 13, 12
+ testy Tuesday, November 13, 12
+ testy • Ups... no ale to Python! Przecież testowanie
jest łatwe i przyjemne! Tuesday, November 13, 12
+ testy Tuesday, November 13, 12
+ testy Tuesday, November 13, 12
+ testy • Problem? Tuesday, November 13, 12
+ testy • Work in progress: • https://github.com/lukaszb/vimmock Tuesday, November
13, 12
+ testy Tuesday, November 13, 12
Demo Tuesday, November 13, 12
Problem? • Python3 • Większość pluginów jest już napisana ...
• http://www.vim.org/scripts/index.php • http://vim-scripts.org/ Tuesday, November 13, 12
Linki / inne • github.com/lukaszb/vimmock • github.com/lukaszb/vimper • @lbalcerzak •
[email protected]
Tuesday, November 13, 12
Pytania? • github.com/lukaszb/vimmock • github.com/lukaszb/vimper • github.com/lukaszb/superpy Tuesday, November 13,
12