+
+;; 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)
+
+;;; Code:
+
+;; Packages
+(require 'package) ;; You might already have this line
+(add-to-list 'package-archives
+             '("melpa" . "https://melpa.org/packages/"))
+(when (< emacs-major-version 24)
+    ;; For important compatibility libraries like cl-lib
+    (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
+(package-initialize) ;; You might already have this line
+
+
 ;; define system
 (defun system-is-linux()
 	(string-equal system-type "gnu/linux"))

		(comment-dwim arg)))
(global-set-key "\M-;" 'comment-dwim-line)

;; Move block of code
;;;;;;;;;;;;;;;;;;;;;
(defun move-region (start end n)
	"Move the currnt region up or down"
	(interactive "r\np")
	(let ((line-text (delete-and-extract-region start end)))
		(forward-line n)
		(let ((start (point)))
			(insert line-text)
			(setq deactivate-mark nil)
			(set-mark start))))

(defun move-region-down (start end n)
	"Move the current line down by N lines"
	(interactive "r\np")
	(move-region start end (if (null n) 1 n)))

(defun move-region-up (start end n)
	"Move the current line up by N lines"
	(interactive "r\np")
	(move-region start end (if (null n) -1 (- n))))

(global-set-key (kbd "M-s-<up>") 'move-region-up)
(global-set-key (kbd "M-s-<down>") 'move-region-down)

;; Jedi
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)

;; (add-to-list 'load-path "~/.emacs.d/elpa/fill-column-indicator-20151030.1233/")
;; (require 'fill-column-indicator)
;; (define-globalized-minor-mode
;; 	global-fci-mode fci-mode (lambda () (fci-mode 1)))
;; (global-fci-mode t)


;; SPEC mode
(autoload 'rpm-spec-mode "rpm-spec-mode.el" "RPM spec mode." t)
(setq auto-mode-alist (append '(("\\.spec" . rpm-spec-mode))
                              auto-mode-alist))

;; SASS mode
;; SPEC mode
(setq auto-mode-alist (append '(("\\.scss" . sass-mode))
                               auto-mode-alist))

;; Close all buffers
(defun close-all-buffers ()
  (interactive)
  (mapc 'kill-buffer (buffer-list)))

(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(setq use-dialog-box nil)
;; (setq redisplay-dont-pause t)
(setq ring-bell-function 'ignore)
;; Set cursor
;; (setq cursor-type 'bar)
;; (setq blink-cursor-mode 1)
;; (setq blink-cursor-interval 0.8)


(setq cursor-type 'bar)
(beacon-mode 1)

;; Scrolling
(setq scroll-step               1)
(setq scroll-margin            10)
(setq scroll-conservatively 10000)

;; Fill column indicator
(require 'fill-column-indicator)
(setq-default fill-column 99)
(setq fci-rule-width 1)
(setq fci-rule-color "#696969")
(define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1)))
(global-fci-mode 1)

;; Powerline
(setq powerline-default-separator 'slant)

;; Battery
(add-hook 'after-init-hook #'fancy-battery-mode)
(fancy-battery-mode 1)

;; Buffers selectin and ibuffer settings
(require 'bs)
(require 'ibuffer)
(defalias 'list-buffers 'ibuffer)
(global-set-key (kbd "<f2>") 'bs-show)

(setenv "GOPATH" "/home/d_zheleztsov/.local")

;; Linum plugin
(require 'linum)
