csdn初学

http://blog.csdn.net/myarrow/article/details/27049673






;; 关闭工具栏,tool-bar-mode 即为一个 Minor Mode


;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;;(package-initialize)
;(add-to-list 'load-path "/Users/tinyult/.emacs.d/elpa")
;(add-to-list 'load-path "/Users/tinyult/Documents/Go/gocodea")




(when (>= emacs-major-version 24)
  (require 'package)
  (package-initialize)
  (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
  )


(require 'cl)


(defvar TinyUlt/packages '(
 company
 monokai-theme
 go
 go-mode
         go-autocomplete
 go-eldoc
 hungry-delete
 smex
 swiper
 counsel
 exec-path-from-shell
 smartparens
 ) "Default packages")
(setq package-selected-packages TinyUlt/packages)
(defun TinyUlt/packages-installed-p ()
  (loop for pkg in TinyUlt/packages
when(not (package-installed-p pkg)) do (return nil)
finally (return t)))
(unless (TinyUlt/packages-installed-p)
  (message "%s" "Refreshing package database...")
  (package-refresh-contents)
  (dolist (pkg TinyUlt/packages)
    (when (not (package-installed-p pkg))
      (package-install pkg))))








(tool-bar-mode -1)


;; 关闭文件滑动控件
(scroll-bar-mode -1)


;; 显示行号
(global-linum-mode 1)


;; 更改光标的样式(不能生效,解决方案见第二集)
(setq cursor-type 'bar)


;; 关闭启动帮助画面
(setq inhibit-splash-screen 1)


;; 关闭缩进 (第二天中被去除)
;; (electric-indent-mode -1)


;; 更改显示字体大小 16pt
;; http://stackoverflow.com/questions/294664/how-to-set-the-font-size-in-emacs
(set-face-attribute 'default nil :height 160)


;; 快速打开配置文件
(defun open-init-file()
  (interactive)
  (find-file "~/.emacs.d/init.el"))


(defun open-go-file()
     (interactive)
     (find-file "/Users/tinyult/Documents/Go/hello.go")
     )


;; 这一行代码,将函数 open-init-file 绑定到 <f1> 键上
     (global-set-key (kbd "<f2>") 'open-init-file)
     (global-set-key (kbd "<f3>") 'open-go-file)


(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.
 '(ansi-color-faces-vector
   [default default default italic underline success warning error])
 '(ansi-color-names-vector
   ["black" "#d55e00" "#009e73" "#f8ec59" "#0072b2" "#cc79a7" "#56b4e9" "white"])
 '(company-idle-delay 0.08)
 '(company-minimum-prefix-length 1)
 '(custom-enabled-themes (quote (deeper-blue)))
 '(package-selected-packages (quote (monokai-theme company)))
 '(show-paren-mode t)
 '(tool-bar-mode nil))
(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.
 )
; 开启全局 Company 补全
(global-company-mode 1)






(setq make-backup-files nil)


(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-item 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)


(delete-selection-mode t)
(setq initial-frame-alist (quote ((fullscreen . maximized))))


(add-hook 'emacs-lisp-mode-hook 'show-paren-mode)


(global-hl-line-mode t)


(setq-default cursor-type 'bar)




(load-theme 'monokai t)


(require 'hungry-delete)
(global-hungry-delete-mode)








(require 'smex) ; Not needed if you use package.el
(smex-initialize) ; Can be omitted. This might cause a (minimal) delay
                  ; when Smex is auto-initialized on its first run.
(global-set-key (kbd "M-x") 'smex)


(ivy-mode 1)
(setq ivy-use-virtual-buffers t)
(global-set-key "\C-s" 'swiper)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "<f6>") 'ivy-resume)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)


(require 'smartparens-config)
(smartparens-global-mode t)






(defun set-exec-path-from-shell-PATH ()
  (let ((path-from-shell (replace-regexp-in-string
                          "[ \t\n]*$"
                          ""
                          (shell-command-to-string "$SHELL --login -i -c 'echo $PATH'"))))
    (setenv "PATH" path-from-shell)
    (setq eshell-path-env path-from-shell) ; for eshell users
    (setq exec-path (split-string path-from-shell path-separator))))


(when window-system (set-exec-path-from-shell-PATH))
(setenv "GOPATH" "/Users/tinyult/Development/gocode")


(setq exec-path (cons "/usr/local/go/bin" exec-path))
(add-to-list 'exec-path "/Users/tinyult/Development/gocode/bin")
(add-hook 'before-save-hook 'gofmt-before-save)










(defun auto-complete-for-go ()
  (auto-complete-mode 1))


 (add-hook 'go-mode-hook 'auto-complete-for-go)
(with-eval-after-load 'go-mode
  (require 'go-autocomplete))










(defun my-go-mode-hook ()
  ; Use goimports instead of go-fmt
  (setq gofmt-command "goimports")
  ; Call Gofmt before saving
  (add-hook 'before-save-hook 'gofmt-before-save)
  ; Customize compile command to run go build
  (if (not (string-match "go" compile-command))
      (set (make-local-variable 'compile-command)
           "go run"))
  ; Go oracle
  (load-file "$GOPATH/src/golang.org/x/tools/cmd/oracle/oracle.el")
  ; Godef jump key binding
  (local-set-key (kbd "M-.") 'godef-jump))
(add-hook 'go-mode-hook 'my-go-mode-hook)




(setq org-agenda-file '("/Users/tinyult/org"))
(global-set-key (kbd "C-c a") 'org-agenda)


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DX Designer是一款非常强大的电子设计自动化软件,用于设计和验证电子电路。对于初学者来说,如果想学习DX Designer,可以在CSDN(中国软件开发者社区)上找到相关的教程和资料。以下是一些教程的主要内容: 1. DX Designer简介:介绍DX Designer的基本概念、功能和应用领域。了解DX Designer的背景和作用,对于初学者来说很有帮助。 2. 安装和配置DX Designer:详细介绍如何下载、安装和配置DX Designer软件。包括系统要求、下载方法、安装步骤等。在正确安装和配置的基础上,才能进行后续的学习和操作。 3. DX Designer界面和工具:介绍DX Designer的主要界面和工具,如项目管理器、原理图编辑器、元件库、绘图工具等。初学者可以通过了解和熟悉这些界面和工具,快速上手操作。 4. 创建电路图:讲解如何创建和编辑电路图。包括添加元件、连线、修改元件属性等。通过实际操作,初学者可以逐步掌握电路图的创建和编辑技巧。 5. 联线和布线:讲解如何进行电路的联线和布线工作。了解如何优化布线,提高电路性能和可靠性。初学者可以通过实例和练习,逐渐掌握联线和布线的技巧。 6. 仿真和验证:介绍如何进行电路的仿真和验证工作。了解仿真的原理和方法,验证电路的性能和正确性。初学者可以通过仿真和验证,加深对电路设计的理解和掌握。 总之,通过CSDN上的DX Designer初学教程,初学者可以系统地学习和掌握这款软件的使用方法和技巧。这些教程提供了从基础入门到高级应用的学习路径,帮助初学者快速上手和实践电路设计。不仅如此,CSDN上还提供了与其他电子设计工程师的交流平台,初学者可以通过互动和讨论,进一步提高自己的技能水平。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值