1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:40:06 +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
let s:SYSTEM = SpaceVim#api#import('system')
" Default options {{{
function! SpaceVim#default#options() abort
" basic vim settiing
@ -18,10 +20,10 @@ function! SpaceVim#default#options() abort
set guioptions-=b " Hide bottom scrollbar
set showtabline=0 " Hide tabline
set guioptions-=e " Hide tab
if WINDOWS()
if s:SYSTEM.isWindows
" please install the font in 'Dotfiles\font'
set guifont=DejaVu_Sans_Mono_for_Powerline:h11:cANSI:qDRAFT
elseif OSX()
elseif s:SYSTEM.isOSX
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11
else
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 11

View File

@ -5,6 +5,9 @@
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
let s:SYSTEM = SpaceVim#api#import('system')
function! SpaceVim#health#python#check() abort
let result = ['SpaceVim python support check report:']
if has('nvim')
@ -25,7 +28,7 @@ function! SpaceVim#health#python#check() abort
if has('python3')
call add(result, ' SUCCEED!')
else
if !WINDOWS()
if !s:SYSTEM.isWindows
call add(result, ' Failed : to support +python3, Please install vim-gik, or build from sources.')
else
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')
call add(result, ' SUCCEED!')
else
if !WINDOWS()
if !s:SYSTEM.isWindows
call add(result, ' Failed : to support +python, Please install vim-gik, or build from sources.')
else
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
let s:SYSTEM = SpaceVim#api#import('system')
let s:save_cpo = &cpo
set cpo&vim
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'))
endif
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')
endif
if a:1 == 2
@ -261,7 +262,7 @@ function! zvim#util#UpdateHosts(...) abort
let url = a:1
endif
let hosts = systemlist('curl -s ' . url)
if WINDOWS()
if s:SYSTEM.isWindows
let local_hosts = $SystemRoot . expand('\System32\drivers\etc\hosts')
else
let local_hosts = '/etc/hosts'

View File

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