- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我刚刚升级了我的整个发行版,我正在尝试使用我以前的设置来设置我的 emacs,当使用我的“magit”插件并输入“M-x magit-status”时,我收到以下错误:
Recursive `require' for feature `magit-simple-keys'
(require 'package)
(add-to-list 'package-archives '("elpa" . "http://tromey.com/elpa/"))
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(package-initialize)
(setq required-packages
(list 'mwe-log-commands 'drag-stuff 'flymake-ruby 'flymake-haml 'regex-tool 'mic-paren 'highline 'android-mode 'css-mode 'csv-mode 'apache-mode 'crontab-mode 'emms 'switch-window 'multi-term 'undo-tree 'rvm 'auto-complete 'yasnippet-bundle 'ruby-electric 'rinari 'inf-ruby 'coffee-mode 'yaml-mode 'feature-mode 'scss-mode 'haml-mode 'magit-simple-keys))
(dolist (package required-packages)
(when (not (package-installed-p package))
(package-refresh-contents)
(package-install package)))
;; Setup external directory variable
(setq elisp-dir
(expand-file-name "elisp" user-emacs-directory))
(setq elisp-external-dir
(expand-file-name "external" elisp-dir))
;; Add external projects to load path
(add-to-list 'load-path elisp-external-dir)
(dolist (project (directory-files elisp-external-dir t "\\w+"))
(when (file-directory-p project)
(add-to-list 'load-path project)))
; Keybinding
(global-set-key [f1] 'twit)
(global-set-key [f2] 'gist-region-or-buffer)
(global-set-key [f3] 'switch-window)
(global-set-key [f4] 'magit-display-log)
(global-set-key [f5] 'magit-status)
(global-set-key [f6] 'multi-term)
(global-set-key [f7] 'split-window-vertically)
(global-set-key [f8] 'next-multiframe-window)
;; f9 is taken by git-status somewhere.
(global-set-key [f10] 'undo-tree-visualize)
(global-set-key [f12] 'switch-full-screen)
(global-set-key (kbd "C-x f") 'rinari-find-file-in-project)
(global-set-key (kbd "C-x g") 'rinari-rgrep)
(global-set-key (kbd "C-c I") 'irc)
;fullscreen mode
(defun switch-full-screen ()
(interactive)
(shell-command "wmctrl -r :ACTIVE: -btoggle,fullscreen"))
;; Allow using mouse thumb button to browse URLs
(global-set-key [mouse-10] 'browse-url-at-mouse)
; stop emacs from contaminating each directory with semantic.cache
(setq semanticdb-default-save-directory "/tmp")
; General settings
(setq-default tab-width 4)
(menu-bar-mode 1) ;; enable the menu bar
(tool-bar-mode -1) ; Disable tool-bar
(display-battery-mode)
(setq column-number-mode t)
(display-time)
(setq backup-inhibited t) ;; disable backup
;; Org-mode options
(add-hook 'org-mode-hook 'turn-on-visual-line-mode)
;; (add-hook 'org-mode-hook 'my-org-mode-autosave-settings)
;; (defun my-org-mode-autosave-settings ()
;; (set (make-local-variable 'auto-save-visited-file-name) t)
;; (setq auto-save-interval 20))
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(setq org-agenda-files '("~/Dropbox/org/"))
(setq org-directory "~/Dropbox/org")
(setq org-mobile-inbox-for-pull "~/Dropbox/org/inbox.org");; new notes will be stored here
(setq org-support-shift-select t)
(setq org-mobile-directory "~/Dropbox/MobileOrg") ;; Set to <your Dropbox root directory>/MobileOrg.
;; Set color
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "DejaVu Sans Mono")))))
; Auto complete settings
(setq hippie-expand-try-functions-list
'(try-complete-abbrev
try-complete-file-name
try-expand-dabbrev))
; -------------------- Custom Settings --------------------
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(display-battery-mode t)
'(display-time-mode t)
'(ecb-options-version "2.32")
'(inhibit-startup-screen t)
'(org-agenda-files (quote ("~/Dropbox/org")) t)
'(rails-ws:default-server-type "mongrel")
'(send-mail-function (quote smtpmail-send-it))
'(smtpmail-smtp-server "smtp.googlemail.com")
'(smtpmail-smtp-service "smtp")
'(tool-bar-mode nil)
'(tooltip-mode nil))
; -------------------- File plugins --------------------
; Interactively Do Things
(ido-mode t)
; tramp - remote ssh editing
(require 'tramp)
(setq tramp-default-method "ssh")
; -------------------- Rails setting files --------------------
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
; -------------------- Rails minor plugin --------------------
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
;; https://github.com/remvee/emacs-rails
;; Currently this interfers with auto complete, using rinari instead
;; automatically adds end to blocks.
(require 'rails)
;; Rinari - Rails plugin
(add-to-list 'load-path "~/.emacs.d/rinari/")
(require 'rinari)
(add-hook 'ruby-mode-hook
(lambda ()
(defadvice ruby-mode-set-encoding
(around ruby-mode-set-encoding-disable activate) nil)))
; -------------------- Rails Views --------------------
; haml-sass
(require 'haml-mode nil 't)
(add-hook 'haml-mode-hook
'(lambda () (setq tab-width 2)))
(setq scss-compile-at-save nil)
; stylesheets
(autoload 'css-mode "css-mode")
(setq auto-mode-alist (cons '("\\.css\\'" . css-mode) auto-mode-alist))
; html2haml function to convert current buffer to haml
(defun haml-ify ()
"run html2haml on current buffer"
(interactive)
(setf filename buffer-file-name)
(setf newfilename (concat filename ".haml"))
(save-buffer)
(shell-command (concat
"html2haml " filename " > " newfilename))
(kill-buffer (current-buffer))
(delete-file filename)
(find-file newfilename))
;; -------------------- Rails Testing --------------------
;; Cucumber
(require 'feature-mode)
;; -------------------- Rails Tools --------------------
;; Check out abbrev-mode instead as it seems lighter.
(require 'snippet)
;; -------------------- Ruby plugins --------------------
(add-to-list 'auto-mode-alist '("Capfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile" . ruby-mode))
(add-to-list 'auto-mode-alist '("god" . ruby-mode))
(add-to-list 'auto-mode-alist '("Guardfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.html.erb\\'" . html-mode))
(add-to-list 'auto-mode-alist '("\\.ejs\\'" . html-mode))
(add-to-list 'auto-mode-alist '("\\.eco\\'" . html-mode))
(add-to-list 'auto-mode-alist '("\\.hamlc\\'" . haml-mode))
;; Ruby-electric
(require 'ruby-electric)
(add-hook 'ruby-mode-hook 'ruby-electric-mode)
;; Issues under some compiles of emacs
;; (require 'ruby-electric)
;; (add-hook 'ruby-mode-hook
;; (lambda()
;; (add-hook 'local-write-file-hooks
;; '(lambda()
;; (save-excursion
;; (untabify (point-min) (point-max))
;; ;(delete-trailing-whitespace)
;; )))
;; (set (make-local-variable 'indent-tabs-mode) 'nil)
;; (set (make-local-variable 'tab-width) 2)
;; (imenu-add-to-menubar "IMENU")
;; (require 'ruby-electric)
;; (ruby-electric-mode t)))
;; Inferior Ruby Mode
(autoload 'inf-ruby "inf-ruby" "Run an inferior Ruby process" t)
(autoload 'inf-ruby-keys "inf-ruby" "" t)
(eval-after-load 'ruby-mode '(add-hook 'ruby-mode-hook 'inf-ruby-keys))
;; -------------------- SQL --------------------
(defun my-sql-interactive-mode-hook ()
(setq tab-width 8))
(add-hook 'sql-interactive-mode-hook 'my-sql-interactive-mode-hook)
(require 'sql)
(put 'upcase-region 'disabled nil)
;; -------------------- Autocomplete --------------------
;; Use with Rsense for Ruby autocomplete:
;; http://cx4a.org/software/rsense/
;; Follow instructions on: http://itstickers.blogspot.com/2010/11/all-about-emacs.html
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)
;; Rsense
(setq rsense-home "/opt/rsense-0.3")
(add-to-list 'load-path (concat rsense-home "/etc"))
(require 'rsense)
;; Rsense + Autocomplete
(add-hook 'ruby-mode-hook
(lambda ()
(add-to-list 'ac-sources 'ac-source-rsense-method)
(add-to-list 'ac-sources 'ac-source-rsense-constant)))
;; Complete by C-c .
(add-hook 'ruby-mode-hook
(lambda ()
(local-set-key (kbd "C-c .") 'rsense-complete)))
;; RVM in emacs
;; (require 'rvm)
;; (rvm-use-default) ;; use rvm’s default ruby for the current Emacs session
;; Switch windows easier when you have 3 or more.
(require 'switch-window)
;; gist
(require 'gist)
(setq gist-authentication-function 'gist-basic-authentication)
(setq the-secrets-file
(expand-file-name "secrets.el" user-emacs-directory))
(when (file-exists-p the-secrets-file)
(load the-secrets-file))
;; highline-mode
(require 'highline)
(defun highline-mode-on ()
(highline-mode 1))
;; Turn on local highlighting for Dired (C-x d)
(add-hook 'dired-after-readin-hook #'highline-mode-on)
;; Turn on local highlighting for list-buffers (C-x C-b)
(defadvice list-buffers (after highlight-line activate) (save-excursion (set-buffer "*Buffer List*") (highline-mode-on)))
;; mic-paren - advanced highlighting of matching parentheses
(paren-activate)
;; flyspell
(add-hook 'org-mode-hook
(lambda ()
(flyspell-mode)
(setq flyspell-issue-message-flag 'nil)))
(add-hook 'ruby-mode-hook
(lambda ()
(flyspell-prog-mode)
(setq flyspell-issue-message-flag 'nil)))
;; flymake haml
(add-hook 'haml-mode-hook 'flymake-haml-load)
;; undo
(add-hook 'ruby-mode-hook 'undo-tree-mode)
;; multi-term
;; (setq term-default-fg-color "#aaa")
;; Upgrade all packages
(defun package-update-all ()
"Update all packages"
(interactive)
(dolist (elt package-alist)
(let* ((name (car elt))
(file-name (symbol-name name))
(available-pkg (assq name package-archive-contents))
(available-version (and available-pkg
(package-desc-vers (cdr available-pkg))))
(current-version (package-desc-vers (cdr elt)))
)
(when (and available-version
(version-list-< current-version available-version))
(message "Updating to: %s - %s" file-name
(package-version-join available-version))
(package-install name)
(package-delete file-name (package-version-join current-version))))))
;; Music player
(add-to-list 'load-path "~/.emacs.d/elisp/external/bongo")
(setq bongo-global-lastfm-mode t)
(autoload 'bongo "bongo"
"Start Bongo by switching to a Bongo buffer." t)
;; Volume manager (Use 'v' in bongo music player)
(add-to-list 'load-path "~/.emacs.d/elisp/external/volume-el")
(autoload 'volume "volume"
"Tweak your sound card volume." t)
;; Twitter mode
(add-to-list 'load-path "~/.emacs.d/elisp/external/twitter-mode")
(require 'twittering-mode)
(setq twittering-icon-mode t)
(setq twittering-timer-interval 40)
(setq twittering-url-show-status nil)
(add-hook 'twittering-edit-mode-hook (lambda () (ispell-minor-mode) (flyspell-mode)))
(setq twittering-use-master-password t) ;; Don't prompt for authorisation.
;; drag-stuff
(require 'drag-stuff)
;; coffee-mode
(defun coffee-custom ()
"coffee-mode-hook"
(set (make-local-variable 'tab-width) 2))
;; (define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)
;; (define-key coffee-mode-map [(meta R)] 'coffee-compile-region)
(add-hook 'coffee-mode-hook
'(lambda() (coffee-custom)))
;; Don't ask to save abbrevs
(setq save-abbrevs 'silently)
;; log commands.
;; M-x mwe:open-command-log-buffer
(add-hook 'LaTeX-mode-hook (function mwe:log-keyboard-commands))
;; screensaver
(setq zone-when-idle t)
;; IRC reconnect
(eval-after-load 'rcirc
'(defun-rcirc-command reconnect (arg)
"Reconnect the server process."
(interactive "i")
(unless process
(error "There's no process for this target"))
(let* ((server (car (process-contact process)))
(port (process-contact process :service))
(nick (rcirc-nick process))
channels query-buffers)
(dolist (buf (buffer-list))
(with-current-buffer buf
(when (eq process (rcirc-buffer-process))
(remove-hook 'change-major-mode-hook
'rcirc-change-major-mode-hook)
(if (rcirc-channel-p rcirc-target)
(setq channels (cons rcirc-target channels))
(setq query-buffers (cons buf query-buffers))))))
(delete-process process)
(rcirc-connect server port nick
rcirc-default-user-name
rcirc-default-full-name
channels))))
;; Video editor
;; (load "~/.emacs.d/elisp/external/gneve.el")
最佳答案
问题是我只需要安装'magit 而不是'magit-simple-keys。
关于emacs 24.x 递归 'require' 用于功能 'magit-simple-keys',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10480800/
我在为 MacOSX 构建的独立包中添加 DMG 背景的自定义图标时遇到问题。我在项目的根目录中添加了一个包。正在从中加载自定义图标,但没有加载 DMG 背景图标。我正在使用 Java fx 2.2.
Qt for Symbian 和 Qt for MeeGo 有什么区别?我知道 Qt 是一个交叉编译平台。这是否意味着如果我使用来自 Qt 的库,完全相同的库可以在所有支持 Qt 的设备(例如 Sym
我正在尝试使用 C# .NET 3.5/4.0 务实地运行 SQL Server 数据库的备份。我已经找到了如何完成此操作,但是我似乎找不到用于备份的命名空间库。 我正在寻找 Microsoft.Sq
我最近在疯狂学习 Java,但我通常是一名 .NET 开发人员。 (所以请原谅我的新手问题。) 在 .Net 中,我可以在不使用 IIS 的情况下开发 ASP.Net 页面,因为它有一个简化的 Web
这post仅当打印命令中有字符串时才有用。现在我有大量的源代码,其中包含一条声明,例如 print milk,butter 应该格式化为 print(milk,butter) 用\n 捕获行尾并不成功
所以我的问题是: https://gist.github.com/panSarin/4a221a0923927115584a 当我保存这个表格时,我收到了标题中的错误 NoMethodError (u
如何让 Html5 音频在点击时播放声音? (ogg 用于 Firefox 等浏览器,mp3 用于 chrome 等浏览器) 到目前为止,我可以通过 onclick 更改为单个文件类型,但我无法像在普
如果it1和it2有什么区别? std::set s; auto it1 = std::inserter(s, s.begin()); auto it2 = std::inserter(s, s.en
4.0.0 com.amkit myapp SpringMVCFirst
我目前使用 Eclipse 作为其他语言的 IDE,而且我习惯于不必离开 IDE 做任何事情 - 但是我真的很难为纯 ECMAScript-262 找到相同或类似的设置。 澄清一下,我不是在寻找 DO
我想将带有字符串数组的C# 结构发送到C++ 函数,该函数接受void * 作为c# 结构和char** 作为c# 结构字符串数组成员。 我能够将结构发送到 c++ 函数,但问题是,无法从 c++ 函
我正在使用动态创建的链接: 我想为f:param附加自定义转换器,以从#{name}等中删除空格。 但是f:param中没有转换器
是否可以利用Redis为.NET创建后写或直写式缓存?理想情况下,透明的高速缓存是由单个进程写入的,并且支持从数据库加载丢失的数据,并每隔一段时间持久保存脏块? 我已经搜查了好几个小时,也许是goog
我正在通过bash执行命令的ssh脚本。 FILENAMES=( "export_production_20200604.tgz" "export_production_log_2020060
我需要一个正则表达式来出现 0 到 7 个字母或 0 到 7 个数字。 例如:匹配:1234、asdbs 不匹配:123456789、absbsafsfsf、asf12 我尝试了([a-zA-Z]{0
我有一个用于会计期间的表格,该表格具有期间结束和开始的开始日期和结束日期。我使用此表来确定何时发生服务交易以及何时在查询中收集收入,例如... SELECT p.PeriodID, p.FiscalY
我很难为只接受字符或数字的 Laravel 构建正则表达式验证。它是这样的: 你好<-好的 123 <- 好的 你好123 <-不行 我现在的正则表达式是这样的:[A-Za-z]|[0-9]。 reg
您实际上会在 Repeater 上使用 OnItemDataBound 做什么? 最佳答案 “此事件为您提供在客户端显示数据项之前访问数据项的最后机会。引发此事件后,数据项将被清空,不再可用。” ~
我有一个 fragment 工作正常的项目,我正在使用 jeremyfeinstein 的 actionbarsherlock 和滑动菜单, 一切正常,但是当我想自定义左侧抽屉列表单元格时,出现异常
最近几天,我似乎平均分配时间在构建我的第一个应用程序和在这里发布问题!! 这是我的第一个应用程序,也是我们的设计师完成的第一个应用程序。我试图满足他所做的事情的外观和感觉,但我认为他没有做适当的事情。
我是一名优秀的程序员,十分优秀!