1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-23 17:49:57 +08:00

Fix api page

This commit is contained in:
wsdjeg 2017-02-17 21:02:14 +08:00
parent d511bf7c8f
commit 8fcae6b93e
4 changed files with 29 additions and 6 deletions

View File

@ -3,8 +3,10 @@ let s:system = SpaceVim#api#import('system')
if s:system.isWindows if s:system.isWindows
let s:file['separator'] = '\' let s:file['separator'] = '\'
let s:file['pathSeparator'] = ';'
else else
let s:file['separator'] = '/' let s:file['separator'] = '/'
let s:file['pathSeparator'] = ':'
endif endif
function! SpaceVim#api#file#get() abort function! SpaceVim#api#file#get() abort

View File

@ -2,10 +2,13 @@
title: "file api" title: "file api"
--- ---
# [APIs](https://spacevim.org/apis) : file
## values ## values
name | values | description name | values | description
----- |:----:| ------------------ ----- |:----:| ------------------
separator | `/` or `\\` | the separator based on the os separator | `/` or `\` | The system-dependent name-separator character.
pathSeparator | `:` or `;` | The system-dependent path-separator character.
## functions ## functions

View File

@ -2,6 +2,8 @@
title: "system api" title: "system api"
--- ---
# [APIs](https://spacevim.org/apis) : system
## values ## values
name | values | description name | values | description

View File

@ -4,9 +4,25 @@ title: "APIs"
# SpaceVim public APIs: # SpaceVim public APIs:
SpaceVim provide many public apis, you can use this apis in your plugins. here is the list of all the apis: SpaceVim provide many public apis, you can use this apis in your plugins.
nanme | description ## Usage
----- | ------------------
file | ```viml
system |
let s:file = SpaceVim#api#import('file')
let s:system = SpaceVim#api#import('system')
if s:system.isWindows
echom "Os is Windows"
endif
echom s:file.separator
echom s:file.pathSeparator
```
here is the list of all the apis, and welcome to contribute to SpaceVim.
name | description | documentation
----- |:----:| -------
file | basic api about file and directory | [readme](https://spacevim.org/api/file)
system | basic api about system | [readme](https://spacevim.org/api/system)