This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Trying to F*** with my keyboard. | |
! | |
! The theory is that if I make the caps lock be the "Mode_switch" key, | |
! then I can change what happens for each key when I press the "Mode_switch" key. | |
! | |
! I'm not using the "Mode_switch" key anyway... | |
! | |
! This will make the caps lock be the "Mode_switch" key. | |
clear Lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
// Move out of common paired characters () and [] with `Tab` | |
{ | |
"keys": ["tab"], | |
"command": "move", | |
"args": {"by": "characters", "forward": true}, | |
"context": [ | |
// Check if next char matches (followed by anything) | |
{ "key": "following_text", "operator": "regex_match", "operand": "(:?`|\\)|\\]|\\}).*", "match_all": true }, | |
// ...and that there is a paid character before it on the same |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inoremap <expr> <Tab> SkipClosingParentheses() | |
function! SkipClosingParentheses() | |
let line = getline('.') | |
let current_char = line[col('.')-1] | |
"Ignore EOL | |
if col('.') == col('$') | |
return "\t" | |
end |