Browse Source

new keyboard who dis

Tom McKenzie 6 years ago
parent
commit
7878beccd7
5 changed files with 84 additions and 17 deletions
  1. 1 3
      .gitconfig
  2. 4 4
      .rc.d/applications.sh
  3. 13 2
      Code/User/keybindings.json
  4. 19 7
      Code/User/settings.json
  5. 47 1
      karabiner/karabiner.json

+ 1 - 3
.gitconfig

@@ -46,7 +46,7 @@
     publish = ! git push -u origin `git rev-parse --abbrev-ref HEAD`
     diverged = ! git log --graph --date=relative --oneline `git rev-parse --abbrev-ref HEAD` origin/`git rev-parse --abbrev-ref HEAD`
     fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
-    last = log -n 1 --pretty=format:%H --
+    last = rev-list -1 HEAD 
 [core]
 	editor = vim
 	excludesfile = /Users/tom/.gitignore_global
@@ -64,5 +64,3 @@
 [merge "npm-merge-driver"]
 	name = automatically merge npm lockfiles
 	driver = npx npm-merge-driver merge %A %O %B %P
-[pull]
-	rebase = preserve

+ 4 - 4
.rc.d/applications.sh

@@ -12,8 +12,8 @@ if [ -d "$HOME/go" ]; then
   export PATH=$PATH:$GOPATH/bin
 fi
 
-# thefuck
-command -v thefuck 1>/dev/null && eval "$(thefuck --alias)"
-
 # rbenv
-command -v rbenv 1>/dev/null && eval "$(rbenv init -)"
+if [ -d "$HOME/.rbenv" ]; then
+  export PATH="$HOME/.rbenv/bin:$PATH"
+  eval "$(rbenv init -)"
+fi

+ 13 - 2
Code/User/keybindings.json

@@ -76,9 +76,20 @@
     "key": "cmd+, cmd+.",
     "command": "macros.autoFixAll"
   },
+  // activity bar
   {
-    "key": "cmd+, cmd+/",
-    "command": "editor.action.fixAll"
+    "key": "cmd+k cmd+b",
+    "command": "workbench.action.toggleActivityBarVisibility",
+  },
+  {
+    "key": "ctrl+]",
+    "command": "workbench.action.nextSideBarView",
+    // "when": "sideBarFocus"
+  },
+  {
+    "key": "ctrl+[",
+    "command": "workbench.action.previousSideBarView",
+    // "when": "sideBarFocus"
   },
   // Focus editors and groups by cmd+number keys
   {

+ 19 - 7
Code/User/settings.json

@@ -139,7 +139,6 @@
             "remote": false
         }
     },
-    "gitlens.settings.mode": "advanced",
     "gitlens.currentLine.format": "${agoOrDate} • ${id} • ${message}",
     "gitlens.blame.avatars": false,
     "gitlens.currentLine.enabled": false,
@@ -187,10 +186,13 @@
         "code": "information"
     },
     "spellright.languageContext": {
-        "strings": [ "en-US" ],
-        "comments": [ "en-GB" ]
+        "strings": [
+            "en-US"
+        ],
+        "comments": [
+            "en-GB"
+        ]
     },
-    "errorLens.enabledDiagnosticLevels": ["error"],
     "gitTreeCompare.diffMode": "full",
     "vscodeWorkspaceSwitcher.showInExplorer": true,
     "vscodeWorkspaceSwitcher.showInActivityBar": false,
@@ -208,7 +210,6 @@
     },
     "emmet.triggerExpansionOnTab": true,
     "merge-conflict.autoNavigateNextConflict.enabled": true,
-    "search.usePCRE2": true,
     "editor.gotoLocation.multiple": "goto",
     "nasc-touchbar.togglePanel": false,
     "nasc-touchbar.addCursorBelow": false,
@@ -217,6 +218,17 @@
     "editor.snippetSuggestions": "bottom",
     "editor.wordBasedSuggestions": false,
     "gitlens.hovers.currentLine.details": false,
-    "gitlens.hovers.currentLine.enabled": false
-    "errorLens.addAnnotationTextPrefixes": false
+    "gitlens.hovers.currentLine.enabled": false,
+    "errorLens.addAnnotationTextPrefixes": false,
+    "errorLens.errorBackground": "rgba(100,0,0,0.3)",
+    "errorLens.errorForeground": "rgba(220,90,90,0.6)",
+    // "errorLens.exclude": [
+    //     {
+    //         // Module has no exported member
+    //         "code": "2305",
+    //         "source": "ts"
+    //     },
+    // ],
+    "errorLens.followCursor": "closestProblem",
+    "errorLens.followCursorMore": 2
 }

+ 47 - 1
karabiner/karabiner.json

@@ -234,6 +234,52 @@
                         }
                     ]
                 },
+                {
+                    "disable_built_in_keyboard_if_exists": false,
+                    "fn_function_keys": [],
+                    "identifiers": {
+                        "is_keyboard": true,
+                        "is_pointing_device": false,
+                        "product_id": 1296,
+                        "vendor_id": 1204
+                    },
+                    "ignore": false,
+                    "manipulate_caps_lock_led": false,
+                    "simple_modifications": [
+                        {
+                            "from": {
+                                "key_code": "left_command"
+                            },
+                            "to": {
+                                "key_code": "left_option"
+                            }
+                        },
+                        {
+                            "from": {
+                                "key_code": "left_option"
+                            },
+                            "to": {
+                                "key_code": "left_command"
+                            }
+                        },
+                        {
+                            "from": {
+                                "key_code": "right_command"
+                            },
+                            "to": {
+                                "key_code": "right_option"
+                            }
+                        },
+                        {
+                            "from": {
+                                "key_code": "right_option"
+                            },
+                            "to": {
+                                "key_code": "right_command"
+                            }
+                        }
+                    ]
+                },
                 {
                     "disable_built_in_keyboard_if_exists": false,
                     "fn_function_keys": [],
@@ -355,4 +401,4 @@
             }
         }
     ]
-}
+}