mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:20:04 +08:00
Fix api page
This commit is contained in:
parent
d511bf7c8f
commit
8fcae6b93e
@ -3,8 +3,10 @@ let s:system = SpaceVim#api#import('system')
|
||||
|
||||
if s:system.isWindows
|
||||
let s:file['separator'] = '\'
|
||||
let s:file['pathSeparator'] = ';'
|
||||
else
|
||||
let s:file['separator'] = '/'
|
||||
let s:file['pathSeparator'] = ':'
|
||||
endif
|
||||
|
||||
function! SpaceVim#api#file#get() abort
|
||||
|
@ -2,10 +2,13 @@
|
||||
title: "file api"
|
||||
---
|
||||
|
||||
# [APIs](https://spacevim.org/apis) : file
|
||||
|
||||
## values
|
||||
|
||||
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
|
||||
|
@ -2,6 +2,8 @@
|
||||
title: "system api"
|
||||
---
|
||||
|
||||
# [APIs](https://spacevim.org/apis) : system
|
||||
|
||||
## values
|
||||
|
||||
name | values | description
|
||||
|
26
docs/apis.md
26
docs/apis.md
@ -4,9 +4,25 @@ title: "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
|
||||
----- | ------------------
|
||||
file |
|
||||
system |
|
||||
## Usage
|
||||
|
||||
```viml
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user