;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; PLUGINS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;============================================================================== ;; Yasnippet ;;============================================================================== ;; Yasnippet is slow when loading snippets from source. ;; Generate a bundle instead: yas/compile-bundle ;; Besides you can convert the generated file to bytecode. ;; (add-to-list 'load-path "~/.emacs.d/plugins") ;; (require 'yasnippet-bundle) ;; Next follows a traditional, yet not-optimized configuration for Yasnippet. ;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/yas") (if (require 'yasnippet nil t) (progn (setq yas-snippet-dirs "~/.emacs.d/snippets" ) (if (fboundp 'yas/initialize) ;; Old yasnippet versions. (progn (yas/initialize) (yas/load-directory yas-snippet-dirs)) ;; New yasnippet versions. (progn (yas-global-mode 1) (yas-load-directory yas-snippet-dirs)) ) )) ;;============================================================================== ;; Lua ;;============================================================================== (setq auto-mode-alist (cons '("\.lua$" . lua-mode) auto-mode-alist)) (autoload 'lua-mode "lua-mode" "Lua editing mode." t) ;;============================================================================== ;; MediaWiki ;;============================================================================== (if (require 'mediawiki nil t) (progn (setq mediawiki-site-alist '( ("Wikipedia" "http://en.wikipedia.org/w/" "Ambrevar" "" "Main Page") ("Wikibooks" "http://en.wikibooks.org/w/" "Ambrevar" "" "LaTeX") ("ArchLinux" "https://wiki.archlinux.org/" "Ambrevar" "" "Mutt") ("WikEmacs" "https://wikemacs.org/wiki/" "Ambrevar" "" "Main Page") ) ) ;; Macros. ;; Use C-( stuff C-) to record a macro. ;; Use 'name-last-kbd-macro' to give it a name. ;; Use 'insert-kbd-macro' in your init file to insert the code. ;; You can assign a key: (local-set-key (kbd "C-c a") 'my-macro) (fset 'ltx-template-source-to-ltx "\C-@\C-s>\C-m\C-w\C-@\C-s\C-w\C-?\C-m\C-w\C-d\C-@\C-s") 'zlc-select-next-vertical) ;; (define-key map (kbd "M-") 'zlc-select-previous-vertical) ;; (define-key map (kbd "M-") 'zlc-select-next) ;; (define-key map (kbd "M-") 'zlc-select-previous) ;; ;; Reset selection. ;; (define-key map (kbd "C-c") 'zlc-reset) ;; ;; (setq zlc-select-completion-immediately t) ;; ;; To change style, M-x customize-face and input zlc-selected-completion-face. ;; ) ;; )