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
Testing Vimscript with Vimrunner
Search
Paul Mucur
February 26, 2013
Programming
3
230
Testing Vimscript with Vimrunner
Presented at Vim London, a look at how to test-drive Vim plugins using the Vimrunner Ruby gem.
Paul Mucur
February 26, 2013
Tweet
Share
More Decks by Paul Mucur
See All by Paul Mucur
Do you really need breakfast?
mudge
0
140
HyperLogLog in 15 minutes
mudge
0
310
Exploring #to_proc
mudge
0
230
Configuration Management with Puppet
mudge
1
240
Extending Ruby with C
mudge
1
280
Managing Web Application Servers with Puppet
mudge
3
150
Other Decks in Programming
See All in Programming
Go製CLIツールをnpmで配布するには
syumai
2
1.2k
Flutterと Vibe Coding で個人開発!
hyshu
1
250
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
2
140
エンジニアのための”最低限いい感じ”デザイン入門
shunshobon
0
110
パスタの技術
yusukebe
1
390
Understanding Ruby Grammar Through Conflicts
yui_knk
1
110
それ CLI フレームワークがなくてもできるよ / Building CLI Tools Without Frameworks
orgachem
PRO
17
3.9k
MCP連携で加速するAI駆動開発/mcp integration accelerates ai-driven-development
bpstudy
0
300
新世界の理解
koriym
0
140
DataformでPythonする / dataform-de-python
snhryt
0
180
Reactの歴史を振り返る
tutinoko
1
180
State of CSS 2025
benjaminkott
1
110
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Automating Front-end Workflow
addyosmani
1370
200k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.4k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Embracing the Ebb and Flow
colly
86
4.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Designing for Performance
lara
610
69k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.6k
Transcript
Testing Vimscript with Vimrunner
PAUL MUCUR @mudge
None
Why would I want to test Vimscript?
CAESAR.VIM
None
None
$ vim -‐-‐version VIM -‐ Vi IMproved 7.3 (2010 Aug
15, compiled Feb 16 2013 12:20:10) MacOS X (unix) version Included patches: 1-‐754 Compiled by
[email protected]
Huge version with MacVim GUI. Features included (+) or not (-‐): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv -‐cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -‐ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -‐footer +fork() +fullscreen -‐gettext -‐hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -‐lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -‐mouse_gpm -‐mouse_jsbterm +mouse_netterm +mouse_sgr -‐mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang -‐mzscheme +netbeans_intg +odbeditor +path_extra +perl +persistent_undo +postscript +printer +profile +python -‐python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -‐sniff +startuptime +statusline -‐sun_workshop +syntax +tag_binary +tag_old_static -‐tag_any_white +tcl +terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -‐X11 -‐xfontset +xim -‐xsmp -‐xterm_clipboard -‐xterm_save
$ vim -‐-‐version VIM -‐ Vi IMproved 7.3 (2010 Aug
15, compiled Feb 16 2013 12:20:10) MacOS X (unix) version Included patches: 1-‐754 Compiled by
[email protected]
Huge version with MacVim GUI. Features included (+) or not (-‐): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv -‐cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -‐ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -‐footer +fork() +fullscreen -‐gettext -‐hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -‐lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -‐mouse_gpm -‐mouse_jsbterm +mouse_netterm +mouse_sgr -‐mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang -‐mzscheme +netbeans_intg +odbeditor +path_extra +perl +persistent_undo +postscript +printer +profile +python -‐python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -‐sniff +startuptime +statusline -‐sun_workshop +syntax +tag_binary +tag_old_static -‐tag_any_white +tcl +terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -‐X11 -‐xfontset +xim -‐xsmp -‐xterm_clipboard -‐xterm_save
Demonstration of Vim’s client-server functionality
None
vim = Vimrunner.start vim.edit("foo.txt") vim.insert("Hello world!") vim.write
Demonstration of using Vimrunner to remote control Vim from Ruby
describe "caesar.vim" do it "converts 1 to I" do
expect(vim.echo("caesar#ToRoman(1)")).to eq("I") end end
Demonstration of test- driving Vim script with Vimrunner
language: ruby rvm: -‐ 1.9.3 before_install: sudo apt-‐get install
vim-‐gtk before_script: -‐ "export DISPLAY=:99.0" -‐ "sh -‐e /etc/init.d/xvfb start" TRAVIS CI
None
VIM-UNITTEST? VIM-QUICKCHECK? VIM-Your-Test-Library-of-Choice?
Thank you @mudge http://mudge.name