We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03d1486 commit e2be90dCopy full SHA for e2be90d
spec/spec_helper.rb
@@ -13,12 +13,9 @@ def initialize(vim, type)
13
14
def reindent(content)
15
with_file content do
16
- # remove all indentation
17
- @vim.normal 'ggVG999<<'
18
- # force vim to indent the file
19
- @vim.normal 'gg=G'
20
- # save the changes
21
- sleep 0.1 if ENV['CI']
+ cmd = 'ggVG999<<' # remove all indentation
+ cmd += 'gg=G' # force vim to indent the file
+ @vim.normal cmd
22
end
23
24
@@ -79,14 +76,12 @@ def with_file(content = nil)
79
76
80
77
yield if block_given?
81
78
82
- @vim.write
83
- @vim.command 'redraw'
+ @vim.normal ":w<CR>:redraw<CR>"
84
IO.read(@file)
85
86
87
def edit_file(content)
88
File.write(@file, content) if content
89
-
90
@vim.edit @file
91
92
0 commit comments