码迷,mamicode.com
首页 > 其他好文 > 详细

让OSX terminal更出彩

时间:2016-04-13 21:10:09      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:osx   颜色   terminal   

一、设置bash:


vim ~/.bash_profile

  # OSX terminal彩色设置

  export CLICOLOR=1

  export LSCOLORS=GxFxCxDxBxegedabagaced

  export PS1=\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$

  # ll

  alias ll=‘ls -l



二、设置vim:


从下面地址下载vim的配色文件:

https://github.com/tomasr/molokai


vim ~/.vimrc

  1 " Configuration file for vim

  2 set modelines=0   " CVE-2007-2438

  3 

  4 " Normally we use vim-extensions. If you want true vi-compatibility

  5 " remove change the following statements

  6 set nocompatible  " Use Vim defaults instead of 100% vi compatibility

  7 set backspace=2   " more powerful backspacing

  8 

  9 " Don‘t write backup file if vim is being called by "crontab -e"

 10 au BufWrite /private/tmp/crontab.* set nowritebackup nobackup

 11 " Don‘t write backup file if vim is being called by "chpass"

 12 au BufWrite /private/etc/pw.* set nowritebackup nobackup

 13 

 14 colorscheme molokai

 15 syn on "语法支持

 16 set laststatus=2 "始终显示状态栏

 17 set tabstop=2 "一个制表符的长度

 18 set softtabstop=2 "一个制表符的长度(可以大于tabstop)

 19 set shiftwidth=2 "一个缩进的长度

 20 set expandtab "使用空格替代制表符

 21 set smarttab "智能制表符

 22 set autoindent "自动缩进

 23 set smartindent "只能缩进

 24 set number "显示行号

 25 set ruler "显示位置指示器

 26 set backupdir=/tmp "设置备份文件目录

 27 set directory=/tmp "设置临时文件目录

 28 set ignorecase "检索时忽略大小写

 29 set hls "检索时高亮显示匹配项

 30 set helplang=cn "帮助系统设置为中文

 31 set foldmethod=syntax "代码折叠

 32 

 33 

 34 " 开关文件浏览器

 35 map <D-1> :NERDTreeToggle <CR>

 36 " 在文件浏览器中定位当前文件

 37 map <D-!> :NERDTreeFind <CR>

 38 " 关闭文件时同时关闭文件浏览器

 39 let NERDTreeQuitOnOpen = 1

 40 

 41 " 打开文件定位窗口

 42 nnoremap <slient> <D-R> :CommandT<CR>

 43 " 打开最近打开的文件列表

 44 nnoremap <slient> <D-E> :CommandTBuffer<CR>


本文出自 “GONE WITH THE WIND” 博客,请务必保留此出处http://h2appy.blog.51cto.com/609721/1763355

让OSX terminal更出彩

标签:osx   颜色   terminal   

原文地址:http://h2appy.blog.51cto.com/609721/1763355

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!