@zhujianshi/slate-code-base
0.0.1-alpha.10 • Public • Published
what
slate-code-base 提供了在 slate 框架下的代码块功能.
install
yarn add @zhujianshi/slate-code-base
usage
import createCodeBase from '@zhujianshi/slate-code-base';
import '@zhujianshi/slate-code-base/lib/index.css'; // Don't forget import the css file
const yourSlatePlugins = [
//..
createCodeBase(option),
];
option
option |
type |
defaultValue |
description |
tabLength |
number |
4 |
控制一个 tab 等于多少空格 |
keyMap
option |
description |
shift +mod +k
|
删除选中行 |
shift +up
|
将选中区向上移动一行 |
shift +down
|
将选中区向下移动一行 |
mod +[
|
将选中区向右缩进(增加缩进) |
mod +]
|
将选中区向左缩进(增加缩进) |
mod +d
|
选中当前变量 |
support language
language |
alias |
javascript |
js,javascript,jsx |
css |
css |
markup |
markup |
c |
c |
cpp |
c++,cpp |
html |
html |
php |
php |
haskell |
hs,haskell |
todo
Maybe be added in future:
- [ ] add more language support
- [ ] add theme support
Readme
Keywords
nonePackage Sidebar
Install
npm i @zhujianshi/slate-code-base
Weekly Downloads