File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,10 @@ def command(self, string):
116
116
"""Execute a single ex command."""
117
117
return self ._session .request ('vim_command' , string )
118
118
119
+ def command_output (self , string ):
120
+ """Execute a single ex command and return the output."""
121
+ return self ._session .request ('vim_command_output' , string )
122
+
119
123
def eval (self , string ):
120
124
"""Evaluate a vimscript expression."""
121
125
return self ._session .request ('vim_eval' , string )
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ def test_command():
18
18
os .unlink (fname )
19
19
20
20
21
+ @with_setup
22
+ def test_command_output ():
23
+ eq (vim .command_output ('echo test' ), 'test' )
24
+
25
+
21
26
@with_setup (setup = cleanup )
22
27
def test_eval ():
23
28
vim .command ('let g:v1 = "a"' )
You can’t perform that action at this time.
0 commit comments