Skip to content

Commit 03d1486

Browse files
author
Josh Bodah
committed
speed up vim start
1 parent 0f4e2da commit 03d1486

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

spec/spec_helper.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# frozen_string_literal: true
2-
31
require 'rspec/expectations'
42
require 'tmpdir'
53
require 'vimrunner'
@@ -252,11 +250,11 @@ def self.new
252250
config.start_vim do
253251
VIM = Vimrunner.start_gvim
254252
VIM.add_plugin(File.expand_path('..', __dir__))
255-
VIM.command('filetype off')
256-
VIM.command('filetype plugin indent on')
257-
VIM.command('autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o') # disable automatic comment continuation
258-
VIM.command("set ignorecase") # make sure we test ignorecase
259-
VIM.command("set formatoptions-=cro") # disable auto comments on <CR>
253+
cmd = ':filetype off<CR>'
254+
cmd += ':filetype plugin indent on<CR>'
255+
cmd += ':autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o<CR>' # disable automatic comment continuation
256+
cmd += ":set ignorecase<CR>" # make sure we test ignorecase
257+
VIM.normal(cmd)
260258
VIM
261259
end
262260
end

0 commit comments

Comments
 (0)