-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
493 additions
and
764 deletions.
There are no files selected for viewing
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,62 +1,82 @@ | |||
PLUGIN=$(shell basename "$$PWD") | PLUGIN = $(wildcard plugin/*.vim) | ||
SCRIPT=$(wildcard plugin/*.vim) | SOURCES = $(PLUGIN) | ||
#AUTOL=$(wildcard autoload/*.vim) | LIB = $(wildcard autoload/*.vim) | ||
AUTOL=autoload/$(PLUGIN).vim | SOURCES += $(LIB) | ||
DOC=$(wildcard doc/*.txt) | DOC = $(wildcard doc/*.txt) | ||
TESTS=$(wildcard autoload/*Tests.vim) | SOURCES += $(DOC) | ||
VERSION=$(shell perl -ne 'if (/\*\sCurrent\srelease:/) {s/^\s+(\d+\.\S+)\s.*$$/\1/;print}' $(DOC)) | #NAME = $(shell basename "$$PWD") | ||
VIMFOLDER=~/.vim/ | NAME = delimitMate | ||
VIM=/usr/bin/vim | VERSION = $(shell $(SED) -n -e '/Current \+release/{s/^ \+\([0-9.]\+\).*/\1/;p;}' $(firstword $(DOC))) | ||
FILENAME = $(NAME)-$(VERSION) | |||
DESTDIR = $(HOME)/.vim | |||
VIM = vim | |||
SED = gsed | |||
PERL = perl | |||
comma := , | |||
empty := | |||
space := $(empty) $(empty) | |||
|
|
||
.PHONY: $(PLUGIN).vba README | .PHONY: version clean distclean undo release test install uninstall | ||
|
|
||
all: vimball README zip gzip | all: zip gzip | ||
|
dist: version all | ||
vimball: $(PLUGIN).vba | vimball: $(FILENAME).vmb | ||
zip: $(FILENAME).zip $(FILENAME).vmb.zip | |||
gzip: $(FILENAME).tar.gz $(FILENAME).vmb.gz | |||
|
|
||
clean: | clean: | ||
@echo clean | rm -f */*.orig *.~* .VimballRecord *.zip *.gz *.vmb | ||
rm -f *.vba */*.orig *.~* .VimballRecord *.zip *.gz | |||
|
|
||
dist-clean: clean | distclean: clean | ||
-zsh -c 'setopt extendedglob; rm -f ^(README.md|Makefile)' | |||
-zsh -c 'setopt extendedglob; rm -f .^(git|README.md|Makefile)*' | |||
|
|
||
undo: | undo: | ||
for i in */*.orig; do mv -f "$$i" "$${i%.*}"; done | for i in */*.orig; do mv -f "$$i" "$${i%.*}"; done | ||
|
|
||
README: | |||
@echo README | |||
cp -f $(DOC) README | |||
|
|||
$(PLUGIN).vba: | |||
@echo $(PLUGIN).vba | |||
rm -f $(PLUGIN)-$(VERSION).vba | |||
$(VIM) -N -c 'ru! vimballPlugin.vim' -c ':call append("0", [ "$(SCRIPT)", "$(AUTOL)", "$(DOC)"])' -c '$$d' -c ":%MkVimball $(PLUGIN)-$(VERSION) ." -c':q!' | |||
ln -f $(PLUGIN)-$(VERSION).vba $(PLUGIN).vba | |||
|
|||
zip: | |||
@echo zip | |||
rm -f *.zip | |||
zip -r $(PLUGIN).zip doc plugin autoload | |||
zip $(PLUGIN).zip -d \*.sw\? || echo 1 | |||
zip $(PLUGIN).zip -d \*.un\? || echo 1 | |||
zip $(PLUGIN).zip -d \*.orig || echo 1 | |||
zip $(PLUGIN).zip -d \*tags || echo 1 | |||
zip $(PLUGIN).zip -d $(TESTS) | |||
ln -f $(PLUGIN).zip $(PLUGIN)-$(VERSION).zip | |||
|
|||
gzip: vimball | |||
@echo vimball | |||
gzip -f $(PLUGIN).vba | |||
|
|||
release: version all | |||
|
|||
version: | version: | ||
@echo version: $(VERSION) | $(PERL) -i.orig -pne 'if (/^"\sVersion:/) {s/(\d+\.\S+)/$(VERSION)/}' $(PLUGIN) $(LIB) | ||
perl -i.orig -pne 'if (/^"\sVersion:/) {s/(\d+\.\S+)/$(VERSION)/}' $(SCRIPT) $(AUTOL) | $(PERL) -i.orig -pne \ | ||
perl -i.orig -pne 'if (/let\sdelimitMate_version/) {s/"(\d+\.\S+)"/"$(VERSION)"/}' $(SCRIPT) | 'if (/let\sdelimitMate_version/) {s/"(\d+\.\S+)"/"$(VERSION)"/}' $(PLUGIN) | ||
perl -i.orig -pne 'if (/beasts/) {s/(v\d+\.\S+)/v$(VERSION)/}' $(DOC) | $(PERL) -i.orig -pne 'if (/beasts/) {s/(v\d+\.\S+)/v$(VERSION)/}' $(DOC) | ||
perl -i.orig -MPOSIX -pne 'if (/^"\sModified:/) {$$now_string = strftime "%F", localtime; s/(\d+-\d+-\d+)/$$now_string/e}' $(SCRIPT) $(AUTOL) | $(PERL) -i.orig -MPOSIX -pne \ | ||
perl -i.orig -MPOSIX -pne 'if (/^\s+$(VERSION)\s+\d+-\d+-\d+\s+\*/) {$$now_string = strftime "%F", localtime; s/(\d+-\d+-\d+)/$$now_string/}' $(DOC) | 'if (/^"\sModified:/) {$$now_string = strftime "%F", localtime; s/(\d+-\d+-\d+)/$$now_string/e}' \ | ||
@echo Version: $(VERSION) | $(PLUGIN) $(LIB) | ||
|
$(PERL) -i.orig -MPOSIX -pne \ | ||
echo: | 'if (/^\s+$(VERSION)\s+\d+-\d+-\d+\s+\*/) {$$now_string = strftime "%F", localtime; s/(\d+-\d+-\d+)/$$now_string/}' \ | ||
$(DOC) | |||
|
|||
test: | |||
runVimTests -0 test | |||
|
|||
install: $(SOURCES) | |||
for dir in $(^D);\ | |||
do install -d -m 0755 $(DESTDIR)$(PREFIX)/$$dir;\ | |||
done;\ | |||
for file in $^;\ | |||
do install -m 0644 $$file $(DESTDIR)$(PREFIX)/$$file;\ | |||
done; | |||
|
|||
uninstall: | |||
for file in $(SOURCES);\ | |||
do rm -f $(DESTDIR)$(PREFIX)/$$file;\ | |||
done; | |||
|
|||
%.vmb: $(SOURCES) | |||
$(VIM) -N -es -u NORC \ | |||
-c 'call setline(1,["$(subst $(space),"$(comma)",$^)"])'\ | |||
-c "%MkVimball! $(basename $@) ." -c 'q!' | |||
|
|||
%.vmb.zip: vimball | |||
zip $@ $(basename $@) | |||
|
|||
%.zip: $(SOURCES) | |||
zip $@ $^ | |||
|
|||
%.vmb.gz: vimball | |||
gzip -f $(basename $@) | |||
|
|||
%.tar.gz: $(SOURCES) | |||
tar -cvzf $@ $^ | |||
|
|||
# vim:ts=2:sw=2 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
This plug-in provides automatic closing of quotes, parenthesis, brackets, etc., besides some other related features that | |||
should make your time in insert mode a little bit easier, like syntax awareness (will not insert the closing delimiter | |||
in comments and other configurable regions), <CR> and <Space> expansions (off by default), and some more. | |||
|
|||
Most of the features can be modified or disabled permanently, using global variables, or on a FileType basis, using | |||
:autocmd. |
Oops, something went wrong.