From f70d5dc9b1f546bcfae67f067fe2e3b67f94ca45 Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 3 Nov 2021 19:59:44 +0100 Subject: improving dotfiles --- vim/README.md | 48 --- vim/colors/miguels.vim | 200 ----------- vim/colors/olgas.vim | 117 ------ vim/init.vim | 1 - vim/syntax/htmljinja.vim | 27 -- vim/syntax/jinja.vim | 113 ------ vim/vim-colortune/colortune.vim | 468 ------------------------ vim/vim-potion/autoload/potion/running.vim | 33 -- vim/vim-potion/doc/potion.txt | 99 ------ vim/vim-potion/ftdetect/potion.vim | 1 - vim/vim-potion/ftplugin/potion/folding.vim | 38 -- vim/vim-potion/ftplugin/potion/running.vim | 6 - vim/vim-potion/ftplugin/potion/sections.vim | 47 --- vim/vim-potion/syntax/potion.vim | 37 -- vim/vim-potion/syntax/potionbytecode.vim | 18 - vim/vimrc | 527 ---------------------------- 16 files changed, 1780 deletions(-) delete mode 100644 vim/README.md delete mode 100644 vim/colors/miguels.vim delete mode 100644 vim/colors/olgas.vim delete mode 120000 vim/init.vim delete mode 100644 vim/syntax/htmljinja.vim delete mode 100644 vim/syntax/jinja.vim delete mode 100644 vim/vim-colortune/colortune.vim delete mode 100644 vim/vim-potion/autoload/potion/running.vim delete mode 100644 vim/vim-potion/doc/potion.txt delete mode 100644 vim/vim-potion/ftdetect/potion.vim delete mode 100644 vim/vim-potion/ftplugin/potion/folding.vim delete mode 100644 vim/vim-potion/ftplugin/potion/running.vim delete mode 100644 vim/vim-potion/ftplugin/potion/sections.vim delete mode 100644 vim/vim-potion/syntax/potion.vim delete mode 100644 vim/vim-potion/syntax/potionbytecode.vim delete mode 100644 vim/vimrc (limited to 'vim') diff --git a/vim/README.md b/vim/README.md deleted file mode 100644 index ce66158..0000000 --- a/vim/README.md +++ /dev/null @@ -1,48 +0,0 @@ -My Vimrc Config -=============== - -This repo hosts my personal vim config files. -They are very unlikely to be useful to anybody (excepting me) at this point. - -Dependancies -============ - -Requires Vundle.vim which is available from github. - -I found the following on vim.org. - -* syntax/htmljinja.vim -* syntax/jinja.vim - -Installation -============ - -* symlink this directory to ~/.vim -* symlink this directory to ~/.config/nvim -* git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim -* Launch vim and run :PluginInstall - -Vim Colortune -============= - -The vim-colortune directory holds my simple, still unpolished plugin to easily tune -the vim colors from inside vim. - -Vim Potion -========== - -The vim-potion directory holds the result of my attempt to learn vimscript along -Steve Losh's book: Learn Vimscript The Hard Way: http://learnvimscriptthehardway.stevelosh.com/ - -License -======= - -Copyright (c) 2014-2019 Michal Idziorek (unless stated otherwise) - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vim/colors/miguels.vim b/vim/colors/miguels.vim deleted file mode 100644 index 79b18af..0000000 --- a/vim/colors/miguels.vim +++ /dev/null @@ -1,200 +0,0 @@ -" -" Miguel's Vim Colors -" -" So far this scheme is mostly optimized for the gui version of vim. -" adaption for cterm / xterm might follow one day -" -" useful vim help-screens: group-name, highlight-groups, cterm-colors -" rgb: /usr/share/vim/vim73/rgb.txt -" - -set background=dark - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let g:colors_name = "miguels" - -"first objective is to set: guifg guibg gui and maybe guisp -"afterwards we will port this to xterm -"""""""""""""""""""""""""""""""""""""""""""""""""""" - -"Normal normal text, we can also use "font=Monospace 10" or similar -hi Normal guifg=White guibg=Black gui=none ctermfg=White ctermbg=Black - -""""""""""""""""""""""""""""""""""""""""""""""""""" - -"Comment /* */, //, ... -hi Comment guifg=#5a7 gui=none ctermfg=DarkGreen cterm=none - -"Constant true, false, 0.123, "hello", ... -hi Constant guifg=#8f6 gui=bold ctermfg=Cyan cterm=none - -"Identifier mysql_escape_string, $dupa, ... -hi Identifier guifg=orange gui=bold ctermfg=Brown cterm=none - -"Statement if, for, return, ... -hi Statement guifg=#f76 gui=bold ctermfg=Red cterm=none - -"PreProc #include, ... -hi PreProc guifg=#fe5 gui=none ctermfg=Yellow cterm=none - -"Type int, float, bool, struct ... -hi Type guifg=#89f gui=bold ctermfg=Blue cterm=bold - -"Special " displayed when a double-wide character doesn't fit at the end of the line). -hi NonText guibg=gray10 guifg=#f0f gui=bold - -"Pmenu Popup menu: normal item. -hi Pmenu guibg=orange guifg=black - -"PmenuSel Popup menu: selected item. -hi PmenuSel guibg=red guifg=black gui=bold - -"PmenuSbar Popup menu: scrollbar. -hi PmenuSbar guibg=red - -"PmenuThumb Popup menu: Thumb of the scrollbar. -hi PmenuThumb guibg=black - -"Question |hit-enter| prompt and yes/no questions -hi Question guifg=yellow guibg=gray10 gui=bold - -"Search Last search pattern highlighting (see 'hlsearch'). Also used for highlighting the current line in the quickfix window and similar items that need to stand out. -hi Search guibg=orange guifg=black - -"SpecialKey Meta and special keys listed with ":map", also for text used to show unprintable characters in the text, 'listchars'. Generally: text that is displayed differently from what it really is. -hi SpecialKey guibg=gray20 guifg=#f95 gui=bold - -"SpellBad Word Warsaw that is not recoggized by the spellchecker. |spell| This will be combined with the highlighting used otherwise. -hi SpellBad gui=undercurl guisp=red - -"SpellCap Word that should start with a capital. |spell| This will be combined with the highlighting used otherwise. -hi SpellCap gui=undercurl guisp=yellow - -"SpellLocal Word that is recognized by the spellchecker as one that is used in another region. |spell| This will be combined with the highlighting used otherwise. -hi SpellLocal gui=undercurl guisp=LightBlue - -"SpellRare Word that is recognized by the spellchecker as one that is hardly ever used. |spell| This will be combined with the highlighting used otherwise. -hi SpellRare gui=undercurl guisp=green - -"StatusLine status line of current window -hi StatusLine guibg=gray20 guifg=white gui=none - -"StatusLineNC status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. -hi StatusLineNC guibg=gray10 guifg=grey50 gui=none - -"Title titles for output from ":set all", ":autocmd" etc. -hi Title guifg=red guibg=gray10 gui=bold - -"Visual Visual mode selection -hi Visual gui=none guifg=white guibg=blue ctermfg=white ctermbg=blue cterm=none term=reverse - -"VisualNOS Visual mode selection when vim is "Not Owning the Selection". Only X11 Gui's |gui-x11| and |xterm-clipboard| supports this. -" I do not use this by now (set to strange colors to notice them easily) -hi VisualNOS gui=underline guifg=yellow guibg=red - -"WarningMsg warning messages -hi WarningMsg guifg=black guibg=#fa0 gui=bold - -"WildMenu current match in 'wildmenu' completion -hi WildMenu guibg=yellow guifg=black gui=bold - -" -"(The following only applies to the terminal version) -" - -"TabLine tab pages line, not active tab page label -hi TabLine ctermbg=darkgray ctermfg=gray - -"TabLineFill tab pages line, where there are no labels -hi TabLineFill ctermbg=black cterm=none - -"TabLineSel tab pages line, active tab page label -hi TabLineSel ctermbg=gray ctermfg=white - - diff --git a/vim/colors/olgas.vim b/vim/colors/olgas.vim deleted file mode 100644 index 1d7131e..0000000 --- a/vim/colors/olgas.vim +++ /dev/null @@ -1,117 +0,0 @@ -set background=dark -hi clear -if exists("syntax_on") -syntax reset -endif -let g:colors_name = "olgas" - -" cterm colors -hi Normal cterm=NONE ctermfg=15 ctermbg=0 -hi Comment cterm=NONE ctermfg=32 ctermbg=NONE -hi Constant cterm=NONE ctermfg=40 ctermbg=NONE -hi Identifier cterm=bold ctermfg=11 ctermbg=NONE -hi Statement cterm=bold ctermfg=196 ctermbg=NONE -hi PreProc cterm=NONE ctermfg=136 ctermbg=NONE -hi Type cterm=bold ctermfg=135 ctermbg=NONE -hi Special cterm=bold ctermfg=51 ctermbg=NONE -hi Underlined cterm=underline ctermfg=NONE ctermbg=NONE -hi Ignore cterm=NONE ctermfg=240 ctermbg=NONE -hi Error cterm=bold ctermfg=15 ctermbg=196 -hi Todo cterm=bold ctermfg=16 ctermbg=11 -hi ColorColumn cterm=NONE ctermfg=NONE ctermbg=17 -hi Conceal cterm=NONE ctermfg=248 ctermbg=NONE -hi CursorColumn cterm=NONE ctermfg=NONE ctermbg=17 -hi CursorLine cterm=underline ctermfg=NONE ctermbg=17 -hi Directory cterm=NONE ctermfg=11 ctermbg=NONE -hi DiffAdd cterm=NONE ctermfg=0 ctermbg=14 -hi DiffChange cterm=NONE ctermfg=0 ctermbg=14 -hi DiffText cterm=NONE ctermfg=0 ctermbg=14 -hi ErrorMsg cterm=bold ctermfg=15 ctermbg=196 -hi VertSplit cterm=NONE ctermfg=248 ctermbg=17 -hi Folded cterm=bold ctermfg=15 ctermbg=17 -hi FoldColumn cterm=bold ctermfg=11 ctermbg=17 -hi SignColumn cterm=bold ctermfg=14 ctermbg=17 -hi IncSearch cterm=bold ctermfg=16 ctermbg=208 -hi LineNr cterm=NONE ctermfg=239 ctermbg=NONE -hi CursorLineNr cterm=bold ctermfg=16 ctermbg=7 -hi MatchParen cterm=bold ctermfg=196 ctermbg=NONE -hi ModeMsg cterm=bold ctermfg=NONE ctermbg=4 -hi MoreMsg cterm=bold ctermfg=NONE ctermbg=4 -hi NonText cterm=bold ctermfg=4 ctermbg=NONE -hi PmenuSel cterm=NONE ctermfg=0 ctermbg=14 -hi PmenuSbar cterm=NONE ctermfg=0 ctermbg=14 -hi PmenuThumb cterm=NONE ctermfg=0 ctermbg=14 -hi Question cterm=bold ctermfg=15 ctermbg=2 -hi Search cterm=bold ctermfg=16 ctermbg=11 -hi SpecialKey cterm=bold ctermfg=11 ctermbg=17 -hi SpellBad cterm=underline ctermfg=203 ctermbg=NONE -hi SpellCap cterm=underline ctermfg=214 ctermbg=NONE -hi SpellLocal cterm=underline ctermfg=105 ctermbg=NONE -hi SpellRare cterm=underline ctermfg=112 ctermbg=NONE -hi StatusLine cterm=NONE ctermfg=NONE ctermbg=NONE -hi StatusLineNC cterm=NONE ctermfg=241 ctermbg=NONE -hi Title cterm=bold ctermfg=14 ctermbg=NONE -hi Visual cterm=bold ctermfg=NONE ctermbg=4 -hi VisualNOS cterm=bold,underline ctermfg=11 ctermbg=196 -hi WarningMsg cterm=bold ctermfg=15 ctermbg=1 -hi WildMenu cterm=bold ctermfg=15 ctermbg=17 -hi TabLine cterm=NONE ctermfg=248 ctermbg=17 -hi TabLineFill cterm=NONE ctermfg=0 ctermbg=17 -hi TabLineSel cterm=bold ctermfg=15 ctermbg=0 - -"gui colors -hi Normal gui=NONE guifg=white guibg=black guisp=NONE -hi Comment gui=NONE guifg=#7799cc guibg=NONE guisp=NONE -hi Constant gui=NONE guifg=green guibg=NONE guisp=NONE -hi Identifier gui=bold guifg=yellow guibg=NONE guisp=NONE -hi Statement gui=bold guifg=orangered guibg=NONE guisp=NONE -hi PreProc gui=NONE guifg=#ffaa44 guibg=NONE guisp=NONE -hi Type gui=bold guifg=#aa55ff guibg=NONE guisp=NONE -hi Special gui=bold guifg=cyan guibg=NONE guisp=NONE -hi Underlined gui=underline guifg=NONE guibg=NONE guisp=NONE -hi Ignore gui=NONE guifg=grey20 guibg=NONE guisp=NONE -hi Error gui=bold guifg=white guibg=red guisp=NONE -hi Todo gui=bold guifg=black guibg=gold guisp=NONE -hi ColorColumn gui=NONE guifg=NONE guibg=#000036 guisp=NONE -hi Conceal gui=NONE guifg=LightGrey guibg=gray20 guisp=NONE -hi Cursor gui=bold guifg=black guibg=white guisp=NONE -hi CursorIM gui=underline guifg=yellow guibg=red guisp=NONE -hi CursorColumn gui=NONE guifg=NONE guibg=#000036 guisp=NONE -hi CursorLine gui=underline guifg=NONE guibg=#000036 guisp=NONE -hi Directory gui=NONE guifg=yellow guibg=NONE guisp=NONE -hi DiffAdd gui=NONE guifg=black guibg=cyan guisp=NONE -hi DiffChange gui=NONE guifg=black guibg=cyan guisp=NONE -hi DiffText gui=NONE guifg=black guibg=cyan guisp=NONE -hi ErrorMsg gui=bold guifg=white guibg=red guisp=NONE -hi VertSplit gui=NONE guifg=gray20 guibg=#000036 guisp=NONE -hi Folded gui=bold guifg=white guibg=#000056 guisp=NONE -hi FoldColumn gui=bold guifg=yellow guibg=#000026 guisp=NONE -hi SignColumn gui=bold guifg=cyan guibg=#000026 guisp=NONE -hi IncSearch gui=bold guifg=black guibg=orangered guisp=NONE -hi LineNr gui=NONE guifg=gray30 guibg=#000026 guisp=NONE -hi CursorLineNr gui=bold guifg=gray10 guibg=gray60 guisp=NONE -hi MatchParen gui=bold guifg=red guibg=#000036 guisp=NONE -hi ModeMsg gui=bold guifg=white guibg=blue guisp=NONE -hi MoreMsg gui=bold guifg=white guibg=blue guisp=NONE -hi NonText gui=bold guifg=#5577ee guibg=gray5 guisp=NONE -hi PmenuSel gui=NONE guifg=black guibg=cyan guisp=NONE -hi PmenuSbar gui=NONE guifg=black guibg=cyan guisp=NONE -hi PmenuThumb gui=NONE guifg=black guibg=cyan guisp=NONE -hi Question gui=bold guifg=white guibg=darkgreen guisp=NONE -hi Search gui=bold guifg=black guibg=orange guisp=NONE -hi SpecialKey gui=bold guifg=yellow guibg=gray10 guisp=NONE -hi SpellBad gui=undercurl guifg=NONE guibg=NONE guisp=red -hi SpellCap gui=undercurl guifg=NONE guibg=NONE guisp=yellow -hi SpellLocal gui=undercurl guifg=NONE guibg=NONE guisp=LightBlue -hi SpellRare gui=undercurl guifg=NONE guibg=NONE guisp=green -hi StatusLine gui=NONE guifg=NONE guibg=#000026 guisp=NONE -hi StatusLineNC gui=NONE guifg=gray40 guibg=#000026 guisp=NONE -hi Title gui=bold guifg=MediumSpringGreen guibg=NONE guisp=NONE -hi Visual gui=bold guifg=white guibg=blue guisp=NONE -hi VisualNOS gui=underline guifg=yellow guibg=red guisp=NONE -hi WarningMsg gui=bold guifg=white guibg=orangered guisp=NONE -hi WildMenu gui=bold guifg=white guibg=#112266 guisp=NONE -hi TabLine gui=NONE guifg=black guibg=cyan guisp=NONE -hi TabLineFill gui=NONE guifg=black guibg=cyan guisp=NONE -hi TabLineSel gui=NONE guifg=black guibg=cyan guisp=NONE - diff --git a/vim/init.vim b/vim/init.vim deleted file mode 120000 index c9a3c9c..0000000 --- a/vim/init.vim +++ /dev/null @@ -1 +0,0 @@ -vimrc \ No newline at end of file diff --git a/vim/syntax/htmljinja.vim b/vim/syntax/htmljinja.vim deleted file mode 100644 index 3f9cba4..0000000 --- a/vim/syntax/htmljinja.vim +++ /dev/null @@ -1,27 +0,0 @@ -" Vim syntax file -" Language: Jinja HTML template -" Maintainer: Armin Ronacher -" Last Change: 2007 Apr 8 - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -if !exists("main_syntax") - let main_syntax = 'html' -endif - -if version < 600 - so :p:h/jinja.vim - so :p:h/html.vim -else - runtime! syntax/jinja.vim - runtime! syntax/html.vim - unlet b:current_syntax -endif - -let b:current_syntax = "htmljinja" diff --git a/vim/syntax/jinja.vim b/vim/syntax/jinja.vim deleted file mode 100644 index 7704e3a..0000000 --- a/vim/syntax/jinja.vim +++ /dev/null @@ -1,113 +0,0 @@ -" Vim syntax file -" Language: Jinja template -" Maintainer: Armin Ronacher -" Last Change: 2008 May 9 -" Version: 1.1 -" -" Known Bugs: -" because of odd limitations dicts and the modulo operator -" appear wrong in the template. -" -" Changes: -" -" 2008 May 9: Added support for Jinja2 changes (new keyword rules) - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syntax case match - -" Jinja template built-in tags and parameters (without filter, macro, is and raw, they -" have special threatment) -syn keyword jinjaStatement containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained and if else in not or recursive as import - -syn keyword jinjaStatement containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained is filter skipwhite nextgroup=jinjaFilter -syn keyword jinjaStatement containedin=jinjaTagBlock contained macro skipwhite nextgroup=jinjaFunction -syn keyword jinjaStatement containedin=jinjaTagBlock contained block skipwhite nextgroup=jinjaBlockName - -" Variable Names -syn match jinjaVariable containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained skipwhite /[a-zA-Z_][a-zA-Z0-9_]*/ -syn keyword jinjaSpecial containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained false true none loop super caller varargs kwargs - -" Filters -syn match jinjaOperator "|" containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained nextgroup=jinjaFilter -syn match jinjaFilter contained skipwhite /[a-zA-Z_][a-zA-Z0-9_]*/ -syn match jinjaFunction contained skipwhite /[a-zA-Z_][a-zA-Z0-9_]*/ -syn match jinjaBlockName contained skipwhite /[a-zA-Z_][a-zA-Z0-9_]*/ - -" Jinja template constants -syn region jinjaString containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained start=/"/ skip=/\\"/ end=/"/ -syn region jinjaString containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained start=/'/ skip=/\\'/ end=/'/ -syn match jinjaNumber containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[0-9]\+\(\.[0-9]\+\)\?/ - -" Operators -syn match jinjaOperator containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[+\-*\/<>=!,:]/ -syn match jinjaPunctuation containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /[()\[\]]/ -syn match jinjaOperator containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained /\./ nextgroup=jinjaAttribute -syn match jinjaAttribute contained /[a-zA-Z_][a-zA-Z0-9_]*/ - -" Jinja template tag and variable blocks -syn region jinjaNested matchgroup=jinjaOperator start="(" end=")" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained -syn region jinjaNested matchgroup=jinjaOperator start="\[" end="\]" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained -syn region jinjaNested matchgroup=jinjaOperator start="{" end="}" transparent display containedin=jinjaVarBlock,jinjaTagBlock,jinjaNested contained -syn region jinjaTagBlock matchgroup=jinjaTagDelim start=/{%-\?/ end=/-\?%}/ skipwhite containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaRaw,jinjaString,jinjaNested,jinjaComment - -syn region jinjaVarBlock matchgroup=jinjaVarDelim start=/{{-\?/ end=/-\?}}/ containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaRaw,jinjaString,jinjaNested,jinjaComment - -" Jinja template 'raw' tag -syn region jinjaRaw matchgroup=jinjaRawDelim start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString,jinjaComment - -" Jinja comments -syn region jinjaComment matchgroup=jinjaCommentDelim start="{#" end="#}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString - -" Block start keywords. A bit tricker. We only highlight at the start of a -" tag block and only if the name is not followed by a comma or equals sign -" which usually means that we have to deal with an assignment. -syn match jinjaStatement containedin=jinjaTagBlock contained skipwhite /\({%-\?\s*\)\@<=\<[a-zA-Z_][a-zA-Z0-9_]*\>\(\s*[,=]\)\@!/ - -" and context modifiers -syn match jinjaStatement containedin=jinjaTagBlock contained /\/ skipwhite - - -" Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_jinja_syn_inits") - if version < 508 - let did_jinja_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink jinjaPunctuation jinjaOperator - HiLink jinjaAttribute jinjaVariable - HiLink jinjaFunction jinjaFilter - - HiLink jinjaTagDelim jinjaTagBlock - HiLink jinjaVarDelim jinjaVarBlock - HiLink jinjaCommentDelim jinjaComment - HiLink jinjaRawDelim jinja - - HiLink jinjaSpecial Special - HiLink jinjaOperator Normal - HiLink jinjaRaw Normal - HiLink jinjaTagBlock PreProc - HiLink jinjaVarBlock PreProc - HiLink jinjaStatement Statement - HiLink jinjaFilter Function - HiLink jinjaBlockName Function - HiLink jinjaVariable Identifier - HiLink jinjaString Constant - HiLink jinjaNumber Constant - HiLink jinjaComment Comment - - delcommand HiLink -endif - -let b:current_syntax = "jinja" diff --git a/vim/vim-colortune/colortune.vim b/vim/vim-colortune/colortune.vim deleted file mode 100644 index 97f2afd..0000000 --- a/vim/vim-colortune/colortune.vim +++ /dev/null @@ -1,468 +0,0 @@ -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" -" Miguel's ColorTune plugin -" -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" {{{ -" -" TODO LIST: -" {{{ -" * restrict movement and values, but how??? -" * use R/G/B r/g/b keys to increase/decrease rgb values -" * map some nice short-keys for this buffer only -" * show rgb.txt! to alllow selection of named gui-colors -" * show some dropdowns or something for other stuff -" * let user override some of the values from users vimrc!! -" * enable reset to colortheme -" * clear all groups / clear group completely or just for active mode! -" * document and publish -" * treat NONE and NOT SET AT ALL differently!! -" * add some error detection and treatment! ie. setline etc.. -" * just redraw single lines where possible -" * REORDER and CLEANUP -" * create bundle and move most of functioanlity to autoload, -" except Colortune_start or somehting -" * check if we are not reinventing the wheel at some places: -" ie: getline()? -" * check if there are already such plugins, and find out why this one is -" better ;) -" * BUG: regex limited number so start/stop omittted in complete list -" so it is also not exported via config_dump right now -" * BUG: i do not understand set background. it is always set to dark by now -" * BUG: column names are not nicely aligned -" * BUG: spaces are not supported within key-values -" -" }}} - -" Set some basic defaults and initialize -" {{{ - -" modes are: 0-term, 1-cterm, 2-gui, 3-complete -let s:default_mode=2 - -let s:colortune_buf_name='__COLORTUNE_PLUGIN__' - -let s:temp_reg='a' - -" Define the popular highlight groups -let s:colortable=[ - \ 'Normal', 'Comment', 'Constant', 'Identifier', - \ 'Statement', 'PreProc', 'Type', 'Special', 'Underlined', - \ 'Ignore', 'Error', 'Todo', 'ColorColumn', 'Conceal', 'Cursor', - \ 'CursorIM', 'CursorColumn', 'CursorLine', 'Directory', - \ 'DiffAdd', 'DiffChange', 'DiffText', 'ErrorMsg', 'VertSplit', - \ 'Folded', 'FoldColumn', 'SignColumn', 'IncSearch', 'LineNr', - \ 'CursorLineNr', 'MatchParen', 'ModeMsg', 'MoreMsg', 'NonText', - \ 'PmenuSel', 'PmenuSbar', 'PmenuThumb', 'Question', 'Search', - \ 'SpecialKey', 'SpellBad', 'SpellCap', 'SpellLocal', - \ 'SpellRare', 'StatusLine', 'StatusLineNC', 'Title', 'Visual', - \ 'VisualNOS', 'WarningMsg', 'WildMenu', 'TabLine', - \ 'TabLineFill', 'TabLineSel' ] - - -" Define modes and their relevant keys in the highlight groups -let s:modes_labels=['Black & White Terminals','Color Terminals','GUI','Complete'] -let s:modes=[ ['term','start','stop'], - \ ['cterm','ctermfg','ctermbg'], - \ ['gui','guifg','guibg','guisp'], - \ ['term','cterm','ctermfg','ctermbg','gui','guifg','guibg','guisp']] - -" init -" -let s:current_mode=s:default_mode -" }}} - -" Colortune_getline() -" {{{ -" Retruns current line of current buffer. -" -function! Colortune_getline() - return getline(line('.')) -endfunction -" }}} - -" Colortune_getcmdoutput(cmd) -" {{{ -" Redirect the output of cmd to a temporary register and return result. -" -function! Colortune_getcmdoutput(cmd) - - let reg_val=getreg(s:temp_reg) - redir @a - silent execute a:cmd - redir END - let val=getreg(s:temp_reg) - call setreg(s:temp_reg,reg_val) - return val - -endfunction -" }}} - -" Colortune_getattr(group,key) -" {{{ -" Get the value of one 'key' of a highlighting group -" returns 'NONE' if the requested key is not specified -" -function! Colortune_getattr(group,key) - - let hil=Colortune_getcmdoutput('hi '.a:group) - - " extract the value for given key (if exists) and return - if hil !~# a:key.'=.\+' - let val='NONE' - else - let val=substitute(hil.' ','^.* '.a:key.'=\(.\{-}\)\s.*$','\1','') - endif - return val - -endfunction -"}}} - -" Colortune_getmax(key) -" {{{ -" Returns maximal length of values for requested key. -" key='GROUP_NAME' returns maximal length of highlight group names. -" -function! Colortune_getmax(key) - let max=0 - for group in s:colortable - if(a:key==#'GROUP_NAME') - let length=len(group) - else - let length=len(Colortune_getattr(group,a:key)) - endif - let max = max0 - let len-=1 - let val.=a:fill - endwhile - return val - -endfunction -" }}} - -" Colortune_togglemode() -" {{{ -" Cycles through available modes -" -function! Colortune_togglemode() - - let max=len(s:modes)-1 - let s:current_mode+=1 - if s:current_mode > max - let s:current_mode=0 - endif - call Colortune_fill() -endfunction -" }}} - -" Colortune_getregexpattern() -" {{{ -" Helper function that builds our regex-pattern for setting and clearing -" the highlight values, based on the current buffer-line -" -function! Colortune_getregexpattern() - - let str='^\(.\{-}\)\s.*' - - for column in s:modes[s:current_mode] - let str.='.*\[\(.*\)\]' - endfor - - return str - -endfunction -" }}} - -" Colortune_getregexstring() -" {{{ -" Helper function that builds our substitution string for setting -" the highlight values, based on the current buffer-line -" -function! Colortune_getregexstring() - let str='' - let idx=2 - for column in s:modes[s:current_mode] - let str.=' '.column.'=\'.idx - let idx+=1 - endfor - return str -endfunction -" }}} - -" Colortune_clearbyline() -" {{{ -" Clear highlight group in current line -" Set highlight group values by extracting them from the current line -" -function! Colortune_clearbyline() - let myline=Colortune_getline() - exec substitute(myline,Colortune_getregexpattern(),'hi clear \1','') - call Colortune_fill() -endfunction -" }}} - -" Colortune_setbyline() -" {{{ -" Set highlight group values by extracting them from the current line -" -function! Colortune_setbyline() - let myline=Colortune_getline() - exec substitute(myline,Colortune_getregexpattern(),'hi \1 '.Colortune_getregexstring(),'') - call Colortune_fill() -endfunction -" }}} - -" Colortune_fill() -" {{{ -" Create or Redraw the ColorTune Window/Buffer -" -function! Colortune_fill() - - " open a new split or switch to it (if already open) - let potbufnr=bufwinnr(s:colortune_buf_name) - if potbufnr==#-1 - execute 'vsplit '.s:colortune_buf_name - else - execute potbufnr.'wincmd w' - endif - - " set some options - setlocal filetype=colortune - setlocal buftype=nofile - setlocal nowrap - - " set mappings - nnoremap :call Colortune_setbyline() - inoremap :call Colortune_setbyline() - - nnoremap X :call Colortune_clearbyline() - nnoremap M :call Colortune_togglemode() - nnoremap C :call Colortune_dumpconfig() - - nnoremap Ar :call Colortune_manipulate_rgb(16,0,0) - nnoremap Sr :call Colortune_manipulate_rgb(-16,0,0) - nnoremap Ag :call Colortune_manipulate_rgb(0,16,0) - nnoremap Sg :call Colortune_manipulate_rgb(0,-16,0) - nnoremap Ab :call Colortune_manipulate_rgb(0,0,16) - nnoremap Sb :call Colortune_manipulate_rgb(0,0,-16) - - nnoremap ar :call Colortune_manipulate_rgb(1,0,0) - nnoremap sr :call Colortune_manipulate_rgb(-1,0,0) - nnoremap ag :call Colortune_manipulate_rgb(0,1,0) - nnoremap sg :call Colortune_manipulate_rgb(0,-1,0) - nnoremap ab :call Colortune_manipulate_rgb(0,0,1) - nnoremap sb :call Colortune_manipulate_rgb(0,0,-1) - - - nnoremap VG :call Colortune_showguirgb() - nnoremap VC :call Colortune_showctermrgb() - - - " set syntax highlighting for our group keywords - for mycolor in s:colortable - execute 'syn keyword '.mycolor.' '.mycolor - endfor - - " remember current position and clean the buffer - let top_line=line('w0') - let cur_line=line('.') - let save_cursor = getpos(".") - normal! ggdG - - " display header with some infos - call append(line('$')-1,'------------------------------------------') - call append(line('$')-1,'Colortable Mode: ['.s:modes_labels[s:current_mode].']') - call append(line('$')-1,'------------------------------------------') - call append(line('$')-1,'ENTER - Set from current line -----------') - call append(line('$')-1,'X - Unset current line --------------') - call append(line('$')-1,'M - Toggle Mode ---------------------') - call append(line('$')-1,'C - Dump Config to new buffer -------') - call append(line('$')-1,'VC - View palette (cterm) -----------') - call append(line('$')-1,'VG - View palette (gui) -------------') - call append(line('$')-1,'a[rgb] - increase [rgb]] by 1 ------------') - call append(line('$')-1,'A[rgb] - increase [rgb]] by 16 -----------') - call append(line('$')-1,'s[rgb] - decrease [rgb]] by 1 ------------') - call append(line('$')-1,'S[rgb] - decrease [rgb]] by 16 -----------') - call append(line('$')-1,'------------------------------------------') - call append(line('$')-1,'-') - - " find out the maximal length for each column - let max_len=[Colortune_getmax('GROUP_NAME')] - for column in s:modes[s:current_mode] - let max_len+=[Colortune_getmax(column)] - endfor - - " display column names - let labels=Colortune_extend('GROUP_NAME'.' ',' ',5+max_len[0]) - let idx=1 - for column in s:modes[s:current_mode] - let labels.=' '.Colortune_extend(column,' ',max_len[idx]).' ' - let idx+=1 - endfor - call append(line('$')-1,labels) - call append(line('$')-1,'------------------------------------------') - - " paint the color table - for group in s:colortable - - let colorline=Colortune_extend(group.' ','-',5+max_len[0]) - - let idx=1 - for column in s:modes[s:current_mode] - let value=Colortune_getattr(group,column) - let colorline.=' ['.Colortune_extend(value,' ',max_len[idx]).'] ' - let idx+=1 - endfor - - call append(line('$')-1,colorline) - - endfor - - " delete last (empty) line and restore initial position. - normal ddgg - exec 'normal G'.top_line.'G'.cur_line.'G' - call setpos('.', save_cursor) - -endfunction -" }}} - -" Colortune_dumpconfig() -" {{{ -" -function! Colortune_dumpconfig() - - new - set ft=vim - set nowrap - - " add header stuff for our colortheme - call append(line('$')-1,[ - \ 'set background=dark', - \ 'hi clear', - \ 'if exists("syntax_on")', 'syntax reset', 'endif', - \ 'let g:colors_name = "mycolorscheme"']) - - - for group in s:colortable - let config='' - - for column in s:modes[s:current_mode] - let value=Colortune_getattr(group,column) - let config.=' '.column.'='.value - endfor - call append(line('$')-1,'hi '.group.config) - endfor - - normal gg - -endfunction -" }}} - -" Colortune_manipulate_rgb() -" {{{ -" TODO: restore register! -" TODO: check overflow/underflow -" TODO: check format -" -function! Colortune_manipulate_rgb(r,g,b) - - normal T["adt] - let val=getreg('a') - let r='0x'.substitute(val,'^#\(\x\x\)\x\x\x\x','\1','') - let g='0x'.substitute(val,'^#\x\x\(\x\x\)\x\x','\1','') - let b='0x'.substitute(val,'^#\x\x\x\x\(\x\x\)','\1','') - call setreg('a',printf("#%02x%02x%02x",r+a:r,g+a:g,b+a:b)) - normal "aP - call Colortune_setbyline() - -endfunction - - -" }}} - -" Colortune_showguirgb() -"{{{ -function! Colortune_showguirgb() - - vnew - set nowrap - nnoremap :call Colortune_fillincolor() - - r $VIMRUNTIME/rgb.txt - let linenr=1 - let result=[] - while linenr :call Colortune_fillincolor() - - let colornr=0 - let result=[] - while colornr<256 - - exec 'hi color_'.colornr.' ctermbg='.colornr - exec 'syntax match color_'.colornr.' "color_'.colornr.'"' - let result+=[colornr.' ~ color_'.colornr] - let colornr+=1 - - endwhile - - call append(0,result) - - -endfunction -"}}} - -" Colortune_fillincolor() -" {{{ -function! Colortune_fillincolor() - normal 0"ayaw - let potbufnr=bufwinnr(s:colortune_buf_name) - execute potbufnr.'wincmd w' - normal di]"aP - call Colortune_setbyline() -endfunction -" }}} - -" }}} - diff --git a/vim/vim-potion/autoload/potion/running.vim b/vim/vim-potion/autoload/potion/running.vim deleted file mode 100644 index 562f713..0000000 --- a/vim/vim-potion/autoload/potion/running.vim +++ /dev/null @@ -1,33 +0,0 @@ -function! potion#running#PotionCompileAndRunFile() - write - silent !clear - execute "!" . g:potion_command . " " . bufname("%") -endfunction - -function! potion#running#PotionShowBytecode() - - write - - " Get the bytecode. - let bytecode = system(g:potion_command . " -c -V " . bufname("%") . " 2>&1") - - " Check returned string for errors. - if bytecode=~#"Syntax error" - let bytecode = "SYNTAX ERROR!! Check your potion." - endif - - " Open a new split and set it up or use existing one! - let potbufnr=bufwinnr('__Potion_Bytecode__') - if potbufnr==#-1 - vsplit __Potion_Bytecode__ - else - execute potbufnr.'wincmd w' - endif - normal! ggdG - setlocal filetype=potionbytecode - setlocal buftype=nofile - - " Insert the bytecode. - call append(0, split(bytecode, '\v\n')) - -endfunction diff --git a/vim/vim-potion/doc/potion.txt b/vim/vim-potion/doc/potion.txt deleted file mode 100644 index 4cd9191..0000000 --- a/vim/vim-potion/doc/potion.txt +++ /dev/null @@ -1,99 +0,0 @@ -*potion.txt* basic functionality for the potion programming language -======================================================================== -INTRO *PotionIntro* - - ___ _ _ ~ - / _ \___ | |_(_) ___ _ __ ~ - / /_)/ _ \| __| |/ _ \| '_ \ ~ - / ___/ (_) | |_| | (_) | | | | ~ - \/ \___/ \__|_|\___/|_| |_| ~ - - - Functionality for the Potion programming language. - Includes syntax highlighting, code folding, and more! - - Coded by Michal Idziorek - along the "Learn Vimscript the Hard Way" tutorial: - http://learnvimscriptthehardway.stevelosh.com - - -======================================================================== -CONTENTS *PotionContents* - - 1. Usage .............. |PotionUsage| - 2. Installation ....... |PotionInstall| - 3. Files .............. |PotionFiles| - 4. Credits ............ |PotionCredits| - - -======================================================================== -USAGE *PotionUsage* - -This plugin will automatically provide syntax highlighting and folding -for potion files (files ending in .pn). - -It remaps the section movement commands, to provide easy navigation -through potion files: -> - [[ ]] [] ][ -< - -The plugin offers mappings for invoking the potion compiler as well: - -Press r for running the currently opened potion file. -Press b for showing its compiled bytecode in a new window. - -Set your maplocalleader in your .vimrc like this: -> - let maplocalleader="\" -< - -You can set the path to the potion binary in your .vimrc too: -> - let g:potion_command = "/home/miguel/int/dev/potion/bin/potion" -< - -Otherwise the following default value will be used: -> - let g:potion_command = "potion" -< - -======================================================================== -INSTALLATION *PotionInstall* - -Use Tim Pope's marvellous 'pathogen.vim' to simply put the potion plugin -into its own private directory. You can get Pathogen on GitHub: -> - https://github.com/tpope/vim-pathogen -< - -Use git to clone the plugin directly into its target directory to keep -it up to date easily. -> - ~/.vim/bundle/potion/ -< - -======================================================================== -FILES *PotionFiles* - -The potion plugin ships with the following files: - -doc/potion.txt ................ Documentation (this file) -ftdetect/potion.vim ........... Detection of potion files by .pn ending -syntax/potion.vim ............. Syntax highlighting for .pn files -syntax/potionbytecode.vim ..... Syntax highlighting for bytecode -ftplugin/potion/folding.vim ... Folding functionality -ftplugin/potion/sections.vim .. Section movement via [[,]],[],][ -ftplugin/potion/running.vim ... Mappings for running the potion compiler -autoload/potion/running.vim ... Functions for running the compiler - - -======================================================================== -CREDITS *PotionCredits* - -This is my very first Vim plugin and it emerged during the course -of reading Steve Losh' wonderful Vimscript tutorial: -> - "Learn Vimscript the Hard Way". - http://learnvimscriptthehardway.stevelosh.com -< diff --git a/vim/vim-potion/ftdetect/potion.vim b/vim/vim-potion/ftdetect/potion.vim deleted file mode 100644 index a3a3170..0000000 --- a/vim/vim-potion/ftdetect/potion.vim +++ /dev/null @@ -1 +0,0 @@ -au BufNewFile,BufRead *.pn setfiletype potion diff --git a/vim/vim-potion/ftplugin/potion/folding.vim b/vim/vim-potion/ftplugin/potion/folding.vim deleted file mode 100644 index d4cb32b..0000000 --- a/vim/vim-potion/ftplugin/potion/folding.vim +++ /dev/null @@ -1,38 +0,0 @@ -setlocal foldmethod=expr -setlocal foldexpr=GetPotionFold(v:lnum) - -function! s:NextNonBlankLine(lnum) - let numlines = line('$') - let current = a:lnum + 1 - - while current <= numlines - if getline(current) =~? '\v\S' - return current - endif - - let current += 1 - endwhile - - return -2 -endfunction - -function! s:IndentLevel(lnum) - return indent(a:lnum) / &shiftwidth -endfunction - -function! GetPotionFold(lnum) - if getline(a:lnum) =~? '\v^\s*$' - return '-1' - endif - - let this_indent = IndentLevel(a:lnum) - let next_indent = IndentLevel(NextNonBlankLine(a:lnum)) - - if next_indent == this_indent - return this_indent - elseif next_indent < this_indent - return this_indent - elseif next_indent > this_indent - return '>' . next_indent - endif -endfunction diff --git a/vim/vim-potion/ftplugin/potion/running.vim b/vim/vim-potion/ftplugin/potion/running.vim deleted file mode 100644 index d70adc0..0000000 --- a/vim/vim-potion/ftplugin/potion/running.vim +++ /dev/null @@ -1,6 +0,0 @@ -if !exists("g:potion_command") - let g:potion_command = "potion" -endif - -nnoremap r :call potion#running#PotionCompileAndRunFile() -nnoremap b :call potion#running#PotionShowBytecode() diff --git a/vim/vim-potion/ftplugin/potion/sections.vim b/vim/vim-potion/ftplugin/potion/sections.vim deleted file mode 100644 index 200415c..0000000 --- a/vim/vim-potion/ftplugin/potion/sections.vim +++ /dev/null @@ -1,47 +0,0 @@ -function! s:NextSection(type, backwards, visual) - - if a:visual - normal! gv - endif - - if a:type == 1 - let pattern = '\v(\n\n^\S|%^)' - let flags = 'e' - elseif a:type == 2 - let pattern = '\v^\S.*\=.*:$' - let flags = '' - endif - - if a:backwards - let dir = '?' - else - let dir = '/' - endif - - execute 'silent normal! ' . dir . pattern . dir . flags . "\r" - -endfunction - -noremap