From eb88d7ea0b794fafc78d58ff2f121121cb6e542a Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 21 Jan 2009 03:41:43 -0500 Subject: [PATCH 01/85] Sorry, stashed changes including: Change util.range to accept an increment as the third argument. Sanitize Makefile.doc --- Makefile | 1 + common/Makefile.common | 59 +++++++++++++++++--------------- common/Makefile.doc | 37 ++++---------------- common/content/buffer.js | 2 +- common/content/completion.js | 8 ++--- common/content/editor.js | 2 +- common/content/util.js | 19 +++++----- vimperator/content/bookmarks.js | 7 ++-- vimperator/locale/en-US/Makefile | 3 +- 9 files changed, 62 insertions(+), 76 deletions(-) mode change 120000 => 100644 vimperator/locale/en-US/Makefile diff --git a/Makefile b/Makefile index 2d0618d6..ebdc570e 100644 --- a/Makefile +++ b/Makefile @@ -8,3 +8,4 @@ $(TARGETS:%=\%.%): $(MAKE) -C $* $(@:$*.%=%) $(TARGETS): %: $(DIRS:%=%.%) + diff --git a/common/Makefile.common b/common/Makefile.common index 38606885..7b590bad 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -5,7 +5,7 @@ OS = $(shell uname -s) BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S") BASE = $(TOP)/../common -DOC_SRC_FILES = $(wildcard locale/*/*.txt) $(wildcard locale/*/*.t2t) +DOC_SRC_FILES = $(wildcard locale/*/*.txt) LOCALES = $(wildcard locale/*) MAKE_JAR = VERSION="$(VERSION)" DATE="$(BUILD_DATE)" sh $(BASE)/make_jar.sh @@ -16,7 +16,7 @@ JAR_DIRS = content skin locale JAR_TEXTS = js css dtd xml xul html xhtml JAR_BINS = png -JAR = chrome/${NAME}.jar +JAR = chrome/$(NAME).jar XPI_BASES = $(JAR_BASES) $(TOP)/.. XPI_FILES = install.rdf TODO AUTHORS Donators NEWS License.txt @@ -24,14 +24,14 @@ XPI_DIRS = modules components chrome XPI_TEXTS = js jsm XPI_BINS = jar -XPI_NAME = ${NAME}_${VERSION} -XPI_PATH = ../downloads/${XPI_NAME} +XPI_NAME = $(NAME)_$(VERSION) +XPI_PATH = ../downloads/$(XPI_NAME) XPI = $(XPI_PATH).xpi RDF = ../downloads/update.rdf -RDF_IN = ${RDF}.in +RDF_IN = $(RDF).in -BUILD_DIR = build.${VERSION}.${OS} +BUILD_DIR = build.$(VERSION).$(OS) ASCIIDOC = asciidoc @@ -39,17 +39,24 @@ ASCIIDOC = asciidoc #### rules -.PHONY: all help info doc jar xpi install clean distclean $(JAR) +TARGETS = all help info doc jar xpi install clean distclean $(JAR) +$(TARGETS:%=\%.%): + echo MAKE $* $(@:$*.%=%) + $(MAKE) -C $* $(@:$*.%=%) + +$(TARGETS): %: $(LOCALES:%=%.%) + +.PHONY: $(TARGETS) all: help help: - @echo "${NAME} ${VERSION} build" + @echo "$(NAME) $(VERSION) build" @echo @echo " make help - display this help" @echo " make info - show some info about the system" @echo " make doc - build doc files" - @echo " make jar - build a JAR (${JAR})" - @echo " make xpi - build an XPI (${XPI_NAME})" + @echo " make jar - build a JAR ($(JAR))" + @echo " make xpi - build an XPI ($(XPI_NAME))" @echo " make release - updates update.rdf (this is not for you)" @echo " make clean - clean up" @echo " make distclean - clean up more" @@ -57,32 +64,30 @@ help: @echo "running some commands with V=1 will show more build details" info: - @echo "version ${VERSION}" - @echo "release file ${XPI}" - @echo "doc files ${DOC_SRC_FILES}" - @echo -e "jar files $(shell echo ${JAR_FILES} | sed 's/ /\\n /g' )" - @echo "xpi files ${XPI_FILES}" + @echo "version $(VERSION)" + @echo "release file $(XPI)" + @echo "doc files $(DOC_SRC_FILES)" + @echo "xpi files $(XPI_FILES)" -xpi: ${XPI} -jar: ${JAR} +xpi: $(XPI) +jar: $(JAR) -release: ${XPI} ${RDF} +release: $(XPI) $(RDF) -${RDF}: ${RDF_IN} Makefile +$(RDF): $(RDF_IN) Makefile @echo "Preparing release..." - ${Q}${SED} -e "s,###VERSION###,${VERSION},g" \ - -e "s,###DATE###,${BUILD_DATE},g" \ + $(SED) -e "s,###VERSION###,$(VERSION),g" \ + -e "s,###DATE###,$(BUILD_DATE),g" \ < $< > $@ @echo "SUCCESS: $@" clean: @echo "Cleanup..." - rm -f ${JAR} ${XPI} + rm -f $(JAR) $(XPI) -distclean: clean +distclean: clean $(LOCALES:%=%.distclean) @echo "More cleanup..." - @set -e; for locale in $(LOCALES); do $(MAKE) -C clean; doc; done - rm -rf ${BUILD_DIR} + rm -rf $(BUILD_DIR) #### xpi @@ -102,5 +107,5 @@ $(JAR): doc #### doc (see Makefile.doc) -doc: - @set -e; for locale in $(LOCALES); do $(MAKE) -C $$locale doc; done +doc: $(LOCALES:%=%.doc) ; + diff --git a/common/Makefile.doc b/common/Makefile.doc index 7111a941..48c81e4e 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -2,26 +2,16 @@ #### configuration -BASE = ../../../common - -THIS_LOCALE = $(notdir $(shell pwd)) -THIS_LANG = $(firstword $(subst -, ,$(THIS_LOCALE))) -ifneq ($(strip $(shell echo -n $(THIS_LANG) | wc -c)),2) -THIS_LANG = en -endif +LOCALE = $(shell basename `pwd`) +LANG = $(shell basename `pwd` | awk -F- '{ print ($$1 ~ /^..$$/) ? $$1 : "en" }') ADC_SRC_FILES = $(wildcard *.txt) ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html) -ADC_DEPS = $(wildcard asciidoc.conf lang-$(THIS_LANG).conf) - -T2T_SRC_FILES = $(wildcard *.t2t) -T2T_FILES = $(T2T_SRC_FILES:%.t2t=%.xhtml) -T2T_DEPS = $(wildcard config.t2t) +ADC_DEPS = $(wildcard asciidoc.conf lang-$(LANG).conf) DOC_FILES = $(ADC_FILES) $(T2T_FILES) ASCIIDOC = asciidoc -TXT2TAGS = txt2tags AWK = awk .SILENT: @@ -31,15 +21,13 @@ AWK = awk .PHONY: all help doc asciidoc check-asciidoc clean distclean all: doc -doc: asciidoc t2t +doc: asciidoc help: - @echo "${NAME} ${VERSION} build" + @echo "$(NAME) $(VERSION) build" @echo @echo " make help - display this help" @echo " make doc - build doc files" - @echo " make asciidoc - build asciidoc'd files only" - @echo " make t2t - build txt2tags'd files only" @echo " make clean - clean up" @echo " make distclean - clean up more" @@ -52,12 +40,8 @@ distclean: clean #### Makes single-file makes easier to type -%: %.html %.t2t %.xhtml %.t2t ; - %: %.html %.txt ; -%: %.xhtml %.t2t ; - #### asciidoc asciidoc: check-asciidoc $(ADC_FILES) @@ -67,13 +51,6 @@ check-asciidoc: echo >&2 "Warning: asciidoc versions other than 8.2.x are unsupported" $(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) - @echo "DOC locale/$(THIS_LOCALE)/$@" - $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(THIS_LANG) -a doctitle="$(shell basename $@)" -o $@ $< + @echo "DOC locale/$(LOCALE)/$@" + $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(LANG) -a doctitle="$(shell basename $@)" -o $@ $< -#### txt2tags - -t2t: $(T2T_FILES) - -$(T2T_FILES): %.xhtml: %.t2t $(BASE)/Makefile.doc $(T2T_DEPS) - @echo "T2T locale/$(THIS_LOCALE)/$@" - txt2tags --quiet $< diff --git a/common/content/buffer.js b/common/content/buffer.js index 5c984553..c08ca04b 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1064,7 +1064,7 @@ function Buffer() //{{{ let res = buffer.evaluateXPath(options["hinttags"], frame.document); for (let [,regex] in Iterator(regexps)) { - for (let i in util.range(res.snapshotLength, 0, true)) + for (let i in util.range(res.snapshotLength, 0, -1)) { let elem = res.snapshotItem(i); if (regex.test(elem.textContent)) diff --git a/common/content/completion.js b/common/content/completion.js index 19fec8fc..0f692b64 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -554,10 +554,10 @@ CompletionContext.prototype = { { let self = this; let items = this.items; - let reverse = start > end; + let step = start > end ? -1 : 1; start = Math.max(0, start || 0); end = Math.min(items.length, end ? end : items.length); - return util.map(util.range(start, end, reverse), function (i) items[i]); + return util.map(util.range(start, end, step), function (i) items[i]); }, getRows: function getRows(start, end, doc) @@ -565,10 +565,10 @@ CompletionContext.prototype = { let self = this; let items = this.items; let cache = this.cache.rows; - let reverse = start > end; + let step = start > end ? -1 : 1; start = Math.max(0, start || 0); end = Math.min(items.length, end != null ? end : items.length); - for (let i in util.range(start, end, reverse)) + for (let i in util.range(start, end, step)) yield [i, cache[i] = cache[i] || util.xmlToDom(self.createRow(items[i]), doc)]; }, diff --git a/common/content/editor.js b/common/content/editor.js index 8e0c603e..b24422bf 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -204,7 +204,7 @@ function Editor() //{{{ function (args) { let matches = args.string.match(RegExp("^\\s*($|" + abbrevmatch + ")(?:\\s*$|\\s+(.*))")); - if (! matches) + if (!matches) { liberator.echoerr("E474: Invalid argument"); return false; diff --git a/common/content/util.js b/common/content/util.js index 95a73230..090de789 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -519,25 +519,28 @@ const util = { //{{{ }, /** - * A generator that returns the values between start and end. - * If reverse is true then the values are returned in reverse order. + * A generator that returns the values between start and end, + * in step increments. * * @param {number} start The interval's start value. * @param {number} end The interval's end value. - * @param {boolean} reverse Reverse the order in which the values are produced. + * @param {boolean} step The value to step the range by. May be + * negative. @default 1 * @returns {Iterator(Object)} */ - range: function range(start, end, reverse) + range: function range(start, end, step) { - if (!reverse) + if (!step) + step = 1; + if (step > 0) { - while (start < end) - yield start++; + for (; start < end; start += step) + yield start; } else { while (start > end) - yield --start; + yield start += step; } }, diff --git a/vimperator/content/bookmarks.js b/vimperator/content/bookmarks.js index bd888b2f..f099b36e 100644 --- a/vimperator/content/bookmarks.js +++ b/vimperator/content/bookmarks.js @@ -711,7 +711,7 @@ function History() //{{{ if (url) { let sh = window.getWebNavigation().sessionHistory; - for (let i in util.range(sh.index, 0, true)) + for (let i in util.range(sh.index, 0, -1)) { if (sh.getEntryAtIndex(i, false).URI.spec == url) { @@ -735,7 +735,7 @@ function History() //{{{ let sh = window.getWebNavigation().sessionHistory; context.anchored = false; - context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index, 0, true))]; + context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index, 0, -1))]; context.keys = { text: function (item) item.URI.spec, description: "title" }; }, count: true, @@ -1043,8 +1043,7 @@ function QuickMarks() //{{{ list: function list(filter) { - let marks = [key for ([key, val] in qmarks)]; - // This was a lot nicer without the lambda... + let marks = [k for ([k, v] in qmarks)]; let lowercaseMarks = marks.filter(function (x) /[a-z]/.test(x)).sort(); let uppercaseMarks = marks.filter(function (x) /[A-Z]/.test(x)).sort(); let numberMarks = marks.filter(function (x) /[0-9]/.test(x)).sort(); diff --git a/vimperator/locale/en-US/Makefile b/vimperator/locale/en-US/Makefile deleted file mode 120000 index 85510a12..00000000 --- a/vimperator/locale/en-US/Makefile +++ /dev/null @@ -1 +0,0 @@ -../../../common/Makefile.doc \ No newline at end of file diff --git a/vimperator/locale/en-US/Makefile b/vimperator/locale/en-US/Makefile new file mode 100644 index 00000000..627ca99b --- /dev/null +++ b/vimperator/locale/en-US/Makefile @@ -0,0 +1,2 @@ +BASE = ../../../common +include $(BASE)/Makefile.doc From 9ad451b7f7c971be7633e9d537e049802bf6adf6 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 21 Jan 2009 10:17:37 -0500 Subject: [PATCH 02/85] Three small Makefile.doc fixes. * Require language part of locale to be two lowercase letters. * Update Makefile.doc comment -- add "include" comment. * Get rid of muttator/locale/en-US/Makefile symlink in favor of include. --- common/Makefile.doc | 4 ++-- muttator/locale/en-US/Makefile | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) mode change 120000 => 100644 muttator/locale/en-US/Makefile diff --git a/common/Makefile.doc b/common/Makefile.doc index 48c81e4e..b23e92fd 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -1,9 +1,9 @@ -# Symlink me to locale/*/Makefile +# Symlink or me to (or include me from) locale/*/Makefile #### configuration LOCALE = $(shell basename `pwd`) -LANG = $(shell basename `pwd` | awk -F- '{ print ($$1 ~ /^..$$/) ? $$1 : "en" }') +LANG = $(shell basename `pwd` | awk -F- '{ print ($$1 ~ /^[a-z]\{2\}$$/) ? $$1 : "en" }') ADC_SRC_FILES = $(wildcard *.txt) ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html) diff --git a/muttator/locale/en-US/Makefile b/muttator/locale/en-US/Makefile deleted file mode 120000 index 85510a12..00000000 --- a/muttator/locale/en-US/Makefile +++ /dev/null @@ -1 +0,0 @@ -../../../common/Makefile.doc \ No newline at end of file diff --git a/muttator/locale/en-US/Makefile b/muttator/locale/en-US/Makefile new file mode 100644 index 00000000..627ca99b --- /dev/null +++ b/muttator/locale/en-US/Makefile @@ -0,0 +1,2 @@ +BASE = ../../../common +include $(BASE)/Makefile.doc From f381a86bf79597b17b1ee725d405ae453621421e Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 21 Jan 2009 10:41:42 -0500 Subject: [PATCH 03/85] Temporary fix for "Sanitize Makefile.doc" (1e4369cb40de23bd912bb7b5175c6cfae4e665c2) More elegant fix to come, but something was needed so that "make xpi" could build. --- common/Makefile.common | 16 +++++++++------- common/Makefile.doc | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/common/Makefile.common b/common/Makefile.common index 7b590bad..9c6c26fd 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -26,7 +26,7 @@ XPI_BINS = jar XPI_NAME = $(NAME)_$(VERSION) XPI_PATH = ../downloads/$(XPI_NAME) -XPI = $(XPI_PATH).xpi +XPI = $(XPI_PATH).xpi RDF = ../downloads/update.rdf RDF_IN = $(RDF).in @@ -44,7 +44,7 @@ $(TARGETS:%=\%.%): echo MAKE $* $(@:$*.%=%) $(MAKE) -C $* $(@:$*.%=%) -$(TARGETS): %: $(LOCALES:%=%.%) +#$(TARGETS): %: $(LOCALES:%=%.%) .PHONY: $(TARGETS) all: help @@ -82,11 +82,13 @@ $(RDF): $(RDF_IN) Makefile @echo "SUCCESS: $@" clean: - @echo "Cleanup..." + @echo "General $(NAME) cleanup..." + @set -e; for locale in $(LOCALES); do $(MAKE) -C $$locale clean; done rm -f $(JAR) $(XPI) -distclean: clean $(LOCALES:%=%.distclean) - @echo "More cleanup..." +distclean: clean + @echo "More $(NAME) cleanup..." + @set -e; for locale in $(LOCALES); do $(MAKE) -C $$locale distclean; done rm -rf $(BUILD_DIR) #### xpi @@ -107,5 +109,5 @@ $(JAR): doc #### doc (see Makefile.doc) -doc: $(LOCALES:%=%.doc) ; - +doc: + @set -e; for locale in $(LOCALES); do $(MAKE) -C $$locale doc; done diff --git a/common/Makefile.doc b/common/Makefile.doc index b23e92fd..cdb6da3d 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -32,10 +32,10 @@ help: @echo " make distclean - clean up more" clean: - @echo "Cleanup..." + @echo " Cleanup of $(LOCALE) documentation..." distclean: clean - @echo "More cleanup..." + @echo " More cleanup of $(LOCALE) documentation..." rm -f $(DOC_FILES) #### Makes single-file makes easier to type From 74c04cc49bb9fed2153b7265904fb08cb943f57c Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 21 Jan 2009 10:59:47 -0500 Subject: [PATCH 04/85] Polished Makefile.doc anD Makefile.common. (includes a more elegant fix for 1e4369cb40de23bd912bb7b5175c6cfae4e665c2) --- common/Makefile.common | 32 ++++++++++++++------------------ common/Makefile.doc | 4 ++-- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/common/Makefile.common b/common/Makefile.common index 9c6c26fd..45103acd 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -34,6 +34,7 @@ RDF_IN = $(RDF).in BUILD_DIR = build.$(VERSION).$(OS) ASCIIDOC = asciidoc +AWK = awk .SILENT: @@ -41,11 +42,9 @@ ASCIIDOC = asciidoc TARGETS = all help info doc jar xpi install clean distclean $(JAR) $(TARGETS:%=\%.%): - echo MAKE $* $(@:$*.%=%) + echo " MAKE" $* $(@:$*.%=%) $(MAKE) -C $* $(@:$*.%=%) -#$(TARGETS): %: $(LOCALES:%=%.%) - .PHONY: $(TARGETS) all: help @@ -75,39 +74,36 @@ jar: $(JAR) release: $(XPI) $(RDF) $(RDF): $(RDF_IN) Makefile - @echo "Preparing release..." + @echo " Preparing release..." $(SED) -e "s,###VERSION###,$(VERSION),g" \ -e "s,###DATE###,$(BUILD_DATE),g" \ < $< > $@ - @echo "SUCCESS: $@" + @echo " SUCCESS: $@" -clean: - @echo "General $(NAME) cleanup..." - @set -e; for locale in $(LOCALES); do $(MAKE) -C $$locale clean; done +clean: $(LOCALES:%=%.clean) + @echo " General $(NAME) cleanup..." rm -f $(JAR) $(XPI) -distclean: clean - @echo "More $(NAME) cleanup..." - @set -e; for locale in $(LOCALES); do $(MAKE) -C $$locale distclean; done +distclean: $(LOCALES:%=%.distclean) clean + @echo " More $(NAME) cleanup..." rm -rf $(BUILD_DIR) #### xpi $(XPI): $(JAR) - @echo "Building XPI..." + @echo " Building XPI..." mkdir -p $(XPI_PATH) - awk -v 'name=$(NAME)' -f $(BASE)/process_manifest.awk $(TOP)/chrome.manifest >$(XPI_PATH)/chrome.manifest + $(AWK) -v 'name=$(NAME)' -f $(BASE)/process_manifest.awk $(TOP)/chrome.manifest >$(XPI_PATH)/chrome.manifest $(MAKE_JAR) "$(XPI)" "$(XPI_BASES)" "$(XPI_DIRS)" "$(XPI_TEXTS)" "$(XPI_BINS)" "$(XPI_FILES)" - @echo "SUCCESS: $@" + @echo " SUCCESS: $@" #### jar $(JAR): doc - @echo "Building JAR..." + @echo " Building JAR..." $(MAKE_JAR) "$(JAR)" "$(JAR_BASES)" "$(JAR_DIRS)" "$(JAR_TEXTS)" "$(JAR_BINS)" "$(JAR_FILES)" - @echo "SUCCESS: $@" + @echo " SUCCESS: $@" #### doc (see Makefile.doc) -doc: - @set -e; for locale in $(LOCALES); do $(MAKE) -C $$locale doc; done +doc: $(LOCALES:%=%.doc) ; diff --git a/common/Makefile.doc b/common/Makefile.doc index cdb6da3d..00c8b1bb 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -32,7 +32,7 @@ help: @echo " make distclean - clean up more" clean: - @echo " Cleanup of $(LOCALE) documentation..." + @echo " Cleanup of $(LOCALE) documentation..." distclean: clean @echo " More cleanup of $(LOCALE) documentation..." @@ -51,6 +51,6 @@ check-asciidoc: echo >&2 "Warning: asciidoc versions other than 8.2.x are unsupported" $(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) - @echo "DOC locale/$(LOCALE)/$@" + @echo " DOC locale/$(LOCALE)/$@" $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(LANG) -a doctitle="$(shell basename $@)" -o $@ $< From 48be1c8df7445e4535ebf1bb859c8475f3332e29 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 21 Jan 2009 11:02:52 -0500 Subject: [PATCH 05/85] Changed awk to $(AWK) in Makefile.doc. --- common/Makefile.doc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/Makefile.doc b/common/Makefile.doc index 00c8b1bb..e7cf6b81 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -2,8 +2,11 @@ #### configuration +ASCIIDOC = asciidoc +AWK = awk + LOCALE = $(shell basename `pwd`) -LANG = $(shell basename `pwd` | awk -F- '{ print ($$1 ~ /^[a-z]\{2\}$$/) ? $$1 : "en" }') +LANG = $(shell basename `pwd` | $(AWK) -F- '{ print ($$1 ~ /^[a-z]\{2\}$$/) ? $$1 : "en" }') ADC_SRC_FILES = $(wildcard *.txt) ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html) @@ -11,9 +14,6 @@ ADC_DEPS = $(wildcard asciidoc.conf lang-$(LANG).conf) DOC_FILES = $(ADC_FILES) $(T2T_FILES) -ASCIIDOC = asciidoc -AWK = awk - .SILENT: #### rules From 23ff9efc615114694c12ae45a754751a8e9bccda Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 21 Jan 2009 11:07:50 -0500 Subject: [PATCH 06/85] Make xpi the default liberator/Makefile target (rather than clean). --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index ebdc570e..e44d7b9c 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ DIRS = vimperator muttator TARGETS = clean distclean doc help info jar release xpi .SILENT: +all: xpi ; + $(TARGETS:%=\%.%): echo MAKE $@ $(MAKE) -C $* $(@:$*.%=%) From f36748338b299e3fad3e614a080c49609536b44d Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 21 Jan 2009 11:19:16 -0500 Subject: [PATCH 07/85] Added some instructions to vimperator.vim. Files like vimperator.vim, javascript.vim, and vimperatorrc.example might fit better in a "contrib" directory. It's not clear whether there should be vimperator/contrib and muttator/contrib directories or a single liberator/contrib directory. The Makefile.common doesn't include these files in the bundle, and so it doesn't seem like a bad idea to package them in a single liberator/contrib directory with a CONTENTS or README file giving a ToC for the directory. --- vimperator/vimperator.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vimperator/vimperator.vim b/vimperator/vimperator.vim index 9a46884b..509be979 100644 --- a/vimperator/vimperator.vim +++ b/vimperator/vimperator.vim @@ -2,6 +2,12 @@ " Language: VIMperator configuration file " Maintainer: Doug Kearns " Last Change: 2008 Dec 31 +" +" To use this file, copy it to ~/.vim/syntax/vimperator.vim and create +" ~/.vim/ftdetect/vimperator.vim with contents like: +" +" au BufNewFile,BufRead *.vimp setl filetype=vimperator +" au BufNewFile,BufRead */{.,_}{vimperator,muttator}rc setl filetype=vimperator if exists("b:current_syntax") finish From 24e4a3ac19c98c2aae7db0f33047f78778d5de66 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 21 Jan 2009 14:48:37 -0500 Subject: [PATCH 08/85] Changed .gitignore to catch .stgit-*.txt instead of just .stgit-edit.txt --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 70f6032d..870718f0 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,4 @@ ## Generated by StGit patches-* -.stgit-edit.txt +.stgit-*.txt From 91c5485c421ae4ca70a984097e2d32b41a6c64c4 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 21 Jan 2009 14:53:12 -0500 Subject: [PATCH 09/85] Fix LANG setting in Makefile.doc. Remove extra indentation in messages. --- common/Makefile.common | 16 ++++++++-------- common/Makefile.doc | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/Makefile.common b/common/Makefile.common index 45103acd..2cf4fa09 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -42,7 +42,7 @@ AWK = awk TARGETS = all help info doc jar xpi install clean distclean $(JAR) $(TARGETS:%=\%.%): - echo " MAKE" $* $(@:$*.%=%) + echo MAKE $* $(@:$*.%=%) $(MAKE) -C $* $(@:$*.%=%) .PHONY: $(TARGETS) @@ -74,24 +74,24 @@ jar: $(JAR) release: $(XPI) $(RDF) $(RDF): $(RDF_IN) Makefile - @echo " Preparing release..." + @echo "Preparing release..." $(SED) -e "s,###VERSION###,$(VERSION),g" \ -e "s,###DATE###,$(BUILD_DATE),g" \ < $< > $@ - @echo " SUCCESS: $@" + @echo "SUCCESS: $@" clean: $(LOCALES:%=%.clean) - @echo " General $(NAME) cleanup..." + @echo "General $(NAME) cleanup..." rm -f $(JAR) $(XPI) distclean: $(LOCALES:%=%.distclean) clean - @echo " More $(NAME) cleanup..." + @echo "More $(NAME) cleanup..." rm -rf $(BUILD_DIR) #### xpi $(XPI): $(JAR) - @echo " Building XPI..." + @echo "Building XPI..." mkdir -p $(XPI_PATH) $(AWK) -v 'name=$(NAME)' -f $(BASE)/process_manifest.awk $(TOP)/chrome.manifest >$(XPI_PATH)/chrome.manifest $(MAKE_JAR) "$(XPI)" "$(XPI_BASES)" "$(XPI_DIRS)" "$(XPI_TEXTS)" "$(XPI_BINS)" "$(XPI_FILES)" @@ -100,9 +100,9 @@ $(XPI): $(JAR) #### jar $(JAR): doc - @echo " Building JAR..." + @echo "Building JAR..." $(MAKE_JAR) "$(JAR)" "$(JAR_BASES)" "$(JAR_DIRS)" "$(JAR_TEXTS)" "$(JAR_BINS)" "$(JAR_FILES)" - @echo " SUCCESS: $@" + @echo "SUCCESS: $@" #### doc (see Makefile.doc) diff --git a/common/Makefile.doc b/common/Makefile.doc index e7cf6b81..fb9a43ee 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -6,7 +6,7 @@ ASCIIDOC = asciidoc AWK = awk LOCALE = $(shell basename `pwd`) -LANG = $(shell basename `pwd` | $(AWK) -F- '{ print ($$1 ~ /^[a-z]\{2\}$$/) ? $$1 : "en" }') +LANG = $(shell basename `pwd` | $(AWK) -F- '{ print ($$1 ~ /^[a-z][a-z]$$/) ? $$1 : "en" }') ADC_SRC_FILES = $(wildcard *.txt) ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html) From 3b6c0a24281ef91e5721e432de3bb8bd288f8209 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 21 Jan 2009 15:09:29 -0500 Subject: [PATCH 10/85] Remove last reference to T2T from Makefile.doc. --- common/Makefile.doc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/Makefile.doc b/common/Makefile.doc index fb9a43ee..571ec45a 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -12,7 +12,7 @@ ADC_SRC_FILES = $(wildcard *.txt) ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html) ADC_DEPS = $(wildcard asciidoc.conf lang-$(LANG).conf) -DOC_FILES = $(ADC_FILES) $(T2T_FILES) +DOC_FILES = $(ADC_FILES) .SILENT: @@ -32,10 +32,10 @@ help: @echo " make distclean - clean up more" clean: - @echo " Cleanup of $(LOCALE) documentation..." + @echo "Cleanup of $(LOCALE) documentation..." distclean: clean - @echo " More cleanup of $(LOCALE) documentation..." + @echo "More cleanup of $(LOCALE) documentation..." rm -f $(DOC_FILES) #### Makes single-file makes easier to type @@ -51,6 +51,6 @@ check-asciidoc: echo >&2 "Warning: asciidoc versions other than 8.2.x are unsupported" $(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) - @echo " DOC locale/$(LOCALE)/$@" + @echo "DOC locale/$(LOCALE)/$@" $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(LANG) -a doctitle="$(shell basename $@)" -o $@ $< From f752a002333635be6dcfe0b3e18534ef2af0bd80 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 21 Jan 2009 15:55:49 -0500 Subject: [PATCH 11/85] Removed final extra indentation from Makefile status messages. I thought the indentation looked nice and helped when viewing the output of a "make xpi" from liberator. Oh, well. --- common/Makefile.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Makefile.common b/common/Makefile.common index 2cf4fa09..42c0d6e6 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -95,7 +95,7 @@ $(XPI): $(JAR) mkdir -p $(XPI_PATH) $(AWK) -v 'name=$(NAME)' -f $(BASE)/process_manifest.awk $(TOP)/chrome.manifest >$(XPI_PATH)/chrome.manifest $(MAKE_JAR) "$(XPI)" "$(XPI_BASES)" "$(XPI_DIRS)" "$(XPI_TEXTS)" "$(XPI_BINS)" "$(XPI_FILES)" - @echo " SUCCESS: $@" + @echo "SUCCESS: $@" #### jar From 6b8cd0b35b57fc30557818c24586f00e4cba0a6b Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 22 Jan 2009 18:59:23 +1100 Subject: [PATCH 12/85] Add a Vim syntax file for Muttator files and ftdetect files for all. This also adds a quick 'n' dirty build mechanism for creating the Vimballs. Unfortunately, these aren't particularly amenable to being created in a batch process. Dr Chip has created a small C program for this but that would be a silly dependency. --- muttator/contrib/vim/Makefile | 9 ++ muttator/contrib/vim/ftdetect/muttator.vim | 2 + muttator/contrib/vim/mkvimball.txt | 2 + muttator/contrib/vim/muttator.vba | 110 ++++++++++++++++++ muttator/contrib/vim/syntax/muttator.vim | 100 ++++++++++++++++ vimperator/contrib/vim/Makefile | 9 ++ .../contrib/vim/ftdetect/vimperator.vim | 1 + vimperator/contrib/vim/mkvimball.txt | 2 + .../{ => contrib/vim/syntax}/vimperator.vim | 60 +++++----- 9 files changed, 262 insertions(+), 33 deletions(-) create mode 100644 muttator/contrib/vim/Makefile create mode 100644 muttator/contrib/vim/ftdetect/muttator.vim create mode 100644 muttator/contrib/vim/mkvimball.txt create mode 100644 muttator/contrib/vim/muttator.vba create mode 100644 muttator/contrib/vim/syntax/muttator.vim create mode 100644 vimperator/contrib/vim/Makefile create mode 100644 vimperator/contrib/vim/ftdetect/vimperator.vim create mode 100644 vimperator/contrib/vim/mkvimball.txt rename vimperator/{ => contrib/vim/syntax}/vimperator.vim (58%) diff --git a/muttator/contrib/vim/Makefile b/muttator/contrib/vim/Makefile new file mode 100644 index 00000000..76277174 --- /dev/null +++ b/muttator/contrib/vim/Makefile @@ -0,0 +1,9 @@ +VIMBALL = muttator.vba + +vimball: mkvimball.txt syntax/muttator.vim ftdetect/muttator.vim + echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt + +all: vimball + +clean: + rm -f ${VIMBALL} diff --git a/muttator/contrib/vim/ftdetect/muttator.vim b/muttator/contrib/vim/ftdetect/muttator.vim new file mode 100644 index 00000000..94963a26 --- /dev/null +++ b/muttator/contrib/vim/ftdetect/muttator.vim @@ -0,0 +1,2 @@ +" TODO: what's the Muttator filename extension? +au BufNewFile,BufRead *muttatororrc*,*.muttator set filetype=muttator diff --git a/muttator/contrib/vim/mkvimball.txt b/muttator/contrib/vim/mkvimball.txt new file mode 100644 index 00000000..484bb52f --- /dev/null +++ b/muttator/contrib/vim/mkvimball.txt @@ -0,0 +1,2 @@ +syntax/muttator.vim +ftdetect/muttator.vim diff --git a/muttator/contrib/vim/muttator.vba b/muttator/contrib/vim/muttator.vba new file mode 100644 index 00000000..3f97476b --- /dev/null +++ b/muttator/contrib/vim/muttator.vba @@ -0,0 +1,110 @@ +" Vimball Archiver by Charles E. Campbell, Jr., Ph.D. +UseVimball +finish +syntax/muttator.vim [[[1 +100 +" Vim syntax file +" Language: Muttator configuration file +" Maintainer: Doug Kearns +" Last Change: 2009 Jan 22 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn include @javascriptTop syntax/javascript.vim +unlet b:current_syntax + +syn include @cssTop syntax/css.vim +unlet b:current_syntax + +syn match muttatorCommandStart "\%(^\s*:\=\)\@<=" nextgroup=muttatorCommand,muttatorAutoCmd + +syn keyword muttatorCommand ab[breviate] ab[clear] addo[ns] addr[essbook] bN[ext] bd[elete] beep bf[irst] bl[ast] bn[ext] + \ bp[revious] br[ewind] bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] cno[remap] colo[rscheme] + \ com[mand] comc[lear] con[tact] contacts copy[to] cu[nmap] cuna[bbrev] delc[ommand] delm[arks] delmac[ros] dels[tyle] + \ dia[log] do[autocmd] doautoa[ll] ec[ho] echoe[rr] echom[sg] em[enu] empty[trash] exe[cute] exu[sage] fini[sh] get[messages] + \ go[to] h[elp] ha[rdcopy] hi[ghlight] ia[bbrev] iabc[lear] im[ap] imapc[lear] ino[remap] iu[nmap] iuna[bbrev] javas[cript] js + \ let loadplugins lpl m[ail] ma[rk] macros map mapc[lear] marks mes[sages] mkm[uttatorrc] mm[ap] mmapc[lear] mu[nmap] + \ mno[remap] move[to] no[remap] norm[al] optionu[sage] pa[geinfo] pagest[yle] pc[lose] pl[ay] pref[erences] prefs pw[d] q[uit] + \ re[load] res[tart] run runt[ime] sav[eas] scrip[tnames] se[t] setg[lobal] setl[ocal] so[urce] st[op] sty[le] tN[ext] t[open] + \ tab tabN[ext] tabc[lose] tabfir[st] tabl[ast] tabn[ext] tabp[revious] tabr[ewind] time tn[ext] tp[revious] una[bbreviate] + \ unl[et] unm[ap] ve[rsion] vie[wsource] viu[sage] w[rite] zo[om] + \ contained + +syn match muttatorCommand "!" contained + +syn keyword muttatorAutoCmd au[tocmd] contained nextgroup=muttatorAutoEventList skipwhite + +syn keyword muttatorAutoEvent BookmarkAdd DOMLoad LocationChange PageLoadPre PageLoad ShellCmdPost muttatorEnter + \ muttatorLeavePre muttatorLeave + \ contained + +syn match muttatorAutoEventList "\(\a\+,\)*\a\+" contained contains=muttatorAutoEvent + +syn region muttatorSet matchgroup=muttatorCommand start="\%(^\s*:\=\)\@<=\<\%(setl\%[ocal]\|setg\%[lobal]\|set\=\)\=\>" + \ end="$" keepend oneline contains=muttatorOption,muttatorString + +syn keyword muttatorOption archivefolder cdpath cd complete cpt editor eventignore ei extendedhinttags eht followhints fh + \ guioptions go helpfile hf hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls layout messages msgs + \ nextpattern pageinfo pa previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf showstatuslinks ssli + \ showtabline stal suggestengines t_vb urlseparator verbose vbs wildcase wic wildignore wig wildmode wim wildoptions wop + \ wordseparators wsp + \ contained nextgroup=muttatorSetMod + +" toggle options +syn match muttatorOption "\<\%(no\|inv\)\=\%(autoexternal\|errorbells\|eb\|exrc\|ex\|focuscontent\|fc\|fullscreen\|fs\)\>!\=" + \ contained nextgroup=muttatorSetMod +syn match muttatorOption "\<\%(no\|inv\)\=\%(insertmode\|im\|loadplugins\|lpl\|more\|showmode\|smd\|visualbell\|vb\)\>!\=" + \ contained nextgroup=muttatorSetMod +syn match muttatorOption "\<\%(no\|inv\)\=\%(usermode\|um\)\>!\=" + \ contained nextgroup=muttatorSetMod + +syn match muttatorSetMod "\%(\<[a-z_]\+\)\@<=&" contained + +syn region muttatorJavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline +syn region muttatorJavaScript matchgroup=muttatorJavascriptDelimiter + \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold + +let s:cssRegionStart = '\%(^\s*sty\%[le]!\=\s\+\%(-\%(n\|name\)\%(\s\+\|=\)\S\+\s\+\)\=[^-]\S\+\s\+\)\@<=' +execute 'syn region muttatorCss start="' . s:cssRegionStart . '" end="$" contains=@cssTop keepend oneline' +execute 'syn region muttatorCss matchgroup=muttatorCssDelimiter' + \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' + +syn match muttatorNotation "<[0-9A-Za-z-]\+>" + +syn match muttatorComment +".*$+ contains=muttatorTodo,@Spell +syn keyword muttatorTodo FIXME NOTE TODO XXX contained + +syn region muttatorString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline + +syn match muttatorLineComment +^\s*".*$+ contains=muttatorTodo,@Spell + +" NOTE: match vim.vim highlighting group names +hi def link muttatorAutoCmd muttatorCommand +hi def link muttatorAutoEvent Type +hi def link muttatorCommand Statement +hi def link muttatorComment Comment +hi def link muttatorJavascriptDelimiter Delimiter +hi def link muttatorCssDelimiter Delimiter +hi def link muttatorNotation Special +hi def link muttatorLineComment Comment +hi def link muttatorOption PreProc +hi def link muttatorSetMod muttatorOption +hi def link muttatorString String +hi def link muttatorTodo Todo + +let b:current_syntax = "muttator" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: tw=130 et ts=4 sw=4: +ftdetect/muttator.vim [[[1 +3 +" Muttator +" TODO: what's the Muttator filename extension? +au BufNewFile,BufRead *muttatororrc*,*.muttator set filetype=muttator diff --git a/muttator/contrib/vim/syntax/muttator.vim b/muttator/contrib/vim/syntax/muttator.vim new file mode 100644 index 00000000..28961f19 --- /dev/null +++ b/muttator/contrib/vim/syntax/muttator.vim @@ -0,0 +1,100 @@ +" Vim syntax file +" Language: Muttator configuration file +" Maintainer: Doug Kearns +" Last Change: 2009 Jan 22 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn include @javascriptTop syntax/javascript.vim +unlet b:current_syntax + +syn include @cssTop syntax/css.vim +unlet b:current_syntax + +syn match muttatorCommandStart "\%(^\s*:\=\)\@<=" nextgroup=muttatorCommand,muttatorAutoCmd + +syn keyword muttatorCommand ab[breviate] ab[clear] addo[ns] addr[essbook] bN[ext] bd[elete] beep bf[irst] bl[ast] bn[ext] + \ bp[revious] br[ewind] bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] cno[remap] colo[rscheme] + \ com[mand] comc[lear] con[tact] contacts copy[to] cu[nmap] cuna[bbrev] delc[ommand] delm[arks] delmac[ros] dels[tyle] + \ dia[log] do[autocmd] doautoa[ll] ec[ho] echoe[rr] echom[sg] em[enu] empty[trash] exe[cute] exu[sage] fini[sh] get[messages] + \ go[to] h[elp] ha[rdcopy] hi[ghlight] ia[bbrev] iabc[lear] im[ap] imapc[lear] ino[remap] iu[nmap] iuna[bbrev] javas[cript] js + \ let loadplugins lpl m[ail] ma[rk] macros map mapc[lear] marks mes[sages] mkm[uttatorrc] mm[ap] mmapc[lear] mu[nmap] + \ mno[remap] move[to] no[remap] norm[al] optionu[sage] pa[geinfo] pagest[yle] pc[lose] pl[ay] pref[erences] prefs pw[d] q[uit] + \ re[load] res[tart] run runt[ime] sav[eas] scrip[tnames] se[t] setg[lobal] setl[ocal] so[urce] st[op] sty[le] tN[ext] t[open] + \ tab tabN[ext] tabc[lose] tabfir[st] tabl[ast] tabn[ext] tabp[revious] tabr[ewind] time tn[ext] tp[revious] una[bbreviate] + \ unl[et] unm[ap] ve[rsion] vie[wsource] viu[sage] w[rite] zo[om] + \ contained + +syn match muttatorCommand "!" contained + +syn keyword muttatorAutoCmd au[tocmd] contained nextgroup=muttatorAutoEventList skipwhite + +syn keyword muttatorAutoEvent BookmarkAdd DOMLoad LocationChange PageLoadPre PageLoad ShellCmdPost muttatorEnter + \ muttatorLeavePre muttatorLeave + \ contained + +syn match muttatorAutoEventList "\(\a\+,\)*\a\+" contained contains=muttatorAutoEvent + +syn region muttatorSet matchgroup=muttatorCommand start="\%(^\s*:\=\)\@<=\<\%(setl\%[ocal]\|setg\%[lobal]\|set\=\)\=\>" + \ end="$" keepend oneline contains=muttatorOption,muttatorString + +syn keyword muttatorOption archivefolder cdpath cd complete cpt editor eventignore ei extendedhinttags eht followhints fh + \ guioptions go helpfile hf hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls layout messages msgs + \ nextpattern pageinfo pa previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf showstatuslinks ssli + \ showtabline stal suggestengines t_vb urlseparator verbose vbs wildcase wic wildignore wig wildmode wim wildoptions wop + \ wordseparators wsp + \ contained nextgroup=muttatorSetMod + +" toggle options +syn match muttatorOption "\<\%(no\|inv\)\=\%(autoexternal\|errorbells\|eb\|exrc\|ex\|focuscontent\|fc\|fullscreen\|fs\)\>!\=" + \ contained nextgroup=muttatorSetMod +syn match muttatorOption "\<\%(no\|inv\)\=\%(insertmode\|im\|loadplugins\|lpl\|more\|showmode\|smd\|visualbell\|vb\)\>!\=" + \ contained nextgroup=muttatorSetMod +syn match muttatorOption "\<\%(no\|inv\)\=\%(usermode\|um\)\>!\=" + \ contained nextgroup=muttatorSetMod + +syn match muttatorSetMod "\%(\<[a-z_]\+\)\@<=&" contained + +syn region muttatorJavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline +syn region muttatorJavaScript matchgroup=muttatorJavascriptDelimiter + \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold + +let s:cssRegionStart = '\%(^\s*sty\%[le]!\=\s\+\%(-\%(n\|name\)\%(\s\+\|=\)\S\+\s\+\)\=[^-]\S\+\s\+\)\@<=' +execute 'syn region muttatorCss start="' . s:cssRegionStart . '" end="$" contains=@cssTop keepend oneline' +execute 'syn region muttatorCss matchgroup=muttatorCssDelimiter' + \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' + +syn match muttatorNotation "<[0-9A-Za-z-]\+>" + +syn match muttatorComment +".*$+ contains=muttatorTodo,@Spell +syn keyword muttatorTodo FIXME NOTE TODO XXX contained + +syn region muttatorString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline + +syn match muttatorLineComment +^\s*".*$+ contains=muttatorTodo,@Spell + +" NOTE: match vim.vim highlighting group names +hi def link muttatorAutoCmd muttatorCommand +hi def link muttatorAutoEvent Type +hi def link muttatorCommand Statement +hi def link muttatorComment Comment +hi def link muttatorJavascriptDelimiter Delimiter +hi def link muttatorCssDelimiter Delimiter +hi def link muttatorNotation Special +hi def link muttatorLineComment Comment +hi def link muttatorOption PreProc +hi def link muttatorSetMod muttatorOption +hi def link muttatorString String +hi def link muttatorTodo Todo + +let b:current_syntax = "muttator" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: tw=130 et ts=4 sw=4: diff --git a/vimperator/contrib/vim/Makefile b/vimperator/contrib/vim/Makefile new file mode 100644 index 00000000..77df2fc3 --- /dev/null +++ b/vimperator/contrib/vim/Makefile @@ -0,0 +1,9 @@ +VIMBALL = vimperator.vba + +vimball: mkvimball.txt syntax/vimperator.vim ftdetect/vimperator.vim + echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt + +all: vimball + +clean: + rm -f ${VIMBALL} diff --git a/vimperator/contrib/vim/ftdetect/vimperator.vim b/vimperator/contrib/vim/ftdetect/vimperator.vim new file mode 100644 index 00000000..cbf9068e --- /dev/null +++ b/vimperator/contrib/vim/ftdetect/vimperator.vim @@ -0,0 +1 @@ +au BufNewFile,BufRead *vimperatorrc*,*.vimp set filetype=vimperator diff --git a/vimperator/contrib/vim/mkvimball.txt b/vimperator/contrib/vim/mkvimball.txt new file mode 100644 index 00000000..96d1629b --- /dev/null +++ b/vimperator/contrib/vim/mkvimball.txt @@ -0,0 +1,2 @@ +syntax/vimperator.vim +ftdetect/vimperator.vim diff --git a/vimperator/vimperator.vim b/vimperator/contrib/vim/syntax/vimperator.vim similarity index 58% rename from vimperator/vimperator.vim rename to vimperator/contrib/vim/syntax/vimperator.vim index 509be979..aadf47b8 100644 --- a/vimperator/vimperator.vim +++ b/vimperator/contrib/vim/syntax/vimperator.vim @@ -1,13 +1,7 @@ " Vim syntax file " Language: VIMperator configuration file " Maintainer: Doug Kearns -" Last Change: 2008 Dec 31 -" -" To use this file, copy it to ~/.vim/syntax/vimperator.vim and create -" ~/.vim/ftdetect/vimperator.vim with contents like: -" -" au BufNewFile,BufRead *.vimp setl filetype=vimperator -" au BufNewFile,BufRead */{.,_}{vimperator,muttator}rc setl filetype=vimperator +" Last Change: 2008 Jan 22 if exists("b:current_syntax") finish @@ -24,19 +18,19 @@ unlet b:current_syntax syn match vimperatorCommandStart "\%(^\s*:\=\)\@<=" nextgroup=vimperatorCommand,vimperatorAutoCmd -syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] b[uffer] ba[ck] bd[elete] beep bf[irst] bl[ast] bma[rk] bmarks - \ bn[ext] bN[ext] bp[revious] br[ewind] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] colo[rscheme] cuna[bbrev] - \ cm[ap] cmapc[lear] cno[remap] comc[lear] com[mand] cu[nmap] do[autocmd] doautoa[ll] delbm[arks] delc[ommand] delmac[ros] - \ delm[arks] delqm[arks] dels[tyle] dia[log] dl downl[oads] e[dit] ec[ho] echoe[rr] echom[sg] em[enu] exe[cute] exu[sage] - \ fini[sh] files fo[rward] fw h[elp] ha[rdcopy] hi[ghlight] hist[ory] hs ia[bbrev] iabc[lear] im[ap] imapc[lear] ino[remap] - \ iuna[bbrev] iu[nmap] javas[cript] ju[mps] js let loadplugins lpl ls macros ma[rk] map mapc[lear] marks mes[sages] +syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] bN[ext] b[uffer] ba[ck] bd[elete] beep bf[irst] bl[ast] bma[rk] + \ bmarks bn[ext] bp[revious] br[ewind] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] + \ cno[remap] colo[rscheme] com[mand] comc[lear] cu[nmap] cuna[bbrev] delbm[arks] delc[ommand] delm[arks] delmac[ros] + \ delqm[arks] dels[tyle] dia[log] dl do[autocmd] doautoa[ll] downl[oads] e[dit] ec[ho] echoe[rr] echom[sg] em[enu] exe[cute] + \ exu[sage] files fini[sh] fo[rward] fw h[elp] ha[rdcopy] hi[ghlight] hist[ory] hs ia[bbrev] iabc[lear] im[ap] imapc[lear] + \ ino[remap] iu[nmap] iuna[bbrev] javas[cript] js ju[mps] let loadplugins lpl ls ma[rk] macros map mapc[lear] marks mes[sages] \ mkv[imperatorrc] no[remap] noh[lsearch] norm[al] o[pen] optionu[sage] pa[geinfo] pagest[yle] pc[lose] pl[ay] pref[erences] - \ prefs pw[d] q[uit] qa[ll] qma[rk] qmarks quita[ll] re[draw] re[load] reloada[ll] res[tart] run runt[ime] sty[le] sav[eas] - \ sb[ar] sb[open] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] so[urce] st[op] tN[ext] t[open] tab - \ tabde[tach] tabd[uplicate] tabN[ext] tabc[lose] tabe[dit] tabfir[st] tabl[ast] tabm[ove] tabn[ext] tabnew tabo[nly] tabopen + \ prefs pw[d] q[uit] qa[ll] qma[rk] qmarks quita[ll] re[draw] re[load] reloada[ll] res[tart] run runt[ime] sav[eas] sb[ar] + \ sb[open] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] so[urce] st[op] sty[le] tN[ext] t[open] tab + \ tabN[ext] tabc[lose] tabd[uplicate] tabde[tach] tabe[dit] tabfir[st] tabl[ast] tabm[ove] tabn[ext] tabnew tabo[nly] tabopen \ tabp[revious] tabr[ewind] tabs time tn[ext] tp[revious] u[ndo] una[bbreviate] undoa[ll] unl[et] unm[ap] ve[rsion] - \ vie[wsource] viu[sage] w[rite] wc[lose] win[open] winc[lose] wine[dit] wo[pen] wqa[ll] wq xa[ll] zo[om] - \ contained + \ vie[wsource] viu[sage] w[rite] wc[lose] win[open] winc[lose] wine[dit] wo[pen] wq wqa[ll] xa[ll] zo[om] + \ contained syn match vimperatorCommand "!" contained @@ -51,11 +45,11 @@ syn match vimperatorAutoEventList "\(\a\+,\)*\a\+" contained contains=vimperator syn region vimperatorSet matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\<\%(setl\%[ocal]\|setg\%[lobal]\|set\=\)\=\>" \ end="$" keepend oneline contains=vimperatorOption,vimperatorString -syn keyword vimperatorOption activate act alfc albc cdpath cd complete cpt defsearch ds editor extendedhinttags eht eventignore ei - \ followhints fh guioptions go helpfile hf hintmatching hm hs hinttags ht hinttimeout hto history hi laststatus ls lbc lfc - \ messages msgs newtab nextpattern pageinfo pa popups pps previewheight pvh previouspattern runtimepath rtp scroll scr shell - \ sh shellcmdflag shcf showstatuslinks ssli showtabline stal suggestengines titlestring urlseparator verbose vbs t_vb wildcase - \ wic wildignore wig wildmode wim wildoptions wop wordseparators wsp +syn keyword vimperatorOption activate act cdpath cd complete cpt defsearch ds editor eventignore ei extendedhinttags eht + \ followhints fh guioptions go helpfile hf hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls messages msgs + \ newtab nextpattern pageinfo pa popups pps previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf + \ showstatuslinks ssli showtabline stal suggestengines t_vb titlestring urlseparator verbose vbs wildcase wic wildignore wig + \ wildmode wim wildoptions wop wordseparators wsp \ contained nextgroup=vimperatorSetMod " toggle options @@ -72,12 +66,12 @@ syn match vimperatorSetMod "\%(\<[a-z_]\+\)\@<=&" contained syn region vimperatorJavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline syn region vimperatorJavaScript matchgroup=vimperatorJavascriptDelimiter - \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold + \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold let s:cssRegionStart = '\%(^\s*sty\%[le]!\=\s\+\%(-\%(n\|name\)\%(\s\+\|=\)\S\+\s\+\)\=[^-]\S\+\s\+\)\@<=' execute 'syn region vimperatorCss start="' . s:cssRegionStart . '" end="$" contains=@cssTop keepend oneline' execute 'syn region vimperatorCss matchgroup=vimperatorCssDelimiter' - \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' + \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' syn match vimperatorNotation "<[0-9A-Za-z-]\+>" @@ -91,15 +85,15 @@ syn match vimperatorLineComment +^\s*".*$+ contains=vimperatorTodo,@Spell " NOTE: match vim.vim highlighting group names hi def link vimperatorAutoCmd vimperatorCommand hi def link vimperatorAutoEvent Type -hi def link vimperatorCommand Statement -hi def link vimperatorComment Comment -hi def link vimperatorJavascriptDelimiter Delimiter -hi def link vimperatorCssDelimiter Delimiter -hi def link vimperatorNotation Special -hi def link vimperatorLineComment Comment -hi def link vimperatorOption PreProc +hi def link vimperatorCommand Statement +hi def link vimperatorComment Comment +hi def link vimperatorJavascriptDelimiter Delimiter +hi def link vimperatorCssDelimiter Delimiter +hi def link vimperatorNotation Special +hi def link vimperatorLineComment Comment +hi def link vimperatorOption PreProc hi def link vimperatorSetMod vimperatorOption -hi def link vimperatorString String +hi def link vimperatorString String hi def link vimperatorTodo Todo let b:current_syntax = "vimperator" From 612362149aa37b38ef77f8aceccf94f838deeb4c Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Thu, 22 Jan 2009 10:30:35 -0500 Subject: [PATCH 13/85] Fully-staged previous commit (f4e4ed50986d091461536536a6a085dfcbc91823). * The vimperator.vba was not included although muttator.vba was. * Adjusted Makefiles so that vim is called with "-" to open stdin (that was required on my Vim7.2 system; does it break others?) --- muttator/contrib/vim/Makefile | 2 +- vimperator/contrib/vim/Makefile | 2 +- vimperator/contrib/vim/vimperator.vba | 112 ++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 vimperator/contrib/vim/vimperator.vba diff --git a/muttator/contrib/vim/Makefile b/muttator/contrib/vim/Makefile index 76277174..44947915 100644 --- a/muttator/contrib/vim/Makefile +++ b/muttator/contrib/vim/Makefile @@ -1,7 +1,7 @@ VIMBALL = muttator.vba vimball: mkvimball.txt syntax/muttator.vim ftdetect/muttator.vim - echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt + echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt - all: vimball diff --git a/vimperator/contrib/vim/Makefile b/vimperator/contrib/vim/Makefile index 77df2fc3..c1128aa2 100644 --- a/vimperator/contrib/vim/Makefile +++ b/vimperator/contrib/vim/Makefile @@ -1,7 +1,7 @@ VIMBALL = vimperator.vba vimball: mkvimball.txt syntax/vimperator.vim ftdetect/vimperator.vim - echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt + echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt - all: vimball diff --git a/vimperator/contrib/vim/vimperator.vba b/vimperator/contrib/vim/vimperator.vba new file mode 100644 index 00000000..941e8a34 --- /dev/null +++ b/vimperator/contrib/vim/vimperator.vba @@ -0,0 +1,112 @@ +" Vimball Archiver by Charles E. Campbell, Jr., Ph.D. +UseVimball +finish +syntax/vimperator.vim [[[1 +104 +" Vim syntax file +" Language: VIMperator configuration file +" Maintainer: Doug Kearns +" Last Change: 2008 Jan 22 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn include @javascriptTop syntax/javascript.vim +unlet b:current_syntax + +syn include @cssTop syntax/css.vim +unlet b:current_syntax + +syn match vimperatorCommandStart "\%(^\s*:\=\)\@<=" nextgroup=vimperatorCommand,vimperatorAutoCmd + +syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] bN[ext] b[uffer] ba[ck] bd[elete] beep bf[irst] bl[ast] bma[rk] + \ bmarks bn[ext] bp[revious] br[ewind] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] + \ cno[remap] colo[rscheme] com[mand] comc[lear] cu[nmap] cuna[bbrev] delbm[arks] delc[ommand] delm[arks] delmac[ros] + \ delqm[arks] dels[tyle] dia[log] dl do[autocmd] doautoa[ll] downl[oads] e[dit] ec[ho] echoe[rr] echom[sg] em[enu] exe[cute] + \ exu[sage] files fini[sh] fo[rward] fw h[elp] ha[rdcopy] hi[ghlight] hist[ory] hs ia[bbrev] iabc[lear] im[ap] imapc[lear] + \ ino[remap] iu[nmap] iuna[bbrev] javas[cript] js ju[mps] let loadplugins lpl ls ma[rk] macros map mapc[lear] marks mes[sages] + \ mkv[imperatorrc] no[remap] noh[lsearch] norm[al] o[pen] optionu[sage] pa[geinfo] pagest[yle] pc[lose] pl[ay] pref[erences] + \ prefs pw[d] q[uit] qa[ll] qma[rk] qmarks quita[ll] re[draw] re[load] reloada[ll] res[tart] run runt[ime] sav[eas] sb[ar] + \ sb[open] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] so[urce] st[op] sty[le] tN[ext] t[open] tab + \ tabN[ext] tabc[lose] tabd[uplicate] tabde[tach] tabe[dit] tabfir[st] tabl[ast] tabm[ove] tabn[ext] tabnew tabo[nly] tabopen + \ tabp[revious] tabr[ewind] tabs time tn[ext] tp[revious] u[ndo] una[bbreviate] undoa[ll] unl[et] unm[ap] ve[rsion] + \ vie[wsource] viu[sage] w[rite] wc[lose] win[open] winc[lose] wine[dit] wo[pen] wq wqa[ll] xa[ll] zo[om] + \ contained + +syn match vimperatorCommand "!" contained + +syn keyword vimperatorAutoCmd au[tocmd] contained nextgroup=vimperatorAutoEventList skipwhite + +syn keyword vimperatorAutoEvent BookmarkAdd DOMLoad LocationChange PageLoadPre PageLoad ShellCmdPost VimperatorEnter + \ VimperatorLeavePre VimperatorLeave + \ contained + +syn match vimperatorAutoEventList "\(\a\+,\)*\a\+" contained contains=vimperatorAutoEvent + +syn region vimperatorSet matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\<\%(setl\%[ocal]\|setg\%[lobal]\|set\=\)\=\>" + \ end="$" keepend oneline contains=vimperatorOption,vimperatorString + +syn keyword vimperatorOption activate act cdpath cd complete cpt defsearch ds editor eventignore ei extendedhinttags eht + \ followhints fh guioptions go helpfile hf hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls messages msgs + \ newtab nextpattern pageinfo pa popups pps previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf + \ showstatuslinks ssli showtabline stal suggestengines t_vb titlestring urlseparator verbose vbs wildcase wic wildignore wig + \ wildmode wim wildoptions wop wordseparators wsp + \ contained nextgroup=vimperatorSetMod + +" toggle options +syn match vimperatorOption "\<\%(no\|inv\)\=\%(errorbells\|eb\|exrc\|ex\|focuscontent\|fc\|fullscreen\|fs\|ignorecase\|ic\)\>!\=" + \ contained nextgroup=vimperatorSetMod +syn match vimperatorOption "\<\%(no\|inv\)\=\%(incsearch\|is\|insertmode\|im\|hlsearch\|hls\|linksearch\|lks\)\>!\=" + \ contained nextgroup=vimperatorSetMod +syn match vimperatorOption "\<\%(no\|inv\)\=\%(loadplugins\|lpl\|more\|online\|preload\|showmode\|smd\|smartcase\|scs\)\>!\=" + \ contained nextgroup=vimperatorSetMod +syn match vimperatorOption "\<\%(no\|inv\)\=\%(online\|visualbell\|vb\|usermode\|um\)\>!\=" + \ contained nextgroup=vimperatorSetMod + +syn match vimperatorSetMod "\%(\<[a-z_]\+\)\@<=&" contained + +syn region vimperatorJavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline +syn region vimperatorJavaScript matchgroup=vimperatorJavascriptDelimiter + \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold + +let s:cssRegionStart = '\%(^\s*sty\%[le]!\=\s\+\%(-\%(n\|name\)\%(\s\+\|=\)\S\+\s\+\)\=[^-]\S\+\s\+\)\@<=' +execute 'syn region vimperatorCss start="' . s:cssRegionStart . '" end="$" contains=@cssTop keepend oneline' +execute 'syn region vimperatorCss matchgroup=vimperatorCssDelimiter' + \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' + +syn match vimperatorNotation "<[0-9A-Za-z-]\+>" + +syn match vimperatorComment +".*$+ contains=vimperatorTodo,@Spell +syn keyword vimperatorTodo FIXME NOTE TODO XXX contained + +syn region vimperatorString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline + +syn match vimperatorLineComment +^\s*".*$+ contains=vimperatorTodo,@Spell + +" NOTE: match vim.vim highlighting group names +hi def link vimperatorAutoCmd vimperatorCommand +hi def link vimperatorAutoEvent Type +hi def link vimperatorCommand Statement +hi def link vimperatorComment Comment +hi def link vimperatorJavascriptDelimiter Delimiter +hi def link vimperatorCssDelimiter Delimiter +hi def link vimperatorNotation Special +hi def link vimperatorLineComment Comment +hi def link vimperatorOption PreProc +hi def link vimperatorSetMod vimperatorOption +hi def link vimperatorString String +hi def link vimperatorTodo Todo + +let b:current_syntax = "vimperator" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: tw=130 et ts=4 sw=4: +ftdetect/vimperator.vim [[[1 +1 +au BufNewFile,BufRead *vimperatorrc*,*.vimp set filetype=vimperator From d4c62b485117fe296f58fcf4bb836bace95101ca Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Thu, 22 Jan 2009 10:43:22 -0500 Subject: [PATCH 14/85] Corrections to last commit. * The stdin - wasn't needed. However, an ||true is now used to prevent Makefile from erroring out (I'm sure there's a better way). * muttatorrc was spelled muttatororrc; fixed now. --- muttator/contrib/vim/Makefile | 2 +- muttator/contrib/vim/ftdetect/muttator.vim | 2 +- muttator/contrib/vim/muttator.vba | 5 ++--- vimperator/contrib/vim/Makefile | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/muttator/contrib/vim/Makefile b/muttator/contrib/vim/Makefile index 44947915..8e87fd36 100644 --- a/muttator/contrib/vim/Makefile +++ b/muttator/contrib/vim/Makefile @@ -1,7 +1,7 @@ VIMBALL = muttator.vba vimball: mkvimball.txt syntax/muttator.vim ftdetect/muttator.vim - echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt - + echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt || true all: vimball diff --git a/muttator/contrib/vim/ftdetect/muttator.vim b/muttator/contrib/vim/ftdetect/muttator.vim index 94963a26..391e6b6a 100644 --- a/muttator/contrib/vim/ftdetect/muttator.vim +++ b/muttator/contrib/vim/ftdetect/muttator.vim @@ -1,2 +1,2 @@ " TODO: what's the Muttator filename extension? -au BufNewFile,BufRead *muttatororrc*,*.muttator set filetype=muttator +au BufNewFile,BufRead *muttatorrc*,*.muttator set filetype=muttator diff --git a/muttator/contrib/vim/muttator.vba b/muttator/contrib/vim/muttator.vba index 3f97476b..1b62feb3 100644 --- a/muttator/contrib/vim/muttator.vba +++ b/muttator/contrib/vim/muttator.vba @@ -104,7 +104,6 @@ unlet s:cpo_save " vim: tw=130 et ts=4 sw=4: ftdetect/muttator.vim [[[1 -3 -" Muttator +2 " TODO: what's the Muttator filename extension? -au BufNewFile,BufRead *muttatororrc*,*.muttator set filetype=muttator +au BufNewFile,BufRead *muttatorrc*,*.muttator set filetype=muttator diff --git a/vimperator/contrib/vim/Makefile b/vimperator/contrib/vim/Makefile index c1128aa2..d95e6767 100644 --- a/vimperator/contrib/vim/Makefile +++ b/vimperator/contrib/vim/Makefile @@ -1,7 +1,7 @@ VIMBALL = vimperator.vba vimball: mkvimball.txt syntax/vimperator.vim ftdetect/vimperator.vim - echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt - + echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt || true all: vimball From 8c466abdcdf68d167e51c4dc4bd9db687a1125e6 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 23 Jan 2009 22:47:32 +1100 Subject: [PATCH 15/85] Remove the Vimballs as they're generated files. The muttator Vimball was committed unintentionally. --- muttator/contrib/vim/muttator.vba | 109 ------------------------- vimperator/contrib/vim/vimperator.vba | 112 -------------------------- 2 files changed, 221 deletions(-) delete mode 100644 muttator/contrib/vim/muttator.vba delete mode 100644 vimperator/contrib/vim/vimperator.vba diff --git a/muttator/contrib/vim/muttator.vba b/muttator/contrib/vim/muttator.vba deleted file mode 100644 index 1b62feb3..00000000 --- a/muttator/contrib/vim/muttator.vba +++ /dev/null @@ -1,109 +0,0 @@ -" Vimball Archiver by Charles E. Campbell, Jr., Ph.D. -UseVimball -finish -syntax/muttator.vim [[[1 -100 -" Vim syntax file -" Language: Muttator configuration file -" Maintainer: Doug Kearns -" Last Change: 2009 Jan 22 - -if exists("b:current_syntax") - finish -endif - -let s:cpo_save = &cpo -set cpo&vim - -syn include @javascriptTop syntax/javascript.vim -unlet b:current_syntax - -syn include @cssTop syntax/css.vim -unlet b:current_syntax - -syn match muttatorCommandStart "\%(^\s*:\=\)\@<=" nextgroup=muttatorCommand,muttatorAutoCmd - -syn keyword muttatorCommand ab[breviate] ab[clear] addo[ns] addr[essbook] bN[ext] bd[elete] beep bf[irst] bl[ast] bn[ext] - \ bp[revious] br[ewind] bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] cno[remap] colo[rscheme] - \ com[mand] comc[lear] con[tact] contacts copy[to] cu[nmap] cuna[bbrev] delc[ommand] delm[arks] delmac[ros] dels[tyle] - \ dia[log] do[autocmd] doautoa[ll] ec[ho] echoe[rr] echom[sg] em[enu] empty[trash] exe[cute] exu[sage] fini[sh] get[messages] - \ go[to] h[elp] ha[rdcopy] hi[ghlight] ia[bbrev] iabc[lear] im[ap] imapc[lear] ino[remap] iu[nmap] iuna[bbrev] javas[cript] js - \ let loadplugins lpl m[ail] ma[rk] macros map mapc[lear] marks mes[sages] mkm[uttatorrc] mm[ap] mmapc[lear] mu[nmap] - \ mno[remap] move[to] no[remap] norm[al] optionu[sage] pa[geinfo] pagest[yle] pc[lose] pl[ay] pref[erences] prefs pw[d] q[uit] - \ re[load] res[tart] run runt[ime] sav[eas] scrip[tnames] se[t] setg[lobal] setl[ocal] so[urce] st[op] sty[le] tN[ext] t[open] - \ tab tabN[ext] tabc[lose] tabfir[st] tabl[ast] tabn[ext] tabp[revious] tabr[ewind] time tn[ext] tp[revious] una[bbreviate] - \ unl[et] unm[ap] ve[rsion] vie[wsource] viu[sage] w[rite] zo[om] - \ contained - -syn match muttatorCommand "!" contained - -syn keyword muttatorAutoCmd au[tocmd] contained nextgroup=muttatorAutoEventList skipwhite - -syn keyword muttatorAutoEvent BookmarkAdd DOMLoad LocationChange PageLoadPre PageLoad ShellCmdPost muttatorEnter - \ muttatorLeavePre muttatorLeave - \ contained - -syn match muttatorAutoEventList "\(\a\+,\)*\a\+" contained contains=muttatorAutoEvent - -syn region muttatorSet matchgroup=muttatorCommand start="\%(^\s*:\=\)\@<=\<\%(setl\%[ocal]\|setg\%[lobal]\|set\=\)\=\>" - \ end="$" keepend oneline contains=muttatorOption,muttatorString - -syn keyword muttatorOption archivefolder cdpath cd complete cpt editor eventignore ei extendedhinttags eht followhints fh - \ guioptions go helpfile hf hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls layout messages msgs - \ nextpattern pageinfo pa previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf showstatuslinks ssli - \ showtabline stal suggestengines t_vb urlseparator verbose vbs wildcase wic wildignore wig wildmode wim wildoptions wop - \ wordseparators wsp - \ contained nextgroup=muttatorSetMod - -" toggle options -syn match muttatorOption "\<\%(no\|inv\)\=\%(autoexternal\|errorbells\|eb\|exrc\|ex\|focuscontent\|fc\|fullscreen\|fs\)\>!\=" - \ contained nextgroup=muttatorSetMod -syn match muttatorOption "\<\%(no\|inv\)\=\%(insertmode\|im\|loadplugins\|lpl\|more\|showmode\|smd\|visualbell\|vb\)\>!\=" - \ contained nextgroup=muttatorSetMod -syn match muttatorOption "\<\%(no\|inv\)\=\%(usermode\|um\)\>!\=" - \ contained nextgroup=muttatorSetMod - -syn match muttatorSetMod "\%(\<[a-z_]\+\)\@<=&" contained - -syn region muttatorJavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline -syn region muttatorJavaScript matchgroup=muttatorJavascriptDelimiter - \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold - -let s:cssRegionStart = '\%(^\s*sty\%[le]!\=\s\+\%(-\%(n\|name\)\%(\s\+\|=\)\S\+\s\+\)\=[^-]\S\+\s\+\)\@<=' -execute 'syn region muttatorCss start="' . s:cssRegionStart . '" end="$" contains=@cssTop keepend oneline' -execute 'syn region muttatorCss matchgroup=muttatorCssDelimiter' - \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' - -syn match muttatorNotation "<[0-9A-Za-z-]\+>" - -syn match muttatorComment +".*$+ contains=muttatorTodo,@Spell -syn keyword muttatorTodo FIXME NOTE TODO XXX contained - -syn region muttatorString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline - -syn match muttatorLineComment +^\s*".*$+ contains=muttatorTodo,@Spell - -" NOTE: match vim.vim highlighting group names -hi def link muttatorAutoCmd muttatorCommand -hi def link muttatorAutoEvent Type -hi def link muttatorCommand Statement -hi def link muttatorComment Comment -hi def link muttatorJavascriptDelimiter Delimiter -hi def link muttatorCssDelimiter Delimiter -hi def link muttatorNotation Special -hi def link muttatorLineComment Comment -hi def link muttatorOption PreProc -hi def link muttatorSetMod muttatorOption -hi def link muttatorString String -hi def link muttatorTodo Todo - -let b:current_syntax = "muttator" - -let &cpo = s:cpo_save -unlet s:cpo_save - -" vim: tw=130 et ts=4 sw=4: -ftdetect/muttator.vim [[[1 -2 -" TODO: what's the Muttator filename extension? -au BufNewFile,BufRead *muttatorrc*,*.muttator set filetype=muttator diff --git a/vimperator/contrib/vim/vimperator.vba b/vimperator/contrib/vim/vimperator.vba deleted file mode 100644 index 941e8a34..00000000 --- a/vimperator/contrib/vim/vimperator.vba +++ /dev/null @@ -1,112 +0,0 @@ -" Vimball Archiver by Charles E. Campbell, Jr., Ph.D. -UseVimball -finish -syntax/vimperator.vim [[[1 -104 -" Vim syntax file -" Language: VIMperator configuration file -" Maintainer: Doug Kearns -" Last Change: 2008 Jan 22 - -if exists("b:current_syntax") - finish -endif - -let s:cpo_save = &cpo -set cpo&vim - -syn include @javascriptTop syntax/javascript.vim -unlet b:current_syntax - -syn include @cssTop syntax/css.vim -unlet b:current_syntax - -syn match vimperatorCommandStart "\%(^\s*:\=\)\@<=" nextgroup=vimperatorCommand,vimperatorAutoCmd - -syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] bN[ext] b[uffer] ba[ck] bd[elete] beep bf[irst] bl[ast] bma[rk] - \ bmarks bn[ext] bp[revious] br[ewind] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cm[ap] cmapc[lear] - \ cno[remap] colo[rscheme] com[mand] comc[lear] cu[nmap] cuna[bbrev] delbm[arks] delc[ommand] delm[arks] delmac[ros] - \ delqm[arks] dels[tyle] dia[log] dl do[autocmd] doautoa[ll] downl[oads] e[dit] ec[ho] echoe[rr] echom[sg] em[enu] exe[cute] - \ exu[sage] files fini[sh] fo[rward] fw h[elp] ha[rdcopy] hi[ghlight] hist[ory] hs ia[bbrev] iabc[lear] im[ap] imapc[lear] - \ ino[remap] iu[nmap] iuna[bbrev] javas[cript] js ju[mps] let loadplugins lpl ls ma[rk] macros map mapc[lear] marks mes[sages] - \ mkv[imperatorrc] no[remap] noh[lsearch] norm[al] o[pen] optionu[sage] pa[geinfo] pagest[yle] pc[lose] pl[ay] pref[erences] - \ prefs pw[d] q[uit] qa[ll] qma[rk] qmarks quita[ll] re[draw] re[load] reloada[ll] res[tart] run runt[ime] sav[eas] sb[ar] - \ sb[open] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] so[urce] st[op] sty[le] tN[ext] t[open] tab - \ tabN[ext] tabc[lose] tabd[uplicate] tabde[tach] tabe[dit] tabfir[st] tabl[ast] tabm[ove] tabn[ext] tabnew tabo[nly] tabopen - \ tabp[revious] tabr[ewind] tabs time tn[ext] tp[revious] u[ndo] una[bbreviate] undoa[ll] unl[et] unm[ap] ve[rsion] - \ vie[wsource] viu[sage] w[rite] wc[lose] win[open] winc[lose] wine[dit] wo[pen] wq wqa[ll] xa[ll] zo[om] - \ contained - -syn match vimperatorCommand "!" contained - -syn keyword vimperatorAutoCmd au[tocmd] contained nextgroup=vimperatorAutoEventList skipwhite - -syn keyword vimperatorAutoEvent BookmarkAdd DOMLoad LocationChange PageLoadPre PageLoad ShellCmdPost VimperatorEnter - \ VimperatorLeavePre VimperatorLeave - \ contained - -syn match vimperatorAutoEventList "\(\a\+,\)*\a\+" contained contains=vimperatorAutoEvent - -syn region vimperatorSet matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\<\%(setl\%[ocal]\|setg\%[lobal]\|set\=\)\=\>" - \ end="$" keepend oneline contains=vimperatorOption,vimperatorString - -syn keyword vimperatorOption activate act cdpath cd complete cpt defsearch ds editor eventignore ei extendedhinttags eht - \ followhints fh guioptions go helpfile hf hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls messages msgs - \ newtab nextpattern pageinfo pa popups pps previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf - \ showstatuslinks ssli showtabline stal suggestengines t_vb titlestring urlseparator verbose vbs wildcase wic wildignore wig - \ wildmode wim wildoptions wop wordseparators wsp - \ contained nextgroup=vimperatorSetMod - -" toggle options -syn match vimperatorOption "\<\%(no\|inv\)\=\%(errorbells\|eb\|exrc\|ex\|focuscontent\|fc\|fullscreen\|fs\|ignorecase\|ic\)\>!\=" - \ contained nextgroup=vimperatorSetMod -syn match vimperatorOption "\<\%(no\|inv\)\=\%(incsearch\|is\|insertmode\|im\|hlsearch\|hls\|linksearch\|lks\)\>!\=" - \ contained nextgroup=vimperatorSetMod -syn match vimperatorOption "\<\%(no\|inv\)\=\%(loadplugins\|lpl\|more\|online\|preload\|showmode\|smd\|smartcase\|scs\)\>!\=" - \ contained nextgroup=vimperatorSetMod -syn match vimperatorOption "\<\%(no\|inv\)\=\%(online\|visualbell\|vb\|usermode\|um\)\>!\=" - \ contained nextgroup=vimperatorSetMod - -syn match vimperatorSetMod "\%(\<[a-z_]\+\)\@<=&" contained - -syn region vimperatorJavaScript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end="$" contains=@javascriptTop keepend oneline -syn region vimperatorJavaScript matchgroup=vimperatorJavascriptDelimiter - \ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold - -let s:cssRegionStart = '\%(^\s*sty\%[le]!\=\s\+\%(-\%(n\|name\)\%(\s\+\|=\)\S\+\s\+\)\=[^-]\S\+\s\+\)\@<=' -execute 'syn region vimperatorCss start="' . s:cssRegionStart . '" end="$" contains=@cssTop keepend oneline' -execute 'syn region vimperatorCss matchgroup=vimperatorCssDelimiter' - \ 'start="' . s:cssRegionStart . '<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@cssTop fold' - -syn match vimperatorNotation "<[0-9A-Za-z-]\+>" - -syn match vimperatorComment +".*$+ contains=vimperatorTodo,@Spell -syn keyword vimperatorTodo FIXME NOTE TODO XXX contained - -syn region vimperatorString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline - -syn match vimperatorLineComment +^\s*".*$+ contains=vimperatorTodo,@Spell - -" NOTE: match vim.vim highlighting group names -hi def link vimperatorAutoCmd vimperatorCommand -hi def link vimperatorAutoEvent Type -hi def link vimperatorCommand Statement -hi def link vimperatorComment Comment -hi def link vimperatorJavascriptDelimiter Delimiter -hi def link vimperatorCssDelimiter Delimiter -hi def link vimperatorNotation Special -hi def link vimperatorLineComment Comment -hi def link vimperatorOption PreProc -hi def link vimperatorSetMod vimperatorOption -hi def link vimperatorString String -hi def link vimperatorTodo Todo - -let b:current_syntax = "vimperator" - -let &cpo = s:cpo_save -unlet s:cpo_save - -" vim: tw=130 et ts=4 sw=4: -ftdetect/vimperator.vim [[[1 -1 -au BufNewFile,BufRead *vimperatorrc*,*.vimp set filetype=vimperator From 4884f5defcb756e1d9bfaee16661cfddc56eddfa Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Fri, 23 Jan 2009 10:05:14 -0500 Subject: [PATCH 16/85] Fixes , , , , and on Mac OS/X. On Mac OS/X, control characters 27 through 31 pass charCode=CONTROL_CHAR rather than charCode=KEY. For example, when a user wants Vimperator sees . Most people view this as a bug in FirefOS/X. The following patch tests for has("MacUnix"), then checks to see if the control character is within this buggy range. If so, it shifts the charCode up by 64 (there is a special case for Escape where the CTRL key is relaxed and key is set to "Esc"). For more information, see: [*] Vimp FAQ: http://vimperator.org/trac/wiki/Vimperator/FAQ#WhydoesntC-workforEscMacOSX [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/vimperator/2008-May/001548.html [*] Mozilla bug 416227: event.charCode in keypress handler has unexpected values on Mac for Ctrl with chars in "[ ] _ \" https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=416227 [*] Mozilla bug 432951: Ctrl+'foo' doesn't seem same charCode as Meta+'foo' on Cocoa https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=432951 --- common/content/events.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/common/content/events.js b/common/content/events.js index d50c76c5..4946fcdb 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1033,6 +1033,37 @@ function Events() //{{{ } } } + // [Ctrl-Bug] special handling of mysterious , , , , bugs (OS/X) + // (i.e., cntrl codes 27--31) + // --- + // For more information, see: + // [*] Vimp FAQ: http://vimperator.org/trac/wiki/Vimperator/FAQ#WhydoesntC-workforEscMacOSX + // [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/vimperator/2008-May/001548.html + // [*] Mozilla bug 416227: event.charCode in keypress handler has unexpected values on Mac for Ctrl with chars in "[ ] _ \" + // https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=416227 + // [*] Mozilla bug 432951: Ctrl+'foo' doesn't seem same charCode as Meta+'foo' on Cocoa + // https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=432951 + // --- + // + // The following fixes are only activated if liberator.has("MacUnix"). + // Technically, they prevent mappings from (and + // if your fancy keyboard permits such things), but + // these mappings are probably pathological ( + // certainly is on Windows), and so it is probably + // harmless to remove the has("MacUnix") if desired. + // + else if (liberator.has("MacUnix") && event.ctrlKey) + { + // [Ctrl-Bug 1/5] the bug + if(event.charCode == 27) + { + key = "Esc"; + modifier = modifier.replace('C-',''); + } + // [Ctrl-Bug 2,3,4,5/5] the , , , bugs + else if (event.charCode >= 28 && event.charCode <= 31) + key = String.fromCharCode(event.charCode + 64); + } // special handling of the Space key else if (event.charCode == 32) { From ac603ad68734934dcd8c2efdb6bc15a2dc925a00 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Fri, 23 Jan 2009 10:47:26 -0500 Subject: [PATCH 17/85] Small fix to last commit. Prevents gobbling all on Mac. --- common/content/events.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index 4946fcdb..a8f8396e 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1052,7 +1052,7 @@ function Events() //{{{ // certainly is on Windows), and so it is probably // harmless to remove the has("MacUnix") if desired. // - else if (liberator.has("MacUnix") && event.ctrlKey) + else if (liberator.has("MacUnix") && event.ctrlKey && event.charCode >= 27 && event.charCode <= 31) { // [Ctrl-Bug 1/5] the bug if(event.charCode == 27) @@ -1061,7 +1061,7 @@ function Events() //{{{ modifier = modifier.replace('C-',''); } // [Ctrl-Bug 2,3,4,5/5] the , , , bugs - else if (event.charCode >= 28 && event.charCode <= 31) + else key = String.fromCharCode(event.charCode + 64); } // special handling of the Space key From 9cb000545ed80154d60290fd240cc23198c833cb Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Fri, 23 Jan 2009 15:28:53 -0500 Subject: [PATCH 18/85] Put |VIMP_INIT| back where it should be in starting.txt --- vimperator/locale/en-US/starting.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vimperator/locale/en-US/starting.txt b/vimperator/locale/en-US/starting.txt index befbb701..f9b30583 100644 --- a/vimperator/locale/en-US/starting.txt +++ b/vimperator/locale/en-US/starting.txt @@ -10,9 +10,9 @@ At startup, Vimperator completes the following tasks in order. 1. Vimperator can perform user initialization commands. When one of the following is successfully located, it is executed, and no further locations are tried. -|$VIMPERATOR_INIT| - a. _$VIMPERATOR_INIT_ -- May contain a single ex command (e.g., + a. |$VIMPERATOR_INIT| + _$VIMPERATOR_INIT_ -- May contain a single ex command (e.g., "[c]:source {file}[c]"). b. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its contents are executed. From d99720ce10b415ce3162290fa66fc2d38232ad82 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Fri, 23 Jan 2009 16:31:55 -0500 Subject: [PATCH 19/85] In delmarks, change let variable name to prevent namespace-related error (bug #126). See http://vimperator.org/trac/ticket/126 Using... function (args) { let args = args.string; ... was causing Firefox to complain that args was undefined. Changing the "let" to "var" or changing the names of the variables (e.g., changing "function (args)" to "function (arg)") fixes the problem. IMO, this appears to be a bug in Firefox. The short fix would be to change the formal argument from "args" to "arg." However, that would make delmarks' implementation different from all the rest. So changed "let args" to "let argstring" and adjusted throughout the function. --- common/content/buffer.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index c08ca04b..631aab8d 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1614,20 +1614,20 @@ function Marks() //{{{ function (args) { let special = args.bang; - let args = args.string; + let argstring = args.string; - if (!special && !args) + if (!special && !argstring) { liberator.echoerr("E471: Argument required"); return; } - if (special && args) + if (special && argstring) { liberator.echoerr("E474: Invalid argument"); return; } let matches; - if (matches = args.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/)) + if (matches = argstring.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/)) { // NOTE: this currently differs from Vim's behavior which // deletes any valid marks in the arg list, up to the first @@ -1636,7 +1636,7 @@ function Marks() //{{{ return; } // check for illegal ranges - only allow a-z A-Z 0-9 - if (matches = args.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g)) + if (matches = argstring.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g)) { for (let i = 0; i < matches.length; i++) { @@ -1647,13 +1647,13 @@ function Marks() //{{{ /[0-9]/.test(start) != /[0-9]/.test(end) || start > end) { - liberator.echoerr("E475: Invalid argument: " + args.match(matches[i] + ".*")[0]); + liberator.echoerr("E475: Invalid argument: " + argstring.match(matches[i] + ".*")[0]); return; } } } - marks.remove(args, special); + marks.remove(argstring, special); }, { bang: true, From 3a4da7852985d7371b372c9f8801c5ce52c7a0d8 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 24 Jan 2009 00:45:01 -0500 Subject: [PATCH 20/85] Revert "In delmarks, change let variable name to prevent namespace-related error (bug #126)." This reverts commit f6eb37e82c0419cdc62c1a781b64d30148024a58. --- common/content/buffer.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 631aab8d..c08ca04b 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1614,20 +1614,20 @@ function Marks() //{{{ function (args) { let special = args.bang; - let argstring = args.string; + let args = args.string; - if (!special && !argstring) + if (!special && !args) { liberator.echoerr("E471: Argument required"); return; } - if (special && argstring) + if (special && args) { liberator.echoerr("E474: Invalid argument"); return; } let matches; - if (matches = argstring.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/)) + if (matches = args.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/)) { // NOTE: this currently differs from Vim's behavior which // deletes any valid marks in the arg list, up to the first @@ -1636,7 +1636,7 @@ function Marks() //{{{ return; } // check for illegal ranges - only allow a-z A-Z 0-9 - if (matches = argstring.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g)) + if (matches = args.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g)) { for (let i = 0; i < matches.length; i++) { @@ -1647,13 +1647,13 @@ function Marks() //{{{ /[0-9]/.test(start) != /[0-9]/.test(end) || start > end) { - liberator.echoerr("E475: Invalid argument: " + argstring.match(matches[i] + ".*")[0]); + liberator.echoerr("E475: Invalid argument: " + args.match(matches[i] + ".*")[0]); return; } } } - marks.remove(argstring, special); + marks.remove(args, special); }, { bang: true, From 3487b8d0d9d4385c7c7f74e285e860818575ae14 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 24 Jan 2009 00:46:03 -0500 Subject: [PATCH 21/85] Last commit --- common/content/buffer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index c08ca04b..9b42b1aa 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1614,7 +1614,7 @@ function Marks() //{{{ function (args) { let special = args.bang; - let args = args.string; + args = args.string; if (!special && !args) { From dc0bf00e0a750e1e4a918871aa192e748c63c743 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 24 Jan 2009 00:47:54 -0500 Subject: [PATCH 22/85] Formatting --- common/content/events.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index a8f8396e..dc5b7b5d 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1054,15 +1054,15 @@ function Events() //{{{ // else if (liberator.has("MacUnix") && event.ctrlKey && event.charCode >= 27 && event.charCode <= 31) { - // [Ctrl-Bug 1/5] the bug - if(event.charCode == 27) + if(event.charCode == 27) // [Ctrl-Bug 1/5] the bug { key = "Esc"; - modifier = modifier.replace('C-',''); + modifier = modifier.replace("C-", ""); } - // [Ctrl-Bug 2,3,4,5/5] the , , , bugs - else + else // [Ctrl-Bug 2,3,4,5/5] the , , , bugs + { key = String.fromCharCode(event.charCode + 64); + } } // special handling of the Space key else if (event.charCode == 32) From 86d1d34a6445958c51642bed6223016fcf2c078e Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 24 Jan 2009 01:12:53 -0500 Subject: [PATCH 23/85] Makefile --- muttator/contrib/vim/Makefile | 2 +- vimperator/contrib/vim/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/muttator/contrib/vim/Makefile b/muttator/contrib/vim/Makefile index 8e87fd36..b1156448 100644 --- a/muttator/contrib/vim/Makefile +++ b/muttator/contrib/vim/Makefile @@ -1,7 +1,7 @@ VIMBALL = muttator.vba vimball: mkvimball.txt syntax/muttator.vim ftdetect/muttator.vim - echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt || true + -echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt all: vimball diff --git a/vimperator/contrib/vim/Makefile b/vimperator/contrib/vim/Makefile index d95e6767..e2f716f5 100644 --- a/vimperator/contrib/vim/Makefile +++ b/vimperator/contrib/vim/Makefile @@ -1,7 +1,7 @@ VIMBALL = vimperator.vba vimball: mkvimball.txt syntax/vimperator.vim ftdetect/vimperator.vim - echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt || true + -echo '%MkVimball! ${VIMBALL} .' | vim -u NORC -N -e -s mkvimball.txt all: vimball From a29e5246d10501a1a35e960a38d2168efcb23ad1 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 24 Jan 2009 01:13:23 -0500 Subject: [PATCH 24/85] Fix gF for URIs with fragment identifiers --- common/content/buffer.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 9b42b1aa..2e0386a4 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -866,9 +866,16 @@ function Buffer() //{{{ /** * @property {string} The current top-level document's URL. */ - get URL() + get URL() window.content.location.href, + + /** + * @property {string} The current top-level document's URL, sans any + * fragment identifier. + */ + get URI() { - return window.content.document.location.href; + let loc = window.content.location; + return loc.href.substr(0, loc.href.length - loc.hash.length); }, /** @@ -1450,7 +1457,7 @@ function Buffer() //{{{ */ viewSource: function (url, useExternalEditor) { - url = url || buffer.URL; + url = url || buffer.URI; if (useExternalEditor) editor.editFileExternally(url); From 70022ff0af3e9ad429dace5f2ae181147477a5fc Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 28 Jan 2009 09:15:26 -0500 Subject: [PATCH 25/85] Stricter number option parsing (and comment out some dump statements) --- common/content/events.js | 10 +++++----- common/content/hints.js | 2 -- common/content/liberator.js | 1 - common/content/options.js | 4 ++-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/common/content/events.js b/common/content/events.js index dc5b7b5d..a8d6290c 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1120,7 +1120,7 @@ function Events() //{{{ waitForPageLoad: function () { - liberator.dump("start waiting in loaded state: " + buffer.loaded); + //liberator.dump("start waiting in loaded state: " + buffer.loaded); liberator.threadYield(true); // clear queue if (buffer.loaded == 1) @@ -1133,8 +1133,8 @@ function Events() //{{{ while (now = Date.now(), now < end) { liberator.threadYield(); - if ((now - start) % 1000 < 10) - liberator.dump("waited: " + (now - start) + " ms"); + //if ((now - start) % 1000 < 10) + // liberator.dump("waited: " + (now - start) + " ms"); if (!events.feedingKeys) return false; @@ -1153,7 +1153,7 @@ function Events() //{{{ let ret = (buffer.loaded == 1); if (!ret) liberator.echoerr("Page did not load completely in " + maxWaitTime + " seconds. Macro stopped."); - liberator.dump("done waiting: " + ret); + //liberator.dump("done waiting: " + ret); // sometimes the input widget had focus when replaying a macro // maybe this call should be moved somewhere else? @@ -1217,7 +1217,7 @@ function Events() //{{{ { if (config.isComposeWindow) { - liberator.dump("Compose editor got focus"); + //liberator.dump("Compose editor got focus"); modes.set(modes.INSERT, modes.TEXTAREA); } else if (liberator.mode != modes.MESSAGE) diff --git a/common/content/hints.js b/common/content/hints.js index b68f821c..12f0ac57 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -510,8 +510,6 @@ function Hints() //{{{ return function (linkText) { - liberator.dump(hintStrings); - if (hintStrings.length == 1 && hintStrings[0].length == 0) return true; diff --git a/common/content/liberator.js b/common/content/liberator.js index 87fcbd96..2e3e1d7c 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -1417,7 +1417,6 @@ window.liberator = liberator; // FIXME: Ugly, etc. window.addEventListener("liberatorHelpLink", function (event) { let elem = event.target; - liberator.dump(String(elem)); if (/^(option|mapping|command)$/.test(elem.className)) var tag = elem.textContent.replace(/\s.*/, ""); if (elem.className == "command") diff --git a/common/content/options.js b/common/content/options.js index 54b3bb8d..7b5b3592 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -203,9 +203,9 @@ Option.prototype = { break; case "number": - let value = parseInt(values); // deduce radix + let value = Number(values); // deduce radix - if (isNaN(value)) + if (isNaN(value) || value != parseInt(value)) return "E521: Number required"; switch (operator) From aa67f0a1949dc0e8f9b2c4c9cb488f6a267a0145 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 29 Jan 2009 12:56:51 +1100 Subject: [PATCH 26/85] Add TODO regarding Windows paths in messages. --- vimperator/TODO | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vimperator/TODO b/vimperator/TODO index 7ee8644c..9379beaf 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -29,10 +29,12 @@ BUGS: => it often overwrites the open command line while editing etc. - and autocmd 'keywords' are not available when adding a bookmark - they're being set after the observer triggers the autocmd event. -- MOW is broken for multiple commands when open E.g. :ls | ls +- MOW rendering is broken for multiple commands when open E.g. :ls | ls - completion height is broken, try :a...., when it wraps it's totally off. and even if it is not totally off, i had it jump by one pixel when wrapping around. If that's unfixable, i propose reverting the new completion height stuff. +- Windows paths have escaped backslashes in messages - presumably due to + String#quote change. FEATURES: 9 finish :help TODOs From 6d49a81d7f6dd062bc73137a226c3779357c1606 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 29 Jan 2009 13:09:36 +1100 Subject: [PATCH 27/85] Add TODO regarding :messages performance. --- vimperator/TODO | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimperator/TODO b/vimperator/TODO index 9379beaf..725fe02d 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -35,6 +35,8 @@ BUGS: If that's unfixable, i propose reverting the new completion height stuff. - Windows paths have escaped backslashes in messages - presumably due to String#quote change. +- :messages is _very_ slow for message history of several thousand lines -> + Unresponsive Script: util.js:79 (sometimes xmlToDom() and elsewhere) FEATURES: 9 finish :help TODOs From c1c6c659bc9e5a71c28afc8773ee7353b0260a8d Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 28 Jan 2009 22:06:26 -0500 Subject: [PATCH 28/85] TODO bugs: ":pageinfo" on ":help"; "g<" and "g" (*) Fix ":pageinfo" on ":help", (*) Prevent Vimp from taking "" mappings as literal characters --- vimperator/TODO | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vimperator/TODO b/vimperator/TODO index 725fe02d..e1937716 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -18,6 +18,12 @@ BUGS: - :sidebar improvements (:sidebar! Downloads while downloads is open should refocus the sidebar) - ;s saves the page rather than the image - http://cgiirc.blitzed.org?chan=%23debug is unusable after login in +- :pageinfo should at least fail gracefully on :help pages (now it throws + Error: Permission denied to call method XULControllers.getControllerForCommand) +- "g<" fails without a trailing escape because both "g<" and "g" + are mapped. Vimp should recognize "" as an atom that should not + be matched literally. In fact, typing "g" out literally is + equivalent to typing "g" and then . (recent CVS regressions): - :set noflashblock seems broken (= :set fb? afterwards says "fb"), let's see if that's a @@ -73,7 +79,7 @@ FEATURES: google to another page and click 10 links there, [d would take me back to the google page opera's fast forward does something like this 7 make an option to disable session saving by default when you close Firefox -7 The output of the pageinfo-command sould contain the security-information of ssl-encrypted sites +7 The output of the pageinfo-command should contain the security-information of ssl-encrypted sites 7 Add :every command 6 support private mode (and :set [no]private): http://ehsanakhgari.org/blog/2008-11-08/prepare-your-add-private-browsing 6 add [count] support to :b* and :tab* commands where missing From 379e44a69bc42a04a1a3a2690c336656194c3816 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 30 Jan 2009 14:59:14 -0500 Subject: [PATCH 29/85] Sort buffer completions numerically. --- common/content/completion.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/common/content/completion.js b/common/content/completion.js index 0f692b64..71c2ad7c 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -220,6 +220,12 @@ function CompletionContext(editor, name, offset) //{{{ : item.item[key]; } +CompletionContext.Sort = { + number: function (a, b) parseInt(b) - parseInt(a) || String.localeCompare(a, b), + + unsorted: null +}; + CompletionContext.prototype = { // Temporary /** @@ -1381,6 +1387,7 @@ function Completion() //{{{ context.anchored = false; context.title = ["Buffer", "URL"]; context.keys = { text: "text", description: "url", icon: "icon" }; + context.compare = CompletionContext.Sort.number; let process = context.process[0]; context.process = [function (item, text) <> @@ -1560,7 +1567,7 @@ function Completion() //{{{ { context.format = history.format; context.title = ["History"] - context.compare = null; + context.compare = CompletionContext.Sort.unsorted; //context.background = true; if (context.maxItems == null) context.maxItems = 100; @@ -1584,7 +1591,7 @@ function Completion() //{{{ context.hasItems = context.completions.length > 0; // XXX context.filterFunc = null; context.cancel = function () services.get("autoCompleteSearch").stopSearch(); - context.compare = null; + context.compare = CompletionContext.Sort.unsorted; let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ @@ -1716,7 +1723,7 @@ function Completion() //{{{ context.format = history.format; context.title = [keyword + " Quick Search"]; // context.background = true; - context.compare = null; + context.compare = CompletionContext.Sort.unsorted; context.generate = function () { let [begin, end] = item.url.split("%s"); @@ -1751,7 +1758,7 @@ function Completion() //{{{ let ctxt = context.fork(name, 0); ctxt.title = [engine.description + " Suggestions"]; - ctxt.compare = null; + ctxt.compare = CompletionContext.Sort.unsorted; ctxt.incomplete = true; bookmarks.getSuggestions(name, ctxt.filter, function (compl) { ctxt.incomplete = false; From ce0e5c1879a5a29d150315ef76505f586740baa5 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sat, 31 Jan 2009 11:37:14 +0100 Subject: [PATCH 30/85] Updated Donors --- vimperator/Donors | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vimperator/Donors b/vimperator/Donors index ec93f6f7..9a96542d 100644 --- a/vimperator/Donors +++ b/vimperator/Donors @@ -2,6 +2,11 @@ Contiuous donations: * Daniel Bainton (web hosting) 2009: +* David C Foor +* Oliver Schaefer +* Paul Moss +* Yongji Zhang +* Brian Peiris * Peleg Michaeli ("Every hand revealed" from my amazon.de wishlist) * InspireFocus * Michael Fremont From 4de7cc8db8022ff0d06d226392fd0b6706091874 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sat, 31 Jan 2009 11:59:38 +0100 Subject: [PATCH 31/85] * Fixed strange completion height bug. One less blocker to 2.0beta1. * Doug: Might ui.js:701: elements[elements.length - 1].scrollIntoView(true); be the problem of your very slow MOW for multiple items? I just noticed that :echo liberator takes 0.25sec , but :echo liberator when the MOW already displas :echo window takes 0.47 sec --- common/content/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/content/ui.js b/common/content/ui.js index 622fb6ac..a9705489 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1758,7 +1758,7 @@ function ItemList(id) //{{{ , divNodes); doc.body.replaceChild(div, doc.body.firstChild); - div.scrollIntoView(true); + //div.scrollIntoView(true); items.contextList.forEach(function init_eachContext(context) { delete context.cache.nodes; @@ -1941,7 +1941,7 @@ function ItemList(id) //{{{ if (index >= 0) { getCompletion(index).setAttribute("selected", "true"); - getCompletion(index).scrollIntoView(false); + //getCompletion(index).scrollIntoView(false); } //if (index == 0) From 894a4c52a0cace82b75c8d966cb5eaf7597a5275 Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Sun, 1 Feb 2009 21:00:24 +0200 Subject: [PATCH 32/85] Add a TODO entry for accessing NEWS --- vimperator/TODO | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimperator/TODO b/vimperator/TODO index e1937716..c5c5e383 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -50,6 +50,8 @@ FEATURES: 9 adaptive timeout for auto-completions, :set completions can be updated more often than :open foo 9 use the storage module for autocommands +9 the NEWS file should be more easily available for users, via :help news or something + at the moment you need to unzip the xpi or check the sources to view it, which isn't user friendly 8 support 'activate' in buffer.followLink? Leave this to the bookmarks.tabs.loadInBackground. Hint activation should be nearly equivalent to the corresponding mouse motion, and that From f3971d13b51dfe977b35dd1c9b95c5b5bf8664fb Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sun, 1 Feb 2009 23:40:28 +0100 Subject: [PATCH 33/85] Fix resetting completions (hopefully) --- common/content/ui.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/content/ui.js b/common/content/ui.js index a9705489..c5493831 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1274,7 +1274,8 @@ function CommandLine() //{{{ } else if (event.type == "input") { - //this.resetCompletions(); -> already handled by "keypress" below (hopefully), so don't do it twice + liberator.dump("input: " + command); + this.resetCompletions(); // -> already handled by "keypress" below (hopefully), so don't do it twice liberator.triggerCallback("change", currentExtendedMode, command); } else if (event.type == "keypress") @@ -1322,7 +1323,7 @@ function CommandLine() //{{{ else if (key == "") { // reset the tab completion - this.resetCompletions(); + //this.resetCompletions(); // and blur the command line if there is no text left if (command.length == 0) @@ -1333,7 +1334,7 @@ function CommandLine() //{{{ } else // any other key { - this.resetCompletions(); + //this.resetCompletions(); } return true; // allow this event to be handled by Firefox } From c125a9dd66470e419f8d83ac295e45b390dea574 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Mon, 2 Feb 2009 00:18:04 +0100 Subject: [PATCH 34/85] updated TODO (:ha! seems broken) --- common/content/ui.js | 4 ++-- vimperator/TODO | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/ui.js b/common/content/ui.js index c5493831..9e3112ca 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1274,8 +1274,8 @@ function CommandLine() //{{{ } else if (event.type == "input") { - liberator.dump("input: " + command); - this.resetCompletions(); // -> already handled by "keypress" below (hopefully), so don't do it twice + //liberator.dump("input: " + command); + this.resetCompletions(); liberator.triggerCallback("change", currentExtendedMode, command); } else if (event.type == "keypress") diff --git a/vimperator/TODO b/vimperator/TODO index c5c5e383..8cc67312 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -43,6 +43,7 @@ BUGS: String#quote change. - :messages is _very_ slow for message history of several thousand lines -> Unresponsive Script: util.js:79 (sometimes xmlToDom() and elsewhere) +- :hardcopy! seems to be broken for me FEATURES: 9 finish :help TODOs From 8398287449ca68718f0f7cf802b43fa15c5b74f0 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Mon, 2 Feb 2009 09:29:11 -0500 Subject: [PATCH 35/85] Removed :pageinfo TODO. Problem was in a plugin. --- vimperator/TODO | 2 -- 1 file changed, 2 deletions(-) diff --git a/vimperator/TODO b/vimperator/TODO index 8cc67312..f743c6e3 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -18,8 +18,6 @@ BUGS: - :sidebar improvements (:sidebar! Downloads while downloads is open should refocus the sidebar) - ;s saves the page rather than the image - http://cgiirc.blitzed.org?chan=%23debug is unusable after login in -- :pageinfo should at least fail gracefully on :help pages (now it throws - Error: Permission denied to call method XULControllers.getControllerForCommand) - "g<" fails without a trailing escape because both "g<" and "g" are mapped. Vimp should recognize "" as an atom that should not be matched literally. In fact, typing "g" out literally is From e7c57052fa63eefeec655c13d0f5c160b5597afc Mon Sep 17 00:00:00 2001 From: anekos Date: Tue, 3 Feb 2009 20:08:00 +0900 Subject: [PATCH 36/85] Fix: commands.parseArgs raises "Invalid option: .." Error. When command(:foo) has NOARG option(-bar), ":foo -bar" raises the error. --- common/content/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/commands.js b/common/content/commands.js index 170568b1..d6417a23 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -573,7 +573,7 @@ function Commands() //{{{ count++; // to compensate the "=" character } - else if (!/\s/.test(sep)) // this isn't really an option as it has trailing characters, parse it as an argument + else if (!/\s/.test(sep) && sep != undefined) // this isn't really an option as it has trailing characters, parse it as an argument { invalid = true; } From 125f3057e96bfec72dda7e30ba968510cbe1583d Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Tue, 3 Feb 2009 22:32:40 +0100 Subject: [PATCH 37/85] fixed hintmatching with wordstartswith, thanks Daniel --- common/content/hints.js | 92 +++++++++++++---------------------------- 1 file changed, 28 insertions(+), 64 deletions(-) diff --git a/common/content/hints.js b/common/content/hints.js index 12f0ac57..50c4533a 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -399,87 +399,51 @@ function Hints() //{{{ let wordSplitRegex = RegExp(options["wordseparators"]); // What the **** does this do? --Kris + // + // This function matches hintStrings like 'hekho' to links like 'Hey Kris, how are you?' -> [HE]y [K]ris [HO]w are you --Daniel function charsAtBeginningOfWords(chars, words, allowWordOverleaping) { - let charIdx = 0; - let numMatchedWords = 0; - for (let [,word] in Iterator(words)) + function charMatches(charIdx, chars, wordIdx, words, inWordIdx, allowWordOverleaping) { - if (word.length == 0) - continue; - - let wcIdx = 0; - // Check if the current word matches same characters as the previous word. - // Each already matched word has matched at least one character. - if (charIdx > numMatchedWords) + let matches = (chars[charIdx] == words[wordIdx][inWordIdx]); + if ((matches == false && allowWordOverleaping) || words[wordIdx].length == 0) { - let matchingStarted = false; - for (let i in util.range(numMatchedWords, charIdx)) - { - if (chars[i] == word[wcIdx]) - { - matchingStarted = true; - wcIdx++; - } - else if (matchingStarted) - { - wcIdx = 0; - break; - } - } + let nextWordIdx = wordIdx + 1; + if (nextWordIdx == words.length) + return false; + + return charMatches(charIdx, chars, nextWordIdx, words, 0, allowWordOverleaping); } - // the current word matches same characters as the previous word - let prevCharIdx; - if (wcIdx > 0) + if (matches) { - prevCharIdx = charIdx; - // now check if it matches additional characters - for (; wcIdx < word.length && charIdx < chars.length; wcIdx++, charIdx++) - { - if (word[wcIdx] != chars[charIdx]) - break; - } + let nextCharIdx = charIdx + 1; + if (nextCharIdx == chars.length) + return true; - // the word doesn't match additional characters, now check if the - // already matched characters are equal to the next characters for matching, - // if yes, then consume them - if (prevCharIdx == charIdx) - { - for (let i = 0; i < wcIdx && charIdx < chars.length; i++, charIdx++) - { - if (word[i] != chars[charIdx]) - break; - } - } + let nextWordIdx = wordIdx + 1; + let beyondLastWord = (nextWordIdx == words.length); + let charMatched = false; + if (beyondLastWord == false) + charMatched = charMatches(nextCharIdx, chars, nextWordIdx, words, 0, allowWordOverleaping) - numMatchedWords++; - } - // the current word doesn't match same characters as the previous word, just - // try to match the next characters - else - { - prevCharIdx = charIdx; - for (let i = 0; i < word.length && charIdx < chars.length; i++, charIdx++) - { - if (word[i] != chars[charIdx]) - break; - } + if (charMatched) + return true; - if (prevCharIdx == charIdx) + if (charMatched == false || beyondLastWord == true) { - if (!allowWordOverleaping) + let nextInWordIdx = inWordIdx + 1; + if (nextInWordIdx == words[wordIdx].length) return false; + + return charMatches(nextCharIdx, chars, wordIdx, words, nextInWordIdx, allowWordOverleaping); } - else - numMatchedWords++; } - if (charIdx == chars.length) - return true; + return false; } - return (charIdx == chars.length); + return charMatches(0, chars, 0, words, 0, allowWordOverleaping); } function stringsAtBeginningOfWords(strings, words, allowWordOverleaping) From 5f5c437ddf02d9420730aa15b3db853cc6a63fa1 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Wed, 4 Feb 2009 14:51:29 +0100 Subject: [PATCH 38/85] Fixed muttator for recent TBs, minimum requirements are 3.0b2pre now --- common/content/hints.js | 2 +- muttator/content/mail.js | 7 ++--- muttator/install.rdf | 56 ++++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/common/content/hints.js b/common/content/hints.js index 50c4533a..d349ce58 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -425,7 +425,7 @@ function Hints() //{{{ let beyondLastWord = (nextWordIdx == words.length); let charMatched = false; if (beyondLastWord == false) - charMatched = charMatches(nextCharIdx, chars, nextWordIdx, words, 0, allowWordOverleaping) + charMatched = charMatches(nextCharIdx, chars, nextWordIdx, words, 0, allowWordOverleaping) if (charMatched) return true; diff --git a/muttator/content/mail.js b/muttator/content/mail.js index 61242230..1e523167 100644 --- a/muttator/content/mail.js +++ b/muttator/content/mail.js @@ -995,12 +995,13 @@ function Mail() //{{{ // TODO: find out why, and solve the problem try { - var msgs = folder.getMessages(msgWindow); + var msgs = folder.messages; } catch (e) { - liberator.dump("ERROR: " + folder.prettyName + " failed to getMessages\n"); - continue; + var msgs = folder.getMessages(msgWindow); // for older thunderbirds + liberator.dump("WARNING: " + folder.prettyName + " failed to getMessages, trying old API"); + //continue; } while (msgs.hasMoreElements()) diff --git a/muttator/install.rdf b/muttator/install.rdf index e02650d2..3785bda0 100644 --- a/muttator/install.rdf +++ b/muttator/install.rdf @@ -1,28 +1,28 @@ - - - - - - muttator@mozdev.org - Muttator - ###VERSION### - Make Thunderbird behave like Vim - Martin Stubenschrott - http://vimperator.org/ - chrome://muttator/skin/icon.png - - - content/muttator/ - - - - - - {3550f703-e582-4d05-9a08-453d09bdfdc6} - 3.0a1pre - 3.0b2pre - - - - - + + + + + + muttator@mozdev.org + Muttator + ###VERSION### + Make Thunderbird behave like Vim + Martin Stubenschrott + http://vimperator.org/ + chrome://muttator/skin/icon.png + + + content/muttator/ + + + + + + {3550f703-e582-4d05-9a08-453d09bdfdc6} + 3.0b2pre + 3.0b2 + + + + + From 946ab07254a4e6839713eec8cd23fd9bd277ecca Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Wed, 4 Feb 2009 22:58:35 -0500 Subject: [PATCH 39/85] Updated main Makefile to support 'make target1 target2' --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e44d7b9c..c0c3842b 100644 --- a/Makefile +++ b/Makefile @@ -9,5 +9,6 @@ $(TARGETS:%=\%.%): echo MAKE $@ $(MAKE) -C $* $(@:$*.%=%) -$(TARGETS): %: $(DIRS:%=%.%) +$(TARGETS): + $(MAKE) $(DIRS:%=%.$@) From 688ea844cc763fff807aad785d3322f16bf9d014 Mon Sep 17 00:00:00 2001 From: janus_wel Date: Thu, 5 Feb 2009 18:05:56 +0900 Subject: [PATCH 40/85] Allow setting empty value to some stringlist options * eventignore * activate * newtab * suggestengines * wildoptions Signed-off-by: Kris Maglione --- common/content/completion.js | 3 ++- common/content/options.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/completion.js b/common/content/completion.js index 71c2ad7c..c7906969 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -1662,7 +1662,8 @@ function Completion() //{{{ completer = function () [["true", ""], ["false", ""]]; break; case "stringlist": - len = newValues.pop().length; + let target = newValues.pop(); + len = target ? target.length : 0; break; case "charlist": len = 0; diff --git a/common/content/options.js b/common/content/options.js index 7b5b3592..f997a697 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -80,7 +80,7 @@ Option.prototype = { parseValues: function (value) { if (this.type == "stringlist") - return value.split(","); + return (value === "") ? [] : value.split(","); if (this.type == "charlist") return Array.slice(value); return value; From d9f1dc460533a76771b45f3413b19c4970047a09 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 9 Feb 2009 17:42:25 +0900 Subject: [PATCH 41/85] Fix typo --- vimperator/locale/en-US/styling.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/locale/en-US/styling.txt b/vimperator/locale/en-US/styling.txt index 74b3e9ea..2577c65e 100644 --- a/vimperator/locale/en-US/styling.txt +++ b/vimperator/locale/en-US/styling.txt @@ -18,7 +18,7 @@ sourced. ________________________________________________________________________________ |:hi| |:highlight| + -||:hi[light] [-append] {group}[{selector}] [{css}]|| + +||:hi[ghlight] [-append] {group}[{selector}] [{css}]|| + ________________________________________________________________________________ Highlight {group} with {css}. Normally, {css} is checked for valid syntax before it's applied. Once you're certain it's From 0587cbe02945c44a0d974e103d24858a8cdf36fa Mon Sep 17 00:00:00 2001 From: janus_wel Date: Mon, 9 Feb 2009 16:45:16 +0900 Subject: [PATCH 42/85] Fix vanishing some descriptions of Quickmarks Signed-off-by: Ted Pavlic --- vimperator/locale/en-US/marks.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/vimperator/locale/en-US/marks.txt b/vimperator/locale/en-US/marks.txt index 80b3a34c..61ee2049 100644 --- a/vimperator/locale/en-US/marks.txt +++ b/vimperator/locale/en-US/marks.txt @@ -143,17 +143,17 @@ section:QuickMarks[quickmarks] ||go[a]\\{a-zA-Z0-9\\}[a]|| ________________________________________________________________________________ Jump to a QuickMark in the current tab. Open any QuickMark in the current tab. -You can mark any URLs with [m]M{a-zA-Z0-9}[m]. These QuickMarks are persistent -across browser sessions. +You can mark any URLs with [m]M[m][a]\\{a-zA-Z0-9\\}[a]. These QuickMarks are +persistent across browser sessions. ________________________________________________________________________________ |gn| + ||gn[a]\\{a-zA-Z0-9\\}[a]|| ________________________________________________________________________________ -Jump to a QuickMark in a new tab. Works like [m]go{a-zA-Z0-9}[m] but opens the -QuickMark in a new tab. Whether the new tab is activated or not depends on the -'activate' option. + +Jump to a QuickMark in a new tab. Works like [m]go[m][a]\\{a-zA-Z0-9\\}[a] but +opens the QuickMark in a new tab. Whether the new tab is activated or not +depends on the 'activate' option. + Mnemonic: Go in a new tab. [m]gt[m] would make more sense but is already taken. ________________________________________________________________________________ @@ -163,8 +163,9 @@ ________________________________________________________________________________ ||M[a]\\{a-zA-Z0-9\\}[a]|| ________________________________________________________________________________ Add new QuickMark for current URL. You can go to a marked URL in the current -tab with [m]go{a-zA-Z0-9}[m] or in a new tab with [m]gn{a-zA-Z0-9}[m]. These -QuickMarks are persistent across browser sessions. +tab with [m]go[m][a]\\{a-zA-Z0-9\\}[a] or in a new tab with +[m]gn[m][a]\\{a-zA-Z0-9\\}[a]. These QuickMarks are persistent across browser +sessions. ________________________________________________________________________________ From 057cbf8cbda95c73d7657c4fb06d7410cbddea92 Mon Sep 17 00:00:00 2001 From: janus_wel Date: Mon, 9 Feb 2009 16:45:17 +0900 Subject: [PATCH 43/85] Fix running over quotebox at the description of autocmd Signed-off-by: Ted Pavlic --- vimperator/locale/en-US/autocommands.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vimperator/locale/en-US/autocommands.txt b/vimperator/locale/en-US/autocommands.txt index ece39507..814099f8 100644 --- a/vimperator/locale/en-US/autocommands.txt +++ b/vimperator/locale/en-US/autocommands.txt @@ -6,8 +6,10 @@ Autocommands are a way to automatically execute code when certain events happen. |:au| |:autocmd| + -||:au[tocmd]|| Execute commands automatically on events. +||:au[tocmd]|| ________________________________________________________________________________ +Execute commands automatically on events. + [c]:au[tocmd][c] {event} {pat} {cmd} Add {cmd} to the list of commands Vimperator will execute on {event} for a URL matching {pat}: From bd69b43e897b7982a73e4e5fb18d917efeaf34e7 Mon Sep 17 00:00:00 2001 From: janus_wel Date: Mon, 9 Feb 2009 16:45:18 +0900 Subject: [PATCH 44/85] Add macro [c] to the appropriate descriptions of commands Signed-off-by: Ted Pavlic --- vimperator/locale/en-US/autocommands.txt | 2 +- vimperator/locale/en-US/index.txt | 14 +++++++------- vimperator/locale/en-US/options.txt | 18 +++++++++--------- vimperator/locale/en-US/print.txt | 3 ++- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/vimperator/locale/en-US/autocommands.txt b/vimperator/locale/en-US/autocommands.txt index 814099f8..cc5bddb3 100644 --- a/vimperator/locale/en-US/autocommands.txt +++ b/vimperator/locale/en-US/autocommands.txt @@ -30,7 +30,7 @@ Available {events}: *LocationChange* Triggered when changing tabs or when navigating to a new location *PageLoadPre* Triggered after a page load is initiated. *PageLoad* Triggered when a page gets (re)loaded/opened -*ShellCmdPost* Triggered after executing a shell command with :!cmd +*ShellCmdPost* Triggered after executing a shell command with [c]:![c]{cmd} *VimperatorEnter* Triggered after Firefox starts *VimperatorLeavePre* Triggered before exiting Firefox, just before destroying each module *VimperatorLeave* Triggered before exiting Firefox diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index 747e3f53..e09c549b 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -98,13 +98,13 @@ section:Normal{nbsp}mode[normal-index] ||g<|| Redisplay the last command output + ||g0|| Go to the first tab + ||g|| Print file information + -||gB|| Repeat last :buffer[!] command in reverse direction + +||gB|| Repeat last [c]:buffer[!][c] command in reverse direction + ||gF|| View source with an external editor + ||gH|| Open homepage in a new tab + ||gP|| Open (put) a URL based on the current clipboard contents in a new buffer + ||gT|| Go to previous tab + ||gU|| Go to the root of the website + -||gb|| Repeat last :buffer[!] command + +||gb|| Repeat last [c]:buffer[!][c] command + ||gf|| View source + ||gg|| Go to the top of the document + ||gh|| Open homepage + @@ -260,8 +260,8 @@ section:Ex{nbsp}commands[ex-cmd-index,:index] section:Options[option-index] ||'activate'|| Define when tabs are automatically activated + -||'cdpath'|| List of directories searched when executing :cd + -||'complete'|| Items which are completed at the :[tab]open prompt + +||'cdpath'|| List of directories searched when executing [c]:cd[c] + +||'complete'|| Items which are completed at the [c]:[tab]open prompt[c] + ||'defsearch'|| Set the default search engine + ||'editor'|| Set the external text editor + ||'errorbells'|| Ring the bell when an error message is displayed + @@ -289,14 +289,14 @@ section:Options[option-index] ||'newtab'|| Define which commands should output in a new tab by default + ||'nextpattern'|| Patterns to use when guessing the \'next' page in a document sequence + ||'online'|| Set the \'work offline' option + -||'pageinfo'|| Desired info on :pa[geinfo] + +||'pageinfo'|| Desired info on [c]:pa[geinfo][c] + ||'popups'|| Where to show requested popup windows + ||'preload'|| Speed up first time history/bookmark completion + ||'previouspattern'|| Patterns to use when guessing the \'previous' page in a document sequence + ||'runtimepath'|| List of directories searched for runtime files + ||'scroll'|| Number of lines to scroll with [m][m] and [m][m] commands + -||'shell'|| Shell to use for executing :! and :run commands + -||'shellcmdflag'|| Flag passed to shell when executing :! and :run commands + +||'shell'|| Shell to use for executing [c]:![c] and [c]:run[c] commands + +||'shellcmdflag'|| Flag passed to shell when executing [c]:![c] and [c]:run[c] commands + ||'showmode'|| Show the current mode in the command line + ||'showstatuslinks'|| Show the destination of the link under the cursor in the status bar + ||'showtabline'|| Control when to show the tab bar of opened web pages + diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index ddd38a3e..d6d7b96b 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -224,9 +224,9 @@ ____ |\'cd'| |\'cdpath'| ||'cdpath' 'cd'|| string (default: equivalent to _$CDPATH_ or ",,") ____ -List of directories searched when executing the :cd command. This is only used -for relative paths, if an absolute path is specified then the option is -ignored. +List of directories searched when executing the [c]:cd[c] command. This is +only used for relative paths, if an absolute path is specified then the option +is ignored. ____ @@ -635,14 +635,14 @@ ____ |\'shell'| |\'sh'| ||'shell' 'sh'|| string (default: _$SHELL_ or "sh", Win32: "cmd.exe") ____ -Shell to use for executing :! and :run commands. +Shell to use for executing [c]:![c] and [c]:run[c] commands. ____ |\'shellcmdflag'| |\'shcf'| ||'shellcmdflag' 'shcf'|| string (default: "-c", Win32: "/c") ____ -Flag passed to shell when executing :! and :run commands. +Flag passed to shell when executing [c]:![c] and [c]:run[c] commands. E.g. "bash -c gvim" ____ @@ -728,10 +728,10 @@ ____ ||'urlseparator'|| string (default: ",\s") ____ Set the separator regexp used to separate multiple URL args. Multiple -arguments can be specified for :open, and similar commands, using this regexp -as the separator. Using whitespace alone is not generally useful since it is -often contained in a single argument. E.g. [c]:open linus torvalds[c] should -perform a single search for the key words "linus" and "torvalds" +arguments can be specified for [c]:open[c], and similar commands, using this +regexp as the separator. Using whitespace alone is not generally useful since +it is often contained in a single argument. E.g. [c]:open linus torvalds[c] +should perform a single search for the key words "linus" and "torvalds" ____ diff --git a/vimperator/locale/en-US/print.txt b/vimperator/locale/en-US/print.txt index 0d14ee37..3254cf5b 100644 --- a/vimperator/locale/en-US/print.txt +++ b/vimperator/locale/en-US/print.txt @@ -20,7 +20,8 @@ ________________________________________________________________________________ section:Firefox{nbsp}printing{nbsp}dialogs[firefox-print-dialogs] -The "Print Preview" and "Page Setup" dialogs can be opened via the :dialog command +The "Print Preview" and "Page Setup" dialogs can be opened via the [c]:dialog[c] +command :dialog printpreview From 00078c14a91128bb8502eb3c923a360ec2632af8 Mon Sep 17 00:00:00 2001 From: janus_wel Date: Mon, 9 Feb 2009 16:45:19 +0900 Subject: [PATCH 45/85] Remove macro [m] from non key sequence Signed-off-by: Ted Pavlic --- vimperator/locale/en-US/tutorial.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/locale/en-US/tutorial.txt b/vimperator/locale/en-US/tutorial.txt index 5302b922..931e39a9 100644 --- a/vimperator/locale/en-US/tutorial.txt +++ b/vimperator/locale/en-US/tutorial.txt @@ -142,7 +142,7 @@ type uniquely identifies any given link, Vimperator will follow that link immediately without any further user input. Whichever way you choose to indicate your target link, once Vimperator has -highlighted the link you want, simply hit [m][m] to open it. +highlighted the link you want, simply hit to open it. The most common hint mode is called help:QuickHint{nbsp}mode[various.html,f]. To activate QuickHint mode, press either [m]f[m] or [m]F[m]. The lower-case From 172ba7f4a9b317695343b9b8e76c0020502df6da Mon Sep 17 00:00:00 2001 From: janus_wel Date: Mon, 9 Feb 2009 16:45:20 +0900 Subject: [PATCH 46/85] Add macro [m] and [c] Signed-off-by: Ted Pavlic --- vimperator/locale/en-US/index.txt | 442 +++++++++++++++--------------- 1 file changed, 221 insertions(+), 221 deletions(-) diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index e09c549b..ceefea0b 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -6,256 +6,256 @@ This file contains a list of all available commands. section:Insert{nbsp}mode[insert-index] -|||| Launch the external editor + -|||| Expand an insert-mode abbreviation + +||[m][m]|| Launch the external editor + +||[m][m]|| Expand an insert-mode abbreviation + section:Normal{nbsp}mode[normal-index] -|||| Select the alternate tab or the [count]th tab + -|||| Increment last number in URL + -|||| Scroll up a full page + -|||| Stop loading + -|||| Scroll window downwards in the buffer + -|||| Scroll down a full page + -|||| Print the current file name + -|||| Go to a newer position in the jump list + -|||| Redraw the screen + -|||| Go to an older position in the jump list + -|||| Scroll window upwards in the buffer + -|||| Pass through next key + -|||| Decrement last number in URL + -|||| Temporarily ignore all Vimperator key bindings + +||[m][m]|| Select the alternate tab or the [count]th tab + +||[m][m]|| Increment last number in URL + +||[m][m]|| Scroll up a full page + +||[m][m]|| Stop loading + +||[m][m]|| Scroll window downwards in the buffer + +||[m][m]|| Scroll down a full page + +||[m][m]|| Print the current file name + +||[m][m]|| Go to a newer position in the jump list + +||[m][m]|| Redraw the screen + +||[m][m]|| Go to an older position in the jump list + +||[m][m]|| Scroll window upwards in the buffer + +||[m][m]|| Pass through next key + +||[m][m]|| Decrement last number in URL + +||[m][m]|| Temporarily ignore all Vimperator key bindings + -|||| Focus content + +||[m][m]|| Focus content + -|||| Open help window + +||[m][m]|| Open help window + -|||| Rewind keyboard focus + -|||| Advance keyboard focus + +||[m][m]|| Rewind keyboard focus + +||[m][m]|| Advance keyboard focus + -||0|| Scroll to the absolute left of the document + -||$|| Scroll to the absolute right of the document + +||[m]0[m]|| Scroll to the absolute left of the document + +||[m]$[m]|| Scroll to the absolute right of the document + -||A|| Toggle bookmarked state of current URL + -||B|| Show buffer list + -||D|| Delete current buffer, focus tab to the left + -||F|| Start QuickHint mode, but open link in a new tab + -||G|| Go to the end of the document + -||H|| Go back in the browser history + -||L|| Go forward in the browser history + -||M|| Add new QuickMark for current URL + -||N|| Find previous + -||O|| Open one or more URLs, based on current location + -||P|| Open (put) a URL based on the current clipboard contents in a new buffer + -||R|| Reload while skipping the cache + -||T|| Open one or more URLs in a new tab, based on current location + -||Y|| Copy selected text or current word + +||[m]A[m]|| Toggle bookmarked state of current URL + +||[m]B[m]|| Show buffer list + +||[m]D[m]|| Delete current buffer, focus tab to the left + +||[m]F[m]|| Start QuickHint mode, but open link in a new tab + +||[m]G[m]|| Go to the end of the document + +||[m]H[m]|| Go back in the browser history + +||[m]L[m]|| Go forward in the browser history + +||[m]M[m]|| Add new QuickMark for current URL + +||[m]N[m]|| Find previous + +||[m]O[m]|| Open one or more URLs, based on current location + +||[m]P[m]|| Open (put) a URL based on the current clipboard contents in a new buffer + +||[m]R[m]|| Reload while skipping the cache + +||[m]T[m]|| Open one or more URLs in a new tab, based on current location + +||[m]Y[m]|| Copy selected text or current word + -||a|| Open a prompt to bookmark the current URL + -||b|| Open a prompt to switch buffers + -||d|| Delete current buffer + -||f|| Start QuickHint mode + -||h|| Scroll document to the left + -||i|| Start caret mode + -||j|| Scroll document down + -||k|| Scroll document up + -||l|| Scroll document to the right + -||m|| Set mark at the cursor position + -||n|| Find next + -||o|| Open one or more URLs + -||p|| Open (put) a URL based on the current clipboard contents in the current buffer + -||q|| Record a key sequence into a macro + -||r|| Reload current page + -||t|| Open one or more URLs in a new tab + -||u|| Undo closing of a tab + -||y|| Yank current location to the clipboard + +||[m]a[m]|| Open a prompt to bookmark the current URL + +||[m]b[m]|| Open a prompt to switch buffers + +||[m]d[m]|| Delete current buffer + +||[m]f[m]|| Start QuickHint mode + +||[m]h[m]|| Scroll document to the left + +||[m]i[m]|| Start caret mode + +||[m]j[m]|| Scroll document down + +||[m]k[m]|| Scroll document up + +||[m]l[m]|| Scroll document to the right + +||[m]m[m]|| Set mark at the cursor position + +||[m]n[m]|| Find next + +||[m]o[m]|| Open one or more URLs + +||[m]p[m]|| Open (put) a URL based on the current clipboard contents in the current buffer + +||[m]q[m]|| Record a key sequence into a macro + +||[m]r[m]|| Reload current page + +||[m]t[m]|| Open one or more URLs in a new tab + +||[m]u[m]|| Undo closing of a tab + +||[m]y[m]|| Yank current location to the clipboard + -||;|| Start an extended hint mode + +||[m];[m]|| Start an extended hint mode + -||:|| Enter command-line mode + +||[m]:[m]|| Enter command-line mode + -||~|| Open home directory + +||[m]~[m]|| Open home directory + -||/|| Search forward for a pattern + -||?|| Search backwards for a pattern + -||*|| Find word under cursor + -||#|| Find word under cursor backwards + +||[m]/[m]|| Search forward for a pattern + +||[m]?[m]|| Search backwards for a pattern + +||[m]*[m]|| Find word under cursor + +||[m]#[m]|| Find word under cursor backwards + -||N%|| Scroll to {count} percent of the document + +||[m]N%[m]|| Scroll to {count} percent of the document + -||'|| Jump to the mark in the current buffer + +||[m]'[m]|| Jump to the mark in the current buffer + -||@|| Play a macro + +||[m]@[m]|| Play a macro + -||.|| Repeat the last keyboard command + +||[m].[m]|| Repeat the last keyboard command + -||]f|| Focus next frame + -||[f|| Focus previous frame + -||]]|| Follow the link labeled \'next' or \'>' if it exists + -||[[|| Follow the link labeled \'prev', \'previous' or \'<' if it exists + +||[m]]f[m]|| Focus next frame + +||[m][f[m]|| Focus previous frame + +||[m]]] [m]|| Follow the link labeled \'next' or \'>' if it exists + +||[m][[ [m]|| Follow the link labeled \'prev', \'previous' or \'<' if it exists + -||g$|| Go to the last tab + -||g<|| Redisplay the last command output + -||g0|| Go to the first tab + -||g|| Print file information + -||gB|| Repeat last [c]:buffer[!][c] command in reverse direction + -||gF|| View source with an external editor + -||gH|| Open homepage in a new tab + -||gP|| Open (put) a URL based on the current clipboard contents in a new buffer + -||gT|| Go to previous tab + -||gU|| Go to the root of the website + -||gb|| Repeat last [c]:buffer[!][c] command + -||gf|| View source + -||gg|| Go to the top of the document + -||gh|| Open homepage + -||gi|| Focus last used input field + -||gn|| Jump to a QuickMark in a new tab + -||go|| Jump to a QuickMark + -||gt|| Go to the next tab + -||gu|| Go to parent directory + +||[m]g$[m]|| Go to the last tab + +||[m]g<[m]|| Redisplay the last command output + +||[m]g0[m]|| Go to the first tab + +||[m]g[m]|| Print file information + +||[m]gB[m]|| Repeat last [c]:buffer[!][c] command in reverse direction + +||[m]gF[m]|| View source with an external editor + +||[m]gH[m]|| Open homepage in a new tab + +||[m]gP[m]|| Open (put) a URL based on the current clipboard contents in a new buffer + +||[m]gT[m]|| Go to previous tab + +||[m]gU[m]|| Go to the root of the website + +||[m]gb[m]|| Repeat last [c]:buffer[!][c] command + +||[m]gf[m]|| View source + +||[m]gg[m]|| Go to the top of the document + +||[m]gh[m]|| Open homepage + +||[m]gi[m]|| Focus last used input field + +||[m]gn[m]|| Jump to a QuickMark in a new tab + +||[m]go[m]|| Jump to a QuickMark + +||[m]gt[m]|| Go to the next tab + +||[m]gu[m]|| Go to parent directory + -||ZQ|| Quit and don't save the session + -||ZZ|| Quit and save the session + -||zI|| Enlarge full zoom of current web page + -||zM|| Enlarge full zoom of current web page by a larger amount + -||zO|| Reduce full zoom of current web page + -||zR|| Reduce full zoom of current web page by a larger amount + -||zZ|| Set full zoom value of current web page + -||zi|| Enlarge text zoom of current web page + -||zm|| Enlarge text zoom of current web page by a larger amount + -||zo|| Reduce text zoom of current web page + -||zr|| Reduce text zoom of current web page by a larger amount + -||zz|| Set text zoom value of current web page + +||[m]ZQ[m]|| Quit and don't save the session + +||[m]ZZ[m]|| Quit and save the session + +||[m]zI[m]|| Enlarge full zoom of current web page + +||[m]zM[m]|| Enlarge full zoom of current web page by a larger amount + +||[m]zO[m]|| Reduce full zoom of current web page + +||[m]zR[m]|| Reduce full zoom of current web page by a larger amount + +||[m]zZ[m]|| Set full zoom value of current web page + +||[m]zi[m]|| Enlarge text zoom of current web page + +||[m]zm[m]|| Enlarge text zoom of current web page by a larger amount + +||[m]zo[m]|| Reduce text zoom of current web page + +||[m]zr[m]|| Reduce text zoom of current web page by a larger amount + +||[m]zz[m]|| Set text zoom value of current web page + section:Command-line{nbsp}editing[ex-edit-index] -|||| Quit command-line mode without executing + +||[m][m]|| Quit command-line mode without executing + -|||| Expand a command-line abbreviation + +||[m][m]|| Expand a command-line abbreviation + -|||| Recall the previous command line from the history list which matches the current command line + -|||| Recall the next command line from the history list which matches the current command line + +||[m][m]|| Recall the previous command line from the history list which matches the current command line + +||[m][m]|| Recall the next command line from the history list which matches the current command line + -|||| Complete the word in front of the cursor according to the behavior specified in 'wildmode' + -|||| Complete the previous full match when 'wildmode' contains "full" + +||[m][m]|| Complete the word in front of the cursor according to the behavior specified in 'wildmode' + +||[m][m]|| Complete the previous full match when 'wildmode' contains "full" + section:Ex{nbsp}commands[ex-cmd-index,:index] -||:!|| Run a command + -||:abbreviate|| Abbreviate a key sequence + -||:abclear|| Remove all abbreviations + -||:addons|| Manage available Extensions and Themes + -||:autocmd|| Execute commands automatically on events + -||:back|| Go back in the browser history + -||:bdelete|| Delete current buffer + -||:beep|| Play a system beep + -||:bmark|| Add a bookmark + -||:bmarks|| List or open multiple bookmarks + -||:buffer|| Switch to a buffer + -||:buffers|| Show a list of all buffers + -||:cabbrev|| Abbreviate a key sequence in command-line mode + -||:cabclear|| Remove all abbreviations in command-line mode + -||:cd|| Change the current directory + -||:cmap|| Map a key sequence in command-line mode + -||:cmapclear|| Remove all mappings in command-line mode + -||:cnoremap|| Map a key sequence without remapping keys in command-line mode + -||:colorscheme|| Load a color scheme + -||:comclear|| Delete all user-defined commands + -||:command|| List and define commands + -||:cunabbrev|| Remove an abbreviation in command-line mode + -||:cunmap|| Remove a mapping in command-line mode + -||:delbmarks|| Delete a bookmark + -||:delcommand|| Delete the specified user-defined command + -||:delmacros|| Delete macros + -||:delmarks|| Delete the specified marks + -||:delqmarks|| Delete the specified QuickMarks + -||:delstyle|| Delete any matching styles + -||:dialog|| Open a undefined dialog + -||:doautoall|| Apply the autocommands matching the specified URL to all buffers + -||:doautocmd|| Apply the autocommands matching the specified URL to the current buffer + -||:downloads|| Show progress of current downloads + -||:echo|| Echo the expression + -||:echoerr|| Echo the expression as an error message + -||:echomsg|| Echo the expression as an informational message + -||:emenu|| Execute the specified menu item from the command line + -||:execute|| Execute the argument as an Ex command + -||:exusage|| List all Ex commands with a short description + -||:finish|| Stop sourcing a script file + -||:forward|| Go forward in the browser history + -||:hardcopy|| Print current document + -||:help|| Display help + -||:highlight|| Style Vimperator + -||:history|| Show recently visited URLs + -||:iabbrev|| Abbreviate a key sequence in insert mode + -||:iabclear|| Remove all abbreviations in insert mode + -||:imap|| Map a key sequence in insert mode + -||:imapclear|| Remove all mappings in insert mode + -||:inoremap|| Map a key sequence without remapping keys in insert mode + -||:iunabbrev|| Remove an abbreviation in insert mode + -||:iunmap|| Remove a mapping in insert mode + -||:javascript|| Run a JavaScript command through eval() + -||:jumps|| Show jumplist + -||:let|| Set or list a variable + -||:loadplugins|| Immediately load all unloaded plugins + -||:macros|| List all macros + -||:map|| Map a key sequence + -||:mapclear|| Remove all mappings + -||:mark|| Mark current location within the web page + -||:marks|| Show all location marks of current web page + -||:messages|| Display previously given messages + -||:mkvimperatorrc|| Write current key mappings and changed options to the config file + -||:nohlsearch|| Remove the search highlighting + -||:noremap|| Map a key sequence without remapping keys + -||:normal|| Execute Normal mode commands + -||:open|| Open one or more URLs in the current tab + -||:optionusage|| List all options with a short description + -||:pageinfo|| Show various page information + -||:pagestyle|| Select the author style sheet to apply + -||:play|| Replay a recorded macro + -||:preferences|| Show Firefox preferences dialog + -||:pwd|| Print the current directory name + -||:qmark|| Mark a URL with a letter for quick access + -||:qmarks|| Show all QuickMarks + -||:quit|| Quit current tab + -||:quitall|| Quit undefined + -||:redraw|| Redraw the screen + -||:reload|| Reload current page + -||:reloadall|| Reload all tab pages + -||:restart|| Force undefined to restart + -||:runtime|| Source the specified file from each directory in 'runtimepath' + -||:saveas|| Save current document to disk + -||:sbclose|| Close the sidebar window + -||:scriptnames|| List all sourced script names + -||:set|| Set an option + -||:setglobal|| Set global option + -||:setlocal|| Set local option + -||:sidebar|| Open the sidebar window + -||:style|| Style Vimperator and web sites + -||:source|| Read Ex commands from a file + -||:stop|| Stop loading + -||:tab|| Execute a command and tell it to output in a new tab + -||:tabdetach|| Detach current tab to its own window + -||:tabduplicate|| Duplicate current tab + -||:tablast|| Switch to the last tab + -||:tabmove|| Move the current tab after tab N + -||:tabnext|| Switch to the next or [count]th tab + -||:tabonly|| Close all other tabs + -||:tabopen|| Open one or more URLs in a new tab + -||:tabprevious|| Switch to the previous tab or go [count] tabs back + -||:tabrewind|| Switch to the first tab + -||:time|| Profile a piece of code or run a command multiple times + -||:unabbreviate|| Remove an abbreviation + -||:undo|| Undo closing of a tab + -||:undoall|| Undo closing of all closed tabs + -||:unlet|| Delete a variable + -||:unmap|| Remove a mapping + -||:version|| Show version information + -||:viewsource|| View source code of current document + -||:viusage|| List all mappings with a short description + -||:winclose|| Close window + -||:winopen|| Open one or more URLs in a new window + -||:wqall|| Save the session and quit + -||:zoom|| Set zoom value of current web page + +||[c]:![c]|| Run a command + +||[c]:abbreviate[c]|| Abbreviate a key sequence + +||[c]:abclear[c]|| Remove all abbreviations + +||[c]:addons[c]|| Manage available Extensions and Themes + +||[c]:autocmd[c]|| Execute commands automatically on events + +||[c]:back[c]|| Go back in the browser history + +||[c]:bdelete[c]|| Delete current buffer + +||[c]:beep[c]|| Play a system beep + +||[c]:bmark[c]|| Add a bookmark + +||[c]:bmarks[c]|| List or open multiple bookmarks + +||[c]:buffer[c]|| Switch to a buffer + +||[c]:buffers[c]|| Show a list of all buffers + +||[c]:cabbrev[c]|| Abbreviate a key sequence in command-line mode + +||[c]:cabclear[c]|| Remove all abbreviations in command-line mode + +||[c]:cd[c]|| Change the current directory + +||[c]:cmap[c]|| Map a key sequence in command-line mode + +||[c]:cmapclear[c]|| Remove all mappings in command-line mode + +||[c]:cnoremap[c]|| Map a key sequence without remapping keys in command-line mode + +||[c]:colorscheme[c]|| Load a color scheme + +||[c]:comclear[c]|| Delete all user-defined commands + +||[c]:command[c]|| List and define commands + +||[c]:cunabbrev[c]|| Remove an abbreviation in command-line mode + +||[c]:cunmap[c]|| Remove a mapping in command-line mode + +||[c]:delbmarks[c]|| Delete a bookmark + +||[c]:delcommand[c]|| Delete the specified user-defined command + +||[c]:delmacros[c]|| Delete macros + +||[c]:delmarks[c]|| Delete the specified marks + +||[c]:delqmarks[c]|| Delete the specified QuickMarks + +||[c]:delstyle[c]|| Delete any matching styles + +||[c]:dialog[c]|| Open a undefined dialog + +||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers + +||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer + +||[c]:downloads[c]|| Show progress of current downloads + +||[c]:echo[c]|| Echo the expression + +||[c]:echoerr[c]|| Echo the expression as an error message + +||[c]:echomsg[c]|| Echo the expression as an informational message + +||[c]:emenu[c]|| Execute the specified menu item from the command line + +||[c]:execute[c]|| Execute the argument as an Ex command + +||[c]:exusage[c]|| List all Ex commands with a short description + +||[c]:finish[c]|| Stop sourcing a script file + +||[c]:forward[c]|| Go forward in the browser history + +||[c]:hardcopy[c]|| Print current document + +||[c]:help[c]|| Display help + +||[c]:highlight[c]|| Style Vimperator + +||[c]:history[c]|| Show recently visited URLs + +||[c]:iabbrev[c]|| Abbreviate a key sequence in insert mode + +||[c]:iabclear[c]|| Remove all abbreviations in insert mode + +||[c]:imap[c]|| Map a key sequence in insert mode + +||[c]:imapclear[c]|| Remove all mappings in insert mode + +||[c]:inoremap[c]|| Map a key sequence without remapping keys in insert mode + +||[c]:iunabbrev[c]|| Remove an abbreviation in insert mode + +||[c]:iunmap[c]|| Remove a mapping in insert mode + +||[c]:javascript[c]|| Run a JavaScript command through eval() + +||[c]:jumps[c]|| Show jumplist + +||[c]:let[c]|| Set or list a variable + +||[c]:loadplugins[c]|| Immediately load all unloaded plugins + +||[c]:macros[c]|| List all macros + +||[c]:map[c]|| Map a key sequence + +||[c]:mapclear[c]|| Remove all mappings + +||[c]:mark[c]|| Mark current location within the web page + +||[c]:marks[c]|| Show all location marks of current web page + +||[c]:messages[c]|| Display previously given messages + +||[c]:mkvimperatorrc[c]|| Write current key mappings and changed options to the config file + +||[c]:nohlsearch[c]|| Remove the search highlighting + +||[c]:noremap[c]|| Map a key sequence without remapping keys + +||[c]:normal[c]|| Execute Normal mode commands + +||[c]:open[c]|| Open one or more URLs in the current tab + +||[c]:optionusage[c]|| List all options with a short description + +||[c]:pageinfo[c]|| Show various page information + +||[c]:pagestyle[c]|| Select the author style sheet to apply + +||[c]:play[c]|| Replay a recorded macro + +||[c]:preferences[c]|| Show Firefox preferences dialog + +||[c]:pwd[c]|| Print the current directory name + +||[c]:qmark[c]|| Mark a URL with a letter for quick access + +||[c]:qmarks[c]|| Show all QuickMarks + +||[c]:quit[c]|| Quit current tab + +||[c]:quitall[c]|| Quit undefined + +||[c]:redraw[c]|| Redraw the screen + +||[c]:reload[c]|| Reload current page + +||[c]:reloadall[c]|| Reload all tab pages + +||[c]:restart[c]|| Force undefined to restart + +||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' + +||[c]:saveas[c]|| Save current document to disk + +||[c]:sbclose[c]|| Close the sidebar window + +||[c]:scriptnames[c]|| List all sourced script names + +||[c]:set[c]|| Set an option + +||[c]:setglobal[c]|| Set global option + +||[c]:setlocal[c]|| Set local option + +||[c]:sidebar[c]|| Open the sidebar window + +||[c]:style[c]|| Style Vimperator and web sites + +||[c]:source[c]|| Read Ex commands from a file + +||[c]:stop[c]|| Stop loading + +||[c]:tab[c]|| Execute a command and tell it to output in a new tab + +||[c]:tabdetach[c]|| Detach current tab to its own window + +||[c]:tabduplicate[c]|| Duplicate current tab + +||[c]:tablast[c]|| Switch to the last tab + +||[c]:tabmove[c]|| Move the current tab after tab N + +||[c]:tabnext[c]|| Switch to the next or [count]th tab + +||[c]:tabonly[c]|| Close all other tabs + +||[c]:tabopen[c]|| Open one or more URLs in a new tab + +||[c]:tabprevious[c]|| Switch to the previous tab or go [count] tabs back + +||[c]:tabrewind[c]|| Switch to the first tab + +||[c]:time[c]|| Profile a piece of code or run a command multiple times + +||[c]:unabbreviate[c]|| Remove an abbreviation + +||[c]:undo[c]|| Undo closing of a tab + +||[c]:undoall[c]|| Undo closing of all closed tabs + +||[c]:unlet[c]|| Delete a variable + +||[c]:unmap[c]|| Remove a mapping + +||[c]:version[c]|| Show version information + +||[c]:viewsource[c]|| View source code of current document + +||[c]:viusage[c]|| List all mappings with a short description + +||[c]:winclose[c]|| Close window + +||[c]:winopen[c]|| Open one or more URLs in a new window + +||[c]:wqall[c]|| Save the session and quit + +||[c]:zoom[c]|| Set zoom value of current web page + section:Options[option-index] From 06634d6223d38c0e550e5837fee4177508f7277f Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Mon, 9 Feb 2009 17:07:32 +0200 Subject: [PATCH 47/85] Vimperator 2.0 beta1 --- vimperator/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/Makefile b/vimperator/Makefile index fac3417f..2c93a6d7 100644 --- a/vimperator/Makefile +++ b/vimperator/Makefile @@ -1,6 +1,6 @@ #### configuration -VERSION = 2.0pre +VERSION = 2.0b1 NAME = vimperator include ../common/Makefile.common From c5c5e90f0e31bc222adec24a1eb85c18fdf8c89d Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Mon, 9 Feb 2009 17:10:41 +0200 Subject: [PATCH 48/85] Use VERSION properly in git 2.0pre for everything between 1.2, alphas, betas and the final 2.0 is a bit silly --- vimperator/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/Makefile b/vimperator/Makefile index 2c93a6d7..b292b37f 100644 --- a/vimperator/Makefile +++ b/vimperator/Makefile @@ -1,6 +1,6 @@ #### configuration -VERSION = 2.0b1 +VERSION = 2.0b2pre NAME = vimperator include ../common/Makefile.common From c9c708f636e6f25a54c301c85911c420f81a9dba Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 9 Feb 2009 16:18:10 -0500 Subject: [PATCH 49/85] Fix some bugs, generally. --- common/content/completion.js | 38 ++++++++++++++++++------------------ common/content/liberator.js | 2 +- common/content/style.js | 21 ++++++++++++-------- common/content/template.js | 2 +- common/content/ui.js | 7 +++---- common/content/util.js | 7 +++++++ 6 files changed, 44 insertions(+), 33 deletions(-) diff --git a/common/content/completion.js b/common/content/completion.js index c7906969..9cd8010a 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -726,22 +726,22 @@ function Completion() //{{{ this.completers = {}; + // Some object members are only accessible as function calls + function getKey(obj, key) + { + try + { + return obj[key]; + } + catch (e) + { + return undefined; + } + } + this.iter = function iter(obj) { - let iterator = (function objIter() - { - for (let k in obj) - { - // Some object members are only accessible as function calls - try - { - yield [k, obj[k]]; - continue; - } - catch (e) {} - yield [k, <>inaccessable] - } - })(); + let iterator = ([k, getKey(obj, k)] for (k in obj)); try { // The point of 'for k in obj' is to get keys @@ -781,21 +781,21 @@ function Completion() //{{{ // available in the object itself. let orig = obj; - // v[0] in orig and orig[v[0]] catch different cases. XPCOM - // objects are problematic, to say the least. if (modules.isPrototypeOf(obj)) compl = [v for (v in Iterator(obj))]; else { - if (obj.wrappedJSObject) + if (getKey(obj, 'wrappedJSObject')) obj = obj.wrappedJSObject; + // v[0] in orig and orig[v[0]] catch different cases. XPCOM + // objects are problematic, to say the least. compl = [v for (v in this.iter(obj)) - if ((typeof orig == "object" && v[0] in orig) || orig[v[0]] !== undefined)]; + if ((typeof orig == "object" && v[0] in orig) || getKey(orig, v[0]) !== undefined)]; } // And if wrappedJSObject happens to be available, // return that, too. - if (orig.wrappedJSObject) + if (getKey(orig, 'wrappedJSObject')) compl.push(["wrappedJSObject", obj]); // Add keys for sorting later. diff --git a/common/content/liberator.js b/common/content/liberator.js index 2e3e1d7c..66dc43bf 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -121,7 +121,7 @@ const liberator = (function () //{{{ let class = dir.map(function (dir) "html|html > xul|scrollbar[orient=" + dir + "]"); if (class.length) - styles.addSheet(true, "scrollbar", "*", class.join(", ") + " { visibility: collapse !important; }"); + styles.addSheet(true, "scrollbar", "*", class.join(", ") + " { visibility: collapse !important; }", true); else styles.removeSheet(true, "scrollbar"); options.safeSetPref("layout.scrollbar.side", opts.indexOf("l") >= 0 ? 3 : 2); diff --git a/common/content/style.js b/common/content/style.js index 50a38f5c..d994dbd6 100644 --- a/common/content/style.js +++ b/common/content/style.js @@ -182,7 +182,7 @@ function Highlights(name, store, serial) { css = style.selector + " { " + css + " }"; - let error = styles.addSheet(true, style.selector, style.filter, css); + let error = styles.addSheet(true, style.selector, style.filter, css, true); if (error) return error; } @@ -235,6 +235,7 @@ function Highlights(name, store, serial) this.set(class); } }; + this.reload(); } /** @@ -257,7 +258,7 @@ function Styles(name, store, serial) const namespace = '@namespace html "' + XHTML + '";\n' + '@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";\n' + '@namespace liberator "' + NS.uri + '";\n'; - const Sheet = new Struct("name", "sites", "css", "ref"); + const Sheet = new Struct("name", "sites", "css", "ref", "agent"); let cssUri = function (css) "chrome-data:text/css," + window.encodeURI(css); @@ -285,7 +286,7 @@ function Styles(name, store, serial) * "*" is matched as a prefix. * @param {string} css The CSS to be applied. */ - this.addSheet = function (system, name, filter, css) + this.addSheet = function (system, name, filter, css, agent) { let sheets = system ? systemSheets : userSheets; let names = system ? systemNames : userNames; @@ -294,7 +295,7 @@ function Styles(name, store, serial) let sheet = sheets.filter(function (s) s.sites.join(",") == filter && s.css == css)[0]; if (!sheet) - sheet = new Sheet(name, filter.split(",").filter(util.identity), css, null); + sheet = new Sheet(name, filter.split(",").filter(util.identity), css, null, agent); if (sheet.ref == null) // Not registered yet { @@ -302,7 +303,8 @@ function Styles(name, store, serial) try { this.registerSheet(cssUri(wrapCSS(sheet))); - this.registerAgentSheet(cssUri(wrapCSS(sheet))) + if (sheet.agent) + this.registerAgentSheet(cssUri(wrapCSS(sheet))) } catch (e) { @@ -410,7 +412,7 @@ function Styles(name, store, serial) { let sites = sheet.sites.filter(function (f) f != filter); if (sites.length) - this.addSheet(system, name, sites.join(","), css); + this.addSheet(system, name, sites.join(","), css, sheet.agent); } } return matches.length; @@ -514,8 +516,11 @@ const styles = storage.newObject("styles", Styles, false); */ const highlight = storage.newObject("highlight", Highlights, false); -highlight.CSS = Highlights.prototype.CSS; -highlight.reload(); +if (highlight.CSS != Highlights.prototype.CSS) +{ + highlight.CSS = Highlights.prototype.CSS; + highlight.reload(); +} liberator.triggerObserver("load_styles", "styles"); liberator.triggerObserver("load_highlight", "highlight"); diff --git a/common/content/template.js b/common/content/template.js index 981f72f8..b4f14bfd 100644 --- a/common/content/template.js +++ b/common/content/template.js @@ -133,9 +133,9 @@ const template = { highlight: function highlight(arg, processStrings, clip) { // some objects like window.JSON or getBrowsers()._browsers need the try/catch - let str = clip ? util.clip(String(arg), clip) : String(arg); try { + let str = clip ? util.clip(String(arg), clip) : String(arg); switch (arg == null ? "undefined" : typeof arg) { case "number": diff --git a/common/content/ui.js b/common/content/ui.js index 9e3112ca..f9b90b4f 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -997,10 +997,9 @@ function CommandLine() //{{{ set silent(val) { silent = val; - if (silent) - storage.styles.addSheet(true, "silent-mode", "chrome://*", "#liberator-commandline > * { opacity: 0 }"); - else - storage.styles.removeSheet(true, "silent-mode"); + Array.forEach(document.getElementById("liberator-commandline").childNodes, function (node) { + node.style.opacity = silent ? "0" : ""; + }); }, runSilently: function (fn, self) diff --git a/common/content/util.js b/common/content/util.js index 090de789..5409d0c9 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -672,6 +672,13 @@ const util = { //{{{ xmlToDom: function xmlToDom(node, doc, nodes) { XML.prettyPrinting = false; + if (node.length() != 1) + { + let domnode = doc.createDocumentFragment(); + for each (let child in node) + domnode.appendChild(arguments.callee(child, doc, nodes)); + return domnode; + } switch (node.nodeKind()) { case "text": From 9ef16288f0d172d802af9c426b88ec622e2b20be Mon Sep 17 00:00:00 2001 From: anekos Date: Tue, 10 Feb 2009 11:31:29 +0900 Subject: [PATCH 50/85] Fix: ':bmark' cannot bookmarks /['"]/ included URL. --- vimperator/content/bookmarks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vimperator/content/bookmarks.js b/vimperator/content/bookmarks.js index f099b36e..0d318a2d 100644 --- a/vimperator/content/bookmarks.js +++ b/vimperator/content/bookmarks.js @@ -347,7 +347,7 @@ function Bookmarks() //{{{ "Add a bookmark", function (args) { - let url = args.length == 0 ? buffer.URL : args[0]; + let url = args.literalArg || buffer.URL; let title = args["-title"] || (args.length == 0 ? buffer.title : null); let keyword = args["-keyword"] || null; let tags = args["-tags"] || []; @@ -363,6 +363,7 @@ function Bookmarks() //{{{ { argCount: "?", bang: true, + literal: 0, completer: function (context, args) { if (!args.bang) From 16afcf09e40645b38d5cc88952079be927fd1147 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Tue, 10 Feb 2009 08:21:21 -0500 Subject: [PATCH 51/85] For convenience, support 'make LOCALES="en-US" doc'. Revert if desired. Also removed some tags in Makefile.common that should have been spaces. --- common/Makefile.common | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common/Makefile.common b/common/Makefile.common index 42c0d6e6..d0e1210b 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -3,10 +3,11 @@ TOP = $(shell pwd) OS = $(shell uname -s) BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S") -BASE = $(TOP)/../common +BASE = $(TOP)/../common -DOC_SRC_FILES = $(wildcard locale/*/*.txt) -LOCALES = $(wildcard locale/*) +LOCALEDIR = locale +DOC_SRC_FILES = $(wildcard $(LOCALEDIR)/*/*.txt) +LOCALES = $(foreach locale,$(wildcard $(LOCALEDIR)/*),$(word 2,$(subst /, ,$(locale)))) MAKE_JAR = VERSION="$(VERSION)" DATE="$(BUILD_DATE)" sh $(BASE)/make_jar.sh @@ -26,7 +27,7 @@ XPI_BINS = jar XPI_NAME = $(NAME)_$(VERSION) XPI_PATH = ../downloads/$(XPI_NAME) -XPI = $(XPI_PATH).xpi +XPI = $(XPI_PATH).xpi RDF = ../downloads/update.rdf RDF_IN = $(RDF).in @@ -106,4 +107,4 @@ $(JAR): doc #### doc (see Makefile.doc) -doc: $(LOCALES:%=%.doc) ; +doc: $(foreach localetgt,$(LOCALES:%=%.doc),$(addprefix $(LOCALEDIR)/,$(localetgt))) ; From d5226fc252ac942bf1f7975be0407fa838e3b024 Mon Sep 17 00:00:00 2001 From: anekos Date: Tue, 10 Feb 2009 23:28:29 +0900 Subject: [PATCH 52/85] Revert "Fix: ':bmark' cannot bookmarks /['"]/ included URL." This reverts commit fc46e6c4157406fa9706074e3932d153216a9bd3. --- vimperator/content/bookmarks.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vimperator/content/bookmarks.js b/vimperator/content/bookmarks.js index 0d318a2d..f099b36e 100644 --- a/vimperator/content/bookmarks.js +++ b/vimperator/content/bookmarks.js @@ -347,7 +347,7 @@ function Bookmarks() //{{{ "Add a bookmark", function (args) { - let url = args.literalArg || buffer.URL; + let url = args.length == 0 ? buffer.URL : args[0]; let title = args["-title"] || (args.length == 0 ? buffer.title : null); let keyword = args["-keyword"] || null; let tags = args["-tags"] || []; @@ -363,7 +363,6 @@ function Bookmarks() //{{{ { argCount: "?", bang: true, - literal: 0, completer: function (context, args) { if (!args.bang) From fddfb008036da683ea2d7cc53382595fd9b27312 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 11 Feb 2009 14:55:31 +1100 Subject: [PATCH 53/85] Add a favicon to the Vimperator help pages (stepnem). --- vimperator/locale/en-US/asciidoc.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/vimperator/locale/en-US/asciidoc.conf b/vimperator/locale/en-US/asciidoc.conf index ff6fda1e..58a6eed9 100644 --- a/vimperator/locale/en-US/asciidoc.conf +++ b/vimperator/locale/en-US/asciidoc.conf @@ -13,6 +13,7 @@ email=stubenschrott@gmx.net + {doctitle} From 49ec231edac19a2a0d2105b28f11ad6e795e4ccc Mon Sep 17 00:00:00 2001 From: anekos Date: Thu, 12 Feb 2009 13:50:10 +0900 Subject: [PATCH 54/85] Fix typo in evalExpression@liberator.js. Thanks snaka72. --- common/content/liberator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/liberator.js b/common/content/liberator.js index 66dc43bf..04146bd3 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -842,7 +842,7 @@ const liberator = (function () //{{{ // Number else if (matches = string.match(/^(\d+)$/)) { - return parseInt(match[1], 10); + return parseInt(matches[1], 10); } let reference = this.variableReference(string); From f5ed7ba579e7ef47e4f7dd84cdb5731c4fcbea79 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 11 Feb 2009 22:05:18 +1100 Subject: [PATCH 55/85] Fix typo in :loadplugins help text. --- vimperator/locale/en-US/options.txt | 49 ++++++++++++---------------- vimperator/locale/en-US/repeat.txt | 2 +- vimperator/locale/en-US/tutorial.txt | 6 ++-- vimperator/locale/en-US/various.txt | 7 ---- 4 files changed, 25 insertions(+), 39 deletions(-) diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index d6d7b96b..35b9ae6b 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -3,7 +3,7 @@ HEADER |options| + Vimperator has a number of internal variables and switches which can be set to -achieve special effects. These options come in 5 forms: +achieve special effects. These options come in 5 forms: `------------`----------------------------------------- *boolean* can only be on or off *number* has a numeric value @@ -84,21 +84,17 @@ ____ |:set+=| ||:se[t] {option}+={value} [...]|| + ____ -Add the {value} to a number option, or append the -{value} to a string option. When the option is a -comma separated list, a comma is added, unless the -value was empty. -If the option is a list of flags, superfluous flags -are removed. When adding a flag that was already -present the option value doesn't change. +Add the {value} to a number option, or append the {value} to a string option. +When the option is a comma separated list, a comma is added, unless the value +was empty. If the option is a list of flags, superfluous flags are removed. +When adding a flag that was already present the option value doesn't change. ____ |:set^=| ||:se[t] {option}^={value} [...]|| + ____ -Multiply the {value} to a number option, or prepend -the {value} to a string option. When the option is a -comma separated list, a comma is added, unless the +Multiply the {value} to a number option, or prepend the {value} to a string +option. When the option is a comma separated list, a comma is added, unless the value was empty. ____ @@ -106,15 +102,12 @@ ____ ||:se[t] {option}-={value} [...]|| + ____ -Subtract the {value} from a number option, or remove -the {value} from a string option, if it is there. -If the {value} is not found in a string option, there -is no error or warning. When the option is a comma -separated list, a comma is deleted, unless the option -becomes empty. -When the option is a list of flags, {value} must be -exactly as they appear in the option. Remove flags -one by one to avoid problems. +Subtract the {value} from a number option, or remove the {value} from a string +option, if it is there. If the {value} is not found in a string option, there +is no error or warning. When the option is a comma separated list, a comma is +deleted, unless the option becomes empty. When the option is a list of flags, +{value} must be exactly as they appear in the option. Remove flags one by one +to avoid problems. ____ |:setlocal| |:setl| @@ -727,11 +720,11 @@ ____ |\'urlseparator'| ||'urlseparator'|| string (default: ",\s") ____ -Set the separator regexp used to separate multiple URL args. Multiple -arguments can be specified for [c]:open[c], and similar commands, using this -regexp as the separator. Using whitespace alone is not generally useful since -it is often contained in a single argument. E.g. [c]:open linus torvalds[c] -should perform a single search for the key words "linus" and "torvalds" +Set the separator regexp used to separate multiple URL args. Multiple arguments +can be specified for [c]:open[c], and similar commands, using this regexp as +the separator. Using whitespace alone is not generally useful since it is often +contained in a single argument. E.g. [c]:open linus torvalds[c] should perform +a single search for the key words "linus" and "torvalds" ____ @@ -750,9 +743,9 @@ ____ |\'novb'| |\'novisualbell'| |\'vb'| |\'visualbell'| ||'visualbell' 'vb'|| boolean (default: off) ____ -Use visual bell instead of beeping on errors. The visual bell style is -controlled by [c]:hi Bell[c]. If no bell is desired use [c]:set t_vb=[c] together with -this option. +Use visual bell instead of beeping on errors. The visual bell style is +controlled by [c]:hi Bell[c]. If no bell is desired use [c]:set t_vb=[c] +together with this option. ____ diff --git a/vimperator/locale/en-US/repeat.txt b/vimperator/locale/en-US/repeat.txt index 0501ba63..43d39f41 100644 --- a/vimperator/locale/en-US/repeat.txt +++ b/vimperator/locale/en-US/repeat.txt @@ -99,7 +99,7 @@ Load all unloaded plugins immediately. Because plugins are automatically loaded after vimperatorrc is sourced, this command must be placed early in the vimperatorrc file if vimperatorrc also includes commands that are implemented by plugins. Additionally, this command allows for sourcing -new plugins without restarting vimperator. +new plugins without restarting Vimperator. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/tutorial.txt b/vimperator/locale/en-US/tutorial.txt index 931e39a9..a3cf8005 100644 --- a/vimperator/locale/en-US/tutorial.txt +++ b/vimperator/locale/en-US/tutorial.txt @@ -22,7 +22,7 @@ If you're a veteran Vim user, this may look familiar. It should. However, in this author's opinion, the best way to get familiar with Vimperator is to leave these disabled for now. (The above action can be -reversed with [c]:set go=[c]) You can look at the entry for +reversed with [c]:set go=[c]) You can look at the entry for [o]guioptions[o] in help:options[options.html] for more information on this. section:Vimperator's{nbsp}modal{nbsp}interface[modal] @@ -128,7 +128,7 @@ equivalent: section:Some{nbsp}hints{nbsp}about{nbsp}surfing...[hints-tutorial] So now you can navigate around in Vimperator. But wait... how do you *open* a -page or tab linked in a web page? How do you ``click'' on all those links +page or tab linked in a web page? How do you ``click'' on all those links without your tailed friend? The answer is ``hints''. Activating hints displays a number next to every link @@ -240,7 +240,7 @@ section:I'm{nbsp}interested...but{nbsp}lost![support] Vimperator has an energetic and growing user base. If you've run into a problem that you can't seem to solve with Vimperator, or if you think you might have -found a bug, please let us know! There is support available on the +found a bug, please let us know! There is support available on the http://vimperator.cutup.org/index.php?title=Main_Page[wiki], or in the #vimperator IRC channel on http://freenode.net/[freenode]. diff --git a/vimperator/locale/en-US/various.txt b/vimperator/locale/en-US/various.txt index 0ace34cf..e8533445 100644 --- a/vimperator/locale/en-US/various.txt +++ b/vimperator/locale/en-US/various.txt @@ -108,11 +108,4 @@ cursor and can move around. If you want to select text in this mode, press [m]v[m] to start its Visual mode. ________________________________________________________________________________ - -//|:pc| |:pclose| + -//||:pc[lose]|| -//________________________________________________________________________________ -//Close preview window on bottom of screen. -//________________________________________________________________________________ - // vim: set filetype=asciidoc: From 29fedfd6a2948326c61790c66e5b9232df400148 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 11 Feb 2009 22:07:45 +1100 Subject: [PATCH 56/85] Add Vimball archive files (*.vba) to .gitignore. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 870718f0..50e5bc77 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ *.xpi */locale/*/*.html */chrome +*/contrib/vim/*.vba ## Editor backup and swap files *~ From 7469b1965d5e393dc1c810277d9e181342330b26 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 11 Feb 2009 22:47:29 +1100 Subject: [PATCH 57/85] Fix the liberator.version comment so it's ignored by the Makefile. --- common/content/liberator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/liberator.js b/common/content/liberator.js index 04146bd3..a26ed8fa 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -601,7 +601,7 @@ const liberator = (function () //{{{ forceNewTab: false, - // ###VERSION### and ###DATE### are replaced by the Makefile + // these VERSION and DATE tokens are replaced by the Makefile version: "###VERSION### (created: ###DATE###)", // NOTE: services.get("profile").selectedProfile.name is not rightness. From bf408dd25b049906fadc61ce804bbba5ead1f6f9 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 15 Feb 2009 00:44:44 +1100 Subject: [PATCH 58/85] Add TODO regarding broken MOW hinting. --- vimperator/TODO | 1 + 1 file changed, 1 insertion(+) diff --git a/vimperator/TODO b/vimperator/TODO index f743c6e3..25400f3a 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -42,6 +42,7 @@ BUGS: - :messages is _very_ slow for message history of several thousand lines -> Unresponsive Script: util.js:79 (sometimes xmlToDom() and elsewhere) - :hardcopy! seems to be broken for me +- MOW hinting is broken, perhaps this should be properly disabled for 2.0 FEATURES: 9 finish :help TODOs From 0aea14332590fb03535e9a48ec0442c0cb929c81 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 15 Feb 2009 15:30:54 +1100 Subject: [PATCH 59/85] Add a version.html help page. NEWS should be reformatted as asciidoc or something more simply transformed into clean asciidoc. --- common/Makefile.doc | 11 ++++++++--- muttator/content/config.js | 3 ++- vimperator/NEWS | 18 +++++++++--------- vimperator/TODO | 2 -- vimperator/content/config.js | 2 +- vimperator/locale/en-US/asciidoc.conf | 2 +- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/common/Makefile.doc b/common/Makefile.doc index 571ec45a..6eba6b8d 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -1,4 +1,4 @@ -# Symlink or me to (or include me from) locale/*/Makefile +# Symlink me to (or include me from) locale/*/Makefile #### configuration @@ -12,7 +12,7 @@ ADC_SRC_FILES = $(wildcard *.txt) ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html) ADC_DEPS = $(wildcard asciidoc.conf lang-$(LANG).conf) -DOC_FILES = $(ADC_FILES) +DOC_FILES = $(ADC_FILES) version.html .SILENT: @@ -44,7 +44,7 @@ distclean: clean #### asciidoc -asciidoc: check-asciidoc $(ADC_FILES) +asciidoc: check-asciidoc $(DOC_FILES) check-asciidoc: @$(ASCIIDOC) --version | $(AWK) '{ exit $$2 !~ /^8\.2\./ }' || \ @@ -54,3 +54,8 @@ $(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) @echo "DOC locale/$(LOCALE)/$@" $(ASCIIDOC) --unsafe -a linkcss -a quirks! -a lang=$(LANG) -a doctitle="$(shell basename $@)" -o $@ $< +version.html: ../../NEWS $(BASE)/Makefile.doc $(ADC_DEPS) + @echo "DOC locale/$(LOCALE)/$@" + # NOTE: asciidoc doesn't source the conf file implicitly when processing stdin + sed -e '1i\HEADER' -e '/^[0-9]/d' -e '/^ \+\* version /s/.*version \+\([0-9.]\+\).*/section:Version{nbsp}\1[version-\1]\ +/' ../../NEWS | ${ASCIIDOC} -f asciidoc.conf -a doctitle=version.html -o version.html - diff --git a/muttator/content/config.js b/muttator/content/config.js index 259d019d..6b1979bb 100644 --- a/muttator/content/config.js +++ b/muttator/content/config.js @@ -103,7 +103,8 @@ const config = { //{{{ ], // they are sorted by relevance, not alphabetically - helpFiles: ["intro.html"],/* "tutorial.html", "starting.html", + helpFiles: ["intro.html", "version.html"], + /* "tutorial.html", "starting.html", "browsing.html", "buffer.html", "pattern.html", "options.html", "tabs.html", "hints.html", "map.html", "eval.html", "marks.html", "repeat.html", "autocommands.html", "print.html", "developer.html", diff --git a/vimperator/NEWS b/vimperator/NEWS index 7a69e195..ab8479c5 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -1,4 +1,4 @@ -2008-XX-XX: +2009-XX-XX: * version 2.0 (probably) * IMPORTANT: For compatibility with vim, guioptions=b has been renamed 'B'. 'b' now represents the bottom scrollbar. @@ -7,7 +7,7 @@ * IMPORTANT: Due to much improved autocompletion, changed default 'complete' option value to 'sfl', listing intelligent Firefox location bar results. Removed possibility to use 'h' in 'complete'. - * IMPORTANT: AlwaysHint mode with ;F mode changed the semantics slightly + * IMPORTANT: AlwaysHint mode with ;F mode changed the semantics slightly. * IMPORTANT: command actions now take an args object, returned from commands.parseArgs, as their first argument. This will break any commands not using the args parser explicitly. The old string value is now @@ -15,10 +15,10 @@ * IMPORTANT: 'verbose' is now used for message levels. Logging is controlled by the extensions.liberator.loglevel preference. * IMPORTANT: :viusage and :exusage now jump to the help index, use the - special versions for the old behavior + special versions for the old behavior. * IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and - VimperatorLeave respectively - * IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages + VimperatorLeave respectively. + * IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages. * IMPORTANT: $VIMPERATOR_HOME is no longer used. * [count] now goes to the [count]th next tab rather than the [count]th tab. @@ -146,7 +146,7 @@ 2008-05-14: * version 1.0 - * THIS VERSION ONLY WORKS WITH FIREFOX 3.0 beta3 or newer + * IMPORTANT: THIS VERSION ONLY WORKS WITH FIREFOX 3.0 beta3 or newer * IMPORTANT: Major hints rewrite read up the new help for the f, F and ; commands for details removed the following hint options: 'hintchars' 'maxhints' @@ -205,7 +205,7 @@ 2007-12-21: * version 0.5.3 - * IMPORTANT! options are no longer automatically stored - use the + * IMPORTANT: options are no longer automatically stored - use the ~/.vimperatorrc file instead for persistent options * :tabnext and :tabprevious now accept an argument * the count to gT now specifies a relative tab motion like Vim @@ -374,7 +374,7 @@ * added 'n' and 'N' to repeat a search * many small bug fixes -17/04/2007: +2007-04-17: * version 0.3 * added Ctrl-v support to pass one key to firefox (patch by Muthu Kannan) * also 'I' will go to 'ignorekeys' mode until esc is pressed, presenting a workaround @@ -387,6 +387,6 @@ * ability to use shift and ctrl with special keys like F1 in mappings * small documentation and other fixes -11/04/2007: +2007-04-11: * version 0.2 * first public release diff --git a/vimperator/TODO b/vimperator/TODO index 25400f3a..6abd5099 100644 --- a/vimperator/TODO +++ b/vimperator/TODO @@ -50,8 +50,6 @@ FEATURES: 9 adaptive timeout for auto-completions, :set completions can be updated more often than :open foo 9 use the storage module for autocommands -9 the NEWS file should be more easily available for users, via :help news or something - at the moment you need to unzip the xpi or check the sources to view it, which isn't user friendly 8 support 'activate' in buffer.followLink? Leave this to the bookmarks.tabs.loadInBackground. Hint activation should be nearly equivalent to the corresponding mouse motion, and that diff --git a/vimperator/content/config.js b/vimperator/content/config.js index 7d4dd586..69cddbbb 100644 --- a/vimperator/content/config.js +++ b/vimperator/content/config.js @@ -117,7 +117,7 @@ const config = { //{{{ "pattern.html", "tabs.html", "hints.html", "map.html", "eval.html", "marks.html", "repeat.html", "autocommands.html", "print.html", "gui.html", "styling.html", "message.html", "developer.html", - "various.html", "index.html" + "various.html", "index.html", "version.html" ], scripts: [ diff --git a/vimperator/locale/en-US/asciidoc.conf b/vimperator/locale/en-US/asciidoc.conf index 58a6eed9..8656b2dc 100644 --- a/vimperator/locale/en-US/asciidoc.conf +++ b/vimperator/locale/en-US/asciidoc.conf @@ -75,7 +75,7 @@ argument2=&\#123;|} argument3=[|] [specialwords] -warningwords=WARNING: Warning: +warningwords=WARNING: Warning: IMPORTANT: Important: infowords=NOTE: Note: [warningwords] From 71a0f56db4b972a7787e3469703460b0c10d165d Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 17 Feb 2009 01:49:26 +1100 Subject: [PATCH 60/85] Fix ]] when the relationship is specified with rel/rev (#162). --- common/content/buffer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 2e0386a4..3226a575 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1050,7 +1050,12 @@ function Buffer() //{{{ function followFrame(frame) { - function iter(elems) (e for ([i, e] in Iterator(elems)) if (e.rel.toLowerCase() == rel || e.rev.toLowerCase() == rel)); + function iter(elems) + { + for (let i = 0; i < elems.length; i++) + if (elems[i].rel.toLowerCase() == rel || elems[i].rev.toLowerCase() == rel) + yield elems[i]; + } // s have higher priority than normal hrefs let elems = frame.document.getElementsByTagName("link"); From f0ff9bf2a123077fc83208a6dbe73574dffa5163 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 18 Feb 2009 00:11:16 +0900 Subject: [PATCH 61/85] Fix: set! foo="multibyte string" was broken. --- common/content/options.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/content/options.js b/common/content/options.js index f997a697..7c1df76f 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -335,7 +335,11 @@ function Options() //{{{ { case "string": if (type == Ci.nsIPrefBranch.PREF_INVALID || type == Ci.nsIPrefBranch.PREF_STRING) - services.get("pref").setCharPref(name, value); + { + let supportString = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); + supportString.data = value; + services.get("pref").setComplexValue(name, Ci.nsISupportsString, supportString); + } else if (type == Ci.nsIPrefBranch.PREF_INT) liberator.echoerr("E521: Number required after =: " + name + "=" + value); else @@ -375,6 +379,7 @@ function Options() //{{{ case Ci.nsIPrefBranch.PREF_STRING: let value = branch.getComplexValue(name, Ci.nsISupportsString).data; // try in case it's a localized string (will throw an exception if not) + // if (!services.get("pref").prefIsLocked(name) && !services.get("pref").prefHasUserValue(name) && RegExp("chrome://.+/locale/.+\\.properties").test(value)) value = branch.getComplexValue(name, Ci.nsIPrefLocalizedString).data; From d3d8e21fa9d6fe68d1da47fbc5652d815c3a09f2 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 18 Feb 2009 00:17:17 +0900 Subject: [PATCH 62/85] Remove empty comment eb9211b894f384c7a6fda21fd0219378c6e8643f --- common/content/options.js | 1 - 1 file changed, 1 deletion(-) diff --git a/common/content/options.js b/common/content/options.js index 7c1df76f..1442ce23 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -379,7 +379,6 @@ function Options() //{{{ case Ci.nsIPrefBranch.PREF_STRING: let value = branch.getComplexValue(name, Ci.nsISupportsString).data; // try in case it's a localized string (will throw an exception if not) - // if (!services.get("pref").prefIsLocked(name) && !services.get("pref").prefHasUserValue(name) && RegExp("chrome://.+/locale/.+\\.properties").test(value)) value = branch.getComplexValue(name, Ci.nsIPrefLocalizedString).data; From 60509096b373254e6c976c4c60b5c541e0994b2c Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 18 Feb 2009 17:45:56 +0900 Subject: [PATCH 63/85] Changed the behavior when commandline.input was canceled. When commandline.input is canceled, should not do callback to act like Vim, --- common/content/ui.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/common/content/ui.js b/common/content/ui.js index f9b90b4f..6fdf8239 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -529,7 +529,7 @@ function CommandLine() //{{{ autocompleteTimer.tell(false); }); - liberator.registerCallback("cancel", modes.PROMPT, closePrompt); + liberator.registerCallback("cancel", modes.PROMPT, cancelPrompt); liberator.registerCallback("submit", modes.PROMPT, closePrompt); liberator.registerCallback("change", modes.PROMPT, function (str) { if (input.complete) @@ -542,6 +542,14 @@ function CommandLine() //{{{ context.fork("input", 0, commandline, input.complete); }); + function cancelPrompt(value) + { + let callback = input.cancel; + input = {}; + if (callback) + callback.call(commandline, value != null ? value : commandline.command); + } + function closePrompt(value) { let callback = input.submit; @@ -1202,6 +1210,7 @@ function CommandLine() //{{{ submit: callback, change: extra.onChange, complete: extra.completer, + cancel: extra.onCancel, }; modes.push(modes.COMMAND_LINE, modes.PROMPT); From 4a475bb234d8c9ede15df4f32b0a19d12a551d83 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 18 Feb 2009 21:20:43 +0900 Subject: [PATCH 64/85] Fix for f09dc06283bef36e99e315b57acd16879c036410 --- common/content/hints.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/hints.js b/common/content/hints.js index d349ce58..cf877078 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -575,7 +575,7 @@ function Hints() //{{{ function (count) { extendedhintCount = count; - commandline.input(";", function (arg) { setTimeout(function () hints.show(arg), 0); }, + commandline.input(";", null, { promptHighlight: "Normal", completer: function (context) @@ -583,7 +583,8 @@ function Hints() //{{{ context.compare = function () 0; context.completions = [[k, v.prompt] for ([k, v] in Iterator(hintModes))]; }, - onChange: function () { modes.pop() } + onChange: function () { modes.pop() }, + onCancel: function (arg) { arg && setTimeout(function () hints.show(arg), 0); }, }); }, { flags: Mappings.flags.COUNT }); From 7b9dfd207065cd697aa2843cab8c87f865b7cee6 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 17 Feb 2009 19:17:33 +1100 Subject: [PATCH 65/85] Whitespace fix. --- common/content/events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/events.js b/common/content/events.js index a8d6290c..8d25106d 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1054,7 +1054,7 @@ function Events() //{{{ // else if (liberator.has("MacUnix") && event.ctrlKey && event.charCode >= 27 && event.charCode <= 31) { - if(event.charCode == 27) // [Ctrl-Bug 1/5] the bug + if (event.charCode == 27) // [Ctrl-Bug 1/5] the bug { key = "Esc"; modifier = modifier.replace("C-", ""); From 926355a7ec89023e19e7a0db54518abc44f8f568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Date: Tue, 17 Feb 2009 04:57:27 +0100 Subject: [PATCH 66/85] A number of minor fixes in help files. Mostly typos/omissions/markup errors, more remarkable e. g. changing 'b' to 'B' in tutorial reflecting a change from 1.2. Also uncommented [macros] section in asciidoc.conf (is that right?). Signed-off-by: Doug Kearns --- vimperator/locale/en-US/asciidoc.conf | 3 ++- vimperator/locale/en-US/autocommands.txt | 6 ++--- vimperator/locale/en-US/browsing.txt | 22 +++++++++---------- vimperator/locale/en-US/buffer.txt | 16 +++++++------- vimperator/locale/en-US/developer.txt | 4 ++-- vimperator/locale/en-US/gui.txt | 2 +- vimperator/locale/en-US/map.txt | 28 ++++++++++++------------ vimperator/locale/en-US/marks.txt | 6 ++--- vimperator/locale/en-US/options.txt | 19 ++++++++-------- vimperator/locale/en-US/pattern.txt | 2 +- vimperator/locale/en-US/repeat.txt | 6 ++--- vimperator/locale/en-US/styling.txt | 16 +++++++------- vimperator/locale/en-US/tabs.txt | 8 +++---- vimperator/locale/en-US/tutorial.txt | 8 +++---- vimperator/locale/en-US/various.txt | 2 +- 15 files changed, 74 insertions(+), 74 deletions(-) diff --git a/vimperator/locale/en-US/asciidoc.conf b/vimperator/locale/en-US/asciidoc.conf index 8656b2dc..4bcc4288 100644 --- a/vimperator/locale/en-US/asciidoc.conf +++ b/vimperator/locale/en-US/asciidoc.conf @@ -28,7 +28,7 @@ HEADER=
[count] \[!\]=[!] -# [macros] +[macros] # section:Introduction[tag1,tag2] (?su)(?.+?)\|(?!\+)=section # help:helptext[href] @@ -56,6 +56,7 @@ HEADER=
|| ________________________________________________________________________________ Decrements the last number in URL by 1, or by [count] if given. Negative -numbers are not supported, as this not generally useful, so the number cannot +numbers are not supported, as this is not generally useful, so the number cannot be decremented past 0. ________________________________________________________________________________ @@ -160,22 +160,22 @@ ________________________________________________________________________________ section:Navigating[navigating] |H| || |CTRL-O| |:ba| |:back| -||:[count]ba[ck] {url}|| + +||:[count]ba[ck] [url]|| + ||:ba[ck]!|| + ||CTRL-o|| ________________________________________________________________________________ -Go [count] pages back in the browser history. If {url} is specified go back to +Go [count] pages back in the browser history. If [url] is specified go back to the first matching URL. The special version [c]:back![c] goes to the beginning of the browser history. ________________________________________________________________________________ |L| || |CTRL-i| |:fo| |:fw| |:forward| -||:[count]fo[rward] {url}|| + +||:[count]fo[rward] [url]|| + ||:fo[rward]!|| + ||CTRL-i|| ________________________________________________________________________________ -Go [count] pages forward in the browser history. If {url} is specified go +Go [count] pages forward in the browser history. If [url] is specified go forward to the first matching URL. The special version [c]:forward![c] goes to the end of the browser history. ________________________________________________________________________________ @@ -311,7 +311,7 @@ ________________________________________________________________________________ ||:xa[ll]|| ________________________________________________________________________________ Save the session and quit. Quit Vimperator, no matter how many tabs/windows -are open. The session is stored. [c]:wq[c] is different as in Vim, as it +are open. The session is stored. [c]:wq[c] is different from Vim, as it closes the window instead of just one tab by popular demand. Complain on the mailing list, if you want to change that. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/buffer.txt b/vimperator/locale/en-US/buffer.txt index 86c3c259..91022f27 100644 --- a/vimperator/locale/en-US/buffer.txt +++ b/vimperator/locale/en-US/buffer.txt @@ -243,28 +243,28 @@ between 0 and 1, not as a percentage. |+| |zi| + ||[count]zi|| ________________________________________________________________________________ -Enlarge text zoom of current web page. Mnemonic: zoom in +Enlarge text zoom of current web page. Mnemonic: zoom in. ________________________________________________________________________________ |zm| + ||[count]zm|| ________________________________________________________________________________ -Enlarge text zoom of current web page by a larger amount. Mnemonic: zoom more +Enlarge text zoom of current web page by a larger amount. Mnemonic: zoom more. ________________________________________________________________________________ |-| |zo| + ||[count]zo|| ________________________________________________________________________________ -Reduce text zoom of current web page. Mnemonic: zoom out +Reduce text zoom of current web page. Mnemonic: zoom out. ________________________________________________________________________________ |zr| + ||[count]zr|| ________________________________________________________________________________ -Reduce text zoom of current web page by a larger amount. Mnemonic: zoom reduce +Reduce text zoom of current web page by a larger amount. Mnemonic: zoom reduce. ________________________________________________________________________________ @@ -279,28 +279,28 @@ ________________________________________________________________________________ |zI| + ||[count]zI|| ________________________________________________________________________________ -Enlarge full zoom of current web page. Mnemonic: zoom in +Enlarge full zoom of current web page. Mnemonic: zoom in. ________________________________________________________________________________ |zM| + ||[count]zM|| ________________________________________________________________________________ -Enlarge full zoom of current web page by a larger amount. Mnemonic: zoom more +Enlarge full zoom of current web page by a larger amount. Mnemonic: zoom more. ________________________________________________________________________________ |zO| + ||[count]zO|| ________________________________________________________________________________ -Reduce full zoom of current web page. Mnemonic: zoom out +Reduce full zoom of current web page. Mnemonic: zoom out. ________________________________________________________________________________ |zR| + ||[count]zR|| ________________________________________________________________________________ -Reduce full zoom of current web page by a larger amount. Mnemonic: zoom reduce +Reduce full zoom of current web page by a larger amount. Mnemonic: zoom reduce. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/developer.txt b/vimperator/locale/en-US/developer.txt index 13757c3d..91c6210b 100644 --- a/vimperator/locale/en-US/developer.txt +++ b/vimperator/locale/en-US/developer.txt @@ -4,8 +4,8 @@ section:Writing{nbsp}documentation[writing-docs,documentation] For every new feature, writing documentation is _mandatory_ for the patch to be accepted. The docs are written in -http://www.methods.co.nz/asciidoc/index.html[asciidoc] version 8.x or -newer. The are placed in the _src/locale/en-US/_ directory and compiled with +http://www.methods.co.nz/asciidoc/index.html[asciidoc] version 8.2.x. +They are placed in the _src/locale/en-US/_ directory and compiled with _make doc_. Please refer to the http://www.methods.co.nz/asciidoc/userguide.html[asciidoc documentation] above for details. Usually you can just write text as is, and mostly it will be diff --git a/vimperator/locale/en-US/gui.txt b/vimperator/locale/en-US/gui.txt index 0b1f5102..4da826c5 100644 --- a/vimperator/locale/en-US/gui.txt +++ b/vimperator/locale/en-US/gui.txt @@ -3,7 +3,7 @@ HEADER |gui| + Although Vimperator offers the most frequently used Firefox functionality via -Ex and normal-mode commands there may be times when directly accessing the GUI +Ex and Normal mode commands there may be times when directly accessing the GUI is required. There are commands for accessing the menu system, standard dialogs and the sidebar. diff --git a/vimperator/locale/en-US/map.txt b/vimperator/locale/en-US/map.txt index 5dcd49ae..36a8c37b 100644 --- a/vimperator/locale/en-US/map.txt +++ b/vimperator/locale/en-US/map.txt @@ -12,7 +12,7 @@ which are translated to a string of characters. Example: will echo the current date to the command line when [m][m] is pressed. -There are separate key mapping tables for each of the Normal, Insert, +There are separate key mapping tables for each of the Normal, Insert, and Command-line modes. |:map-special-chars| + @@ -29,7 +29,7 @@ ________________________________________________________________________________ |||| ________________________________________________________________________________ Expand to a line terminator in a key mapping. An Ex command in the {rhs} of a -mapping requires a a line terminator after it so that it is executed when the +mapping requires a line terminator after it so that it is executed when the mapping is expanded. [m][m] should be used for this purpose. ________________________________________________________________________________ @@ -57,7 +57,7 @@ ________________________________________________________________________________ Map the key sequence {lhs} to {rhs}. The {rhs} is remapped, allowing for nested and recursive mappings. -Warning: Mappings are NOT saved during sessions, make sure you put them in your +Warning: Mappings are NOT saved between sessions, make sure you put them in your vimperatorrc file! ________________________________________________________________________________ @@ -70,7 +70,7 @@ ________________________________________________________________________________ Map the key sequence {lhs} to {rhs} (in Command-line mode). The {rhs} is remapped, allowing for nested and recursive mappings. -Warning: Mappings are NOT saved during sessions, make sure you put them in your +Warning: Mappings are NOT saved between sessions, make sure you put them in your vimperatorrc file! ________________________________________________________________________________ @@ -80,10 +80,10 @@ ________________________________________________________________________________ ||:imap {lhs}|| + ||:imap|| ________________________________________________________________________________ -Map the key sequence {lhs} to {rhs} (in insert mode). The {rhs} is remapped, +Map the key sequence {lhs} to {rhs} (in Insert mode). The {rhs} is remapped, allowing for nested and recursive mappings. -Warning: Mappings are NOT saved during sessions, make sure you put them in your +Warning: Mappings are NOT saved between sessions, make sure you put them in your vimperatorrc file! ________________________________________________________________________________ @@ -107,7 +107,7 @@ ________________________________________________________________________________ |:imapc| |:imapclear| + ||:imapc[lear]|| ________________________________________________________________________________ -Remove all mappings (in insert mode). All user-defined mappings which were set +Remove all mappings (in Insert mode). All user-defined mappings which were set by [c]:imap[c] or [c]:inoremap[c] are cleared. ________________________________________________________________________________ @@ -136,7 +136,7 @@ ________________________________________________________________________________ ||:ino[remap] {lhs}|| + ||:ino[remap]|| ________________________________________________________________________________ -Map the key sequence {lhs} to {rhs} (in insert mode). No remapping of the +Map the key sequence {lhs} to {rhs} (in Insert mode). No remapping of the {rhs} is performed. ________________________________________________________________________________ @@ -167,7 +167,7 @@ ________________________________________________________________________________ |:iunm| |:iunmap| + ||:iunm[ap] {lhs}|| ________________________________________________________________________________ -Remove the mapping of {lhs} (in insert mode). +Remove the mapping of {lhs} (in Insert mode). ________________________________________________________________________________ section:Abbreviations[abbreviations] @@ -178,8 +178,8 @@ words. An abbreviation can be one of three types that are defined by the types of constituent characters. Whitespace and quotes are non-keyword types, and all other characters are keyword types. -1. A "full-id" abbreviation consists entirely of characters that are not -keyword characters (e.g., "teh", "msoft"). +1. A "full-id" abbreviation consists entirely of keyword characters +(e.g., "teh", "msoft"). 2. An "end-id" abbreviation ends in keyword character but otherwise contains all non-keyword characters (e.g., "'i"). @@ -304,7 +304,7 @@ The valid values are: *-nargs=1* One argument is allowed *-nargs=** Zero or more arguments are allowed *-nargs=?* Zero or one argument is allowed -*-nargs=+* One or more argument is allowd +*-nargs=+* One or more arguments are allowed -------------------------------------------------------------------------------- |E180| |E181| |:command-complete| + @@ -365,7 +365,7 @@ available for expansion as in the argument. |:command-bang| + Special cases -By default a user command does not have a special version. i.e. a version +By default a user command does not have a special version, i.e. a version executed with the ! modifier. Providing the -bang attribute will enable this and will be available in the argument. @@ -379,7 +379,7 @@ is then executed as an Ex command. The valid escape sequences are: `----------`-------------------------------------------------------------------- ** The command arguments exactly as supplied -** Any supplied count E.g. 5 +** Any supplied count, e.g. 5 ** ! if the command was executed with the ! modifier ** A literal '<' character to allow for a literal copy of one of the escape sequences. E.g. args> will expand to a literal -------------------------------------------------------------------------------- diff --git a/vimperator/locale/en-US/marks.txt b/vimperator/locale/en-US/marks.txt index 61ee2049..837268be 100644 --- a/vimperator/locale/en-US/marks.txt +++ b/vimperator/locale/en-US/marks.txt @@ -6,7 +6,7 @@ Vimperator supports a number of different marks: - Bookmarks which allow you to mark a web page as one of your favorites for easy access. -- QuickMarks allow you to define up to 62 (a-zA-Z0-9) web sites (or group of +- QuickMarks allow you to define up to 62 (a-zA-Z0-9) web sites (or groups of web sites) which you visit most often. - Local marks to store the position within a web page. - History is also a special type of marks, as Vimperator automatically @@ -40,7 +40,7 @@ ____________________________________________________________________________ ||A|| ________________________________________________________________________________ Toggle bookmarked state of current URL. Add/remove a bookmark for the current -location, depending if it already is bookmarked or not. In contrast to the +location, depending on if it is already bookmarked or not. In contrast to the [c]:bmark[c] command, the bookmark is just _starred_ which means it is placed in the _Unfiled Bookmarks Folder_ instead of the bookmarks menu. ________________________________________________________________________________ @@ -242,7 +242,7 @@ ________________________________________________________________________________ |:marks| + ||:marks [a][arg][a]|| ________________________________________________________________________________ -Show all location marks of current web page. If [a][arg][a] is specified then +Show all location marks of the current web page. If [a][arg][a] is specified then limit the list to those marks mentioned. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index 35b9ae6b..92c5abae 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -22,7 +22,7 @@ ____ ||:se[t] all|| ____ -Show all options. Show all options. +Show all options. ____ |E518| |E519| @@ -125,7 +125,7 @@ ____ ||:setl[ocal] {option}-={value}|| + ____ -The same as [c]:set[c] command, but it operates for current tab options +The same as [c]:set[c] command, but operates on current tab options only. See [c]:set[c] for details. ____ @@ -144,7 +144,7 @@ ____ ||:setg[lobal] {option}-={value}|| + ____ -The same as [c]:set[c] command, but it operates on global options only. +The same as [c]:set[c] command, but operates on global options only. See [c]:set[c] for details. ____ @@ -377,7 +377,7 @@ Change the behaviour of [m][m] in hint mode. Possible values: *0* Follow the first hint as soon as typed text uniquely identifies it. Follow the selected hint on [m][m]. *1* Follow the selected hint on [m][m]. -*2* Follow the selected hint on [m][m] only it's been [m][m]-selected. +*2* Follow the selected hint on [m][m] only if it's been [m][m]-selected. --------------------------------------------------------------------- ____ @@ -651,7 +651,7 @@ ____ |\'ssli'| |\'showstatuslinks'| ||'showstatuslinks' 'ssli'|| number (default: 1) ____ -Show the destination of the link under the cursor in the status bar +Show the destination of the link under the cursor in the status bar. Also links which are focused by keyboard commands like [m][m] are shown. Possible values: .---`-------------------------------------- @@ -689,7 +689,7 @@ ____ ||'suggestengines' || stringlist (default: "google") ____ Set the search engines which can be used for completion suggestions. -Add "S" to the 'complete' option if you want use this feature. +Add "S" to the 'complete' option if you want to use this feature. Warning: This feature could make tab-completion slower because it needs to wait for changes, so use it only if you have a fast internet connection. @@ -744,8 +744,7 @@ ____ ||'visualbell' 'vb'|| boolean (default: off) ____ Use visual bell instead of beeping on errors. The visual bell style is -controlled by [c]:hi Bell[c]. If no bell is desired use [c]:set t_vb=[c] -together with this option. +controlled by [c]:hi Bell[c]. ____ @@ -776,7 +775,7 @@ ____ |\'wim'| |\'wildmode'| ||'wildmode' 'wim'|| stringlist (default: "list:full") ____ -Define how command-line completion works. +Defines how command-line completion works. It is a comma-separated list of parts, where each part specifies what to do for each consecutive use of the completion key. The first part specifies the behavior for the first use of the completion key, @@ -788,7 +787,7 @@ These are the possible values for each part: "full" Complete the next full match. After the last, the original string is used. "longest" Complete till the longest common string. "list" When more than one match, list all matches. -"list:full" When more than one match, list all matches and complete first match. +"list:full" When more than one match, list all matches and complete the first match. "list:longest" When more than one match, list all matches and complete till the longest common string. \ When there is only a single match, it is fully completed regardless of the case. ----------------------------------------- diff --git a/vimperator/locale/en-US/pattern.txt b/vimperator/locale/en-US/pattern.txt index 33e6ac17..6462a897 100644 --- a/vimperator/locale/en-US/pattern.txt +++ b/vimperator/locale/en-US/pattern.txt @@ -8,7 +8,7 @@ commands as Firefox does not provide native regexp support. It is unlikely that this will ever be available. |/| + -||/\\{pattern\\}[/]|| + +||/{pattern}[/]|| + ________________________________________________________________________________ Search forward for the first occurrence of {pattern}. diff --git a/vimperator/locale/en-US/repeat.txt b/vimperator/locale/en-US/repeat.txt index 43d39f41..2817c980 100644 --- a/vimperator/locale/en-US/repeat.txt +++ b/vimperator/locale/en-US/repeat.txt @@ -7,7 +7,7 @@ Vimperator can repeat a number of commands and record macros. section:Macros[macros,complex-repeat] |q| -||q {0-9a-zA-Z}|| + +||q{0-9a-zA-Z}|| + ____________________________________________________________________________ Record a key sequence into a macro. Available macros are {0-9a-zA-Z} (uppercase to append). @@ -49,7 +49,7 @@ ____________________________________________________________________________ |.| -||[count].| +||[count].|| ____________________________________________________________________________ Repeat the last keyboard mapping [count] times. Note that, unlike in Vim, this does not apply solely to editing commands, mainly because Vimperator doesn't @@ -104,7 +104,7 @@ ________________________________________________________________________________ |:ru| |:runtime| -||:runt[ime][!]| {file} ...|| + +||:runt[ime][!] {file} ...|| + ________________________________________________________________________________ Source the specified file from each directory in 'runtimepath'. Example: + [c]:runtime plugin/foobar.vimp[c] + diff --git a/vimperator/locale/en-US/styling.txt b/vimperator/locale/en-US/styling.txt index 2577c65e..a4ba91a2 100644 --- a/vimperator/locale/en-US/styling.txt +++ b/vimperator/locale/en-US/styling.txt @@ -18,7 +18,7 @@ sourced. ________________________________________________________________________________ |:hi| |:highlight| + -||:hi[ghlight] [-append] {group}[{selector}] [{css}]|| + +||:hi[ghlight][!] [-append] {group}[{selector}] [{css}]|| + ________________________________________________________________________________ Highlight {group} with {css}. Normally, {css} is checked for valid syntax before it's applied. Once you're certain it's @@ -86,7 +86,7 @@ Valid groups are: ------------------------------------------------------- Every invocation completely replaces the styling of any previous invocation, -unless [-append] (short option: -a) is provided, in which case, {css} is +unless *-append* (short option: *-a*) is provided, in which case {css} is appended to its current value. If {css} is not provided, any styles matching {group} are listed. ________________________________________________________________________________ @@ -103,12 +103,12 @@ ________________________________________________________________________________ ||:sty[le][!] [-name={name}] [-append] {filter} [{css}]|| + ________________________________________________________________________________ Add CSS styles to the browser or to web pages. {filter} is a comma -separated list of URLs to match. URLs ending with [c]*[c] are matched as -prefixes, URLs not containing any [c]:[c] or [c]/[c] characters are +separated list of URLs to match. URLs ending with *\** are matched as +prefixes, URLs not containing any *:* or */* characters are matched as domains. If {name} (short option: [c]-n[c]) is provided, any existing style with the same name is overridden, and the style may later -be deleted using {name}. If -append (short option: [c]-a[c]) is provided -along with [c]-name[c], {css} and {filter} are appended to its current +be deleted using {name}. If *-append* (short option: *-a*) is provided +along with *-name*, {css} and {filter} are appended to its current value. If {css} isn't provided, matching styles are listed. @@ -123,9 +123,9 @@ style for [c]www.google.com,mozilla.org[c], will result in a style for [c]www.google.com[c]. The available options are: * [c]-name[c]: The name provided to [c]:style[c] (short option: - [c]-n[c]) + *-n*) * [c]-index[c]: For unnamed styles, the index listed by [c]:style[c] - (short option: [c]-i[c]) + (short option: *-i*) ________________________________________________________________________________ // vim: set filetype=asciidoc: diff --git a/vimperator/locale/en-US/tabs.txt b/vimperator/locale/en-US/tabs.txt index 3305e05d..9ccded72 100644 --- a/vimperator/locale/en-US/tabs.txt +++ b/vimperator/locale/en-US/tabs.txt @@ -101,7 +101,7 @@ buffer, it is selected. With [!] the next buffer matching the argument is selected, even if it cannot be identified uniquely. Use [m]b[m] as a shortcut to open this prompt. -If argument is [a]#[a], the alternate buffer will be selected (see [m][m]). +If argument is [a]\#[a], the alternate buffer will be selected (see [m][m]). If no argument is given the current buffer remains current. ________________________________________________________________________________ @@ -153,7 +153,7 @@ ________________________________________________________________________________ ||:[count]bn[ext] [count]|| + ________________________________________________________________________________ Switch to the next or [count]th tab. Cycles to the first tab when the last is -selected and {count} is not specified. +selected and [count] is not specified. ________________________________________________________________________________ @@ -203,8 +203,8 @@ ________________________________________________________________________________ ||:[count]u[ndo] [a][url][a]|| + ||[count]u|| ________________________________________________________________________________ -Undo closing of a tab. If a count is given, don't close the last but the -[count]th last tab. With [a][url][a] restores the tab matching the URL. +Undo closing of a tab. If a count is given, don't undo the last but the +[count]th last closed tab. With [a][url][a] restores the tab matching the URL. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/tutorial.txt b/vimperator/locale/en-US/tutorial.txt index a3cf8005..f7766ec8 100644 --- a/vimperator/locale/en-US/tutorial.txt +++ b/vimperator/locale/en-US/tutorial.txt @@ -15,7 +15,7 @@ bare-looking window. The menubar, navigation bar, and bookmark bars are hidden. In case you missed the notice in the help:Introduction[intro.html], you can regain these by issuing the command - :set go+=mTb + :set go+=mTB where [m][m] represents pressing the or key. If you're a veteran Vim user, this may look familiar. It should. @@ -39,7 +39,7 @@ The other core mode of Vimperator, command-line mode, can be entered from normal mode by typing a \':' (colon). You will frequently see Vimperator commands start with a \':', indicating that what follows is a command. -To return to normal mode command-line mode, type [m][m]. Pressing +To return to normal mode from command-line mode, type [m][m]. Pressing [m][m] will also return you to normal mode from most other modes in Vimperator. @@ -73,7 +73,7 @@ The efficiency of Vimperator, as with the legendary editor it was inspired by, relies on the user being able to keep his fingers on the keyboard where they can do the most good. While there are some areas where the mouse is clearly superior at, such as GUI design or some games, Vimperator acts on the -assumption that the web browser doesn't have to be one of those. +assumption that a web browser doesn't have to be one of those. Here are some areas where the mouse is typically considered indisposable, and how Vimperator challenges this preconception. @@ -116,7 +116,7 @@ Vimmers. To open a web page in a new tab, use the [c]:tabopen {url}[c]. To open a URL in the current tab, use [c]:open[c]. The normal mode mappings [m]t[m] and [m]o[m], -respectively, map to these commands, so the following pairs sequences are +respectively, map to these commands, so the following pairs of sequences are equivalent: :open my.webmail.com diff --git a/vimperator/locale/en-US/various.txt b/vimperator/locale/en-US/various.txt index e8533445..34168638 100644 --- a/vimperator/locale/en-US/various.txt +++ b/vimperator/locale/en-US/various.txt @@ -21,7 +21,7 @@ ________________________________________________________________________________ Execute Normal mode commands {commands}. This makes it possible to execute Normal mode commands typed on the command line. {commands} is executed like it is typed. If the [!] is given, mappings will not be used. {commands} should be -a complete command. {commands} cannot start with a space. Put a 1 (one) before +a complete command. {commands} cannot start with a space. Put 1 space before it, 1 space is one space. ________________________________________________________________________________ From faa928f957d1d3d869f81b41b7824c6cb1c73ff0 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 19 Feb 2009 12:53:03 +1100 Subject: [PATCH 67/85] Add stepnem to AUTHORS and whitespace fixes in help. --- vimperator/AUTHORS | 3 ++- vimperator/locale/en-US/browsing.txt | 2 +- vimperator/locale/en-US/developer.txt | 2 +- vimperator/locale/en-US/map.txt | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/vimperator/AUTHORS b/vimperator/AUTHORS index 8d89467e..62302ec0 100644 --- a/vimperator/AUTHORS +++ b/vimperator/AUTHORS @@ -1,4 +1,4 @@ -Main developer/Project founder: +Main developer/Project founder: * Martin Stubenschrott (stubenschrott@gmx.net) Developers: @@ -33,3 +33,4 @@ Patches (in no special order): * Raimon Grau Cuscó (document relationship navigation - ]], [[) * Ryan Zheng (ctrl-x/a support) * Dan Boger (:set online support) + * Štěpán Němec (help copy-editing and favicon support) diff --git a/vimperator/locale/en-US/browsing.txt b/vimperator/locale/en-US/browsing.txt index df874b6c..9b44fa8a 100644 --- a/vimperator/locale/en-US/browsing.txt +++ b/vimperator/locale/en-US/browsing.txt @@ -86,7 +86,7 @@ ________________________________________________________________________________ |:tabd| |:tabduplicate| ||:[count]tabd[uplicate][!]|| + ________________________________________________________________________________ -Duplicates current tab [count] times. Uses *tabopen* value of the 'activate' +Duplicates current tab [count] times. Uses *tabopen* value of the 'activate' option to determine if the last cloned tab should be activated. When used with [!], *tabopen* value is negated. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/developer.txt b/vimperator/locale/en-US/developer.txt index 91c6210b..cf875d82 100644 --- a/vimperator/locale/en-US/developer.txt +++ b/vimperator/locale/en-US/developer.txt @@ -4,7 +4,7 @@ section:Writing{nbsp}documentation[writing-docs,documentation] For every new feature, writing documentation is _mandatory_ for the patch to be accepted. The docs are written in -http://www.methods.co.nz/asciidoc/index.html[asciidoc] version 8.2.x. +http://www.methods.co.nz/asciidoc/index.html[asciidoc] version 8.2.x. They are placed in the _src/locale/en-US/_ directory and compiled with _make doc_. Please refer to the http://www.methods.co.nz/asciidoc/userguide.html[asciidoc documentation] above diff --git a/vimperator/locale/en-US/map.txt b/vimperator/locale/en-US/map.txt index 36a8c37b..4e9af03a 100644 --- a/vimperator/locale/en-US/map.txt +++ b/vimperator/locale/en-US/map.txt @@ -178,7 +178,7 @@ words. An abbreviation can be one of three types that are defined by the types of constituent characters. Whitespace and quotes are non-keyword types, and all other characters are keyword types. -1. A "full-id" abbreviation consists entirely of keyword characters +1. A "full-id" abbreviation consists entirely of keyword characters (e.g., "teh", "msoft"). 2. An "end-id" abbreviation ends in keyword character but otherwise From bc2c4d896f02e58059e1887c9195733683974c8c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 19 Feb 2009 13:00:26 +1100 Subject: [PATCH 68/85] Remove 't_vb' from Vim syntax files. --- muttator/contrib/vim/syntax/muttator.vim | 4 ++-- vimperator/NEWS | 2 +- vimperator/contrib/vim/syntax/vimperator.vim | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/muttator/contrib/vim/syntax/muttator.vim b/muttator/contrib/vim/syntax/muttator.vim index 28961f19..296fbd34 100644 --- a/muttator/contrib/vim/syntax/muttator.vim +++ b/muttator/contrib/vim/syntax/muttator.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Muttator configuration file " Maintainer: Doug Kearns -" Last Change: 2009 Jan 22 +" Last Change: 2009 Feb 19 if exists("b:current_syntax") finish @@ -46,7 +46,7 @@ syn region muttatorSet matchgroup=muttatorCommand start="\%(^\s*:\=\)\@<=\<\%(se syn keyword muttatorOption archivefolder cdpath cd complete cpt editor eventignore ei extendedhinttags eht followhints fh \ guioptions go helpfile hf hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls layout messages msgs \ nextpattern pageinfo pa previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf showstatuslinks ssli - \ showtabline stal suggestengines t_vb urlseparator verbose vbs wildcase wic wildignore wig wildmode wim wildoptions wop + \ showtabline stal suggestengines urlseparator verbose vbs wildcase wic wildignore wig wildmode wim wildoptions wop \ wordseparators wsp \ contained nextgroup=muttatorSetMod diff --git a/vimperator/NEWS b/vimperator/NEWS index ab8479c5..ee0079c8 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -53,7 +53,7 @@ * much improved completion support, including javascript, option, and search keyword * add / and / command-line mappings for selecting the previous and next history items - * remove 'hintstyle', 'hlsearchstyle' and 'visualbellstyle' - use + * remove 'hintstyle', 'hlsearchstyle', 't_vb' and 'visualbellstyle' - use :highlight {Hint,Search,Bell} * add :highlight * add :optionusage diff --git a/vimperator/contrib/vim/syntax/vimperator.vim b/vimperator/contrib/vim/syntax/vimperator.vim index aadf47b8..aebd6fc1 100644 --- a/vimperator/contrib/vim/syntax/vimperator.vim +++ b/vimperator/contrib/vim/syntax/vimperator.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: VIMperator configuration file " Maintainer: Doug Kearns -" Last Change: 2008 Jan 22 +" Last Change: 2009 Feb 19 if exists("b:current_syntax") finish @@ -48,7 +48,7 @@ syn region vimperatorSet matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\<\ syn keyword vimperatorOption activate act cdpath cd complete cpt defsearch ds editor eventignore ei extendedhinttags eht \ followhints fh guioptions go helpfile hf hintmatching hm hinttags ht hinttimeout hto history hi laststatus ls messages msgs \ newtab nextpattern pageinfo pa popups pps previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf - \ showstatuslinks ssli showtabline stal suggestengines t_vb titlestring urlseparator verbose vbs wildcase wic wildignore wig + \ showstatuslinks ssli showtabline stal suggestengines titlestring urlseparator verbose vbs wildcase wic wildignore wig \ wildmode wim wildoptions wop wordseparators wsp \ contained nextgroup=vimperatorSetMod From 7d4a3ae1b8a20dea9a4be56d9fcebc00c169b02b Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 19 Feb 2009 13:15:46 +1100 Subject: [PATCH 69/85] Update AUTHORS. --- vimperator/AUTHORS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vimperator/AUTHORS b/vimperator/AUTHORS index 62302ec0..8d939af8 100644 --- a/vimperator/AUTHORS +++ b/vimperator/AUTHORS @@ -1,4 +1,4 @@ -Main developer/Project founder: +Main developer/Project founder: * Martin Stubenschrott (stubenschrott@gmx.net) Developers: @@ -7,6 +7,10 @@ Developers: * Tim Hammerquist (penryu@gmail.com) * Konstantin Stepanov (milezv@yandex.ru) * Kris Maglione + * Ted Pavlic + * anekos + * teramako + * janus_wel Inactive/former developers: * Viktor Kojouharov (Виктор Кожухаров) From f1a4464e769640cb0dc7faa4670ccde9ae204e9e Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 19 Feb 2009 22:56:05 +1100 Subject: [PATCH 70/85] Normalise the capitalisation of mode names in the help. --- vimperator/locale/en-US/cmdline.txt | 6 ++--- vimperator/locale/en-US/index.txt | 40 ++++++++++++++-------------- vimperator/locale/en-US/insert.txt | 6 ++--- vimperator/locale/en-US/intro.txt | 2 +- vimperator/locale/en-US/options.txt | 6 ++--- vimperator/locale/en-US/starting.txt | 2 +- vimperator/locale/en-US/tutorial.txt | 20 +++++++------- vimperator/locale/en-US/various.txt | 6 ++--- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/vimperator/locale/en-US/cmdline.txt b/vimperator/locale/en-US/cmdline.txt index a0499e6e..9eabc590 100644 --- a/vimperator/locale/en-US/cmdline.txt +++ b/vimperator/locale/en-US/cmdline.txt @@ -8,7 +8,7 @@ Command-line mode is used to enter Ex commands (":") and text search patterns |:| + ||:|| ________________________________________________________________________________ -Start command-line mode. In command-line mode, you can perform extended +Start Command-line mode. In Command-line mode, you can perform extended commands, which may require arguments. ________________________________________________________________________________ @@ -18,14 +18,14 @@ section:Command-line{nbsp}editing[cmdline-editing] |c_| + |||| ________________________________________________________________________________ -Quit command-line mode without executing. +Quit Command-line mode without executing. ________________________________________________________________________________ |c_| + |||| ________________________________________________________________________________ -Expand a command-line abbreviation. +Expand a Command-line abbreviation. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index ceefea0b..5a6a2fbb 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -7,7 +7,7 @@ This file contains a list of all available commands. section:Insert{nbsp}mode[insert-index] ||[m][m]|| Launch the external editor + -||[m][m]|| Expand an insert-mode abbreviation + +||[m][m]|| Expand an Insert-mode abbreviation + section:Normal{nbsp}mode[normal-index] @@ -56,7 +56,7 @@ section:Normal{nbsp}mode[normal-index] ||[m]d[m]|| Delete current buffer + ||[m]f[m]|| Start QuickHint mode + ||[m]h[m]|| Scroll document to the left + -||[m]i[m]|| Start caret mode + +||[m]i[m]|| Start Caret mode + ||[m]j[m]|| Scroll document down + ||[m]k[m]|| Scroll document up + ||[m]l[m]|| Scroll document to the right + @@ -72,7 +72,7 @@ section:Normal{nbsp}mode[normal-index] ||[m];[m]|| Start an extended hint mode + -||[m]:[m]|| Enter command-line mode + +||[m]:[m]|| Enter Command-line mode + ||[m]~[m]|| Open home directory + @@ -129,7 +129,7 @@ section:Normal{nbsp}mode[normal-index] section:Command-line{nbsp}editing[ex-edit-index] -||[m][m]|| Quit command-line mode without executing + +||[m][m]|| Quit Command-line mode without executing + ||[m][m]|| Expand a command-line abbreviation + @@ -153,17 +153,17 @@ section:Ex{nbsp}commands[ex-cmd-index,:index] ||[c]:bmarks[c]|| List or open multiple bookmarks + ||[c]:buffer[c]|| Switch to a buffer + ||[c]:buffers[c]|| Show a list of all buffers + -||[c]:cabbrev[c]|| Abbreviate a key sequence in command-line mode + -||[c]:cabclear[c]|| Remove all abbreviations in command-line mode + +||[c]:cabbrev[c]|| Abbreviate a key sequence in Command-line mode + +||[c]:cabclear[c]|| Remove all abbreviations in Command-line mode + ||[c]:cd[c]|| Change the current directory + -||[c]:cmap[c]|| Map a key sequence in command-line mode + -||[c]:cmapclear[c]|| Remove all mappings in command-line mode + -||[c]:cnoremap[c]|| Map a key sequence without remapping keys in command-line mode + +||[c]:cmap[c]|| Map a key sequence in Command-line mode + +||[c]:cmapclear[c]|| Remove all mappings in Command-line mode + +||[c]:cnoremap[c]|| Map a key sequence without remapping keys in Command-line mode + ||[c]:colorscheme[c]|| Load a color scheme + ||[c]:comclear[c]|| Delete all user-defined commands + ||[c]:command[c]|| List and define commands + -||[c]:cunabbrev[c]|| Remove an abbreviation in command-line mode + -||[c]:cunmap[c]|| Remove a mapping in command-line mode + +||[c]:cunabbrev[c]|| Remove an abbreviation in Command-line mode + +||[c]:cunmap[c]|| Remove a mapping in Command-line mode + ||[c]:delbmarks[c]|| Delete a bookmark + ||[c]:delcommand[c]|| Delete the specified user-defined command + ||[c]:delmacros[c]|| Delete macros + @@ -186,13 +186,13 @@ section:Ex{nbsp}commands[ex-cmd-index,:index] ||[c]:help[c]|| Display help + ||[c]:highlight[c]|| Style Vimperator + ||[c]:history[c]|| Show recently visited URLs + -||[c]:iabbrev[c]|| Abbreviate a key sequence in insert mode + -||[c]:iabclear[c]|| Remove all abbreviations in insert mode + -||[c]:imap[c]|| Map a key sequence in insert mode + -||[c]:imapclear[c]|| Remove all mappings in insert mode + -||[c]:inoremap[c]|| Map a key sequence without remapping keys in insert mode + -||[c]:iunabbrev[c]|| Remove an abbreviation in insert mode + -||[c]:iunmap[c]|| Remove a mapping in insert mode + +||[c]:iabbrev[c]|| Abbreviate a key sequence in Insert mode + +||[c]:iabclear[c]|| Remove all abbreviations in Insert mode + +||[c]:imap[c]|| Map a key sequence in Insert mode + +||[c]:imapclear[c]|| Remove all mappings in Insert mode + +||[c]:inoremap[c]|| Map a key sequence without remapping keys in Insert mode + +||[c]:iunabbrev[c]|| Remove an abbreviation in Insert mode + +||[c]:iunmap[c]|| Remove a mapping in Insert mode + ||[c]:javascript[c]|| Run a JavaScript command through eval() + ||[c]:jumps[c]|| Show jumplist + ||[c]:let[c]|| Set or list a variable + @@ -268,8 +268,8 @@ section:Options[option-index] ||'eventignore'|| List of autocommand event names which should be ignored + ||'exrc'|| Allow reading of an RC file in the current directory + ||'extendedhinttags'|| XPath string of hintable elements activated by [m];[m] + -||'focuscontent'|| Try to stay in normal mode after loading a web page + -||'followhints'|| Change the behaviour of [m][m] in hint mode + +||'focuscontent'|| Try to stay in Normal mode after loading a web page + +||'followhints'|| Change the behaviour of [m][m] in Hints mode + ||'fullscreen'|| Show the current window fullscreen + ||'guioptions'|| Show or hide certain GUI elements like the menu or toolbar + ||'helpfile'|| Name of the main help file + diff --git a/vimperator/locale/en-US/insert.txt b/vimperator/locale/en-US/insert.txt index 67ff3d8c..c49d440e 100644 --- a/vimperator/locale/en-US/insert.txt +++ b/vimperator/locale/en-US/insert.txt @@ -4,12 +4,12 @@ HEADER Insert mode is used to enter text in text boxes and text areas. When 'insertmode' is set, focusing on a text area immediately switches to -insert mode. +Insert mode. |i| + ||i|| ________________________________________________________________________________ -Starts insert mode in text areas when 'insertmode' is not set. +Starts Insert mode in text areas when 'insertmode' is not set. ________________________________________________________________________________ @@ -24,7 +24,7 @@ ________________________________________________________________________________ |i_| + |||| ________________________________________________________________________________ -Expand an insert-mode abbreviation. +Expand an Insert-mode abbreviation. ________________________________________________________________________________ // vim: set filetype=asciidoc: diff --git a/vimperator/locale/en-US/intro.txt b/vimperator/locale/en-US/intro.txt index 7c666295..98c9a70d 100644 --- a/vimperator/locale/en-US/intro.txt +++ b/vimperator/locale/en-US/intro.txt @@ -98,7 +98,7 @@ section:Features[features] * QuickMarks support (quickly go to previously marked web pages with [m]go[m][a]\\{a-zA-Z0-9\\}[a]) * [c]:map[c] and [c]:command[c] support (and feedkeys() for script writers) * [c]:time[c] support for profiling -* Move the text cursor and select text with Vim keys and a visual mode +* Move the text cursor and select text with Vim keys and a Visual mode * External editor support * Macros to replay key strokes * AutoCommands to execute action on certain events diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index 92c5abae..ab367a7a 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -308,7 +308,7 @@ ____ ||'focuscontent' 'fc'|| boolean (default: off) ____ Focus the content after a page has loaded. This is useful, if you always -want to stay in normal mode when browsing between web sites. When "on", it +want to stay in Normal mode when browsing between web sites. When "on", it blurs any textbox which often is automatically focused on page load. If you usually like 'focuscontent' but sometimes you'd like to focus the first input field, you can use [m]gi[m] to jump to it. @@ -355,7 +355,7 @@ ____ ||'hintmatching' 'hm'|| string (default: contains) ____ -Change the hint matching algorithm during hint mode. Possible values: +Change the hint matching algorithm during Hints mode. Possible values: `--------------------`------------------------------------------------------------------------------------------------------------------------------- *contains* The typed characters are split on whitespace, and these character groups have to match anywhere inside the text of the link. @@ -371,7 +371,7 @@ ____ ||'followhints' 'fh'|| number (default: 0) ____ -Change the behaviour of [m][m] in hint mode. Possible values: +Change the behaviour of [m][m] in Hints mode. Possible values: `---------`---------------------------------------------------------- *0* Follow the first hint as soon as typed text uniquely identifies it. diff --git a/vimperator/locale/en-US/starting.txt b/vimperator/locale/en-US/starting.txt index f9b30583..df384fd0 100644 --- a/vimperator/locale/en-US/starting.txt +++ b/vimperator/locale/en-US/starting.txt @@ -12,7 +12,7 @@ one of the following is successfully located, it is executed, and no further locations are tried. a. |$VIMPERATOR_INIT| - _$VIMPERATOR_INIT_ -- May contain a single ex command (e.g., + _$VIMPERATOR_INIT_ -- May contain a single Ex command (e.g., "[c]:source {file}[c]"). b. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its contents are executed. diff --git a/vimperator/locale/en-US/tutorial.txt b/vimperator/locale/en-US/tutorial.txt index f7766ec8..c446e10c 100644 --- a/vimperator/locale/en-US/tutorial.txt +++ b/vimperator/locale/en-US/tutorial.txt @@ -29,18 +29,18 @@ section:Vimperator's{nbsp}modal{nbsp}interface[modal] Vimperator's power, like Vim's, comes from it's modal interface. Keys have different meanings depending on which mode the browser is in. Vimperator has -several modes, but the 2 most important are ``normal'' mode and -``command-line'' mode. +several modes, but the 2 most important are ``Normal'' mode and +``Command-line'' mode. -When Vimperator starts, it is in normal mode by default. This is probably where +When Vimperator starts, it is in Normal mode by default. This is probably where you will spend the majority of your time. -The other core mode of Vimperator, command-line mode, can be entered from -normal mode by typing a \':' (colon). You will frequently see Vimperator +The other core mode of Vimperator, Command-line mode, can be entered from +Normal mode by typing a \':' (colon). You will frequently see Vimperator commands start with a \':', indicating that what follows is a command. -To return to normal mode from command-line mode, type [m][m]. Pressing -[m][m] will also return you to normal mode from most other modes in +To return to Normal mode from Command-line mode, type [m][m]. Pressing +[m][m] will also return you to Normal mode from most other modes in Vimperator. section:Getting{nbsp}help[getting-help] @@ -115,7 +115,7 @@ Vimmers. close the active tab (delete the buffer) To open a web page in a new tab, use the [c]:tabopen {url}[c]. To open a URL in -the current tab, use [c]:open[c]. The normal mode mappings [m]t[m] and [m]o[m], +the current tab, use [c]:open[c]. The Normal mode mappings [m]t[m] and [m]o[m], respectively, map to these commands, so the following pairs of sequences are equivalent: @@ -189,8 +189,8 @@ Vimperator supports all of Vim's classic methods of exiting. * [c]:xall[c] -- command to quit and save the current browsing session for next time; the default. * [c]:qall[c] -- command to quit _without_ saving the session - * [m]ZZ[m] -- normal mode mapping equivalent to [c]:xall[c] - * [m]ZQ[m] -- normal mode mapping equivalent to [c]:qall[c] + * [m]ZZ[m] -- Normal mode mapping equivalent to [c]:xall[c] + * [m]ZQ[m] -- Normal mode mapping equivalent to [c]:qall[c] section:Where{nbsp}did{nbsp}Firefox{nbsp}go?[whither-firefox] diff --git a/vimperator/locale/en-US/various.txt b/vimperator/locale/en-US/various.txt index 34168638..79d485dc 100644 --- a/vimperator/locale/en-US/various.txt +++ b/vimperator/locale/en-US/various.txt @@ -94,7 +94,7 @@ section:Uncategorized{nbsp}help[uncategorized] || || + |||| ________________________________________________________________________________ -Focus content. Exits command-line or hint mode and returns to browser +Focus content. Exits Command-line or Hints mode and returns to Normal mode. Also focuses the web page in case a form field has focus and eats our key presses. ________________________________________________________________________________ @@ -103,8 +103,8 @@ ________________________________________________________________________________ || |i| + ||i|| ________________________________________________________________________________ -Start caret mode. This mode resembles the Vim normal mode where you see a text -cursor and can move around. If you want to select text in this mode, press +Start caret mode. This mode resembles the Vim's Normal mode where you see a +text cursor and can move around. If you want to select text in this mode, press [m]v[m] to start its Visual mode. ________________________________________________________________________________ From 600f80a96822f3c8934c7eb152b0cfba4b1d8f46 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 19 Feb 2009 23:02:31 +1100 Subject: [PATCH 71/85] Minor improvement to |extended-hints| help introduction. --- vimperator/locale/en-US/hints.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vimperator/locale/en-US/hints.txt b/vimperator/locale/en-US/hints.txt index 794044e2..ef3200bb 100644 --- a/vimperator/locale/en-US/hints.txt +++ b/vimperator/locale/en-US/hints.txt @@ -34,10 +34,11 @@ ________________________________________________________________________________ |;| + ||#;#{mode}{empty}{hint}|| ________________________________________________________________________________ -Start an extended hint mode. ExtendedHint mode is useful, since in this mode -you can yank link locations, open them in a new window or save images. If -you want to yank the location of hint [a]24[a], press [m];y[m] to start -this hint mode. Then press [a]24[a] to copy the hint location. +Start an extended hint mode. ExtendedHint mode is useful for performing +operations on hinted elements other than the default left mouse click. For +example, you can yank link locations, open them in a new window or save images. +If you want to yank the location of hint [a]24[a], press [m];y[m] to start this +hint mode. Then press [a]24[a] to copy the hint location. {mode} can be one of: + From 22200fc2821f322a611c659d9e8611dd9e12658c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 19 Feb 2009 23:41:32 +1100 Subject: [PATCH 72/85] Remove some duplication from buffer.followDocumentRelationship. --- common/content/buffer.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 3226a575..7f535692 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1079,13 +1079,7 @@ function Buffer() //{{{ for (let i in util.range(res.snapshotLength, 0, -1)) { let elem = res.snapshotItem(i); - if (regex.test(elem.textContent)) - { - buffer.followLink(elem, liberator.CURRENT_TAB); - return true; - } - // images with alt text being href - if (Array.some(elem.childNodes, function (child) regex.test(child.alt))) + if (regex.test(elem.textContent) || Array.some(elem.childNodes, function (child) regex.test(child.alt))) { buffer.followLink(elem, liberator.CURRENT_TAB); return true; From 3cd3c60f16036ef47fd34e88baeaaeba2347effd Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 19 Feb 2009 23:43:41 +1100 Subject: [PATCH 73/85] Document the fact that ]] uses 'hinttags' to find links. --- vimperator/locale/en-US/options.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index ab367a7a..a7bdd168 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -498,7 +498,8 @@ ____ Patterns to use when guessing the \'next' page in a document sequence. Each pattern, in order, is matched against all links in the page with the first -match being used. The patterns are case insensitive regular expressions. +match being used. The patterns are case insensitive regular expressions and the +link elements are those defined by 'hinttags'. ____ @@ -590,7 +591,8 @@ ____ Patterns to use when guessing the \'previous' page in a document sequence. Each pattern, in order, is matched against all links in the page with the first -match being used. The patterns are case insensitive regular expressions. +match being used. The patterns are case insensitive regular expressions and the +link elements are those defined by 'hinttags'. ____ From 9f70457a4a51c25b9942dcf63942c0341029b636 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 20 Feb 2009 00:13:12 +1100 Subject: [PATCH 74/85] Fix the formatting of some example help commands. --- vimperator/locale/en-US/autocommands.txt | 8 ++++---- vimperator/locale/en-US/options.txt | 21 ++++++--------------- vimperator/locale/en-US/print.txt | 4 ++-- vimperator/locale/en-US/tutorial.txt | 20 ++++++++++---------- 4 files changed, 22 insertions(+), 31 deletions(-) diff --git a/vimperator/locale/en-US/autocommands.txt b/vimperator/locale/en-US/autocommands.txt index dc8b97de..36104b56 100644 --- a/vimperator/locale/en-US/autocommands.txt +++ b/vimperator/locale/en-US/autocommands.txt @@ -77,15 +77,15 @@ section:Examples[autocmd-examples] Enable _passthrough_ mode on all Google sites: - :autocmd LocationChange .* js modes.passAllKeys = /google\.com/.test(buffer.URL) +\{nbsp}[c]:autocmd LocationChange .* js modes.passAllKeys = /google\.com/.test(buffer.URL)[c] Enable _passthrough_ mode on *some* Google sites: - :autocmd LocationChange .* js modes.passAllKeys = /(www|mail)\.google\.com/.test(buffer.URL) +\{nbsp}[c]:autocmd LocationChange .* js modes.passAllKeys = /(www|mail)\.google\.com/.test(buffer.URL)[c] Set the filetype to mail when editing email at Gmail: - :autocmd LocationChange .* :set editor=gvim\ -f - :autocmd LocationChange mail\.google\.com :set editor="gvim -f -c 'set ft=mail'" +\{nbsp}[c]:autocmd LocationChange .* :set editor=gvim\ -f[c] + +\{nbsp}[c]:autocmd LocationChange mail\.google\.com :set editor="gvim -f -c 'set ft=mail'"[c] // vim: set filetype=asciidoc: diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index a7bdd168..a16aa9f6 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -54,12 +54,12 @@ ____ ____ For list options, toggle the specified values. -If the option is a list, the given values are toggled. Given - :set opt=foo,bar -Then, - :set opt!=foo,baz -results in - opt=bar,baz +If the option is a list, the given values are toggled. Given + +\{nbsp}[c]:set opt=foo,bar[c] + +then, + +\{nbsp}[c]:set opt!=foo,baz[c] + +results in + +\{nbsp}opt=bar,baz ____ |:set-default| @@ -575,15 +575,6 @@ In order to also speed up first time access, it is cached at startup, if this op ____ -//|\'pvh'| |\'previewheight'| -//||'previewheight' 'pvh'|| number (default: 10) -//____ -//Default height for preview window -// -//Value must be between 1 and 50. If the value is too high, completions may cover the command line. Close the preview window with :pclose. -//Note: Option currently disabled -//____ - |\'previouspattern'| ||'previouspattern'|| stringlist ____ diff --git a/vimperator/locale/en-US/print.txt b/vimperator/locale/en-US/print.txt index 3254cf5b..8cf3d180 100644 --- a/vimperator/locale/en-US/print.txt +++ b/vimperator/locale/en-US/print.txt @@ -23,11 +23,11 @@ section:Firefox{nbsp}printing{nbsp}dialogs[firefox-print-dialogs] The "Print Preview" and "Page Setup" dialogs can be opened via the [c]:dialog[c] command - :dialog printpreview +\{nbsp}[c]:dialog printpreview[c] and - :dialog printsetup +\{nbsp}[c]:dialog printsetup[c] respectively. diff --git a/vimperator/locale/en-US/tutorial.txt b/vimperator/locale/en-US/tutorial.txt index c446e10c..461a6aed 100644 --- a/vimperator/locale/en-US/tutorial.txt +++ b/vimperator/locale/en-US/tutorial.txt @@ -15,7 +15,7 @@ bare-looking window. The menubar, navigation bar, and bookmark bars are hidden. In case you missed the notice in the help:Introduction[intro.html], you can regain these by issuing the command - :set go+=mTB +\{nbsp}[c]:set go+=mTB[c] where [m][m] represents pressing the or key. If you're a veteran Vim user, this may look familiar. It should. @@ -51,7 +51,7 @@ Most of the documentation for Vimperator's features are easily found using the [c]:help[c] command. For example, you can find help on the [c]:help[c] command by typing - :help :help +\{nbsp}[c]:help :help[c] Similarly, help on configurable options is available with [c]:help '{option_name}'[c]. (Note the single quotes around the option name as in Vim.) @@ -59,8 +59,8 @@ Information on all available options is, predictably, [c]:help options[c]. and you can find out about the [m]gt[m] and [m]gT[m] mapping with - :help gt - :help gT +\{nbsp}[c]:help gt[c] + +\{nbsp}[c]:help gT[c] Finally, in addition to the help system itself, [c]:exusage[c], [c]:viusage[c] and [c]:optionusage[c] are useful quick-reference commands. @@ -119,11 +119,11 @@ the current tab, use [c]:open[c]. The Normal mode mappings [m]t[m] and [m]o[m], respectively, map to these commands, so the following pairs of sequences are equivalent: - :open my.webmail.com - omy.webmail.com +\{nbsp}[c]:open my.webmail.com[c] + +\{nbsp}[m]omy.webmail.com[m] - :tabopen vimperator.org - tvimperator.org +\{nbsp}[c]:tabopen vimperator.org[c] + +\{nbsp}[m]tvimperator.org[m] section:Some{nbsp}hints{nbsp}about{nbsp}surfing...[hints-tutorial] @@ -162,12 +162,12 @@ Say you get half-way done typing in a new URL, only to remember that you've already got that page open in the previous tab. Your command line might look something like this: - :open my.partial.url/fooba +\{nbsp}[c]:open my.partial.url/fooba[c] You can exit the command line and access the already loaded page with the following: - gT +\{nbsp}[m]gT[m] section:Saving{nbsp}for{nbsp}posterity{nbsp}-{nbsp}vimperatorrc[vimperatorrc] From 5a60b27cf91c20d9139e109dde0adca008cd904a Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Thu, 19 Feb 2009 16:40:45 +0200 Subject: [PATCH 75/85] Vimperator 2.0 beta2 --- vimperator/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/Makefile b/vimperator/Makefile index b292b37f..9ca5b334 100644 --- a/vimperator/Makefile +++ b/vimperator/Makefile @@ -1,6 +1,6 @@ #### configuration -VERSION = 2.0b2pre +VERSION = 2.0b2 NAME = vimperator include ../common/Makefile.common From 6be11c7cc28d650b85b9dc7e922d5678394f8995 Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Thu, 19 Feb 2009 18:00:32 +0200 Subject: [PATCH 76/85] update makefile for 2.0 beta3 pre --- vimperator/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/Makefile b/vimperator/Makefile index 9ca5b334..639ea591 100644 --- a/vimperator/Makefile +++ b/vimperator/Makefile @@ -1,6 +1,6 @@ #### configuration -VERSION = 2.0b2 +VERSION = 2.0b3pre NAME = vimperator include ../common/Makefile.common From 79e1a8d9e0ba9841bbc445b71a91c67cb1a14806 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Thu, 19 Feb 2009 22:41:49 +0100 Subject: [PATCH 77/85] updated donors --- vimperator/Donors | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vimperator/Donors b/vimperator/Donors index 9a96542d..478ef6e5 100644 --- a/vimperator/Donors +++ b/vimperator/Donors @@ -2,6 +2,10 @@ Contiuous donations: * Daniel Bainton (web hosting) 2009: +* Convolution +* Brian Hall +* Daniel Hahler +* Per-Henrik Persson * David C Foor * Oliver Schaefer * Paul Moss From bbb22074a90da7d40ad9f00921c69c6cede70631 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 20 Feb 2009 15:58:59 +1100 Subject: [PATCH 78/85] Fix make clean and distclean. --- common/Makefile.common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/Makefile.common b/common/Makefile.common index d0e1210b..0ae474c3 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -81,11 +81,11 @@ $(RDF): $(RDF_IN) Makefile < $< > $@ @echo "SUCCESS: $@" -clean: $(LOCALES:%=%.clean) +clean: ${LOCALEDIR}/$(LOCALES:%=%.clean) @echo "General $(NAME) cleanup..." rm -f $(JAR) $(XPI) -distclean: $(LOCALES:%=%.distclean) clean +distclean: ${LOCALEDIR}/$(LOCALES:%=%.distclean) clean @echo "More $(NAME) cleanup..." rm -rf $(BUILD_DIR) From e459c7c867cd0fb5ebb650e47bb48a9094a1fffc Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 23 Feb 2009 04:55:51 +0900 Subject: [PATCH 79/85] Escaping the error. A error occurs if the element has been removed when "elem.selectionStart" is executed. e.g. Press "gi" on --- common/content/editor.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/content/editor.js b/common/content/editor.js index b24422bf..b62aad98 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -607,8 +607,12 @@ function Editor() //{{{ unselectText: function () { let elem = window.document.commandDispatcher.focusedElement; - if (elem && elem.selectionEnd) - elem.selectionEnd = elem.selectionStart; + // A error occurs if the element has been removed when "elem.selectionStart" is executed. + try { + if (elem && elem.selectionEnd) + elem.selectionEnd = elem.selectionStart; + } + catch (e) {} }, selectedText: function () From 530670f1a080182dc8b7b8879e310c69c10c2f09 Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Mon, 23 Feb 2009 08:18:03 +0200 Subject: [PATCH 80/85] case-insensitivity for :sidebar and :dialog --- common/content/liberator.js | 2 +- vimperator/NEWS | 1 + vimperator/content/config.js | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/content/liberator.js b/common/content/liberator.js index a26ed8fa..d1d29227 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -255,7 +255,7 @@ const liberator = (function () //{{{ "Open a " + config.name + " dialog", function (args) { - let arg = args[0]; + let arg = args[0].toLowerCase(); try { diff --git a/vimperator/NEWS b/vimperator/NEWS index ee0079c8..75c5d29a 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -82,6 +82,7 @@ * stop macro playback on * :bmark now updates a bookmark, if possible. :bmark! adds a new one * many bug fixes + * :dialog and :sidebar now doesn't care about case for arguments 2008-08-16: * version 1.2 diff --git a/vimperator/content/config.js b/vimperator/content/config.js index 69cddbbb..13c9c632 100644 --- a/vimperator/content/config.js +++ b/vimperator/content/config.js @@ -371,10 +371,10 @@ const config = { //{{{ "Open the sidebar window", function (args) { - let arg = args.literalArg; + let arg = args.literalArg.toLowerCase(); // focus if the requested sidebar is already open - if (document.getElementById("sidebar-title").value == arg) + if (document.getElementById("sidebar-title").value.toLowerCase() == arg) { document.getElementById("sidebar-box").focus(); return; @@ -384,7 +384,7 @@ const config = { //{{{ for (let [,panel] in Iterator(menu.childNodes)) { - if (panel.label == arg) + if (panel.label.toLowerCase() == arg) { panel.doCommand(); return; From eb74df729e33a68a6ab2b1994602066e9106d405 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Mon, 23 Feb 2009 10:14:16 -0500 Subject: [PATCH 81/85] Change two Makefile.common var references to use $() over ${}. Both are legal in Makefiles, but $() matches local convention, and $() prevents confusion about when the variable is expanded (i.e., shell vs. make). --- common/Makefile.common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/Makefile.common b/common/Makefile.common index 0ae474c3..c1458a87 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -81,11 +81,11 @@ $(RDF): $(RDF_IN) Makefile < $< > $@ @echo "SUCCESS: $@" -clean: ${LOCALEDIR}/$(LOCALES:%=%.clean) +clean: $(LOCALEDIR)/$(LOCALES:%=%.clean) @echo "General $(NAME) cleanup..." rm -f $(JAR) $(XPI) -distclean: ${LOCALEDIR}/$(LOCALES:%=%.distclean) clean +distclean: $(LOCALEDIR)/$(LOCALES:%=%.distclean) clean @echo "More $(NAME) cleanup..." rm -rf $(BUILD_DIR) From e318da707362554d30065e2df1b7f245d3da80b5 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Mon, 23 Feb 2009 10:30:07 -0500 Subject: [PATCH 82/85] Made and look the same to events.js --- common/content/events.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/content/events.js b/common/content/events.js index 8d25106d..3c9db52a 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -932,6 +932,8 @@ function Events() //{{{ { if (!ctrl && !alt && !shift && !meta) return false; // an invalid key like + else if (shift) + keyname = keyname.toUpperCase(); charCode = keyname.charCodeAt(0); } else if (keyname.toLowerCase() == "space") From 60791f64af4fba16af15729f62837dddcc0b17b3 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 24 Feb 2009 15:09:01 +1100 Subject: [PATCH 83/85] Ignore case in :sidebar and :dialog completion. Also fixes these to report the original arg in error messages again. --- common/content/liberator.js | 10 +++++++--- vimperator/NEWS | 2 +- vimperator/content/config.js | 13 +++++++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/common/content/liberator.js b/common/content/liberator.js index d1d29227..7135755e 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -255,7 +255,7 @@ const liberator = (function () //{{{ "Open a " + config.name + " dialog", function (args) { - let arg = args[0].toLowerCase(); + let arg = args[0]; try { @@ -264,7 +264,7 @@ const liberator = (function () //{{{ for (let [,dialog] in Iterator(dialogs)) { - if (arg == dialog[0]) + if (util.compareIgnoreCase(arg, dialog[0]) == 0) { dialog[2](); return; @@ -281,7 +281,11 @@ const liberator = (function () //{{{ { argCount: "1", bang: true, - completer: function (context, args) completion.dialog(context) + completer: function (context) + { + context.ignoreCase = true; + return completion.dialog(context); + } }); commands.add(["em[enu]"], diff --git a/vimperator/NEWS b/vimperator/NEWS index 75c5d29a..8cd7d8b1 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -81,8 +81,8 @@ * :qa! and :q! quit forcefully, as in vim * stop macro playback on * :bmark now updates a bookmark, if possible. :bmark! adds a new one + * :dialog and :sidebar arguments are now case-insensitive * many bug fixes - * :dialog and :sidebar now doesn't care about case for arguments 2008-08-16: * version 1.2 diff --git a/vimperator/content/config.js b/vimperator/content/config.js index 13c9c632..1a37841a 100644 --- a/vimperator/content/config.js +++ b/vimperator/content/config.js @@ -371,10 +371,11 @@ const config = { //{{{ "Open the sidebar window", function (args) { - let arg = args.literalArg.toLowerCase(); + let arg = args.literalArg; + function compare(a, b) util.compareIgnoreCase(a, b) == 0 // focus if the requested sidebar is already open - if (document.getElementById("sidebar-title").value.toLowerCase() == arg) + if (compare(document.getElementById("sidebar-title").value, arg)) { document.getElementById("sidebar-box").focus(); return; @@ -384,7 +385,7 @@ const config = { //{{{ for (let [,panel] in Iterator(menu.childNodes)) { - if (panel.label.toLowerCase() == arg) + if (compare(panel.label, arg)) { panel.doCommand(); return; @@ -395,7 +396,11 @@ const config = { //{{{ }, { argCount: "1", - completer: function (context) completion.sidebar(context), + completer: function (context) + { + context.ignoreCase = true; + return completion.sidebar(context); + }, literal: 0 }); From e0d95a115b7e556cdd7b4b9cd3d814364bb34f78 Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Tue, 24 Feb 2009 17:44:55 +0200 Subject: [PATCH 84/85] Fix typo in Donors --- vimperator/Donors | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimperator/Donors b/vimperator/Donors index 478ef6e5..638ede86 100644 --- a/vimperator/Donors +++ b/vimperator/Donors @@ -1,4 +1,4 @@ -Contiuous donations: +Continuous donations: * Daniel Bainton (web hosting) 2009: From 09e82c7914ce3827b06c4ff89213fc5ad06b3e22 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 26 Feb 2009 14:48:21 +1100 Subject: [PATCH 85/85] Fix version.html generation for POSIX sed. --- common/Makefile.doc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/Makefile.doc b/common/Makefile.doc index 6eba6b8d..9fed1d5e 100644 --- a/common/Makefile.doc +++ b/common/Makefile.doc @@ -57,5 +57,6 @@ $(ADC_FILES): %.html: %.txt $(BASE)/Makefile.doc $(ADC_DEPS) version.html: ../../NEWS $(BASE)/Makefile.doc $(ADC_DEPS) @echo "DOC locale/$(LOCALE)/$@" # NOTE: asciidoc doesn't source the conf file implicitly when processing stdin - sed -e '1i\HEADER' -e '/^[0-9]/d' -e '/^ \+\* version /s/.*version \+\([0-9.]\+\).*/section:Version{nbsp}\1[version-\1]\ + sed -e '1i\ +HEADER' -e '/^[0-9]/d' -e '/^ \+\* version /s/.*version \+\([0-9.]\+\).*/section:Version{nbsp}\1[version-\1]\ /' ../../NEWS | ${ASCIIDOC} -f asciidoc.conf -a doctitle=version.html -o version.html -