From 1a04d364c8745fddf38fa53a33687660a0527c04 Mon Sep 17 00:00:00 2001
From: Rick <rick@gnous.eu>
Date: Sun, 24 Jan 2021 17:20:54 +0100
Subject: [PATCH] =?UTF-8?q?Suppressions=20des=20plugins=20&=20th=C3=A8me?=
=?UTF-8?q?=20pour=20refaire=20avec=20les=20sousmodules?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
autoload/airline/themes/codedark.vim | 120 --
autoload/lightline/colorscheme/codedark.vim | 40 -
base16/schemes/codedark/codedark.yaml | 18 -
.../templates/putty/putty/base16-codedark.reg | 72 -
.../shell/scripts/base16-codedark.sh | 123 --
bundle/vim-doge | 1 -
colors/codedark.vim | 465 -----
doc/emmet.txt | 1745 -----------------
pack/plugins/start/auto-pairs | 1 -
pack/plugins/start/rainbow | 1 -
pack/plugins/start/vim-doge | 1 -
pack/plugins/start/vim-endwise | 1 -
pack/plugins/start/vim-markdown | 1 -
plugin/auto-pairs.vim | 673 -------
plugin/emmet.vim | 177 --
plugin/endwise.vim | 212 --
plugin/ragtag.vim | 571 ------
plugin/rainbow.vim | 163 --
plugin/rainbow_main.vim | 12 -
19 files changed, 4397 deletions(-)
delete mode 100644 autoload/airline/themes/codedark.vim
delete mode 100644 autoload/lightline/colorscheme/codedark.vim
delete mode 100644 base16/schemes/codedark/codedark.yaml
delete mode 100644 base16/templates/putty/putty/base16-codedark.reg
delete mode 100644 base16/templates/shell/scripts/base16-codedark.sh
delete mode 160000 bundle/vim-doge
delete mode 100644 colors/codedark.vim
delete mode 100644 doc/emmet.txt
delete mode 160000 pack/plugins/start/auto-pairs
delete mode 160000 pack/plugins/start/rainbow
delete mode 160000 pack/plugins/start/vim-doge
delete mode 160000 pack/plugins/start/vim-endwise
delete mode 160000 pack/plugins/start/vim-markdown
delete mode 100644 plugin/auto-pairs.vim
delete mode 100644 plugin/emmet.vim
delete mode 100644 plugin/endwise.vim
delete mode 100644 plugin/ragtag.vim
delete mode 100644 plugin/rainbow.vim
delete mode 100644 plugin/rainbow_main.vim
diff --git a/autoload/airline/themes/codedark.vim b/autoload/airline/themes/codedark.vim
deleted file mode 100644
index ec393d8..0000000
--- a/autoload/airline/themes/codedark.vim
+++ /dev/null
@@ -1,120 +0,0 @@
-" Vim Code Dark (airline theme)
-" https://github.com/tomasiser/vim-code-dark
-
-scriptencoding utf-8
-
-let g:airline#themes#codedark#palette = {}
-
-" Terminal colors (base16):
-let s:cterm00 = "00"
-let s:cterm03 = "08"
-let s:cterm05 = "07"
-let s:cterm07 = "15"
-let s:cterm08 = "01"
-let s:cterm0A = "03"
-let s:cterm0B = "02"
-let s:cterm0C = "06"
-let s:cterm0D = "04"
-let s:cterm0E = "05"
-if exists('base16colorspace') && base16colorspace == "256"
- let s:cterm01 = "18"
- let s:cterm02 = "19"
- let s:cterm04 = "20"
- let s:cterm06 = "21"
- let s:cterm09 = "16"
- let s:cterm0F = "17"
-else
- let s:cterm01 = "00"
- let s:cterm02 = "08"
- let s:cterm04 = "07"
- let s:cterm06 = "07"
- let s:cterm09 = "06"
- let s:cterm0F = "03"
-endif
-
-if &t_Co >= 256
- let g:codedark_term256=1
-elseif !exists("g:codedark_term256")
- let g:codedark_term256=0
-endif
-
-let s:cdFront = {'gui': '#FFFFFF', 'cterm': (g:codedark_term256 ? '15' : s:cterm07)}
-let s:cdFrontGray = {'gui': '#D4D4D4', 'cterm': (g:codedark_term256 ? '188' : s:cterm05)}
-let s:cdBack = {'gui': '#1E1E1E', 'cterm': (g:codedark_term256 ? '234' : s:cterm00)}
-let s:cdSelection = {'gui': '#264F78', 'cterm': (g:codedark_term256 ? '24' : s:cterm01)}
-
-let s:cdBlue = {'gui': '#0A7ACA', 'cterm': (g:codedark_term256 ? '32' : s:cterm0D)}
-let s:cdLightBlue = {'gui': '#5CB6F8', 'cterm': (g:codedark_term256 ? '75' : s:cterm0C)}
-let s:cdYellow = {'gui': '#FFAF00', 'cterm': (g:codedark_term256 ? '214' : s:cterm0A)}
-let s:cdRed = {'gui': '#F44747', 'cterm': (g:codedark_term256 ? '203' : s:cterm08)}
-
-let s:cdDarkDarkDark = {'gui': '#262626', 'cterm': (g:codedark_term256 ? '235' : s:cterm01)}
-let s:cdDarkDark = {'gui': '#303030', 'cterm': (g:codedark_term256 ? '236' : s:cterm02)}
-let s:cdDark = {'gui': '#3C3C3C', 'cterm': (g:codedark_term256 ? '237' : s:cterm03)}
-
-let s:Warning = [ s:cdRed.gui, s:cdDarkDark.gui, s:cdRed.cterm, s:cdDarkDark.cterm, 'none']
-
-" Normal:
-
-let s:N1 = [ s:cdFront.gui, s:cdBlue.gui, s:cdFront.cterm, s:cdBlue.cterm, 'none' ]
-let s:N2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
-let s:N3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
-let s:NM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
-
-let g:airline#themes#codedark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
-let g:airline#themes#codedark#palette.normal_modified = { 'airline_c': s:NM }
-let g:airline#themes#codedark#palette.normal.airline_warning = s:Warning
-let g:airline#themes#codedark#palette.normal_modified.airline_warning = s:Warning
-
-" Insert:
-
-let s:I1 = [ s:cdBack.gui, s:cdYellow.gui, s:cdBack.cterm, s:cdYellow.cterm, 'none' ]
-let s:I2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
-let s:I3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
-let s:IM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
-
-let g:airline#themes#codedark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
-let g:airline#themes#codedark#palette.insert_modified = { 'airline_c': s:IM }
-let g:airline#themes#codedark#palette.insert.airline_warning = s:Warning
-let g:airline#themes#codedark#palette.insert_modified.airline_warning = s:Warning
-
-" Replace:
-
-let s:R1 = [ s:cdBack.gui, s:cdYellow.gui, s:cdBack.cterm, s:cdYellow.cterm, 'none' ]
-let s:R2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
-let s:R3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
-let s:RM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
-
-let g:airline#themes#codedark#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
-let g:airline#themes#codedark#palette.replace_modified = { 'airline_c': s:RM }
-let g:airline#themes#codedark#palette.replace.airline_warning = s:Warning
-let g:airline#themes#codedark#palette.replace_modified.airline_warning = s:Warning
-
-" Visual:
-
-let s:V1 = [ s:cdLightBlue.gui, s:cdDark.gui, s:cdLightBlue.cterm, s:cdDark.cterm, 'none' ]
-let s:V2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
-let s:V3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
-let s:VM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
-
-let g:airline#themes#codedark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
-let g:airline#themes#codedark#palette.visual_modified = { 'airline_c': s:VM }
-let g:airline#themes#codedark#palette.visual.airline_warning = s:Warning
-let g:airline#themes#codedark#palette.visual_modified.airline_warning = s:Warning
-
-" Inactive:
-
-let s:IA1 = [ s:cdFrontGray.gui, s:cdDark.gui, s:cdFrontGray.cterm, s:cdDark.cterm, 'none' ]
-let s:IA2 = [ s:cdFrontGray.gui, s:cdDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDark.cterm, 'none' ]
-let s:IA3 = [ s:cdFrontGray.gui, s:cdDarkDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDarkDark.cterm, 'none' ]
-let s:IAM = [ s:cdFrontGray.gui, s:cdDarkDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDarkDark.cterm, 'none' ]
-
-let g:airline#themes#codedark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
-let g:airline#themes#codedark#palette.inactive_modified = { 'airline_c': s:IAM }
-
-" Red accent for readonly:
-
-let g:airline#themes#codedark#palette.accents = {
- \ 'red': [ s:cdRed.gui, '', s:cdRed.cterm, '' ]
- \ }
-
diff --git a/autoload/lightline/colorscheme/codedark.vim b/autoload/lightline/colorscheme/codedark.vim
deleted file mode 100644
index 881ea70..0000000
--- a/autoload/lightline/colorscheme/codedark.vim
+++ /dev/null
@@ -1,40 +0,0 @@
-" =============================================================================
-" Filename: autoload/lightline/colorscheme/codedark.vim
-" Author: artanikin
-" License: MIT License
-" Last Change: 2019/12/05 12:26:00
-" =============================================================================
-
-let s:term_red = 204
-let s:term_green = 114
-let s:term_yellow = 180
-let s:term_blue = 39
-let s:term_purple = 170
-let s:term_white = 145
-let s:term_black = 235
-let s:term_grey = 236
-
-let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
-
-let s:p.normal.left = [ [ '#262626', '#608B4E', s:term_black, s:term_green, 'bold' ], [ '#608B4E', '#262626', s:term_green, s:term_black ] ]
-let s:p.normal.right = [ [ '#262626', '#608B4E', s:term_black, s:term_green ], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ], [ '#608B4E', '#262626', s:term_green, s:term_black ] ]
-let s:p.inactive.right = [ [ '#262626', '#569CD6', s:term_black, s:term_blue], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ] ]
-let s:p.inactive.left = s:p.inactive.right[1:]
-" her
-let s:p.insert.left = [ [ '#262626', '#569CD6', s:term_black, s:term_blue, 'bold' ], [ '#569CD6', '#262626', s:term_blue, s:term_black ] ]
-let s:p.insert.right = [ [ '#262626', '#569CD6', s:term_black, s:term_blue ], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ], [ '#569CD6', '#262626', s:term_blue, s:term_black ] ]
-let s:p.replace.left = [ [ '#262626', '#D16969', s:term_black, s:term_red, 'bold' ], [ '#D16969', '#262626', s:term_red, s:term_black ] ]
-let s:p.replace.right = [ [ '#262626', '#D16969', s:term_black, s:term_red, 'bold' ], s:p.normal.right[1], [ '#D16969', '#262626', s:term_red, s:term_black ] ]
-let s:p.visual.left = [ [ '#262626', '#C586C0', s:term_black, s:term_purple, 'bold' ], [ '#C586C0', '#262626', s:term_purple, s:term_black ] ]
-let s:p.visual.right = [ [ '#262626', '#C586C0', s:term_black, s:term_purple, 'bold' ], s:p.normal.right[1], [ '#C586C0', '#262626', s:term_purple, s:term_black ] ]
-let s:p.normal.middle = [ [ '#D4D4D4', '#262626', s:term_white, s:term_black ] ]
-let s:p.insert.middle = s:p.normal.middle
-let s:p.replace.middle = s:p.normal.middle
-let s:p.tabline.left = [ s:p.normal.left[1] ]
-let s:p.tabline.tabsel = [ s:p.normal.left[0] ]
-let s:p.tabline.middle = s:p.normal.middle
-let s:p.tabline.right = [ s:p.normal.left[1] ]
-let s:p.normal.error = [ [ '#262626', '#D16969', s:term_black, s:term_red ] ]
-let s:p.normal.warning = [ [ '#262626', '#D7BA7D', s:term_black, s:term_yellow ] ]
-
-let g:lightline#colorscheme#codedark#palette = lightline#colorscheme#fill(s:p)
diff --git a/base16/schemes/codedark/codedark.yaml b/base16/schemes/codedark/codedark.yaml
deleted file mode 100644
index 103598c..0000000
--- a/base16/schemes/codedark/codedark.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-scheme: "codedark"
-author: "Tomas Iser (https://github.com/tomasiser)"
-base00: "1E1E1E"
-base01: "262626"
-base02: "303030"
-base03: "3C3C3C"
-base04: "808080"
-base05: "D4D4D4"
-base06: "E9E9E9"
-base07: "FFFFFF"
-base08: "D16969"
-base09: "B5CEA8"
-base0A: "D7BA7D"
-base0B: "608B4E"
-base0C: "9CDCFE"
-base0D: "569CD6"
-base0E: "C586C0"
-base0F: "CE9178"
diff --git a/base16/templates/putty/putty/base16-codedark.reg b/base16/templates/putty/putty/base16-codedark.reg
deleted file mode 100644
index 5b74f3a..0000000
--- a/base16/templates/putty/putty/base16-codedark.reg
+++ /dev/null
@@ -1,72 +0,0 @@
-Windows Registry Editor Version 5.00
-
-; Base16 codedark
-; schema by Tomas Iser (https://github.com/tomasiser)
-[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\codedark]
-
-; Default Foreground
-"Colour0"="212,212,212"
-
-; Default Bold Foreground -- equals to non-bold
-"Colour1"="212,212,212"
-
-; Default Background
-"Colour2"="30,30,30"
-
-; Default Bold Background -- equals to non-bold
-"Colour3"="30,30,30"
-
-; Cursor Text -- equals to default background
-"Colour4"="30,30,30"
-
-; Cursor Colour -- equals to default foreground
-"Colour5"="212,212,212"
-
-; ANSI Black
-"Colour6"="30,30,30"
-
-; ANSI Black Bold
-"Colour7"="60,60,60"
-
-; ANSI Red
-"Colour8"="209,105,105"
-
-; ANSI Red Bold
-"Colour9"="181,206,168"
-
-; ANSI Green
-"Colour10"="96,139,78"
-
-; ANSI Green Bold
-"Colour11"="38,38,38"
-
-; ANSI Yellow
-"Colour12"="215,186,125"
-
-; ANSI Yellow Bold
-"Colour13"="48,48,48"
-
-; ANSI Blue
-"Colour14"="86,156,214"
-
-; ANSI Blue Bold
-"Colour15"="128,128,128"
-
-; ANSI Magenta
-"Colour16"="197,134,192"
-
-; ANSI Magenta Bold
-"Colour17"="233,233,233"
-
-; ANSI Cyan
-"Colour18"="156,220,254"
-
-; ANSI Cyan Bold
-"Colour19"="206,145,120"
-
-; ANSI White
-"Colour20"="212,212,212"
-
-; ANSI White Bold
-"Colour21"="255,255,255"
-
diff --git a/base16/templates/shell/scripts/base16-codedark.sh b/base16/templates/shell/scripts/base16-codedark.sh
deleted file mode 100644
index ec2c545..0000000
--- a/base16/templates/shell/scripts/base16-codedark.sh
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/bin/sh
-# base16-shell (https://github.com/chriskempson/base16-shell)
-# Base16 Shell template by Chris Kempson (http://chriskempson.com)
-# codedark scheme by Tomas Iser (https://github.com/tomasiser)
-
-# This script doesn't support linux console (use 'vconsole' template instead)
-if [ "${TERM%%-*}" = 'linux' ]; then
- return 2>/dev/null || exit 0
-fi
-
-color00="1E/1E/1E" # Base 00 - Black
-color01="D1/69/69" # Base 08 - Red
-color02="60/8B/4E" # Base 0B - Green
-color03="D7/BA/7D" # Base 0A - Yellow
-color04="56/9C/D6" # Base 0D - Blue
-color05="C5/86/C0" # Base 0E - Magenta
-color06="9C/DC/FE" # Base 0C - Cyan
-color07="D4/D4/D4" # Base 05 - White
-color08="3C/3C/3C" # Base 03 - Bright Black
-color09=$color01 # Base 08 - Bright Red
-color10=$color02 # Base 0B - Bright Green
-color11=$color03 # Base 0A - Bright Yellow
-color12=$color04 # Base 0D - Bright Blue
-color13=$color05 # Base 0E - Bright Magenta
-color14=$color06 # Base 0C - Bright Cyan
-color15="FF/FF/FF" # Base 07 - Bright White
-color16="B5/CE/A8" # Base 09
-color17="CE/91/78" # Base 0F
-color18="26/26/26" # Base 01
-color19="30/30/30" # Base 02
-color20="80/80/80" # Base 04
-color21="E9/E9/E9" # Base 06
-color_foreground="D4/D4/D4" # Base 05
-color_background="1E/1E/1E" # Base 00
-color_cursor="D4/D4/D4" # Base 05
-
-if [ -n "$TMUX" ]; then
- # Tell tmux to pass the escape sequences through
- # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
- printf_template='\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\'
- printf_template_var='\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\'
- printf_template_custom='\033Ptmux;\033\033]%s%s\033\033\\\033\\'
-elif [ "${TERM%%-*}" = "screen" ]; then
- # GNU screen (screen, screen-256color, screen-256color-bce)
- printf_template='\033P\033]4;%d;rgb:%s\033\\'
- printf_template_var='\033P\033]%d;rgb:%s\033\\'
- printf_template_custom='\033P\033]%s%s\033\\'
-else
- printf_template='\033]4;%d;rgb:%s\033\\'
- printf_template_var='\033]%d;rgb:%s\033\\'
- printf_template_custom='\033]%s%s\033\\'
-fi
-
-# 16 color space
-printf $printf_template 0 $color00
-printf $printf_template 1 $color01
-printf $printf_template 2 $color02
-printf $printf_template 3 $color03
-printf $printf_template 4 $color04
-printf $printf_template 5 $color05
-printf $printf_template 6 $color06
-printf $printf_template 7 $color07
-printf $printf_template 8 $color08
-printf $printf_template 9 $color09
-printf $printf_template 10 $color10
-printf $printf_template 11 $color11
-printf $printf_template 12 $color12
-printf $printf_template 13 $color13
-printf $printf_template 14 $color14
-printf $printf_template 15 $color15
-
-# 256 color space
-printf $printf_template 16 $color16
-printf $printf_template 17 $color17
-printf $printf_template 18 $color18
-printf $printf_template 19 $color19
-printf $printf_template 20 $color20
-printf $printf_template 21 $color21
-
-# foreground / background / cursor color
-if [ -n "$ITERM_SESSION_ID" ]; then
- # iTerm2 proprietary escape codes
- printf $printf_template_custom Pg D4D4D4 # forground
- printf $printf_template_custom Ph 1E1E1E # background
- printf $printf_template_custom Pi D4D4D4 # bold color
- printf $printf_template_custom Pj 303030 # selection color
- printf $printf_template_custom Pk D4D4D4 # selected text color
- printf $printf_template_custom Pl D4D4D4 # cursor
- printf $printf_template_custom Pm 1E1E1E # cursor text
-else
- printf $printf_template_var 10 $color_foreground
- printf $printf_template_var 11 $color_background
- printf $printf_template_custom 12 ";7" # cursor (reverse video)
-fi
-
-# clean up
-unset printf_template
-unset printf_template_var
-unset color00
-unset color01
-unset color02
-unset color03
-unset color04
-unset color05
-unset color06
-unset color07
-unset color08
-unset color09
-unset color10
-unset color11
-unset color12
-unset color13
-unset color14
-unset color15
-unset color16
-unset color17
-unset color18
-unset color19
-unset color20
-unset color21
-unset color_foreground
-unset color_background
-unset color_cursor
diff --git a/bundle/vim-doge b/bundle/vim-doge
deleted file mode 160000
index 1aba70d..0000000
--- a/bundle/vim-doge
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 1aba70d1d2ff408045f8d57eec0b8103da5d2db9
diff --git a/colors/codedark.vim b/colors/codedark.vim
deleted file mode 100644
index 169f591..0000000
--- a/colors/codedark.vim
+++ /dev/null
@@ -1,465 +0,0 @@
-" Vim Code Dark (color scheme)
-" https://github.com/tomasiser/vim-code-dark
-
-scriptencoding utf-8
-
-set background=dark
-hi clear
-if exists("syntax_on")
- syntax reset
-endif
-let g:colors_name="codedark"
-
-" Highlighting function (inspiration from https://github.com/chriskempson/base16-vim)
-if &t_Co >= 256
- let g:codedark_term256=1
-elseif !exists("g:codedark_term256")
- let g:codedark_term256=0
-endif
-fun! <sid>hi(group, fg, bg, attr, sp)
- if !empty(a:fg)
- exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . (g:codedark_term256 ? a:fg.cterm256 : a:fg.cterm)
- endif
- if !empty(a:bg)
- exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . (g:codedark_term256 ? a:bg.cterm256 : a:bg.cterm)
- endif
- if a:attr != ""
- exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
- endif
- if !empty(a:sp)
- exec "hi " . a:group . " guisp=" . a:sp.gui
- endif
-endfun
-
-" ------------------
-" Color definitions:
-" ------------------
-
-" Terminal colors (base16):
-let s:cterm00 = "00"
-let s:cterm03 = "08"
-let s:cterm05 = "07"
-let s:cterm07 = "15"
-let s:cterm08 = "01"
-let s:cterm0A = "03"
-let s:cterm0B = "02"
-let s:cterm0C = "06"
-let s:cterm0D = "04"
-let s:cterm0E = "05"
-if exists('base16colorspace') && base16colorspace == "256"
- let s:cterm01 = "18"
- let s:cterm02 = "19"
- let s:cterm04 = "20"
- let s:cterm06 = "21"
- let s:cterm09 = "16"
- let s:cterm0F = "17"
-else
- let s:cterm01 = "00"
- let s:cterm02 = "08"
- let s:cterm04 = "07"
- let s:cterm06 = "07"
- let s:cterm09 = "06"
- let s:cterm0F = "03"
-endif
-
-" General appearance colors:
-" (some of them may be unused)
-
-let s:cdNone = {'gui': 'NONE', 'cterm': 'NONE', 'cterm256': 'NONE'}
-let s:cdFront = {'gui': '#D4D4D4', 'cterm': s:cterm05, 'cterm256': '188'}
-let s:cdBack = {'gui': '#1E1E1E', 'cterm': s:cterm00, 'cterm256': '234'}
-
-let s:cdTabCurrent = {'gui': '#1E1E1E', 'cterm': s:cterm00, 'cterm256': '234'}
-let s:cdTabOther = {'gui': '#2D2D2D', 'cterm': s:cterm01, 'cterm256': '236'}
-let s:cdTabOutside = {'gui': '#252526', 'cterm': s:cterm01, 'cterm256': '235'}
-
-let s:cdLeftDark = {'gui': '#252526', 'cterm': s:cterm01, 'cterm256': '235'}
-let s:cdLeftMid = {'gui': '#373737', 'cterm': s:cterm03, 'cterm256': '237'}
-let s:cdLeftLight = {'gui': '#3F3F46', 'cterm': s:cterm03, 'cterm256': '238'}
-
-let s:cdPopupFront = {'gui': '#BBBBBB', 'cterm': s:cterm06, 'cterm256': '250'}
-let s:cdPopupBack = {'gui': '#2D2D30', 'cterm': s:cterm01, 'cterm256': '236'}
-let s:cdPopupHighlightBlue = {'gui': '#073655', 'cterm': s:cterm0D, 'cterm256': '24'}
-let s:cdPopupHighlightGray = {'gui': '#3D3D40', 'cterm': s:cterm03, 'cterm256': '237'}
-
-let s:cdSplitLight = {'gui': '#898989', 'cterm': s:cterm04, 'cterm256': '245'}
-let s:cdSplitDark = {'gui': '#444444', 'cterm': s:cterm03, 'cterm256': '238'}
-let s:cdSplitThumb = {'gui': '#424242', 'cterm': s:cterm04, 'cterm256': '238'}
-
-let s:cdCursorDarkDark = {'gui': '#222222', 'cterm': s:cterm01, 'cterm256': '235'}
-let s:cdCursorDark = {'gui': '#51504F', 'cterm': s:cterm03, 'cterm256': '239'}
-let s:cdCursorLight = {'gui': '#AEAFAD', 'cterm': s:cterm04, 'cterm256': '145'}
-let s:cdSelection = {'gui': '#264F78', 'cterm': s:cterm03, 'cterm256': '24'}
-let s:cdLineNumber = {'gui': '#5A5A5A', 'cterm': s:cterm04, 'cterm256': '240'}
-
-let s:cdDiffRedDark = {'gui': '#4B1818', 'cterm': s:cterm08, 'cterm256': '52'}
-let s:cdDiffRedLight = {'gui': '#6F1313', 'cterm': s:cterm08, 'cterm256': '52'}
-let s:cdDiffRedLightLight = {'gui': '#FB0101', 'cterm': s:cterm08, 'cterm256': '09'}
-let s:cdDiffGreenDark = {'gui': '#373D29', 'cterm': s:cterm0B, 'cterm256': '237'}
-let s:cdDiffGreenLight = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'}
-
-let s:cdSearchCurrent = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'}
-let s:cdSearch = {'gui': '#264F78', 'cterm': s:cterm03, 'cterm256': '24'}
-
-" Syntax colors:
-
-if !exists("g:codedark_conservative")
- let g:codedark_conservative=0
-endif
-
-let s:cdGray = {'gui': '#808080', 'cterm': s:cterm04, 'cterm256': '08'}
-let s:cdViolet = {'gui': '#646695', 'cterm': s:cterm04, 'cterm256': '60'}
-let s:cdBlue = {'gui': '#569CD6', 'cterm': s:cterm0D, 'cterm256': '75'}
-let s:cdDarkBlue = {'gui': '#223E55', 'cterm': s:cterm0D, 'cterm256': '73'}
-let s:cdLightBlue = {'gui': '#9CDCFE', 'cterm': s:cterm0C, 'cterm256': '117'}
-if g:codedark_conservative | let s:cdLightBlue = s:cdFront | endif
-let s:cdGreen = {'gui': '#6A9955', 'cterm': s:cterm0B, 'cterm256': '65'}
-let s:cdBlueGreen = {'gui': '#4EC9B0', 'cterm': s:cterm0F, 'cterm256': '43'}
-let s:cdLightGreen = {'gui': '#B5CEA8', 'cterm': s:cterm09, 'cterm256': '151'}
-let s:cdRed = {'gui': '#F44747', 'cterm': s:cterm08, 'cterm256': '203'}
-let s:cdOrange = {'gui': '#CE9178', 'cterm': s:cterm0F, 'cterm256': '173'}
-let s:cdLightRed = {'gui': '#D16969', 'cterm': s:cterm08, 'cterm256': '167'}
-if g:codedark_conservative | let s:cdLightRed = s:cdOrange | endif
-let s:cdYellowOrange = {'gui': '#D7BA7D', 'cterm': s:cterm0A, 'cterm256': '179'}
-let s:cdYellow = {'gui': '#DCDCAA', 'cterm': s:cterm0A, 'cterm256': '187'}
-if g:codedark_conservative | let s:cdYellow = s:cdFront | endif
-let s:cdPink = {'gui': '#C586C0', 'cterm': s:cterm0E, 'cterm256': '176'}
-if g:codedark_conservative | let s:cdPink = s:cdBlue | endif
-
-" Vim editor colors
-" <sid>hi(GROUP, FOREGROUND, BACKGROUND, ATTRIBUTE, SPECIAL)
-call <sid>hi('Normal', s:cdFront, s:cdBack, 'none', {})
-call <sid>hi('ColorColumn', {}, s:cdCursorDarkDark, 'none', {})
-call <sid>hi('Cursor', s:cdCursorDark, s:cdCursorLight, 'none', {})
-call <sid>hi('CursorLine', {}, s:cdCursorDarkDark, 'none', {})
-call <sid>hi('CursorColumn', {}, s:cdCursorDarkDark, 'none', {})
-call <sid>hi('Directory', s:cdBlue, s:cdBack, 'none', {})
-call <sid>hi('DiffAdd', {}, s:cdDiffGreenDark, 'none', {})
-call <sid>hi('DiffChange', {}, s:cdDiffRedDark, 'none', {})
-call <sid>hi('DiffDelete', {}, s:cdDiffRedLight, 'none', {})
-call <sid>hi('DiffText', {}, s:cdDiffRedLight, 'none', {})
-call <sid>hi('EndOfBuffer', s:cdLineNumber, s:cdBack, 'none', {})
-call <sid>hi('ErrorMsg', s:cdRed, s:cdBack, 'none', {})
-call <sid>hi('VertSplit', s:cdSplitDark, s:cdBack, 'none', {})
-call <sid>hi('Folded', s:cdLeftLight, s:cdLeftDark, 'underline', {})
-call <sid>hi('FoldColumn', s:cdLineNumber, s:cdBack, 'none', {})
-call <sid>hi('SignColumn', {}, s:cdBack, 'none', {})
-call <sid>hi('IncSearch', s:cdNone, s:cdSearchCurrent, 'none', {})
-call <sid>hi('LineNr', s:cdLineNumber, s:cdBack, 'none', {})
-call <sid>hi('CursorLineNr', s:cdPopupFront, s:cdBack, 'none', {})
-call <sid>hi('MatchParen', s:cdNone, s:cdCursorDark, 'none', {})
-call <sid>hi('ModeMsg', s:cdFront, s:cdLeftDark, 'none', {})
-call <sid>hi('MoreMsg', s:cdFront, s:cdLeftDark, 'none', {})
-call <sid>hi('NonText', s:cdLineNumber, s:cdBack, 'none', {})
-call <sid>hi('Pmenu', s:cdPopupFront, s:cdPopupBack, 'none', {})
-call <sid>hi('PmenuSel', s:cdPopupFront, s:cdPopupHighlightBlue, 'none', {})
-call <sid>hi('PmenuSbar', {}, s:cdPopupHighlightGray, 'none', {})
-call <sid>hi('PmenuThumb', {}, s:cdPopupFront, 'none', {})
-call <sid>hi('Question', s:cdBlue, s:cdBack, 'none', {})
-call <sid>hi('Search', s:cdNone, s:cdSearch, 'none', {})
-call <sid>hi('SpecialKey', s:cdBlue, s:cdNone, 'none', {})
-call <sid>hi('StatusLine', s:cdFront, s:cdLeftMid, 'none', {})
-call <sid>hi('StatusLineNC', s:cdFront, s:cdLeftDark, 'none', {})
-call <sid>hi('TabLine', s:cdFront, s:cdTabOther, 'none', {})
-call <sid>hi('TabLineFill', s:cdFront, s:cdTabOutside, 'none', {})
-call <sid>hi('TabLineSel', s:cdFront, s:cdTabCurrent, 'none', {})
-call <sid>hi('Title', s:cdNone, s:cdNone, 'bold', {})
-call <sid>hi('Visual', s:cdNone, s:cdSelection, 'none', {})
-call <sid>hi('VisualNOS', s:cdNone, s:cdSelection, 'none', {})
-call <sid>hi('WarningMsg', s:cdOrange, s:cdBack, 'none', {})
-call <sid>hi('WildMenu', s:cdNone, s:cdSelection, 'none', {})
-
-call <sid>hi('Comment', s:cdGreen, {}, 'none', {})
-
-call <sid>hi('Constant', s:cdBlue, {}, 'none', {})
-call <sid>hi('String', s:cdOrange, {}, 'none', {})
-call <sid>hi('Character', s:cdOrange, {}, 'none', {})
-call <sid>hi('Number', s:cdLightGreen, {}, 'none', {})
-call <sid>hi('Boolean', s:cdBlue, {}, 'none', {})
-call <sid>hi('Float', s:cdLightGreen, {}, 'none', {})
-
-call <sid>hi('Identifier', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('Function', s:cdYellow, {}, 'none', {})
-
-call <sid>hi('Statement', s:cdPink, {}, 'none', {})
-call <sid>hi('Conditional', s:cdPink, {}, 'none', {})
-call <sid>hi('Repeat', s:cdPink, {}, 'none', {})
-call <sid>hi('Label', s:cdPink, {}, 'none', {})
-call <sid>hi('Operator', s:cdFront, {}, 'none', {})
-call <sid>hi('Keyword', s:cdPink, {}, 'none', {})
-call <sid>hi('Exception', s:cdPink, {}, 'none', {})
-
-call <sid>hi('PreProc', s:cdPink, {}, 'none', {})
-call <sid>hi('Include', s:cdPink, {}, 'none', {})
-call <sid>hi('Define', s:cdPink, {}, 'none', {})
-call <sid>hi('Macro', s:cdPink, {}, 'none', {})
-call <sid>hi('PreCondit', s:cdPink, {}, 'none', {})
-
-call <sid>hi('Type', s:cdBlue, {}, 'none', {})
-call <sid>hi('StorageClass', s:cdBlue, {}, 'none', {})
-call <sid>hi('Structure', s:cdBlue, {}, 'none', {})
-call <sid>hi('Typedef', s:cdBlue, {}, 'none', {})
-
-call <sid>hi('Special', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('SpecialChar', s:cdFront, {}, 'none', {})
-call <sid>hi('Tag', s:cdFront, {}, 'none', {})
-call <sid>hi('Delimiter', s:cdFront, {}, 'none', {})
-call <sid>hi('SpecialComment', s:cdGreen, {}, 'none', {})
-call <sid>hi('Debug', s:cdFront, {}, 'none', {})
-
-call <sid>hi('Underlined', s:cdNone, {}, 'underline', {})
-call <sid>hi("Conceal", s:cdFront, s:cdBack, 'none', {})
-
-call <sid>hi('Ignore', s:cdFront, {}, 'none', {})
-
-call <sid>hi('Error', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
-
-call <sid>hi('Todo', s:cdNone, s:cdLeftMid, 'none', {})
-
-call <sid>hi('SpellBad', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
-call <sid>hi('SpellCap', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
-call <sid>hi('SpellRare', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
-call <sid>hi('SpellLocal', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
-
-" Markdown:
-call <sid>hi('markdownBold', s:cdBlue, {}, 'bold', {})
-call <sid>hi('markdownCode', s:cdOrange, {}, 'none', {})
-call <sid>hi('markdownRule', s:cdBlue, {}, 'bold', {})
-call <sid>hi('markdownCodeDelimiter', s:cdOrange, {}, 'none', {})
-call <sid>hi('markdownHeadingDelimiter', s:cdBlue, {}, 'none', {})
-call <sid>hi('markdownFootnote', s:cdOrange, {}, 'none', {})
-call <sid>hi('markdownFootnoteDefinition', s:cdOrange, {}, 'none', {})
-call <sid>hi('markdownUrl', s:cdLightBlue, {}, 'underline', {})
-call <sid>hi('markdownLinkText', s:cdOrange, {}, 'none', {})
-call <sid>hi('markdownEscape', s:cdYellowOrange, {}, 'none', {})
-
-" JSON:
-call <sid>hi('jsonKeyword', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsonEscape', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('jsonNull', s:cdBlue, {}, 'none', {})
-call <sid>hi('jsonBoolean', s:cdBlue, {}, 'none', {})
-
-" HTML:
-call <sid>hi('htmlTag', s:cdGray, {}, 'none', {})
-call <sid>hi('htmlEndTag', s:cdGray, {}, 'none', {})
-call <sid>hi('htmlTagName', s:cdBlue, {}, 'none', {})
-call <sid>hi('htmlSpecialTagName', s:cdBlue, {}, 'none', {})
-call <sid>hi('htmlArg', s:cdLightBlue, {}, 'none', {})
-
-" PHP:
-call <sid>hi('phpStaticClasses', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('phpMethod', s:cdYellow, {}, 'none', {})
-call <sid>hi('phpClass', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('phpFunction', s:cdYellow, {}, 'none', {})
-call <sid>hi('phpInclude', s:cdBlue, {}, 'none', {})
-call <sid>hi('phpUseClass', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('phpRegion', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('phpMethodsVar', s:cdLightBlue, {}, 'none', {})
-
-" CSS:
-call <sid>hi('cssBraces', s:cdFront, {}, 'none', {})
-call <sid>hi('cssInclude', s:cdPink, {}, 'none', {})
-call <sid>hi('cssTagName', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('cssClassName', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('cssPseudoClass', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('cssPseudoClassId', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('cssPseudoClassLang', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('cssIdentifier', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('cssProp', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('cssDefinition', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('cssAttr', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssAttrRegion', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssColor', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssFunction', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssFunctionName', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssVendor', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssValueNumber', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssValueLength', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssUnitDecorators', s:cdOrange, {}, 'none', {})
-call <sid>hi('cssStyle', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('cssImportant', s:cdBlue, {}, 'none', {})
-
-" JavaScript:
-call <sid>hi('jsVariableDef', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsFuncArgs', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsFuncBlock', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsRegexpString', s:cdLightRed, {}, 'none', {})
-call <sid>hi('jsThis', s:cdBlue, {}, 'none', {})
-call <sid>hi('jsOperatorKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('jsDestructuringBlock', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsObjectKey', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsGlobalObjects', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('jsModuleKeyword', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsClassDefinition', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('jsClassKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('jsExtendsKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('jsExportDefault', s:cdPink, {}, 'none', {})
-call <sid>hi('jsFuncCall', s:cdYellow, {}, 'none', {})
-call <sid>hi('jsObjectValue', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsParen', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsObjectProp', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsIfElseBlock', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsParenIfElse', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsSpreadOperator', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('jsSpreadExpression', s:cdLightBlue, {}, 'none', {})
-
-" Typescript:
-call <sid>hi('typescriptLabel', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptExceptions', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptBraces', s:cdFront, {}, 'none', {})
-call <sid>hi('typescriptEndColons', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptParens', s:cdFront, {}, 'none', {})
-call <sid>hi('typescriptDocTags', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptDocComment', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptLogicSymbols', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptImport', s:cdPink, {}, 'none', {})
-call <sid>hi('typescriptBOM', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptVariableDeclaration', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptVariable', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptExport', s:cdPink, {}, 'none', {})
-call <sid>hi('typescriptAliasDeclaration', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptAliasKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptClassName', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptAccessibilityModifier', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptOperator', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptArrowFunc', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptMethodAccessor', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptMember', s:cdYellow, {}, 'none', {})
-call <sid>hi('typescriptTypeReference', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptDefault', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptTemplateSB', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('typescriptArrowFuncArg', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptParamImpl', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptFuncComma', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptCastKeyword', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptCall', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptCase', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptReserved', s:cdPink, {}, 'none', {})
-call <sid>hi('typescriptDefault', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptDecorator', s:cdYellow, {}, 'none', {})
-call <sid>hi('typescriptPredefinedType', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptClassHeritage', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptClassExtends', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptClassKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptBlock', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptDOMDocProp', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptTemplateSubstitution', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptClassBlock', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptFuncCallArg', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptIndexExpr', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptConditionalParen', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptArray', s:cdYellow, {}, 'none', {})
-call <sid>hi('typescriptES6SetProp', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptObjectLiteral', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptTypeParameter', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptEnumKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptEnum', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptLoopParen', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptParenExp', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptModule', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('typescriptAmbientDeclaration', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptModule', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptFuncTypeArrow', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptInterfaceHeritage', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptInterfaceName', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptInterfaceKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptInterfaceExtends', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptGlobal', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('typescriptAsyncFuncKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptFuncKeyword', s:cdBlue, {}, 'none', {})
-call <sid>hi('typescriptGlobalMethod', s:cdYellow, {}, 'none', {})
-call <sid>hi('typescriptPromiseMethod', s:cdYellow, {}, 'none', {})
-
-" XML:
-call <sid>hi('xmlTag', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('xmlTagName', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('xmlEndTag', s:cdBlueGreen, {}, 'none', {})
-
-" Ruby:
-call <sid>hi('rubyClassNameTag', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('rubyClassName', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('rubyModuleName', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('rubyConstant', s:cdBlueGreen, {}, 'none', {})
-
-" Golang:
-call <sid>hi('goPackage', s:cdBlue, {}, 'none', {})
-call <sid>hi('goImport', s:cdBlue, {}, 'none', {})
-call <sid>hi('goVar', s:cdBlue, {}, 'none', {})
-call <sid>hi('goConst', s:cdBlue, {}, 'none', {})
-call <sid>hi('goStatement', s:cdPink, {}, 'none', {})
-call <sid>hi('goType', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('goSignedInts', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('goUnsignedInts', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('goFloats', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('goComplexes', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('goBuiltins', s:cdYellow, {}, 'none', {})
-call <sid>hi('goBoolean', s:cdBlue, {}, 'none', {})
-call <sid>hi('goPredefinedIdentifiers', s:cdBlue, {}, 'none', {})
-call <sid>hi('goTodo', s:cdGreen, {}, 'none', {})
-call <sid>hi('goDeclaration', s:cdBlue, {}, 'none', {})
-call <sid>hi('goDeclType', s:cdBlue, {}, 'none', {})
-call <sid>hi('goTypeDecl', s:cdBlue, {}, 'none', {})
-call <sid>hi('goTypeName', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('goVarAssign', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('goVarDefs', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('goReceiver', s:cdFront, {}, 'none', {})
-call <sid>hi('goReceiverType', s:cdFront, {}, 'none', {})
-call <sid>hi('goFunctionCall', s:cdYellow, {}, 'none', {})
-call <sid>hi('goMethodCall', s:cdYellow, {}, 'none', {})
-call <sid>hi('goSingleDecl', s:cdLightBlue, {}, 'none', {})
-
-" Python:
-call <sid>hi('pythonStatement', s:cdBlue, {}, 'none', {})
-call <sid>hi('pythonOperator', s:cdBlue, {}, 'none', {})
-call <sid>hi('pythonException', s:cdPink, {}, 'none', {})
-call <sid>hi('pythonExClass', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('pythonBuiltinObj', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('pythonBuiltinType', s:cdBlueGreen, {}, 'none', {})
-call <sid>hi('pythonBoolean', s:cdBlue, {}, 'none', {})
-call <sid>hi('pythonNone', s:cdBlue, {}, 'none', {})
-call <sid>hi('pythonTodo', s:cdBlue, {}, 'none', {})
-call <sid>hi('pythonClassVar', s:cdBlue, {}, 'none', {})
-call <sid>hi('pythonClassDef', s:cdBlueGreen, {}, 'none', {})
-
-" TeX:
-call <sid>hi('texStatement', s:cdBlue, {}, 'none', {})
-call <sid>hi('texBeginEnd', s:cdYellow, {}, 'none', {})
-call <sid>hi('texBeginEndName', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('texOption', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('texBeginEndModifier', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('texDocType', s:cdPink, {}, 'none', {})
-call <sid>hi('texDocTypeArgs', s:cdLightBlue, {}, 'none', {})
-
-" Git:
-call <sid>hi('gitcommitHeader', s:cdGray, {}, 'none', {})
-call <sid>hi('gitcommitOnBranch', s:cdGray, {}, 'none', {})
-call <sid>hi('gitcommitBranch', s:cdPink, {}, 'none', {})
-call <sid>hi('gitcommitComment', s:cdGray, {}, 'none', {})
-call <sid>hi('gitcommitSelectedType', s:cdGreen, {}, 'none', {})
-call <sid>hi('gitcommitSelectedFile', s:cdGreen, {}, 'none', {})
-call <sid>hi('gitcommitDiscardedType', s:cdRed, {}, 'none', {})
-call <sid>hi('gitcommitDiscardedFile', s:cdRed, {}, 'none', {})
-call <sid>hi('gitcommitOverflow', s:cdRed, {}, 'none', {})
-call <sid>hi('gitcommitSummary', s:cdPink, {}, 'none', {})
-call <sid>hi('gitcommitBlank', s:cdPink, {}, 'none', {})
-
-" Lua:
-call <sid>hi('luaFuncCall', s:cdYellow, {}, 'none', {})
-call <sid>hi('luaFuncArgName', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('luaFuncKeyword', s:cdPink, {}, 'none', {})
-call <sid>hi('luaLocal', s:cdPink, {}, 'none', {})
-call <sid>hi('luaBuiltIn', s:cdBlue, {}, 'none', {})
-
-" SH:
-call <sid>hi('shDeref', s:cdLightBlue, {}, 'none', {})
-call <sid>hi('shVariable', s:cdLightBlue, {}, 'none', {})
-
-" SQL:
-call <sid>hi('sqlKeyword', s:cdPink, {}, 'none', {})
-call <sid>hi('sqlFunction', s:cdYellowOrange, {}, 'none', {})
-call <sid>hi('sqlOperator', s:cdPink, {}, 'none', {})
-
-" YAML:
-call <sid>hi('yamlKey', s:cdBlue, {}, 'none', {})
-call <sid>hi('yamlConstant', s:cdBlue, {}, 'none', {})
-
diff --git a/doc/emmet.txt b/doc/emmet.txt
deleted file mode 100644
index dcaf776..0000000
--- a/doc/emmet.txt
+++ /dev/null
@@ -1,1745 +0,0 @@
-*emmet.txt* *Emmet* for Vim
-
- -------------------------------------------------------
- Emmet: vim plugins for HTML and CSS hi-speed coding
- -------------------------------------------------------
-
-Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
-WebSite: http://mattn.kaoriya.net/
-Repository: https://github.com/mattn/emmet-vim
-Site: https://mattn.github.com/emmet-vim
-License: BSD style license
-
-==============================================================================
-CONTENTS *emmet-contents*
-
-Introduction |emmet-introduction|
-Install |emmet-install|
-Tutorial |emmet-tutorial|
- 1. Expand abbreviation |emmet-expand-abbr| |<C-y>,|
- 2. Wrap with abbreviation |emmet-wrap-with-abbreviation| |v_<C-y>,|
- 3. Balance tag inward |emmet-balance-tag-inward| |<C-y>d|
- 4. Balance tag outward |emmet-balance-tag-outward| |<C-y>D|
- 5. Go to next edit point |emmet-goto-next-point| |<C-y>n|
- 6. Go to previous edit point |emmet-goto-previous-point| |<C-y>N|
- 7. Add and update <img> size |emmet-update-image-size| |<C-y>i|
- 8. Merge lines |emmet-merge-lines| |<C-y>m|
- 9. Remove tag |emmet-remove-tag| |<C-y>k|
- 10. Split/join tag |emmet-split-join-tag| |<C-y>j|
- 11. Toggle comment |emmet-toggle-comment| |<C-y>/|
- 12. Make anchor from URL |emmet-make-anchor-url| |<C-y>a|
- 13. Make quoted text from URL |emmet-quoted-text-url| |<C-y>A|
- 14. Code pretty |emmet-code-pretty| |<C-y>c|
- 15. Lorem ipsum |emmet-lorem-ipsum|
-HTML expression syntax |emmet-html-expression-syntax|
- 1. Elements |emmet-html-syntax-elements|
- 2. Nesting operators |emmet-html-syntax-nesting-operators|
- 2.1. Child |emmet->|
- 2.2. Sibling |emmet-+|
- 2.3. Climb-up |emmet-^|
- 2.4. Multiplication |emmet-star|
- 2.5. Grouping |emmet-()|
- 3. Attribute operators |emmet-html-syntax-attribute-operators|
- 3.1. ID and CLASS |emmet-.| |emmet-#|
- 3.2. Custom attributes |emmet-[]|
- 3.3. Item numbering |emmet-$|
- 3.3.1. Changing numbering origin and direction |emmet-@|
- 3.4. Quote character |emmet-html-attr-quote-char|
- 4. Text |emmet-{}|
- 5. Implicit tag names |emmet-html-implicit-tag-names|
- 6. Notes on abbreviation formatting |emmet-html-syntax-notes|
- 7. Choose position to insert text when wrap abbreviation |emmet-$#|
-CSS expression syntax |emmet-css-expression-syntax|
- 1. Properties |emmet-css-properties|
- 2. Values |emmet-css-values|
- 3. Units |emmet-css-units|
- 4. Vendor prefixes |emmet-css-vendor-prefixes|
-Commands |emmet-commands|
- :Emmet |:Emmet|
- :EmmetInstall |:EmmetInstall|
-Variables |emmet-variables|
- g:emmet_html5 |g:emmet_html5|
- g:emmet_docroot |g:emmet_docroot|
- g:emmet_curl_command |g:emmet_curl_command|
- g:user_emmet_complete_tag |g:user_emmet_complete_tag|
- g:user_emmet_leader_key |g:user_emmet_leader_key|
- g:user_emmet_install_global |g:user_emmet_install_global|
- g:user_emmet_install_command |g:user_emmet_install_command|
- g:user_emmet_settings |g:user_emmet_settings|
- g:user_emmet_mode |g:user_emmet_mode|
-Customize |emmet-customize|
- 1. Key mappings |emmet-customize-key-mappings|
- 2. Indent size |emmet-indent-size|
- 3. Define tag's behavior |emmet-define-tags-behavior|
- 4. Adding custom snippets |emmet-custom-snippets|
-Filters |emmet-filters-list|
- Escapes XML-unsafe characters |emmet-filter-e|
- Add comments around 'important tags' |emmet-filter-c|
- Outputs as a single line |emmet-filter-s|
- Trim list markers |emmet-filter-t|
-Links |emmet-links|
-ToDo |emmet-todo|
-
-==============================================================================
-INTRODUCTION *emmet-introduction* *emmet*
-
-Emmet is an editor plugin for high-speed HTML, XML, XSL (or any other
-structured code format) coding and editing. The core of this plugin is a
-powerful abbreviation engine which allows you to expand expressions,
-similar to CSS selectors, into HTML code:
->
- div#page>div.logo+ul#navigation>li*5>a
-<
-can be expanded into:
->
- <div id="page">
- <div class="logo"></div>
- <ul id="navigation">
- <li><a href=""></a></li>
- <li><a href=""></a></li>
- <li><a href=""></a></li>
- <li><a href=""></a></li>
- <li><a href=""></a></li>
- </ul>
- </div>
-<
-Read more about current Emmet syntax
- |emmet-html-expression-syntax|
- |emmet-css-expression-syntax|
- http://docs.emmet.io/abbreviations/
-
-Abbreviation engine has a modular structure which allows you
-to expand abbreviations into different languages.
-Emmet currently supports CSS, HTML, XML/XSL and HAML, Slim languages
-via filters (see |emmet-filter|).
-
-==============================================================================
-INSTALL *emmet-install*
-
-Install the distributed files into Vim runtime directory which is usually
-'~/.vim/', or '$HOME/vimfiles' on Windows.
-
-If you install pathogen (https://github.com/tpope/vim-pathogen)
-that provided by Tim Pope, you should extract the
-file into 'bundle' directory.
-
-==============================================================================
-TUTORIAL *emmet-tutorial*
-
-If you are seeing this file as :help, then you can't edit this file.
-You should copy this section and create new buffer, paste and write as
-'emmet-tutor.txt'. Formally, open the file to start tutorial.
-
-1. Expand abbreviation *emmet-expand-abbr* *<C-y>,*
-
- Type abbreviation as 'div>p#foo$*3>a' and type '<C-y>,'.
->
- <div>
- <p id="foo1">
- <a href=""></a>
- </p>
- <p id="foo2">
- <a href=""></a>
- </p>
- <p id="foo3">
- <a href=""></a>
- </p>
- </div>
-<
-2. Wrap with abbreviation *emmet-wrap-with-abbreviation* *v_<C-y>,*
-
- Write as below.
->
- test1
- test2
- test3
-<
- Then do visual select (line wise) and type '<C-y>,'.
- If you request 'Tag:', then type
->
- ul>li*
-<
- Result:
->
- <ul>
- <li>test1</li>
- <li>test2</li>
- <li>test3</li>
- </ul>
-<
- If you type tag name, for example
->
- blockquote
-<
- then you'll see as following:
->
- <blockquote>
- test1
- test2
- test3
- </blockquote>
-<
- See also: |emmet-filter-t|, |emmet-$#|
-
-3. Balance tag inward *emmet-balance-tag-inward* *<C-y>d*
-
- To select inward of '<ul>' tag, type '<C-y>d' in insert mode.
->
- <ul>
- * <li class="list1"></li>
- <li class="list2"></li>
- <li class="list3"></li>
- </ul>
-<
- If cursor is at '*', '<C-y>d' select from begin of '<ul>' to end of '</ul>'.
- If cursor is at first of '<li>', it select '<li class="list1"></li>'.
-
-4. Balance tag outward *emmet-balance-tag-outward* *<C-y>D*
-
- To select outward of '<ul>' tag type '<C-y>D' in insert mode.
->
- <ul>
- * <li class="list1"></li>
- <li class="list2"></li>
- <li class="list3"></li>
- </ul>
-<
- If cursor is at '*', '<C-y>D' select from next letter of '<ul>'
- to previous letter of '</ul>'.
- If cursor is at first of '<li>', it select '<li class="list1"></li>'.
-
-5. Go to next edit point *emmet-goto-next-point* *<C-y>n*
-
- To jump next point that need to edit, type '<C-y>n' in insert mode.
->
- * <div id="foo" class="">foo</div>
- <div id="bar" class="bar"></div>
-<
- If cursor is at '*', type '<C-y>n' to move a cursor
- into attribute value of '<div>' specified id as 'foo'.
- And type again '<C-y>n' to move a cursor
- into inner of '<div>' specified id as 'bar'.
-
-6. Go to previous edit point *emmet-goto-previous-point* *<C-y>N*
-
- To jump previous point that need to edit, type '<C-y>N' in insert mode.
->
- <div id="foo" class="">foo</div>
- <div id="bar" class="bar"></div> *
-<
- If cursor is at '*', type '<C-y>N' to move a cursor
- into '<div>' specified id as 'bar'.
- And type again '<C-y>N' to move a cursor
- into attribute value of 'foo'.
-
-7. Add and update <img> size *emmet-update-image-size* *<C-y>i*
-
- To add or update 'width' and 'height' attributes of image,
- type '<C-y>i' on '<img>' tag
->
- <img src="foo.png" />
-<
- Type '<C-y>i' on '<img>' tag
->
- <img src="foo.png" width="32" height="32" />
-<
- If you change image, then type it again. it will be following.
->
- <img src="foo-48.png" width="32" height="48" />
-<
- Image size retrieved using 'identify' (ImageMagick.org) (if available)
- or |xxd|.
-
-8. Merge lines *emmet-merge-lines* *<C-y>m*
-
- To join multi line text like following, type |J|.
->
- <ul>
- <li class="list1"></li>
- <li class="list2"></li>
- <li class="list3"></li>
- </ul>
-<
- If you select part of line include '<li>' and type |<C-y>m|,
- it will be following.
->
- <ul>
- <li class="list1"></li><li class="list2"></li><li class="list3"></li>
- </ul>
-<
-9. Remove tag *emmet-remove-tag* *<C-y>k*
-
- To remove tag in the block, type '<C-y>k'.
->
- <div class="foo">
- <a>cursor is here</a>
- </div>
-<
- Type '<C-y>k' in insert mode, then
->
- <div class="foo">
-
- </div>
-<
- And type '<C-y>k' in there again, then '<div>' will be removed.
-
-10. Split/join tag *emmet-split-join-tag* *<C-y>j*
-
- To join block, type '<C-y>j'.
->
- <div class="foo">
- cursor is here
- </div>
-<
- Type '<C-y>j' in insert mode. Then,
->
- <div class="foo" />
-<
- And type '<C-y>j' in there again.
->
- <div class="foo">
- </div>
-<
-11. Toggle comment *emmet-toggle-comment* *<C-y>/*
-
- Move cursor to block
->
- <div>
- hello world
- </div>
-<
- Type '<C-y>/' in insert mode.
->
- <!-- <div>
- hello world
- </div> -->
-<
- Type '<C-y>/' in there again.
->
- <div>
- hello world
- </div>
-<
-12. Make anchor from URL *emmet-make-anchor-url* *<C-y>a*
-
- Move cursor to URL
->
- http://www.google.com/
-<
- Type '<C-y>a'
->
- <a href="http://www.google.com/">Google</a>
-<
- Text retrieved using command, specified by |g:emmet_curl_command|.
-
-13. Make quoted text from URL *emmet-quoted-text-url* *<C-y>A*
-
- Move cursor to URL
->
- https://github.com/
-<
- Type '<C-y>A'
->
- <blockquote class="quote">
- <a href="https://github.com/">Secure source code hosting and collaborative development - GitHub</a><br />
- <p>How does it work? Get up and running in seconds by forking a project, pushing an existing repository...</p>
- <cite>https://github.com/</cite>
- </blockquote>
-<
- Text retrieved using command, specified by |g:emmet_curl_command|.
-
-14. Code pretty *emmet-code-pretty* *<C-y>c*
-
- Select code block, for example select following code from 'int main()'.
->
- <p>Writing in C language</p>
-
- int main() {
- puts("hello world");
- }
-<
- Type '<C-y>c'
->
- <span class="Type">int</span> main() {<br />
- puts(<span class="Constant">"hello world"</span>);<br />
- }<br />
-<
- To convert text into html used command |:TOhtml|.
-
-15. Lorem ipsum *emmet-lorem-ipsum*
-
- To insert dummy text (30 words by default).
->
- div>lorem
-<
- Type |<C-y>,|
->
- <div>Adipisicing asperiores deleniti ipsum fuga deserunt perferendis
- molestiae sunt excepturi aut quo nihil! Optio accusantium corporis molestiae
- deserunt ab, veritatis commodi. Eius nobis ab deserunt magni iure quo
- laboriosam laboriosam.</div>
-<
- For japanese user, put like follow into your |g:user_emmet_settings|:
->
- let g:user_emmet_settings = {
- ...
-
- \ 'custom_expands1' : {
- \ '^\%(lorem\|lipsum\)\(\d*\)$' : function('emmet#lorem#ja#expand'),
- \ },
-
- ...
-<
- You will get japanese dummy text. Text retrieved from url
- 'http://www.aozora.gr.jp/cards/000081/files/470_15407.html'
- using command, specified by |g:emmet_curl_command|.
-
- To insert 3 words of dummy text.
->
- div>lorem3
-<
- Type |<C-y>,|
->
- <div>
- Elit libero id.
- </div>
-<
-==============================================================================
-HTML EXPRESSION SYNTAX *emmet-html-expression-syntax*
-
-Emmet uses syntax similar to CSS selectors for describing elements' positions
-inside generated tree and elements' attributes.
-
-1. Elements *emmet-html-syntax-elements*
-
- You can use elements' names like 'div' or 'p' to generate HTML tags.
->
- p -> <p></p>
- div -> <div></div>
-<
- You can write any word and transform it into a tag:
->
- foo -> <foo></foo>
- bar -> <bar></bar>
-<
- Emmet knowns set of empty elements:
->
- br -> <br /> or <br>
- meta -> <meta /> or <meta>
-<
- To choose between HTML '>' and XHTML ' />' use |g:emmet_html5| or
- |g:user_emmet_settings|:
->
- let g:user_emmet_settings = {
- \ ...
- \ 'html': {
- \ ...
- \ 'empty_element_suffix': ' />',
- \ ...
- \ },
- \ ...
- \}
-<
- Emmet will automatically insert some attributes:
->
- a -> <a href="" ></a>
- link -> <link rel="stylesheet" href="" />
-<
- Set of inserted attributes can be changed using |g:user_emmet_settings|:
->
- let s:emmet_settings = {
- \ ...
- \ 'html': {
- \ ...
- \ 'default_attributes': {
- \ ...
- \ 'a': {'href': ''},
- \ 'ins': {'datetime': '${datetime}'},
- \ 'iframe': [{'src': ''}, {'frameborder': '0'}],
- \ 'textarea': [{'name': ''}, {'id': ''}, {'cols': '30'}, {'rows': '10'}],
- \ ...
- \ },
- \ ...
- \ },
- \ ...
- \}
-<
-2. Nesting operators *emmet-html-syntax-nesting-operators*
-
- Nesting operators are used to position abbreviation elements
- inside generated tree: whether it should be placed
- inside or near the context element.
-
- Operator Description Link ~
- > Child |emmet->|
- + Sibling |emmet-+|
- ^ Climb-up |emmet-^|
- * Multiplication |emmet-star|
- () Grouping |emmet-()|
-
-2.1. Child *emmet->*
-
- You can use '>' operator to nest elements inside each other:
->
- div>ul>li
-<
- will produce
->
- <div>
- <ul>
- <li></li>
- </ul>
- </div>
-<
-2.2. Sibling *emmet-+*
-
- Use '+' operator to place elements near each other, on the same level:
->
- div+p+bq
-<
- will output
->
- <div></div>
- <p></p>
- <blockquote></blockquote>
-<
-2.3. Climb-up *emmet-^*
-
- With '>' operator you're descending down the generated tree and
- positions of all sibling elements will be resolved
- against the most deepest element:
->
- div+div>p>span+em
-<
- will be expanded to
->
- <div></div>
- <div>
- <p>
- <span></span>
- <em></em>
- </p>
- </div>
-<
- With '^' operator, you can climb one level up the tree and change context
- where following elements should appear:
->
- div+div>p>span+em^bq
-<
- outputs to
->
- <div></div>
- <div>
- <p>
- <span></span>
- <em></em>
- </p>
- <blockquote></blockquote>
- </div>
-<
- You can use as many '^' operators as you like,
- each operator will move one level up:
->
- div+div>p>span+em^^^bq
-<
- will output to
->
- <div></div>
- <div>
- <p>
- <span></span>
- <em></em>
- </p>
- </div>
- <blockquote></blockquote>
-<
-2.4. Multiplication *emmet-star*
-
- With '*' operator you can define how many times element should be outputted:
->
- ul>li*5
-<
- outputs to
->
- <ul>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- </ul>
-<
- Expression may contain several '*' operators:
->
- tr*2>td*3
-<
- become
->
- <tr>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td></td>
- <td></td>
- </tr>
-<
-2.5. Grouping *emmet-()*
-
- Parentheses '()' are used by Emmets' power users for grouping subtrees
- in complex abbreviations:
->
- div>(header>ul>li*2>a)+footer>p
-<
- expands to
->
- <div>
- <header>
- <ul>
- <li><a href=""></a></li>
- <li><a href=""></a></li>
- </ul>
- </header>
- <footer>
- <p></p>
- </footer>
- </div>
-<
- If you're working with browser's DOM, you may think of groups
- as Document Fragments: each group contains abbreviation subtree and
- all the following elements are inserted at the same level
- as the first element of group.
-
- You can nest groups inside each other and
- combine them with multiplication '*' operator:
->
- (div>dl>(dt+dd)*3)+footer>p
-<
- produces
->
- <div>
- <dl>
- <dt></dt>
- <dd></dd>
- <dt></dt>
- <dd></dd>
- <dt></dt>
- <dd></dd>
- </dl>
- </div>
- <footer>
- <p></p>
- </footer>
-<
- With groups, you can literally write full page mark-up
- with a single abbreviation, but please don't do that.
-
-3. Attribute operators *emmet-html-syntax-attribute-operators*
-
- Attribute operators are used to modify attributes of outputted elements.
- For example, in HTML and XML you can quickly add 'class' attribute
- to generated element.
-
- Operator Description Link ~
- . Attribute 'class' |emmet-.|
- # Attribute 'id' |emmet-#|
- [] Custom attributes |emmet-[]|
- $ Number |emmet-$|
- @ Number origin and direction |emmet-@|
-
-3.1. ID and CLASS *emmet-.* *emmet-#*
-
- In CSS, you use 'elem#id' and 'elem.class' notation to reach the elements
- with specified 'id' or 'class' attributes.
- In Emmet, you can use the very same syntax to add these attributes
- to specified element:
->
- span.class1 -> <span class="class1"></span>
- span.class1.class2 -> <span class="class1 class2"></span>
- div#wrapper -> <div id="wrapper"></div>
- div#wrapper.content -> <div id="wrapper" class="content"></div>
-<
- More complex expression:
->
- div#header+div.page+div#footer.class1.class2.class3
-<
- will output
->
- <div id="header"></div>
- <div class="page"></div>
- <div id="footer" class="class1 class2 class3"></div>
-<
-3.2. Custom attributes *emmet-[]*
-
- You can use '[attr]' notation (as in CSS)
- to add custom attributes to your element:
->
- td[title="Hello world!" colspan=3]
-<
- outputs
->
- <td title="Hello world!" colspan="3"></td>
-<
- You can place as many attributes as you like inside square brackets.
-
- Attribute values may be omitted:
->
- td[colspan title]
-<
- will produce
->
- <td colspan="" title="">
-<
- You can use single or double quotes for quoting attribute values.
->
- div[a='value1' b="value2"]
-<
- become
->
- <div a="value1" b="value2"></div>
-<
- You don't need to quote values if they don't contain spaces:
->
- td[title=hello colspan=3]
-<
- will output
->
- <td title="hello" colspan="3"></td>
-<
-3.3. Item numbering *emmet-$*
-
- With multiplication '*' operator you can repeat elements,
- but with '$' you can number them.
- Place '$' operator inside element's name, attribute's name or
- attribute's value to output current number of repeated element:
->
- ul>li.item_$*5
-<
- outputs to
->
- <ul>
- <li class="item_1"></li>
- <li class="item_2"></li>
- <li class="item_3"></li>
- <li class="item_4"></li>
- <li class="item_5"></li>
- </ul>
-<
- You can use multiple '$' in a row to pad number with zeroes:
->
- ul>li.item_$$$*5
-<
- outputs to
->
- <ul>
- <li class="item_001"></li>
- <li class="item_002"></li>
- <li class="item_003"></li>
- <li class="item_004"></li>
- <li class="item_005"></li>
- </ul>
-<
- Also '$' can be used in element name and in text (|emmet-{}|):
->
- h$[title=item$]{Header $}*3
-<
- transformed to
->
- <h1 title="item1">Header 1</h1>
- <h2 title="item2">Header 2</h2>
- <h3 title="item3">Header 3</h3>
-<
-3.3.1. Changing numbering origin and direction *emmet-@*
-
- With '@' modifier, you can change
- - numbering direction (ascending or descending) and
- - origin (i. e. start value).
-
- For example, to change direction, add '@-' after '$':
->
- ul>li.item_$@-*5
-<
- outputs to
->
- <ul>
- <li class="item_5"></li>
- <li class="item_4"></li>
- <li class="item_3"></li>
- <li class="item_2"></li>
- <li class="item_1"></li>
- </ul>
-<
- To change counter origin value, add '@N' modifier to '$':
->
- ul>li.item_$@3*5
-<
- transforms to
->
- <ul>
- <li class="item_3"></li>
- <li class="item_4"></li>
- <li class="item_5"></li>
- <li class="item_6"></li>
- <li class="item_7"></li>
- </ul>
-<
- You can use these modifiers together:
->
- ul>li.item_$@-3*5
-<
- is transformed to
->
- <ul>
- <li class="item_7"></li>
- <li class="item_6"></li>
- <li class="item_5"></li>
- <li class="item_4"></li>
- <li class="item_3"></li>
- </ul>
->
-3.4. Quote character *emmet-html-attr-quote-char*
-
- |g:user_emmet_settings| may be used to change attribute quote character:
->
- let g:user_emmet_settings = {
- ...
- \ 'html' : {
- ...
- \ 'quote_char': "'",
- ...
- \ },
- ...
- \}
-<
- Then abbreviation
->
- a[target=_blank]
-<
- will expand to
->
- <a href='' target='_blank'></a>
-<
- instead of
->
- <a href="" target="_blank"></a>
-<
- Default quote is '"'.
-
-4. Text *emmet-{}*
-
- You can use curly braces to add text to element:
->
- a{Click me}
-<
- will produce
->
- <a href="">Click me</a>
-<
- Note that '{text}' is used and parsed as a separate element
- (like, 'div', 'p' etc), but has a special meaning
- when written right after element. For example,
->
- a{click}
-<
- and
->
- a>{click}
-<
- will produce the same output, but
->
- a{click}+b{here}
-<
- and
->
- a>{click}+b{here}
-<
- won't:
->
- <!-- a{click}+b{here} -->
- <a href="">click</a><b>here</b>
-
- <!-- a>{click}+b{here} -->
- <a href="">click<b>here</b></a>
-<
- In second example the '<b>' element is placed inside '<a>' element.
- And that's the difference: when '{text}' is written right after element,
- it doesn't change parent context.
- Here's more complex example showing why it is important:
->
- p>{Click }+a{here}+{ to continue}
-<
- produces
->
- <p>Click <a href="">here</a> to continue</p>
-<
- In this example, to write 'Click here to continue' inside '<p>' element
- we have explicitly move down the tree with '>' operator after 'p',
- but in case of 'a' element we don't have to, since we need '<a>' element
- with here word only, without changing parent context.
-
- For comparison, here's the same abbreviation
- written without child '>' operator:
->
- p{Click }+a{here}+{ to continue}
-<
- produces
->
- <p>Click </p>
- <a href="">here</a> to continue
-<
-5. Implicit tag names *emmet-html-implicit-tag-names*
-
- Even with such a powerful abbreviation engine,
- which can expand large HTML structures from short abbreviation,
- writing tag names may be very tedious.
-
- In many cases you can skip typing tag names and
- Emmet will substitute it for you.
- For example, instead of >
- div.content
-< you can simply write >
- .content
-< and expand it into >
- <div class="content"></div>
-<
- Other examples:
->
- .wrapper -> <div class="wrapper"></div>
- #popup -> <div id="popup"></div>
-<
- When you expand abbreviation, Emmet tries to grab parent context,
- e. g. the HTML element, inside which you're expanding the abbreviation.
- If the context was grabbed successfully,
- Emmet uses its name to resolve implicit names.
- Emmet looks at the parent tag name every time
- you're expanding the abbreviation with an implicit name.
- Here's how it resolves the names for some parent elements:
-
- Inserted element Parent elements ~
- li ul, ol
- tr table, tbody, thead, tfoot
- td tr
- option select, optgroup
- span Inline elements
- div Block elements
-
- Take a look at some abbreviations equivalents
- with implicit and explicit tag names:
->
- .wrap>.content -> div.wrap>div.content
- em>.info -> em>span.info
- ul>.item*3 -> ul>li.item*3
- table>.row>.col -> table>tr.row>td.col
- table>#row$*4>[colspan=2] -> table>tr#row$*4>td[colspan=2]
-<
-6. Notes on abbreviation formatting *emmet-html-syntax-notes*
-
- When you get familiar with Emmet's abbreviations syntax,
- you may want to use some formatting to make your abbreviations more readable.
- For example, use spaces between elements and operators, like this:
->
- (header > ul.nav > li*5) + footer
-<
- But it won't work, because space is a stop symbol
- where Emmet stops abbreviation parsing.
-
- Many users mistakenly think that each abbreviation
- should be written in a new line, but they are wrong:
- you can type and expand abbreviation anywhere in the text:
-
- This is why Emmet needs some indicators (like spaces)
- where it should stop parsing to not expand anything that you don't need.
- If you're still thinking that such formatting is required
- for complex abbreviations to make them more readable:
- - abbreviations are not a template language,
- they don't have to be "readable",
- they have to be "quickly expandable and removable";
- - you don't really need to write complex abbreviations.
- Stop thinking that "typing" is the slowest process in web-development.
- You'll quickly find out that constructing a single complex abbreviation
- is much slower and error-prone than constructing and typing
- a few short ones.
-
-7. Choose position to insert text when wrap abbreviation *emmet-$#*
-
- When wrap abbreviation (|emmet-wrap-with-abbreviation|) you can choose
- position to insert text using '$#' operator.
- Operator '$#' may be used only inside |emmet-[]| and/or |emmet-{}|.
-
- For example, do visual select (line wise) following text:
->
- First
- Second
- Third
-<
- Then press '<C-y>,' and type
->
- ul>li[ title="[$#]" ]*
-<
- Result:
->
- <ul>
- <li title="[First]">First</li>
- <li title="[Second]">Second</li>
- <li title="[Third]">Third</li>
- </ul>
-<
- You may type
->
- input[ type=input value=$# ]
-<
- to get
->
- <input type="input" value="First">
- <input type="input" value="Second">
- <input type="input" value="Third">
-<
- Using '$#' you can type text (|emmet-{}|) only once:
->
- a[title=$#]{foo}
-<
- will be expanded to
->
- <a href="" title="foo">foo</a>
-<
-==============================================================================
-CSS EXPRESSION SYNTAX *emmet-css-expression-syntax*
-
-1. Properties *emmet-css-properties*
-
- Emmet has a lot of predefined snippets for CSS properties.
->
- <style type="text/css">
- .page {
- m|
- }
- </style>
-<
- become
->
- <style type="text/css">
- .page {
- margin: |;
- }
- </style>
-<
- In above example '|' denotes a cursor (caret) position.
-
- Other examples:
->
- t -> top: ;
- d -> display: ;
- o -> outline: ;
- ov -> overflow: ;
- cu -> cursor: ;
- bdrs -> border-radius: ;
-<
- '+' operator may be used to insert number of properties:
->
- m1+p2
-<
- become
->
- margin: 1px;
- padding: 2px;
-<
-2. Values *emmet-css-values*
-
- Some properties have default values:
->
- c -> color: #000;
- bgc -> background-color: #FFF;
- zoo -> zoom: 1;
-<
- To insert predefined property value after abbreviation
- type colon ':' and first character of predefined keyword:
->
- d:n -> display: none;
- d:b -> display: block;
- d:i -> display: inline;
-<
- Numerical value can be typed directly after abbreviation:
->
- m10 -> margin: 10px;
- m2e -> margin: 2em;
-<
- Use a hyphen '-' to separate some numerical values:
->
- m10-20 -> margin: 10px 20px;
- p1-2-3 -> padding: 1px 2px 3px;
-<
- To negative values
- precede the first value with hyphen and all the rest with double hyphens:
->
- m-10 -> margin: -10px;
- m-1--2 -> margin: -1px -2px;
- p-2--1-0-1 -> padding: -2px -1px 0 1px;
-<
- To insert '!important' append '!' to property abbreviation:
->
- m! -> margin: !important;
- bac! -> background: !important;
-<
- You can use special abbreviation 'lg(...)'
- to insert definition of linear gradient. Example:
->
- lg(left, #fc0 30%, red)
-<
- will expand to
->
- background-image: -webkit-gradient(left, 0 0, 0 100, from(#fc0 30%), to(red));
- background-image: -webkit-linear-gradient(#fc0 30%, red);
- background-image: -moz-linear-gradient(#fc0 30%, red);
- background-image: -o-linear-gradient(#fc0 30%, red);
- background-image: linear-gradient(#fc0 30%, red);
-<
-3. Units *emmet-css-units*
-
- By default, when you expand an abbreviation with integer value,
- Emmet outputs it with a 'px' unit:
->
- bor2 -> border: 2px;
- fs100 -> font-size: 100px;
- miw20 -> min-width: 20px;
-<
- By default, if you're expanding an abbreviation with a float value,
- it is outputted with an 'em' unit:
->
- fs1.5 -> font-style: 1.5em;
-<
- But you can explicitly provide the unit name
- by putting one of characters right after value:
-
- Character Unit ~
- p %
- e em
-
- Examples:
->
- fs2e -> font-style: 2em;
- w100p -> width: 100%;
-<
-4. Vendor prefixes *emmet-css-vendor-prefixes*
-
- To automatically create vendor-prefixed copies of property,
- precede abbreviation with a hyphen '-'. For example, abbreviation
->
- -bdrs
-<
- will be expanded into
->
- -webkit-border-radius: ;
- -moz-border-radius: ;
- border-radius: ;
-<
-==============================================================================
-COMMANDS *emmet-commands*
-
-:Emmet {expression} *:Emmet*
- Expand {expression} and insert result under cursor.
- {expression} is |emmet-html-expression|.
- Also see |g:user_emmet_install_command|.
-
-:EmmetInstall *:EmmetInstall*
- Create Emmet mappings to current buffer
- (|mapping|, |:map-<buffer>|) and,
- if set |g:user_emmet_complete_tag|,
- change |'omnifunc'| option to emmet#completeTag()
-
-==============================================================================
-VARIABLES *emmet-variables*
-
-g:emmet_html5 *g:emmet_html5*
- If set to 1, enable HTML 5 support:
- - use ">" instead of "/>": >
- <meta />
- <meta>
-< - omit some HTML 4 attributes: >
- <style type="text/css">
- <style>
-< - add attributes without values; >
- <input checked="checked" />
- <input checked>
-< Default value: 1.
- To disable these set variable to 0: >
- let g:emmet_html5 = 0
-<
-g:emmet_docroot *g:emmet_docroot*
- |Dictionary| used by |<C-y>i|.
- Dictionary keys is path relative to http server root.
- Dictionary values is local file system absolute path
- to http server root directory.
- Default value is empty dictionary: {}
-
-g:emmet_curl_command *g:emmet_curl_command*
- Command to download web pages.
- Used by |emmet-html-syntax-item-numbering-base|,
- |emmet-html-syntax-item-numbering| and
- |emmet-lorem-ipsum| (for japanese).
- Default value: 'curl -s -L -A Mozilla/5.0'
-
-g:user_emmet_complete_tag *g:user_emmet_complete_tag*
- Use omni complete function, provided by Emmet.
- When user run |:EmmetInstall|,
- following command will be executed: >
- setlocal omnifunc=emmet#completeTag
-<
-g:user_emmet_leader_key *g:user_emmet_leader_key*
- Leading keys to run Emmet functions.
- Default value: '<C-y>'.
- |:EmmetInstall| will map Emmet keys to current buffer.
- See |emmet-customize-key-mappings|.
-
-g:user_emmet_install_global *g:user_emmet_install_global*
- If set to 1, Emmet will create global mappings.
- Set to 0 to prevent these: >
- let g:user_emmet_install_global = 0
-< Default value: 1.
- See |emmet-customize-key-mappings|.
-
-g:user_emmet_install_command *g:user_emmet_install_command*
- If set to 1, Emmet will create command |:Emmet|.
- Set to 0 to prevent these: >
- let g:user_emmet_install_command = 0
-< Default value: 1.
-
-g:user_emmet_settings *g:user_emmet_settings*
- |Dictionary|, which contains user settings.
- User settings will override default settings.
- Default settings can be found in file
- 'emmet/autoload/emmet.vim';
- search for variable 's:emmet_settings'.
- Dictionary has the same structure
- as 's:emmet_settings'.
- See also: |emmet-indent-size|,
- |emmet-define-tags-behavior|, |emmet-custom-snippets|
-
-g:user_emmet_mode *g:user_emmet_mode*
- String. Choose modes, in which
- Emmet mappings will be created.
- Default value: 'a' - all modes.
- 'n' - normal mode.
- 'i' - insert mode.
- 'v' - visual mode.
- Examples: >
- " create Emmet mappings only for normal mode
- let g:user_emmet_mode = 'n'
- " create Emmet mappings
- " for insert, normal and visual modes
- let g:user_emmet_mode = 'inv'
- " create Emmet mappings for all modes
- let g:user_emmet_mode = 'a'
-<
-==============================================================================
-CUSTOMIZE *emmet-customize*
-
-1. Key mapping *emmet-customize-key-mappings*
-
- To specify leading key for expanding or balance tag, or for all,
- Add this line in your 'vimrc': >
->
- let g:user_emmet_leader_key = '<C-y>'
-<
- Note that to expand abbreviation a trailing ',' must be typed, so
- the resultant keymap is '<C-y>,'.
-
- If you prefer to map for each actions separately, use following valuables:
->
- let g:user_emmet_expandabbr_key = '<C-y>,'
- let g:user_emmet_expandword_key = '<C-y>;'
- let g:user_emmet_update_tag = '<C-y>u'
- let g:user_emmet_balancetaginward_key = '<C-y>d'
- let g:user_emmet_balancetagoutward_key = '<C-y>D'
- let g:user_emmet_next_key = '<C-y>n'
- let g:user_emmet_prev_key = '<C-y>N'
- let g:user_emmet_imagesize_key = '<C-y>i'
- let g:user_emmet_togglecomment_key = '<C-y>/'
- let g:user_emmet_splitjointag_key = '<C-y>j'
- let g:user_emmet_removetag_key = '<C-y>k'
- let g:user_emmet_anchorizeurl_key = '<C-y>a'
- let g:user_emmet_anchorizesummary_key = '<C-y>A'
- let g:user_emmet_mergelines_key = '<C-y>m'
- let g:user_emmet_codepretty_key = '<C-y>c'
-<
- Or you can use following <plug> mappings:
->
- imap <C-y>, <plug>(emmet-expand-abbr)
- imap <C-y>; <plug>(emmet-expand-word)
- imap <C-y>u <plug>(emmet-update-tag)
- imap <C-y>d <plug>(emmet-balance-tag-inward)
- imap <C-y>D <plug>(emmet-balance-tag-outward)
- imap <C-y>n <plug>(emmet-move-next)
- imap <C-y>N <plug>(emmet-move-prev)
- imap <C-y>i <plug>(emmet-image-size)
- imap <C-y>/ <plug>(emmet-toggle-comment)
- imap <C-y>j <plug>(emmet-split-join-tag)
- imap <C-y>k <plug>(emmet-remove-tag)
- imap <C-y>a <plug>(emmet-anchorize-url)
- imap <C-y>A <plug>(emmet-anchorize-summary)
- imap <C-y>m <plug>(emmet-merge-lines)
- imap <C-y>c <plug>(emmet-code-pretty)
-<
- You can make the mapping affected only for a filetype you want.
->
- let g:user_emmet_install_global = 0
- autocmd FileType css imap <tab> <plug>(emmet-expand-abbr)
-<
-2. Indent size *emmet-indent-size*
-
- To change indent size of html, add following code in your 'vimrc':
->
- let g:user_emmet_settings = {
- \ 'html' : {
- \ 'indentation' : ' '
- \ },
- \}
-<
- If you prefer to change global indent size then add this:
->
- let g:user_emmet_settings = {
- \ 'indentation' : ' '
- \}
-<
- Filetype dependent indent size will override global indent size.
-
-3. Define tag's behavior *emmet-define-tags-behavior*
-
- User can create abbreviations and snippets for each filetypes
- using |g:user_emmet_settings|. For details, see official site of Emmet.
- For example, user can add following:
->
- let g:user_emmet_settings = {
- \ 'variables' : {
- \ 'lang' : 'ja',
- \ },
- \ 'html' : {
- \ 'filters' : 'html',
- \ 'indentation' : ' ',
- \ 'expandos' : {
- \ 'ol': 'ol>li',
- \ 'list': 'ul>li*3',
- \ },
- \ 'default_attributes': {
- \ 'a': {'href': ''},
- \ 'link': [{'rel': 'stylesheet'}, {'href': ''}],
- \ },
- \ 'aliases': {
- \ 'bq': 'blockquote',
- \ 'obj': 'object',
- \ 'src': 'source',
- \ },
- \ 'empty_elements': 'area,base,basefont,...,isindex,link,meta,...',
- \ 'block_elements': 'address,applet,blockquote,...,li,link,map,...',
- \ 'inline_elements': 'a,abbr,acronym,...',
- \ 'empty_element_suffix': ' />',
- \ },
- \ 'perl' : {
- \ 'indentation' : ' ',
- \ 'aliases' : {
- \ 'req' : "require '|'"
- \ },
- \ 'snippets' : {
- \ 'use' : "use strict\nuse warnings\n\n",
- \ 'w' : "warn \"${cursor}\";",
- \ },
- \ },
- \ 'php' : {
- \ 'extends' : 'html',
- \ 'filters' : 'html,c',
- \ },
- \ 'css' : {
- \ 'filters' : 'fc',
- \ },
- \ 'javascript' : {
- \ 'snippets' : {
- \ 'jq' : "\\$(function() {\n\t${cursor}${child}\n});",
- \ 'jq:each' : "\\$.each(arr, function(index, item)\n\t${child}\n});",
- \ 'fn' : "(function() {\n\t${cursor}\n})();",
- \ 'tm' : "setTimeout(function() {\n\t${cursor}\n}, 100);",
- \ },
- \ },
- \ 'java' : {
- \ 'indentation' : ' ',
- \ 'snippets' : {
- \ 'main': "public static void main(String[] args) {\n\t|\n}",
- \ 'println': "System.out.println(\"|\");",
- \ 'class': "public class | {\n}\n",
- \ },
- \ },
- \}
-<
- As you can see, at first level of tree are filetype names.
- The second level of tree contains definition of abbreviations, snippets and
- values of some options.
- *emmet-snippet*
- Snippets are just blocks of plain code,
- just like in all programmers' editors. You can type anything there and
- it will be outputted 'as-is', without any transformation.
-
- Bar '|' and '${cursor}' points to cursor position.
- '${child}' points to position of children elements
- (for example, in expression 'p>span' 'span' is children of 'p').
- *emmet-abbreviation*
- Emmet parses tree and retrieves the following data:
- - element name;
- - default attributes;
- - attributes' order;
- - attributes' default values;
- - should element contain closing tag.
-
- Let's take a closer look on HTML abbreviations' definitions above.
- The 'link' element is defined as
->
- let g:user_emmet_settings = {
- ...
- \ 'html': {
- ...
- \ 'default_attributes': {
- ...
- 'link': [{'rel': 'stylesheet'}, {'href': ''}],
- \ },
- ...
- \ 'empty_elements': '...,link,...',
- \ 'block_elements': '...,link,...',
- \ 'empty_element_suffix': ' />',
- \ },
- ...
- \}
-<
- This definition says that tag, generated for 'link' abbreviation,
- should be named 'link' and should contain two attributes:
- 'rel' with default value 'stylesheet' and 'href' with empty value
- (exactly in this order), and
- generated element should not contain closing tag.
-
- When the link abbreviation is expanded,
- you'll receive the following output for HTML syntax:
->
- <link rel="stylesheet" href="" />
-<
- You can override default attribute values and add new ones as well:
->
- link[rel=prefetch title="Hello world"]
-<
- expands to
->
- <link rel="prefetch" href="" title="Hello world" />
-< *emmet-alias*
- Aliases are short-hands for commonly used abbreviations.
- Aliases can be used to define:
- - short names for long tag names;
- - referencing commonly used abbreviations.
->
- let g:user_emmet_settings = {
- ...
- \ 'html': {
- ...
- \ 'aliases': {
- ...
- 'bq': 'blockquote',
- },
- 'expandos': {
- ...
- 'ol': 'ol>li',
- },
- ...
- \ },
- ....
- \}
-<
- In the example above, when you expand abbreviation,
->
- bq
-<
- Emmet will look for 'blockquote' abbreviation's definition.
- If it doesn't exist, it will simply output element
->
- <blockquote></blockquote>
-<
- The 'ol' abbreviation actually outputs the same result as 'ol>li' does:
->
- <ol>
- <li></li>
- </ol>
-< *emmet-filter*
- Filters are special post-processors that modify expanded abbreviation
- right before output to the editor. To better understand how filters work,
- let's walk through a simple tutorial.
-
- Try to expand the following abbreviation:
->
- #content>p.title
-<
- As you may expect, it will be expanded into the following HTML code:
->
- <div id="content">
- <p class="title"></p>
- </div>
-<
- Now, try to expand this abbreviation:
->
- #content>p.title|e
-<
- You'll have a slightly different result:
->
- <div id="content">
- <p class="title"></p>
- </div>
-<
- We've just applied 'e' (escape) filter by appending its name
- after pipe character '|'.
- This filter had escaped all XML-unsafe symbols with entities
- (see |emmet-filter-e|) right before Emmet sent output to the editor.
-
- Let's do something more interesting. Try to expand this abbreviation:
->
- #content>p.title|haml
-<
- Result:
->
- #content
- %p.title
-<
- We've just expanded abbreviation as a HAML template.
-
- As you can see, filtering is a key concept of Emmet. To draw an analogy
- with the browser's DOM model, every time you expand abbreviation
- it first gets transformed into a tree and
- then filter walks on each tree node and modifies its output.
- Filters can do anything: from small tweaks
- as placing whitespace after CSS-rule to more complex tasks
- as outputting result in different syntax. Even HTML output is defined
- as 'html' filter.
-
- You can apply filter to abbreviation explicitly,
- by adding pipe character '|' and its name right after abbreviation.
- But filters also can be applied implicitly, depending on document type
- you're currently editing. Default filters are defined to each filetype:
->
- let g:user_emmet_settings = {
- ...
- \ 'html' : {
- ...
- 'filters': 'html',
- \ },
- \ 'css' : {
- \ 'filters': 'fc',
- ...
- \ },
- ...
- \}
-<
- If there's no filter specified, 'html' filter is applied by default.
- If you want to apply more than one filter by default,
- you can write a comma-separated list of filter names in filters section:
->
- let g:user_emmet_settings = {
- ...
- \ 'html' : {
- ...
- 'filters': 'html,e',
- \ },
- ...
- \}
-<
- Now, every time you expand abbreviation in HTML document,
- 'html' and 'e' filters will be applied by default.
-
- But be careful. You always have to place one of the filetype filter
- ('html', 'haml', etc) at first place of default filters,
- otherwise you'll have empty output because syntax filters
- are defining primary output result.
-
- Number of available filters listed below (|emmet-filters-list|).
-
-4. Adding custom snippets *emmet-custom-snippets*
-
- If you have installed the |webapi| (https://github.com/mattn/webapi-vim)
- for |emmet| you can also add your own snippets
- using a custom 'snippets.json' file.
-
- Once you have installed the |webapi| add this line to your 'vimrc':
->
- let g:user_emmet_settings = webapi#json#decode(
- \ join( readfile( expand( '~/.snippets_custom.json' ) ), "\n" ) )
-<
- You can change the path to your 'snippets_custom.json'
- according to your preferences.
-
- See http://docs.emmet.io/customization/snippets/
- to find instructions about creating
- your customized 'snippets.json' file.
-
-==============================================================================
-FILTERS *emmet-filters-list*
-
- Filter described above (see |emmet-filter|).
- Some available filters listed in the following table.
- For more details see http://docs.emmet.io/filters/ and source code.
-
- Filter Description Link ~
- html Applies by default everywhere except HAML files
- haml Applies by default for 'haml' filetype
- xsl Applies by default for 'haml' filetype
- e Escapes XML-unsafe characters |emmet-filter-e|
- c Add comments around 'important tags' |emmet-filter-c|
- s Outputs as a single line |emmet-filter-s|
- t Trim list markers |emmet-filter-t|
-
- 'html', 'haml', 'xsl' filters will expand filetype specific abbreviations.
- For full list of available abbreviations and snippets
- see http://docs.emmet.io/cheat-sheet/
- or file 'emmet/autoload/emmet.vim' (search for variable 's:emmet_settings').
- Also see |emmet-define-tags-behavior|.
- *emmet-filter-e*
- 'e' (escape) filter replace XML-unsafe characters: '<', '>' and '&'
- to entities: '<', '>', '&'.
-
- For example
->
- #header|e
-<
- will expand to
->
- <div id="header"></div>
-<
- *emmet-filter-c*
- 'c' (comment) filter add comments around 'important tags'.
- By default, 'important tags' are those tags
- with 'id' and/or 'class' attribute.
-
- For example
->
- #page|c
-<
- will be expanded into
->
- <!-- #page -->
- <div id="page"></div>
- <!-- /#page -->
-<
- Expression
->
- p.title|c
-<
- become
->
- <!-- .title -->
- <p class="title"></p>
- <!-- /.title -->
-<
- More complex expression
->
- div>#page>p.title+p|c
-<
- will be transformed into
->
- <div>
- <!-- #page -->
- <div id="page">
- <!-- .title -->
- <p class="title"></p>
- <!-- /.title -->
- <p></p>
- </div>
- <!-- /#page -->
- </div>
-<
- To insert only second comment use the following code:
->
- let g:user_emmet_settings = {
- ...
- \ 'html' : {
- ...
- 'comment_type': 'lastonly',
- \ },
- ...
- \}
-<
- 'comment_type' default value is 'both'.
- *emmet-filter-s*
- 's' (single line) filter removes newline characters, so
- abbreviation will be expanded into single line:
->
- ul>li*4|s
-<
- becomes to
->
- <ul><li></li><li></li><li></li><li></li></ul>
-<
- *emmet-filter-t*
- 't' (trim) filter removes trailing whitespace characters and
- list markers, such as '1.', '2.', '3.', '-'.
-
- For example, do visual select (line wise) following text:
->
- 1. First
- 2. Second
- 3. Third
-<
- Then press '<C-y>,' (|emmet-wrap-with-abbreviation|) and type expression
->
- ul>li*|t
-<
- Result:
->
- <ul>
- <li>First</li>
- <li>Second</li>
- <li>Third</li>
- </ul>
-<
-==============================================================================
-LINKS *emmet-links*
-
-Emmet official site:
- http://emmet.io/
-
-Emmet documentation:
- http://docs.emmet.io/
-
-Emmet cheat sheet:
- http://docs.emmet.io/cheat-sheet/
-
-Emmet vim plugin repository:
- https://github.com/mattn/emmet-vim
-
- Emmet (developed since 2012) is successor of
- zen-coding (developed since 2009).
-
-zen-coding official site:
- http://code.google.com/p/zen-coding/
-
-zen-coding official site:
- http://code.google.com/p/zen-coding/
-
-zen-coding vim plugin repository:
- http://mattn.github.com/zencoding-vim
-
-zen-coding development repository:
- https://github.com/mattn/zencoding-vim
-
-My blog posts about zencoding-vim (japanese):
- http://mattn.kaoriya.net/software/vim/20100222103327.htm
- http://mattn.kaoriya.net/software/vim/20100306021632.htm
-
-Japanese blog posts about zencoding-vim:
- http://d.hatena.ne.jp/idesaku/20100424/1272092255
- http://d.hatena.ne.jp/griefworker/20110118/vim_zen_coding
- http://d.hatena.ne.jp/sakurako_s/20110126/1295988873
- http://looxu.blogspot.jp/2010/02/zencodingvimhtml.html
-
-Tutorial translated in chinese:
- http://www.zfanw.com/blog/zencoding-vim-tutorial-chinese.html
-
-==============================================================================
-TODO *emmet-todo*
- * wrapping inline selected.
- * more documents.
- * more contributor.
- * more time to improve emmet.vim.
-
-==============================================================================
-vim: filetype=help expandtab textwidth=78 tabstop=8 norightleft foldenable foldlevel=0 :
diff --git a/pack/plugins/start/auto-pairs b/pack/plugins/start/auto-pairs
deleted file mode 160000
index 39f06b8..0000000
--- a/pack/plugins/start/auto-pairs
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 39f06b873a8449af8ff6a3eee716d3da14d63a76
diff --git a/pack/plugins/start/rainbow b/pack/plugins/start/rainbow
deleted file mode 160000
index 4d15633..0000000
--- a/pack/plugins/start/rainbow
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4d15633cdaf61602e1d9fd216a77fc02e0881b2d
diff --git a/pack/plugins/start/vim-doge b/pack/plugins/start/vim-doge
deleted file mode 160000
index 9519bd9..0000000
--- a/pack/plugins/start/vim-doge
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 9519bd95e291c6d94bc63c6b58470fe1a0fdede8
diff --git a/pack/plugins/start/vim-endwise b/pack/plugins/start/vim-endwise
deleted file mode 160000
index 97180a7..0000000
--- a/pack/plugins/start/vim-endwise
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 97180a73ad26e1dcc1eebe8de201f7189eb08344
diff --git a/pack/plugins/start/vim-markdown b/pack/plugins/start/vim-markdown
deleted file mode 160000
index 8e5d86f..0000000
--- a/pack/plugins/start/vim-markdown
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 8e5d86f7b85234d3d1b4207dceebc43a768ed5d4
diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim
deleted file mode 100644
index af5eb32..0000000
--- a/plugin/auto-pairs.vim
+++ /dev/null
@@ -1,673 +0,0 @@
-" Insert or delete brackets, parens, quotes in pairs.
-" Maintainer: JiangMiao <jiangfriend@gmail.com>
-" Contributor: camthompson
-" Last Change: 2019-02-02
-" Version: 2.0.0
-" Homepage: http://www.vim.org/scripts/script.php?script_id=3599
-" Repository: https://github.com/jiangmiao/auto-pairs
-" License: MIT
-
-if exists('g:AutoPairsLoaded') || &cp
- finish
-end
-let g:AutoPairsLoaded = 1
-
-if !exists('g:AutoPairs')
- let g:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '```':'```', '"""':'"""', "'''":"'''", "`":"`"}
-end
-
-" default pairs base on filetype
-func! AutoPairsDefaultPairs()
- if exists('b:autopairs_defaultpairs')
- return b:autopairs_defaultpairs
- end
- let r = copy(g:AutoPairs)
- let allPairs = {
- \ 'vim': {'\v^\s*\zs"': ''},
- \ 'rust': {'\w\zs<': '>', '&\zs''': ''},
- \ 'php': {'<?': '?>//k]', '<?php': '?>//k]'}
- \ }
- for [filetype, pairs] in items(allPairs)
- if &filetype == filetype
- for [open, close] in items(pairs)
- let r[open] = close
- endfor
- end
- endfor
- let b:autopairs_defaultpairs = r
- return r
-endf
-
-if !exists('g:AutoPairsMapBS')
- let g:AutoPairsMapBS = 1
-end
-
-" Map <C-h> as the same BS
-if !exists('g:AutoPairsMapCh')
- let g:AutoPairsMapCh = 1
-end
-
-if !exists('g:AutoPairsMapCR')
- let g:AutoPairsMapCR = 1
-end
-
-if !exists('g:AutoPairsWildClosedPair')
- let g:AutoPairsWildClosedPair = ''
-end
-
-if !exists('g:AutoPairsMapSpace')
- let g:AutoPairsMapSpace = 1
-end
-
-if !exists('g:AutoPairsCenterLine')
- let g:AutoPairsCenterLine = 1
-end
-
-if !exists('g:AutoPairsShortcutToggle')
- let g:AutoPairsShortcutToggle = '<M-p>'
-end
-
-if !exists('g:AutoPairsShortcutFastWrap')
- let g:AutoPairsShortcutFastWrap = '<M-e>'
-end
-
-if !exists('g:AutoPairsMoveCharacter')
- let g:AutoPairsMoveCharacter = "()[]{}\"'"
-end
-
-if !exists('g:AutoPairsShortcutJump')
- let g:AutoPairsShortcutJump = '<M-n>'
-endif
-
-" Fly mode will for closed pair to jump to closed pair instead of insert.
-" also support AutoPairsBackInsert to insert pairs where jumped.
-if !exists('g:AutoPairsFlyMode')
- let g:AutoPairsFlyMode = 0
-endif
-
-" When skipping the closed pair, look at the current and
-" next line as well.
-if !exists('g:AutoPairsMultilineClose')
- let g:AutoPairsMultilineClose = 1
-endif
-
-" Work with Fly Mode, insert pair where jumped
-if !exists('g:AutoPairsShortcutBackInsert')
- let g:AutoPairsShortcutBackInsert = '<M-b>'
-endif
-
-if !exists('g:AutoPairsSmartQuotes')
- let g:AutoPairsSmartQuotes = 1
-endif
-
-" 7.4.849 support <C-G>U to avoid breaking '.'
-" Issue talk: https://github.com/jiangmiao/auto-pairs/issues/3
-" Vim note: https://github.com/vim/vim/releases/tag/v7.4.849
-if v:version > 704 || v:version == 704 && has("patch849")
- let s:Go = "\<C-G>U"
-else
- let s:Go = ""
-endif
-
-let s:Left = s:Go."\<LEFT>"
-let s:Right = s:Go."\<RIGHT>"
-
-
-
-
-" unicode len
-func! s:ulen(s)
- return len(split(a:s, '\zs'))
-endf
-
-func! s:left(s)
- return repeat(s:Left, s:ulen(a:s))
-endf
-
-func! s:right(s)
- return repeat(s:Right, s:ulen(a:s))
-endf
-
-func! s:delete(s)
- return repeat("\<DEL>", s:ulen(a:s))
-endf
-
-func! s:backspace(s)
- return repeat("\<BS>", s:ulen(a:s))
-endf
-
-func! s:getline()
- let line = getline('.')
- let pos = col('.') - 1
- let before = strpart(line, 0, pos)
- let after = strpart(line, pos)
- let afterline = after
- if g:AutoPairsMultilineClose
- let n = line('$')
- let i = line('.')+1
- while i <= n
- let line = getline(i)
- let after = after.' '.line
- if !(line =~ '\v^\s*$')
- break
- end
- let i = i+1
- endwhile
- end
- return [before, after, afterline]
-endf
-
-" split text to two part
-" returns [orig, text_before_open, open]
-func! s:matchend(text, open)
- let m = matchstr(a:text, '\V'.a:open.'\v$')
- if m == ""
- return []
- end
- return [a:text, strpart(a:text, 0, len(a:text)-len(m)), m]
-endf
-
-" returns [orig, close, text_after_close]
-func! s:matchbegin(text, close)
- let m = matchstr(a:text, '^\V'.a:close)
- if m == ""
- return []
- end
- return [a:text, m, strpart(a:text, len(m), len(a:text)-len(m))]
-endf
-
-" add or delete pairs base on g:AutoPairs
-" AutoPairsDefine(addPairs:dict[, removeOpenPairList:list])
-"
-" eg:
-" au FileType html let b:AutoPairs = AutoPairsDefine({'<!--' : '-->'}, ['{'])
-" add <!-- --> pair and remove '{' for html file
-func! AutoPairsDefine(pairs, ...)
- let r = AutoPairsDefaultPairs()
- if a:0 > 0
- for open in a:1
- unlet r[open]
- endfor
- end
- for [open, close] in items(a:pairs)
- let r[open] = close
- endfor
- return r
-endf
-
-func! AutoPairsInsert(key)
- if !b:autopairs_enabled
- return a:key
- end
-
- let b:autopairs_saved_pair = [a:key, getpos('.')]
-
- let [before, after, afterline] = s:getline()
-
- " Ignore auto close if prev character is \
- if before[-1:-1] == '\'
- return a:key
- end
-
- " check open pairs
- for [open, close, opt] in b:AutoPairsList
- let ms = s:matchend(before.a:key, open)
- let m = matchstr(afterline, '^\v\s*\zs\V'.close)
- if len(ms) > 0
- " process the open pair
-
- " remove inserted pair
- " eg: if the pairs include < > and <!-- -->
- " when <!-- is detected the inserted pair < > should be clean up
- let target = ms[1]
- let openPair = ms[2]
- if len(openPair) == 1 && m == openPair
- break
- end
- let bs = ''
- let del = ''
- while len(before) > len(target)
- let found = 0
- " delete pair
- for [o, c, opt] in b:AutoPairsList
- let os = s:matchend(before, o)
- if len(os) && len(os[1]) < len(target)
- " any text before openPair should not be deleted
- continue
- end
- let cs = s:matchbegin(afterline, c)
- if len(os) && len(cs)
- let found = 1
- let before = os[1]
- let afterline = cs[2]
- let bs = bs.s:backspace(os[2])
- let del = del.s:delete(cs[1])
- break
- end
- endfor
- if !found
- " delete charactor
- let ms = s:matchend(before, '\v.')
- if len(ms)
- let before = ms[1]
- let bs = bs.s:backspace(ms[2])
- end
- end
- endwhile
- return bs.del.openPair.close.s:left(close)
- end
- endfor
-
- " check close pairs
- for [open, close, opt] in b:AutoPairsList
- if close == ''
- continue
- end
- if a:key == g:AutoPairsWildClosedPair || opt['mapclose'] && opt['key'] == a:key
- " the close pair is in the same line
- let m = matchstr(afterline, '^\v\s*\V'.close)
- if m != ''
- if before =~ '\V'.open.'\v\s*$' && m[0] =~ '\v\s'
- " remove the space we inserted if the text in pairs is blank
- return "\<DEL>".s:right(m[1:])
- else
- return s:right(m)
- end
- end
- let m = matchstr(after, '^\v\s*\zs\V'.close)
- if m != ''
- if a:key == g:AutoPairsWildClosedPair || opt['multiline']
- if b:autopairs_return_pos == line('.') && getline('.') =~ '\v^\s*$'
- normal! ddk$
- end
- call search(m, 'We')
- return "\<Right>"
- else
- break
- end
- end
- end
- endfor
-
-
- " Fly Mode, and the key is closed-pairs, search closed-pair and jump
- if g:AutoPairsFlyMode && a:key =~ '\v[\}\]\)]'
- if search(a:key, 'We')
- return "\<Right>"
- endif
- endif
-
- return a:key
-endf
-
-func! AutoPairsDelete()
- if !b:autopairs_enabled
- return "\<BS>"
- end
-
- let [before, after, ig] = s:getline()
- for [open, close, opt] in b:AutoPairsList
- let b = matchstr(before, '\V'.open.'\v\s?$')
- let a = matchstr(after, '^\v\s*\V'.close)
- if b != '' && a != ''
- if b[-1:-1] == ' '
- if a[0] == ' '
- return "\<BS>\<DELETE>"
- else
- return "\<BS>"
- end
- end
- return s:backspace(b).s:delete(a)
- end
- endfor
-
- return "\<BS>"
- " delete the pair foo[]| <BS> to foo
- for [open, close, opt] in b:AutoPairsList
- let m = s:matchend(before, '\V'.open.'\v\s*'.'\V'.close.'\v$')
- if len(m) > 0
- return s:backspace(m[2])
- end
- endfor
- return "\<BS>"
-endf
-
-
-" Fast wrap the word in brackets
-func! AutoPairsFastWrap()
- let c = @"
- normal! x
- let [before, after, ig] = s:getline()
- if after[0] =~ '\v[\{\[\(\<]'
- normal! %
- normal! p
- else
- for [open, close, opt] in b:AutoPairsList
- if close == ''
- continue
- end
- if after =~ '^\s*\V'.open
- call search(close, 'We')
- normal! p
- let @" = c
- return ""
- end
- endfor
- if after[1:1] =~ '\v\w'
- normal! e
- normal! p
- else
- normal! p
- end
- end
- let @" = c
- return ""
-endf
-
-func! AutoPairsJump()
- call search('["\]'')}]','W')
-endf
-
-func! AutoPairsMoveCharacter(key)
- let c = getline(".")[col(".")-1]
- let escaped_key = substitute(a:key, "'", "''", 'g')
- return "\<DEL>\<ESC>:call search("."'".escaped_key."'".")\<CR>a".c."\<LEFT>"
-endf
-
-func! AutoPairsBackInsert()
- let pair = b:autopairs_saved_pair[0]
- let pos = b:autopairs_saved_pair[1]
- call setpos('.', pos)
- return pair
-endf
-
-func! AutoPairsReturn()
- if b:autopairs_enabled == 0
- return ''
- end
- let b:autopairs_return_pos = 0
- let before = getline(line('.')-1)
- let [ig, ig, afterline] = s:getline()
- let cmd = ''
- for [open, close, opt] in b:AutoPairsList
- if close == ''
- continue
- end
-
- if before =~ '\V'.open.'\v\s*$' && afterline =~ '^\s*\V'.close
- let b:autopairs_return_pos = line('.')
- if g:AutoPairsCenterLine && winline() * 3 >= winheight(0) * 2
- " Recenter before adding new line to avoid replacing line content
- let cmd = "zz"
- end
-
- " If equalprg has been set, then avoid call =
- " https://github.com/jiangmiao/auto-pairs/issues/24
- if &equalprg != ''
- return "\<ESC>".cmd."O"
- endif
-
- " conflict with javascript and coffee
- " javascript need indent new line
- " coffeescript forbid indent new line
- if &filetype == 'coffeescript' || &filetype == 'coffee'
- return "\<ESC>".cmd."k==o"
- else
- return "\<ESC>".cmd."=ko"
- endif
- end
- endfor
- return ''
-endf
-
-func! AutoPairsSpace()
- if !b:autopairs_enabled
- return "\<SPACE>"
- end
-
- let [before, after, ig] = s:getline()
-
- for [open, close, opt] in b:AutoPairsList
- if close == ''
- continue
- end
- if before =~ '\V'.open.'\v$' && after =~ '^\V'.close
- if close =~ '\v^[''"`]$'
- return "\<SPACE>"
- else
- return "\<SPACE>\<SPACE>".s:Left
- end
- end
- endfor
- return "\<SPACE>"
-endf
-
-func! AutoPairsMap(key)
- " | is special key which separate map command from text
- let key = a:key
- if key == '|'
- let key = '<BAR>'
- end
- let escaped_key = substitute(key, "'", "''", 'g')
- " use expr will cause search() doesn't work
- execute 'inoremap <buffer> <silent> '.key." <C-R>=AutoPairsInsert('".escaped_key."')<CR>"
-endf
-
-func! AutoPairsToggle()
- if b:autopairs_enabled
- let b:autopairs_enabled = 0
- echo 'AutoPairs Disabled.'
- else
- let b:autopairs_enabled = 1
- echo 'AutoPairs Enabled.'
- end
- return ''
-endf
-
-func! s:sortByLength(i1, i2)
- return len(a:i2[0])-len(a:i1[0])
-endf
-
-func! AutoPairsInit()
- let b:autopairs_loaded = 1
- if !exists('b:autopairs_enabled')
- let b:autopairs_enabled = 1
- end
-
- if !exists('b:AutoPairs')
- let b:AutoPairs = AutoPairsDefaultPairs()
- end
-
- if !exists('b:AutoPairsMoveCharacter')
- let b:AutoPairsMoveCharacter = g:AutoPairsMoveCharacter
- end
-
- let b:autopairs_return_pos = 0
- let b:autopairs_saved_pair = [0, 0]
- let b:AutoPairsList = []
-
- " buffer level map pairs keys
- " n - do not map the first charactor of closed pair to close key
- " m - close key jumps through multi line
- " s - close key jumps only in the same line
- for [open, close] in items(b:AutoPairs)
- let o = open[-1:-1]
- let c = close[0]
- let opt = {'mapclose': 1, 'multiline':1}
- let opt['key'] = c
- if o == c
- let opt['multiline'] = 0
- end
- let m = matchlist(close, '\v(.*)//(.*)$')
- if len(m) > 0
- if m[2] =~ 'n'
- let opt['mapclose'] = 0
- end
- if m[2] =~ 'm'
- let opt['multiline'] = 1
- end
- if m[2] =~ 's'
- let opt['multiline'] = 0
- end
- let ks = matchlist(m[2], '\vk(.)')
- if len(ks) > 0
- let opt['key'] = ks[1]
- let c = opt['key']
- end
- let close = m[1]
- end
- call AutoPairsMap(o)
- if o != c && c != '' && opt['mapclose']
- call AutoPairsMap(c)
- end
- let b:AutoPairsList += [[open, close, opt]]
- endfor
-
- " sort pairs by length, longer pair should have higher priority
- let b:AutoPairsList = sort(b:AutoPairsList, "s:sortByLength")
-
- for item in b:AutoPairsList
- let [open, close, opt] = item
- if open == "'" && open == close
- let item[0] = '\v(^|\W)\zs'''
- end
- endfor
-
-
- for key in split(b:AutoPairsMoveCharacter, '\s*')
- let escaped_key = substitute(key, "'", "''", 'g')
- execute 'inoremap <silent> <buffer> <M-'.key."> <C-R>=AutoPairsMoveCharacter('".escaped_key."')<CR>"
- endfor
-
- " Still use <buffer> level mapping for <BS> <SPACE>
- if g:AutoPairsMapBS
- " Use <C-R> instead of <expr> for issue #14 sometimes press BS output strange words
- execute 'inoremap <buffer> <silent> <BS> <C-R>=AutoPairsDelete()<CR>'
- end
-
- if g:AutoPairsMapCh
- execute 'inoremap <buffer> <silent> <C-h> <C-R>=AutoPairsDelete()<CR>'
- endif
-
- if g:AutoPairsMapSpace
- " Try to respect abbreviations on a <SPACE>
- let do_abbrev = ""
- if v:version == 703 && has("patch489") || v:version > 703
- let do_abbrev = "<C-]>"
- endif
- execute 'inoremap <buffer> <silent> <SPACE> '.do_abbrev.'<C-R>=AutoPairsSpace()<CR>'
- end
-
- if g:AutoPairsShortcutFastWrap != ''
- execute 'inoremap <buffer> <silent> '.g:AutoPairsShortcutFastWrap.' <C-R>=AutoPairsFastWrap()<CR>'
- end
-
- if g:AutoPairsShortcutBackInsert != ''
- execute 'inoremap <buffer> <silent> '.g:AutoPairsShortcutBackInsert.' <C-R>=AutoPairsBackInsert()<CR>'
- end
-
- if g:AutoPairsShortcutToggle != ''
- " use <expr> to ensure showing the status when toggle
- execute 'inoremap <buffer> <silent> <expr> '.g:AutoPairsShortcutToggle.' AutoPairsToggle()'
- execute 'noremap <buffer> <silent> '.g:AutoPairsShortcutToggle.' :call AutoPairsToggle()<CR>'
- end
-
- if g:AutoPairsShortcutJump != ''
- execute 'inoremap <buffer> <silent> ' . g:AutoPairsShortcutJump. ' <ESC>:call AutoPairsJump()<CR>a'
- execute 'noremap <buffer> <silent> ' . g:AutoPairsShortcutJump. ' :call AutoPairsJump()<CR>'
- end
-
- if &keymap != ''
- let l:imsearch = &imsearch
- let l:iminsert = &iminsert
- let l:imdisable = &imdisable
- execute 'setlocal keymap=' . &keymap
- execute 'setlocal imsearch=' . l:imsearch
- execute 'setlocal iminsert=' . l:iminsert
- if l:imdisable
- execute 'setlocal imdisable'
- else
- execute 'setlocal noimdisable'
- end
- end
-
-endf
-
-func! s:ExpandMap(map)
- let map = a:map
- let map = substitute(map, '\(<Plug>\w\+\)', '\=maparg(submatch(1), "i")', 'g')
- let map = substitute(map, '\(<Plug>([^)]*)\)', '\=maparg(submatch(1), "i")', 'g')
- return map
-endf
-
-func! AutoPairsTryInit()
- if exists('b:autopairs_loaded')
- return
- end
-
- " for auto-pairs starts with 'a', so the priority is higher than supertab and vim-endwise
- "
- " vim-endwise doesn't support <Plug>AutoPairsReturn
- " when use <Plug>AutoPairsReturn will cause <Plug> isn't expanded
- "
- " supertab doesn't support <SID>AutoPairsReturn
- " when use <SID>AutoPairsReturn will cause Duplicated <CR>
- "
- " and when load after vim-endwise will cause unexpected endwise inserted.
- " so always load AutoPairs at last
-
- " Buffer level keys mapping
- " comptible with other plugin
- if g:AutoPairsMapCR
- if v:version == 703 && has('patch32') || v:version > 703
- " VIM 7.3 supports advancer maparg which could get <expr> info
- " then auto-pairs could remap <CR> in any case.
- let info = maparg('<CR>', 'i', 0, 1)
- if empty(info)
- let old_cr = '<CR>'
- let is_expr = 0
- else
- let old_cr = info['rhs']
- let old_cr = s:ExpandMap(old_cr)
- let old_cr = substitute(old_cr, '<SID>', '<SNR>' . info['sid'] . '_', 'g')
- let is_expr = info['expr']
- let wrapper_name = '<SID>AutoPairsOldCRWrapper73'
- endif
- else
- " VIM version less than 7.3
- " the mapping's <expr> info is lost, so guess it is expr or not, it's
- " not accurate.
- let old_cr = maparg('<CR>', 'i')
- if old_cr == ''
- let old_cr = '<CR>'
- let is_expr = 0
- else
- let old_cr = s:ExpandMap(old_cr)
- " old_cr contain (, I guess the old cr is in expr mode
- let is_expr = old_cr =~ '\V(' && toupper(old_cr) !~ '\V<C-R>'
-
- " The old_cr start with " it must be in expr mode
- let is_expr = is_expr || old_cr =~ '\v^"'
- let wrapper_name = '<SID>AutoPairsOldCRWrapper'
- end
- end
-
- if old_cr !~ 'AutoPairsReturn'
- if is_expr
- " remap <expr> to `name` to avoid mix expr and non-expr mode
- execute 'inoremap <buffer> <expr> <script> '. wrapper_name . ' ' . old_cr
- let old_cr = wrapper_name
- end
- " Always silent mapping
- execute 'inoremap <script> <buffer> <silent> <CR> '.old_cr.'<SID>AutoPairsReturn'
- end
- endif
- call AutoPairsInit()
-endf
-
-" Always silent the command
-inoremap <silent> <SID>AutoPairsReturn <C-R>=AutoPairsReturn()<CR>
-imap <script> <Plug>AutoPairsReturn <SID>AutoPairsReturn
-
-
-au BufEnter * :call AutoPairsTryInit()
diff --git a/plugin/emmet.vim b/plugin/emmet.vim
deleted file mode 100644
index 927a467..0000000
--- a/plugin/emmet.vim
+++ /dev/null
@@ -1,177 +0,0 @@
-"=============================================================================
-" File: emmet.vim
-" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
-" Last Change: 26-Jul-2015.
-" Version: 0.86
-" WebPage: http://github.com/mattn/emmet-vim
-" Description: vim plugins for HTML and CSS hi-speed coding.
-" SeeAlso: http://emmet.io/
-" Usage:
-"
-" This is vim script support expanding abbreviation like emmet.
-" ref: http://emmet.io/
-"
-" Type abbreviation
-" +-------------------------------------
-" | html:5_
-" +-------------------------------------
-" "_" is a cursor position. and type "<c-y>," (Ctrl+y and Comma)
-" NOTE: Don't worry about key map. you can change it easily.
-" +-------------------------------------
-" | <!DOCTYPE HTML>
-" | <html lang="en">
-" | <head>
-" | <title></title>
-" | <meta charset="UTF-8">
-" | </head>
-" | <body>
-" | _
-" | </body>
-" | </html>
-" +-------------------------------------
-" Type following
-" +-------------------------------------
-" | div#foo$*2>div.bar
-" +-------------------------------------
-" And type "<c-y>,"
-" +-------------------------------------
-" |<div id="foo1">
-" | <div class="bar">_</div>
-" |</div>
-" |<div id="foo2">
-" | <div class="bar"></div>
-" |</div>
-" +-------------------------------------
-"
-" Tips:
-"
-" You can customize behavior of expanding with overriding config.
-" This configuration will be marged at loading plugin.
-"
-" let g:user_emmet_settings = {
-" \ 'indentation' : ' ',
-" \ 'perl' : {
-" \ 'aliases' : {
-" \ 'req' : 'require '
-" \ },
-" \ 'snippets' : {
-" \ 'use' : "use strict\nuse warnings\n\n",
-" \ 'warn' : "warn \"|\";",
-" \ }
-" \ }
-" \}
-"
-" You can set language attribute in html using 'emmet_settings.lang'.
-"
-" GetLatestVimScripts: 2981 1 :AutoInstall: emmet.vim
-" script type: plugin
-
-if &compatible || v:version < 702 || (exists('g:loaded_emmet_vim') && g:loaded_emmet_vim)
- finish
-endif
-let g:loaded_emmet_vim = 1
-
-let s:save_cpo = &cpoptions
-set cpoptions&vim
-
-if !exists('g:emmet_html5')
- let g:emmet_html5 = 1
-endif
-
-if !exists('g:emmet_docroot')
- let g:emmet_docroot = {}
-endif
-
-if !exists('g:emmet_debug')
- let g:emmet_debug = 0
-endif
-
-if !exists('g:emmet_curl_command')
- let g:emmet_curl_command = 'curl -s -L -A Mozilla/5.0'
-endif
-
-if !exists('g:user_emmet_leader_key')
- let g:user_emmet_leader_key = '<c-y>'
-endif
-
-function! s:install_plugin(mode, buffer)
- let buffer = a:buffer ? '<buffer>' : ''
- let items = [
- \ {'mode': 'i', 'var': 'user_emmet_expandabbr_key', 'key': ',', 'plug': 'emmet-expand-abbr', 'func': '<c-r>=emmet#util#closePopup()<cr><c-r>=emmet#expandAbbr(0,"")<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_expandabbr_key', 'key': ',', 'plug': 'emmet-expand-abbr', 'func': ':call emmet#expandAbbr(3,"")<cr>'},
- \ {'mode': 'v', 'var': 'user_emmet_expandabbr_key', 'key': ',', 'plug': 'emmet-expand-abbr', 'func': ':call emmet#expandAbbr(2,"")<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_expandword_key', 'key': ';', 'plug': 'emmet-expand-word', 'func': '<c-r>=emmet#util#closePopup()<cr><c-r>=emmet#expandAbbr(1,"")<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_expandword_key', 'key': ';', 'plug': 'emmet-expand-word', 'func': ':call emmet#expandAbbr(1,"")<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_update_tag', 'key': 'u', 'plug': 'emmet-update-tag', 'func': '<c-r>=emmet#util#closePopup()<cr><c-r>=emmet#updateTag()<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_update_tag', 'key': 'u', 'plug': 'emmet-update-tag', 'func': ':call emmet#updateTag()<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_balancetaginward_key', 'key': 'd', 'plug': 'emmet-balance-tag-inward', 'func': '<esc>:call emmet#balanceTag(1)<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_balancetaginward_key', 'key': 'd', 'plug': 'emmet-balance-tag-inward', 'func': ':call emmet#balanceTag(1)<cr>'},
- \ {'mode': 'v', 'var': 'user_emmet_balancetaginward_key', 'key': 'd', 'plug': 'emmet-balance-tag-inward', 'func': ':call emmet#balanceTag(2)<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_balancetagoutward_key', 'key': 'D', 'plug': 'emmet-balance-tag-outword', 'func': '<esc>:call emmet#balanceTag(-1)<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_balancetagoutward_key', 'key': 'D', 'plug': 'emmet-balance-tag-outword', 'func': ':call emmet#balanceTag(-1)<cr>'},
- \ {'mode': 'v', 'var': 'user_emmet_balancetagoutward_key', 'key': 'D', 'plug': 'emmet-balance-tag-outword', 'func': ':call emmet#balanceTag(-2)<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_next_key', 'key': 'n', 'plug': 'emmet-move-next', 'func': '<esc>:call emmet#moveNextPrev(0)<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_next_key', 'key': 'n', 'plug': 'emmet-move-next', 'func': ':call emmet#moveNextPrev(0)<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_prev_key', 'key': 'N', 'plug': 'emmet-move-prev', 'func': '<esc>:call emmet#moveNextPrev(1)<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_prev_key', 'key': 'N', 'plug': 'emmet-move-prev', 'func': ':call emmet#moveNextPrev(1)<cr>'},
- \ {'mode': 'i', 'var': '', 'key': '', 'plug': 'emmet-move-next-item', 'func': '<esc>:call emmet#moveNextPrevItem(0)<cr>'},
- \ {'mode': 'n', 'var': '', 'key': '', 'plug': 'emmet-move-next-item', 'func': ':call emmet#moveNextPrevItem(0)<cr>'},
- \ {'mode': 'i', 'var': '', 'key': '', 'plug': 'emmet-move-prev-item', 'func': '<esc>:call emmet#moveNextPrevItem(1)<cr>'},
- \ {'mode': 'n', 'var': '', 'key': '', 'plug': 'emmet-move-prev-item', 'func': ':call emmet#moveNextPrevItem(1)<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_imagesize_key', 'key': 'i', 'plug': 'emmet-image-size', 'func': '<c-r>=emmet#util#closePopup()<cr><c-r>=emmet#imageSize()<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_imagesize_key', 'key': 'i', 'plug': 'emmet-image-size', 'func': ':call emmet#imageSize()<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_togglecomment_key', 'key': '/', 'plug': 'emmet-toggle-comment', 'func': '<c-r>=emmet#util#closePopup()<cr><c-r>=emmet#toggleComment()<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_togglecomment_key', 'key': '/', 'plug': 'emmet-toggle-comment', 'func': ':call emmet#toggleComment()<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_splitjointag_key', 'key': 'j', 'plug': 'emmet-split-join-tag', 'func': '<esc>:call emmet#splitJoinTag()<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_splitjointag_key', 'key': 'j', 'plug': 'emmet-split-join-tag', 'func': ':call emmet#splitJoinTag()<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_removetag_key', 'key': 'k', 'plug': 'emmet-remove-tag', 'func': '<c-r>=emmet#util#closePopup()<cr><c-r>=emmet#removeTag()<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_removetag_key', 'key': 'k', 'plug': 'emmet-remove-tag', 'func': ':call emmet#removeTag()<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_anchorizeurl_key', 'key': 'a', 'plug': 'emmet-anchorize-url', 'func': '<c-r>=emmet#util#closePopup()<cr><c-r>=emmet#anchorizeURL(0)<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_anchorizeurl_key', 'key': 'a', 'plug': 'emmet-anchorize-url', 'func': ':call emmet#anchorizeURL(0)<cr>'},
- \ {'mode': 'i', 'var': 'user_emmet_anchorizesummary_key', 'key': 'A', 'plug': 'emmet-anchorize-summary', 'func': '<c-r>=emmet#util#closePopup()<cr><c-r>=emmet#anchorizeURL(1)<cr>'},
- \ {'mode': 'n', 'var': 'user_emmet_anchorizesummary_key', 'key': 'A', 'plug': 'emmet-anchorize-summary', 'func': ':call emmet#anchorizeURL(1)<cr>'},
- \ {'mode': 'v', 'var': 'user_emmet_mergelines_key', 'key': 'm', 'plug': 'emmet-merge-lines', 'func': ':call emmet#mergeLines()<cr>'},
- \ {'mode': 'v', 'var': 'user_emmet_codepretty_key', 'key': 'c', 'plug': 'emmet-code-pretty', 'func': ':call emmet#codePretty()<cr>'},
- \]
-
- let only_plug = get(g:, 'emmet_install_only_plug', 0)
- for item in items
- if a:mode !=# 'a' && stridx(a:mode, item.mode) == -1
- continue
- endif
- exe item.mode . 'noremap '. buffer .' <plug>(' . item.plug . ') ' . item.func
- if item.var != '' && !only_plug
- if exists('g:' . item.var)
- let key = eval('g:' . item.var)
- else
- let key = g:user_emmet_leader_key . item.key
- endif
- if !hasmapto('<plug>(' . item.plug . ')', item.mode) && !len(maparg(key, item.mode))
- exe item.mode . 'map ' . buffer . ' <unique> ' . key . ' <plug>(' . item.plug . ')'
- endif
- endif
- endfor
-
- if exists('g:user_emmet_complete_tag') && g:user_emmet_complete_tag
- if get(g:, 'user_emmet_install_global', 1)
- set omnifunc=emmet#completeTag
- else
- setlocal omnifunc=emmet#completeTag
- endif
- endif
-endfunction
-
-command! -nargs=0 -bar EmmetInstall call <SID>install_plugin(get(g:, 'user_emmet_mode', 'a'), 1)
-
-if get(g:, 'user_emmet_install_global', 1)
- call s:install_plugin(get(g:, 'user_emmet_mode', 'a'), 0)
-endif
-
-if get(g:, 'user_emmet_install_command', 1)
- command! -nargs=1 Emmet call emmet#expandAbbr(4, <q-args>)
-endif
-
-let &cpoptions = s:save_cpo
-unlet s:save_cpo
-
-" vim:set et:
diff --git a/plugin/endwise.vim b/plugin/endwise.vim
deleted file mode 100644
index 936daeb..0000000
--- a/plugin/endwise.vim
+++ /dev/null
@@ -1,212 +0,0 @@
-" Location: plugin/endwise.vim
-" Author: Tim Pope <http://tpo.pe/>
-" Version: 1.2
-" License: Same as Vim itself. See :help license
-" GetLatestVimScripts: 2386 1 :AutoInstall: endwise.vim
-
-if exists("g:loaded_endwise") || &cp
- finish
-endif
-let g:loaded_endwise = 1
-
-augroup endwise " {{{1
- autocmd!
- autocmd FileType lua
- \ let b:endwise_addition = 'end' |
- \ let b:endwise_words = 'function,do,then' |
- \ let b:endwise_pattern = '^\s*\zs\%(\%(local\s\+\)\=function\)\>\%(.*\<end\>\)\@!\|\<\%(then\|do\)\ze\s*$' |
- \ let b:endwise_syngroups = 'luaFunction,luaStatement,luaCond'
- autocmd FileType elixir
- \ let b:endwise_addition = 'end' |
- \ let b:endwise_words = 'do,fn' |
- \ let b:endwise_pattern = '.*[^.:@$]\zs\<\%(do\(:\)\@!\|fn\)\>\ze\%(.*[^.:@$]\<end\>\)\@!' |
- \ let b:endwise_syngroups = 'elixirBlockDefinition'
- autocmd FileType ruby
- \ let b:endwise_addition = 'end' |
- \ let b:endwise_words = 'module,class,def,if,unless,case,while,until,begin,do' |
- \ let b:endwise_pattern = '^\(.*=\)\?\s*\%(private\s\+\|protected\s\+\|public\s\+\|module_function\s\+\)*\zs\%(module\|class\|def\|if\|unless\|case\|while\|until\|for\|\|begin\)\>\%(.*[^.:@$]\<end\>\)\@!\|\<do\ze\%(\s*|.*|\)\=\s*$' |
- \ let b:endwise_syngroups = 'rubyModule,rubyClass,rubyDefine,rubyControl,rubyConditional,rubyRepeat'
- autocmd FileType crystal
- \ let b:endwise_addition = 'end' |
- \ let b:endwise_words = 'module,class,lib,macro,struct,union,enum,def,if,unless,ifdef,case,while,until,for,begin,do' |
- \ let b:endwise_pattern = '^\(.*=\)\?\s*\%(private\s\+\|protected\s\+\|public\s\+\|abstract\s\+\)*\zs\%(module\|class\|lib\|macro\|struct\|union\|enum\|def\|if\|unless\|ifdef\|case\|while\|until\|for\|begin\)\>\%(.*[^.:@$]\<end\>\)\@!\|\<do\ze\%(\s*|.*|\)\=\s*$' |
- \ let b:endwise_syngroups = 'crystalModule,crystalClass,crystalLib,crystalMacro,crystalStruct,crystalEnum,crystalDefine,crystalConditional,crystalRepeat,crystalControl'
- autocmd FileType sh,zsh
- \ let b:endwise_addition = '\=submatch(0)=="then" ? "fi" : submatch(0)=="case" ? "esac" : "done"' |
- \ let b:endwise_words = 'then,case,do' |
- \ let b:endwise_pattern = '\%(^\s*\zscase\>\ze\|\zs\<\%(do\|then\)\ze\s*$\)' |
- \ let b:endwise_syngroups = 'shConditional,shLoop,shIf,shFor,shRepeat,shCaseEsac,zshConditional,zshRepeat,zshDelimiter'
- autocmd FileType vb,vbnet,aspvbs
- \ let b:endwise_addition = 'End &' |
- \ let b:endwise_words = 'Function,Sub,Class,Module,Enum,Namespace' |
- \ let b:endwise_pattern = '\%(\<End\>.*\)\@<!\<&\>' |
- \ let b:endwise_syngroups = 'vbStatement,vbnetStorage,vbnetProcedure,vbnet.*Words,AspVBSStatement'
- autocmd FileType vim
- \ let b:endwise_addition = '\=submatch(0)=~"aug\\%[roup]" ? submatch(0) . " END" : "end" . submatch(0)' |
- \ let b:endwise_words = 'fu\%[nction],wh\%[ile],if,for,try,aug\%[roup]\%(\s\+\cEND\)\@!' |
- \ let b:endwise_end_pattern = '\%(end\%(fu\%[nction]\|wh\%[hile]\|if\|for\|try\)\)\|aug\%[roup]\%(\s\+\cEND\)' |
- \ let b:endwise_syngroups = 'vimFuncKey,vimNotFunc,vimCommand,vimAugroupKey,vimAugroup,vimAugroupError'
- autocmd FileType c,cpp,xdefaults,haskell
- \ let b:endwise_addition = '#endif' |
- \ let b:endwise_words = 'if,ifdef,ifndef' |
- \ let b:endwise_pattern = '^\s*#\%(if\|ifdef\|ifndef\)\>' |
- \ let b:endwise_syngroups = 'cPreCondit,cPreConditMatch,cCppInWrapper,xdefaultsPreProc'
- autocmd FileType objc
- \ let b:endwise_addition = '@end' |
- \ let b:endwise_words = 'interface,implementation' |
- \ let b:endwise_pattern = '^\s*@\%(interface\|implementation\)\>' |
- \ let b:endwise_syngroups = 'objcObjDef'
- autocmd FileType make
- \ let b:endwise_addition = '\="end" . submatch(0)' |
- \ let b:endwise_words = 'ifdef,ifndef,ifeq,ifneq,define' |
- \ let b:endwise_pattern = '^\s*\(d\zsef\zeine\|\zsif\zen\=\(def\|eq\)\)\>' |
- \ let b:endwise_syngroups = 'makePreCondit,makeDefine'
- autocmd FileType verilog
- \ let b:endwise_addition = '\="end" . submatch(0)' |
- \ let b:endwise_words = 'begin,module,case,function,primitive,specify,task' |
- \ let b:endwise_pattern = '\<\%(\zs\zebegin\|module\|case\|function\|primitive\|specify\|task\)\>.*$' |
- \ let b:endwise_syngroups = 'verilogConditional,verilogLabel,verilogStatement'
- autocmd FileType matlab
- \ let b:endwise_addition = 'end' |
- \ let b:endwise_words = 'function,if,for' |
- \ let b:endwise_syngroups = 'matlabStatement,matlabFunction,matlabConditional,matlabRepeat'
- autocmd FileType htmldjango
- \ let b:endwise_addition = '{% end& %}' |
- \ let b:endwise_words = 'autoescape,block,blocktrans,cache,comment,filter,for,if,ifchanged,ifequal,ifnotequal,language,spaceless,verbatim,with' |
- \ let b:endwise_syngroups = 'djangoTagBlock,djangoStatement'
- autocmd FileType htmljinja,jinja.html
- \ let b:endwise_addition = '{% end& %}' |
- \ let b:endwise_words = 'autoescape,block,cache,call,filter,for,if,macro,raw,set,trans,with' |
- \ let b:endwise_syngroups = 'jinjaTagBlock,jinjaStatement'
- autocmd FileType snippets
- \ let b:endwise_addition = 'endsnippet' |
- \ let b:endwise_words = 'snippet' |
- \ let b:endwise_syngroups = 'snipSnippet,snipSnippetHeader,snipSnippetHeaderKeyword'
- autocmd FileType * call s:abbrev()
-augroup END " }}}1
-
-function! s:abbrev()
- if exists('g:endwise_abbreviations')
- for word in split(get(b:, 'endwise_words', ''), ',')
- execute 'iabbrev <buffer><script>' word word.'<CR><SID>DiscretionaryEnd<Space><C-U><BS>'
- endfor
- endif
-endfunction
-
-function! s:teardownMappings()
- inoremap <buffer> <C-X><CR> <C-X><CR>
- inoremap <buffer> <CR> <CR>
-endfunction
-
-" Functions {{{1
-
-function! EndwiseDiscretionary()
- return <SID>crend(0)
-endfunction
-
-function! EndwiseAlways()
- return <SID>crend(1)
-endfunction
-
-" }}}1
-
-" Maps {{{1
-
-if empty(maparg("<Plug>DiscretionaryEnd"))
- inoremap <silent> <SID>DiscretionaryEnd <C-R>=<SID>crend(0)<CR>
- inoremap <silent> <SID>AlwaysEnd <C-R>=<SID>crend(1)<CR>
- imap <script> <Plug>DiscretionaryEnd <SID>DiscretionaryEnd
- imap <script> <Plug>AlwaysEnd <SID>AlwaysEnd
-endif
-
-if !exists('g:endwise_no_mappings')
- if maparg('<CR>','i') =~# '<C-R>=.*crend(.)<CR>\|<\%(Plug\|SNR\|SID\)>.*End'
- " Already mapped
- elseif maparg('<CR>','i') =~? '<cr>'
- exe "imap <script> <C-X><CR> ".maparg('<CR>','i')."<SID>AlwaysEnd"
- exe "imap <silent> <script> <CR> ".maparg('<CR>','i')."<SID>DiscretionaryEnd"
- elseif maparg('<CR>','i') =~# '<Plug>\w\+CR'
- exe "imap <C-X><CR> ".maparg('<CR>', 'i')."<Plug>AlwaysEnd"
- exe "imap <silent> <CR> ".maparg('<CR>', 'i')."<Plug>DiscretionaryEnd"
- else
- imap <script> <C-X><CR> <CR><SID>AlwaysEnd
- imap <CR> <CR><Plug>DiscretionaryEnd
- endif
- autocmd endwise CmdwinEnter * call s:teardownMappings()
-endif
-
-" }}}1
-
-" Code {{{1
-
-function! s:mysearchpair(beginpat,endpat,synidpat)
- let s:lastline = line('.')
- call s:synid()
- let line = searchpair(a:beginpat,'',a:endpat,'Wn','<SID>synid() !~# "^'.substitute(a:synidpat,'\\','\\\\','g').'$"',line('.')+50)
- return line
-endfunction
-
-function! s:crend(always)
- let n = ""
- if !exists("b:endwise_addition") || !exists("b:endwise_words") || !exists("b:endwise_syngroups")
- return n
- endif
- let synids = join(map(split(b:endwise_syngroups, ','), 'hlID(v:val)'), ',')
- let wordchoice = '\%('.substitute(b:endwise_words,',','\\|','g').'\)'
- if exists("b:endwise_pattern")
- let beginpat = substitute(b:endwise_pattern,'&',substitute(wordchoice,'\\','\\&','g'),'g')
- else
- let beginpat = '\<'.wordchoice.'\>'
- endif
- let lnum = line('.') - 1
- let space = matchstr(getline(lnum),'^\s*')
- let col = match(getline(lnum),beginpat) + 1
- let word = matchstr(getline(lnum),beginpat)
- let endword = substitute(word,'.*',b:endwise_addition,'')
- let y = n.endword."\<C-O>O"
- if exists("b:endwise_end_pattern")
- let endpat = '\w\@<!'.substitute(word, '.*', substitute(b:endwise_end_pattern, '\\', '\\\\', 'g'), '').'\w\@!'
- elseif b:endwise_addition[0:1] ==# '\='
- let endpat = '\w\@<!'.endword.'\w\@!'
- else
- let endpat = '\w\@<!'.substitute('\w\+', '.*', b:endwise_addition, '').'\w\@!'
- endif
- let synidpat = '\%('.substitute(synids,',','\\|','g').'\)'
- if a:always
- return y
- elseif col <= 0 || synID(lnum,col,1) !~ '^'.synidpat.'$'
- return n
- elseif getline('.') !~# '^\s*#\=$'
- return n
- endif
- let line = s:mysearchpair(beginpat,endpat,synidpat)
- " even is false if no end was found, or if the end found was less
- " indented than the current line
- let even = strlen(matchstr(getline(line),'^\s*')) >= strlen(space)
- if line == 0
- let even = 0
- endif
- if !even && line == line('.') + 1
- return y
- endif
- if even
- return n
- endif
- return y
-endfunction
-
-function! s:synid()
- " Checking this helps to force things to stay in sync
- while s:lastline < line('.')
- let s = synID(s:lastline,indent(s:lastline)+1,1)
- let s:lastline = nextnonblank(s:lastline + 1)
- endwhile
-
- let s = synID(line('.'),col('.'),1)
- let s:lastline = line('.')
- return s
-endfunction
-
-" }}}1
-
-" vim:set sw=2 sts=2:
diff --git a/plugin/ragtag.vim b/plugin/ragtag.vim
deleted file mode 100644
index 5a61575..0000000
--- a/plugin/ragtag.vim
+++ /dev/null
@@ -1,571 +0,0 @@
-" ragtag.vim - Ghetto XML/HTML mappings (formerly allml.vim)
-" Author: Tim Pope <http://tpo.pe/>
-" Version: 2.0
-" GetLatestVimScripts: 1896 1 :AutoInstall: ragtag.vim
-
-if exists("g:loaded_ragtag") || &cp || v:version < 700
- finish
-endif
-let g:loaded_ragtag = 1
-
-if !exists('g:html_indent_inctags')
- let g:html_indent_inctags = 'body,head,html,tbody,p,li,dt,dd'
-endif
-if !exists('g:html_indent_autotags')
- let g:html_indent_autotags = 'wbr'
-endif
-if !exists('g:html_indent_script1')
- let g:html_indent_script1 = 'inc'
-endif
-if !exists('g:html_indent_style1')
- let g:html_indent_style1 = 'inc'
-endif
-
-augroup ragtag
- autocmd!
- autocmd BufReadPost * if ! did_filetype() && getline(1)." ".getline(2).
- \ " ".getline(3) =~? '<\%(!DOCTYPE \)\=html\>' | setf html | endif
- autocmd FileType *html*,wml,jsp,gsp,mustache,smarty call s:Init()
- autocmd FileType php,asp*,cf,mason,eruby,liquid,jst,eelixir call s:Init()
- autocmd FileType xml,xslt,xsd,docbk call s:Init()
- autocmd FileType javascript.jsx,jsx,javascriptreact,handlebars call s:Init()
- autocmd FileType typescript.tsx,tsx,typescriptreact call s:Init()
- autocmd InsertLeave * call s:Leave()
- autocmd CursorHold * if exists("b:loaded_ragtag") | call s:Leave() | endif
-augroup END
-
-inoremap <silent> <Plug>ragtagHtmlComplete <C-R>=<SID>htmlEn()<CR><C-X><C-O><C-P><C-R>=<SID>htmlDis()<CR><C-N>
-
-" Public interface, for if you have your own filetypes to activate on
-function! RagtagInit()
- call s:Init()
-endfunction
-
-function! AllmlInit()
- call s:Init()
-endfunction
-
-function! s:isFiletype(ft)
- return index(split(&filetype, '\.'), a:ft) >= 0
-endfunction
-
-function! s:Init()
- let b:loaded_ragtag = 1
- if s:subtype() == "xml"
- imap <script> <buffer> <C-X>! <?xml version="1.0" encoding="<C-R>=toupper(<SID>charset())<CR>"?>
- elseif s:subtype() == "xhtml"
- imap <script> <buffer> <C-X>! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- else
- imap <script> <buffer> <C-X>! <!DOCTYPE html>
- endif
-
- if empty(&l:define)
- let &l:define = '\<id=["'']\='
- let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') . '|setl def='
- endif
-
- imap <silent> <buffer> <C-X># <C-R>=<SID>charsetTag()<CR>
- inoremap <silent> <buffer> <SID>HtmlComplete <C-R>=<SID>htmlEn()<CR><C-X><C-O><C-P><C-R>=<SID>htmlDis()<CR><C-N>
- imap <buffer> <C-X>H <SID>HtmlComplete
- inoremap <silent> <buffer> <C-X>$ <C-R>=<SID>javascriptIncludeTag()<CR>
- inoremap <silent> <buffer> <C-X>@ <C-R>=<SID>stylesheetTag()<CR>
- inoremap <silent> <buffer> <C-X><Space> <Esc>ciW<Lt><C-R>"<C-R>=<SID>tagextras()<CR>></<C-R>"><Esc>F<i
- inoremap <silent> <buffer> <C-X><CR> <Esc>ciW<Lt><C-R>"<C-R>=<SID>tagextras()<CR>><CR></<C-R>"><Esc>O
- if exists("&omnifunc")
- inoremap <silent> <buffer> <C-X>/ <Lt>/<C-R>=<SID>htmlEn()<CR><C-X><C-O><C-R>=<SID>htmlDis()<CR><C-R>=<SID>reindent()<CR>
- if exists(":XMLns")
- XMLns xhtml10s
- endif
- else
- inoremap <silent> <buffer> <C-X>/ <Lt>/><Left>
- endif
- let b:surround_{char2nr("p")} = "<p>\n\t\r\n</p>"
- let b:surround_{char2nr("d")} = "<div\1div: \r^[^ ]\r &\1>\n\t\r\n</div>"
- imap <buffer> <C-X><C-_> <C-X>/
- imap <buffer> <SID>ragtagOopen <C-X><Lt><Space>
- imap <buffer> <SID>ragtagOclose <Space><C-X>><Left><Left>
- if s:isFiletype('php')
- inoremap <buffer> <C-X><Lt> <?php
- inoremap <buffer> <C-X>> ?>
- inoremap <buffer> <SID>ragtagOopen <?php<Space>echo<Space>
- let b:surround_45 = "<?php \r ?>"
- let b:surround_61 = "<?php echo \r ?>"
- elseif s:isFiletype('htmltt') || s:isFiletype('tt2html')
- inoremap <buffer> <C-X><Lt> [%
- inoremap <buffer> <C-X>> %]
- let b:surround_45 = "[% \r %]"
- let b:surround_61 = "[% \r %]"
- if !exists("b:surround_101")
- let b:surround_101 = "[% \r %]\n[% END %]"
- endif
- elseif s:isFiletype('mustache')
- inoremap <buffer> <SID>ragtagOopen {{<Space>
- inoremap <buffer> <SID>ragtagOclose <Space>}}<Left><Left>
- inoremap <buffer> <C-X><Lt> {{
- inoremap <buffer> <C-X>> }}
- let b:surround_45 = "{{ \r }}"
- let b:surround_61 = "{{ \r }}"
- elseif s:isFiletype('django') || s:isFiletype('htmldjango') || s:isFiletype('liquid') || s:isFiletype('htmljinja')
- inoremap <buffer> <SID>ragtagOopen {{<Space>
- inoremap <buffer> <SID>ragtagOclose <Space>}}<Left><Left>
- inoremap <buffer> <C-X><Lt> {%
- inoremap <buffer> <C-X>> %}
- let b:surround_45 = "{% \r %}"
- let b:surround_61 = "{{ \r }}"
- elseif s:isFiletype('mason')
- inoremap <buffer> <SID>ragtagOopen <&<Space>
- inoremap <buffer> <SID>ragtagOclose <Space>&><Left><Left>
- inoremap <buffer> <C-X><Lt> <%
- inoremap <buffer> <C-X>> %>
- let b:surround_45 = "<% \r %>"
- let b:surround_61 = "<& \r &>"
- elseif s:isFiletype('cf')
- inoremap <buffer> <SID>ragtagOopen <cfoutput>
- inoremap <buffer> <SID>ragtagOclose </cfoutput><Left><C-Left><Left>
- inoremap <buffer> <C-X><Lt> <cf
- inoremap <buffer> <C-X>> >
- let b:surround_45 = "<cf\r>"
- let b:surround_61 = "<cfoutput>\r</cfoutput>"
- elseif s:isFiletype('smarty')
- inoremap <buffer> <SID>ragtagOopen {
- inoremap <buffer> <SID>ragtagOclose }
- inoremap <buffer> <C-X><Lt> {
- inoremap <buffer> <C-X>> }
- let b:surround_45 = "{\r}"
- let b:surround_61 = "{\r}"
- elseif s:isFiletype('handlebars')
- inoremap <buffer> <SID>ragtagOopen {{
- inoremap <buffer> <SID>ragtagOclose }}
- inoremap <buffer> <C-X><Lt> {{
- inoremap <buffer> <C-X>> }}
- let b:surround_45 = "{{\r}}"
- let b:surround_61 = "{{\r}}"
- elseif &filetype ==# 'html'
- inoremap <buffer> <SID>ragtagOopen <!--#echo var=
- inoremap <buffer> <C-X><Lt> <!--#
- inoremap <buffer> <C-X>> -->
- let b:surround_45 = "<!--#\r -->"
- let b:surround_61 = "<!--#echo var=\r -->"
- else
- inoremap <buffer> <SID>ragtagOopen <%=<Space>
- inoremap <buffer> <C-X><Lt> <%
- inoremap <buffer> <C-X>> %>
- let b:surround_45 = "<% \r %>"
- let b:surround_61 = "<%= \r %>"
- endif
- imap <script> <buffer> <C-X>= <SID>ragtagOopen<SID>ragtagOclose<Left>
- imap <script> <buffer> <C-X>+ <C-V><NL><Esc>I<SID>ragtagOopen<Esc>A<SID>ragtagOclose<Esc>F<NL>s
- " <%\n\n%>
- if s:isFiletype('cf')
- inoremap <buffer> <C-X>] <cfscript><CR></cfscript><Esc>O
- elseif s:isFiletype('mason')
- inoremap <buffer> <C-X>] <%perl><CR></%perl><Esc>O
- elseif &filetype ==# 'html' || &filetype ==# 'xml' || &filetype ==# 'xhtml'
- imap <buffer> <C-X>] <script<C-R>=<SID>javascriptType()<CR>><CR></script><Esc>O
- else
- imap <buffer> <C-X>] <C-X><Lt><CR><C-X>><Esc>O
- endif
- " <% %>
- if s:isFiletype('eruby') || s:isFiletype('jst')
- inoremap <buffer> <C-X>- <%<Space><Space>%><Esc>2hi
- inoremap <buffer> <C-X>_ <C-V><NL><Esc>I<%<Space><Esc>A<Space>%><Esc>F<NL>s
- elseif s:isFiletype('cf')
- inoremap <buffer> <C-X>- <cf><Left>
- inoremap <buffer> <C-X>_ <cfset ><Left>
- elseif s:isFiletype('smarty')
- imap <buffer> <C-X>- <C-X><Lt><C-X>><Esc>i
- imap <buffer> <C-X>_ <C-V><NL><Esc>I<C-X><Lt><Esc>A<C-X>><Esc>F<NL>s
- else
- imap <buffer> <C-X>- <C-X><Lt><Space><Space><C-X>><Esc>2hi
- imap <buffer> <C-X>_ <C-V><NL><Esc>I<C-X><Lt><Space><Esc>A<Space><C-X>><Esc>F<NL>s
- endif
- " Comments
- if s:isFiletype('aspperl') || s:isFiletype('aspvbs')
- imap <buffer> <C-X>' <C-X><Lt>'<Space><Space><C-X>><Esc>2hi
- imap <buffer> <C-X>" <C-V><NL><Esc>I<C-X><Lt>'<Space><Esc>A<Space><C-X>><Esc>F<NL>s
- let b:surround_35 = maparg("<C-X><Lt>","i")."' \r ".maparg("<C-X>>","i")
- elseif s:isFiletype('jsp') || s:isFiletype('gsp')
- inoremap <buffer> <C-X>' <Lt>%--<Space><Space>--%><Esc>4hi
- inoremap <buffer> <C-X>" <C-V><NL><Esc>I<%--<Space><Esc>A<Space>--%><Esc>F<NL>s
- let b:surround_35 = "<%-- \r --%>"
- elseif s:isFiletype('cf')
- inoremap <buffer> <C-X>' <Lt>!---<Space><Space>---><Esc>4hi
- inoremap <buffer> <C-X>" <C-V><NL><Esc>I<!---<Space><Esc>A<Space>---><Esc>F<NL>s
- setlocal commentstring=<!---%s--->
- let b:surround_35 = "<!--- \r --->"
- elseif &filetype ==# 'html' || &filetype ==# 'xml' || &filetype ==# 'xhtml'
- inoremap <buffer> <C-X>' <Lt>!--<Space><Space>--><Esc>3hi
- inoremap <buffer> <C-X>" <C-V><NL><Esc>I<!--<Space><Esc>A<Space>--><Esc>F<NL>s
- let b:surround_35 = "<!-- \r -->"
- elseif s:isFiletype('django') || s:isFiletype('htmldjango') || s:isFiletype('htmljinja')
- inoremap <buffer> <C-X>' {#<Space><Space>#}<Esc>2hi
- inoremap <buffer> <C-X>" <C-V><NL><Esc>I<C-X>{#<Space><Esc>A<Space>#}<Esc>F<NL>s
- let b:surround_35 = "{# \r #}"
- elseif s:isFiletype('liquid')
- inoremap <buffer> <C-X>' {%<Space>comment<Space>%}{%<Space>endcomment<Space>%}<Esc>15hi
- inoremap <buffer> <C-X>" <C-V><NL><Esc>I<C-X>{%<Space>comment<Space>%}<Esc>A{%<Space>endcomment<Space>%}<Esc>F<NL>s
- let b:surround_35 = "{% comment %}\r{% endcomment %}"
- elseif s:isFiletype('smarty')
- inoremap <buffer> <C-X>' {*<Space><Space>*}<Esc>2hi
- inoremap <buffer> <C-X>" <C-V><NL><Esc>I<C-X>{*<Space><Esc>A<Space>*}<Esc>F<NL>s
- let b:surround_35 = "{* \r *}"
- elseif s:isFiletype('handlebars')
- imap <script> <buffer> <C-X>= <SID>ragtagOopen<SID>ragtagOclose<Left><Left>
- inoremap <buffer> <C-X>_ <Esc>ciW{{#<C-R>"}}<CR>{{/<C-R>"}}<Esc>khi
- inoremap <buffer> <C-X>' {{!}}<Esc>hi
- inoremap <buffer> <C-X>" <C-V><NL><Esc>I{{!<Esc>A}}<Esc>F<NL>s
- else
- imap <buffer> <C-X>' <C-X><Lt>#<Space><Space><C-X>><Esc>2hi
- imap <buffer> <C-X>" <C-V><NL><Esc>I<C-X><Lt>#<Space><Esc>A<Space><C-X>><Esc>F<NL>s
- let b:surround_35 = maparg("<C-X><Lt>","i")."# \r ".maparg("<C-X>>","i")
- endif
- imap <buffer> <C-X>% <Plug>ragtagUrlEncode
- imap <buffer> <C-X>& <Plug>ragtagXmlEncode
- imap <buffer> <C-V>% <Plug>ragtagUrlV
- imap <buffer> <C-V>& <Plug>ragtagXmlV
- if !exists("b:did_indent")
- if s:subtype() == "xml"
- runtime! indent/xml.vim
- else
- runtime! indent/html.vim
- endif
- endif
- if exists("g:html_indent_tags") && g:html_indent_tags !~ '\\|p\>'
- let g:html_indent_tags = g:html_indent_tags.'\|p\|li\|dt\|dd'
- let g:html_indent_tags = g:html_indent_tags.'\|article\|aside\|audio\|bdi\|canvas\|command\|datalist\|details\|figcaption\|figure\|footer\|header\|hgroup\|mark\|meter\|nav\|output\|progress\|rp\|rt\|ruby\|section\|summary\|time\|video'
- endif
- set indentkeys+=!^F
- let b:surround_indent = 1
- silent doautocmd User Ragtag
- silent doautocmd User ragtag
-endfunction
-
-function! s:Leave()
- call s:disableescape()
-endfunction
-
-function! s:length(str)
- return strlen(substitute(a:str,'.','.','g'))
-endfunction
-
-function! s:repeat(str,cnt)
- let cnt = a:cnt
- let str = ""
- while cnt > 0
- let str = str . a:str
- let cnt = cnt - 1
- endwhile
- return str
-endfunction
-
-function! s:reindent()
- if (len(&indentexpr) || &cindent)
- return "\<C-F>"
- endif
- return ""
-endfun
-
-function! s:stylesheetType()
- if s:subtype() == 'html5'
- return ''
- else
- return ' type="text/css"'
- endif
-endfunction
-
-function! s:stylesheetTag()
- if !exists("b:ragtag_stylesheet_link_tag")
- if exists("b:allml_stylesheet_link_tag")
- let b:ragtag_stylesheet_link_tag = b:allml_stylesheet_link_tag
- else
- let b:ragtag_stylesheet_link_tag = '<link rel="stylesheet"'.s:stylesheetType()." href=\"/stylesheets/\r.css\" />"
- endif
- endif
- return s:insertTag(b:ragtag_stylesheet_link_tag)
-endfunction
-
-function! s:javascriptType()
- if s:subtype() == 'html5'
- return ''
- else
- return ' type="text/javascript"'
- endif
-endfunction
-
-function! s:javascriptIncludeTag()
- if !exists("b:ragtag_javascript_include_tag")
- if exists("b:allml_javascript_include_tag")
- let b:ragtag_javascript_include_tag = b:allml_javascript_include_tag
- else
- let b:ragtag_javascript_include_tag = '<script'.s:javascriptType()." src=\"/javascripts/\r.js\"></script>"
- endif
- endif
- return s:insertTag(b:ragtag_javascript_include_tag)
-endfunction
-
-function! s:insertTag(tag)
- let tag = a:tag
- if s:subtype() == "html"
- let tag = substitute(a:tag,'\s*/>','>','g')
- endif
- let before = matchstr(tag,'^.\{-\}\ze\r')
- let after = matchstr(tag,'\r\zs\%(.*\r\)\@!.\{-\}$')
- " middle isn't currently used
- let middle = matchstr(tag,'\r\zs.\{-\}\ze\r')
- return before.after.s:repeat("\<Left>",s:length(after))
-endfunction
-
-function! s:htmlEn()
- let b:ragtag_omni = &l:omnifunc
- let b:ragtag_isk = &l:isk
- let b:ragtag_completeopt = &l:completeopt
- " : is for namespaced xml attributes
- setlocal omnifunc=htmlcomplete#CompleteTags isk+=: completeopt=
- return ""
-endfunction
-
-function! s:htmlDis()
- if exists("b:ragtag_omni")
- let &l:omnifunc = b:ragtag_omni
- unlet b:ragtag_omni
- endif
- if exists("b:ragtag_isk")
- let &l:isk = b:ragtag_isk
- unlet b:ragtag_isk
- endif
- if exists("b:ragtag_completeopt")
- let &l:completeopt = b:ragtag_completeopt
- unlet b:ragtag_completeopt
- endif
- return ""
-endfunction
-
-function! s:subtype()
- let top = getline(1)."\n".getline(2)
- if (top =~ '<?xml\>' && &ft !~? 'html') || &ft =~? '^\%(xml\|xsd\|xslt\|docbk\)$'
- return "xml"
- elseif top =~? '\<xhtml\>'
- return 'xhtml'
- elseif top =~? '<!DOCTYPE html>'
- return 'html5'
- elseif top =~? '[^<]\<html\>'
- return "html"
- elseif s:isFiletype('xhtml')
- return "xhtml"
- elseif exists("b:loaded_ragtag")
- return "html5"
- else
- return ""
- endif
-endfunction
-
-function! s:closetagback()
- if s:subtype() == "html"
- return ">\<Left>"
- else
- return " />\<Left>\<Left>\<Left>"
- endif
-endfunction
-
-function! s:closetag()
- if s:subtype() == "html"
- return ">"
- else
- return " />"
- endif
-endfunction
-
-function! s:charset()
- let enc = &fileencoding
- if enc == ""
- let enc = &encoding
- endif
- if enc == "latin1"
- return "ISO-8859-1"
- elseif enc == ""
- return "US-ASCII"
- else
- return enc
- endif
-endfunction
-
-function! s:charsetTag()
- if s:subtype() == 'html5'
- return '<meta charset="'.s:charset().'"'.s:closetag()
- else
- return '<meta http-equiv="Content-Type" content="text/html; charset='.s:charset().'"'.s:closetag()
- endif
-endfunction
-
-function! s:tagextras()
- if s:subtype() == "xml"
- return ""
- elseif @" == 'html' && s:subtype() == 'xhtml'
- let lang = "en"
- if exists("$LANG") && $LANG =~ '^..'
- let lang = strpart($LANG,0,2)
- endif
- return ' xmlns="http://www.w3.org/1999/xhtml" lang="'.lang.'" xml:lang="'.lang.'"'
- elseif @" == 'style'
- return s:stylesheetType()
- elseif @" == 'script'
- return s:javascriptType()
- elseif @" == 'table'
- return ' cellspacing="0"'
- else
- return ""
- endif
-endfunction
-
-inoremap <silent> <SID>urlspace <C-R>=<SID>getinput()=~?'\%([?&]\<Bar>&\)[%a-z0-9._~+-]*=[%a-z0-9._~+-]*$'?'+':'%20'<CR>
-
-function! s:urltab(htmlesc)
- let line = s:getinput()
- let g:line = line
- if line =~ '[^ <>"'."'".']\@<!\w\+$'
- return ":"
- elseif line =~ '[^ <>"'."'".']\@<!\w\+:/\=/\=[%a-z0-9._~+-]*$'
- return "/"
- elseif line =~? '\%([?&]\|&\)[%a-z0-9._~+-]*$'
- return "="
- elseif line =~? '\%([?&]\|&\)[%a-z0-9._~+-]*=[%a-z0-9._~+-]*$'
- if a:htmlesc || synIDattr(synID(line('.'),col('.')-1,1),"name") =~ 'mlString$'
- return "&"
- else
- return "&"
- endif
- elseif line =~ '/$\|\.\w\+$'
- return "?"
- else
- return "/"
- endif
-endfunction
-
-function! s:toggleurlescape()
- let htmllayer = 0
- if exists("b:ragtag_escape_mode")
- if b:ragtag_escape_mode == "url"
- call s:disableescape()
- return ""
- elseif b:ragtag_escape_mode == "xml"
- let htmllayer = 1
- endif
- call s:disableescape()
- endif
- let b:ragtag_escape_mode = "url"
- imap <buffer> <BS> <Plug>ragtagBSUrl
- inoremap <buffer> <CR> %0A
- imap <script> <buffer> <Space> <SID>urlspace
- inoremap <buffer> <Tab> &
- inoremap <buffer> <Bar> %7C
- if htmllayer
- inoremap <silent> <buffer> <Tab> <C-R>=<SID>urltab(1)<CR>
- else
- inoremap <silent> <buffer> <Tab> <C-R>=<SID>urltab(0)<CR>
- endif
- let i = 33
- while i < 127
- " RFC3986: reserved = :/?#[]@ !$&'()*+,;=
- if nr2char(i) =~# '[|=A-Za-z0-9_.~-]'
- else
- call s:urlmap(nr2char(i))
- endif
- let i = i + 1
- endwhile
- return ""
-endfunction
-
-function! s:urlencode(char)
- let i = 0
- let repl = ""
- while i < strlen(a:char)
- let repl = repl . printf("%%%02X",char2nr(strpart(a:char,i,1)))
- let i = i + 1
- endwhile
- return repl
-endfunction
-
-function! s:urlmap(char)
- let repl = s:urlencode(a:char)
- exe "inoremap <buffer> ".a:char." ".repl
-endfunction
-
-function! s:urlv()
- return s:urlencode(nr2char(getchar()))
-endfunction
-
-function! s:togglexmlescape()
- if exists("b:ragtag_escape_mode")
- if b:ragtag_escape_mode == "xml"
- call s:disableescape()
- return ""
- endif
- call s:disableescape()
- endif
- let b:ragtag_escape_mode = "xml"
- imap <buffer> <BS> <Plug>ragtagBSXml
- inoremap <buffer> <Lt> <
- inoremap <buffer> > >
- inoremap <buffer> & &
- inoremap <buffer> " "
- return ""
-endfunction
-
-function! s:disableescape()
- if exists("b:ragtag_escape_mode")
- if b:ragtag_escape_mode == "xml"
- silent! iunmap <buffer> <BS>
- silent! iunmap <buffer> <Lt>
- silent! iunmap <buffer> >
- silent! iunmap <buffer> &
- silent! iunmap <buffer> "
- elseif b:ragtag_escape_mode == "url"
- silent! iunmap <buffer> <BS>
- silent! iunmap <buffer> <Tab>
- silent! iunmap <buffer> <CR>
- silent! iunmap <buffer> <Space>
- silent! iunmap <buffer> <Bar>
- let i = 33
- while i < 127
- if nr2char(i) =~# '[|A-Za-z0-9_.~-]'
- else
- exe "silent! iunmap <buffer> ".nr2char(i)
- endif
- let i = i + 1
- endwhile
- endif
- unlet b:ragtag_escape_mode
- endif
-endfunction
-
-function! s:getinput()
- return strpart(getline('.'),0,col('.')-1)
-endfunction
-
-function! s:bspattern(pattern)
- let start = s:getinput()
- let match = matchstr(start,'\%('.a:pattern.'\)$')
- if match == ""
- return "\<BS>"
- else
- return s:repeat("\<BS>",strlen(match))
- endif
-endfunction
-
-inoremap <silent> <Plug>ragtagBSUrl <C-R>=<SID>bspattern('%\x\x\=\<Bar>&')<CR>
-inoremap <silent> <Plug>ragtagBSXml <C-R>=<SID>bspattern('&#\=\w*;\<Bar><[^><]*>\=')<CR>
-inoremap <silent> <SID>ragtagUrlEncode <C-R>=<SID>toggleurlescape()<CR>
-inoremap <silent> <SID>ragtagXmlEncode <C-R>=<SID>togglexmlescape()<CR>
-inoremap <silent> <Plug>ragtagUrlEncode <C-R>=<SID>toggleurlescape()<CR>
-inoremap <silent> <Plug>ragtagXmlEncode <C-R>=<SID>togglexmlescape()<CR>
-inoremap <silent> <Plug>ragtagUrlV <C-R>=<SID>urlv()<CR>
-inoremap <silent> <Plug>ragtagXmlV <C-R>="&#".getchar().";"<CR>
-
-if exists("g:ragtag_global_maps")
- imap <C-X>H <Plug>ragtagHtmlComplete
- imap <C-X>/ </<Plug>ragtagHtmlComplete
- imap <C-X>% <Plug>ragtagUrlEncode
- imap <C-X>& <Plug>ragtagXmlEncode
- imap <C-V>% <Plug>ragtagUrlV
- imap <C-V>& <Plug>ragtagXmlV
-endif
diff --git a/plugin/rainbow.vim b/plugin/rainbow.vim
deleted file mode 100644
index 8d846de..0000000
--- a/plugin/rainbow.vim
+++ /dev/null
@@ -1,163 +0,0 @@
-"==============================================================================
-"Script Title: rainbow parentheses improved
-"Script Version: 2.52
-"Author: luochen1990, Francisco Lopes
-"Last Edited: 2013 Sep 12
-
-" By default, use rainbow colors copied from gruvbox colorscheme (https://github.com/morhetz/gruvbox).
-" They are generally good for both light and dark colorschemes.
-let s:guifgs = exists('g:rainbow_guifgs')? g:rainbow_guifgs : [
- \ '#458588',
- \ '#b16286',
- \ '#cc241d',
- \ '#d65d0e',
- \ '#458588',
- \ '#b16286',
- \ '#cc241d',
- \ '#d65d0e',
- \ '#458588',
- \ '#b16286',
- \ '#cc241d',
- \ '#d65d0e',
- \ '#458588',
- \ '#b16286',
- \ '#cc241d',
- \ '#d65d0e',
- \ ]
-
-let s:ctermfgs = exists('g:rainbow_ctermfgs')? g:rainbow_ctermfgs : [
- \ 'brown',
- \ 'Darkblue',
- \ 'darkgray',
- \ 'darkgreen',
- \ 'darkcyan',
- \ 'darkred',
- \ 'darkmagenta',
- \ 'brown',
- \ 'gray',
- \ 'black',
- \ 'darkmagenta',
- \ 'Darkblue',
- \ 'darkgreen',
- \ 'darkcyan',
- \ 'darkred',
- \ 'red',
- \ ]
-
-let s:max = has('gui_running')? len(s:guifgs) : len(s:ctermfgs)
-
-func! rainbow#load(...)
- if exists('b:loaded')
- cal rainbow#clear()
- endif
-
- if a:0 >= 1
- let b:loaded = a:1
- elseif &ft == 'cpp'
- let b:loaded = [
- \ ['(', ')'],
- \ ['\[', '\]'],
- \ ['{', '}'],
- \ ['\v%(<operator\_s*)@<!%(%(\i|^\_s*|template\_s*)@<=\<[<#=]@!|\<@<!\<[[:space:]<#=]@!)', '\v%(-)@<!\>']
- \ ]
- elseif &ft == 'rust' || &ft == 'cs' || &ft == 'java'
- let b:loaded = [
- \ ['(', ')'],
- \ ['\[', '\]'],
- \ ['{', '}'],
- \ ['\v%(\i|^\_s*)@<=\<[<#=]@!|\<@<!\<[[:space:]<#=]@!', '\v%(-)@<!\>']
- \ ]
- else
- let b:loaded = [ ['(', ')'], ['\[', '\]'], ['{', '}'] ]
- endif
-
- let b:operators = (a:0 < 2) ? '"\v[{\[(<_"''`#*/>)\]}]@![[:punct:]]|\*/@!|/[/*]@!|\<#@!|#@<!\>"' : a:2
-
- if b:operators != ''
- exe 'syn match op_lv0 '.b:operators
- let cmd = 'syn match %s %s containedin=%s contained'
- for [left , right] in b:loaded
- for each in range(1, s:max)
- exe printf(cmd, 'op_lv'.each, b:operators, 'lv'.each)
- endfor
- endfor
- endif
-
- let str = 'TOP'
- for each in range(1, s:max)
- let str .= ',lv'.each
- endfor
-
- let cmd = 'syn region %s matchgroup=%s start=+%s+ end=+%s+ containedin=%s contains=%s,%s,@Spell fold'
- for [left , right] in b:loaded
- for each in range(1, s:max)
- exe printf(cmd, 'lv'.each, 'lv'.each.'c', left, right, 'lv'.(each % s:max + 1), str, 'op_lv'.each)
- endfor
- endfor
-
- cal rainbow#activate()
-endfunc
-
-func! rainbow#clear()
- if exists('b:loaded')
- unlet b:loaded
- exe 'syn clear op_lv0'
- for each in range(1 , s:max)
- exe 'syn clear lv'.each
- exe 'syn clear op_lv'.each
- endfor
- endif
-endfunc
-
-func! rainbow#activate()
- if !exists('b:loaded')
- cal rainbow#load()
- endif
- exe 'hi default op_lv0 ctermfg='.s:ctermfgs[-1].' guifg='.s:guifgs[-1]
- for id in range(1 , s:max)
- let ctermfg = s:ctermfgs[(s:max - id) % len(s:ctermfgs)]
- let guifg = s:guifgs[(s:max - id) % len(s:guifgs)]
- exe 'hi default lv'.id.'c ctermfg='.ctermfg.' guifg='.guifg
- exe 'hi default op_lv'.id.' ctermfg='.ctermfg.' guifg='.guifg
- endfor
- exe 'syn sync fromstart'
- let b:active = 'active'
-endfunc
-
-func! rainbow#inactivate()
- if exists('b:active')
- exe 'hi clear op_lv0'
- for each in range(1, s:max)
- exe 'hi clear lv'.each.'c'
- exe 'hi clear op_lv'.each.''
- endfor
- exe 'syn sync fromstart'
- unlet b:active
- endif
-endfunc
-
-func! rainbow#toggle()
- if exists('b:active')
- cal rainbow#inactivate()
- else
- cal rainbow#activate()
- endif
-endfunc
-
-if exists('g:rainbow_active') && g:rainbow_active
- if exists('g:rainbow_load_separately')
- let ps = g:rainbow_load_separately
- for i in range(len(ps))
- if len(ps[i]) < 3
- exe printf('au syntax,colorscheme %s call rainbow#load(ps[%d][1])' , ps[i][0] , i)
- else
- exe printf('au syntax,colorscheme %s call rainbow#load(ps[%d][1] , ps[%d][2])' , ps[i][0] , i , i)
- endif
- endfor
- else
- au syntax,colorscheme * call rainbow#load()
- endif
-endif
-
-command! RainbowToggle call rainbow#toggle()
-command! RainbowLoad call rainbow#load()
diff --git a/plugin/rainbow_main.vim b/plugin/rainbow_main.vim
deleted file mode 100644
index 340ca20..0000000
--- a/plugin/rainbow_main.vim
+++ /dev/null
@@ -1,12 +0,0 @@
-" Copyright 2013 LuoChen (luochen1990@gmail.com). Licensed under the Apache License 2.0.
-
-if exists('s:loaded') || !(exists('g:rainbow_active') || exists('g:rainbow_conf')) | finish | endif | let s:loaded = 1
-
-command! RainbowToggle call rainbow_main#toggle()
-command! RainbowToggleOn call rainbow_main#load()
-command! RainbowToggleOff call rainbow_main#clear()
-
-if (exists('g:rainbow_active') && g:rainbow_active)
- auto syntax * call rainbow_main#load()
- auto colorscheme * call rainbow_main#load()
-endif