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
53
[PL] Automatyzacja Testów
lukaszb
2
130
Other Decks in Programming
See All in Programming
Web Components で実現する Hotwire とフロントエンドフレームワークの橋渡し / Bridging with Web Components
da1chi
3
2.4k
ALL CODE BASE ARE BELONG TO STUDY
uzulla
18
3.4k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
350
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
800
Advance Your Career with Open Source
ivargrimstad
0
520
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
140
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.3k
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1.1k
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
490
Go言語はstack overflowの夢を見るか?
logica0419
0
270
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
1.3k
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
130
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
900
Code Reviewing Like a Champion
maltzj
526
40k
Designing for Performance
lara
610
69k
Typedesign – Prime Four
hannesfritz
42
2.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Context Engineering - Making Every Token Count
addyosmani
6
240
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
4 Signs Your Business is Dying
shpigford
185
22k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
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