Ubuntu cvs可以用最新版版上下代碼了
在向大家詳細(xì)介紹Ubuntu cvs之前,首先讓大家了解下Ubuntu cvs,然后全面介紹Ubuntu cvs,希望對(duì)大家有用。
1.下載源代碼
可以用***的 Ubuntu cvs版的,這樣需要從 Ubuntu cvs上下代碼了,此時(shí)需要做一些準(zhǔn)備工作代碼:sudo apt-get install ssh Ubuntu cvs texinfo然后到 Ubuntu cvs服務(wù)器上下載***的代碼,先進(jìn)入自己家目錄代碼:export Ubuntu cvs_RSH="ssh"Ubuntu cvs -z3 -d:pserver:anonymous@Ubuntu cvs.sv.gnu.org:/Ubuntu cvsroot/emacs co -r emacs-unicode-2 emacs
2.編譯先配置一些編譯環(huán)境代碼:
- sudo apt-gt install build-essential
- sudo apt-get build-dep emacs21
- sudo apt-get install xserver-xorg-dev
- sudo apt-get install xorg-dev
- sudo apt-get install libncurses5 libncurses5-dev
用下面的方法編譯代碼:
./configure –prefix=/usr –with-x-toolkit=gtk
如果這一步報(bào)錯(cuò),很可能是因?yàn)闆](méi)有安裝 gtk2的開發(fā)包,那就安裝吧。( sudo apt-get install libgtk2.0-dev)
同時(shí)根據(jù)報(bào)錯(cuò)的提示來(lái)安裝其他的dev包。
- make bootstrap
- make info
- sudo make install
3.初步配置
首先是中文字體,ubuntu下默認(rèn)的 emacs 的字體太讓人不爽了,我們可以在 .Xresources中設(shè)定。將下面的代碼放到你的 ~/.Xresources中,沒(méi)有這個(gè)文件的話就新建一個(gè)。
代碼:
- EEmacs.FontBackend: xft
- Xft.dpi: 98
- Xft.hinting: None
寫好后用 xrdb -load ~/.Xresources 然后重啟動(dòng)Emacs。
- 我的.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.
- '(auto-compression-mode nil)
- '(auto-image-file-mode t)
- '(auto-save-default nil)
- '(compile-command "make")
- '(default-major-mode (quote text-mode))
- '(display-time-mode t)
- '(ido-mode (quote buffer) nil (ido))
- '(imenu-sort-function (quote imenu--sort-by-name))
- '(inhibit-startup-screen t)
- '(make-backup-files nil)
- '(scroll-bar-mode nil)
- '(scroll-conservatively 10000)
- '(setq calendar-location-name)
- '(show-paren-mode t)
- '(tab-width 4)
- '(text-mode-hook (quote (text-mode-hook-identify)))
- '(visible-bell t)
- '(x-select-enable-clipboard t))
- (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.
- )
- ;; fonts
- (set-default-font "Courier:pixelsize=14")
- (set-fontset-font "fontset-default" 'unicode '("simsun" . "unicode-bmp"))
- ;; keybind
- (global-set-key (kbd "C-c SPC") 'set-mark-command)
- ;; color-screen (useful for ls)
- (setq ansi-color-for-comint-mode t)
- ;; Theme
- (require 'color-theme)
- (cond ((eq window-system 'x) (color-theme-deep-blue)))
- ;; MATLAB
- (add-to-list 'load-path "/usr/local/matlab/java/extern/EmacsLink/lisp")
- (autoload 'matlab-eei-connect "matlab-eei"
- "Connects Emacs to MATLAB's external editor interface.")
- (autoload 'matlab-mode "matlab" "Enter Matlab mode." t)
- (setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
- (autoload 'matlab-shell "matlab" "Interactive Matlab mode." t)
- (setq matlab-indent-function t) ; if you want function bodies indented
- (setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save
- (defun my-matlab-mode-hook ()
- (setq fill-column 76)
- (imenu-add-to-menubar "Find")) ; where auto-fill should wrap
- (add-hook 'matlab-mode-hook 'my-matlab-mode-hook)
- ;; CC mode
- (defun my-ccmode-common-hook ()
- (define-key c-mode-base-map "\C-m" 'c-context-line-break)
- (c-toggle-auto-state)
- (c-toggle-auto-hungry-state 1)
- (which-function-mode))
- (add-hook 'c-initialization-hook 'my-ccmode-common-hook)
- (setq c-basic-offset 2)
- (setq c-default-style '(
- (c-mode . "k&r")
- (c++-mode . "stroustrup")
- (java-mode . "java")
- (awk-mode . "awk")
- (python-mode . "python")
- (other . "linux")))
- ;; xcscope
- (require 'xcscope)
- ; auctex
- ;(load "auctex.el" nil t t)
- ;(load "preview-latex.el" nil t t)
- ; w3m
- (require 'w3m-load)
- ; sdcv
- (require 'sdcv-mode)
- (global-set-key (kbd "C-c d") 'sdcv-search)
以上介紹Ubuntu cvs系統(tǒng)。
【編輯推薦】