diff options
| author | Steve Lee <me@xiangyangli.com> | 2019-05-09 08:46:00 +0800 |
|---|---|---|
| committer | Steve Lee <me@xiangyangli.com> | 2019-05-09 08:46:00 +0800 |
| commit | 8fccba38e0d669dc1b30882b110c155ee84f63ca (patch) | |
| tree | 08844b98e486e37f32ad214174a50df619f89efc /.emacs.d/lisp | |
| parent | d2821eb3ed37512fe09df0de81a3227b49f0ce14 (diff) | |
| download | dotfiles-8fccba38e0d669dc1b30882b110c155ee84f63ca.tar.xz dotfiles-8fccba38e0d669dc1b30882b110c155ee84f63ca.zip | |
add slime
Diffstat (limited to '.emacs.d/lisp')
| -rw-r--r-- | .emacs.d/lisp/init-evil.el | 5 | ||||
| -rw-r--r-- | .emacs.d/lisp/init-evil.el~ | 6 | ||||
| -rw-r--r-- | .emacs.d/lisp/init-program-basic.el | 8 | ||||
| -rw-r--r-- | .emacs.d/lisp/init-program-basic.el~ | 1 | ||||
| -rw-r--r-- | .emacs.d/lisp/init-slime.el | 13 | ||||
| -rw-r--r-- | .emacs.d/lisp/init-slime.el~ | 13 |
6 files changed, 42 insertions, 4 deletions
diff --git a/.emacs.d/lisp/init-evil.el b/.emacs.d/lisp/init-evil.el index 2b2a745..7463dd0 100644 --- a/.emacs.d/lisp/init-evil.el +++ b/.emacs.d/lisp/init-evil.el @@ -10,10 +10,12 @@ (require 'evil) (evil-mode 1) -;; todo function and keybinding to open file in new window +;; TODO function and keybinding to open file in new window +;; TODO combined keybindings (evil-leader/set-leader ";") (evil-leader/set-key + "ss" 'evil-scroll-line-down "s" 'save-buffer "c" 'execute-c-program "e" 'find-file @@ -22,6 +24,7 @@ "e" 'er/expand-region "f" 'google-search "t" 'test-function + "p" 'execute-python-program ;; switch window "0" 'select-window-0 diff --git a/.emacs.d/lisp/init-evil.el~ b/.emacs.d/lisp/init-evil.el~ index 7c21575..6e3ecbd 100644 --- a/.emacs.d/lisp/init-evil.el~ +++ b/.emacs.d/lisp/init-evil.el~ @@ -10,12 +10,12 @@ (require 'evil) (evil-mode 1) -;; todo function and keybinding to open file in new window +;; TODO function and keybinding to open file in new window +;; TODO combined keybindings (evil-leader/set-leader ";") (evil-leader/set-key - "aa" 'google-search - "a" 'save-buffer + "ss" 'evil-scroll-line-down "s" 'save-buffer "c" 'execute-c-program "e" 'find-file diff --git a/.emacs.d/lisp/init-program-basic.el b/.emacs.d/lisp/init-program-basic.el index 04266aa..70bab79 100644 --- a/.emacs.d/lisp/init-program-basic.el +++ b/.emacs.d/lisp/init-program-basic.el @@ -9,6 +9,14 @@ tab-width 4 indent-tabs-mode t) +(defun execute-python-program () + "run current python script." + (interactive) + (save-buffer) + (defvar foo) + (setq foo (concat "python " (buffer-name))) + (shell-command foo)) + (defun execute-c-program () "Complie current c file and run it." (interactive) diff --git a/.emacs.d/lisp/init-program-basic.el~ b/.emacs.d/lisp/init-program-basic.el~ index 1e852ad..04266aa 100644 --- a/.emacs.d/lisp/init-program-basic.el~ +++ b/.emacs.d/lisp/init-program-basic.el~ @@ -12,6 +12,7 @@ (defun execute-c-program () "Complie current c file and run it." (interactive) + (save-buffer) (defvar foo) (setq foo (concat "gcc " (include-source-file (buffer-name)) " -o " (buffer-name) ".out && ./" (buffer-name) ".out" )) diff --git a/.emacs.d/lisp/init-slime.el b/.emacs.d/lisp/init-slime.el new file mode 100644 index 0000000..157f0ee --- /dev/null +++ b/.emacs.d/lisp/init-slime.el @@ -0,0 +1,13 @@ +;;; slime --- All slime configuration + +;;; Commentary: + +;;; Code: + +(package-install 'slime) + +(setq inferior-lisp-program "/usr/bin/sbcl") +(setq slime-contribs '(slime-fancy)) + +(provide 'init-slime) +;;; init-slime ends here diff --git a/.emacs.d/lisp/init-slime.el~ b/.emacs.d/lisp/init-slime.el~ new file mode 100644 index 0000000..28258b9 --- /dev/null +++ b/.emacs.d/lisp/init-slime.el~ @@ -0,0 +1,13 @@ +;;; slime --- All slime configuration + +;;; Commentary: + +;;; Code: + +(package-install 'slime) + +(setq inferior-lisp-program "/opt/sbcl/bin/sbcl") +(setq slime-contribs '(slime-fancy)) + +(provide 'init-slime) +;;; init-slime ends here |
