-
-
Notifications
You must be signed in to change notification settings - Fork 683
/
vimrc
53 lines (44 loc) · 2.38 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
" System vimrc file for MacVim
"
" Author: Bjorn Winckler <[email protected]>
" Maintainer: macvim-dev (https://github.com/macvim-dev)
set nocompatible
" The default for 'backspace' is very confusing to new users, so change it to a
" more sensible value. Add "set backspace&" to your ~/.vimrc to reset it.
set backspace+=indent,eol,start
" Python2
" MacVim is configured by default in the binary release to use the
" pre-installed System python2 version. However, following code tries to
" find a Homebrew, MacPorts or an installation from python.org:
if exists("&pythondll") && exists("&pythonhome")
" Homebrew python 2.7
if filereadable("/usr/local/Frameworks/Python.framework/Versions/2.7/Python")
set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
" MacPorts python 2.7
elseif filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python")
set pythondll=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
" https://www.python.org/downloads/mac-osx/
elseif filereadable("/Library/Frameworks/Python.framework/Versions/2.7/Python")
set pythondll=/Library/Frameworks/Python.framework/Versions/2.7/Python
endif
endif
" Python3
" MacVim is configured by default in the binary release to set
" pythonthreedll to Homebrew python3. If it cannot be found, the following
" code tries to find Python3 from other popular locations. Note that we are
" using "Current" for the version, because Vim supports the stable ABI and
" therefore any new version of Python3 will work.
if exists("&pythonthreedll") && exists("&pythonthreehome") &&
\ !filereadable(&pythonthreedll)
" MacPorts python
if filereadable("/opt/local/Library/Frameworks/Python.framework/Versions/Current/Python")
set pythonthreedll=/opt/local/Library/Frameworks/Python.framework/Versions/Current/Python
" macOS default Python, installed by 'xcode-select --install'
elseif filereadable("/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/Current/Python3")
set pythonthreedll=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/Current/Python3
" https://www.python.org/downloads/mac-osx/
elseif filereadable("/Library/Frameworks/Python.framework/Versions/Current/Python")
set pythonthreedll=/Library/Frameworks/Python.framework/Versions/Current/Python
endif
endif
" vim: sw=2 ts=2 et