Merge with gitgutter
This commit is contained in:
commit
b38353155e
|
@ -36,7 +36,7 @@ Kuso IDE required these softwares:
|
||||||
* GNU Emacs
|
* GNU Emacs
|
||||||
|
|
||||||
Python dependencies
|
Python dependencies
|
||||||
^^^^^^^^^^^^^^^^^^^
|
-------------------
|
||||||
* pep8
|
* pep8
|
||||||
* pyflakes
|
* pyflakes
|
||||||
* pychecker
|
* pychecker
|
||||||
|
@ -47,11 +47,11 @@ For autocompetion:
|
||||||
* epc
|
* epc
|
||||||
|
|
||||||
HTML dependencies
|
HTML dependencies
|
||||||
^^^^^^^^^^^^^^^^^
|
-----------------
|
||||||
* tidy
|
* tidy
|
||||||
|
|
||||||
CSS dependencies
|
CSS dependencies
|
||||||
^^^^^^^^^^^^^^^^
|
----------------
|
||||||
* python-cssutils (pip install cssutils)
|
* python-cssutils (pip install cssutils)
|
||||||
|
|
||||||
|
|
224
conf/dotemacs
224
conf/dotemacs
|
@ -1,39 +1,12 @@
|
||||||
;; Setup load directory
|
;; Setup load directory
|
||||||
(add-to-list 'load-path "~/.emacs.d/")
|
(add-to-list 'load-path "~/.emacs.d/")
|
||||||
(add-to-list 'load-path "~/.emacs.d/ecb/")
|
|
||||||
|
|
||||||
;; auto complete ------------------------------------------------------------
|
;; General configuration ---------------------------------------------------------
|
||||||
(require 'auto-complete-config)
|
(tool-bar-mode -1)
|
||||||
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
|
(scroll-bar-mode -1)
|
||||||
(ac-config-default)
|
(setq x-select-enable-clipboard t)
|
||||||
|
(column-number-mode t)
|
||||||
(global-auto-complete-mode t)
|
(global-linum-mode)
|
||||||
|
|
||||||
;; ssh configuration ---------------------------------------------------------
|
|
||||||
(setq tramp-default-method "ssh")
|
|
||||||
|
|
||||||
;; python configuration ------------------------------------------------------
|
|
||||||
(autoload 'python-mode "python-mode" "Python Mode." t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
|
|
||||||
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
|
||||||
(require 'python-mode)
|
|
||||||
(define-key py-mode-map (kbd "\C-c @") 'uncomment-region)
|
|
||||||
|
|
||||||
;; python autocomplete
|
|
||||||
(require 'deferred)
|
|
||||||
(require 'epc)
|
|
||||||
(autoload 'jedi:setup "jedi" nil t)
|
|
||||||
(add-hook 'python-mode-hook 'jedi:setup)
|
|
||||||
(setq jedi:setup-keys t)
|
|
||||||
|
|
||||||
;; php-mode -------------------------------------------------------------------
|
|
||||||
(autoload 'php-mode "php-mode" "PHP editing mode" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
|
|
||||||
|
|
||||||
;; yasnippet configuration ----------------------------------------------------
|
|
||||||
(require 'yasnippet)
|
|
||||||
(yas/initialize)
|
|
||||||
(yas/load-directory "~/.emacs.d/snippets")
|
|
||||||
|
|
||||||
;; Setting up color them -------------------------------------------------------
|
;; Setting up color them -------------------------------------------------------
|
||||||
(require 'color-theme)
|
(require 'color-theme)
|
||||||
|
@ -42,6 +15,7 @@
|
||||||
(color-theme-initialize)
|
(color-theme-initialize)
|
||||||
(color-theme-arjen)
|
(color-theme-arjen)
|
||||||
))
|
))
|
||||||
|
|
||||||
;; Setting up customization -----------------------------------------------------
|
;; Setting up customization -----------------------------------------------------
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
;; custom-set-variables was added by Custom.
|
;; custom-set-variables was added by Custom.
|
||||||
|
@ -64,11 +38,93 @@
|
||||||
'(font-lock-comment-face ((t (:foreground "orange red"))))
|
'(font-lock-comment-face ((t (:foreground "orange red"))))
|
||||||
'(font-lock-keyword-face ((t (:foreground "DeepSkyBlue1")))))
|
'(font-lock-keyword-face ((t (:foreground "DeepSkyBlue1")))))
|
||||||
|
|
||||||
;; (set-frame-font "Terminus-10")
|
(set-frame-font "Terminus-9")
|
||||||
;; flymake ---------------------------------------------------------
|
|
||||||
|
;; HideShow --------------------
|
||||||
|
(load-library "hideshow")
|
||||||
|
(global-set-key (kbd "C-\-") 'hs-toggle-hiding)
|
||||||
|
(global-set-key (kbd "C-\\") 'toggle-selective-display)
|
||||||
|
|
||||||
|
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'java-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'lisp-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'perl-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'sh-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'python-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'js-mode-hook 'hs-minor-mode)
|
||||||
|
|
||||||
|
(require 'fringe-helper)
|
||||||
|
(autoload 'hideshowvis-enable "hideshowvis" "Highlight foldable regions")
|
||||||
|
(autoload 'hideshowvis-minor-mode
|
||||||
|
"hideshowvis"
|
||||||
|
"Will indicate regions foldable with hideshow in the fringe."
|
||||||
|
'interactive)
|
||||||
|
(dolist (hook (list 'emacs-lisp-mode-hook
|
||||||
|
'c++-mode-hook
|
||||||
|
'python-mode-hook))
|
||||||
|
(add-hook hook 'hideshowvis-enable))
|
||||||
|
|
||||||
|
|
||||||
|
;; auto complete ------------------------------------------------------------
|
||||||
|
(require 'auto-complete-config)
|
||||||
|
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
|
||||||
|
(ac-config-default)
|
||||||
|
|
||||||
|
(global-auto-complete-mode t)
|
||||||
|
|
||||||
|
;;dabbrev;;
|
||||||
|
;; dabbrev configuration ----------------------------------------------------------
|
||||||
|
(require 'ac-dabbrev)
|
||||||
|
(setq ac-sources
|
||||||
|
(list ac-source-dabbrev
|
||||||
|
))
|
||||||
|
(global-set-key (kbd "<backtab>") 'dabbrev-expand)
|
||||||
|
;;/dabbrev;;
|
||||||
|
|
||||||
|
;; ssh configuration ---------------------------------------------------------
|
||||||
|
(setq tramp-default-method "ssh")
|
||||||
|
|
||||||
|
;;python-mode;;
|
||||||
|
;; python configuration ------------------------------------------------------
|
||||||
|
(autoload 'python-mode "python-mode" "Python Mode." t)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
|
||||||
|
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
||||||
|
(require 'python-mode)
|
||||||
|
(define-key py-mode-map (kbd "\C-c @") 'uncomment-region)
|
||||||
|
|
||||||
|
(autoload 'python-pylint "python-pylint")
|
||||||
|
(autoload 'pylint "python-pylint")
|
||||||
|
|
||||||
|
;;/python-mode;;
|
||||||
|
|
||||||
|
;;python-autocomplete;;
|
||||||
|
;; python autocomplete -------------------------------------------------------
|
||||||
|
(require 'deferred)
|
||||||
|
(require 'epc)
|
||||||
|
(autoload 'jedi:setup "jedi" nil t)
|
||||||
|
(add-hook 'python-mode-hook 'jedi:setup)
|
||||||
|
(setq jedi:setup-keys t)
|
||||||
|
;;/python-autocomplete;;
|
||||||
|
|
||||||
|
;;php-mode;;
|
||||||
|
;; php-mode -------------------------------------------------------------------
|
||||||
|
(autoload 'php-mode "php-mode" "PHP editing mode" t)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
|
||||||
|
;;/php-mode;;
|
||||||
|
|
||||||
|
|
||||||
|
;;yasnippet;;
|
||||||
|
;; yasnippet configuration ----------------------------------------------------
|
||||||
|
(require 'yasnippet)
|
||||||
|
(yas/initialize)
|
||||||
|
(yas/load-directory "~/.emacs.d/snippets")
|
||||||
|
;;/yasnippet;;
|
||||||
|
|
||||||
|
;; flymake --------------------------------------------------------------------
|
||||||
(require 'flymake)
|
(require 'flymake)
|
||||||
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
||||||
|
|
||||||
|
;; pyflymake ------------------------------------------------------------------
|
||||||
(when (load "flymake" t)
|
(when (load "flymake" t)
|
||||||
(defun flymake-pyflakes-init ()
|
(defun flymake-pyflakes-init ()
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
||||||
|
@ -80,6 +136,7 @@
|
||||||
(add-to-list 'flymake-allowed-file-name-masks
|
(add-to-list 'flymake-allowed-file-name-masks
|
||||||
'("\\.py$" flymake-pyflakes-init)))
|
'("\\.py$" flymake-pyflakes-init)))
|
||||||
|
|
||||||
|
;; html flymake ---------------------------------------------------------------
|
||||||
(defun flymake-html-init ()
|
(defun flymake-html-init ()
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
||||||
'flymake-create-temp-inplace))
|
'flymake-create-temp-inplace))
|
||||||
|
@ -95,6 +152,7 @@
|
||||||
'("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)"
|
'("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)"
|
||||||
nil 1 2 4))
|
nil 1 2 4))
|
||||||
|
|
||||||
|
l;; css flymake -----------------------------------------------------------------
|
||||||
(defun flymake-css-init ()
|
(defun flymake-css-init ()
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
||||||
'flymake-create-temp-inplace))
|
'flymake-create-temp-inplace))
|
||||||
|
@ -110,18 +168,20 @@
|
||||||
(add-hook 'css-mode-hook
|
(add-hook 'css-mode-hook
|
||||||
(lambda () (flymake-mode t)))
|
(lambda () (flymake-mode t)))
|
||||||
|
|
||||||
;; flymake shortkeys
|
;; flymake shortkeys --------------------------------------------------------------
|
||||||
(global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line)
|
(global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line)
|
||||||
(global-set-key (kbd "\C-x p") 'flymake-goto-next-error)
|
(global-set-key (kbd "\C-x p") 'flymake-goto-next-error)
|
||||||
|
|
||||||
;; dabbrev configuration ----------------------------------------------------------
|
;; JS folding
|
||||||
(require 'ac-dabbrev)
|
(add-hook 'js-mode-hook
|
||||||
(setq ac-sources
|
(lambda ()
|
||||||
(list ac-source-dabbrev
|
;; Scan the file for nested code blocks
|
||||||
))
|
(imenu-add-menubar-index)
|
||||||
(global-set-key (kbd "<backtab>") 'dabbrev-expand)
|
;; Activate the folding mode
|
||||||
|
(hs-minor-mode t)))
|
||||||
|
|
||||||
|
|
||||||
|
;;clang-mode;;
|
||||||
;; C configuration ----------------------------------------------------------------
|
;; C configuration ----------------------------------------------------------------
|
||||||
;; clang auto completion
|
;; clang auto completion
|
||||||
(require 'auto-complete-clang)
|
(require 'auto-complete-clang)
|
||||||
|
@ -139,21 +199,15 @@
|
||||||
(awk-mode . "awk")
|
(awk-mode . "awk")
|
||||||
(other . "linux")))
|
(other . "linux")))
|
||||||
|
|
||||||
|
(add-hook 'c-mode-common-hook 'hs-minor-mode)
|
||||||
|
;;/clang-mode;;
|
||||||
|
|
||||||
;; KUSO configuration ------------------------------------------------------------
|
;; KUSO configuration ------------------------------------------------------------
|
||||||
(load-file "--KUSOHOME--/src/kuso-ide.el")
|
(load-file "--KUSOHOME--/src/kuso-ide.el")
|
||||||
(kuso-mode)
|
(kuso-mode)
|
||||||
|
|
||||||
;; General configuration ---------------------------------------------------------
|
|
||||||
(autoload 'python-pylint "python-pylint")
|
|
||||||
(autoload 'pylint "python-pylint")
|
|
||||||
|
|
||||||
(tool-bar-mode -1)
|
|
||||||
(scroll-bar-mode -1)
|
|
||||||
(setq x-select-enable-clipboard t)
|
|
||||||
(column-number-mode t)
|
|
||||||
(global-linum-mode)
|
|
||||||
|
|
||||||
|
|
||||||
|
;;org-mode;;
|
||||||
;; org-mode ------------------------------------------------------
|
;; org-mode ------------------------------------------------------
|
||||||
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
||||||
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when(global-set-key "\C-cl" 'org-store-link)
|
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when(global-set-key "\C-cl" 'org-store-link)
|
||||||
|
@ -161,7 +215,9 @@
|
||||||
(global-set-key "\C-cb" 'org-iswitchb)
|
(global-set-key "\C-cb" 'org-iswitchb)
|
||||||
|
|
||||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||||
|
;;/org-mode;;
|
||||||
|
|
||||||
|
;;cedet;;
|
||||||
;; Configuring ECB and CEDET
|
;; Configuring ECB and CEDET
|
||||||
;;(load-file "~/.emacs.d/cedet/cedet-devel-load.el")
|
;;(load-file "~/.emacs.d/cedet/cedet-devel-load.el")
|
||||||
;;(add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode t)
|
;;(add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode t)
|
||||||
|
@ -170,66 +226,30 @@
|
||||||
;;(global-ede-mode 1)
|
;;(global-ede-mode 1)
|
||||||
;;(semantic-load-enable-code-helpers)
|
;;(semantic-load-enable-code-helpers)
|
||||||
;;(global-srecode-minor-mode 1)
|
;;(global-srecode-minor-mode 1)
|
||||||
|
(add-to-list 'load-path "~/.emacs.d/ecb/")
|
||||||
;;(require 'ecb)
|
;;(require 'ecb)
|
||||||
|
;;/cedet;;
|
||||||
|
|
||||||
;; JS folding
|
;;lua-mode;;
|
||||||
(add-hook 'js-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
;; Scan the file for nested code blocks
|
|
||||||
(imenu-add-menubar-index)
|
|
||||||
;; Activate the folding mode
|
|
||||||
(hs-minor-mode t)))
|
|
||||||
|
|
||||||
;; Lua mode --------------------
|
;; Lua mode --------------------
|
||||||
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
|
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
|
||||||
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
|
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
|
||||||
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
|
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
|
||||||
|
|
||||||
;; HideShow --------------------
|
|
||||||
(load-library "hideshow")
|
|
||||||
(global-set-key (kbd "C-\-") 'hs-toggle-hiding)
|
|
||||||
(global-set-key (kbd "C-\\") 'toggle-selective-display)
|
|
||||||
|
|
||||||
(add-hook 'c-mode-common-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'java-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'lisp-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'perl-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'sh-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'python-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'lua-mode-hook 'hs-minor-mode)
|
(add-hook 'lua-mode-hook 'hs-minor-mode)
|
||||||
(add-hook 'js-mode-hook 'hs-minor-mode)
|
;;/lua-mode;;
|
||||||
|
|
||||||
|
|
||||||
|
;;git-gutter;;
|
||||||
;; git-gutter ------------------
|
;; git-gutter ------------------
|
||||||
(require 'fringe-helper)
|
(require 'git-gutter)
|
||||||
(fringe-helper-define 'test-bitmap '(top repeat)
|
(require 'git-gutter-fringe)
|
||||||
"XX......"
|
|
||||||
"..XX...."
|
|
||||||
"....XX.."
|
|
||||||
"......XX")
|
|
||||||
|
|
||||||
(autoload 'hideshowvis-enable "hideshowvis" "Highlight foldable regions")
|
(global-git-gutter-mode t)
|
||||||
(autoload 'hideshowvis-minor-mode
|
|
||||||
"hideshowvis"
|
|
||||||
"Will indicate regions foldable with hideshow in the fringe."
|
|
||||||
'interactive)
|
|
||||||
(dolist (hook (list 'emacs-lisp-mode-hook
|
|
||||||
'c++-mode-hook
|
|
||||||
'python-mode-hook))
|
|
||||||
(add-hook hook 'hideshowvis-enable))
|
|
||||||
|
|
||||||
|
(add-hook 'ruby-mode-hook 'git-gutter-mode)
|
||||||
|
(add-hook 'python-mode-hook 'git-gutter-mode)
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-x C-g") 'git-gutter:toggle)
|
||||||
|
|
||||||
;;(require 'git-gutter)
|
(global-set-key (kbd "C-x p") 'git-gutter:previous-diff)
|
||||||
;;(require 'git-gutter-fringe)
|
(global-set-key (kbd "C-x n") 'git-gutter:next-diff)
|
||||||
|
;;/git-gutter;;
|
||||||
;;(global-git-gutter-mode t)
|
|
||||||
|
|
||||||
;;(add-hook 'ruby-mode-hook 'git-gutter-mode)
|
|
||||||
|
|
||||||
;;(global-set-key (kbd "C-x C-g") 'git-gutter:toggle)
|
|
||||||
|
|
||||||
;;(global-set-key (kbd "C-x p") 'git-gutter:previous-diff)
|
|
||||||
;;(global-set-key (kbd "C-x n") 'git-gutter:next-diff)
|
|
||||||
|
|
219
conf/dotkuso
219
conf/dotkuso
|
@ -1,39 +1,12 @@
|
||||||
;; Setup load directory
|
;; Setup load directory
|
||||||
(add-to-list 'load-path "~/.kuso.d/")
|
(add-to-list 'load-path "~/.kuso.d/")
|
||||||
(add-to-list 'load-path "~/.kuso.d/ecb/")
|
|
||||||
|
|
||||||
;; auto complete ------------------------------------------------------------
|
;; General configuration ---------------------------------------------------------
|
||||||
(require 'auto-complete-config)
|
(tool-bar-mode -1)
|
||||||
(add-to-list 'ac-dictionary-directories "~/.kuso.d/ac-dict")
|
(scroll-bar-mode -1)
|
||||||
(ac-config-default)
|
(setq x-select-enable-clipboard t)
|
||||||
|
(column-number-mode t)
|
||||||
(global-auto-complete-mode t)
|
(global-linum-mode)
|
||||||
|
|
||||||
;; ssh configuration ---------------------------------------------------------
|
|
||||||
(setq tramp-default-method "ssh")
|
|
||||||
|
|
||||||
;; python configuration ------------------------------------------------------
|
|
||||||
(autoload 'python-mode "python-mode" "Python Mode." t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
|
|
||||||
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
|
||||||
(require 'python-mode)
|
|
||||||
(define-key py-mode-map (kbd "\C-c @") 'uncomment-region)
|
|
||||||
|
|
||||||
;; python autocomplete
|
|
||||||
(require 'deferred)
|
|
||||||
(require 'epc)
|
|
||||||
(autoload 'jedi:setup "jedi" nil t)
|
|
||||||
(add-hook 'python-mode-hook 'jedi:setup)
|
|
||||||
(setq jedi:setup-keys t)
|
|
||||||
|
|
||||||
;; php-mode -------------------------------------------------------------------
|
|
||||||
(autoload 'php-mode "php-mode" "PHP editing mode" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
|
|
||||||
|
|
||||||
;; yasnippet configuration ----------------------------------------------------
|
|
||||||
(require 'yasnippet)
|
|
||||||
(yas/initialize)
|
|
||||||
(yas/load-directory "~/.kuso.d/snippets")
|
|
||||||
|
|
||||||
;; Setting up color them -------------------------------------------------------
|
;; Setting up color them -------------------------------------------------------
|
||||||
(require 'color-theme)
|
(require 'color-theme)
|
||||||
|
@ -42,6 +15,7 @@
|
||||||
(color-theme-initialize)
|
(color-theme-initialize)
|
||||||
(color-theme-arjen)
|
(color-theme-arjen)
|
||||||
))
|
))
|
||||||
|
|
||||||
;; Setting up customization -----------------------------------------------------
|
;; Setting up customization -----------------------------------------------------
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
;; custom-set-variables was added by Custom.
|
;; custom-set-variables was added by Custom.
|
||||||
|
@ -64,10 +38,93 @@
|
||||||
'(font-lock-comment-face ((t (:foreground "orange red"))))
|
'(font-lock-comment-face ((t (:foreground "orange red"))))
|
||||||
'(font-lock-keyword-face ((t (:foreground "DeepSkyBlue1")))))
|
'(font-lock-keyword-face ((t (:foreground "DeepSkyBlue1")))))
|
||||||
|
|
||||||
;; flymake ---------------------------------------------------------
|
(set-frame-font "Terminus-9")
|
||||||
|
|
||||||
|
;; HideShow --------------------
|
||||||
|
(load-library "hideshow")
|
||||||
|
(global-set-key (kbd "C-\-") 'hs-toggle-hiding)
|
||||||
|
(global-set-key (kbd "C-\\") 'toggle-selective-display)
|
||||||
|
|
||||||
|
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'java-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'lisp-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'perl-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'sh-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'python-mode-hook 'hs-minor-mode)
|
||||||
|
(add-hook 'js-mode-hook 'hs-minor-mode)
|
||||||
|
|
||||||
|
(require 'fringe-helper)
|
||||||
|
(autoload 'hideshowvis-enable "hideshowvis" "Highlight foldable regions")
|
||||||
|
(autoload 'hideshowvis-minor-mode
|
||||||
|
"hideshowvis"
|
||||||
|
"Will indicate regions foldable with hideshow in the fringe."
|
||||||
|
'interactive)
|
||||||
|
(dolist (hook (list 'emacs-lisp-mode-hook
|
||||||
|
'c++-mode-hook
|
||||||
|
'python-mode-hook))
|
||||||
|
(add-hook hook 'hideshowvis-enable))
|
||||||
|
|
||||||
|
|
||||||
|
;; auto complete ------------------------------------------------------------
|
||||||
|
(require 'auto-complete-config)
|
||||||
|
(add-to-list 'ac-dictionary-directories "~/.kuso.d/ac-dict")
|
||||||
|
(ac-config-default)
|
||||||
|
|
||||||
|
(global-auto-complete-mode t)
|
||||||
|
|
||||||
|
;;dabbrev;;
|
||||||
|
;; dabbrev configuration ----------------------------------------------------------
|
||||||
|
(require 'ac-dabbrev)
|
||||||
|
(setq ac-sources
|
||||||
|
(list ac-source-dabbrev
|
||||||
|
))
|
||||||
|
(global-set-key (kbd "<backtab>") 'dabbrev-expand)
|
||||||
|
;;/dabbrev;;
|
||||||
|
|
||||||
|
;; ssh configuration ---------------------------------------------------------
|
||||||
|
(setq tramp-default-method "ssh")
|
||||||
|
|
||||||
|
;;python-mode;;
|
||||||
|
;; python configuration ------------------------------------------------------
|
||||||
|
(autoload 'python-mode "python-mode" "Python Mode." t)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
|
||||||
|
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
||||||
|
(require 'python-mode)
|
||||||
|
(define-key py-mode-map (kbd "\C-c @") 'uncomment-region)
|
||||||
|
|
||||||
|
(autoload 'python-pylint "python-pylint")
|
||||||
|
(autoload 'pylint "python-pylint")
|
||||||
|
|
||||||
|
;;/python-mode;;
|
||||||
|
|
||||||
|
;;python-autocomplete;;
|
||||||
|
;; python autocomplete -------------------------------------------------------
|
||||||
|
(require 'deferred)
|
||||||
|
(require 'epc)
|
||||||
|
(autoload 'jedi:setup "jedi" nil t)
|
||||||
|
(add-hook 'python-mode-hook 'jedi:setup)
|
||||||
|
(setq jedi:setup-keys t)
|
||||||
|
;;/python-autocomplete;;
|
||||||
|
|
||||||
|
;;php-mode;;
|
||||||
|
;; php-mode -------------------------------------------------------------------
|
||||||
|
(autoload 'php-mode "php-mode" "PHP editing mode" t)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
|
||||||
|
;;/php-mode;;
|
||||||
|
|
||||||
|
|
||||||
|
;;yasnippet;;
|
||||||
|
;; yasnippet configuration ----------------------------------------------------
|
||||||
|
(require 'yasnippet)
|
||||||
|
(yas/initialize)
|
||||||
|
(yas/load-directory "~/.kuso.d/snippets")
|
||||||
|
;;/yasnippet;;
|
||||||
|
|
||||||
|
;; flymake --------------------------------------------------------------------
|
||||||
(require 'flymake)
|
(require 'flymake)
|
||||||
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
||||||
|
|
||||||
|
;; pyflymake ------------------------------------------------------------------
|
||||||
(when (load "flymake" t)
|
(when (load "flymake" t)
|
||||||
(defun flymake-pyflakes-init ()
|
(defun flymake-pyflakes-init ()
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
||||||
|
@ -79,6 +136,7 @@
|
||||||
(add-to-list 'flymake-allowed-file-name-masks
|
(add-to-list 'flymake-allowed-file-name-masks
|
||||||
'("\\.py$" flymake-pyflakes-init)))
|
'("\\.py$" flymake-pyflakes-init)))
|
||||||
|
|
||||||
|
;; html flymake ---------------------------------------------------------------
|
||||||
(defun flymake-html-init ()
|
(defun flymake-html-init ()
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
||||||
'flymake-create-temp-inplace))
|
'flymake-create-temp-inplace))
|
||||||
|
@ -94,6 +152,7 @@
|
||||||
'("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)"
|
'("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)"
|
||||||
nil 1 2 4))
|
nil 1 2 4))
|
||||||
|
|
||||||
|
l;; css flymake -----------------------------------------------------------------
|
||||||
(defun flymake-css-init ()
|
(defun flymake-css-init ()
|
||||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
||||||
'flymake-create-temp-inplace))
|
'flymake-create-temp-inplace))
|
||||||
|
@ -109,18 +168,20 @@
|
||||||
(add-hook 'css-mode-hook
|
(add-hook 'css-mode-hook
|
||||||
(lambda () (flymake-mode t)))
|
(lambda () (flymake-mode t)))
|
||||||
|
|
||||||
;; flymake shortkeys
|
;; flymake shortkeys --------------------------------------------------------------
|
||||||
(global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line)
|
(global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line)
|
||||||
(global-set-key (kbd "\C-x p") 'flymake-goto-next-error)
|
(global-set-key (kbd "\C-x p") 'flymake-goto-next-error)
|
||||||
|
|
||||||
;; dabbrev configuration ----------------------------------------------------------
|
;; JS folding
|
||||||
(require 'ac-dabbrev)
|
(add-hook 'js-mode-hook
|
||||||
(setq ac-sources
|
(lambda ()
|
||||||
(list ac-source-dabbrev
|
;; Scan the file for nested code blocks
|
||||||
))
|
(imenu-add-menubar-index)
|
||||||
(global-set-key (kbd "<backtab>") 'dabbrev-expand)
|
;; Activate the folding mode
|
||||||
|
(hs-minor-mode t)))
|
||||||
|
|
||||||
|
|
||||||
|
;;clang-mode;;
|
||||||
;; C configuration ----------------------------------------------------------------
|
;; C configuration ----------------------------------------------------------------
|
||||||
;; clang auto completion
|
;; clang auto completion
|
||||||
(require 'auto-complete-clang)
|
(require 'auto-complete-clang)
|
||||||
|
@ -138,66 +199,44 @@
|
||||||
(awk-mode . "awk")
|
(awk-mode . "awk")
|
||||||
(other . "linux")))
|
(other . "linux")))
|
||||||
|
|
||||||
|
(add-hook 'c-mode-common-hook 'hs-minor-mode)
|
||||||
|
;;/clang-mode;;
|
||||||
|
|
||||||
;; KUSO configuration ------------------------------------------------------------
|
;; KUSO configuration ------------------------------------------------------------
|
||||||
(load-file "--KUSOHOME--/src/kuso-ide.el")
|
(load-file "--KUSOHOME--/src/kuso-ide.el")
|
||||||
(kuso-mode)
|
(kuso-mode)
|
||||||
|
|
||||||
;; General configuration ---------------------------------------------------------
|
|
||||||
(autoload 'python-pylint "python-pylint")
|
|
||||||
(autoload 'pylint "python-pylint")
|
|
||||||
|
|
||||||
(tool-bar-mode -1)
|
|
||||||
(scroll-bar-mode -1)
|
|
||||||
(setq x-select-enable-clipboard t)
|
|
||||||
(column-number-mode t)
|
|
||||||
(global-linum-mode)
|
|
||||||
|
|
||||||
;; IDO config ----------------------------------------------------------------
|
|
||||||
(require 'ido)
|
|
||||||
(ido-mode t)
|
|
||||||
|
|
||||||
;; Workgroups ----------------------------------------------------------------
|
|
||||||
(require 'workgroups)
|
|
||||||
|
|
||||||
|
|
||||||
|
;;org-mode;;
|
||||||
;; org-mode ------------------------------------------------------
|
;; org-mode ------------------------------------------------------
|
||||||
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
||||||
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when(global-set-key "\C-cl" 'org-store-link)
|
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when(global-set-key "\C-cl" 'org-store-link)
|
||||||
(global-set-key "\C-ca" 'org-agenda)
|
(global-set-key "\C-ca" 'org-agenda)
|
||||||
(global-set-key "\C-cb" 'org-iswitchb)
|
(global-set-key "\C-cb" 'org-iswitchb)
|
||||||
|
|
||||||
;; HideShow --------------------
|
|
||||||
(load-library "hideshow")
|
|
||||||
(global-set-key (kbd "C-\-") 'hs-toggle-hiding)
|
|
||||||
(global-set-key (kbd "C-\\") 'toggle-selective-display)
|
|
||||||
|
|
||||||
(add-hook 'c-mode-common-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'java-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'lisp-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'perl-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'sh-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'python-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'lua-mode-hook 'hs-minor-mode)
|
|
||||||
(add-hook 'js-mode-hook 'hs-minor-mode)
|
|
||||||
|
|
||||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||||
|
;;/org-mode;;
|
||||||
|
|
||||||
|
;;cedet;;
|
||||||
;; Configuring ECB and CEDET
|
;; Configuring ECB and CEDET
|
||||||
;;(load-file "~/.kuso.d/cedet/cedet-devel-load.el")
|
(load-file "~/.kuso.d/cedet/cedet-devel-load.el")
|
||||||
;;(add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode t)
|
(add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode t)
|
||||||
;;(add-to-list 'semantic-default-submodes 'global-semantic-idle-completions-mode t)
|
(add-to-list 'semantic-default-submodes 'global-semantic-idle-completions-mode t)
|
||||||
|
|
||||||
;;(global-ede-mode 1)
|
(global-ede-mode 1)
|
||||||
;;(semantic-load-enable-code-helpers)
|
(semantic-load-enable-code-helpers)
|
||||||
;;(global-srecode-minor-mode 1)
|
(global-srecode-minor-mode 1)
|
||||||
|
(add-to-list 'load-path "~/.kuso.d/ecb/")
|
||||||
|
(require 'ecb)
|
||||||
|
;;/cedet;;
|
||||||
|
|
||||||
;;(require 'ecb)
|
;;lua-mode;;
|
||||||
|
;; Lua mode --------------------
|
||||||
;; Lua-mode -------------------
|
|
||||||
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
|
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
|
||||||
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
|
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
|
||||||
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
|
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
|
||||||
|
(add-hook 'lua-mode-hook 'hs-minor-mode)
|
||||||
|
;;/lua-mode;;
|
||||||
|
|
||||||
;; JS folding ----------------
|
;; JS folding ----------------
|
||||||
(add-hook 'js-mode-hook
|
(add-hook 'js-mode-hook
|
||||||
|
@ -215,3 +254,19 @@
|
||||||
(add-hook 'yaml-mode-hook
|
(add-hook 'yaml-mode-hook
|
||||||
'(lambda ()
|
'(lambda ()
|
||||||
(define-key yaml-mode-map "\C-m" 'newline-and-indent)))
|
(define-key yaml-mode-map "\C-m" 'newline-and-indent)))
|
||||||
|
|
||||||
|
;;git-gutter;;
|
||||||
|
;; git-gutter ------------------
|
||||||
|
(require 'git-gutter)
|
||||||
|
(require 'git-gutter-fringe)
|
||||||
|
|
||||||
|
(global-git-gutter-mode t)
|
||||||
|
|
||||||
|
(add-hook 'ruby-mode-hook 'git-gutter-mode)
|
||||||
|
(add-hook 'python-mode-hook 'git-gutter-mode)
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-x C-g") 'git-gutter:toggle)
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-x p") 'git-gutter:previous-diff)
|
||||||
|
(global-set-key (kbd "C-x n") 'git-gutter:next-diff)
|
||||||
|
;;/git-gutter;;
|
||||||
|
|
|
@ -11,6 +11,7 @@ Contents:
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
Python <python.rst>
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
|
@ -19,4 +20,3 @@ Indices and tables
|
||||||
* :ref:`genindex`
|
* :ref:`genindex`
|
||||||
* :ref:`modindex`
|
* :ref:`modindex`
|
||||||
* :ref:`search`
|
* :ref:`search`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue