 ;; So DELETE key behaves nicely
 (global-set-key (kbd "<delete>") '(lambda (n) (interactive "p") (if (use-region-p) (delete-region (region-beginning) (region-end)) (delete-char n))))
 
-(cua-mode 1)
+;;(cua-mode 1)
 ;; Remap cua rectangle select to avoid cedet completion
 (global-set-key (kbd "<s-return>") 'cua-set-rectangle-mark)
+(global-set-key (kbd "C-<home>") 'beginning-of-buffer)
+(global-set-key (kbd "C-<end>") 'end-of-buffer)   
+
+(define-key input-decode-map "\e[1;2D" [S-left])  
+(define-key input-decode-map "\e[1;2C" [S-right])  
+(define-key input-decode-map "\e[1;2B" [S-down])  
+(define-key input-decode-map "\e[1;2A" [S-up])  
+(define-key input-decode-map "\e[1;2F" [S-end])  
+(define-key input-decode-map "\e[1;2H" [S-home])
 
 ;; collect less frequently
 (setq gc-cons-threshold 20000000)


;; Somehow emacs keeps seeing a fresh save as changed when building, so becomes intolerably naggy
;; auto-touch from issues makefile makes life intolerably naggy
;; (global-auto-revert-mode 1)
(defun ask-user-about-supersession-threat (fn)
  "blatantly ignore files that changed on disk"
  )


;; autosave before compiling

(setq ido-use-faces nil)

;; window rotations
(load-file "~/.emacs.d/transpose-frame.el")

(setq x-select-enable-clipboard t)

