...
 
Commits (4)
  • Yohanan Santana's avatar
    Fixed b:current_syntax code · 879bc389
    Yohanan Santana authored
    There was a b:current_syntax code missing on the bottom of the syntax
    code, so I added it.
    879bc389
  • Yohanan Santana's avatar
    Proper indentation and spacing · 29e346b6
    Yohanan Santana authored
    I've changed the indentation of the code to 4 spaces. Previously there
    were no indentation at all.
    
    Some newlines were removed as well.
    29e346b6
  • Yohanan Santana's avatar
    Made the themes now responsible for the coloring. · 8e191f71
    Yohanan Santana authored
    A syntax plugin changing the colors is not a good idea, since there are
    many themes out there and none of them would work.
    
    Because of that, I've removed the massive chunk of color-related code
    and instead linked the plugin keywords to theme keywords.
    
    I'm not sure if the keywords I used are the correct ones, though, so
    that's a thing that might need to be adjusted.
    8e191f71
  • Michael Aaron Murphy's avatar
    Merge branch 'master' into 'master' · e9220920
    Michael Aaron Murphy authored
    Removed explicit coloring part and made some general changes
    
    See merge request !3
    e9220920
" Check editor version
if version < 600
syntax clear
syntax clear
elseif exists("b:current_syntax")
finish
finish
endif
syn region doubleQuote start='"' end='"' contains=arrayVar,variable,process,singleQuote
......@@ -14,11 +14,11 @@ syn match variable "$[a-zA-Z0-9_]\+"
syn region process start="$(" end=")" transparent
syn region process start="@(" end=")" transparent
syn match ionNumber '[+-]\?\([0-9]*[.]\)\?[0-9]\+'
syn match comment '[#].*$'
syn match operator '&'
syn match operator '&&'
syn match operator '||'
syn match operator '[|<>&]'
syn match Comment '[#].*$'
syn match Operator '&'
syn match Operator '&&'
syn match Operator '||'
syn match Operator '[|<>&]'
syn match flag '[ ]\([-]\)\w\+'
syntax keyword ionKeyword .
......@@ -72,56 +72,10 @@ syntax keyword ionKeyword unalias
syntax keyword ionKeyword wait
syntax keyword ionKeyword while
" Get current BackgroundTheme of terminal (xterm)
let g:background = system('./gettheme.sh')
let g:theme = strpart(g:background, 7, 10)
if g:theme ==# 'LightTheme'
hi Operator cterm=bold ctermfg=black
hi Array cterm=bold ctermfg=darkblue
hi String cterm=bold ctermfg=darkgreen
hi DoubleQuote ctermfg=darkgreen
hi SingleQuote ctermfg=darkgreen
hi Numbers ctermfg=darkyellow
hi! Comment ctermfg=darkgrey cterm=italic
hi Keywords ctermfg=magenta cterm=bold
hi Flag cterm=bold ctermfg=darkyellow
hi def link ionKeyword Keywords
hi def link arrayVar Array
hi def link variable String
hi def link ionNumber Numbers
hi def link doubleQuote DoubleQuote
hi def link singleQuote SingleQuote
hi def link process PreProc
hi def link comment Comment
hi def link operator Operator
hi def link flag Flag
else
" DarkTheme
hi Operator cterm=bold ctermfg=white
hi Array cterm=bold ctermfg=lightblue
hi String cterm=bold ctermfg=lightmagenta
hi DoubleQuote ctermfg=green
hi SingleQuote ctermfg=lightgreen
hi Numbers ctermfg=cyan
hi! Comment ctermfg=grey cterm=italic
hi Keywords ctermfg=magenta cterm=bold
hi Flag cterm=bold ctermfg=darkyellow
hi def link ionKeyword Keywords
hi def link arrayVar Array
hi def link ionKeyword Keyword
hi def link variable String
hi def link ionNumber Numbers
hi def link doubleQuote DoubleQuote
hi def link singleQuote SingleQuote
hi def link process PreProc
hi def link comment Comment
hi def link operator Operator
hi def link flag Flag
endif
hi def link doubleQuote String
hi def link singleQuote Character
hi def link ionNumber Number
hi def link arrayVar Type
hi def link flag Structure