.emacs-my
changeset 1186 ff1145717171
parent 1184 43925b28ed73
child 1187 81ffdea5bfb1
equal deleted inserted replaced
1185:fe95fd8f763b 1186:ff1145717171
   859 
   859 
   860 (ido-mode 1)
   860 (ido-mode 1)
   861 
   861 
   862 (global-set-key [?\C-x right] 'next-buffer)
   862 (global-set-key [?\C-x right] 'next-buffer)
   863 (global-set-key [?\C-x left]  'previous-buffer)
   863 (global-set-key [?\C-x left]  'previous-buffer)
       
   864 (global-set-key [s-right] 'next-buffer)
       
   865 (global-set-key [s-left]  'previous-buffer)
   864 (global-set-key (kbd "C-x C-k") 'kill-this-buffer)
   866 (global-set-key (kbd "C-x C-k") 'kill-this-buffer)
   865 (defun my-kill-this-buffer-maybe-switch-to-next ()
   867 (defun my-kill-this-buffer-maybe-switch-to-next ()
   866   "Kill current buffer. Switch to next buffer if previous command
   868   "Kill current buffer. Switch to next buffer if previous command
   867 was switching to next buffer or this command itself allowing
   869 was switching to next buffer or this command itself allowing
   868 sequential closing of uninteresting buffers."
   870 sequential closing of uninteresting buffers."
   870   (let ( (cmd last-command) )
   872   (let ( (cmd last-command) )
   871     (kill-buffer (current-buffer))
   873     (kill-buffer (current-buffer))
   872     (when (memq cmd (list 'next-buffer this-command))
   874     (when (memq cmd (list 'next-buffer this-command))
   873       (next-buffer))))
   875       (next-buffer))))
   874 (global-set-key [?\C-x deletechar] 'my-kill-this-buffer-maybe-switch-to-next)
   876 (global-set-key [?\C-x deletechar] 'my-kill-this-buffer-maybe-switch-to-next)
   875 (global-set-key [?\C-x up] '(lambda ()
   877 (defun my--backward-other-window ()
   876                               (interactive)
   878   (interactive)
   877                               (other-window -1)))
   879   (other-window -1))
   878 (global-set-key [?\C-x down] 'other-window)
   880 (global-set-key [?\C-x up] #'my--backward-other-window)
       
   881 (global-set-key [?\C-x down] #'other-window)
       
   882 (global-set-key [s-up] #'my--backward-other-window)
       
   883 (global-set-key [s-down] #'other-window)
   879 
   884 
   880 (require 'uniquify)
   885 (require 'uniquify)
   881 (setq uniquify-buffer-name-style 'post-forward)
   886 (setq uniquify-buffer-name-style 'post-forward)
   882 (setq uniquify-separator "|")
   887 (setq uniquify-separator "|")
   883 (setq uniquify-after-kill-buffer-p t)
   888 (setq uniquify-after-kill-buffer-p t)