 ;; Author: Dan Harms <danielrharms@gmail.com>
 ;; Created: Friday, February 27, 2015
 ;; Version: 1.0
-;; Modified Time-stamp: <2016-02-02 16:55:18 dan.harms>
+;; Modified Time-stamp: <2016-02-09 09:49:56 dan.harms>
 ;; Modified by: Dan Harms
 ;; Keywords:
 

                 makefile-mode makefile-automake-mode makefile-gmake-mode
                 autoconf-mode gdb-script-mode awk-mode csv-mode
                 mock-mode org-mode html-mode text-mode sql-mode
                 sql-interactive-mode
                 git-commit-mode
                 ))
(require 'auto-complete-config)
(setq-default ac-sources
              '(ac-source-abbrev
                ac-source-dictionary
                ac-source-words-in-same-mode-buffers
                ac-source-filename
                ))
(setq ac-expand-on-auto-complete nil)
(setq ac-auto-start nil)

                        (concat my/plugins-directory "yasnippet/snippets/")))
(yas-global-mode 1)
(setq yas-prompt-functions '(
                             yas-completing-prompt
                             yas-ido-prompt
                             yas-x-prompt
                             yas-dropdown-prompt
                             yas-no-prompt
                             ))
;; to disable TAB key to activate a snippet:
;; (define-key yas-minor-mode-map (kbd "<tab>") nil)
;; (define-key yas-minor-mode-map (kbd "TAB") nil)
;; add our own keybindings
(define-key yas-minor-mode-map "\C-cse" 'yas-expand)
(define-key yas-minor-mode-map "\C-csi" 'yas-insert-snippet)
(define-key yas-minor-mode-map "\C-csn" 'yas-new-snippet)
(define-key yas-minor-mode-map "\C-csv" 'yas-visit-snippet-file)
(define-key yas-minor-mode-map "\C-cs?" 'yas-describe-tables)
;; integrate with auto-complete (shows only snippets)
(defun my/expand-yasnippet() (interactive)
       (auto-complete '(ac-source-yasnippet)))
(global-set-key [backtab] 'my/expand-yasnippet)
