This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! LoadAndDisplayRSpecQuickfix() | |
let quickfix_filename = ".git/quickfix.out" | |
if filereadable(quickfix_filename) && getfsize(quickfix_filename) != 0 | |
silent execute ":cfile " . quickfix_filename | |
botright cwindow | |
cc | |
else | |
redraw! | |
echohl WarningMsg | echo "Quickfix file " . quickfix_filename . " is missing or empty." | echohl None | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "testing quickfix" do | |
it "should pass" do | |
true | |
end | |
it "should fail" do | |
fail "this test is broken" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from https://github.com/bronson/vim-runtest/blob/master/rspec_formatter.rb. | |
require 'rspec/core/formatters/base_text_formatter' | |
class VimFormatter < RSpec::Core::Formatters::BaseTextFormatter | |
def example_failed example | |
exception = example.execution_result[:exception] | |
path = $1 if exception.backtrace.find do |frame| | |
frame =~ %r{\b(spec/.*_spec\.rb:\d+)(?::|\z)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "testing quickfix" do | |
it "should pass" do | |
true | |
end | |
it "should fail" do | |
fail "this test is broken" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has("cscope") | |
"TODO: turn this all into a plugin. | |
set nocscopetag | |
set cscopequickfix=s-,c-,d-,i-,t-,e- | |
set nocscopeverbose | |
if filereadable(".git/cscope.out") | |
cscope add .git/cscope.out | |
endif | |
set cscopeverbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Expensive sub-query method: | |
delete from questions_tags qt using questions_tags qt2 where qt.question_id = qt2.question_id and qt.tag_id = qt2.tag_id and qt.id != qt2.id and qt.id not in (select min(id) from questions_tags qt3 where qt.question_id = qt3.question_id and qt.tag_id = qt3.tag_id); | |
NewerOlder