From 8e833119db920d838665cb6289115c6327befaf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Fri, 4 Sep 2015 11:58:09 +0200 Subject: [PATCH] Org-mode tags and others --- Xresources | 2 +- bin/one-instance | 9 ++++++--- emacs.d/config/config-evil.el | 2 ++ emacs.d/config/config-org.el | 20 ++++++++++++++++++++ emacs.d/init.el | 18 +++++++++++++++++- vimrc | 1 + zshrc | 2 +- 7 files changed, 48 insertions(+), 6 deletions(-) diff --git a/Xresources b/Xresources index 14d13fb..86ea908 100644 --- a/Xresources +++ b/Xresources @@ -38,7 +38,7 @@ URxvt*font: xft:DejaVu\ Sans\ Mono:pixelsize=14 URxvt*boldFont: xft:DejaVu\ Sans\ Mono:pixelsize=14:style=bold ! Fix font space -URxvt*letterSpace: -2 +URxvt*letterSpace: -1 ! Scrollbar URxvt.scrollStyle: rxvt diff --git a/bin/one-instance b/bin/one-instance index 79206ed..a907d51 100755 --- a/bin/one-instance +++ b/bin/one-instance @@ -5,10 +5,13 @@ then if [ $? == "0" ] then WID=`xdotool search --class $1 | head -1` - wmctrl -i -a $WID - if [ "x$2" != "x" ] + CWID=`xdotool getactivewindow` + if [ "x$WID" != "x$CWID" ]; then - eval "$2" + xdotool windowactivate $WID + #wmctrl -i -R $WID + else + xdotool windowminimize $WID fi else if [ "x$3" == "x" ] diff --git a/emacs.d/config/config-evil.el b/emacs.d/config/config-evil.el index c5fdc6e..42263f3 100644 --- a/emacs.d/config/config-evil.el +++ b/emacs.d/config/config-evil.el @@ -47,6 +47,8 @@ ;; Evil keys (evil-leader/set-leader "") +(define-key evil-normal-state-map (kbd "[q") 'previous-error) +(define-key evil-normal-state-map (kbd "]q") 'next-error) (define-key evil-normal-state-map (kbd "[b") 'previous-code-buffer) (define-key evil-normal-state-map (kbd "]b") 'next-code-buffer) (define-key evil-normal-state-map (kbd "s") 'evil-ace-jump-char-mode) diff --git a/emacs.d/config/config-org.el b/emacs.d/config/config-org.el index 6c0a7ce..9ceb6c9 100644 --- a/emacs.d/config/config-org.el +++ b/emacs.d/config/config-org.el @@ -17,4 +17,24 @@ (setq org-clock-persist 'history) +;; Set syntax highlight in org-mode babel +(setq org-src-fontify-natively t) + +;don't prompt me to confirm everytime I want to evaluate a block +(setq org-confirm-babel-evaluate nil) + +;;; display/update images in the buffer after I evaluate +(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append) + +;;; +(setq org-tag-alist '( + (:startgroup . nil) + ("@phd" . ?p) ("@home" . ?h) + (:endgroup . nil) + (:startgroup . nil) + ("reading" . ?r) ("coding" . ?c) ("writing" . "w") + (:endgroup . nil) + ) + ) + (provide 'config-org) diff --git a/emacs.d/init.el b/emacs.d/init.el index 58f2e57..c38e711 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -2,6 +2,13 @@ ;;; Commentary: ;;; Config that needs to be loaded before require + +;; Added by Package.el. This must come before configurations of +;; installed packages. Don't delete this line. If you don't want it, +;; just comment it out by adding a semicolon to the start of the line. +;; You may delete these explanatory comments. +(package-initialize) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -59,6 +66,7 @@ evil-org-mode evil-surround exec-path-from-shell + f fill-column-indicator flycheck gist @@ -75,11 +83,14 @@ neotree nxhtml nose + ob-ipython pivotal-tracker popwin pretty-mode projectile ;; smex + s + session smart-mode-line switch-window ; takes over C-x o undo-tree @@ -114,14 +125,16 @@ (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) ;;(setq completion-cycle-threshold t) +(add-hook 'after-init-hook 'session-initialize) + ;;; Neotree (require 'neotree) -(setq projectile-switch-project-action 'neotree-projectile-action) (when neo-persist-show (add-hook 'popwin:before-popup-hook (lambda () (setq neo-persist-show nil))) (add-hook 'popwin:after-popup-hook (lambda () (setq neo-persist-show t)))) +(setq projectile-switch-project-action 'neotree-projectile-action) ;;; Popwin (require 'popwin) @@ -201,6 +214,7 @@ (yas-global-mode 1) (guide-key-mode 1) (scroll-bar-mode 0) +(projectile-global-mode) ;;; Specific modes ;; (autoload 'markdown-mode "markdown-mode" @@ -329,4 +343,6 @@ (setq recentf-max-menu-items 20) +(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash")) +(setq tramp-default-method "ssh") (provide '.emacs) diff --git a/vimrc b/vimrc index f924edd..2154536 100644 --- a/vimrc +++ b/vimrc @@ -45,6 +45,7 @@ Bundle "tomasr/molokai" Bundle "elzr/vim-json" Bundle 'Rykka/riv.vim' Bundle "niklasl/vim-rdf" +Bundle "lepture/vim-jinja" diff --git a/zshrc b/zshrc index 0a0b553..14ae964 100644 --- a/zshrc +++ b/zshrc @@ -20,7 +20,7 @@ ZSH_THEME="balkian" CASE_SENSITIVE="true" # Comment this out to disable weekly auto-update checks -# DISABLE_AUTO_UPDATE="true" +DISABLE_AUTO_UPDATE="true" # Change this value to set how frequently ZSH updates¬ export UPDATE_ZSH_DAYS=13