{"action":"created","issue":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/3019","labels_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/3019/labels{/name}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/3019/comments","events_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/3019/events","html_url":"https://github.com/syl20bnr/spacemacs/pull/3019","id":106255419,"number":3019,"title":"core: Add spacemacs/set-key funcs","user":{"login":"justbur","id":2208382,"avatar_url":"https://avatars.githubusercontent.com/u/2208382?v=3","gravatar_id":"","url":"https://api.github.com/users/justbur","html_url":"https://github.com/justbur","followers_url":"https://api.github.com/users/justbur/followers","following_url":"https://api.github.com/users/justbur/following{/other_user}","gists_url":"https://api.github.com/users/justbur/gists{/gist_id}","starred_url":"https://api.github.com/users/justbur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justbur/subscriptions","organizations_url":"https://api.github.com/users/justbur/orgs","repos_url":"https://api.github.com/users/justbur/repos","events_url":"https://api.github.com/users/justbur/events{/privacy}","received_events_url":"https://api.github.com/users/justbur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/milestones/4","html_url":"https://github.com/syl20bnr/spacemacs/milestones/release%200.105","labels_url":"https://api.github.com/repos/syl20bnr/spacemacs/milestones/4/labels","id":1276918,"number":4,"title":"release 0.105","description":"","creator":{"login":"syl20bnr","id":1243537,"avatar_url":"https://avatars.githubusercontent.com/u/1243537?v=3","gravatar_id":"","url":"https://api.github.com/users/syl20bnr","html_url":"https://github.com/syl20bnr","followers_url":"https://api.github.com/users/syl20bnr/followers","following_url":"https://api.github.com/users/syl20bnr/following{/other_user}","gists_url":"https://api.github.com/users/syl20bnr/gists{/gist_id}","starred_url":"https://api.github.com/users/syl20bnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syl20bnr/subscriptions","organizations_url":"https://api.github.com/users/syl20bnr/orgs","repos_url":"https://api.github.com/users/syl20bnr/repos","events_url":"https://api.github.com/users/syl20bnr/events{/privacy}","received_events_url":"https://api.github.com/users/syl20bnr/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2015-08-28T03:14:51Z","updated_at":"2015-09-14T01:44:48Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-09-14T01:30:52Z","updated_at":"2015-09-14T09:00:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/3019","html_url":"https://github.com/syl20bnr/spacemacs/pull/3019","diff_url":"https://github.com/syl20bnr/spacemacs/pull/3019.diff","patch_url":"https://github.com/syl20bnr/spacemacs/pull/3019.patch"},"body":"@syl20bnr I know you've said no to an idea like this before, but I think this is the way to go with key bindings. I think we are trying to hack around evil-leader's shortcomings, when evil itself provides all that is needed to set keys. Furthermore, moving this functionality \"in house\" brings control. I think the idea of using `spacemacs/set-default-key` in all layers is the right way to solve the issue of user's key bindings getting overridden by layers that are deferred. This is just an initial commit, but it's almost complete, showing how simple this can be. With this approach we can do away with evil-leader and all of the nonsense with the major-mode leader key and such (it's just another key binding after all and shouldn't be complicated). \r\n\r\nThe commit message: \r\n\r\nInitial commit to implement spacemacs replacements for evil-leader\r\nfunctions using built-in evil functions. The two main advantages are the\r\nremoval of the need to play around with major mode hooks and the like,\r\nas evil-leader does, and the ability to extend the functionality of\r\nevil-leader for spacemacs without having to hack our way around the\r\nevil-leader implementation.\r\n\r\nAs an example of one of these advantages, I implemented\r\nspacemacs/set-default-key which will only set the key binding if one\r\ndoes not already exist. Think of this like a defvar for key bindings,\r\nwhich will not clobber the user's personal choices of bindings. Using\r\nthis function in layers, will make it not matter if the user declares\r\nthe key before or after the layer has loaded."},"comment":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/comments/140006887","html_url":"https://github.com/syl20bnr/spacemacs/pull/3019#issuecomment-140006887","issue_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/3019","id":140006887,"user":{"login":"robbyoconnor","id":23088,"avatar_url":"https://avatars.githubusercontent.com/u/23088?v=3","gravatar_id":"","url":"https://api.github.com/users/robbyoconnor","html_url":"https://github.com/robbyoconnor","followers_url":"https://api.github.com/users/robbyoconnor/followers","following_url":"https://api.github.com/users/robbyoconnor/following{/other_user}","gists_url":"https://api.github.com/users/robbyoconnor/gists{/gist_id}","starred_url":"https://api.github.com/users/robbyoconnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbyoconnor/subscriptions","organizations_url":"https://api.github.com/users/robbyoconnor/orgs","repos_url":"https://api.github.com/users/robbyoconnor/repos","events_url":"https://api.github.com/users/robbyoconnor/events{/privacy}","received_events_url":"https://api.github.com/users/robbyoconnor/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T09:00:46Z","updated_at":"2015-09-14T09:00:46Z","body":":heart: "}}