summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
authorSteve Lee <me@xiangyangli.com>2017-12-13 08:10:18 +0800
committerSteve Lee <me@xiangyangli.com>2017-12-13 08:10:18 +0800
commitc30554da3886e39470fcd2c69114043a37c75a52 (patch)
treeaef4c51f23e432b3f8054bc1af9b56668f4e2e5e /.emacs.d/lisp
parentf307bb8721e23ecaf6347a1766fe02e764120bc4 (diff)
downloaddotfiles-c30554da3886e39470fcd2c69114043a37c75a52.tar.xz
dotfiles-c30554da3886e39470fcd2c69114043a37c75a52.zip
add some configuration
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-company.el10
-rw-r--r--.emacs.d/lisp/init-company.el~0
-rw-r--r--.emacs.d/lisp/init-evil.el25
-rw-r--r--.emacs.d/lisp/init-evil.el~24
-rw-r--r--.emacs.d/lisp/init-flycheck.el13
-rw-r--r--.emacs.d/lisp/init-flycheck.el~13
-rw-r--r--.emacs.d/lisp/init-org.el9
-rw-r--r--.emacs.d/lisp/init-org.el~2
-rw-r--r--.emacs.d/lisp/init-program-basic.el9
-rw-r--r--.emacs.d/lisp/init-program-basic.el~7
-rw-r--r--.emacs.d/lisp/init-window-numbering.el10
-rw-r--r--.emacs.d/lisp/init-window-numbering.el~3
12 files changed, 119 insertions, 6 deletions
diff --git a/.emacs.d/lisp/init-company.el b/.emacs.d/lisp/init-company.el
new file mode 100644
index 0000000..c6579b4
--- /dev/null
+++ b/.emacs.d/lisp/init-company.el
@@ -0,0 +1,10 @@
+;;; company --- All company configuration
+
+;;; Commentary:
+
+;;; Code:
+
+(global-company-mode)
+
+(provide 'init-company)
+;;; init-company ends here
diff --git a/.emacs.d/lisp/init-company.el~ b/.emacs.d/lisp/init-company.el~
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.emacs.d/lisp/init-company.el~
diff --git a/.emacs.d/lisp/init-evil.el b/.emacs.d/lisp/init-evil.el
index ca06590..0c25450 100644
--- a/.emacs.d/lisp/init-evil.el
+++ b/.emacs.d/lisp/init-evil.el
@@ -1,7 +1,15 @@
-;; Evil mode
+;;; init-evil --- All config of evil-mode
+
+;;; Commentary:
+
+;;; Code:
+
+(package-install 'evil)
(require 'evil)
(evil-mode 1)
+;; todo function and keybinding to open file in new window
+
;; Evil leader, more evil
(global-evil-leader-mode)
(evil-leader/set-leader ";")
@@ -10,6 +18,19 @@
"c" 'execute-c-program
"e" 'find-file
"b" 'switch-to-buffer
- "q" 'kill-buffer)
+ "q" 'kill-buffer
+
+ ;; switch window
+ "0" 'select-window-0
+ "1" 'select-window-1
+ "2" 'select-window-2
+ "3" 'select-window-3
+ "4" 'select-window-4
+ "5" 'select-window-5
+ "6" 'select-window-6
+ "7" 'select-window-7
+ "8" 'select-window-8
+ "9" 'select-window-9)
(provide 'init-evil)
+;;; init-evil ends here
diff --git a/.emacs.d/lisp/init-evil.el~ b/.emacs.d/lisp/init-evil.el~
index 35d96e0..375f5cc 100644
--- a/.emacs.d/lisp/init-evil.el~
+++ b/.emacs.d/lisp/init-evil.el~
@@ -1,4 +1,10 @@
-;; Evil mode
+;;; init-evil --- All config of evil-mode
+
+;;; Commentary:
+
+;;; Code:
+
+(package-install 'evil)
(require 'evil)
(evil-mode 1)
@@ -7,8 +13,22 @@
(evil-leader/set-leader ";")
(evil-leader/set-key
"s" 'save-buffer
+ "c" 'execute-c-program
"e" 'find-file
"b" 'switch-to-buffer
- "q" 'kill-buffer)
+ "q" 'kill-buffer
+
+ ;; switch window
+ "0" 'select-window-0
+ "1" 'select-window-1
+ "2" 'select-window-2
+ "3" 'select-window-3
+ "4" 'select-window-4
+ "5" 'select-window-5
+ "6" 'select-window-6
+ "7" 'select-window-7
+ "8" 'select-window-8
+ "9" 'select-window-9)
(provide 'init-evil)
+;;; init-evil ends here
diff --git a/.emacs.d/lisp/init-flycheck.el b/.emacs.d/lisp/init-flycheck.el
new file mode 100644
index 0000000..d124711
--- /dev/null
+++ b/.emacs.d/lisp/init-flycheck.el
@@ -0,0 +1,13 @@
+;;; flycheck --- All flycheck configuration
+
+;;; Commentary:
+
+;;; Code:
+
+(package-install 'flycheck)
+
+(global-flycheck-mode)
+(setq flycheck-check-syntax-automatically '(mode-enabled save))
+
+(provide 'init-flycheck)
+;;; init-flycheck ends here
diff --git a/.emacs.d/lisp/init-flycheck.el~ b/.emacs.d/lisp/init-flycheck.el~
new file mode 100644
index 0000000..d124711
--- /dev/null
+++ b/.emacs.d/lisp/init-flycheck.el~
@@ -0,0 +1,13 @@
+;;; flycheck --- All flycheck configuration
+
+;;; Commentary:
+
+;;; Code:
+
+(package-install 'flycheck)
+
+(global-flycheck-mode)
+(setq flycheck-check-syntax-automatically '(mode-enabled save))
+
+(provide 'init-flycheck)
+;;; init-flycheck ends here
diff --git a/.emacs.d/lisp/init-org.el b/.emacs.d/lisp/init-org.el
index b162f12..189cf79 100644
--- a/.emacs.d/lisp/init-org.el
+++ b/.emacs.d/lisp/init-org.el
@@ -1,4 +1,10 @@
-;; org-mode pdf outpuf
+;;; org --- All configuration of org-mode
+
+;;; Commentary:
+;; Mostly the pdf export configuration
+
+;;; Code:
+
(setq org-latex-classes
'(("article"
"
@@ -35,3 +41,4 @@
"xelatex -interaction nonstopmode -output-directory %o %f"))
(provide 'init-org)
+;;; init-org ends here
diff --git a/.emacs.d/lisp/init-org.el~ b/.emacs.d/lisp/init-org.el~
index 6409de9..b162f12 100644
--- a/.emacs.d/lisp/init-org.el~
+++ b/.emacs.d/lisp/init-org.el~
@@ -33,3 +33,5 @@
'("xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f"))
+
+(provide 'init-org)
diff --git a/.emacs.d/lisp/init-program-basic.el b/.emacs.d/lisp/init-program-basic.el
index 2e68074..092bd3c 100644
--- a/.emacs.d/lisp/init-program-basic.el
+++ b/.emacs.d/lisp/init-program-basic.el
@@ -1,4 +1,10 @@
-;; C programming
+;;; program-basic --- Some basic configuration
+
+;;; Commentary:
+;; None
+
+;;; Code:
+
(setq-default c-basic-offset 4
tab-width 4
indent-tabs-mode t)
@@ -11,3 +17,4 @@
(shell-command foo))
(provide 'init-program-basic)
+;;; init-program-basic ends here
diff --git a/.emacs.d/lisp/init-program-basic.el~ b/.emacs.d/lisp/init-program-basic.el~
index db3455c..2e68074 100644
--- a/.emacs.d/lisp/init-program-basic.el~
+++ b/.emacs.d/lisp/init-program-basic.el~
@@ -3,4 +3,11 @@
tab-width 4
indent-tabs-mode t)
+(defun execute-c-program ()
+ (interactive)
+ (defvar foo)
+ (setq foo (concat
+ "gcc " (buffer-name) " -o " (buffer-name) ".out && ./" (buffer-name) ".out" ))
+ (shell-command foo))
+
(provide 'init-program-basic)
diff --git a/.emacs.d/lisp/init-window-numbering.el b/.emacs.d/lisp/init-window-numbering.el
new file mode 100644
index 0000000..c8425ff
--- /dev/null
+++ b/.emacs.d/lisp/init-window-numbering.el
@@ -0,0 +1,10 @@
+;;; window-numbering --- All configuration of window-numbering
+
+;;; Commentary:
+
+;;; Code:
+
+(window-numbering-mode)
+
+(provide 'init-window-numbering)
+;;; init-window-numbering ends here
diff --git a/.emacs.d/lisp/init-window-numbering.el~ b/.emacs.d/lisp/init-window-numbering.el~
new file mode 100644
index 0000000..cb3ccc8
--- /dev/null
+++ b/.emacs.d/lisp/init-window-numbering.el~
@@ -0,0 +1,3 @@
+;;; window-numbering --- All configuration of window-numbering
+
+;;; C