-
Notifications
You must be signed in to change notification settings - Fork 45
Description
@jdc0589 and all other who love this Sublime plugin
Find a major overhaul of CaseConversion in this fork: HERE
Updates include:
- pythonized code: E.g. no more
if x != None: - major refactoring of the parser. It is now class based, different functionalities like acronym detection have been cleanly separated into different methods.
- also all string construction is now done in
case_parse.pyand all sublime logic kept incase_conversion.py. (This prepares these awesome string conversion capabilities to be applied in a different module. See stringase, EDIT: As of opening this issue I was unaware that the conversion function has already been factored out: https://github.com/AlejandroFrias/case-conversion) - added three new case conversions:
to_lower_case,to_upper_case,to_capital_case. (See Issue 36) - case toggling can now be customized (See Issue 25). The user can determine what a target case a case should be converted to. Simply defining key: value pairs in the settings file under the point toggle_cases is enough.
With key being the source case and the value being the target case. Default setting leaves toggling sequence as it was up until now.
I really like all Sublime users be able to profit from these improvements. Yet, before I open a pull request I still require help to improve, expand and test the code, because I do not understand the library good enough to do it alone. Here is what I need help with:
-
Acronym detection broke (and I do not know why):
This still works:
CaseConvertThisHTTP -> case_convert_this_http -> caseConvertThisHTTP
This does not: 'http' is minced:
HTTPtestArgh -> h_t_t_ptest_argh -> hTTPtestArgh -
Extend method to determine all case types. (See line 271)
The cleanest solution would be using a complete rewrite of the current method, which achieves case determination purely via regexp, instead of how case detection is handled right now.
Most Wanted Feature: Case Selection via Context Menu
As already discussed in Issue 26 an optional context menu to select different conversions would be highly useful. Especially since the number of cases has grown such menu would be very practical. Indeed I was half way through implementing this feature when hitting a road block. I am going to reimplement it once we are done with the open issues discussed.
Find the fork: HERE