1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 00:40:05 +08:00

Remove func

This commit is contained in:
wsdjeg 2018-02-25 22:14:26 +08:00
parent 3ea4db4768
commit 651aeb6dd5
4 changed files with 241 additions and 233 deletions

View File

@ -7,6 +7,8 @@
"============================================================================= "=============================================================================
scriptencoding utf-8 scriptencoding utf-8
let s:SYSTEM = SpaceVim#api#import('system')
" Default options {{{ " Default options {{{
function! SpaceVim#default#options() abort function! SpaceVim#default#options() abort
" basic vim settiing " basic vim settiing
@ -18,10 +20,10 @@ function! SpaceVim#default#options() abort
set guioptions-=b " Hide bottom scrollbar set guioptions-=b " Hide bottom scrollbar
set showtabline=0 " Hide tabline set showtabline=0 " Hide tabline
set guioptions-=e " Hide tab set guioptions-=e " Hide tab
if WINDOWS() if s:SYSTEM.isWindows
" please install the font in 'Dotfiles\font' " please install the font in 'Dotfiles\font'
set guifont=DejaVu_Sans_Mono_for_Powerline:h11:cANSI:qDRAFT set guifont=DejaVu_Sans_Mono_for_Powerline:h11:cANSI:qDRAFT
elseif OSX() elseif s:SYSTEM.isOSX
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11 set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11
else else
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 11 set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 11

View File

@ -5,6 +5,9 @@
" URL: https://spacevim.org " URL: https://spacevim.org
" License: GPLv3 " License: GPLv3
"============================================================================= "=============================================================================
let s:SYSTEM = SpaceVim#api#import('system')
function! SpaceVim#health#python#check() abort function! SpaceVim#health#python#check() abort
let result = ['SpaceVim python support check report:'] let result = ['SpaceVim python support check report:']
if has('nvim') if has('nvim')
@ -25,7 +28,7 @@ function! SpaceVim#health#python#check() abort
if has('python3') if has('python3')
call add(result, ' SUCCEED!') call add(result, ' SUCCEED!')
else else
if !WINDOWS() if !s:SYSTEM.isWindows
call add(result, ' Failed : to support +python3, Please install vim-gik, or build from sources.') call add(result, ' Failed : to support +python3, Please install vim-gik, or build from sources.')
else else
call add(result, ' Failed : to support +python3, install vim from https://github.com/vim/vim-win32-installer/releases') call add(result, ' Failed : to support +python3, install vim from https://github.com/vim/vim-win32-installer/releases')
@ -36,7 +39,7 @@ function! SpaceVim#health#python#check() abort
if has('python') if has('python')
call add(result, ' SUCCEED!') call add(result, ' SUCCEED!')
else else
if !WINDOWS() if !s:SYSTEM.isWindows
call add(result, ' Failed : to support +python, Please install vim-gik, or build from sources.') call add(result, ' Failed : to support +python, Please install vim-gik, or build from sources.')
else else
call add(result, ' Failed : to support +python3, install vim from https://github.com/vim/vim-win32-installer/releases') call add(result, ' Failed : to support +python3, install vim from https://github.com/vim/vim-win32-installer/releases')

View File

@ -1,4 +1,5 @@
scriptencoding utf-8 scriptencoding utf-8
let s:SYSTEM = SpaceVim#api#import('system')
let s:save_cpo = &cpo let s:save_cpo = &cpo
set cpo&vim set cpo&vim
let g:unite_source_menu_menus = let g:unite_source_menu_menus =
@ -81,7 +82,7 @@ fu! zvim#util#CopyToClipboard(...) abort
let repo_url = strpart(repo_url, stridx(repo_url, 'http'),len(repo_url) - 4 - stridx(repo_url, 'http')) let repo_url = strpart(repo_url, stridx(repo_url, 'http'),len(repo_url) - 4 - stridx(repo_url, 'http'))
endif endif
let f_url =repo_url. '/blob/'. branch. '/'. strpart(expand('%:p'), len(repo_home) + 1, len(expand('%:p'))) let f_url =repo_url. '/blob/'. branch. '/'. strpart(expand('%:p'), len(repo_home) + 1, len(expand('%:p')))
if WINDOWS() if s:SYSTEM.isWindows
let f_url = substitute(f_url, '\', '/', 'g') let f_url = substitute(f_url, '\', '/', 'g')
endif endif
if a:1 == 2 if a:1 == 2
@ -261,7 +262,7 @@ function! zvim#util#UpdateHosts(...) abort
let url = a:1 let url = a:1
endif endif
let hosts = systemlist('curl -s ' . url) let hosts = systemlist('curl -s ' . url)
if WINDOWS() if s:SYSTEM.isWindows
let local_hosts = $SystemRoot . expand('\System32\drivers\etc\hosts') let local_hosts = $SystemRoot . expand('\System32\drivers\etc\hosts')
else else
let local_hosts = '/etc/hosts' let local_hosts = '/etc/hosts'

View File

@ -14,6 +14,8 @@ if has('vim_starting')
endif endif
endif endif
let s:SYSTEM = SpaceVim#api#import('system')
" Fsep && Psep " Fsep && Psep
if has('win16') || has('win32') || has('win64') if has('win16') || has('win32') || has('win64')
let s:Psep = ';' let s:Psep = ';'
@ -24,9 +26,9 @@ else
endif endif
"Use English for anything in vim "Use English for anything in vim
try try
if WINDOWS() if s:SYSTEM.isWindows
silent exec 'lan mes en_US.UTF-8' silent exec 'lan mes en_US.UTF-8'
elseif OSX() elseif s:SYSTEM.isOSX
silent exec 'language en_US' silent exec 'language en_US'
else else
let s:uname = system('uname -s') let s:uname = system('uname -s')
@ -46,7 +48,7 @@ catch /^Vim\%((\a\+)\)\=:E197/
endtry endtry
" try to set encoding to utf-8 " try to set encoding to utf-8
if WINDOWS() if s:SYSTEM.isWindows
" Be nice and check for multi_byte even if the config requires " Be nice and check for multi_byte even if the config requires
" multi_byte support most of the time " multi_byte support most of the time
if has('multi_byte') if has('multi_byte')