博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MAC OS X下的Linux环境
阅读量:5049 次
发布时间:2019-06-12

本文共 3348 字,大约阅读时间需要 11 分钟。

关键字: HomeBrew,好比Windows下的Cygwin

安装Homebrew

该si胜过macport

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

说明:程序在/usr/local/Library/下。以后软件包下载到/Library/Caches/Homebrew下,安装在路径/usr/local/Cellar下,并自动链接到/usr/local下各个子目录中

安装macvim

brew install macvim

配置

mac os x本身有一套vim、python、ctags之类,需要屏蔽。设置命令行下brew独立的环境变量

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
说明:该语句填入~/.bashrc文件是沒有用的,必须在命令行终端下输入或 source ~/.bashrc

升级 新版vim用于安装vim 自动补全插件

brew install vim

安装vundle管理vim插件

git clone https://github.com/gmarik/vundle.git  ~/.vim/bundle/

编写.vimrc配置vundle以安装插件

"设置vundleset nocompatible              " be iMprovedfiletype off                  " required!" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" alternatively, pass a path where Vundle should install plugins"call vundle#begin('~/some/path/here')" let Vundle manage Vundle, requiredPlugin 'gmarik/Vundle.vim'" The following are examples of different formats supported." Keep Plugin commands between vundle#begin/end." plugin on GitHub repoPlugin 'tpope/vim-fugitive'" plugin from http://vim-scripts.org/vim/scripts.htmlPlugin 'L9'" Git plugin not hosted on GitHub"Plugin 'git://git.wincent.com/command-t.git'Plugin 'scrooloose/nerdtree'    "文件浏览Plugin 'majutsushi/tagbar'      "代码符号Plugin 'wesleyche/SrcExpl'      "类似sourceInsight的代码预览窗口Plugin 'Valloric/YouCompleteMe' "自动补全Plugin 'vim-scripts/a.vim'      "在头文件、源文件之间切换Plugin 'flazz/vim-colorschemes' "色彩方案" All of your Plugins must be added before the following linecall vundle#end()            " requiredfiletype plugin indent on    " required" To ignore plugin indent changes, instead use:"filetype plugin on"" Brief help" :PluginList       - lists configured plugins" :PluginInstall    - installs plugins; append `!` to update or just  :PluginUpdate" :PluginSearch foo - searches for foo; append `!` to refresh local cache" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal"" see :h vundle for more details or wiki for FAQ" Put your non-Plugin stuff after this line"vundle设置完毕syntax onlet g:tagbar_ctags_bin='/usr/local/bin/ctags'let g:tagbar_left = 1nnoremap 
:TagbarToggle
let NERDTreeWinPos='right'nnoremap
:NERDTreeToggle
nmap
:SrcExplToggle
let g:Srcexpl_winHeight = 8" // Set 100 ms for refreshing the Source Explorerlet g:SrcExpl_refreshTime = 100" // Set "Enter" key to jump into the exact definition contextlet g:SrcExpl_jumpKey = "
"" // Set "Space" key for back from the definition contextlet g:SrcExpl_gobackKey = "
"let g:SrcExpl_pluginList = [ \ "__Tag_List__", \ "_NERD_tree_" \ ]set tags=tags;/ "搜索上一级建立的tagnmap
h "control+h进入左边的窗口nmap
j "control+j进入下边的窗口nmap
k "control+k进入上边的窗口nmap
l "control+l进入右边的窗口" already done in .vim/bundle/SrcExpl/plugin/srcexpl.vim"map
:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .
set foldenable " 开始折叠set foldmethod=syntax " 设置语法折叠set foldcolumn=0 " 设置折叠区域的宽度setlocal foldlevel=1 " 设置折叠层数为" set foldclose=all " 设置为自动关闭折叠 " " nnoremap
@=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')
" " 用空格键来开关折叠"set guifont=monaco\ Regular:h13
安装cmake

说明:brew install cmake 3。0。2失败的话,是由于之前没有屏蔽mac os x本身的路径。

转载于:https://www.cnblogs.com/wangfengju/p/6172298.html

你可能感兴趣的文章
Django 内建 中间件组件
查看>>
bootstrap-Table服务端分页,获取到的数据怎么再页面的表格里显示
查看>>
进程间通信系列 之 socket套接字及其实例
查看>>
天气预报插件
查看>>
Unity 游戏框架搭建 (十三) 无需继承的单例的模板
查看>>
模块与包
查看>>
mysql忘记root密码
查看>>
apache服务器中设置目录不可访问
查看>>
嵌入式Linux驱动学习之路(十)字符设备驱动-my_led
查看>>
【NOIP模拟】密码
查看>>
java容器---------手工实现Linkedlist 链表
查看>>
three.js 性能优化的几种方法
查看>>
《梦断代码》读书笔记(三)
查看>>
FreeMarker解析json数据
查看>>
Java8 Lambda表达应用 -- 单线程游戏server+异步数据库操作
查看>>
次序+“选择不重复的记录”(3)——最大记录
查看>>
Codeforces 450 C. Jzzhu and Chocolate
查看>>
[Unity3D]Unity3D游戏开发MatchTarget的作用攀登效果实现
查看>>
ACdream 1115 Salmon And Cat (找规律&amp;&amp;打表)
查看>>
JSON、JSONP、Ajax的区别
查看>>