我的vim和emacs配置文件

本文详细介绍了如何个性化设置 Vim 和 Emacs 编程环境,包括配置文件 vimrc 和 .emacs 的核心内容,以及引入多种插件来提高开发效率。通过调整字体、颜色方案、语法高亮等功能,实现高效代码编辑体验。同时,阐述了如何通过插件如 ECB、auto-complete、Vundle 等来优化项目管理、代码完成、版本控制等流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

vimrc:

"cnsworder set

colorscheme ron
set guifont=文泉驿等宽正黑\ Bold\ 12
syntax on
set nobackup
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set number
set laststatus=2
source $VIMRUNTIME/ftplugin/man.vim
command! -nargs=1 Gdb :!gdb "/home/cnsworder/work/test<args>"
nmap <F8> :WMToggle<cr>
nmap <F5> :make<cr>nmap <F6> :make clean<cr>
nmap <F9> :Gdb test<cr>
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'The-NERD-tree'
Bundle 'Tagbar'
Bundle 'vim-powerline'
Bundle 'OmniCppComplete'
Bundle 'nathanaelkane/vim-indent-guides'
使用的插件:vundle,L9,FuzzyFinder,vim-powerline,Tagbar,The-NERD-Tree,minibuff,AA,c,omnicomplete,doxygenToolkit,snipMate, vim-indent-guides

emacs:

(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)
 '(ecb-layout-window-sizes nil)
 '(ecb-options-version "2.40")
 '(ecb-source-path (quote ("/home/cnsworder"))))
(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.
 )
(require 'package)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-rpo.org/packages/"))
(package-initialize)
(defun make-IDE()
   (interactive)
   (require 'cedet)
   (require 'semantic-ia)
;; Enable EDE (Project Management) features
;;(global-ede-mode 0)

;; Enable SRecode (Template management) minor-mode.
   (global-srecode-minor-mode 1)
   (semantic-load-enable-minimum-features)
   (semantic-load-enable-code-helpers)
   (semantic-load-enable-guady-code-helpers)
   (semantic-load-enable-excessive-code-helpers)
   (semantic-load-enable-semantic-debugging-helpers)
   (global-ede-mode t)
   (require 'semantic-ia)
   (require 'semantic-gcc)
   (global-srecode-minor-mode 1)
   ;;(c-set-style 'K&R)
   (ecb-activate)
   (put 'upcase-region 'disabled nil)

   (require 'auto-complete-config)
   (add-to-list 'ac-dictionary-directories "/usr/share/emacs/site-lisp/ac-dict")
   (ac-config-default)
   (require 'eassist nil 'noerror)
   (global-set-key [f5] 'compile)
   (global-set-key [f9] 'gdb)
)
(setq default-tab-width 4)
(add-hook c++-mode-hook (lambda ()
(setq indent-tabs-mode nil))
(global-linum-mode t)
(defun load-source () (interactive)
   (load-file "~/.emacs"))
(global-set-key [f11] 'load-source)
(global-set-key [f12] 'make-IDE)
(set-default-font ”文泉驿等宽正黑 Bold 12“)

使用的插件:ecb(cedet,semantic),auto-complete,ac-dict


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值