diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2013-12-01 06:05:01 (GMT) |
|---|---|---|
| committer | Ravikiran Rajagopal <aine.marina@gmail.com> | 2013-12-01 06:05:01 (GMT) |
| commit | 4a76744d36f7b4396e911ccb03f3339747fd870d (patch) | |
| tree | a80f1c05cd1debb395130c784713e99cc4924a7d /ravi-init-insertion.el | |
| parent | 2e12c282e64f2ee5663beea1c588193d88c745d3 (diff) | |
| download | dotemacs-4a76744d36f7b4396e911ccb03f3339747fd870d.zip dotemacs-4a76744d36f7b4396e911ccb03f3339747fd870d.tar.gz dotemacs-4a76744d36f7b4396e911ccb03f3339747fd870d.tar.bz2 | |
Text insertion/completion
autocomplete-mode still to be added
Diffstat (limited to 'ravi-init-insertion.el')
| -rw-r--r-- | ravi-init-insertion.el | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/ravi-init-insertion.el b/ravi-init-insertion.el new file mode 100644 index 0000000..52bd72c --- /dev/null +++ b/ravi-init-insertion.el @@ -0,0 +1,75 @@ +;;; ravi-init-insertion.el --- inserting text + +;; Copyright (C) 2013 + +;; Author: <ravi@nero.lan> +;; Keywords: + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Automatic text insertion + +;;; Code: + +(require 'autoinsert) +(auto-insert-mode) + +(use-package yasnippet + :init + (progn + (setq yas-snippet-dirs + `(,(ravi/emacs-file "snippets") + ) + ) + (yas-global-mode 1) + ) + :config + (progn + ;; No dropdowns + (setq yas/prompt-functions '(yas/ido-prompt yas/completing-prompt)) + + ;; Wrap around region + (setq yas/wrap-around-region t) + ) + :ensure t + :diminish yas-minor-mode + ) + +;; Default completion (some day via "M-/") +(require 'hippie-exp) +(setq hippie-expand-try-functions-list + '(yas/hippie-try-expand + try-expand-dabbrev + try-expand-dabbrev-all-buffers + try-expand-dabbrev-from-kill + try-complete-file-name-partially + try-complete-file-name + try-expand-all-abbrevs + ) + ) + +;; Use smart-tab for TAB-completion but this means that we do not use TAB with auto-complete for now. +(use-package smart-tab + :init + (setq smart-tab-using-hippie-expand t) + :config + (global-smart-tab-mode 1) + :ensure t + :diminish + ) + +(provide 'ravi-init-insertion) +;;; ravi-init-insertion.el ends here |
