Merge remote-tracking branch 'tmp/master'
This commit is contained in:
commit
f19e6edb09
23 changed files with 2477 additions and 0 deletions
24
.gitmodules
vendored
Normal file
24
.gitmodules
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
[submodule "pack/plugins/start/rainbow"]
|
||||
path = pack/plugins/start/rainbow
|
||||
url = https://github.com/luochen1990/rainbow
|
||||
[submodule "pack/plugins/start/auto-pairs"]
|
||||
path = pack/plugins/start/auto-pairs
|
||||
url = https://github.com/jiangmiao/auto-pairs
|
||||
[submodule "pack/plugins/start/vim-endwise"]
|
||||
path = pack/plugins/start/vim-endwise
|
||||
url = https://github.com/tpope/vim-endwise
|
||||
[submodule "pack/plugins/start/vim-Grammalecte"]
|
||||
path = pack/plugins/start/vim-Grammalecte
|
||||
url = https://github.com/dpelle/vim-Grammalecte
|
||||
[submodule "pack/plugins/start/vim-sourcepawn"]
|
||||
path = pack/plugins/start/vim-sourcepawn
|
||||
url = https://github.com/withgod/vim-sourcepawn
|
||||
[submodule "pack/plugins/opt/vim-markdown"]
|
||||
path = pack/plugins/opt/vim-markdown
|
||||
url = https://github.com/plasticboy/vim-markdown
|
||||
[submodule "pack/plugins/start/vim-doge"]
|
||||
path = pack/plugins/start/vim-doge
|
||||
url = https://github.com/kkoomen/vim-doge
|
||||
[submodule "pack/plugins/start/vimtex"]
|
||||
path = pack/plugins/start/vimtex
|
||||
url = https://github.com/lervag/vimtex
|
54
README.md
54
README.md
|
@ -21,3 +21,57 @@ La police Fire Code est nécessaire pour XTerm.
|
|||
Mettez le fichier `tmux.conf` dans votre `$HOME` en le renommant `.tmux.conf`. Il faut ensuite mettre le fichier se trouvant dans `scripts` dans un dossier pouvant être exécuté et appelé directement en CLI. **Ce fichier n'est pas utile si vous n'avez pas de batterie et peut générer des bugs si vous n'en avez pas.**
|
||||
|
||||
Lorsque votre PC charge, une étoile apparait à côté du pourcentage de batterie: `[*]`. Cet emplacement est cependant vite si vous n'êtes pas connecté au secteur.
|
||||
|
||||
## FichiersVim
|
||||
|
||||
Mes fichiers de configuration de Vim. **Les extensions ne marchent que sur les versions de Vim 8.**
|
||||
|
||||
La touche `leader` est définie sur `\`.
|
||||
|
||||
La touche `localleader` est définie sur `;`.
|
||||
|
||||
### Installation
|
||||
|
||||
Il faut cloner le repos et déplacer tous les fichiers dans le dossier `~/.vim`.
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules https://git.gnous.eu/Rick/FichiersVim.git
|
||||
```
|
||||
|
||||
**Attention :** Cette opération va effacer votre configuration Vim actuelle. Je vous conseille de faire un backup juste avant.
|
||||
|
||||
### vimrc
|
||||
|
||||
N'oubliez pas de modifier la variable `g:grammalecte_cli_py` avec le chemin pour Grammalecte afin de faire marcher le plugin.
|
||||
|
||||
La touche Leader est mise sur Espace.
|
||||
|
||||
### vimrc.bepo
|
||||
|
||||
Le fichier vimrc.bepo est une configuration spéciale pour les claviers bépo. Vous pouvez la retrouver [sur le site officiel](https://bepo.fr/wiki/Vim#.7E.2F.vimrc). Si vous utilisez un clavier bépo, décommentez la première ligne du fichier vimrc.
|
||||
|
||||
### Sources
|
||||
|
||||
#### Plugins & thème installés
|
||||
|
||||
* Thème de couleurs : [vim-code-dark](https://github.com/tomasiser/vim-code-dark)
|
||||
* [Auto-pairs](https://github.com/jiangmiao/auto-pairs) : Créer la parenthèse/accolade/etc. fermante automatiquement.
|
||||
* [Endwise](https://github.com/tpope/vim-endwise) : Ferme le `if` ou le `while` (pour Bash par ex.).
|
||||
* [Grammalecte](https://github.com/dpelle/vim-Grammalecte) : Permet de corriger les fautes de français (n'oubliez pas d'installer [Grammalecte](https://grammalecte.net/) !).
|
||||
* [Rainbow](https://github.com/luochen1990/rainbow) : Colore les pairs de parenthèses et les accolades.
|
||||
* [Vim Doge](https://github.com/kkoomen/vim-doge) : Génère des commentaires.
|
||||
* [Syntaxe SourcePawn](https://github.com/withgod/vim-sourcepawn) : Coloration syntaxique et support pour le SourcePawn.
|
||||
* [Vimtex](https://vimawesome.com/plugin/vimtex) : outil très puissant pour l'utilisation de LaTeX.
|
||||
* [java_getset](https://www.vim.org/scripts/script.php?script_id=490) : script pour créer les getter et les setter en Java.
|
||||
|
||||
#### Plugins de l’ancienne version de ce dépôt qui seront remis plus tard
|
||||
|
||||
* [Emmet](https://github.com/mattn/emmet-vim) :
|
||||
* [Ragtag](https://github.com/tpope/vim-ragtag) :
|
||||
|
||||
#### Plugins non activés
|
||||
|
||||
* [Vim Markdown](https://github.com/plasticboy/vim-markdown) : Plugin pour gérer la syntaxe Markdown.
|
||||
* [Vim OrgMode](https://vimawesome.com/plugin/vim-orgmode) : pour avoir un support du OrgMode d'Emacs dans Vim (n'a pas cependant toutes les fonctionnalités et n'est plus maintenu). Il nécessite quelques plugins en plus qui sont listés ci dessous :
|
||||
* [SpeedDating](https://vimawesome.com/plugin/speeddating-vim) : incrémenter des dates avec C-A
|
||||
* [Universal Text Linking](http://www.vim.org/scripts/script.php?script_id=293) : lier les liens textes
|
||||
|
|
120
autoload/airline/themes/codedark.vim
Normal file
120
autoload/airline/themes/codedark.vim
Normal file
|
@ -0,0 +1,120 @@
|
|||
" 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 ? '231' : 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, '' ]
|
||||
\ }
|
||||
|
40
autoload/lightline/colorscheme/codedark.vim
Normal file
40
autoload/lightline/colorscheme/codedark.vim
Normal file
|
@ -0,0 +1,40 @@
|
|||
" =============================================================================
|
||||
" 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)
|
128
autoload/rainbow.vim
Normal file
128
autoload/rainbow.vim
Normal file
|
@ -0,0 +1,128 @@
|
|||
" Copyright 2013 LuoChen (luochen1990@gmail.com). Licensed under the Apache License 2.0.
|
||||
|
||||
if exists('s:loaded') | finish | endif | let s:loaded = 1
|
||||
|
||||
fun s:trim(s)
|
||||
return substitute(a:s, '\v^\s*(.{-})\s*$', '\1', '')
|
||||
endfun
|
||||
|
||||
fun s:concat(strs)
|
||||
return join(filter(a:strs, "v:val !~ '^[ ]*$'"), ',')
|
||||
endfun
|
||||
|
||||
fun s:resolve_parenthesis_with(init_state, p)
|
||||
let [paren, contained, containedin, contains_prefix, contains, op] = a:init_state
|
||||
let p = (type(a:p) == type([])) ? ((len(a:p) == 3) ? printf('start=#%s# step=%s end=#%s#', a:p[0], op, a:p[-1]) : printf('start=#%s# end=#%s#', a:p[0], a:p[-1])) : a:p "NOTE: preprocess the old style parentheses config
|
||||
|
||||
let ls = split(p, '\v%(%(start|step|end)\=(.)%(\1@!.)*\1[^ ]*|\w+%(\=[^ ]*)?) ?\zs', 0)
|
||||
for s in ls
|
||||
let [k, v] = [matchstr(s, '^[^=]\+\ze\(=\|$\)'), matchstr(s, '^[^=]\+=\zs.*')]
|
||||
if k == 'step'
|
||||
let op = s:trim(v)
|
||||
elseif k == 'contains_prefix'
|
||||
let contains_prefix = s:trim(v)
|
||||
elseif k == 'contains'
|
||||
let contains = s:concat([contains, s:trim(v)])
|
||||
elseif k == 'containedin'
|
||||
let containedin = s:concat([containedin, s:trim(v)])
|
||||
elseif k == 'contained'
|
||||
let contained = 1
|
||||
else
|
||||
let paren .= s
|
||||
endif
|
||||
endfor
|
||||
let rst = [paren, contained, containedin, contains_prefix, contains, op]
|
||||
"echom json_encode(rst)
|
||||
return rst
|
||||
endfun
|
||||
|
||||
fun s:resolve_parenthesis_from_config(config)
|
||||
return s:resolve_parenthesis_with(['', 0, '', a:config.contains_prefix, '', a:config.operators], a:config.parentheses_options)
|
||||
endfun
|
||||
|
||||
fun s:synID(prefix, group, lv, id)
|
||||
return a:prefix.'_lv'.a:lv.'_'.a:group.a:id
|
||||
endfun
|
||||
|
||||
fun s:synGroupID(prefix, group, lv)
|
||||
return a:prefix.a:group.'_lv'.a:lv
|
||||
endfun
|
||||
|
||||
fun rainbow#syn(config)
|
||||
let conf = a:config
|
||||
let prefix = conf.syn_name_prefix
|
||||
let cycle = conf.cycle
|
||||
|
||||
let glob_paran_opts = s:resolve_parenthesis_from_config(conf)
|
||||
let b:rainbow_loaded = cycle
|
||||
for id in range(len(conf.parentheses))
|
||||
let [paren, contained, containedin, contains_prefix, contains, op] = s:resolve_parenthesis_with(glob_paran_opts, conf.parentheses[id])
|
||||
for lv in range(cycle)
|
||||
let lv2 = ((lv + cycle - 1) % cycle)
|
||||
let [rid, pid, gid2] = [s:synID(prefix, 'r', lv, id), s:synID(prefix, 'p', lv, id), s:synGroupID(prefix, 'Regions', lv2)]
|
||||
|
||||
if len(op) > 2
|
||||
exe 'syn match '.s:synID(prefix, 'o', lv, id).' '.op.' containedin='.s:synID(prefix, 'r', lv, id).' contained'
|
||||
endif
|
||||
|
||||
let real_contained = (lv == 0)? (contained? 'contained ' : '') : 'contained '
|
||||
let real_containedin = (lv == 0)? s:concat([containedin, '@'.gid2]) : '@'.gid2
|
||||
let real_contains = s:concat([contains_prefix, contains])
|
||||
exe 'syn region '.rid.' matchgroup='.pid.' '.real_contained.'containedin='.real_containedin.' contains='.real_contains.' '.paren
|
||||
endfor
|
||||
endfor
|
||||
for lv in range(cycle)
|
||||
exe 'syn cluster '.s:synGroupID(prefix, 'Regions', lv).' contains='.join(map(range(len(conf.parentheses)), 's:synID(prefix, "r", lv, v:val)'), ',')
|
||||
exe 'syn cluster '.s:synGroupID(prefix, 'Parentheses', lv).' contains='.join(map(range(len(conf.parentheses)), 's:synID(prefix, "p", lv, v:val)'), ',')
|
||||
exe 'syn cluster '.s:synGroupID(prefix, 'Operators', lv).' contains='.join(map(range(len(conf.parentheses)), 's:synID(prefix, "o", lv, v:val)'), ',')
|
||||
endfor
|
||||
exe 'syn cluster '.prefix.'Regions contains='.join(map(range(cycle), '"@".s:synGroupID(prefix, "Regions", v:val)'), ',')
|
||||
exe 'syn cluster '.prefix.'Parentheses contains='.join(map(range(cycle), '"@".s:synGroupID(prefix, "Parentheses", v:val)'), ',')
|
||||
exe 'syn cluster '.prefix.'Operators contains='.join(map(range(cycle), '"@".s:synGroupID(prefix, "Operators", v:val)'), ',')
|
||||
if has_key(conf, 'after') | for cmd in conf.after | exe cmd | endfor | endif
|
||||
endfun
|
||||
|
||||
fun rainbow#syn_clear(config)
|
||||
let conf = a:config
|
||||
let prefix = conf.syn_name_prefix
|
||||
|
||||
for id in range(len(conf.parentheses))
|
||||
for lv in range(conf.cycle)
|
||||
let [rid, oid] = [s:synID(prefix, 'r', lv, id), s:synID(prefix, 'o', lv, id)]
|
||||
exe 'syn clear '.rid
|
||||
exe 'syn clear '.oid
|
||||
endfor
|
||||
endfor
|
||||
endfun
|
||||
|
||||
fun rainbow#hi(config)
|
||||
let conf = a:config
|
||||
let prefix = conf.syn_name_prefix
|
||||
|
||||
for id in range(len(conf.parentheses))
|
||||
for lv in range(conf.cycle)
|
||||
let [pid, oid] = [s:synID(prefix, 'p', lv, id), s:synID(prefix, 'o', lv, id)]
|
||||
let ctermfg = conf.ctermfgs[lv % len(conf.ctermfgs)]
|
||||
let guifg = conf.guifgs[lv % len(conf.guifgs)]
|
||||
let cterm = conf.cterms[lv % len(conf.cterms)]
|
||||
let gui = conf.guis[lv % len(conf.guis)]
|
||||
let hi_style = 'ctermfg='.ctermfg.' guifg='.guifg.(len(cterm) > 0 ? ' cterm='.cterm : '').(len(gui) > 0 ? ' gui='.gui : '')
|
||||
exe 'hi '.pid.' '.hi_style
|
||||
exe 'hi '.oid.' '.hi_style
|
||||
endfor
|
||||
endfor
|
||||
endfun
|
||||
|
||||
fun rainbow#hi_clear(config)
|
||||
let conf = a:config
|
||||
let prefix = conf.syn_name_prefix
|
||||
|
||||
for id in range(len(conf.parentheses))
|
||||
for lv in range(conf.cycle)
|
||||
let [pid, oid] = [s:synID(prefix, 'p', lv, id), s:synID(prefix, 'o', lv, id)]
|
||||
exe 'hi clear '.pid
|
||||
exe 'hi clear '.oid
|
||||
endfor
|
||||
endfor
|
||||
endfun
|
||||
|
136
autoload/rainbow_main.vim
Normal file
136
autoload/rainbow_main.vim
Normal file
|
@ -0,0 +1,136 @@
|
|||
" Copyright 2013 LuoChen (luochen1990@gmail.com). Licensed under the Apache License 2.0.
|
||||
|
||||
let s:rainbow_conf = {
|
||||
\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'],
|
||||
\ 'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'],
|
||||
\ 'guis': [''],
|
||||
\ 'cterms': [''],
|
||||
\ 'operators': '_,_',
|
||||
\ 'contains_prefix': 'TOP',
|
||||
\ 'parentheses_options': '',
|
||||
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],
|
||||
\ 'separately': {
|
||||
\ '*': {},
|
||||
\ 'markdown': {
|
||||
\ 'parentheses_options': 'containedin=markdownCode contained',
|
||||
\ },
|
||||
\ 'lisp': {
|
||||
\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'],
|
||||
\ },
|
||||
\ 'haskell': {
|
||||
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/\v\{\ze[^-]/ end=/}/ fold'],
|
||||
\ },
|
||||
\ 'ocaml': {
|
||||
\ 'parentheses': ['start=/(\ze[^*]/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/\[|/ end=/|\]/ fold', 'start=/{/ end=/}/ fold'],
|
||||
\ },
|
||||
\ 'tex': {
|
||||
\ 'parentheses_options': 'containedin=texDocZone',
|
||||
\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'],
|
||||
\ },
|
||||
\ 'vim': {
|
||||
\ 'parentheses_options': 'containedin=vimFuncBody,vimExecute',
|
||||
\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold'],
|
||||
\ },
|
||||
\ 'xml': {
|
||||
\ 'syn_name_prefix': 'xmlRainbow',
|
||||
\ 'parentheses': ['start=/\v\<\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'))?)*\>/ end=#</\z1># fold'],
|
||||
\ },
|
||||
\ 'xhtml': {
|
||||
\ 'parentheses': ['start=/\v\<\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'))?)*\>/ end=#</\z1># fold'],
|
||||
\ },
|
||||
\ 'html': {
|
||||
\ 'parentheses': ['start=/\v\<((script|style|area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold'],
|
||||
\ },
|
||||
\ 'lua': {
|
||||
\ 'parentheses': ["start=/(/ end=/)/", "start=/{/ end=/}/", "start=/\\v\\[\\ze($|[^[])/ end=/\\]/"],
|
||||
\ },
|
||||
\ 'perl': {
|
||||
\ 'syn_name_prefix': 'perlBlockFoldRainbow',
|
||||
\ },
|
||||
\ 'php': {
|
||||
\ 'syn_name_prefix': 'phpBlockRainbow',
|
||||
\ 'contains_prefix': '',
|
||||
\ 'parentheses': ['start=/(/ end=/)/ containedin=@htmlPreproc contains=@phpClTop', 'start=/\[/ end=/\]/ containedin=@htmlPreproc contains=@phpClTop', 'start=/{/ end=/}/ containedin=@htmlPreproc contains=@phpClTop', 'start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold contains_prefix=TOP'],
|
||||
\ },
|
||||
\ 'stylus': {
|
||||
\ 'parentheses': ['start=/{/ end=/}/ fold contains=@colorableGroup'],
|
||||
\ },
|
||||
\ 'css': 0,
|
||||
\ 'sh': 0,
|
||||
\ 'vimwiki': 0,
|
||||
\ }
|
||||
\}
|
||||
|
||||
fun s:eq(x, y)
|
||||
return type(a:x) == type(a:y) && a:x == a:y
|
||||
endfun
|
||||
|
||||
fun s:gcd(a, b)
|
||||
let [a, b, t] = [a:a, a:b, 0]
|
||||
while b != 0
|
||||
let t = b
|
||||
let b = a % b
|
||||
let a = t
|
||||
endwhile
|
||||
return a
|
||||
endfun
|
||||
|
||||
fun s:lcm(a, b)
|
||||
return (a:a / s:gcd(a:a, a:b)) * a:b
|
||||
endfun
|
||||
|
||||
fun rainbow_main#gen_config(ft)
|
||||
let g = exists('g:rainbow_conf')? g:rainbow_conf : {}
|
||||
"echom 'g:rainbow_conf:' string(g)
|
||||
let s = get(g, 'separately', {})
|
||||
"echom 'g:rainbow_conf.separately:' string(s)
|
||||
let dft_conf = extend(copy(s:rainbow_conf), g) | unlet dft_conf.separately
|
||||
"echom 'default config options:' string(dft_conf)
|
||||
let dx_conf = s:rainbow_conf.separately['*']
|
||||
"echom 'default star config:' string(dx_conf)
|
||||
let ds_conf = get(s:rainbow_conf.separately, a:ft, dx_conf)
|
||||
"echom 'default separately config:' string(ds_conf)
|
||||
let ux_conf = get(s, '*', ds_conf)
|
||||
"echom 'user star config:' string(ux_conf)
|
||||
let us_conf = get(s, a:ft, ux_conf)
|
||||
"echom 'user separately config:' string(us_conf)
|
||||
let af_conf = (s:eq(us_conf, 'default') ? ds_conf : us_conf)
|
||||
"echom 'almost finally config:' string(af_conf)
|
||||
if s:eq(af_conf, 0)
|
||||
return 0
|
||||
else
|
||||
let conf = extend(extend({'syn_name_prefix': substitute(a:ft, '\v\A+(\a)', '\u\1', 'g').'Rainbow'}, dft_conf), af_conf)
|
||||
let conf.cycle = (has('gui_running') || (has('termguicolors') && &termguicolors)) ? s:lcm(len(conf.guifgs), len(conf.guis)) : s:lcm(len(conf.ctermfgs), len(conf.cterms))
|
||||
return conf
|
||||
endif
|
||||
endfun
|
||||
|
||||
fun rainbow_main#gen_configs(ft)
|
||||
return filter(map(split(a:ft, '\v\.'), 'rainbow_main#gen_config(v:val)'), 'type(v:val) == type({})')
|
||||
endfun
|
||||
|
||||
fun rainbow_main#load()
|
||||
let b:rainbow_confs = rainbow_main#gen_configs(&filetype)
|
||||
for conf in b:rainbow_confs
|
||||
call rainbow#syn(conf)
|
||||
call rainbow#hi(conf)
|
||||
endfor
|
||||
endfun
|
||||
|
||||
fun rainbow_main#clear()
|
||||
if !exists('b:rainbow_confs') | return | endif
|
||||
for conf in b:rainbow_confs
|
||||
call rainbow#hi_clear(conf)
|
||||
call rainbow#syn_clear(conf)
|
||||
endfor
|
||||
unlet b:rainbow_confs
|
||||
endfun
|
||||
|
||||
fun rainbow_main#toggle()
|
||||
if exists('b:rainbow_confs')
|
||||
call rainbow_main#clear()
|
||||
else
|
||||
call rainbow_main#load()
|
||||
endif
|
||||
endfun
|
||||
|
18
base16/schemes/codedark/codedark.yaml
Normal file
18
base16/schemes/codedark/codedark.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
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"
|
72
base16/templates/putty/putty/base16-codedark.reg
Normal file
72
base16/templates/putty/putty/base16-codedark.reg
Normal file
|
@ -0,0 +1,72 @@
|
|||
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"
|
||||
|
123
base16/templates/shell/scripts/base16-codedark.sh
Normal file
123
base16/templates/shell/scripts/base16-codedark.sh
Normal file
|
@ -0,0 +1,123 @@
|
|||
#!/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
|
614
colors/codedark.vim
Normal file
614
colors/codedark.vim
Normal file
|
@ -0,0 +1,614 @@
|
|||
" 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
|
||||
|
||||
" Italicized comments
|
||||
if !exists("g:codedark_italics")
|
||||
let g:codedark_italics=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
|
||||
let s:cdSilver = {'gui': '#C0C0C0', 'cterm': s:cterm05, 'cterm256': '7'}
|
||||
|
||||
" 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:cdDiffGreenLight, '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', {})
|
||||
|
||||
" Legacy groups for official git.vim and diff.vim syntax
|
||||
hi! link diffAdded DiffAdd
|
||||
hi! link diffChanged DiffChange
|
||||
hi! link diffRemoved DiffDelete
|
||||
|
||||
if g:codedark_italics | call <sid>hi('Comment', s:cdGreen, {}, 'italic', {}) | else | call <sid>hi('Comment', s:cdGreen, {}, 'none', {}) | endif
|
||||
|
||||
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', {})
|
||||
if g:codedark_italics | call <sid>hi('SpecialComment', s:cdGreen, {}, 'italic', {}) | else | call <sid>hi('SpecialComment', s:cdGreen, {}, 'none', {}) | endif
|
||||
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)
|
||||
|
||||
|
||||
" Neovim Treesitter:
|
||||
call <sid>hi('TSError', s:cdRed, {}, 'none', {})
|
||||
call <sid>hi('TSPunctDelimiter', s:cdFront, {}, 'none', {})
|
||||
call <sid>hi('TSPunctBracket', s:cdFront, {}, 'none', {})
|
||||
call <sid>hi('TSPunctSpecial', s:cdFront, {}, 'none', {})
|
||||
" Constant
|
||||
call <sid>hi('TSConstant', s:cdYellow, {}, 'none', {})
|
||||
call <sid>hi('TSConstBuiltin', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('TSConstMacro', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TSStringRegex', s:cdOrange, {}, 'none', {})
|
||||
call <sid>hi('TSString', s:cdOrange, {}, 'none', {})
|
||||
call <sid>hi('TSStringEscape', s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi('TSCharacter', s:cdOrange, {}, 'none', {})
|
||||
call <sid>hi('TSNumber', s:cdLightGreen, {}, 'none', {})
|
||||
call <sid>hi('TSBoolean', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('TSFloat', s:cdLightGreen, {}, 'none', {})
|
||||
call <sid>hi('TSAnnotation', s:cdYellow, {}, 'none', {})
|
||||
call <sid>hi('TSAttribute', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TSNamespace', s:cdBlueGreen, {}, 'none', {})
|
||||
" Functions
|
||||
call <sid>hi('TSFuncBuiltin', s:cdYellow, {}, 'none', {})
|
||||
call <sid>hi('TSFunction', s:cdYellow, {}, 'none', {})
|
||||
call <sid>hi('TSFuncMacro', s:cdYellow, {}, 'none', {})
|
||||
call <sid>hi('TSParameter', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('TSParameterReference', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('TSMethod', s:cdYellow, {}, 'none', {})
|
||||
call <sid>hi('TSField', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('TSProperty', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('TSConstructor', s:cdBlueGreen, {}, 'none', {})
|
||||
" Keywords
|
||||
call <sid>hi('TSConditional', s:cdPink, {}, 'none', {})
|
||||
call <sid>hi('TSRepeat', s:cdPink, {}, 'none', {})
|
||||
call <sid>hi('TSLabel', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('TSKeyword', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('TSKeywordFunction', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('TSKeywordOperator', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('TSOperator', s:cdFront, {}, 'none', {})
|
||||
call <sid>hi('TSException', s:cdPink, {}, 'none', {})
|
||||
call <sid>hi('TSType', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TSTypeBuiltin', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('TSStructure', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('TSInclude', s:cdPink, {}, 'none', {})
|
||||
" Variable
|
||||
call <sid>hi('TSVariable', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('TSVariableBuiltin', s:cdLightBlue, {}, 'none', {})
|
||||
" Text
|
||||
call <sid>hi('TSText', s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi('TSStrong', s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi('TSEmphasis', s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi('TSUnderline', s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi('TSTitle', s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi('TSLiteral', s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi('TSURI', s:cdYellowOrange, {}, 'none', {})
|
||||
" Tags
|
||||
call <sid>hi('TSTag', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('TSTagDelimiter', s:cdGray, {}, 'none', {})
|
||||
|
||||
" 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', {})
|
||||
|
||||
" Asciidoc (for default syntax highlighting)
|
||||
call <sid>hi("asciidocAttributeEntry", s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi("asciidocAttributeList", s:cdPink, {}, 'none', {})
|
||||
call <sid>hi("asciidocAttributeRef", s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi("asciidocHLabel", s:cdBlue, {}, 'bold', {})
|
||||
call <sid>hi("asciidocListingBlock", s:cdOrange, {}, 'none', {})
|
||||
call <sid>hi("asciidocMacroAttributes", s:cdYellowOrange, {}, 'none', {})
|
||||
call <sid>hi("asciidocOneLineTitle", s:cdBlue, {}, 'bold', {})
|
||||
call <sid>hi("asciidocPassthroughBlock", s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi("asciidocQuotedMonospaced", s:cdOrange, {}, 'none', {})
|
||||
call <sid>hi("asciidocTriplePlusPassthrough", s:cdYellow, {}, 'none', {})
|
||||
call <sid>hi("asciidocMacro", s:cdPink, {}, 'none', {})
|
||||
call <sid>hi("asciidocAdmonition", s:cdOrange, {}, 'none', {})
|
||||
call <sid>hi("asciidocQuotedEmphasized", s:cdBlue, {}, 'italic', {})
|
||||
call <sid>hi("asciidocQuotedEmphasized2", s:cdBlue, {}, 'italic', {})
|
||||
call <sid>hi("asciidocQuotedEmphasizedItalic", s:cdBlue, {}, 'italic', {})
|
||||
hi! link asciidocBackslash Keyword
|
||||
hi! link asciidocQuotedBold markdownBold
|
||||
hi! link asciidocQuotedMonospaced2 asciidocQuotedMonospaced
|
||||
hi! link asciidocQuotedUnconstrainedBold asciidocQuotedBold
|
||||
hi! link asciidocQuotedUnconstrainedEmphasized asciidocQuotedEmphasized
|
||||
hi! link asciidocURL markdownUrl
|
||||
|
||||
" 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', {})
|
||||
|
||||
" C++:
|
||||
call <sid>hi('CTagsClass', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('CTagsStructure', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('CTagsNamespace', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('CTagsGlobalVariable', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('CTagsDefinedName ', s:cdBlue, {}, 'none', {})
|
||||
highlight def link CTagsFunction Function
|
||||
highlight def link CTagsMember Identifier
|
||||
|
||||
" C++ color_coded
|
||||
call <sid>hi('StructDecl', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('UnionDecl', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('ClassDecl', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TypeRef', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TypedefDecl', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TypeAliasDecl', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('EnumDecl', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TemplateTypeParameter', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TypeAliasTemplateDecl', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('ClassTemplate', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('ClassTemplatePartialSpecialization', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('FunctionTemplate', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TemplateRef', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('TemplateTemplateParameter', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('UsingDeclaration', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('MemberRef', s:cdLightBlue, {}, 'italic', {})
|
||||
call <sid>hi('MemberRefExpr', s:cdYellow, {}, 'italic', {})
|
||||
call <sid>hi('Namespace', s:cdSilver, {}, 'none', {})
|
||||
call <sid>hi('NamespaceRef', s:cdSilver, {}, 'none', {})
|
||||
call <sid>hi('NamespaceAlias', s:cdSilver, {}, 'none', {})
|
||||
|
||||
" C++ lsp-cxx-highlight
|
||||
call <sid>hi('LspCxxHlSymClass', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('LspCxxHlSymStruct', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('LspCxxHlSymEnum', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('LspCxxHlSymTypeAlias', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('LspCxxHlSymTypeParameter', s:cdBlueGreen, {}, 'none', {})
|
||||
call <sid>hi('LspCxxHlSymConcept', s:cdBlueGreen, {}, 'italic', {})
|
||||
call <sid>hi('LspCxxHlSymNamespace', s:cdSilver, {}, 'none', {})
|
||||
|
||||
" Coc Explorer:
|
||||
call <sid>hi('CocHighlightText', {}, s:cdSelection, 'none', {})
|
||||
call <sid>hi('CocExplorerIndentLine', s:cdCursorDark, {}, 'none', {})
|
||||
|
||||
" nvim-cmp
|
||||
call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'strikethrough', {})
|
||||
call <sid>hi('CmpItemAbbrMatch', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('CmpItemAbbrMatchFuzzy', s:cdBlue, {}, 'none', {})
|
||||
call <sid>hi('CmpItemKindVariable', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('CmpItemKindInterface', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('CmpItemKindText', s:cdLightBlue, {}, 'none', {})
|
||||
call <sid>hi('CmpItemKindFunction', s:cdPink, {}, 'none', {})
|
||||
call <sid>hi('CmpItemKindMethod ', s:cdPink, {}, 'none', {})
|
||||
call <sid>hi('CmpItemKindKeyword', s:cdFront, {}, 'none', {})
|
||||
call <sid>hi('CmpItemKindProperty', s:cdFront, {}, 'none', {})
|
||||
call <sid>hi('CmpItemKindUnit', s:cdFront, {}, 'none', {})
|
100
doc/tags
Normal file
100
doc/tags
Normal file
|
@ -0,0 +1,100 @@
|
|||
Utl-chgOverview utl_usr.txt /*Utl-chgOverview*
|
||||
utl utl_usr.txt /*utl*
|
||||
utl-absDontCombine utl_usr.txt /*utl-absDontCombine*
|
||||
utl-btSample utl_usr.txt /*utl-btSample*
|
||||
utl-changes utl_usr.txt /*utl-changes*
|
||||
utl-chgAddFootRefs utl_usr.txt /*utl-chgAddFootRefs*
|
||||
utl-chgCacheGone utl_usr.txt /*utl-chgCacheGone*
|
||||
utl-chgFragAW utl_usr.txt /*utl-chgFragAW*
|
||||
utl-chgGuGone utl_usr.txt /*utl-chgGuGone*
|
||||
utl-chgLineNegative utl_usr.txt /*utl-chgLineNegative*
|
||||
utl-chgNetworkFile utl_usr.txt /*utl-chgNetworkFile*
|
||||
utl-chgNewFragConv utl_usr.txt /*utl-chgNewFragConv*
|
||||
utl-chgNewGenMTHdl utl_usr.txt /*utl-chgNewGenMTHdl*
|
||||
utl-chgNewHttpAccess utl_usr.txt /*utl-chgNewHttpAccess*
|
||||
utl-chgNewMailScheme utl_usr.txt /*utl-chgNewMailScheme*
|
||||
utl-chgNewOperand utl_usr.txt /*utl-chgNewOperand*
|
||||
utl-chgNewOperators utl_usr.txt /*utl-chgNewOperators*
|
||||
utl-chgNewVerbose utl_usr.txt /*utl-chgNewVerbose*
|
||||
utl-chgScmIf utl_usr.txt /*utl-chgScmIf*
|
||||
utl-chgUI utl_usr.txt /*utl-chgUI*
|
||||
utl-chgVarNames utl_usr.txt /*utl-chgVarNames*
|
||||
utl-chgadded utl_usr.txt /*utl-chgadded*
|
||||
utl-chgchanged utl_usr.txt /*utl-chgchanged*
|
||||
utl-chghighl utl_usr.txt /*utl-chghighl*
|
||||
utl-chgincompat utl_usr.txt /*utl-chgincompat*
|
||||
utl-config utl_usr.txt /*utl-config*
|
||||
utl-configIntExt utl_usr.txt /*utl-configIntExt*
|
||||
utl-configcfg utl_usr.txt /*utl-configcfg*
|
||||
utl-configopt utl_usr.txt /*utl-configopt*
|
||||
utl-createFiles utl_usr.txt /*utl-createFiles*
|
||||
utl-credits utl_usr.txt /*utl-credits*
|
||||
utl-displayHtml utl_usr.txt /*utl-displayHtml*
|
||||
utl-efmeddep utl_usr.txt /*utl-efmeddep*
|
||||
utl-fbcallmt utl_usr.txt /*utl-fbcallmt*
|
||||
utl-fixed utl_usr.txt /*utl-fixed*
|
||||
utl-fixedBackForth utl_usr.txt /*utl-fixedBackForth*
|
||||
utl-getStarted utl_usr.txt /*utl-getStarted*
|
||||
utl-hotKey utl_usr.txt /*utl-hotKey*
|
||||
utl-infoDir utl_usr.txt /*utl-infoDir*
|
||||
utl-intro utl_usr.txt /*utl-intro*
|
||||
utl-knownbugs utl_usr.txt /*utl-knownbugs*
|
||||
utl-lookupWord utl_usr.txt /*utl-lookupWord*
|
||||
utl-multiLineURLs utl_usr.txt /*utl-multiLineURLs*
|
||||
utl-opt_hlighturls utl_usr.txt /*utl-opt_hlighturls*
|
||||
utl-opt_verbose utl_usr.txt /*utl-opt_verbose*
|
||||
utl-plugin utl_usr.txt /*utl-plugin*
|
||||
utl-privateScmHdl utl_usr.txt /*utl-privateScmHdl*
|
||||
utl-projectManagement utl_usr.txt /*utl-projectManagement*
|
||||
utl-protvsftype utl_usr.txt /*utl-protvsftype*
|
||||
utl-smartSamples utl_usr.txt /*utl-smartSamples*
|
||||
utl-start utl_usr.txt /*utl-start*
|
||||
utl-startprog utl_usr.txt /*utl-startprog*
|
||||
utl-tildeSupport utl_usr.txt /*utl-tildeSupport*
|
||||
utl-tipsdetails utl_usr.txt /*utl-tipsdetails*
|
||||
utl-todo utl_usr.txt /*utl-todo*
|
||||
utl-tutCopyFileName utl_usr.txt /*utl-tutCopyFileName*
|
||||
utl-tutCopyLink utl_usr.txt /*utl-tutCopyLink*
|
||||
utl-tutOtherCmds utl_usr.txt /*utl-tutOtherCmds*
|
||||
utl-tutUI utl_usr.txt /*utl-tutUI*
|
||||
utl-tutVimscript utl_usr.txt /*utl-tutVimscript*
|
||||
utl-tutVisUrls utl_usr.txt /*utl-tutVisUrls*
|
||||
utl-tutcreateurls utl_usr.txt /*utl-tutcreateurls*
|
||||
utl-tutdrivesshares utl_usr.txt /*utl-tutdrivesshares*
|
||||
utl-tutextfrag utl_usr.txt /*utl-tutextfrag*
|
||||
utl-tutfolders utl_usr.txt /*utl-tutfolders*
|
||||
utl-tutfoot utl_usr.txt /*utl-tutfoot*
|
||||
utl-tutfootfrag utl_usr.txt /*utl-tutfootfrag*
|
||||
utl-tutfooturl utl_usr.txt /*utl-tutfooturl*
|
||||
utl-tutforthback utl_usr.txt /*utl-tutforthback*
|
||||
utl-tutfrags utl_usr.txt /*utl-tutfrags*
|
||||
utl-tutfragsdref utl_usr.txt /*utl-tutfragsdref*
|
||||
utl-tutfragsintro utl_usr.txt /*utl-tutfragsintro*
|
||||
utl-tutfragsline utl_usr.txt /*utl-tutfragsline*
|
||||
utl-tutfragsnonfile utl_usr.txt /*utl-tutfragsnonfile*
|
||||
utl-tutfragsrel utl_usr.txt /*utl-tutfragsrel*
|
||||
utl-tutfragsyn utl_usr.txt /*utl-tutfragsyn*
|
||||
utl-tutmisc utl_usr.txt /*utl-tutmisc*
|
||||
utl-tutmtypes utl_usr.txt /*utl-tutmtypes*
|
||||
utl-tutorial utl_usr.txt /*utl-tutorial*
|
||||
utl-tutpdffrag utl_usr.txt /*utl-tutpdffrag*
|
||||
utl-tutrelabs utl_usr.txt /*utl-tutrelabs*
|
||||
utl-tutscmhttp utl_usr.txt /*utl-tutscmhttp*
|
||||
utl-tutscmhttpwget utl_usr.txt /*utl-tutscmhttpwget*
|
||||
utl-tutscmmail utl_usr.txt /*utl-tutscmmail*
|
||||
utl-tutscmoth utl_usr.txt /*utl-tutscmoth*
|
||||
utl-tutscmothnonstd utl_usr.txt /*utl-tutscmothnonstd*
|
||||
utl-tutscmothstd utl_usr.txt /*utl-tutscmothstd*
|
||||
utl-tuttypeurl utl_usr.txt /*utl-tuttypeurl*
|
||||
utl-tutverbosemode utl_usr.txt /*utl-tutverbosemode*
|
||||
utl-tutwordfrag utl_usr.txt /*utl-tutwordfrag*
|
||||
utl-usagePatterns utl_usr.txt /*utl-usagePatterns*
|
||||
utl-useOrganizeIdeas utl_usr.txt /*utl-useOrganizeIdeas*
|
||||
utl-useSourceCode utl_usr.txt /*utl-useSourceCode*
|
||||
utl-usedesktop utl_usr.txt /*utl-usedesktop*
|
||||
utl-vimsBackup utl_usr.txt /*utl-vimsBackup*
|
||||
utl-vimsCompile utl_usr.txt /*utl-vimsCompile*
|
||||
utl-vimsHeuristicUrl utl_usr.txt /*utl-vimsHeuristicUrl*
|
||||
utl-writeUrls utl_usr.txt /*utl-writeUrls*
|
||||
utl_chgcfgscm utl_usr.txt /*utl_chgcfgscm*
|
||||
utl_usr.txt utl_usr.txt /*utl_usr.txt*
|
871
ftplugin/java_getset.vim
Normal file
871
ftplugin/java_getset.vim
Normal file
|
@ -0,0 +1,871 @@
|
|||
" Vim filetype plugin file for adding getter/setter methods
|
||||
" Language: Java
|
||||
" Maintainer: Pete Kazmier (pete-vim AT kazmier DOT com)
|
||||
" Last Change: 2002 Nov 21
|
||||
" Revision: $Id: java_getset.vim,v 1.10 2002/12/02 15:14:31 kaz Exp $
|
||||
" Credit:
|
||||
" - Based on jcommenter.vim by Kalle Björklid <bjorklid@st.jyu.fi.
|
||||
" - Thanks to Dan Sharp for his feedback, suggestions and help.
|
||||
" - Thanks to Steven Op de beeck for his feedback and help.
|
||||
"
|
||||
" =======================================================================
|
||||
"
|
||||
" Copyright 2002 by Peter Kazmier
|
||||
"
|
||||
" Redistribution and use in source and binary forms, with or without
|
||||
" modification, are permitted provided that the following conditions
|
||||
" are met:
|
||||
"
|
||||
" 1. Redistributions of source code must retain the above copyright
|
||||
" notice, this list of conditions and the following disclaimer.
|
||||
"
|
||||
" 2. Redistributions in binary form must reproduce the above
|
||||
" copyright notice, this list of conditions and the following
|
||||
" disclaimer in the documentation and/or other materials provided
|
||||
" with the distribution.
|
||||
"
|
||||
" 3. The name of the author may not be used to endorse or promote
|
||||
" products derived from this software without specific prior
|
||||
" written permission.
|
||||
"
|
||||
" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
"
|
||||
" =======================================================================
|
||||
"
|
||||
" DESCRIPTION
|
||||
" This filetype plugin enables a user to automatically add getter/setter
|
||||
" methods for Java properties. The script will insert a getter, setter,
|
||||
" or both depending on the command/mapping invoked. Users can select
|
||||
" properties one at a time, or in bulk (via a visual block or specifying a
|
||||
" range). In either case, the selected block may include comments as they
|
||||
" will be ignored during the parsing. For example, you could select all
|
||||
" of these properties with a single visual block.
|
||||
"
|
||||
" public class Test
|
||||
" {
|
||||
" // The global count
|
||||
" private static int count;
|
||||
"
|
||||
" /** The name */
|
||||
" private String name;
|
||||
"
|
||||
" /** The array of addresses */
|
||||
" private String[] address;
|
||||
" }
|
||||
"
|
||||
" The script will also add the 'static' modifier to the method if the
|
||||
" property was declared as 'static'. Array-based properties will get
|
||||
" additional methods added to support indexing. In addition, if a
|
||||
" property is declared 'final', it will not generate a setter for it.
|
||||
" If a previous getter OR setter exists for a property, the script will
|
||||
" not add any methods (under the assumption that you've manually added
|
||||
" your own).
|
||||
"
|
||||
" The getters/setters that are inserted can be configured by the user.
|
||||
" First, the insertion point can be selected. It can be one of the
|
||||
" following: before the current line / block, after the current line /
|
||||
" block, or at the end of the class (default). Finally, the text that is
|
||||
" inserted can be configured by defining your own templates. This allows
|
||||
" the user to format for his/her coding style. For example, the default
|
||||
" value for s:javagetset_getterTemplate is:
|
||||
"
|
||||
" /**
|
||||
" * Get %varname%.
|
||||
" *
|
||||
" * @return %varname% as %type%.
|
||||
" */
|
||||
" %modifiers% %type% %funcname%()
|
||||
" {
|
||||
" return %varname%;
|
||||
" }
|
||||
"
|
||||
" Where the items surrounded by % are parameters that are substituted when
|
||||
" the script is invoked on a particular property. For more information on
|
||||
" configuration, please see the section below on the INTERFACE.
|
||||
"
|
||||
" INTERFACE (commands, mappings, and variables)
|
||||
" The following section documents the commands, mappings, and variables
|
||||
" used to customize the behavior of this script.
|
||||
"
|
||||
" Commands:
|
||||
" :InsertGetterSetter
|
||||
" Inserts a getter/setter for the property on the current line, or
|
||||
" the range of properties specified via a visual block or x,y range
|
||||
" notation. The user is prompted to determine what type of method
|
||||
" to insert.
|
||||
"
|
||||
" :InsertGetterOnly
|
||||
" Inserts a getter for the property on the current line, or the
|
||||
" range of properties specified via a visual block or x,y range
|
||||
" notation. The user is not prompted.
|
||||
"
|
||||
" :InsertSetterOnly
|
||||
" Inserts a setter for the property on the current line, or the
|
||||
" range of properties specified via a visual block or x,y range
|
||||
" notation. The user is not prompted.
|
||||
"
|
||||
" :InsertBothGetterSetter
|
||||
" Inserts a getter and setter for the property on the current line,
|
||||
" or the range of properties specified via a visual block or x,y
|
||||
" range notation. The user is not prompted.
|
||||
"
|
||||
"
|
||||
" Mappings:
|
||||
" The following mappings are pre-defined. You can disable the mappings
|
||||
" by setting a variable (see the Variables section below). The default
|
||||
" key mappings use the <LocalLeader> which is the backslash key by
|
||||
" default '\'. This can also be configured via a variable (see below).
|
||||
"
|
||||
" <LocalLeader>p (or <Plug>JavagetsetInsertGetterSetter)
|
||||
" Inserts a getter/setter for the property on the current line, or
|
||||
" the range of properties specified via a visual block. User is
|
||||
" prompted for choice.
|
||||
"
|
||||
" <LocalLeader>g (or <Plug>JavagetsetInsertGetterOnly)
|
||||
" Inserts a getter for the property on the current line, or the
|
||||
" range of properties specified via a visual block. User is not
|
||||
" prompted.
|
||||
"
|
||||
" <LocalLeader>s (or <Plug>JavagetsetInsertSetterOnly)
|
||||
" Inserts a getter for the property on the current line, or the
|
||||
" range of properties specified via a visual block. User is not
|
||||
" prompted.
|
||||
"
|
||||
" <LocalLeader>b (or <Plug>JavagetsetInsertBothGetterSetter)
|
||||
" Inserts both a getter and setter for the property on the current
|
||||
" line, or the range of properties specified via a visual block.
|
||||
" User is not prompted.
|
||||
"
|
||||
" If you want to define your own mapping, you can map whatever you want
|
||||
" to <Plug>JavagetsetInsertGetterSetter (or any of the other <Plug>s
|
||||
" defined above). For example,
|
||||
"
|
||||
" map <buffer> <C-p> <Plug>JavagetsetInsertGetterSetter
|
||||
"
|
||||
" When you define your own mapping, the default mapping does not get
|
||||
" set, only the mapping you specify.
|
||||
"
|
||||
" Variables:
|
||||
" The following variables allow you to customize the behavior of this
|
||||
" script so that you do not need to make changes directly to the script.
|
||||
" These variables can be set in your vimrc.
|
||||
"
|
||||
" no_plugin_maps
|
||||
" Setting this variable will disable all key mappings defined by any
|
||||
" of your plugins (if the plugin writer adhered to the standard
|
||||
" convention documented in the scripting section of the VIM manual)
|
||||
" including this one.
|
||||
"
|
||||
" no_java_maps
|
||||
" Setting this variable will disable all key mappings defined by any
|
||||
" java specific plugin including this one.
|
||||
"
|
||||
" maplocalleader
|
||||
" By default, the key mappings defined by this script use
|
||||
" <LocalLeader> which is the backslash character by default. You can
|
||||
" change this by setting this variable to a different key. For
|
||||
" example, if you want to use the comma-key, you can add this line to
|
||||
" your vimrc:
|
||||
"
|
||||
" let maplocalleader = ','
|
||||
"
|
||||
" b:javagetset_insertPosition
|
||||
" This variable determines the location where the getter and/or setter
|
||||
" will be inserted. Currently, three positions have been defined:
|
||||
"
|
||||
" 0 - insert at the end of the class (default)
|
||||
" 1 - insert before the current line / block
|
||||
" 2 - insert after the current line / block
|
||||
"
|
||||
" b:javagetset_getterTemplate
|
||||
" b:javagetset_setterTemplate
|
||||
" b:javagetset_getterArrayTemplate
|
||||
" b:javagetset_setterArrayTemplate
|
||||
" These variables determine the text that will be inserted for a
|
||||
" getter, setter, array-based getter, and array-based setter
|
||||
" respectively. The templates may contain the following placeholders
|
||||
" which will be substituted by their appropriate values at insertion
|
||||
" time:
|
||||
"
|
||||
" %type% Java type of the property
|
||||
" %varname% The name of the property
|
||||
" %funcname% The method name ("getXzy" or "setXzy")
|
||||
" %modifiers% "public" followed by "static" if the property is static
|
||||
"
|
||||
" For example, if you wanted to set the default getter template so
|
||||
" that it would produce the following block of code for a property
|
||||
" defined as "public static String name":
|
||||
"
|
||||
" /**
|
||||
" * Get name.
|
||||
" * @return name as String
|
||||
" */
|
||||
" public static String getName() { return name; }
|
||||
"
|
||||
" This block of code can be produced by adding the following variable
|
||||
" definition to your vimrc file.
|
||||
"
|
||||
" let b:javagetset_getterTemplate =
|
||||
" \ "\n" .
|
||||
" \ "/**\n" .
|
||||
" \ " * Get %varname%.\n" .
|
||||
" \ " * @return %varname% as %type%.\n" .
|
||||
" \ " */\n" .
|
||||
" \ "%modifiers% %type% %funcname%() { return %varname%; }"
|
||||
"
|
||||
" The defaults for these variables are defined in the script. For
|
||||
" both the getterTemplate and setterTemplate, there is a corresponding
|
||||
" array-baded template that is invoked if a property is array-based.
|
||||
" This allows you to set indexed-based getters/setters if you desire.
|
||||
" This is the default behavior.
|
||||
"
|
||||
"
|
||||
" INSTALLATION
|
||||
" 1. Copy the script to your ${HOME}/.vim/ftplugins directory and make
|
||||
" sure its named "java_getset.vim" or "java_something.vim" where
|
||||
" "something" can be anything you want.
|
||||
"
|
||||
" 2. (Optional) Customize the mapping and/or templates. You can create
|
||||
" your own filetype plugin (just make sure its loaded before this one)
|
||||
" and set the variables in there (i.e. ${HOME}/.vim/ftplugin/java.vim)
|
||||
"
|
||||
" =======================================================================
|
||||
"
|
||||
" NOTE:
|
||||
" This is my very first VIM script. I read all of the documentation, and
|
||||
" have tried to follow the conventions outlined there; however, I may have
|
||||
" missed some so please bear with me.
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_javagetset_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_javagetset_ftplugin = 1
|
||||
|
||||
" Make sure we are in vim mode
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" TEMPLATE SECTION:
|
||||
" The templates can use the following placeholders which will be replaced
|
||||
" with appropriate values when the template is invoked:
|
||||
"
|
||||
" %type% Java type of the property
|
||||
" %varname% The name of the property
|
||||
" %funcname% The method name ("getXzy" or "setXzy")
|
||||
" %modifiers% "public" followed by "static" if the property is static
|
||||
"
|
||||
" The templates consist of a getter and setter template. In addition,
|
||||
" there are also templates for array-based properties. These are defined
|
||||
" below.
|
||||
"
|
||||
" Getter Templates (non-array and array-based)
|
||||
if exists("b:javagetset_getterTemplate")
|
||||
let s:javagetset_getterTemplate = b:javagetset_getterTemplate
|
||||
else
|
||||
let s:javagetset_getterTemplate =
|
||||
\ "\n" .
|
||||
\ "/**\n" .
|
||||
\ " * Get %varname%.\n" .
|
||||
\ " *\n" .
|
||||
\ " * @return %varname% as %type%.\n" .
|
||||
\ " */\n" .
|
||||
\ "%modifiers% %type% %funcname%()\n" .
|
||||
\ "{\n" .
|
||||
\ " return %varname%;\n" .
|
||||
\ "}"
|
||||
endif
|
||||
|
||||
if exists("b:javagetset_getterArrayTemplate")
|
||||
let s:javagetset_getterArrayTemplate = b:javagetset_getterArrayTemplate
|
||||
else
|
||||
let s:javagetset_getterArrayTemplate =
|
||||
\ "\n" .
|
||||
\ "/**\n" .
|
||||
\ " * Get %varname%.\n" .
|
||||
\ " *\n" .
|
||||
\ " * @return %varname% as %type%[].\n" .
|
||||
\ " */\n" .
|
||||
\ "%modifiers% %type%[] %funcname%()\n" .
|
||||
\ "{\n" .
|
||||
\ " return %varname%;\n" .
|
||||
\ "}\n" .
|
||||
\ "\n" .
|
||||
\ "/**\n" .
|
||||
\ " * Get %varname% element at specified index.\n" .
|
||||
\ " *\n" .
|
||||
\ " * @param index the index.\n" .
|
||||
\ " * @return %varname% at index as %type%.\n" .
|
||||
\ " */\n" .
|
||||
\ "%modifiers% %type% %funcname%(int index)\n" .
|
||||
\ "{\n" .
|
||||
\ " return %varname%[index];\n" .
|
||||
\ "}"
|
||||
endif
|
||||
|
||||
" Setter Templates (non-array and array-based)
|
||||
if exists("b:javagetset_setterTemplate")
|
||||
let s:javagetset_setterTemplate = b:javagetset_setterTemplate
|
||||
else
|
||||
let s:javagetset_setterTemplate =
|
||||
\ "\n" .
|
||||
\ "/**\n" .
|
||||
\ " * Set %varname%.\n" .
|
||||
\ " *\n" .
|
||||
\ " * @param %varname% the value to set.\n" .
|
||||
\ " */\n" .
|
||||
\ "%modifiers% void %funcname%(%type% %varname%)\n" .
|
||||
\ "{\n" .
|
||||
\ " this.%varname% = %varname%;\n" .
|
||||
\ "}"
|
||||
endif
|
||||
|
||||
if exists("b:javagetset_setterArrayTemplate")
|
||||
let s:javagetset_setterArrayTemplate = b:javagetset_setterArrayTemplate
|
||||
else
|
||||
let s:javagetset_setterArrayTemplate =
|
||||
\ "\n" .
|
||||
\ "/**\n" .
|
||||
\ " * Set %varname%.\n" .
|
||||
\ " *\n" .
|
||||
\ " * @param %varname% the value to set.\n" .
|
||||
\ " */\n" .
|
||||
\ "%modifiers% void %funcname%(%type%[] %varname%)\n" .
|
||||
\ "{\n" .
|
||||
\ " this.%varname% = %varname%;\n" .
|
||||
\ "}\n" .
|
||||
\ "\n" .
|
||||
\ "/**\n" .
|
||||
\ " * Set %varname% at the specified index.\n" .
|
||||
\ " *\n" .
|
||||
\ " * @param %varname% the value to set.\n" .
|
||||
\ " * @param index the index.\n" .
|
||||
\ " */\n" .
|
||||
\ "%modifiers% void %funcname%(%type% %varname%, int index)\n" .
|
||||
\ "{\n" .
|
||||
\ " this.%varname%[index] = %varname%;\n" .
|
||||
\ "}"
|
||||
endif
|
||||
|
||||
" Position where methods are inserted. The possible values are:
|
||||
" 0 - end of class
|
||||
" 1 = above block / line
|
||||
" 2 = below block / line
|
||||
if exists("b:javagetset_insertPosition")
|
||||
let s:javagetset_insertPosition = b:javagetset_insertPosition
|
||||
else
|
||||
let s:javagetset_insertPosition = 0
|
||||
endif
|
||||
|
||||
" Script local variables that are used like globals.
|
||||
"
|
||||
" If set to 1, the user has requested that getters be inserted
|
||||
let s:getter = 0
|
||||
|
||||
" If set to 1, the user has requested that setters be inserted
|
||||
let s:setter = 0
|
||||
|
||||
" If set to 1, the property was a static property (i.e. static methods)
|
||||
let s:static = 0
|
||||
|
||||
" If set to 1, the property was declared final (i.e. doesn't need a setter)
|
||||
let s:final = 0
|
||||
|
||||
" If set to 1, use the array based templates
|
||||
let s:isarray = 0
|
||||
|
||||
" The current indentation level of the property (i.e. used for the methods)
|
||||
let s:indent = ''
|
||||
|
||||
" The list of property modifiers
|
||||
let s:modifiers = ''
|
||||
|
||||
" The type of the property
|
||||
let s:vartype = ''
|
||||
|
||||
" If the property is an array, the []'s will be stored here
|
||||
let s:vararray = ''
|
||||
|
||||
" The name of the property
|
||||
let s:varname = ''
|
||||
|
||||
" The function name of the property (capitalized varname)
|
||||
let s:funcname = ''
|
||||
|
||||
" The first line of the block selected
|
||||
let s:firstline = 0
|
||||
|
||||
" The last line of the block selected
|
||||
let s:lastline = 0
|
||||
|
||||
" Regular expressions used to match property statements
|
||||
let s:javaname = '[a-zA-Z_$][a-zA-Z0-9_$]*'
|
||||
let s:brackets = '\(\s*\(\[\s*\]\)\)\='
|
||||
let s:modifier = '\(private\|protected\|public\|volatile\|static\|final\)'
|
||||
let s:variable = '\(\s*\)\(\(' . s:modifier . '\s\+\)*\)\(' . s:javaname . '\)' . s:brackets . '\s\+\(' . s:javaname . '\)\s*\(;\|=[^;]\+;\)'
|
||||
|
||||
" The main entry point. This function saves the current position of the
|
||||
" cursor without the use of a mark (see note below) Then the selected
|
||||
" region is processed for properties.
|
||||
"
|
||||
" FIXME: I wanted to avoid clobbering any marks in use by the user, so I
|
||||
" manually try to save the current position and restore it. The only drag
|
||||
" is that the position isn't restored correctly if the user opts to insert
|
||||
" the methods ABOVE the current position. Using a mark would solve this
|
||||
" problem as they are automatically adjusted. Perhaps I just haven't
|
||||
" found it yet, but I wish that VIM would let a scripter save a mark and
|
||||
" then restore it later. Why? In this case, I'd be able to use a mark
|
||||
" safely without clobbering any user marks already set. First, I'd save
|
||||
" the contents of the mark, then set the mark, do my stuff, jump back to
|
||||
" the mark, and finally restore the mark to what the user may have had
|
||||
" previously set. Seems weird to me that you can't save/restore marks.
|
||||
"
|
||||
if !exists("*s:InsertGetterSetter")
|
||||
function s:InsertGetterSetter(flag) range
|
||||
let restorepos = line(".") . "normal!" . virtcol(".") . "|"
|
||||
let s:firstline = a:firstline
|
||||
let s:lastline = a:lastline
|
||||
|
||||
if s:DetermineAction(a:flag)
|
||||
call s:ProcessRegion(s:GetRangeAsString(a:firstline, a:lastline))
|
||||
endif
|
||||
|
||||
execute restorepos
|
||||
|
||||
" Not sure why I need this but if I don't have it, the drawing on the
|
||||
" screen is messed up from my insert. Perhaps I'm doing something
|
||||
" wrong, but it seems to me that I probably shouldn't be calling
|
||||
" redraw.
|
||||
redraw!
|
||||
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Set the appropriate script variables (s:getter and s:setter) to
|
||||
" appropriate values based on the flag that was selected. The current
|
||||
" valid values for flag are: 'g' for getter, 's' for setter, 'b' for both
|
||||
" getter/setter, and 'a' for ask/prompt user.
|
||||
if !exists("*s:DetermineAction")
|
||||
function s:DetermineAction(flag)
|
||||
|
||||
if a:flag == 'g'
|
||||
let s:getter = 1
|
||||
let s:setter = 0
|
||||
|
||||
elseif a:flag == 's'
|
||||
let s:getter = 0
|
||||
let s:setter = 1
|
||||
|
||||
elseif a:flag == 'b'
|
||||
let s:getter = 1
|
||||
let s:setter = 1
|
||||
|
||||
elseif a:flag == 'a'
|
||||
return s:DetermineAction(s:AskUser())
|
||||
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
|
||||
return 1
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Ask the user what they want to insert, getter, setter, or both. Return
|
||||
" an appropriate flag for use with s:DetermineAction, or return 0 if the
|
||||
" user cancelled out.
|
||||
if !exists("*s:AskUser")
|
||||
function s:AskUser()
|
||||
let choice =
|
||||
\ confirm("What do you want to insert?",
|
||||
\ "&Getter\n&Setter\n&Both", 3)
|
||||
|
||||
if choice == 0
|
||||
return 0
|
||||
|
||||
elseif choice == 1
|
||||
return 'g'
|
||||
|
||||
elseif choice == 2
|
||||
return 's'
|
||||
|
||||
elseif choice == 3
|
||||
return 'b'
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Gets a range specified by a first and last line and returns it as a
|
||||
" single string that will eventually be parsed using regular expresssions.
|
||||
" For example, if the following lines were selected:
|
||||
"
|
||||
" // Age
|
||||
" private int age;
|
||||
"
|
||||
" // Name
|
||||
" private static String name;
|
||||
"
|
||||
" Then, the following string would be returned:
|
||||
"
|
||||
" // Age private int age; // Name priavte static String name;
|
||||
"
|
||||
if !exists("*s:GetRangeAsString")
|
||||
function s:GetRangeAsString(first, last)
|
||||
let line = a:first
|
||||
let string = s:TrimRight(getline(line))
|
||||
|
||||
while line < a:last
|
||||
let line = line + 1
|
||||
let string = string . s:TrimRight(getline(line))
|
||||
endwhile
|
||||
|
||||
return string
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Trim whitespace from right of string.
|
||||
if !exists("*s:TrimRight")
|
||||
function s:TrimRight(text)
|
||||
return substitute(a:text, '\(\.\{-}\)\s*$', '\1', '')
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Process the specified region indicated by the user. The region is
|
||||
" simply a concatenated string of the lines that were selected by the
|
||||
" user. This string is searched for properties (that match the s:variable
|
||||
" regexp). Each property is then processed. For example, if the region
|
||||
" was:
|
||||
"
|
||||
" // Age private int age; // Name priavte static String name;
|
||||
"
|
||||
" Then, the following strings would be processed one at a time:
|
||||
"
|
||||
" private int age;
|
||||
" private static String name;
|
||||
"
|
||||
if !exists("*s:ProcessRegion")
|
||||
function s:ProcessRegion(region)
|
||||
let startPosition = match(a:region, s:variable, 0)
|
||||
let endPosition = matchend(a:region, s:variable, 0)
|
||||
|
||||
while startPosition != -1
|
||||
let result = strpart(a:region, startPosition, endPosition - startPosition)
|
||||
|
||||
"call s:DebugParsing(result)
|
||||
call s:ProcessVariable(result)
|
||||
|
||||
let startPosition = match(a:region, s:variable, endPosition)
|
||||
let endPosition = matchend(a:region, s:variable, endPosition)
|
||||
endwhile
|
||||
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Process a single property. The first thing this function does is
|
||||
" break apart the property into the following components: indentation,
|
||||
" modifiers ,type, array, and name. In addition, the following other
|
||||
" components are then derived from the previous: funcname, static,
|
||||
" final, and isarray. For example, if the specified variable was:
|
||||
"
|
||||
" private static String name;
|
||||
"
|
||||
" Then the following would be set for the global variables:
|
||||
"
|
||||
" indent = ' '
|
||||
" modifiers = 'private static'
|
||||
" vartype = 'String'
|
||||
" vararray = ''
|
||||
" varname = 'name'
|
||||
" funcname = 'Name'
|
||||
" static = 1
|
||||
" final = 0
|
||||
" isarray = 0
|
||||
"
|
||||
if !exists("*s:ProcessVariable")
|
||||
function s:ProcessVariable(variable)
|
||||
let s:static = 0
|
||||
let s:isarray = 0
|
||||
let s:final = 0
|
||||
let s:indent = substitute(a:variable, s:variable, '\1', '')
|
||||
let s:modifiers = substitute(a:variable, s:variable, '\2', '')
|
||||
let s:vartype = substitute(a:variable, s:variable, '\5', '')
|
||||
let s:vararray = substitute(a:variable, s:variable, '\7', '')
|
||||
let s:varname = substitute(a:variable, s:variable, '\8', '')
|
||||
let s:funcname = toupper(s:varname[0]) . strpart(s:varname, 1)
|
||||
|
||||
" If any getter or setter already exists, then just return as there
|
||||
" is nothing to be done. The assumption is that the user already
|
||||
" made his choice.
|
||||
if s:AlreadyExists()
|
||||
return
|
||||
endif
|
||||
|
||||
if s:modifiers =~ 'static'
|
||||
let s:static = 1
|
||||
endif
|
||||
|
||||
if s:modifiers =~ 'final'
|
||||
let s:final = 1
|
||||
endif
|
||||
|
||||
if s:vararray =~ '['
|
||||
let s:isarray = 1
|
||||
endif
|
||||
|
||||
if s:getter
|
||||
call s:InsertGetter()
|
||||
endif
|
||||
|
||||
if s:setter && !s:final
|
||||
call s:InsertSetter()
|
||||
endif
|
||||
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Checks to see if any getter/setter exists.
|
||||
if !exists("*s:AlreadyExists")
|
||||
function s:AlreadyExists()
|
||||
return search('\(get\|set\)' . s:funcname . '\_s*([^)]*)\_s*{', 'w')
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Inserts a getter by selecting the appropriate template to use and then
|
||||
" populating the template parameters with actual values.
|
||||
if !exists("*s:InsertGetter")
|
||||
function s:InsertGetter()
|
||||
|
||||
if s:isarray
|
||||
let method = s:javagetset_getterArrayTemplate
|
||||
else
|
||||
let method = s:javagetset_getterTemplate
|
||||
endif
|
||||
|
||||
let mods = "public"
|
||||
if s:static
|
||||
let mods = mods . " static"
|
||||
endif
|
||||
|
||||
let method = substitute(method, '%type%', s:vartype, 'g')
|
||||
let method = substitute(method, '%varname%', s:varname, 'g')
|
||||
let method = substitute(method, '%funcname%', 'get' . s:funcname, 'g')
|
||||
let method = substitute(method, '%modifiers%', mods, 'g')
|
||||
|
||||
call s:InsertMethodBody(method)
|
||||
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Inserts a setter by selecting the appropriate template to use and then
|
||||
" populating the template parameters with actual values.
|
||||
if !exists("*s:InsertSetter")
|
||||
function s:InsertSetter()
|
||||
|
||||
if s:isarray
|
||||
let method = s:javagetset_setterArrayTemplate
|
||||
else
|
||||
let method = s:javagetset_setterTemplate
|
||||
endif
|
||||
|
||||
let mods = "public"
|
||||
if s:static
|
||||
let mods = mods . " static"
|
||||
endif
|
||||
|
||||
let method = substitute(method, '%type%', s:vartype, 'g')
|
||||
let method = substitute(method, '%varname%', s:varname, 'g')
|
||||
let method = substitute(method, '%funcname%', 'set' . s:funcname, 'g')
|
||||
let method = substitute(method, '%modifiers%', mods, 'g')
|
||||
|
||||
call s:InsertMethodBody(method)
|
||||
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Inserts a body of text using the indentation level. The passed string
|
||||
" may have embedded newlines so we need to search for each "line" and then
|
||||
" call append separately. I couldn't figure out how to get a string with
|
||||
" newlines to be added in one single call to append (it kept inserting the
|
||||
" newlines as ^@ characters which is not what I wanted).
|
||||
if !exists("*s:InsertMethodBody")
|
||||
function s:InsertMethodBody(text)
|
||||
call s:MoveToInsertPosition()
|
||||
|
||||
let pos = line('.')
|
||||
let string = a:text
|
||||
|
||||
while 1
|
||||
let len = stridx(string, "\n")
|
||||
|
||||
if len == -1
|
||||
call append(pos, s:indent . string)
|
||||
break
|
||||
endif
|
||||
|
||||
call append(pos, s:indent . strpart(string, 0, len))
|
||||
|
||||
let pos = pos + 1
|
||||
let string = strpart(string, len + 1)
|
||||
|
||||
endwhile
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Move the cursor to the insertion point. This insertion point can be
|
||||
" defined by the user by setting the b:javagetset_insertPosition variable.
|
||||
if !exists("*s:MoveToInsertPosition")
|
||||
function s:MoveToInsertPosition()
|
||||
|
||||
" 1 indicates above the current block / line
|
||||
if s:javagetset_insertPosition == 1
|
||||
execute "normal! " . (s:firstline - 1) . "G0"
|
||||
|
||||
" 2 indicates below the current block / line
|
||||
elseif s:javagetset_insertPosition == 2
|
||||
execute "normal! " . s:lastline . "G0"
|
||||
|
||||
" 0 indicates end of class (and is default)
|
||||
else
|
||||
execute "normal! ?{\<CR>w99[{%k" | nohls
|
||||
|
||||
endif
|
||||
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Debug code to decode the properties.
|
||||
if !exists("*s:DebugParsing")
|
||||
function s:DebugParsing(variable)
|
||||
echo 'DEBUG: ===================================================='
|
||||
echo 'DEBUG:' a:variable
|
||||
echo 'DEBUG: ----------------------------------------------------'
|
||||
echo 'DEBUG: indent:' substitute(a:variable, s:variable, '\1', '')
|
||||
echo 'DEBUG: modifiers:' substitute(a:variable, s:variable, '\2', '')
|
||||
echo 'DEBUG: type:' substitute(a:variable, s:variable, '\5', '')
|
||||
echo 'DEBUG: array:' substitute(a:variable, s:variable, '\7', '')
|
||||
echo 'DEBUG: name:' substitute(a:variable, s:variable, '\8', '')
|
||||
echo ''
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Add mappings, unless the user didn't want this. I'm still not clear why
|
||||
" I need to have two (2) noremap statements for each, but that is what the
|
||||
" example shows in the documentation so I've stuck with that convention.
|
||||
" Ideally, I'd prefer to use only one noremap line and map the <Plug>
|
||||
" directly to the ':call <SID>function()<CR>'.
|
||||
if !exists("no_plugin_maps") && !exists("no_java_maps")
|
||||
if !hasmapto('<Plug>JavagetsetInsertGetterSetter')
|
||||
map <unique> <buffer> <LocalLeader>p <Plug>JavagetsetInsertGetterSetter
|
||||
endif
|
||||
noremap <buffer> <script>
|
||||
\ <Plug>JavagetsetInsertGetterSetter
|
||||
\ <SID>InsertGetterSetter
|
||||
noremap <buffer>
|
||||
\ <SID>InsertGetterSetter
|
||||
\ :call <SID>InsertGetterSetter('a')<CR>
|
||||
|
||||
if !hasmapto('<Plug>JavagetsetInsertGetterOnly')
|
||||
map <unique> <buffer> <LocalLeader>g <Plug>JavagetsetInsertGetterOnly
|
||||
endif
|
||||
noremap <buffer> <script>
|
||||
\ <Plug>JavagetsetInsertGetterOnly
|
||||
\ <SID>InsertGetterOnly
|
||||
noremap <buffer>
|
||||
\ <SID>InsertGetterOnly
|
||||
\ :call <SID>InsertGetterSetter('g')<CR>
|
||||
|
||||
if !hasmapto('<Plug>JavagetsetInsertSetterOnly')
|
||||
map <unique> <buffer> <LocalLeader>s <Plug>JavagetsetInsertSetterOnly
|
||||
endif
|
||||
noremap <buffer> <script>
|
||||
\ <Plug>JavagetsetInsertSetterOnly
|
||||
\ <SID>InsertSetterOnly
|
||||
noremap <buffer>
|
||||
\ <SID>InsertSetterOnly
|
||||
\ :call <SID>InsertGetterSetter('s')<CR>
|
||||
|
||||
if !hasmapto('<Plug>JavagetsetInsertBothGetterSetter')
|
||||
map <unique> <buffer> <LocalLeader>b <Plug>JavagetsetInsertBothGetterSetter
|
||||
endif
|
||||
noremap <buffer> <script>
|
||||
\ <Plug>JavagetsetInsertBothGetterSetter
|
||||
\ <SID>InsertBothGetterSetter
|
||||
noremap <buffer>
|
||||
\ <SID>InsertBothGetterSetter
|
||||
\ :call <SID>InsertGetterSetter('b')<CR>
|
||||
endif
|
||||
|
||||
" Add commands, unless already set.
|
||||
if !exists(":InsertGetterSetter")
|
||||
command -range -buffer
|
||||
\ InsertGetterSetter
|
||||
\ :<line1>,<line2>call s:InsertGetterSetter('a')
|
||||
endif
|
||||
if !exists(":InsertGetterOnly")
|
||||
command -range -buffer
|
||||
\ InsertGetterOnly
|
||||
\ :<line1>,<line2>call s:InsertGetterSetter('g')
|
||||
endif
|
||||
if !exists(":InsertSetterOnly")
|
||||
command -range -buffer
|
||||
\ InsertSetterOnly
|
||||
\ :<line1>,<line2>call s:InsertGetterSetter('s')
|
||||
endif
|
||||
if !exists(":InsertBothGetterSetter")
|
||||
command -range -buffer
|
||||
\ InsertBothGetterSetter
|
||||
\ :<line1>,<line2>call s:InsertGetterSetter('b')
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
"if !exists("*s:InsertText")
|
||||
" function s:InsertText(text)
|
||||
" let pos = line('.')
|
||||
" let beg = 0
|
||||
" let len = stridx(a:text, "\n")
|
||||
"
|
||||
" while beg < strlen(a:text)
|
||||
" if len == -1
|
||||
" call append(pos, s:indent . strpart(a:text, beg))
|
||||
" break
|
||||
" endif
|
||||
"
|
||||
" call append(pos, s:indent . strpart(a:text, beg, len))
|
||||
" let pos = pos + 1
|
||||
" let beg = beg + len + 1
|
||||
" let len = stridx(strpart(a:text, beg), "\n")
|
||||
" endwhile
|
||||
"
|
||||
" " Not too sure why I have to call redraw, but weirdo things appear
|
||||
" " on the screen if I don't.
|
||||
" redraw!
|
||||
"
|
||||
" endfunction
|
||||
"endif
|
||||
"
|
||||
"if !exists("*s:InsertAccessor")
|
||||
" function s:InsertAccessor()
|
||||
" echo "InsertAccessor was called"
|
||||
" endfunction
|
||||
"endif
|
||||
"
|
||||
"if !exists("*s:SqueezeWhitespace")
|
||||
" function s:SqueezeWhitespace(string)
|
||||
" return substitute(a:string, '\_s\+', ' ', 'g')
|
||||
" endfunction
|
||||
"endif
|
1
pack/plugins/opt/vim-markdown
Submodule
1
pack/plugins/opt/vim-markdown
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 8e5d86f7b85234d3d1b4207dceebc43a768ed5d4
|
1
pack/plugins/start/auto-pairs
Submodule
1
pack/plugins/start/auto-pairs
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 39f06b873a8449af8ff6a3eee716d3da14d63a76
|
1
pack/plugins/start/rainbow
Submodule
1
pack/plugins/start/rainbow
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4d15633cdaf61602e1d9fd216a77fc02e0881b2d
|
1
pack/plugins/start/vim-Grammalecte
Submodule
1
pack/plugins/start/vim-Grammalecte
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 996cb82237b247bba21dc5cd979b5c22e2060271
|
1
pack/plugins/start/vim-doge
Submodule
1
pack/plugins/start/vim-doge
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit f1a08b4cbd03c1810ab3533e1138e75318cde99c
|
1
pack/plugins/start/vim-endwise
Submodule
1
pack/plugins/start/vim-endwise
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 97180a73ad26e1dcc1eebe8de201f7189eb08344
|
1
pack/plugins/start/vim-sourcepawn
Submodule
1
pack/plugins/start/vim-sourcepawn
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 94618fb252e1e7271d9780103f0d213c7fd848d8
|
1
pack/plugins/start/vimtex
Submodule
1
pack/plugins/start/vimtex
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 2d032e54c95593f1ea8bd458fc940a20a8f390f9
|
12
plugin/rainbow_main.vim
Normal file
12
plugin/rainbow_main.vim
Normal file
|
@ -0,0 +1,12 @@
|
|||
" 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
|
76
vimrc
Normal file
76
vimrc
Normal file
|
@ -0,0 +1,76 @@
|
|||
"source ~/.vim/vimrc.bepo
|
||||
|
||||
" load plugins
|
||||
" execute pathogen#infect()
|
||||
|
||||
colorscheme codedark
|
||||
set term=screen-256color " règle error tmux pour la couleur
|
||||
" rajoutez dans .tmux.conf :
|
||||
" set -g default-terminal "screen-256color"
|
||||
|
||||
syntax on
|
||||
let mapleader='\'
|
||||
let maplocalleader=';'
|
||||
filetype plugin indent on " load filetype-specific indent files
|
||||
|
||||
set tabstop=4 " affiche 1 tab comme 4 espaces
|
||||
set softtabstop=4
|
||||
set shiftwidth=4 " > indente de 4 espaces
|
||||
set expandtab " utilise les espaces au lieu des tabulations
|
||||
set smarttab " insère des tab en début de ligne selon shiftwidth
|
||||
set ai " indentation automatique
|
||||
set si " auto indentation + intelligente
|
||||
set wrap " coupe la ligne si elle est plus grande que la fenetre
|
||||
" et la met en dessous
|
||||
|
||||
set colorcolumn=80
|
||||
hi ColorColumn ctermbg=darkgrey
|
||||
|
||||
set number " affiche les numéros de lignes
|
||||
set relativenumber " affiche les numéros de lignes en fonction de l’actuelle
|
||||
set noerrorbells " désactive le son en cas d’erreur
|
||||
set laststatus=2 " affiche le nom du fichier en bas
|
||||
set showcmd " affiche la commande en bas
|
||||
set cursorline " ligne actuelle en couleur
|
||||
set cursorcolumn " cologne actuelle en couleur
|
||||
set wildmenu " visual autocomplete for command menu
|
||||
set lazyredraw " redraw only when we need to.
|
||||
|
||||
set showmatch " highlight matching [{()}]
|
||||
set incsearch " search as characters are entered
|
||||
set hlsearch " highlight matches
|
||||
|
||||
" folding (cacher les fonctions)
|
||||
set foldenable " activation des fold
|
||||
set foldmethod=syntax
|
||||
set foldlevelstart=10 " nombre de fold déjà ouvert de base
|
||||
set foldnestmax=10 " nombre de fold dans des folds
|
||||
|
||||
" raccourcis perso
|
||||
|
||||
" pour changer de buffer
|
||||
nnoremap <localleader>k :bn<enter>
|
||||
nnoremap <localleader>j :bp<enter>
|
||||
|
||||
" paramètres de plugins
|
||||
let g:rainbow_active=1
|
||||
let g:doge_doc_standard_c='kernel_doc'
|
||||
let g:grammalecte_cli_py='$HOME/.local/bin/grammalecte/grammalecte-cli.py'
|
||||
|
||||
" options pour vimtex
|
||||
let g:vimtex_compiler_enabled = 0
|
||||
let g:vimtex_view_enabled = 0
|
||||
|
||||
" paramètres des langages
|
||||
|
||||
let perl_fold = 1
|
||||
"let perl_fold_blocks = 1
|
||||
|
||||
" paramètre pour Dart
|
||||
let g:dart_style_guide = 2
|
||||
|
||||
" parametre pour la taille des espaces selon le langage
|
||||
autocmd Filetype java setlocal expandtab tabstop=8 shiftwidth=8 softtabstop=8
|
||||
autocmd Filetype javascript setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
|
||||
autocmd Filetype c setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
|
||||
autocmd Filetype css setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
|
81
vimrc.bepo
Normal file
81
vimrc.bepo
Normal file
|
@ -0,0 +1,81 @@
|
|||
" {W} -> [É]
|
||||
" ——————————
|
||||
" On remappe W sur É :
|
||||
noremap é w
|
||||
noremap É W
|
||||
" Corollaire: on remplace les text objects aw, aW, iw et iW
|
||||
" pour effacer/remplacer un mot quand on n’est pas au début (daé / laé).
|
||||
onoremap aé aw
|
||||
onoremap aÉ aW
|
||||
onoremap ié iw
|
||||
onoremap iÉ iW
|
||||
" Pour faciliter les manipulations de fenêtres, on utilise {W} comme un Ctrl+W :
|
||||
noremap w <C-w>
|
||||
noremap W <C-w><C-w>
|
||||
|
||||
" [HJKL] -> {CTSR}
|
||||
" ————————————————
|
||||
" {cr} = « gauche / droite »
|
||||
noremap c h
|
||||
noremap r l
|
||||
" {ts} = « haut / bas »
|
||||
noremap t j
|
||||
noremap s k
|
||||
" {CR} = « haut / bas de l'écran »
|
||||
noremap C H
|
||||
noremap R L
|
||||
" {TS} = « joindre / aide »
|
||||
noremap T J
|
||||
noremap S K
|
||||
" Corollaire : repli suivant / précédent
|
||||
noremap zs zj
|
||||
noremap zt zk
|
||||
|
||||
" {HJKL} <- [CTSR]
|
||||
" ————————————————
|
||||
" {J} = « Jusqu'à » (j = suivant, J = précédant)
|
||||
noremap j t
|
||||
noremap J T
|
||||
" {L} = « Change » (l = attend un mvt, L = jusqu'à la fin de ligne)
|
||||
noremap l c
|
||||
noremap L C
|
||||
" {H} = « Remplace » (h = un caractère slt, H = reste en « Remplace »)
|
||||
noremap h r
|
||||
noremap H R
|
||||
" {K} = « Substitue » (k = caractère, K = ligne)
|
||||
noremap k s
|
||||
noremap K S
|
||||
" Corollaire : correction orthographique
|
||||
noremap ]k ]s
|
||||
noremap [k [s
|
||||
|
||||
" Désambiguation de {g}
|
||||
" —————————————————————
|
||||
" ligne écran précédente / suivante (à l'intérieur d'une phrase)
|
||||
noremap gs gk
|
||||
noremap gt gj
|
||||
" onglet précédent / suivant
|
||||
noremap gb gT
|
||||
noremap gé gt
|
||||
" optionnel : {gB} / {gÉ} pour aller au premier / dernier onglet
|
||||
noremap gB :exe "silent! tabfirst"<CR>
|
||||
noremap gÉ :exe "silent! tablast"<CR>
|
||||
" optionnel : {g"} pour aller au début de la ligne écran
|
||||
noremap g" g0
|
||||
|
||||
" <> en direct
|
||||
" ————————————
|
||||
noremap « <
|
||||
noremap » >
|
||||
|
||||
" Remaper la gestion des fenêtres
|
||||
" ———————————————————————————————
|
||||
noremap wt <C-w>j
|
||||
noremap ws <C-w>k
|
||||
noremap wc <C-w>h
|
||||
noremap wr <C-w>l
|
||||
noremap wd <C-w>c
|
||||
noremap wo <C-w>s
|
||||
noremap wp <C-w>o
|
||||
noremap w<SPACE> :split<CR>
|
||||
noremap w<CR> :vsplit<CR>
|
Loading…
Reference in a new issue