commit 9a2a3070868d46dc15eaaa3084fec20ad28e80ed Author: Buddy Sandidge Date: Mon Nov 19 15:23:31 2018 -0800 Squashed 'vim/bundle/vue/' content from commit e306929b2 git-subtree-dir: vim/bundle/vue git-subtree-split: e306929b27bea08ab505de7a4617e642b56b6dcd diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile new file mode 100644 index 0000000..b70f2e8 --- /dev/null +++ b/.circleci/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine:3.7 +RUN apk add --no-cache make vim git diff --git a/.circleci/README.md b/.circleci/README.md new file mode 100644 index 0000000..686314e --- /dev/null +++ b/.circleci/README.md @@ -0,0 +1,24 @@ +# posva/vim-make + +Small docker image with vim, make and git + +## Building + +```sh +cd .circleci +docker rmi vim-make # remove old image +docker build -t vim-make . +docker run -it vim-make /bin/date +docker commit $(docker ps -lq) vim-make +docker push posva/vim-make:0.3 # replace the tag with a new one +docker container rm $(docker ps -lq) # remove container +``` + +## Cleaning + +To remove old images and containers, use `docker images` and `docker ps -a`. +Then remove them with `docker rmi ` and `docker container rm ` + +## Update `config.yml` + +Make sure to update the tag in the `image` section of `.config.yml` diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..8dbe721 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,15 @@ +version: 2 + + +jobs: + build: + docker: + - image: posva/vim-make:0.2 + + working_directory: ~/repo + + steps: + - checkout + + - run: make dependencies + - run: make test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5c0e324 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pack diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..43dac5f --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Evan Sheehan, Eduardo San Martin Morote + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..de69007 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +test: dependencies + vim -u test/vimrc -c 'Vader! test/*.vader' + +test-nvim: dependencies + VADER_OUTPUT_FILE=/dev/stderr nvim -u test/vimrc -c 'Vader! test/*.vader' --headless + +dependencies = \ + 'junegunn/vader.vim' \ + 'cakebaker/scss-syntax.vim' \ + 'digitaltoad/vim-pug' \ + 'groenewege/vim-less' \ + 'kchmck/vim-coffee-script' \ + 'leafgarland/typescript-vim' \ + 'slm-lang/vim-slm' \ + 'wavded/vim-stylus' \ + 'scrooloose/nerdcommenter' + +dependencies: + test -L pack/testing/start/vim-vue && exit 0; \ + mkdir -p pack/testing/start; \ + cd pack/testing/start; \ + for repo in $(dependencies); do git clone https://github.com/$$repo.git; done; \ + ln -s ../../.. vim-vue + +clean: + rm -rf pack + +.PHONY: test test-nvim dependencies clean diff --git a/ftdetect/vue.vim b/ftdetect/vue.vim new file mode 100644 index 0000000..06644dd --- /dev/null +++ b/ftdetect/vue.vim @@ -0,0 +1 @@ +au BufNewFile,BufRead *.vue,*.wpy setf vue diff --git a/ftplugin/vue.vim b/ftplugin/vue.vim new file mode 100644 index 0000000..98dc0fa --- /dev/null +++ b/ftplugin/vue.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin +" Language: Vue.js +" Maintainer: Eduardo San Martin Morote +" Author: Adriaan Zonnenberg + +if exists('b:did_ftplugin') + finish +endif + +runtime! ftplugin/html.vim + +setlocal suffixesadd+=.vue + +if !exists('g:no_plugin_maps') && !exists('g:no_vue_maps') + nnoremap [[ :call search('^<\(template\script\style\)', 'bW') + nnoremap ]] :call search('^<\(template\script\style\)', 'W') + nnoremap [] :call search('^script\style\)', 'bW') + nnoremap ][ :call search('^script\style\)', 'W') +endif diff --git a/indent/vue.vim b/indent/vue.vim new file mode 100644 index 0000000..24fa37c --- /dev/null +++ b/indent/vue.vim @@ -0,0 +1,64 @@ +" Vim indent file +" Language: Vue.js +" Maintainer: Eduardo San Martin Morote +" Author: Adriaan Zonnenberg + +if exists('b:did_indent') + finish +endif + +function! s:get_indentexpr(language) + unlet! b:did_indent + execute 'runtime! indent/' . a:language . '.vim' + return &indentexpr +endfunction + +" The order is important here, tags without attributes go last. +" HTML is left out, it will be used when there is no match. +let s:languages = [ + \ { 'name': 'pug', 'pairs': ['