Created
May 12, 2015 19:52
-
-
Save paramah/bb3a655bbfca08c17bdd to your computer and use it in GitHub Desktop.
.emacs
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) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.org/packages/")) | |
(package-initialize) | |
(add-hook 'after-init-hook 'global-company-mode) | |
(global-set-key [C-tab] 'company-complete) | |
(tool-bar-mode -1) | |
(require 'color-theme) | |
(color-theme-initialize) | |
(color-theme-solarized) | |
(set-face-attribute 'default nil :font "Consolas-8") | |
(setq jabber-account-list '(("[email protected]" (:password . "abdulabdulhuehue")))) | |
(require 'yasnippet) | |
(require 'php-auto-yasnippets) | |
(setq php-auto-yasnippet-php-program "C:/Users/acynarski/Projekty/ysnippet.php") | |
(define-key php-mode-map (kbd "C-c C-y") 'yas/create-php-snippet) | |
(setq make-backup-files nil) | |
(prefer-coding-system 'utf-8) | |
(require 'neotree) | |
(global-set-key "\C-x\C-m" 'neotree-toggle) | |
(yas/initialize) | |
(setq yas/root-directory "~/.emacs.d/snippets") | |
(yas/load-directory yas/root-directory) | |
(yas-global-mode 1) | |
(add-hook 'prog-mode-hook #'yas-minor-mode) | |
(require 'web-mode) | |
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) | |
(setq web-mode-enable-current-column-highlight t) | |
(setq web-mode-enable-current-element-highlight t) | |
(setq web-mode-ac-sources-alist | |
'(("php" . (ac-source-yasnippet ac-source-php-auto-yasnippets)) | |
("html" . (ac-source-emmet-html-aliases ac-source-emmet-html-snippets)) | |
("css" . (ac-source-css-property ac-source-emmet-css-snippets)))) | |
(add-hook 'web-mode-before-auto-complete-hooks | |
'(lambda () | |
(let ((web-mode-cur-language | |
(web-mode-language-at-pos))) | |
(if (string= web-mode-cur-language "php") | |
(yas-activate-extra-mode 'php-mode) | |
(yas-deactivate-extra-mode 'php-mode)) | |
(if (string= web-mode-cur-language "css") | |
(setq emmet-use-css-transform t) | |
(setq emmet-use-css-transform nil))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment