Open TheOmegaCarrot opened 2 years ago
Workaround:
'<': {'closer': '>'},
' <': {'closer': ''}
Expected behavior: do not pair after space Actual behavior: do not pair after space Downside: Seems real jank
Input: if ( a < b)
Output: if ( a < b )
Expected: if ( a < b )
Input: std::vector<int
Output: std::vector<int>
Expected: std::vector<int>
Goal: Have a pair of open/close characters which only autopair if not preceded by a space. Why: Autopairing with C++ templates (leveraging my habit of always preceding an operator '<' with a space, and never preceding a template opening '<' with a space)
Hopefully there is an actual issue here, and not me making a foolish mistake.
Cases:
'<': {'closer': '>', 'not_at': ['\w']
Behavior: does not pair after word characters (expected)'<': {'closer': '>', 'not_at': ['\s']
Expected behavior: do not pair after space Actual behavior: pairs unconditionallyInput:
if ( a < b)
Output:if ( a < b> )
Expected:if ( a < b )
Input:
std::vector<int
Output:std::vector<int>
Expected:std::vector<int>
'<': {'closer': '>', 'not_at': [' ']
Expected behavior: do not pair after space Actual behavior: pairs unconditionallyInput:
if ( a < b)
Output:if ( a < b> )
Expected:if ( a < b )
Input:
std::vector<int
Output:std::vector<int>
Expected:std::vector<int>
'<': {'closer': '>', 'not_at': ['[ ]']
Expected behavior: do not pair after space Actual behavior: pairs unconditionallyInput:
if ( a < b)
Output:if ( a < b> )
Expected:if ( a < b )
Input:
std::vector<int
Output:std::vector<int>
Expected:std::vector<int>
'<': {'closer': '>', 'not_at': ['[:space:]']
Expected behavior: do not pair after space Actual behavior: pairs unconditionallyInput:
if ( a < b)
Output:if ( a < b> )
Expected:if ( a < b )
Input:
std::vector<int
Output:std::vector<int>
Expected:std::vector<int>
'<': {'closer': '>', 'not_at': ['[^\w]']
Expected behavior: do not pair after word character Actual behavior: pairs after word characterInput:
if ( a < b)
Output:if ( a < b> )
Expected:if ( a < b )
Input:
std::vector<int
Output:std::vector<int
Expected:std::vector<int>
'<': {'closer': '>', 'not_at': ['[^a-zA-Z0-9]']
Expected behavior: do not pair after above character set Actual behavior: pairs unconditionallyInput:
if ( a < b)
Output:if ( a < b> )
Expected:if ( a < b )
Input:
std::vector<int
Output:std::vector<int>
Expected:std::vector<int>