set guifont=Monaco:h14 " 调整字体和大小 set number " 显示行号 set foldlevelstart=99 " 打开文件默认不折叠 set foldmethod=syntax " 使用语法高亮定义折叠 set linespace=4 " 定义行高 set ignorecase " 设置大小写不敏感查找 set smartcase " 如果有一个大写字母,则切换到大小写敏感查找
配置从terminal打开mac vim
可以直接在macVim中运行::help mvim就可以看到这个帮助信息:
1 2 3 4 5 6 7 8 9 10 11 12 13
MacVim comes bundled with a shell script called "mvim" that can be used to launch MacVim from the terminal. It's located at: > /Applications/MacVim.app/Contents/bin/mvim
To be able to easily use it, put this folder in your path: > /Applications/MacVim.app/Contents/bin For example, if you use zsh, you can put the following in `~/.zprofile`: > export PATH="/Applications/MacVim.app/Contents/bin:$PATH"
After that, type "mvim" to start MacVim from Terminal. > $ mvim You can also specify files to open with. > $ mvim file ...
let g:vim_markdown_fenced_languages = ['js=javascript']
最终配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
syntax enable set guifont=Monaco:h14 " 调整字体和大小 set number " 显示行号 set foldlevelstart=99 " 打开文件默认不折叠 set foldmethod=syntax " 使用语法高亮定义折叠 set linespace=4 " 定义行高 set ignorecase " 设置大小写不敏感查找 set smartcase " 如果有一个大写字母,则切换到大小写敏感查找 colorscheme solarized call plug#begin()