-
-
Save patrickmaciel/2acfdc100f25fe875e84 to your computer and use it in GitHub Desktop.
My Cask file (emacs dependencies)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(source gnu) | |
(source melpa) | |
(depends-on "cask") | |
(depends-on "color-theme-sanityinc-tomorrow") | |
(depends-on "expand-region") | |
(depends-on "ace-jump-mode") | |
(depends-on "auto-complete") | |
(depends-on "flx-ido") | |
(depends-on "yasnippet") | |
(depends-on "php-mode") | |
(depends-on "php-auto-yasnippets") | |
(depends-on "php-boris") | |
(depends-on "phpunit") | |
(depends-on "cake2") | |
(depends-on "php-refactor-mode") | |
(depends-on "jquery-doc") | |
(depends-on "js2-mode") | |
(depends-on "skewer-mode") | |
(depends-on "web-beautify") | |
(depends-on "amd-mode") | |
(depends-on "cake-inflector") | |
(depends-on "magit") | |
(depends-on "git-commit-mode") | |
(depends-on "git-rebase-mode") | |
(depends-on "gh") | |
(depends-on "gist") | |
(depends-on "git-gutter") | |
(depends-on "magit-svn") | |
(depends-on "projectile") | |
(depends-on "helm-projectile") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; (require 'package) | |
;; (package-initialize) | |
;; (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) | |
;; (require 'saveplace) | |
(require 'cask "~/.cask/cask.el") | |
(cask-initialize) | |
(yas-global-mode t) | |
(projectile-global-mode) | |
(setq save-place-file (concat user-emacs-directory "saveplace.el")) | |
(setq-default save-place t) | |
;; (eletric-indent-mode t) | |
(require 'auto-complete-config) | |
(ac-config-default) | |
(setq mac-command-modifier 'meta) | |
(setq mac-option-modifier nil) | |
;; ext modes | |
(add-to-list 'auto-mode-alist '("Gemfile\\'" . ruby-mode)) | |
;; hooks | |
(add-hook 'text-mode-hook 'orgtbl-mode) | |
;; keyboard translates | |
(keyboard-translate ?\C-j ?\C-x) | |
(keyboard-translate ?\C-x ?\C-j) | |
;; (keyboard-translate ?\C-i ?\C-c) | |
;; (keyboard-translate ?\C-c?\C-i) | |
(ido-mode 1) | |
(ido-everywhere 1) | |
(flx-ido-mode 1) | |
(setq ido-use-faces nil) | |
;; functions | |
(defun select-current-line () | |
"Selects the currenct line" | |
(interactive) | |
(end-of-line) | |
(push-mark (line-beginning-position) nil t)) | |
(global-set-key (kbd "M-l") 'select-current-line) | |
(defun line-above () | |
"Pastes line above" | |
(interactive) | |
(move-beginning-of-line nil) | |
(newline-and-indent) | |
(forward-line -1) | |
(indent-according-to-mode)) | |
(global-set-key (kbd "M-RET") 'line-above) | |
(defun cut-line-or-region () | |
"" | |
(interactive) | |
(if (region-active-p) | |
(kill-region (region-beginning) (region-end)) | |
(kill-region (line-beginning-position) (line-beginning-position 2)))) | |
(global-set-key [remap kill-region] 'cut-line-or-region) | |
(defun copy-line-or-region () | |
"" | |
(interactive) | |
(if (region-active-p) | |
(kill-ring-save (region-beginning) (region-end)) | |
(kill-ring-save (line-beginning-position) (line-beginning-position 2)))) | |
(global-set-key [remap kill-ring-save] 'copy-line-or-region) | |
(defun duplicate-current-line-or-region (arg) | |
"Duplicates the current line or region ARG times. | |
If there's no region, the current line will be duplicated. However, if | |
there's a region, all lines that region covers will be duplicated." | |
(interactive "p") | |
(let (beg end (origin (point))) | |
(if (and mark-active (> (point) (mark))) | |
(exchange-point-and-mark)) | |
(setq beg (line-beginning-position)) | |
(if mark-active | |
(exchange-point-and-mark)) | |
(setq end (line-end-position)) | |
(let ((region (buffer-substring-no-properties beg end))) | |
(dotimes (i arg) | |
(goto-char end) | |
(newline) | |
(beginning-of-visual-line) | |
(insert region) | |
(setq end (point))) | |
(goto-char (+ origin (* (length region) arg) arg))))) | |
(global-set-key (kbd "C-S-y") 'duplicate-current-line-or-region) | |
(defun create-snippet (filename) | |
(interactive "s") | |
(let ((mode (symbol-name major-mode))) | |
(find-file (format "~/.emacs.d/snippets/%s/%s" mode filename)) | |
(snippet-mode))) | |
(global-set-key (kbd "M-'") 'create-snippet) | |
;; global setk eys | |
;; (global-set-key (kbd "M-k") 'next-line) | |
;; (global-set-key (kbd "M-i") 'previous-line) | |
;; (global-set-key (kbd "M-j") 'backward-char) | |
;; (global-set-key (kbd "M-l") 'forward-char) | |
(global-set-key (kbd "C-x C-x") 'save-buffers-kill-terminal) | |
(global-set-key (kbd "C-o") 'er/expand-region) | |
(define-key projectile-mode-map (kbd "M-/") 'projectile-find-file) | |
;; ace-dump-mode | |
(autoload | |
'ace-jump-mode | |
"ace-jump-mode" | |
"Emacs quick move minor mode" | |
t) | |
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode) | |
(set-frame-font "Menlo Powerline-14") | |
(global-visual-line-mode t) | |
(delete-selection-mode t) | |
(blink-cursor-mode t) | |
(show-paren-mode t) | |
(setq make-backup-file nil) | |
(setq auto-save-default nil) | |
(setq inhibit-startup-message t) | |
(setq-default tab-width 2) | |
(setq-default indent-tabs-model nil) | |
(fset 'yes-or-no-p 'y-or-n-p) | |
(when (window-system) | |
(scroll-bar-mode -1) | |
(tool-bar-mode -1)) | |
(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-enabled-themes (quote (tango-dark)))) | |
(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. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment