向上箭头有时会在Emacs中向上移动两个空格

时间:2014-05-15 18:46:29

标签: emacs emacs24

我最近在一台新计算机上设置了我的开发环境,我有一个非常奇怪的问题,按下向上箭头有时会将我的光标向上移动两个空格而不是一个空格。我还没有能够发现它何时发生的模式,而且非常令人沮丧。有没有人经历过类似的事?这是我的.emacs,如果它有帮助:

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

(unless (require 'el-get nil t)                                                 
  (url-retrieve                                                                 
   "https://raw.github.com/dimitri/el-get/master/el-get-install.el"             
   (lambda (s)                                                                  
     (end-of-buffer)                                                            
     (eval-print-last-sexp))))                                                  

(delete-trailing-whitespace)                                                   
(add-to-list 'load-path "~/.emacs.d/vendor/")                                   
(add-to-list 'load-path "~/.emacs.d/vendor/js2-mode")                           
(add-to-list 'load-path "~/.emacs.d/vendor/pig-mode")                           
(add-to-list 'load-path "~/.emacs.d/vendor/fill-column-indicator")              
(autoload 'js2-mode "js2-mode" nil t)                                           
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))                           
(add-to-list 'auto-mode-alist '("\\.pig$" . pig-mode))                          
(require 'whitespace)                                                           
(require 'pig-mode)                                                             
(require 'fill-column-indicator)                                                
`(require 'color-theme-zenburn)`                                               
`(color-theme-zenburn)`                                                         
(setq scroll-step            1                                                  
      scroll-conservatively  10000)                                             
(setq column-number-mode t)                                                     

(add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes")              
(el-get 'sync)                                                                  

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")              
                         ("marmalade" . "http://marmalade-repo.org/packages/")  
                         ("melpa" . "http://melpa.milkbox.net/packages/")))     
(setq-default fill-column 80)                                                   
(add-hook 'after-change-major-mode-hook 'fci-mode)                              

;;Whitespace stuff                                                              

; make carriage returns blue and tabs green                                     
(custom-set-faces                                                               
 '(my-carriage-return-face ((((class color)) (:background "blue"))) t)          
 '(my-tab-face ((((class color)) (:background "green"))) t)                     
 )
; add custom font locks to all buffers and all files                            
(add-hook                                                                       
 'font-lock-mode-hook                                                           
 (function                                                                      
  (lambda ()                                                                    
    (setq                                                                       
     font-lock-keywords                                                         
     (append                                                                    
      font-lock-keywords                                                        
      '(                                                                        
    ("\r" (0 'my-carriage-return-face t))                                   
    ("\t" (0 'my-tab-face t))                                               
        ))))))                                                                  

; transform literal tabs into a right-pointing triangle                         
(setq                                                                           
 whitespace-display-mappings ;http://ergoemacs.org/emacs/whitespace-mode.html   
 '(                                                                             
   (tab-mark 9 [9654 9] [92 9])                                                 
   ;others substitutions...                                                     
   ))                                                                           

1 个答案:

答案 0 :(得分:2)

似乎known issuefci-mode结合使用Emacs v24.3(或使用Emacs,具体取决于您的要求)。