diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2016-10-20 18:18:41 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2016-10-20 18:20:48 +0200 |
| commit | e46f1d3dea4f7cda296628b81b174f6ed7a42032 (patch) | |
| tree | f11887fa74259efead11fdf67bba8ba6d8525250 /emacs | |
| parent | 9abeeff47f739de3fe30e2ad309ffacb44268b35 (diff) | |
| download | dotfiles-e46f1d3dea4f7cda296628b81b174f6ed7a42032.tar.gz dotfiles-e46f1d3dea4f7cda296628b81b174f6ed7a42032.zip | |
emacs: fix C-p for non-project situations
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'emacs')
| -rw-r--r-- | emacs/init.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el index 72ff2b7..7a3f8de 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -297,6 +297,16 @@ The user will end up in the *scratch* buffer." :config (helm-projectile-on)) +(defun mssola-find-file () + "Call the proper Helm function for finding files." + + (interactive) + + (condition-case nil + (helm-projectile-find-file) + (error + (helm-find-files nil)))) + ;; Rising from the deep flames of Hell: my Evil configuration. (defun mssola-evil () @@ -319,7 +329,7 @@ The user will end up in the *scratch* buffer." (fset 'help-command help-map) ; Helm + Projectile shortcuts. - (define-key evil-normal-state-map (kbd "C-p") 'helm-projectile-find-file) + (define-key evil-normal-state-map (kbd "C-p") 'mssola-find-file) (define-key evil-normal-state-map (kbd "M-p") 'helm-projectile-switch-project) ; I use the Super key in combination with j & k to move around i3. Let's unset |
