Skip to content

Commit c3b595d

Browse files
authored
Merge pull request #84 from TTWShell/feature/airline
use airline instead of powerline
2 parents 8f80149 + 8ee609e commit c3b595d

File tree

6 files changed

+34
-24
lines changed

6 files changed

+34
-24
lines changed

.travis.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ os:
66
- linux
77
- osx
88

9-
before_install:
10-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository --yes ppa:kalakris/cmake && sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; fi
11-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository --yes ppa:bcandrea/backports; fi
12-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
13-
149
install:
1510
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y clang golang; fi
1611
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX="g++-4.9" CC="gcc-4.9" GOROOT="/usr/lib/go" GOPATH=$HOME/gocode PATH=$PATH:$GOPATH/bin; fi
@@ -20,7 +15,8 @@ addons:
2015
sources:
2116
# The Travis apt source whitelist can be found here:
2217
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
23-
- ubuntu-toolchain-r-test # for new libstdc++
18+
- george-edison55-precise-backports
19+
- ubuntu-toolchain-r-test
2420
- george-edison55-precise-backports # for a more recent version of cmake (3.2.3)
2521
packages:
2622
- cmake-data
@@ -43,6 +39,7 @@ addons:
4339
- libncursesw5-dev
4440

4541
compiler:
42+
- clang
4643
- gcc
4744

4845
script:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
个人vim配置。**支持python、go等自动提示,支持python、go的函数跳转(python支持虚拟环境)。** 最终效果图(函数列表的feature已移除,因为大项目会导致性能问题):
1212

13-
![qq20161017-0](https://cloud.githubusercontent.com/assets/8017604/19426340/4def15cc-946e-11e6-891b-924f52486144.png)
13+
![wx20170920-101535](https://user-images.githubusercontent.com/8017604/30623828-ab21327e-9dec-11e7-89e7-09b2645a987c.png)
1414

1515
支持Python自动补全的最好插件是YouCompleteMe。而YouCompleteMe需要比较高版本的vim(>=7.4.143),所以,需要编译安装vim,参见相关文档[1]。另外还需要一些C库,参见相关文档[2]
1616

fonts/install-fonts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ if command -v fc-cache @>/dev/null ; then
2424
fc-cache -f $font_dir
2525
fi
2626

27-
echo "All Powerline fonts installed to $font_dir"
27+
echo "All Powerline fonts installed to $font_dir"

scripts/init-vim-centos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cd ~ && rm -rf vim && git clone git@github.com:vim/vim.git && cd vim
99
./configure --with-features=huge \
1010
--enable-multibyte \
1111
--enable-pythoninterp \
12-
#--with-python-config-dir=/usr/lib/python2.7/config \
12+
#--with-python-config-dir=/usr/lib/python2.7/config \
1313
--enable-python3interp \
1414
#--with-python3-config-dir=/usr/lib/python3.4/config \
1515
--with-mac-arch=x86_64 \

scripts/init-vim-ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cd ~ && rm -rf vim && git clone https://github.com/vim/vim.git && cd vim
2424
./configure --with-features=huge \
2525
--enable-multibyte \
2626
--enable-pythoninterp \
27-
#--with-python-config-dir=/usr/lib/python2.7/config \
27+
#--with-python-config-dir=/usr/lib/python2.7/config \
2828
--enable-python3interp \
2929
#--with-python3-config-dir=/usr/lib/python3.4/config \
3030
--with-mac-arch=x86_64 \

vimrc

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ Plugin 'scrooloose/nerdtree'
3737
Plugin 'Xuyuanp/nerdtree-git-plugin'
3838

3939
" show venv、git branch、file
40-
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
40+
" Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
41+
Plugin 'vim-airline/vim-airline'
42+
Plugin 'vim-airline/vim-airline-themes'
4143

4244
" enhance za
4345
Plugin 'tmhedberg/SimpylFold'
@@ -55,7 +57,6 @@ Plugin 'vim-scripts/nginx.vim'
5557
Plugin 'fatih/vim-go'
5658
Plugin 'othree/javascript-libraries-syntax.vim'
5759
Plugin 'hynek/vim-python-pep8-indent'
58-
Plugin 'unblevable/quick-scope'
5960
Plugin 'elzr/vim-json'
6061
Plugin 'dyng/ctrlsf.vim'
6162
Plugin 'kylef/apiblueprint.vim'
@@ -150,14 +151,10 @@ let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/
150151
" http://stackoverflow.com/questions/2169645/vims-autocomplete-is-excruciatingly-slow
151152
set complete-=i
152153

153-
" auto update tagfile when save
154-
" au BufWritePost *.py silent! :UpdateTags
155-
156154
"""""""""""""""""""""""""""""""""""""""""""""
157155
" Vim UI "
158156
"""""""""""""""""""""""""""""""""""""""""""""
159157
syntax on
160-
161158
au BufNewFile,BufRead *
162159
\ set tabstop=4 |
163160
\ set softtabstop=4 |
@@ -166,10 +163,8 @@ au BufNewFile,BufRead *
166163
\ set autoindent |
167164
\ set fileformat=unix |
168165
\ set list listchars=tab:>-
169-
170166
au BufNewFile,BufRead *.c,*.py
171167
\ set colorcolumn=80
172-
173168
au BufNewFile,BufRead *.go
174169
\ set nolist
175170

@@ -221,13 +216,31 @@ let g:NERDTreeIndicatorMapCustom = {
221216
\ "Unknown" : "?"
222217
\ }
223218

224-
" for powerline
225-
set laststatus=2
226-
set term=xterm-256color
227-
set termencoding=utf-8
228-
set guifont=Ubuntu\ Mono\ derivative\ Powerline:10
219+
" for powerline 已弃用
220+
" set laststatus=2
221+
" set term=xterm-256color
222+
" set termencoding=utf-8
223+
" set guifont=Ubuntu\ Mono\ derivative\ Powerline:10
229224
" set guifont=Ubuntu\ Mono
230-
let g:Powerline_symbols = 'fancy'
225+
" let g:Powerline_symbols = 'fancy'
226+
227+
" for airline
228+
" 使用powerline打过补丁的字体
229+
let g:airline_powerline_fonts = 1
230+
let g:airline_theme='dark_minimal'
231+
" 开启tabline
232+
let g:airline#extensions#tabline#enabled = 1
233+
" 显示buffer编号
234+
let g:airline#extensions#tabline#buffer_nr_show = 1
235+
" tabline中当前buffer两端的分隔字符
236+
let g:airline#extensions#tabline#left_sep = '🔥'
237+
" tabline中未激活buffer两端的分隔字符
238+
let g:airline#extensions#tabline#left_alt_sep = '💦'
239+
" 关于buffer使用:
240+
" :ls 查看buffer
241+
" :bn (buffer next)
242+
" :bp (buffer previous)
243+
" :b <num> 打开编号为num的buffer
231244

232245
" color scheme
233246
set background=dark " Assume a dark background

0 commit comments

Comments
 (0)