1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:20:04 +08:00

feat(org): improve lang#org layer

This commit is contained in:
Wang Shidong 2022-01-13 19:23:34 +08:00 committed by GitHub
parent ab8529c1ed
commit 0f2a73df99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 102 additions and 24 deletions

View File

@ -0,0 +1,15 @@
"=============================================================================
" org.vim --- lang#org for SpaceVim
" Copyright (c) 2016-2020 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
function! SpaceVim#layers#lang#org#plugins() abort
let plugins = []
call add(plugins, ['SpaceVim/org-mode', {'merged' : 0}])
return plugins
endfunction

View File

@ -1,6 +1,4 @@
"=============================================================================
" org.vim --- org layer for SpaceVim
" Copyright (c) 2016-2021 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: GPLv3
@ -8,9 +6,7 @@
function! SpaceVim#layers#org#plugins() abort
let plugins = []
call add(plugins, ['SpaceVim/org-mode', {'merged' : 0}])
return plugins
return SpaceVim#layers#lang#org#plugins()
endfunction
function! SpaceVim#layers#org#config() abort

View File

@ -20,17 +20,29 @@ lang: zh
SpaceVim 是一个社区驱动的 Vim 配置集合,通常一个 Vim 的配置集合包含了诸多的
Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管理这些插件以及相关
的配置。默认情况下,这些模块都是禁用的,用户可以根据自己需要或是项目需要
的配置。默认情况下,大部分模块都是禁用的,用户可以根据自己需要或是项目需要
来载入指定的模块以获取相关功能。
通过模块的方式管理插件和相关配置,为使用者节省了大量的搜索插件和调试插件的时
间。用户仅仅需要根据自己的实际需求,来启用相关模块。比如,当我需要频繁调用终
端时,可以启用终端支持的 `shell` 模块。
间。用户仅仅需要根据自己的实际需求,来启用相关模块。比如,当需要做 python
开发时,启用 [`lang#python`](lang/python/) 模块.
默认已启用的模块:
- [autocomplete](autocomplete/)
- [checkers](checkers/)
- [format](format/)
- [edit](edit/)
- [ui](ui/)
- [core](core/)
- [core#banner](core/banner/)
- [core#statusline](core/statusline/)
- [core#tabline](core/tabline/)
### 启用模块
`shell` 模块为例,启用该模块,并且通过设定一些模块选项,指定终端打开位置为
顶部,高度 30。
顶部,高度 30,使用快捷键 `SPC f v d` 打开配置文件,加入:
```toml
[[layers]]
@ -133,6 +145,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管
| [lang#moonscript](lang/moonscript/) | 这一模块为 moonscript 开发提供支持,包括交互式编程、一键运行等特性。 |
| [lang#nim](lang/nim/) | 该模块为 SpaceVim 提供 Nim 开发支持,包括语法高亮、代码补全、编译运行以及交互式编程等功能。 |
| [lang#ocaml](lang/ocaml/) | 这一模块为 OCaml 开发提供了支持,包括语法高亮、代码补全、以及定义处跳转等功能。 |
| [lang#org](lang/org/) | 这一模块为 SpaceVim 提供了 org 的编辑支持,包括格式化、自动生成文章目录、代码块等特性。 |
| [lang#pact](lang/pact/) | 这一模块为 pact 开发提供支持,包括交互式编程、一键运行等特性。 |
| [lang#pascal](lang/pascal/) | 这一模块为 pascal 开发提供支持,包括一键运行等特性。 |
| [lang#perl](lang/perl/) | 这一模块为 Perl 开发提供支持,包括代码补全、语法检查、代码格式化等特性。 |

View File

@ -0,0 +1,31 @@
---
title: "SpaceVim lang#org layer"
description: "这一模块为 SpaceVim 提供了 org 的编辑支持,包括格式化、自动生成文章目录、代码块等特性。"
lang: zh
---
# [Available Layers](../../) >> lang#org
![org](https://user-images.githubusercontent.com/13142418/92319337-7554ec00-f049-11ea-90fb-ad663dceea12.png)
<!-- vim-markdown-toc GFM -->
- [模块简介](#模块简介)
- [启用模块](#启用模块)
<!-- vim-markdown-toc -->
## 模块简介
这一模块为 SpaceVim 提供了 org 的编辑支持,包括格式化、自动生成文章目录、代码块等特性。
## 启用模块
可通过在配置文件内加入如下配置来启用该模块:
```toml
[[layers]]
name = "lang#org"
```

View File

@ -26,15 +26,15 @@ keeping them from having to think about what packages to install.
By default SpaceVim enables these layers:
- `autocomplete`
- `checkers`
- `format`
- `edit`
- `ui`
- `core`
- `core#banner`
- `core#statusline`
- `core#tabline`
- [autocomplete](autocomplete/)
- [checkers](checkers/)
- [format](format/)
- [edit](edit/)
- [ui](ui/)
- [core](core/)
- [core#banner](core/banner/)
- [core#statusline](core/statusline/)
- [core#tabline](core/tabline/)
To enable a specific layer you need to edit SpaceVim's custom configuration files.
The key binding for opening the configuration files is `SPC f v d`.
@ -85,8 +85,6 @@ Some layers are enabled by default. The following example shows how to disable `
| [floobits](floobits/) | This layer adds support for the peer programming tool floobits to SpaceVim. |
| [foldsearch](foldsearch/) | This layer provides functions that fold away lines that don't match a specific search pattern. |
| [format](format/) | Code formatting layer for SpaceVim, includes a variety of formatters for many filetypes |
| [fzf](fzf/) | This layer provides a heavily customized fzf centric workflow |
| [git](git/) | This layer adds extensive support for git |
| [github](github/) | This layer provides GitHub integration for SpaceVim |
| [gtags](gtags/) | This layer provides gtags manager for project |
| [japanese](japanese/) | Layer for japanese users, includes japanese docs and runtime messages |
@ -145,10 +143,6 @@ Some layers are enabled by default. The following example shows how to disable `
| [lang#moonscript](lang/moonscript/) | This layer is for moonscript development, provides syntax checking, code runner and repl support for moonscript files. |
| [lang#nim](lang/nim/) | This layer adds Nim language support to SpaceVim |
| [lang#nix](lang/nix/) | This layer adds Nix language support to SpaceVim. |
| [lang#ocaml](lang/ocaml/) | This layer is for OCaml development, provides autocompletion, syntax checking, and code formatting for OCaml files. |
| [lang#pact](lang/pact/) | This layer is for pact development, provides syntax checking, code runner and repl support for pact files. |
| [lang#pascal](lang/pascal/) | This layer is for pascal development, provides syntax highlighting, and code runner for pascal files. |
| [lang#perl](lang/perl/) | This layer is for Perl development, provides autocompletion, syntax checking, and code formatting for Perl files. |
| [lang#php](lang/php/) | PHP language support, including code completion, syntax lint and code runner |
| [lang#plantuml](lang/plantuml/) | This layer is for PlantUML development, provides syntax highlighting for PlantUML files. |
| [lang#pony](lang/pony/) | This layer is for pony development, provides syntax checking, code runner and repl support for pony files. |

29
docs/layers/lang/org.md Normal file
View File

@ -0,0 +1,29 @@
---
title: "SpaceVim lang#org layer"
description: "Edit org file within vim, autopreview org in the default browser, with this layer you can also format org file."
---
# [Available Layers](../../) >> lang#org
![org](https://user-images.githubusercontent.com/13142418/92319337-7554ec00-f049-11ea-90fb-ad663dceea12.png)
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
<!-- vim-markdown-toc -->
## Description
This layer is for editing org file. Including syntax highlighting, indent and syntax lint.
## Install
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#org"
```