Skip to content
Browse files

- Fixed the line truncation problem, through 'customize' to avoid the

  buffer local issue
- Added proced mode
- setup visual bookmarks to my liking
- Attempted to have yasnippet & auto-complete play nice together
  • Loading branch information...
1 parent b746b3d commit 5e68f7b88446c05a77093b6a30c311f4308b02d2 @sbellef committed
Showing with 53 additions and 20 deletions.
  1. +3 −1 emacs/cfg/custom.el
  2. +19 −6 emacs/cfg/general-config.el
  3. +30 −12 emacs/cfg/prog-config.el
  4. +1 −1 emacs/cfg/text-config.el
View
4 emacs/cfg/custom.el
@@ -6,8 +6,10 @@
'(ediff-merge-split-window-function (quote split-window-horizontally))
'(ediff-split-window-function (quote split-window-horizontally))
'(ediff-window-setup-function (quote ediff-setup-windows-plain))
+ '(ibus-python-shell-command-name "python2")
'(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
- '(transient-mark-mode t))
+ '(transient-mark-mode t)
+ '(truncate-lines t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
View
25 emacs/cfg/general-config.el
@@ -105,16 +105,22 @@
;; ==========================================================
-;; VisualBookmarks (experimenting...)
+;; VisualBookmarks
;; ==========================================================
(add-my-pkg-to-loadpath "bm")
+(setq-default bm-buffer-persistence t)
(setq bm-restore-repository-on-load t)
(require 'bm)
(setq bm-highlight-style 'bm-highlight-only-fringe)
-;; make bookmarks persistent as default
-(setq-default bm-buffer-persistence t)
-
+(add-hook 'find-file-hook 'bm-buffer-restore)
+(add-hook 'kill-buffer-hook 'bm-buffer-save)
+(add-hook 'after-save-hook 'bm-buffer-save)
+(add-hook 'after-revert-hook 'bm-buffer-restore)
+(global-set-key (kbd "M-\\") 'bm-toggle)
+(global-set-key (kbd "M-[") 'bm-previous)
+(global-set-key (kbd "M-]") 'bm-next)
+(global-set-key (kbd "M-=") 'bm-show-all)
;; ==========================================================
;; ibuffer
@@ -135,7 +141,7 @@
))
;; ==========================================================
-;; iBus (under test/experimenting...)
+;; iBus
;; ==========================================================
;; load ibus.el
@@ -177,6 +183,13 @@
(require 'mplayer-mode)
;; ==========================================================
+;; proced-mode
+;; ==========================================================
+
+;; Thanks to @emacs_knight for the hint
+(global-set-key (kbd "C-x p") 'proced)
+
+;; ==========================================================
;; varia
;; ==========================================================
@@ -209,7 +222,7 @@
;; set the title name
(setq frame-title-format "emacs - %f")
-;; frankly, c-z has a very annoying behaviour so i disable it.
+;; frankly, c-z has a very annoying behaviour, so i disable it.
(global-unset-key "\C-z")
;; enable up/down-case region keys C-x C-l / C-u
View
42 emacs/cfg/prog-config.el
@@ -1,4 +1,34 @@
;; ==========================================================
+;; auto complete mode (under test/evaluation)
+;; ==========================================================
+
+(add-my-pkg-to-loadpath "auto-complete")
+(require 'auto-complete-config)
+(add-to-list 'ac-dictionary-directories
+ (expand-file-name "auto-complete/dict" my-pkg-dir))
+(ac-config-default)
+(setq-default ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
+
+(add-to-list 'ac-modes 'org-mode)
+(add-to-list 'ac-modes 'erlang-mode)
+(add-to-list 'ac-modes 'haskell-mode)
+(add-to-list 'ac-modes 'text-mode)
+(add-to-list 'ac-modes 'shell-script-mode)
+(add-to-list 'ac-modes 'fundamental-mode)
+(add-to-list 'ac-modes 'lisp-interaction-mode)
+(add-to-list 'ac-modes 'html-mode)
+(add-to-list 'ac-modes 'python-mode)
+(add-to-list 'ac-modes 'slime-mode)
+(add-to-list 'ac-modes 'lua-mode)
+(add-to-list 'ac-modes 'js2-mode)
+(add-to-list 'ac-modes 'coffee-mode)
+
+(ac-set-trigger-key "TAB")
+
+(define-key ac-complete-mode-map (kbd "C-p") 'ac-previous)
+(define-key ac-complete-mode-map (kbd "C-n") 'ac-next)
+
+;; ==========================================================
;; Haskell-mode
;; ==========================================================
@@ -23,18 +53,6 @@
(add-hook 'lua-mode-hook '(lambda () (flyspell-prog-mode)))
;; ==========================================================
-;; auto complete mode (under test/evaluation)
-;; ==========================================================
-
-(add-my-pkg-to-loadpath "auto-complete")
-(require 'auto-complete-config)
-(add-to-list 'ac-dictionary-directories
- (expand-file-name "auto-complete/dict" my-pkg-dir))
-(ac-config-default)
-(global-auto-complete-mode t)
-(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
-
-;; ==========================================================
;; nxhtml-mode (under test/evaluation)
;; ==========================================================
View
2 emacs/cfg/text-config.el
@@ -16,7 +16,7 @@
yas/completing-prompt))
; The following is useful while I learn the available snippets
(global-set-key "\C-xy" 'yas/insert-snippet)
-;(yas/global-mode t)
+(yas/global-mode t)
;; ==========================================================
;; flyspell

0 comments on commit 5e68f7b

Please sign in to comment.
Something went wrong with that request. Please try again.