From 7d2e2b57b5c5867e22e23334b7ccc87347b4e780 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Mon, 5 Dec 2011 19:06:23 +0330 Subject: [PATCH] dotkuso conf file added --- conf/dotkuso | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++ install.sh | 6 ++- 2 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 conf/dotkuso diff --git a/conf/dotkuso b/conf/dotkuso new file mode 100644 index 0000000..8fd8313 --- /dev/null +++ b/conf/dotkuso @@ -0,0 +1,145 @@ +;; Setup load directory +(add-to-list 'load-path "~/.kuso.d/") + +;; auto complete ------------------------------------------------------------ +(require 'auto-complete-config) +(add-to-list 'ac-dictionary-directories "~/.kuso.d/ac-dict") +(ac-config-default) + +(global-auto-complete-mode t) + +;; 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) + +;; 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 ------------------------------------------------------- +(require 'color-theme) +(eval-after-load "color-theme" + '(progn + (color-theme-initialize) + (color-theme-arjen) + )) +;; Setting up customization ----------------------------------------------------- +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(c-plugin nil) + ;'(color-theme-selection "Arjen" nil (color-theme_seldefcustom)) + '(developer-email "lxsameer@gnu.org") + '(developer-name "Sameer Rahmani") + '(kuso-workspace "/home/lxsameer/src/") + '(face-font-family-alternatives (quote (("courier" "Monospace" "fixed") ("courier" "CMU Typewriter Text" "fixed") ("Sans Serif" "helv" "helvetica" "arial" "fixed") ("helv" "helvetica" "arial" "fixed")))) + '(inhibit-startup-screen t) + '(rng-nxml-auto-validate-flag nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(font-lock-comment-face ((t (:foreground "orange red")))) + '(font-lock-keyword-face ((t (:foreground "DeepSkyBlue1"))))) + +;; flymake --------------------------------------------------------- +(require 'flymake) +(add-hook 'find-file-hook 'flymake-find-file-hook) + +(when (load "flymake" t) + (defun flymake-pyflakes-init () + (let* ((temp-file (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)) + (local-file (file-relative-name + temp-file + (file-name-directory buffer-file-name)))) + (list "/home/lxsameer/.kuso.d/pyemacs.sh" (list local-file)))) + (add-to-list 'flymake-allowed-file-name-masks + '("\\.py$" flymake-pyflakes-init))) + +(defun flymake-html-init () + (let* ((temp-file (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)) + (local-file (file-relative-name + temp-file + (file-name-directory buffer-file-name)))) + (list "tidy" (list local-file)))) + +(add-to-list 'flymake-allowed-file-name-masks + '("\\.html$\\|\\.ctp" flymake-html-init)) + +(add-to-list 'flymake-err-line-patterns + '("line \\([0-9]+\\) column \\([0-9]+\\) - \\(Warning\\|Error\\): \\(.*\\)" + nil 1 2 4)) + +(defun flymake-css-init () + (let* ((temp-file (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)) + (local-file (file-relative-name + temp-file + (file-name-directory buffer-file-name)))) + (list "cssparse" (list local-file)))) +(add-to-list 'flymake-allowed-file-name-masks + '("\\.css$" flymake-css-init)) +(add-to-list 'flymake-err-line-patterns + '("\\(.*\\) \\[\\([0-9]+\\):\\([0-9]+\\): \\(.*\\)\\]" + nil 2 3 1)) +(add-hook 'css-mode-hook + (lambda () (flymake-mode t))) + +;; flymake shortkeys +(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) + +;; dabbrev configuration ---------------------------------------------------------- +(require 'ac-dabbrev) +(setq ac-sources + (list ac-source-dabbrev + )) +(global-set-key (kbd "") 'dabbrev-expand) + + +;; C configuration ---------------------------------------------------------------- +;; clang auto completion +(require 'auto-complete-clang) +(setq clang-completion-suppress-error 't) + +(defun my-c-mode-common-hook() + (setq ac-auto-start nil) + (setq ac-expand-on-auto-complete nil) + (setq ac-quick-help-delay 0.3) + (define-key c-mode-base-map (kbd "M-3") 'ac-complete-clang) +) + +;; Linux style for c programming ------------------------------------------------ +(setq c-default-style '((java-mode . "java") + (awk-mode . "awk") + (other . "linux"))) + +;; KUSO configuration ------------------------------------------------------------ +(load-file "/home/lxsameer/src/kuso-ide/src/kuso-ide.el") +(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) diff --git a/install.sh b/install.sh index a1df3e9..66bafc8 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #! /bin/bash -VERSION="0.11.0" +VERSION="0.12.0" # Gathering informations echo -e "\n\tKuso IDE v$VERSION copyright 2010-2011 Sameer Rahmani \n\n" @@ -16,6 +16,7 @@ while [ "$condition" == "1" ] ; do dotemacs=~/.kuso repo=~/.kuso.d condition="0" + conffile=conf/dotkuso fi if [ "$standalone" == "n" ] @@ -23,6 +24,7 @@ while [ "$condition" == "1" ] ; do dotemacs=~/.emacs repo=~/.emacs.d condition="0" + conffile=conf/dotemacs fi @@ -54,7 +56,7 @@ cp conf/bin/pyemacs.sh $addr/ -r chmod u+x $addr/pyemacs.sh echo "Creating ~/.emacs" -cp conf/dotemacs $dotemacs +cp $conffile $dotemacs if [ "$standalone" == "y" ] then