问题
I'm using CodeMirror autocomplete in python mode (python-hint.js). I've customized the keyword list by adding my list. But it raises the case sensitive issue by not retrieving the capital keywords when providing keyword in small letter. Please where to make changes in python-hint.js file to make the search case in sensitive. Any help or suggestion is appreciated.
回答1:
You can implement the case-insensitive autoComplete feature by adding the following lines in Python-hint.js -> function maybeAdd(str)
function maybeAdd(str) {
start=start.toLowerCase();
str=str.toLowerCase();
//EXISTING CODE
}
PS : Though it's highly recommended not to change the library files,as it might create problem when updating the version.
来源:https://stackoverflow.com/questions/22298737/codemirror-autocomplete-case-in-sensitive-search