summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lee <me@xiangyangli.com>2017-12-13 19:01:56 +0800
committerSteve Lee <me@xiangyangli.com>2017-12-13 19:01:56 +0800
commitc8005152e29314bd33a9198f17b92a77af414a19 (patch)
treeec5f50b2c37b51cea6af92aa4e2c27bda36e7e76
parent841c71f5d266cb240006da14ecfb6b445bfc03cc (diff)
downloaddotfiles-c8005152e29314bd33a9198f17b92a77af414a19.tar.xz
dotfiles-c8005152e29314bd33a9198f17b92a77af414a19.zip
add open url
-rw-r--r--.emacs97
-rw-r--r--.emacs.d/init.el3
-rw-r--r--.emacs.d/init.el~1
-rw-r--r--.emacs.d/lisp/init-evil.el7
-rw-r--r--.emacs.d/lisp/init-evil.el~9
5 files changed, 19 insertions, 98 deletions
diff --git a/.emacs b/.emacs
deleted file mode 100644
index bd157d0..0000000
--- a/.emacs
+++ /dev/null
@@ -1,97 +0,0 @@
-;; Base config
-(menu-bar-mode -1)
-(tool-bar-mode -1)
-(scroll-bar-mode -1)
-(blink-cursor-mode -1)
-;; Line number
-(setq global-linum-mode t)
-;; Highlight current line
-(when window-system
- (global-hl-line-mode))
-;; Disable visual bell
-(setq ring-bell-function 'ignore)
-;; Transparent
-(set-frame-parameter (selected-frame) 'alpha '(85 . 50))
-(add-to-list 'default-frame-alist '(alpha . (85 . 50)))
-
-;; Personal information
-(setq user-full-name "李向阳 141160029"
- user-mail-address "me@xiangyangli.com")
-
-;; Package
-(require 'package)
-(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
-(package-initialize)
-(custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(custom-safe-themes
- (quote
- ("4486ade2acbf630e78658cd6235a5c6801090c2694469a2a2b4b0e12227a64b9" "66881e95c0eda61d34aa7f08ebacf03319d37fe202d68ecf6a1dbfd49d664bc3" default)))
- '(inhibit-startup-screen t)
- '(package-selected-packages (quote (oceanic-theme forest-blue-theme org ## evil))))
-(custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- )
-
-;; Theme
-(load-theme 'oceanic t)
-
-;; Evil mode
-(require 'evil)
-(evil-mode 1)
-
-;; Evil leader, more evil
-(global-evil-leader-mode)
-(evil-leader/set-leader ";")
-(evil-leader/set-key
- "s" 'save-buffer
- "e" 'find-file
- "b" 'switch-to-buffer
- "q" 'kill-buffer)
-
-;; C programming
-(setq-default c-basic-offset 4
- tab-width 4
- indent-tabs-mode t)
-
-;; org-mode pdf outpuf
-(setq org-latex-classes
- '(("article"
- "
- \\documentclass[11pt]{article}
- \\usepackage{xeCJK}
- \\usepackage{indentfirst}
- \\usepackage{amsmath}
- \\setlength{\\parindent}{2em}
- \\setCJKmainfont{SimSun}
- \\numberwithin{equation}{section}
- \\newtheorem{Theorem}{定理}[section]
- \\newtheorem{Definition}[Theorem]{定义}
- \\newtheorem{Lemma}[Theorem]{引理}
- \\newtheorem{Corollary}[Theorem]{推论}
- \\topmargin=-0.45in
- \\evensidemargin=0in
- \\oddsidemargin=0in
- \\textwidth=6.5in
- \\textheight=9.0in
- \\headsep=0.25in
-
- \\linespread{1.1}
- "
- ("\\section{%s}" . "\\section*{%s}")
- ("\\subsection{%s}" . "\\subsection*{%s}")
- ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
- ("\\paragraph{%s}" . "\\paragraph*{%s}")
- ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
- ))
-;; Use XeLaTex
-(setq org-latex-pdf-process
- '("xelatex -interaction nonstopmode -output-directory %o %f"
- "xelatex -interaction nonstopmode -output-directory %o %f"
- "xelatex -interaction nonstopmode -output-directory %o %f"))
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 2331575..6a26554 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -33,6 +33,9 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
+ '(browse-url-firefox-arguments nil)
+ '(browse-url-firefox-new-window-is-tab nil)
+ '(browse-url-firefox-program "firefox-esr")
'(custom-safe-themes
(quote
("4486ade2acbf630e78658cd6235a5c6801090c2694469a2a2b4b0e12227a64b9" "66881e95c0eda61d34aa7f08ebacf03319d37fe202d68ecf6a1dbfd49d664bc3" default)))
diff --git a/.emacs.d/init.el~ b/.emacs.d/init.el~
index a58575a..2331575 100644
--- a/.emacs.d/init.el~
+++ b/.emacs.d/init.el~
@@ -59,6 +59,7 @@
(require 'init-program-basic)
(require 'init-company)
(require 'init-flycheck)
+ (require 'init-expand-region)
(require 'init-window-numbering))
(provide 'init)
diff --git a/.emacs.d/lisp/init-evil.el b/.emacs.d/lisp/init-evil.el
index 06e8236..b59adc1 100644
--- a/.emacs.d/lisp/init-evil.el
+++ b/.emacs.d/lisp/init-evil.el
@@ -20,6 +20,7 @@
"b" 'switch-to-buffer
"q" 'quit-window
"e" 'er/expand-region
+ "f" 'google-search
;; switch window
"0" 'select-window-0
@@ -33,5 +34,11 @@
"8" 'select-window-8
"9" 'select-window-9)
+(defun google-search ()
+ (interactive)
+ (let (url)
+ (setq url (read-string "Enter search content:"))
+ (browse-url-firefox (concat "https://www.google.com/search?q=" url))))
+
(provide 'init-evil)
;;; init-evil ends here
diff --git a/.emacs.d/lisp/init-evil.el~ b/.emacs.d/lisp/init-evil.el~
index 234d620..abb5995 100644
--- a/.emacs.d/lisp/init-evil.el~
+++ b/.emacs.d/lisp/init-evil.el~
@@ -19,7 +19,8 @@
"e" 'find-file
"b" 'switch-to-buffer
"q" 'quit-window
- "f" 'er/expand-region
+ "e" 'er/expand-region
+ "f" 'google-search
;; switch window
"0" 'select-window-0
@@ -33,5 +34,11 @@
"8" 'select-window-8
"9" 'select-window-9)
+(defun google-search ()
+ (interactive)
+ (let (url)
+ (setq url (read-string "Enter search content:"))
+ (browse-url-firefox url)))
+
(provide 'init-evil)
;;; init-evil ends here