Permalink
Browse files

- tweak minor features

- replace anything with helm
  • Loading branch information...
1 parent 549f3df commit b3fdde489c72075449875bedcbf11019872014ee Joonhwan Lee committed Apr 12, 2012
Showing with 139 additions and 6 deletions.
  1. +2 −1 .gitignore
  2. +1 −0 my-customization.el
  3. +34 −1 my-editing.el
  4. +4 −2 my-el-get.el
  5. +95 −0 my-helm.el
  6. +2 −1 my-init.el
  7. +1 −1 theme/my-dark-theme.el
View
@@ -2,4 +2,5 @@ alien/*el-get-package
_alien
_*alien
.emacs.desktop
-*_flymake.elc
+*_flymake.elc
+.DS_Store
View
@@ -5,6 +5,7 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(debug-on-error t)
+ '(helm-command-prefix-key "C-c a")
'(safe-local-variable-values (quote ((require-final-newline . t) (eval rainbow-mode t) (my-org-current-project-name . "orgwiki")))))
(custom-set-faces
;; custom-set-faces was added by Custom.
View
@@ -418,6 +418,39 @@ home directory is a root directory) and removes automounter prefixes
(define-key dired-mode-map (kbd "ESC C-s") 'dired-isearch-filenames-regexp)
(define-key dired-mode-map (kbd "ESC C-r") 'dired-isearch-backward-regexp)))
+(eval-after-load "ace-jump-mode"
+ '(progn
+ (define-key global-map (kbd "C-c C-SPC") 'ace-jump-mode)
+ )
+ )
+
+;; mark-more-like-this : "mark-multiple" package.
+;; from https://github.com/magnars/mark-multiple.el
+(when (my-try-require 'inline-string-rectangle)
+ (global-set-key (kbd "C-x r t") 'inline-string-rectangle)
+ )
+(when (my-try-require 'mark-more-like-this)
+ (global-set-key (kbd "C-<") 'mark-previous-like-this)
+ (global-set-key (kbd "C->") 'mark-next-like-this)
+ ;; like the other two, but takes an argument (negative is previous)
+ (global-set-key (kbd "C-M-m") 'mark-more-like-this)
+ (global-set-key (kbd "C-*") 'mark-all-like-this)
+ )
+(when (my-try-require 'rename-sgml-tag)
+ (eval-after-load "sgml-mode"
+ '(progn
+ (define-key sgml-mode-map (kbd "C-c C-r") 'rename-sgml-tag)
+ ))
+ )
+(when (my-try-require 'js2-rename-var)
+ (define-key js2-mode-map (kbd "C-c C-r") 'js2-rename-var)
+ )
+
+;; expand-region
+(when (my-try-require 'expand-region)
+ (global-set-key (kbd "C-M-SPC") 'er/expand-region)
+ )
+
;; activate disabled features
(put 'narrow-to-region 'disabled nil)
(put 'downcase-region 'disabled nil)
@@ -426,9 +459,9 @@ home directory is a root directory) and removes automounter prefixes
;; move will banish if cursor is over there...
(mouse-avoidance-mode 'banish)
-
;;
;; joon customized editing feature
+;;
(progn
(global-set-key (kbd "C-c b r") 'rename-buffer)
(global-set-key (kbd "C-c e b") 'ediff-buffers)
View
@@ -85,8 +85,7 @@
(setq my-packages
(append
'(
- anything
- anything-ack
+ ace-jump-mode
asciidoc
auto-install
auto-complete
@@ -95,18 +94,21 @@
el-get
eproject
;; evil
+ expand-region
flymake-fringe-icons
full-ack
goto-last-change
graphviz-dot-mode
gtranslate
+ helm
htmlize
ido-ubiquitous
iedit
keywiz
lua-mode
magit
markdown-mode
+ mark-multiple
nxhtml
;; openwith
package
View
@@ -0,0 +1,95 @@
+;; -*- coding:utf-8 -*-
+
+(helm-mode 1)
+
+(setq helm-c-top-command "top -ncols %s -n 1")
+
+(setq helm-c-locate-command
+ (case system-type
+ ('gnu/linux "locate -i -r %s")
+ ('berkeley-unix "locate -i %s")
+ ('windows-nt "es -s -p -r %s")
+ ('darwin "mdfind -name %s")
+ (t "locate %s"))
+ )
+
+(defvar helm-c-source-emacs-variables
+ '((name . "Emacs Variables")
+ (candidates . (lambda ()
+ (sort (all-completions "" obarray 'boundp) 'string-lessp)))
+ (type . variable)
+ (requires-pattern . 2))
+ "Source for completing Emacs variables.")
+
+(defvar helm-c-source-emacs-functions
+ '((name . "Emacs Functions")
+ (candidates . (lambda ()
+ (let (commands)
+ (mapatoms (lambda (a)
+ (if (functionp a)
+ (push (symbol-name a) commands))))
+ (sort commands 'string-lessp))))
+ (type . function)
+ (requires-pattern . 2))
+ "Source for completing Emacs functions.")
+
+
+;; variable first and function last
+(defun my-helm-for-help-variable ()
+ (interactive)
+ (helm
+ :sources '(helm-c-source-emacs-variables helm-c-source-emacs-functions)
+ :input (let (
+ (my-hint (thing-at-point 'symbol))
+ (my-input "")
+ )
+ (setq my-input (concat
+ ;;"\b"
+ my-hint
+ ;; "\b"
+ (if (featurep 'helm-match-plugin)
+ (if my-hint
+ " "
+ "")
+ ""
+ )
+ ))
+ my-input)
+ :buffer "*Helm Help(func/var)*"
+ )
+ )
+
+;; function first and variable last
+(defun my-helm-for-help-function ()
+ (interactive)
+ (helm
+ :sources '(helm-c-source-emacs-functions helm-c-source-emacs-variables)
+ :input (let (
+ (my-hint (thing-at-point 'symbol))
+ (my-input "")
+ )
+ (setq my-input (concat
+ ;;"\b"
+ my-hint
+ ;; "\b"
+ (if (featurep 'helm-match-plugin)
+ (if my-hint
+ " "
+ "")
+ ""
+ )
+ ))
+ my-input)
+ :buffer "*Helm Help(func/var)*"
+ )
+ )
+
+(progn
+ (global-set-key (kbd "C-c a") helm-command-map)
+ (define-key helm-command-map (kbd "<RET>") 'helm-mini)
+ ;; (define-key helm-command-map (kbd "C-l") 'helm-filelist)
+ (define-key helm-command-map (kbd "h v") 'my-helm-for-help-variable)
+ (define-key helm-command-map (kbd "h f") 'my-helm-for-help-function)
+ )
+
+(provide 'my-helm)
View
@@ -95,7 +95,8 @@
;; final big brother that can handle many configuration
;;
;; NOTE: this package should be followed at last
-(require 'my-anything)
+;; (require 'my-anything)
+(require 'my-helm)
;; (require 'my-icicles)
View
@@ -24,7 +24,7 @@
(let (
(my-dark-fg "#dcdccc")
(my-dark-bg-1"#1a0a0a")
- (my-dark-bg"#1f1f1f")
+ (my-dark-bg"#1c1c1c")
(my-dark-bg+1 "#303030")
(my-dark-bg+2 "#5f5f5f")
(my-dark-red+1 "#Ff4500")

0 comments on commit b3fdde4

Please sign in to comment.