mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 03:53:52 -05:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
752a647be1 | ||
|
|
97a0bdcef6 | ||
|
|
58f119c57f | ||
|
|
0ac0389039 | ||
|
|
4bf3f6c300 | ||
|
|
4a80e945ad | ||
|
|
27f22774b1 | ||
|
|
f6be1d3d13 | ||
|
|
77f091c8c7 |
8
.travis.yml
Normal file
8
.travis.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
language: ruby
|
||||||
|
rvm:
|
||||||
|
- 1.9.3
|
||||||
|
before_install: sudo apt-get install vim-gtk
|
||||||
|
before_script:
|
||||||
|
- "export DISPLAY=:99.0"
|
||||||
|
- "sh -e /etc/init.d/xvfb start"
|
||||||
|
script: bundle exec rspec
|
||||||
4
Gemfile
Normal file
4
Gemfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
|
gem 'vimrunner'
|
||||||
|
gem 'rspec'
|
||||||
20
Gemfile.lock
Normal file
20
Gemfile.lock
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
diff-lcs (1.1.3)
|
||||||
|
rspec (2.12.0)
|
||||||
|
rspec-core (~> 2.12.0)
|
||||||
|
rspec-expectations (~> 2.12.0)
|
||||||
|
rspec-mocks (~> 2.12.0)
|
||||||
|
rspec-core (2.12.2)
|
||||||
|
rspec-expectations (2.12.1)
|
||||||
|
diff-lcs (~> 1.1.3)
|
||||||
|
rspec-mocks (2.12.0)
|
||||||
|
vimrunner (0.3.0)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
rspec
|
||||||
|
vimrunner
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
# vim-polyglot
|
# vim-polyglot [![Build Status][travis-img-url]][travis-url]
|
||||||
|
|
||||||
|
[travis-img-url]: https://travis-ci.org/sheerun/vim-polyglot.png
|
||||||
|
[travis-url]: https://travis-ci.org/sheerun/vim-polyglot
|
||||||
|
|
||||||
A collection of language packs for Vim.
|
A collection of language packs for Vim.
|
||||||
|
|
||||||
@@ -9,6 +12,7 @@ One to rule them all, one to find them, one to bring them all and in the darknes
|
|||||||
- It clones even faster as all unnecessary files are ignored (like enormous documentation from php support).
|
- It clones even faster as all unnecessary files are ignored (like enormous documentation from php support).
|
||||||
- Best syntax and indentation support. If someone releases better language pack, it will be replaced here.
|
- Best syntax and indentation support. If someone releases better language pack, it will be replaced here.
|
||||||
- No support for esoteric languages (vim-polyglot supports modern ones like `slim` though).
|
- No support for esoteric languages (vim-polyglot supports modern ones like `slim` though).
|
||||||
|
- Each build is tested by automated Travis CI setup using vimrunner gem. Spee `spec` directory.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|||||||
10
build
10
build
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -E
|
set -E
|
||||||
|
|
||||||
@@ -50,10 +50,6 @@ copy_dir() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -rf tmp
|
|
||||||
rm -rf $DIRS
|
|
||||||
mkdir -p tmp
|
|
||||||
|
|
||||||
PACKS="
|
PACKS="
|
||||||
arduino:sudar/vim-arduino-syntax
|
arduino:sudar/vim-arduino-syntax
|
||||||
bundler:tpope/vim-bundler
|
bundler:tpope/vim-bundler
|
||||||
@@ -100,6 +96,10 @@ PACKS="
|
|||||||
xls:vim-scripts/XSLT-syntax
|
xls:vim-scripts/XSLT-syntax
|
||||||
"
|
"
|
||||||
|
|
||||||
|
rm -rf tmp
|
||||||
|
rm -rf $DIRS
|
||||||
|
mkdir -p tmp
|
||||||
|
|
||||||
printf "Downloading packs..."
|
printf "Downloading packs..."
|
||||||
download "$PACKS"
|
download "$PACKS"
|
||||||
extract "$PACKS"
|
extract "$PACKS"
|
||||||
|
|||||||
8
spec/build_spec.rb
Normal file
8
spec/build_spec.rb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
$plugin_path = File.expand_path('../..', __FILE__)
|
||||||
|
|
||||||
|
describe 'build script' do
|
||||||
|
it 'should run and return success code' do
|
||||||
|
Dir.chdir($plugin_path)
|
||||||
|
expect(system('bash ./build')).to be_true
|
||||||
|
end
|
||||||
|
end
|
||||||
14
spec/loading_spec.rb
Normal file
14
spec/loading_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe "My Vim plugin" do
|
||||||
|
languages = Dir["#{$plugin_path}/syntax/*.vim"].map { |f| f.split('/').last.gsub('.vim', '') }
|
||||||
|
|
||||||
|
languages.each do |lang|
|
||||||
|
it "should parse .#{lang} file" do
|
||||||
|
write_file "test.#{lang}", ""
|
||||||
|
vim.edit "test.#{lang}"
|
||||||
|
vim.insert "sample"
|
||||||
|
vim.write
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
22
spec/spec_helper.rb
Executable file
22
spec/spec_helper.rb
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
require 'vimrunner'
|
||||||
|
require 'vimrunner/rspec'
|
||||||
|
|
||||||
|
$plugin_path = File.expand_path('../..', __FILE__)
|
||||||
|
|
||||||
|
Vimrunner::RSpec.configure do |config|
|
||||||
|
# Use a single Vim instance for the test suite. Set to false to use an
|
||||||
|
# instance per test (slower, but can be easier to manage).
|
||||||
|
config.reuse_server = true
|
||||||
|
|
||||||
|
# Decide how to start a Vim instance. In this block, an instance should be
|
||||||
|
# spawned and set up with anything project-specific.
|
||||||
|
config.start_vim do
|
||||||
|
vim = Vimrunner.start
|
||||||
|
|
||||||
|
# Setup your plugin in the Vim instance
|
||||||
|
vim.add_plugin($plugin_path)
|
||||||
|
|
||||||
|
# The returned value is the Client available in the tests.
|
||||||
|
vim
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user