Commits

Anonymous committed 4f4eb90

* Added advice for kill-visual-line to automatically remove whitespace
* Prev/next tab in sr-commander moved back to C-n/p (n/p now works as up/down)

Comments (0)

Files changed (6)

 files/sunrise-x-w32-addons.vbs
 tramp
 calc.el
+vendor/smartparens/.git/*
 
 (setq mc/cmds-to-run-for-all
       '(
+        kill-region
+        kill-visual-line
         tm/pair-backspace
         tm/pair-insert
         typopunct-insert-ellipsis-or-middot
           (progn (forward-char 1)
                  (just-one-space 0)
                  (backward-char 1)))))
+
+(defadvice kill-visual-line (before kill-line-autoreindent activate)
+  (if (member major-mode
+              '(
+                emacs-lisp-mode
+                scheme-mode
+                lisp-mode
+                c-mode
+                c++-mode
+                latex-mode
+                ))
+      (if (and (eolp) (not (bolp)))
+          (progn (forward-char 1)
+                 (just-one-space 0)
+                 (backward-char 1)))))
 (setq-default cursor-type 'box)
 ;; variable width font in text buffers ...
 (dolist (hook '(text-mode-hook
-                erc-mode-hook
                 LaTeX-mode-hook
                 org-mode-hook
                 markdown-mode-hook

files/sunrise-commander.el

 (require 'sunrise-x-tabs)
 (require 'sunrise-x-w32-addons)
 
-(define-key sr-tabs-mode-map [(control ?p)] nil)
-(define-key sr-tabs-mode-map [(control ?n)] nil)
-(define-key sr-tabs-mode-map [(control ?P)] 'sr-tabs-prev)
-(define-key sr-tabs-mode-map [(control ?N)] 'sr-tabs-next)
+(define-key sr-tabs-mode-map [(control ?p)] 'sr-tabs-prev)
+(define-key sr-tabs-mode-map [(control ?n)] 'sr-tabs-next)
 
 (defun my-sunrise-init ()
   (define-key sr-mode-map [(backspace)] 'sr-dired-prev-subdir)
 (load "files/defuns")
 (load "files/advices")
 (load "files/macros")
+(load "files/keys")
 (load "files/tabs")
-(load "files/keys")
 (load "files/ido")
 (load "files/ispell")
 (load "files/dired")