1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 23:49:19 +08:00

Merge branch 'chinese_doc' into dev

This commit is contained in:
wsdjeg 2017-09-09 16:11:22 +00:00
commit 7754cb09dc
10 changed files with 2323 additions and 253 deletions

View File

@ -1,6 +1,21 @@
"=============================================================================
" markdown.vim --- lang#markdown layer for SpaceVim
" Copyright (c) 2016-2017 Shidong Wang & Contributors
" Author: Shidong Wang < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: MIT license
"=============================================================================
let s:md_listItemIndent = 1
let s:md_enableWcwidth = 0
function! SpaceVim#layers#lang#markdown#set_variable(var) abort
let s:md_listItemIndent = get(a:var, 'listItemIndent', s:md_listItemIndent)
let s:md_enableWcwidth = get(a:var, 'enableWcwidth', s:md_enableWcwidth)
endfunction
function! SpaceVim#layers#lang#markdown#plugins() abort
let plugins = []
call add(plugins, ['tpope/vim-markdown',{ 'on_ft' : 'markdown'}])
call add(plugins, ['SpaceVim/vim-markdown',{ 'on_ft' : 'markdown'}])
call add(plugins, ['joker1007/vim-markdown-quote-syntax',{ 'on_ft' : 'markdown'}])
call add(plugins, ['mzlogin/vim-markdown-toc',{ 'on_ft' : 'markdown'}])
call add(plugins, ['iamcco/mathjax-support-for-mkdp',{ 'on_ft' : 'markdown'}])
@ -26,12 +41,13 @@ function! SpaceVim#layers#lang#markdown#config() abort
if executable('firefox')
let g:mkdp_path_to_chrome= get(g:, 'mkdp_path_to_chrome', 'firefox')
endif
let remarkrc = s:generate_remarkrc()
let g:neoformat_enabled_markdown = ['remark']
let g:neoformat_markdown_remark = {
\ 'exe': 'remark',
\ 'args': ['--no-color', '--silent', '--use', 'remark-frontmatter'],
\ 'stdin': 1,
\ }
\ 'exe': 'remark',
\ 'args': ['--no-color', '--silent'] + (empty(remarkrc) ? [] : ['-r', remarkrc]),
\ 'stdin': 1,
\ }
endfunction
function! s:mappings() abort
@ -42,3 +58,26 @@ function! s:mappings() abort
call SpaceVim#mapping#space#langSPC('nmap', ['l','ft'], "Tabularize /|", 'Format table under cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','p'], "MarkdownPreview", 'Real-time markdown preview', 1)
endfunction
function! s:generate_remarkrc() abort
let conf = [
\ 'module.exports = {',
\ ' settings: {',
\ ]
" TODO add settings
call add(conf, " listItemIndent: '" . s:md_listItemIndent . "',")
if s:md_enableWcwidth
call add(conf, " stringLength: require('wcwidth'),")
endif
call add(conf, ' },')
call add(conf, ' plugins: [')
" TODO add plugins
call add(conf, " require('remark-frontmatter'),")
call add(conf, ' ]')
call add(conf, '};')
let f = tempname() . '.js'
call writefile(conf, f)
return f
endfunction

View File

@ -17,11 +17,18 @@ function! SpaceVim#layers#shell#plugins() abort
return plugins
endfunction
let s:file = expand('<sfile>:~')
let s:lnum = expand('<slnum>') + 2
function! SpaceVim#layers#shell#config() abort
call SpaceVim#mapping#space#def('nnoremap', ["'"], 'call call('
\ . string(function('s:open_default_shell')) . ', [])',
\ 'open shell', 1)
\ ['open shell',
\ [
\ "[SPC '] is to open or jump to default shell window",
\ '',
\ 'Definition: ' . s:file . ':' . s:lnum,
\ ]
\ ], 1)
endfunction
@ -56,6 +63,7 @@ function! s:open_default_shell() abort
if exists(':te')
exe 'te'
let s:shell_win_nr = winnr()
let w:shell_layer_win = 1
else
echo ':terminal is not supported in this version'
endif

View File

@ -46,7 +46,11 @@ function! SpaceVim#layers#ui#config() abort
\ 'toggle highlight of the current line', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 'i'], 'call call('
\ . string(s:_function('s:toggle_indentline')) . ', [])',
\ 'toggle highlight indentation levels', 1)
\ ['toggle highlight indentation levels',
\ [
\ 'SPC t h i is to running :IndentLinesToggle which is definded in indentLine'
\ ]
\ ], 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 'c'], 'set cursorcolumn!',
\ 'toggle highlight indentation current column', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 'h', 's'], 'call call('

View File

@ -162,6 +162,10 @@ function! SpaceVim#mapping#close_term_buffer(...) abort
let buffers = get(g:, '_spacevim_list_buffers', [])
let abuf = str2nr(g:_spacevim_termclose_abuf)
let index = index(buffers, abuf)
if get(w:, 'shell_layer_win', 0) == 1
exe 'bd!' . abuf
return
endif
if index != -1
if index == 0
if len(buffers) > 1

View File

@ -32,6 +32,9 @@ let g:deoplete#ignore_sources.go = get(g:deoplete#ignore_sources, 'go', ['omni']
call deoplete#custom#set('go', 'mark', '')
call deoplete#custom#set('go', 'rank', 9999)
" markdown
let g:deoplete#ignore_sources.markdown = get(g:deoplete#ignore_sources, 'markdown', ['tag'])
" perl
let g:deoplete#omni#input_patterns.perl = get(g:deoplete#omni#input_patterns, 'perl', [
\'[^. \t0-9]\.\w*',

File diff suppressed because it is too large Load Diff

View File

@ -7,131 +7,131 @@ title: "Documentation"
<!-- vim-markdown-toc GFM -->
* [Core Pillars](#core-pillars)
* [Mnemonic](#mnemonic)
* [Discoverable](#discoverable)
* [Consistent](#consistent)
* [Crowd-Configured](#crowd-configured)
* [Mnemonic](#mnemonic)
* [Discoverable](#discoverable)
* [Consistent](#consistent)
* [Crowd-Configured](#crowd-configured)
* [Highlighted features](#highlighted-features)
* [Screenshots](#screenshots)
* [welcome page](#welcome-page)
* [working flow](#working-flow)
* [welcome page](#welcome-page)
* [working flow](#working-flow)
* [Who can benefit from this?](#who-can-benefit-from-this)
* [Update and Rollback](#update-and-rollback)
* [Update SpaceVim itself](#update-spacevim-itself)
* [Automatic Updates](#automatic-updates)
* [Updating from the SpaceVim Buffer](#updating-from-the-spacevim-buffer)
* [Updating Manually with git](#updating-manually-with-git)
* [Update plugins](#update-plugins)
* [Update SpaceVim itself](#update-spacevim-itself)
* [Automatic Updates](#automatic-updates)
* [Updating from the SpaceVim Buffer](#updating-from-the-spacevim-buffer)
* [Updating Manually with git](#updating-manually-with-git)
* [Update plugins](#update-plugins)
* [Configuration layers](#configuration-layers)
* [Custom Configuration](#custom-configuration)
* [Automatic Generation](#automatic-generation)
* [Alternative directory](#alternative-directory)
* [Automatic Generation](#automatic-generation)
* [Alternative directory](#alternative-directory)
* [Concepts](#concepts)
* [Transient-states](#transient-states)
* [Transient-states](#transient-states)
* [Awesome ui](#awesome-ui)
* [Colorschemes](#colorschemes)
* [Font](#font)
* [UI Toggles](#ui-toggles)
* [Statusline && tabline](#statusline--tabline)
* [statusline](#statusline)
* [tabline](#tabline)
* [Colorschemes](#colorschemes)
* [Font](#font)
* [UI Toggles](#ui-toggles)
* [Statusline && tabline](#statusline--tabline)
* [statusline](#statusline)
* [tabline](#tabline)
* [Manual](#manual)
* [Completion](#completion)
* [Unite/Denite](#unitedenite)
* [Mappings within unite/denite buffer](#mappings-within-unitedenite-buffer)
* [Discovering](#discovering)
* [Mappings](#mappings)
* [Mappings guide](#mappings-guide)
* [Unide/Denite describe key bindings](#unidedenite-describe-key-bindings)
* [Getting help](#getting-help)
* [Available layers](#available-layers)
* [Available plugins in SpaceVim](#available-plugins-in-spacevim)
* [New packages from ELPA repositories](#new-packages-from-elpa-repositories)
* [Toggles](#toggles)
* [Navigating](#navigating)
* [Point/Cursor](#pointcursor)
* [Vim motions with vim-easymotion](#vim-motions-with-vim-easymotion)
* [quick-jump-link mode (TODO)](#quick-jump-link-mode-todo)
* [Unimpaired bindings](#unimpaired-bindings)
* [Jumping, Joining and Splitting](#jumping-joining-and-splitting)
* [Jumping](#jumping)
* [Joining and splitting](#joining-and-splitting)
* [Window manipulation](#window-manipulation)
* [Window manipulation key bindings](#window-manipulation-key-bindings)
* [Buffers and Files](#buffers-and-files)
* [Buffers manipulation key bindings](#buffers-manipulation-key-bindings)
* [Create a new empty buffer](#create-a-new-empty-buffer)
* [Special Buffers](#special-buffers)
* [Files manipulations key bindings](#files-manipulations-key-bindings)
* [Vim and SpaceVim files](#vim-and-spacevim-files)
* [File tree](#file-tree)
* [File tree navigation](#file-tree-navigation)
* [Open file with file tree.](#open-file-with-file-tree)
* [Commands starting with `g`](#commands-starting-with-g)
* [Commands starting with `z`](#commands-starting-with-z)
* [Auto-saving](#auto-saving)
* [Searching](#searching)
* [With an external tool](#with-an-external-tool)
* [Useful key bindings](#useful-key-bindings)
* [Searching in current file](#searching-in-current-file)
* [Searching in all loaded buffers](#searching-in-all-loaded-buffers)
* [Searching in an arbitrary directory](#searching-in-an-arbitrary-directory)
* [Searching in a project](#searching-in-a-project)
* [Background searching in a project](#background-searching-in-a-project)
* [Searching the web](#searching-the-web)
* [Searching on the fly](#searching-on-the-fly)
* [Persistent highlighting](#persistent-highlighting)
* [Editing](#editing)
* [Paste text](#paste-text)
* [Auto-indent pasted text](#auto-indent-pasted-text)
* [Text manipulation commands](#text-manipulation-commands)
* [Text insertion commands](#text-insertion-commands)
* [Commenting](#commenting)
* [Multi-Encodings](#multi-encodings)
* [Errors handling](#errors-handling)
* [Managing projects](#managing-projects)
* [Completion](#completion)
* [Unite/Denite](#unitedenite)
* [Mappings within unite/denite buffer](#mappings-within-unitedenite-buffer)
* [Discovering](#discovering)
* [Mappings](#mappings)
* [Mappings guide](#mappings-guide)
* [Unide/Denite describe key bindings](#unidedenite-describe-key-bindings)
* [Getting help](#getting-help)
* [Available layers](#available-layers)
* [Available plugins in SpaceVim](#available-plugins-in-spacevim)
* [New packages from ELPA repositories](#new-packages-from-elpa-repositories)
* [Toggles](#toggles)
* [Navigating](#navigating)
* [Point/Cursor](#pointcursor)
* [Vim motions with vim-easymotion](#vim-motions-with-vim-easymotion)
* [quick-jump-link mode (TODO)](#quick-jump-link-mode-todo)
* [Unimpaired bindings](#unimpaired-bindings)
* [Jumping, Joining and Splitting](#jumping-joining-and-splitting)
* [Jumping](#jumping)
* [Joining and splitting](#joining-and-splitting)
* [Window manipulation](#window-manipulation)
* [Window manipulation key bindings](#window-manipulation-key-bindings)
* [Buffers and Files](#buffers-and-files)
* [Buffers manipulation key bindings](#buffers-manipulation-key-bindings)
* [Create a new empty buffer](#create-a-new-empty-buffer)
* [Special Buffers](#special-buffers)
* [Files manipulations key bindings](#files-manipulations-key-bindings)
* [Vim and SpaceVim files](#vim-and-spacevim-files)
* [File tree](#file-tree)
* [File tree navigation](#file-tree-navigation)
* [Open file with file tree.](#open-file-with-file-tree)
* [Commands starting with `g`](#commands-starting-with-g)
* [Commands starting with `z`](#commands-starting-with-z)
* [Auto-saving](#auto-saving)
* [Searching](#searching)
* [With an external tool](#with-an-external-tool)
* [Useful key bindings](#useful-key-bindings)
* [Searching in current file](#searching-in-current-file)
* [Searching in all loaded buffers](#searching-in-all-loaded-buffers)
* [Searching in an arbitrary directory](#searching-in-an-arbitrary-directory)
* [Searching in a project](#searching-in-a-project)
* [Background searching in a project](#background-searching-in-a-project)
* [Searching the web](#searching-the-web)
* [Searching on the fly](#searching-on-the-fly)
* [Persistent highlighting](#persistent-highlighting)
* [Editing](#editing)
* [Paste text](#paste-text)
* [Auto-indent pasted text](#auto-indent-pasted-text)
* [Text manipulation commands](#text-manipulation-commands)
* [Text insertion commands](#text-insertion-commands)
* [Commenting](#commenting)
* [Multi-Encodings](#multi-encodings)
* [Errors handling](#errors-handling)
* [Managing projects](#managing-projects)
* [Achievements](#achievements)
* [issues](#issues)
* [Stars, forks and watchers](#stars-forks-and-watchers)
* [issues](#issues)
* [Stars, forks and watchers](#stars-forks-and-watchers)
* [Features](#features)
* [Awesome ui](#awesome-ui-1)
* [Mnemonic key bindings](#mnemonic-key-bindings)
* [Awesome ui](#awesome-ui-1)
* [Mnemonic key bindings](#mnemonic-key-bindings)
* [Language specific mode](#language-specific-mode)
* [Key Mapping](#key-mapping)
* [c/c++ support](#cc-support)
* [go support](#go-support)
* [python support](#python-support)
* [c/c++ support](#cc-support)
* [go support](#go-support)
* [python support](#python-support)
* [Neovim centric - Dark powered mode of SpaceVim.](#neovim-centric---dark-powered-mode-of-spacevim)
* [Modular configuration](#modular-configuration)
* [Multiple leader mode](#multiple-leader-mode)
* [Global origin vim leader](#global-origin-vim-leader)
* [Local origin vim leader](#local-origin-vim-leader)
* [Windows function leader](#windows-function-leader)
* [Unite work flow leader](#unite-work-flow-leader)
* [Global origin vim leader](#global-origin-vim-leader)
* [Local origin vim leader](#local-origin-vim-leader)
* [Windows function leader](#windows-function-leader)
* [Unite work flow leader](#unite-work-flow-leader)
* [Unite centric work-flow](#unite-centric-work-flow)
* [Plugin Highlights](#plugin-highlights)
* [Non Lazy-Loaded Plugins](#non-lazy-loaded-plugins)
* [Lazy-Loaded Plugins](#lazy-loaded-plugins)
* [Language](#language)
* [Commands](#commands)
* [Commands](#commands-1)
* [Completion](#completion-1)
* [Unite](#unite)
* [Operators & Text Objects](#operators--text-objects)
* [Custom Key bindings](#custom-key-bindings)
* [File Operations](#file-operations)
* [Editor UI](#editor-ui)
* [Window Management](#window-management)
* [Native functions](#native-functions)
* [Plugin: Unite](#plugin-unite)
* [Plugin: neocomplete](#plugin-neocomplete)
* [Plugin: NERD Commenter](#plugin-nerd-commenter)
* [Plugin: Goyo and Limelight](#plugin-goyo-and-limelight)
* [Plugin: ChooseWin](#plugin-choosewin)
* [Plugin: Bookmarks](#plugin-bookmarks)
* [Plugin: Gina/Gita](#plugin-ginagita)
* [Plugin: vim-signify](#plugin-vim-signify)
* [Misc Plugins](#misc-plugins)
* [Plugin Highlights](#plugin-highlights)
* [Non Lazy-Loaded Plugins](#non-lazy-loaded-plugins)
* [Lazy-Loaded Plugins](#lazy-loaded-plugins)
* [Language](#language)
* [Commands](#commands)
* [Commands](#commands-1)
* [Completion](#completion-1)
* [Unite](#unite)
* [Operators & Text Objects](#operators--text-objects)
* [Custom Key bindings](#custom-key-bindings)
* [File Operations](#file-operations)
* [Editor UI](#editor-ui)
* [Window Management](#window-management)
* [Native functions](#native-functions)
* [Plugin: Unite](#plugin-unite)
* [Plugin: neocomplete](#plugin-neocomplete)
* [Plugin: NERD Commenter](#plugin-nerd-commenter)
* [Plugin: Goyo and Limelight](#plugin-goyo-and-limelight)
* [Plugin: ChooseWin](#plugin-choosewin)
* [Plugin: Bookmarks](#plugin-bookmarks)
* [Plugin: Gina/Gita](#plugin-ginagita)
* [Plugin: vim-signify](#plugin-vim-signify)
* [Misc Plugins](#misc-plugins)
<!-- vim-markdown-toc -->
@ -159,19 +159,19 @@ Community-driven configuration provides curated packages tuned by power users an
## Highlighted features
- **Great documentation:** access documentation in Vim with
<kbd>:h SpaceVim</kbd>.
- **Minimalistic and nice graphical UI:** you'll love the awesome UI and its useful features.
- **Keep your fingers on the home row:** for quicker editing with support for QWERTY and BEPO layouts.
- **Mnemonic key bindings:** commands have mnemonic prefixes like
<kbd>[Window]</kbd> for all the window and buffer commands or <kbd>[Unite]</kbd> for the
unite work flow commands.
- **Fast boot time:** Lazy-load 90% of plugins with [dein.vim]
- **Lower the risk of RSI:** by heavily using the space bar instead of modifiers.
- **Batteries included:** discover hundreds of ready-to-use packages nicely
organised in configuration layers following a set of
[conventions](http://spacevim.org/development/).
- **Neovim centric:** Dark powered mode of SpaceVim
- **Great documentation:** access documentation in Vim with
<kbd>:h SpaceVim</kbd>.
- **Minimalistic and nice graphical UI:** you'll love the awesome UI and its useful features.
- **Keep your fingers on the home row:** for quicker editing with support for QWERTY and BEPO layouts.
- **Mnemonic key bindings:** commands have mnemonic prefixes like
<kbd>[Window]</kbd> for all the window and buffer commands or <kbd>[Unite]</kbd> for the
unite work flow commands.
- **Fast boot time:** Lazy-load 90% of plugins with [dein.vim]
- **Lower the risk of RSI:** by heavily using the space bar instead of modifiers.
- **Batteries included:** discover hundreds of ready-to-use packages nicely
organised in configuration layers following a set of
[conventions](http://spacevim.org/development/).
- **Neovim centric:** Dark powered mode of SpaceVim
## Screenshots
@ -193,11 +193,11 @@ to get more screenshots, see: [issue #415](https://github.com/SpaceVim/SpaceVim/
## Who can benefit from this?
- the **elementary** vim users.
- Vim users pursuing a beautiful appearance.
- Vim users wanting to lower the [risk of RSI](http://en.wikipedia.org/wiki/Repetitive_strain_injury).
- Vim users wanting to learn a different way to edit files.
- Vim users wanting a simple but deep configuration system.
- the **elementary** vim users.
- Vim users pursuing a beautiful appearance.
- Vim users wanting to lower the [risk of RSI](http://en.wikipedia.org/wiki/Repetitive_strain_injury).
- Vim users wanting to learn a different way to edit files.
- Vim users wanting a simple but deep configuration system.
## Update and Rollback
@ -314,8 +314,8 @@ Move Text Transient State:
SpaceVim has a minimalistic and distraction free UI:
- custom airline with color feedback according to current check status
- custom icon in sign column and error feedbacks for checker.
- custom airline with color feedback according to current check status
- custom icon in sign column and error feedbacks for checker.
### Colorschemes
@ -360,7 +360,7 @@ Some UI indicators can be toggled on and off (toggles start with t and T):
| SPC t 8 | highlight any character past the 80th column |
| SPC t f | display the fill column (by default the fill column is set to 80) |
| SPC t h h | toggle highlight of the current line |
| SPC t h i | toggle highlight indentation levels |
| SPC t h i | toggle highlight indentation levels (TODO) |
| SPC t h c | toggle highlight indentation current column |
| SPC t h s | toggle syntax highlighting |
| SPC t i | toggle indentation guide at point |
@ -377,11 +377,14 @@ Some UI indicators can be toggled on and off (toggles start with t and T):
The statusline and tabline are heavily customized with the following capabilities:
- tabline index of each buffer or tab.
- vim mode (INSERT/NORMAL etc.)
- git info : diff/branch
- checker info: numbers of errors and warnings.
- trailing line number.
- tabline index of each buffer or tab.
- vim mode (INSERT/NORMAL etc.)
- git info : diff/branch
- checker info: numbers of errors and warnings.
- trailing line number.
- enabled feature of SpaceVim
- file information
- search index
| Key Binding | Description |
| ----------- | ----------------------------- |
@ -391,12 +394,12 @@ The statusline and tabline are heavily customized with the following capabilitie
The `core#statusline` layer provide a heavily customized powerline with the following capabilities:, It is inspired by spacemacs's mode-line.
- show the window number
- color code for current state
- show the number of search results
- toggle syntax checking info
- toggle battery info
- toggle minor mode lighters
- show the window number
- color code for current state
- show the number of search results
- toggle syntax checking info
- toggle battery info
- toggle minor mode lighters
Reminder of the color codes for the states:
@ -411,17 +414,17 @@ all the colors based on the current colorscheme
Some elements can be dynamically toggled:
| Key Binding | Description |
| ----------- | ------------------------------------------------------------- |
| `SPC t m b` | toggle the battery status (need to install acpi) |
| `SPC t m c` | toggle the org task clock (available in org layer) |
| `SPC t m m` | toggle the minor mode lighters |
| `SPC t m M` | toggle the major mode |
| `SPC t m n` | toggle the cat! (if colors layer is declared in your dotfile) |
| `SPC t m p` | toggle the cursor position |
| `SPC t m t` | toggle the time |
| `SPC t m T` | toggle the mode line itself |
| `SPC t m v` | toggle the version control info |
| Key Binding | Description |
| ----------- | ------------------------------------------------------------------- |
| `SPC t m b` | toggle the battery status (need to install acpi) |
| `SPC t m c` | toggle the org task clock (available in org layer)(TODO) |
| `SPC t m m` | toggle the minor mode lighters |
| `SPC t m M` | toggle the major mode |
| `SPC t m n` | toggle the cat! (if colors layer is declared in your dotfile)(TODO) |
| `SPC t m p` | toggle the cursor position |
| `SPC t m t` | toggle the time |
| `SPC t m T` | toggle the mode line itself |
| `SPC t m v` | toggle the version control info |
**Powerline font installation:**
@ -998,11 +1001,11 @@ after pressing prefix `z` in normal mode, if you do not remember the mappings, y
SpaceVim can be interfaced with different searching tools like:
- [rg - ripgrep](https://github.com/BurntSushi/ripgrep)
- [ag - the silver searcher](https://github.com/ggreer/the_silver_searcher)
- [pt - the platinum searcher](https://github.com/monochromegane/the_platinum_searcher)
- [ack](https://beyondgrep.com/)
- grep
- [rg - ripgrep](https://github.com/BurntSushi/ripgrep)
- [ag - the silver searcher](https://github.com/ggreer/the_silver_searcher)
- [pt - the platinum searcher](https://github.com/monochromegane/the_platinum_searcher)
- [ack](https://beyondgrep.com/)
- grep
The search commands in SpaceVim are organized under the `SPC s` prefix with the next key is the tool to use and the last key is the scope. For instance `SPC s a b` will search in all opened buffers using `ag`.
@ -1032,8 +1035,8 @@ It is possible to search in the current file by double pressing the second key o
Notes:
- `rg`, `ag` and `pt` are optimized to be used in a source control repository but they can be used in an arbitrary directory as well.
- It is also possible to search in several directories at once by marking them in the unite buffer.
- `rg`, `ag` and `pt` are optimized to be used in a source control repository but they can be used in an arbitrary directory as well.
- It is also possible to search in several directories at once by marking them in the unite buffer.
**Beware** if you use `pt`, [TCL parser tools](https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/apps/pt.html) also install a command line tool called `pt`.
@ -1196,7 +1199,7 @@ Text related commands (start with `x`):
| `SPC x a L` | right-align with evil-lion (TODO) |
| `SPC x a r` | align region using user-specified regexp (TODO) |
| `SPC x a m` | align region at arithmetic operators `(+-*/)` (TODO) |
| `SPC x c` | count the number of chars/words/lines in the selection region |
| `SPC x c` | count the number of chars/words/lines in the selection region |
| `SPC x d w` | delete trailing whitespaces |
| `SPC x d SPC` | Delete all spaces and tabs around point, leaving one space |
| `SPC x g l` | set lanuages used by translate commands (TODO) |
@ -1273,10 +1276,10 @@ Comments are handled by [nerdcommenter](https://github.com/scrooloose/nerdcommen
SpaceVim use utf-8 as default encoding. there are four options for these case:
- fileencodings (fencs): ucs-bom,utf-8,default,latin1
- fileencoding (fenc): utf-8
- encoding (enc): utf-8
- termencoding (tenc): utf-8 (only supported in vim)
- fileencodings (fencs): ucs-bom,utf-8,default,latin1
- fileencoding (fenc): utf-8
- encoding (enc): utf-8
- termencoding (tenc): utf-8 (only supported in vim)
to fix messy display: `SPC e a` is the mapping for auto detect the file encoding. after detecting file encoding, you can run the command below to fix the encoding:
@ -1347,7 +1350,7 @@ project manager commands start with `p`:
### Awesome ui
- outline + filemanager + checker
- outline + filemanager + checker
![awesome ui](https://cloud.githubusercontent.com/assets/13142418/22506638/84705532-e8bc-11e6-8b72-edbdaf08426b.png)
@ -1372,37 +1375,37 @@ Key bindings are organized using mnemonic prefixes like b for buffer, p for proj
### c/c++ support
1. code completion: autocompletion and fuzzy match.
![completion-fuzzy-match](https://cloud.githubusercontent.com/assets/13142418/22505960/df9068de-e8b8-11e6-943e-d79ceca095f1.png)
2. syntax check: Asynchronous linting and make framework.
![syntax-check](https://cloud.githubusercontent.com/assets/13142418/22506340/e28b4782-e8ba-11e6-974b-ca29574dcc1f.png)
1. code completion: autocompletion and fuzzy match.
![completion-fuzzy-match](https://cloud.githubusercontent.com/assets/13142418/22505960/df9068de-e8b8-11e6-943e-d79ceca095f1.png)
2. syntax check: Asynchronous linting and make framework.
![syntax-check](https://cloud.githubusercontent.com/assets/13142418/22506340/e28b4782-e8ba-11e6-974b-ca29574dcc1f.png)
### go support
1. code completion:
![2017-02-01_1360x721](https://cloud.githubusercontent.com/assets/13142418/22508345/8215c5e4-e8c4-11e6-95ec-f2a6e1e2f4d2.png)
2. syntax check:
![2017-02-01_1359x720](https://cloud.githubusercontent.com/assets/13142418/22509944/108b6508-e8cb-11e6-8104-6310a29ae796.png)
1. code completion:
![2017-02-01_1360x721](https://cloud.githubusercontent.com/assets/13142418/22508345/8215c5e4-e8c4-11e6-95ec-f2a6e1e2f4d2.png)
2. syntax check:
![2017-02-01_1359x720](https://cloud.githubusercontent.com/assets/13142418/22509944/108b6508-e8cb-11e6-8104-6310a29ae796.png)
### python support
1. code completion:
![2017-02-02_1360x724](https://cloud.githubusercontent.com/assets/13142418/22537799/7d1d47fe-e948-11e6-8168-a82e3f688554.png)
2. syntax check:
![2017-02-02_1358x720](https://cloud.githubusercontent.com/assets/13142418/22537883/36de7b5e-e949-11e6-866f-73c48e8f59aa.png)
1. code completion:
![2017-02-02_1360x724](https://cloud.githubusercontent.com/assets/13142418/22537799/7d1d47fe-e948-11e6-8168-a82e3f688554.png)
2. syntax check:
![2017-02-02_1358x720](https://cloud.githubusercontent.com/assets/13142418/22537883/36de7b5e-e949-11e6-866f-73c48e8f59aa.png)
## Neovim centric - Dark powered mode of SpaceVim.
By default, SpaceVim use these dark powered plugins:
1. [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) - Dark powered asynchronous completion framework for neovim
2. [dein.vim](https://github.com/Shougo/dein.vim) - Dark powered Vim/Neovim plugin manager
1. [deoplete.nvim](https://github.com/Shougo/deoplete.nvim) - Dark powered asynchronous completion framework for neovim
2. [dein.vim](https://github.com/Shougo/dein.vim) - Dark powered Vim/Neovim plugin manager
TODO:
1. [defx.nvim](https://github.com/Shougo/defx.nvim) - Dark powered file explorer
2. [deoppet.nvim](https://github.com/Shougo/deoppet.nvim) - Dark powered snippet plugin
3. [denite.nvim](https://github.com/Shougo/denite.nvim) - Dark powered asynchronous unite all interfaces for Neovim/Vim8
1. [defx.nvim](https://github.com/Shougo/defx.nvim) - Dark powered file explorer
2. [deoppet.nvim](https://github.com/Shougo/deoppet.nvim) - Dark powered snippet plugin
3. [denite.nvim](https://github.com/Shougo/denite.nvim) - Dark powered asynchronous unite all interfaces for Neovim/Vim8
## Modular configuration
@ -1429,31 +1432,31 @@ Unite work flow leader can only be used in normal mode. Unite leader need unite
![unite](https://cloud.githubusercontent.com/assets/13142418/23955542/26fd5348-09d5-11e7-8253-1f43991439b0.png)
- List all the plugins has been installed, fuzzy find what you want, default action is open the github website of current plugin. default key is `<leader>lp`
![2017-01-21_1358x725](https://cloud.githubusercontent.com/assets/13142418/22175019/ce42d902-e027-11e6-89cd-4f44f70a10cd.png)
- List all the plugins has been installed, fuzzy find what you want, default action is open the github website of current plugin. default key is `<leader>lp`
![2017-01-21_1358x725](https://cloud.githubusercontent.com/assets/13142418/22175019/ce42d902-e027-11e6-89cd-4f44f70a10cd.png)
- List all the mappings and description: `f<space>`
![2017-02-01_1359x723](https://cloud.githubusercontent.com/assets/13142418/22507351/24af0d74-e8c0-11e6-985e-4a1404b629ed.png)
- List all the mappings and description: `f<space>`
![2017-02-01_1359x723](https://cloud.githubusercontent.com/assets/13142418/22507351/24af0d74-e8c0-11e6-985e-4a1404b629ed.png)
- List all the starred repos in github.com, fuzzy find and open the website of the repo. default key is `<leader>ls`
![2017-02-01_1359x722](https://cloud.githubusercontent.com/assets/13142418/22506915/deb99caa-e8bd-11e6-9b80-316281ddb48c.png)
- List all the starred repos in github.com, fuzzy find and open the website of the repo. default key is `<leader>ls`
![2017-02-01_1359x722](https://cloud.githubusercontent.com/assets/13142418/22506915/deb99caa-e8bd-11e6-9b80-316281ddb48c.png)
#### Plugin Highlights
- Package management with caching enabled and lazy loading
- Project-aware tabs and label
- Vimfiler as file-manager + SSH connections
- Go completion via vim-go and gocode
- Javascript completion via Tern
- PHP completion, indent, folds, syntax
- Python jedi completion, pep8 convention
- Languages: Ansible, css3, csv, json, less, markdown, mustache
- Helpers: Undo tree, bookmarks, git, tmux navigation,
hex editor, sessions, and much more.
- Package management with caching enabled and lazy loading
- Project-aware tabs and label
- Vimfiler as file-manager + SSH connections
- Go completion via vim-go and gocode
- Javascript completion via Tern
- PHP completion, indent, folds, syntax
- Python jedi completion, pep8 convention
- Languages: Ansible, css3, csv, json, less, markdown, mustache
- Helpers: Undo tree, bookmarks, git, tmux navigation,
hex editor, sessions, and much more.
_Note_ that 90% of the plugins are **[lazy-loaded]**.
_Note_ that 90% of the plugins are **[lazy-loaded]**.
[lazy-loaded]&#x3A; ./config/plugins.vim
[lazy-loaded]&#x3A; ./config/plugins.vim
#### Non Lazy-Loaded Plugins

BIN
docs/img/weixin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
docs/img/zhifubao.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@ -1,12 +1,56 @@
# [Layers](https://spacevim.org/layers) > lang#markdown
---
title: "SpaceVim lang#markdown layer"
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#markdown
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [formatting](#formatting)
- [options](#options)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer is for editing markdown file.
Mappings
## Layer Installation
Key | mode | description
--- | --- | ------------
SPC l ft | Normal | Format table under cursor
SPC l p | Normal | Real-time markdown preview
To use this configuration layer, add `call SpaceVim#layers#load('lang#markdown')` to your custom configuration file.
## formatting
SpaceVim use remark to formatting markdown file, so you need to install this program. you can install it via npm:
```sh
npm -g install remark
npm -g install remark-cli
npm -g install remark-stringify
```
### options
**listItemIndent**
How to indent the content from list items (`tab`, `mixed` or 1 , default: 1).
- `'tab'`: use tab stops (4 spaces)
- `'1'`: use one space
- `'mixed'`: use `1` for tight and `tab` for loose list items
**enableWcwidth**
Enable/Disable wcwidth for detecting the length of a table cell, default is 0.
## Key bindings
| Key | mode | description |
| ---------- | ------ | -------------------------- |
| `SPC b f` | Normal | Format current buffer |
| `SPC l ft` | Normal | Format table under cursor |
| `SPC l p` | Normal | Real-time markdown preview |