;; Define the init file

 

;; Increase the garbage collection threshold to 100MB to reduced startup time.

;; See https://www.reddit.com/r/emacs/comments/3kqt6e

(setq gc-cons-threshold (* 1024 1024 100))

 

(setq custom-file (expand-file-name "custom.el" user-emacs-directory))

  (when (file-exists-p custom-file)

    (load custom-file))

 

;; Define colors

(add-to-list 'load-path "~/.emacs.d/themes")

(load-theme 'solarized-selenized-black t)

 

 

;; Keyboard-centric user interface

(setq inhibit-startup-message t)

(tool-bar-mode -1)

(menu-bar-mode -1)

(scroll-bar-mode -1)

(defalias 'yes-or-no-p 'y-or-n-p)

 

(require 'org-indent)

(setq org-auto-align-tags nil)

(setq org-startup-indented t

  org-pretty-entities t

  org-hide-emphasis-markers t

  org-startup-with-inline-images t

  org-startup-folded t

  ;;org-agenda-start-with-follow-mode t

  org-image-actual-width '(300))

 

(require 'org)

(define-key global-map "\C-cl" 'org-store-link)

(define-key global-map "\C-ca" 'org-agenda)

(setq org-log-done t)

(setq org-log-into-drawer t)

(setq org-clock-into-drawer "CLOCKING")

(global-set-key (kbd "C-c c") 'org-capture)

(setq org-capture-templates '(("t" "Todo [inbox]" entry

                                                 (file+headline "~/inbox.org" "Task")

                                                 "* TODO %?\n%U\n")))

 

(setq org-agenda-files (list "~/trabalho.org" "~/inbox.org"))

;; Shourtcats for main file

(global-set-key (kbd "C-c t")

  (lambda () (interactive) (find-file "~/trabalho.org")))

(global-set-key (kbd "C-c i")

  (lambda () (interactive) (find-file "~/inbox.org")))

 

 

(setq org-agenda-default-appointment-duration 30)

(setq org-agenda-skip-deadline-if-done t)

(setq org-agenda-skip-scheduled-if-done t)

 

(setq org-deadline-warning-days 90)

(setq org-agenda-start-on-weekday nil)

 

;; Save backup files to a dedicated directory.

(setq backup-directory-alist '(("." . "~/.emacs.d/backups")))

(setq delete-old-versions -1)

 

;; https://whhone.com/emacs-config/

;; Make numeric backup versions unconditionally.

(setq version-control t)

(setq vc-make-backup-files t)

(setq auto-save-file-name-transforms '((".*" "~/.emacs.d/auto-save-list/" t)))

 

;; Do not create lock files.

(setq create-lockfiles nil)

 

(display-line-numbers-mode +1)

(visual-line-mode +1)

 

;; Show column number in the mode line.

(column-number-mode)

 

;; Transient Mark mode gives you much of the standard selection-highlighting behavior of other editors

(transient-mark-mode 1)

 
