Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
[PL] Jak napisać prosty plugin do VIMa w Pythonie
Search
Łukasz Balcerzak
November 12, 2012
Programming
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[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
260
[PL] Porunga - narzędzie do testowania algorytmów
lukaszb
0
71
[PL] Automatyzacja Testów
lukaszb
2
160
Other Decks in Programming
See All in Programming
No More NoSuchMethodError
exoego
1
110
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
200
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
240
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
最近”作らせてる” ローカルAIアプリの話
akit37
0
500
Modernizing iOS Apps
seyfoyun
0
120
R8 の設定見直しでアプリサイズ削減
andpad
0
230
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
140
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
110
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3k
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
120
Featured
See All Featured
A better future with KSS
kneath
240
18k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
650
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
How to train your dragon (web standard)
notwaldorf
96
6.9k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
How GitHub (no longer) Works
holman
316
150k
Unsuck your backbone
ammeep
672
58k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
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