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
200
[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
150
[PL] Porunga - narzędzie do testowania algorytmów
lukaszb
0
35
[PL] Automatyzacja Testów
lukaszb
2
110
Other Decks in Programming
See All in Programming
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
Snowflakeで眠ったデータを起こそう!
estie
0
110
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
720
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
190
PHPはいつから死んでいるかの調査
chiroruxx
1
390
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
900
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
410
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
1.1k
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
BBQ
matthewcrist
80
8.8k
A Modern Web Designer's Workflow
chriscoyier
689
190k
The Pragmatic Product Professional
lauravandoore
25
5.8k
Ruby is Unlike a Banana
tanoku
96
10k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Testing 201, or: Great Expectations
jmmastey
28
6.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
The Power of CSS Pseudo Elements
geoffreycrofte
60
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