From 45e00d789c1b25ee82f9630cd1ad8cd2e184243f Mon Sep 17 00:00:00 2001
From: hogelog
Date: Mon, 22 Dec 2008 06:03:37 +0000
Subject: * option.hintchars, option.chinput, option.chshow to let
g:hintchars, let g:hintsio. * add updateURL.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27209 d0d07461-0603-4401-acd4-de1884942a52
---
char-hints-mod2.js | 131 +++++++++++++++++++++++++----------------------------
1 file changed, 61 insertions(+), 70 deletions(-)
diff --git a/char-hints-mod2.js b/char-hints-mod2.js
index 9d1ee5c..fcd2ec5 100644
--- a/char-hints-mod2.js
+++ b/char-hints-mod2.js
@@ -4,41 +4,53 @@ var PLUGIN_INFO =
{NAME}
character hint mode.
hogelog
- 0.1
+ 0.1.1
2.0pre 2008/12/12
2.0a1
+ 2008/12/22 14:57:34
+ http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/char-hints-mod2.js
@@ -50,65 +62,15 @@ set charhintshow=uppercase|lowercase:
const DEFAULT_HINTCHARS = "HJKLASDFGYUIOPQWERTNMZXCVB";
const hintContext = hints.addMode;
+ let hintchars = DEFAULT_HINTCHARS;
let inputCase = function(str) str.toUpperCase();
let inputRegex = /[A-Z]/;
let showCase = function(str) str.toUpperCase();
- options.add(["hintchars", "hchar"], //{{{
- "Hint characters",
- "string", DEFAULT_HINTCHARS); //}}}
- options.add(["charhintinput", "chinput"], //{{{
- "Character Hint Input",
- "string", "uppercase",
- {
- setter: function (value)
- {
- switch (value)
- {
- default:
- case "uppercase":
- inputCase = function(str) str.toUpperCase();
- inputRegex = /[A-Z]/;
- break;
- case "lowercase":
- inputCase = function(str) str.toLowerCase();
- inputRegex = /[a-z]/;
- break;
- }
- },
- completer: function () [
- ["uppercase", "Input charhint UpperCase"],
- ["lowercase", "Input charhint LowerCase"],
- ],
- }); //}}}
- options.add(["charhintshow", "chshow"], //{{{
- "Character Hint Show",
- "string", "uppercase",
- {
- setter: function (value)
- {
- switch (value)
- {
- default:
- case "uppercase":
- showCase = function(str) str.toUpperCase();
- break;
- case "lowercase":
- showCase = function(str) str.toLowerCase();
- break;
- }
- },
- completer: function () [
- ["uppercase", "show charhint UpperCase"],
- ["lowercase", "show charhint LowerCase"],
- ],
- }); //}}}
-
-
function chars2num(chars) //{{{
{
let num = 0;
- let hintchars = inputCase(options.hintchars);
+ hintchars = inputCase(hintchars);
let base = hintchars.length;
for(let i=0,l=chars.length;i