From 878a31fc8983dfa4cd6a1662554d048fca017e95 Mon Sep 17 00:00:00 2001 From: hogelog Date: Mon, 9 Feb 2009 09:58:46 +0000 Subject: * set simple n-base labeling to default git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@29768 d0d07461-0603-4401-acd4-de1884942a52 --- char-hints-mod2.js | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/char-hints-mod2.js b/char-hints-mod2.js index dfb6aff..5dc3259 100644 --- a/char-hints-mod2.js +++ b/char-hints-mod2.js @@ -4,7 +4,7 @@ var PLUGIN_INFO = {NAME} character hint mode. hogelog - 0.2.4 + 0.2.5 2.0pre 2008/12/12 2.0a1 http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/char-hints-mod2.js @@ -31,9 +31,9 @@ let g:hintsio: let g:hintlabeling: - "s" setting simple n-base decimal hint labeling (n = hintchars.length) - "a" setting adjust no overlap labeling - Default setting is "a". + Default setting is "s". e.g.) - let g:hintlabeling="s" + let g:hintlabeling="a" == TODO == ]]> @@ -59,9 +59,9 @@ let g:hintsio: let g:hintlabeling: - "s" setting simple n-base decimal hint labeling (n = hintchars.length) - "a" setting adjust no overlap labeling - Default setting is "a". + Default setting is "s". e.g.) - let g:hintlabeling="s" + let g:hintlabeling="a" == TODO == ]]> @@ -77,7 +77,7 @@ let g:hintlabeling: let inputCase = function(str) str.toUpperCase(); let inputRegex = /[A-Z]/; let showCase = function(str) str.toUpperCase(); - let getStartCount = getAdjustStartCount; + let getStartCount = function() 0; function chars2num(chars) //{{{ { @@ -101,15 +101,6 @@ let g:hintlabeling: return chars; } //}}} - // get Most Significant Digit - function getMSD(base, count) //{{{ - { - let next; - while((next = Math.floor(count/base)) > 0) { - count = next; - } - return count; - } //}}} function getAdjustStartCount(base, count) //{{{ { if(count < base) { @@ -139,6 +130,7 @@ let g:hintlabeling: function showCharHints(hints) //{{{ { let start = getStartCount(hintchars.length, hints.length); + liberator.reportError(start); for(let i=0,len=hints.length;i0;setIOType(hintsio[i])); + Array.forEach(hintsio, setIOType); } if(liberator.globalVariables.hintchars) { hintchars = liberator.globalVariables.hintchars; } if(liberator.globalVariables.hintlabeling) { switch(liberator.globalVariables.hintlabeling) { + default: case "s": getStartCount = function() 0; break; case "a": - default: getStartCount = getAdjustStartCount; break; } -- cgit v1.2.3