A modular Vim/Neovim configuration

Home | About | Quick start guide | Documentation | Development | Community | Sponsors | 中文

Available APIs » file


name description
separator The system-dependent name-separator character.
pathSeparator The system-dependent path-separator character.


name description
fticon(file) return the icon of specific file name or path
write(message, file) append message to file
override(message, file) override message to file
read(file) read message from file
ls(dir, if_file_only) list files and directorys in specific directory
updateFiles(files) update the contents of all files


This api can be used in both vim script and lua script.

vim script:

let s:FILE = SpaceVim#api#import('file')
echom S:FILE.separator

lua script:

local file_api = require('spacevim.api').import('file')

Powered by Jekyll