From 115709b05abe94c44c78dd59779baf9e8aa47f70 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Fri, 19 Jan 2018 20:49:01 +0800 Subject: [PATCH] Move emmet to html layer --- autoload/SpaceVim/layers/edit.vim | 2 -- autoload/SpaceVim/layers/lang/html.vim | 23 ++++++++++++++--------- docs/layers/lang/html.md | 17 ++++++++++++----- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/autoload/SpaceVim/layers/edit.vim b/autoload/SpaceVim/layers/edit.vim index 568bc6207..f2964af02 100644 --- a/autoload/SpaceVim/layers/edit.vim +++ b/autoload/SpaceVim/layers/edit.vim @@ -15,7 +15,6 @@ function! SpaceVim#layers#edit#plugins() abort \ ['kana/vim-textobj-line'], \ ['kana/vim-textobj-entire'], \ ['scrooloose/nerdcommenter', { 'loadconf' : 1}], - \ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}], \ ['gcmt/wildfire.vim',{'on_map' : '(wildfire-'}], \ ['easymotion/vim-easymotion'], \ ['haya14busa/vim-easyoperator-line'], @@ -35,7 +34,6 @@ function! SpaceVim#layers#edit#config() abort let g:multi_cursor_skip_key=get(g:, 'multi_cursor_skip_key', '') let g:multi_cursor_quit_key=get(g:, 'multi_cursor_quit_key', '') let g:user_emmet_install_global = 0 - let g:user_emmet_leader_key=get(g:, 'user_emmet_leader_key', '') let g:user_emmet_mode='a' let g:user_emmet_settings = { \ 'javascript': { diff --git a/autoload/SpaceVim/layers/lang/html.vim b/autoload/SpaceVim/layers/lang/html.vim index 1a7aee51e..37a2dea6a 100644 --- a/autoload/SpaceVim/layers/lang/html.vim +++ b/autoload/SpaceVim/layers/lang/html.vim @@ -1,11 +1,16 @@ function! SpaceVim#layers#lang#html#plugins() abort - let plugins = [ - \ ['groenewege/vim-less', { 'on_ft' : ['less']}], - \ ['cakebaker/scss-syntax.vim', { 'on_ft' : ['scss','sass']}], - \ ['hail2u/vim-css3-syntax', { 'on_ft' : ['css','scss','sass']}], - \ ['ap/vim-css-color', { 'on_ft' : ['css','scss','sass','less','styl']}], - \ ['othree/html5.vim', { 'on_ft' : ['html']}], - \ ['wavded/vim-stylus', { 'on_ft' : ['stylus']}], - \ ] - return plugins + let plugins = [ + \ ['groenewege/vim-less', { 'on_ft' : ['less']}], + \ ['cakebaker/scss-syntax.vim', { 'on_ft' : ['scss','sass']}], + \ ['hail2u/vim-css3-syntax', { 'on_ft' : ['css','scss','sass']}], + \ ['ap/vim-css-color', { 'on_ft' : ['css','scss','sass','less','styl']}], + \ ['othree/html5.vim', { 'on_ft' : ['html']}], + \ ['wavded/vim-stylus', { 'on_ft' : ['stylus']}], + \ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}], + \ ] + return plugins +endfunction + +function! SpaceVim#layers#lang#html#config() abort + let g:user_emmet_leader_key=get(g:, 'user_emmet_leader_key', '') endfunction diff --git a/docs/layers/lang/html.md b/docs/layers/lang/html.md index 4e5cf011f..a5ab5a188 100644 --- a/docs/layers/lang/html.md +++ b/docs/layers/lang/html.md @@ -1,6 +1,6 @@ --- title: "SpaceVim lang#html layer" -description: "This layer is for html development" +description: "Edit html in SpaceVim, with this layer, this layer provides code completion, syntax checking and code formatting for html." --- # [SpaceVim Layers:](https://spacevim.org/layers) lang#html @@ -11,12 +11,13 @@ description: "This layer is for html development" - [Layer Installation](#layer-installation) - [Language server](#language-server) - [Features](#features) +- [Key bindings](#key-bindings) ## Description -This layer is for html development. +This layer adds support for editing HTML and CSS. ## Layer Installation @@ -32,8 +33,14 @@ npm install --global vscode-html-languageserver-bin ## Features +- Generate HTML and CSS coding using [neosnippet](https://github.com/Shougo/neosnippet.vim/) and [emmet-vim](https://github.com/mattn/emmet-vim) +- Tags navigation on key % using matchit.vim - auto-completion - syntax checking -- goto definition -- refernce finder -- language server protocol (need lsp layer) +- language server protocol (need `lsp` layer) + +## Key bindings + +| key bindings | Description | +| ------------ | ------------ | +| `` | emmet prefix |