- Added Sublime hotkeys to VS Code to setup for windows

This commit is contained in:
Ben Reaves
2020-05-08 14:06:35 -05:00
parent b85b786dcc
commit 9d5c7b6230
3 changed files with 18 additions and 11 deletions

View File

@@ -25,6 +25,7 @@ def windows_setup():
os.system("regedit " + path + "\\windows\\standard_ctrlalt_capsesc_swap.reg")
elif default == 5:
os.system("regedit " + path + "\\windows\\remove_keyswap.reg")
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
if default > 0 and default < 5:
print("Will now install chocolatey and autohotkey with elevated privileges...")
print("This install will fail if you are not running with elevated privileges")
@@ -32,7 +33,11 @@ def windows_setup():
print("\nWill now install Ubuntu Terminal Theme as default...")
os.system("regedit " + path + "\\windows\\theme_ubuntu.reg")
print("Copying autohotkey combinations for Terminals & Editors...")
os.system("copy /Y " + path + "\\windows\\kinto.ahk \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
os.system("copy /Y " + path + "\\windows\\kinto.ahk " + path + "\\windows\\kinto-new.ahk")
if(stvscode):
os.system('perl -pi -e "s/(; )(.*)(; ST2CODE)/$2$3/g" ./windows/kinto-new.ahk')
os.system("copy /Y " + path + "\\windows\\kinto-new.ahk \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
os.system("del /f .\\windows\\kinto-new.ahk")
print("\nPlease log off and back on for changes to take full effect.")
print("If using WSL then please remember to right click on title bar -> Properties -> Edit Options -> Use Ctrl+Shift+C/V as Copy/Paste and enable it.")
else:

View File

@@ -10,3 +10,6 @@ else{
if(-not(test-path "C:\Program Files\AutoHotkey\AutoHotkey.exe")){
choco install autohotkey.install
}
if(-not(test-path "C:\Strawberry\")){
choco install strawberryperl
}

View File

@@ -65,16 +65,15 @@ $^+Right::Send +{End}
!Right::Send ^{Right}
!+Right::Send ^+{Right}
; ; Sublime Text Remaps for VS Code
; #IfWinActive ahk_group vscode
; ; Remap Ctrl+Shift to behave like macOS Sublimetext
; ; Will extend cursor to multiple lines
; #+Up::send ^!{Up}
; #+Down::send ^!{Down}
;
; ; Remap Ctrl+Cmd+G to select all matches
; #^g::send ^+{L}
; #If
; ; Sublime Text Remaps for VS Code ; ST2CODE
; #IfWinActive ahk_group vscode ; ST2CODE
; ; Remap Ctrl+Shift to behave like macOS Sublimetext ; ST2CODE
; ; Will extend cursor to multiple lines ; ST2CODE
; #+Up::send ^!{Up} ; ST2CODE
; #+Down::send ^!{Down} ; ST2CODE
; ; Remap Ctrl+Cmd+G to select all matches ; ST2CODE
; #^g::send ^+{L} ; ST2CODE
; #If ; ST2CODE
#IfWinActive ahk_exe sublime_text.exe
; Remap Ctrl+Shift to behave like macOS Sublimetext