Added folding-mode, might be useful after all

This commit is contained in:
Tom Willemsen 2011-04-13 16:54:04 +02:00
parent 8cb832f073
commit 2173039ef6
6 changed files with 5479 additions and 31 deletions

View file

@ -1,5 +1,4 @@
(global-set-key "\C-m" 'newline-and-indent) (global-set-key "\C-m" 'newline-and-indent)
; Automatically indent on newline ; Automatically indent on newline
(global-set-key (kbd "C-x n r") 'narrow-to-region) (global-set-key (kbd "C-x n r") 'narrow-to-region)
(global-set-key [C-tab] 'hs-toggle-hiding)
(global-set-key (kbd "<f9>") 'compile) (global-set-key (kbd "<f9>") 'compile)

View file

@ -1,21 +1,22 @@
;;{{{ Requires
(require 'naquadah-theme) (require 'naquadah-theme)
(require 'autopair) (require 'autopair)
;;}}}
;(load "autostart.el") ;;{{{ Auto loads
(autoload 'vala-mode "vala-mode"
(autoload 'vala-mode "A Major mode for editing Vala files" t)
"vala-mode" "A Major mode for editing Vala files" t) (autoload 'csharp-mode "csharp-mode"
(autoload 'csharp-mode "A Major mode for editing C# files" t)
"csharp-mode" "A Major mode for editing C# files" t) (autoload 'javascript-mode "javascript"
(autoload 'javascript-mode "A Major mode for editing JavaScript files" t)
"javascript" "A Major mode for editing JavaScript files" t) (autoload 'sqlplus-mode "sqlplus"
(autoload 'sqlplus-mode "A Major mode for communicating with Oracle" t)
"sqlplus" "A Major mode for communicating with Oracle" t) (autoload 'batch-mode "batch-mode"
(autoload 'batch-mode "A Major mode for editing Batch files" t)
"batch-mode" "A Major mode for editing Batch files" t) (autoload 'lua-mode "lua-mode"
(autoload 'lua-mode "A Major mode for editing Lua files" t)
"lua-mode" "A Major mode for editing Lua files" t) (autoload 'php-mode "php-mode-improved"
(autoload 'php-mode "A Major mode for editing PHP files" t)
"php-mode-improved" "A Major mode for editing PHP files" t) (autoload 'graphviz-dot-mode "graphviz-dot-mode"
(autoload 'graphviz-dot-mode "A Major mode for editing graphviz dot files" t)
"graphviz-dot-mode" "A Major mode for editing graphviz dot files" t) ;;}}}

View file

@ -1,10 +1,19 @@
;;{{{ Load
(require 'column-marker) (require 'column-marker)
(add-hook 'c-mode-hook ;;}}}
(lambda () ;;{{{ Functions
(column-marker-1 73)
(column-marker-2 81))) (defun set-column-marker ()
(add-hook 'html-mode-hook (column-marker-1 73)
(lambda () (column-marker-2 81))
(column-marker-1 73)
(column-marker-2 81))) ;;}}}
;;{{{ Hooks
(add-hook 'c-mode-hook 'set-column-marker)
(add-hook 'emacs-lisp-mode-hook 'set-column-marker)
(add-hook 'html-mode-hook 'set-column-marker)
;;}}}

26
emacs.d/20-folding.el Normal file
View file

@ -0,0 +1,26 @@
;;{{{ Load
(autoload 'folding-mode "folding" "Folding mode" t)
;;}}}
;;{{{ Settings
;;{{{ Startup
(add-hook 'folding-mode-hook
(lambda ()
(local-set-key [C-Tab] 'folding-toggle-show-hide)))
;;}}}
;;}}}
;;{{{ Hooks
;;{{{ C
(add-hook 'c-mode-hook
(lambda ()
(folding-mode)))
;;}}}
;;{{{ Emacs Lisp
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(folding-mode)))
;;}}}
;;}}}

View file

@ -1,3 +0,0 @@
(add-hook 'c-mode-hook
(lambda ()
(hs-minor-mode t)))

5416
emacs.d/elisp/folding.el Normal file

File diff suppressed because it is too large Load diff