Skip to content
This repository has been archived by the owner on Sep 1, 2019. It is now read-only.

Commit

Permalink
Make RSpec snippets more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
kouno committed Jan 24, 2014
1 parent 7db84db commit 9266950
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
20 changes: 10 additions & 10 deletions vim/snippets/ruby/rspec.snip
Expand Up @@ -7,7 +7,7 @@ snippet des
describe '${1:description}' do
${2}
end
snippet desc
snippet descc
describe ${1:class} do
it '${2}' do
${3}
Expand All @@ -32,13 +32,13 @@ snippet cont
end

# before & after
snippet before-
before(:${1:each}) do
${2}
snippet bef
before(:each) do
${1}
end
snippet after-
after(:${1:each}) do
${2}
snippet aft
after(:each) do
${1}
end

# it should
Expand All @@ -56,8 +56,8 @@ snippet itshbe
end

# matchers
snippet sheq
expect(${1:target}).to == ${2}
snippet shbe
snippet exeq
expect(${1:target}).to eq(${2})
snippet exbe
expect(${1:target}).to be_${2:result}

3 changes: 3 additions & 0 deletions vimrc.options
Expand Up @@ -39,6 +39,9 @@
" AutoComplPop like behavior.
let g:neocomplcache_enable_auto_select = 0

" Force autocomplete over Rails.vim
let g:neocomplcache#force_overwrite_completefunc = 1

" Recommended key-mappings.
" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
Expand Down

0 comments on commit 9266950

Please sign in to comment.