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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Łukasz Balcerzak
November 12, 2012
Programming
280
0
Share
[PL] Jak napisać prosty plugin do VIMa w Pythonie
Łukasz Balcerzak
November 12, 2012
More Decks by Łukasz Balcerzak
See All by Łukasz Balcerzak
Python 3 w 2013 i trochę o przyszłości
lukaszb
0
240
[PL] Porunga - narzędzie do testowania algorytmów
lukaszb
0
67
[PL] Automatyzacja Testów
lukaszb
2
150
Other Decks in Programming
See All in Programming
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
1
340
New "Type" system on PicoRuby
pocke
1
400
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
220
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.9k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
270
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
760
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.1k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
400
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
140
AI時代のUIはどこへ行く?その2!
yusukebe
16
5.5k
OSもどきOS
arkw
0
360
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
440
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
RailsConf 2023
tenderlove
30
1.5k
Are puppies a ranking factor?
jonoalderson
1
3.4k
How to build a perfect <img>
jonoalderson
1
5.5k
The Spectacular Lies of Maps
axbom
PRO
1
770
For a Future-Friendly Web
brad_frost
183
10k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
230
Navigating Weather and Climate Data
rabernat
0
200
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.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