Merge branch 'vim-formatting' into syntax-flip

This commit is contained in:
2018-06-21 01:38:56 -04:00
9 changed files with 79 additions and 26 deletions

4
tcshrc
View File

@ -83,10 +83,6 @@ else
setenv LS_COLORS 'no=00:fi=00:di=01;34:ln=01;35:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;41;37:ex=00;31:*.tar=01;31:*.tgz=01;31:*.tbz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jpg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.png=01;35:*.mpg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.cpp=32:*.cc=32:*.c=32:*.l=32:*.m=32:*.i=33:*.cxx=32:*.h=33:*.hpp=33:*.a=31:*.asm=31:*.bin=35:*.sec=36:*.ko=31'
endif
#The LSCOLORS for *BSD is always working, so there's no need to versionify
#this. The environment variable's presence is trivial.
#For FreeBSD's ls(1), and derived utilities {Like MacOS X/Darwin's ls(1)}
setenv LSCOLORS 'ExFxcxdxbxegedabagacEB'
setenv CLICOLOR_FORCE
if( $?CSHENV_DEBUG ) then

View File

@ -55,6 +55,8 @@ switch( $CSHENV_SYSTEM_LS )
#FALLTHROUGH
case FreeBSD:
#For FreeBSD's ls(1), and derived utilities {Like MacOS X/Darwin's ls(1)}
setenv LSCOLORS 'ExFxcxdxbxegedabagacEB'
alias l ls -FG
breaksw

View File

@ -5,7 +5,7 @@ endif
# Set the acknowledgement bit, essentially
setenv CSHENV_SYSTEM_CONFIGURED FreeBSD
setenv LESS -er
setenv LESS -erF
setenv PAGER less
if( $?CSHENV_DEBUG ) then

View File

@ -1,7 +1,7 @@
" ADAM C++ vim syntax after extensions
syn match cxxObjects "\<[A-Z][A-Za-z0-9_]*[a-z][A-Za-z0-9_]*\>"
syn match cxxMetaFunction "\<[a-z][a-z0-9]*_[a-z0-9_]*[a-z0-9]\>"
"syn match cxxMetaFunction "\<[a-z][a-z0-9]*_[a-z0-9_]*[a-z0-9]\>"
syn keyword cppType noexcept decltype
@ -12,8 +12,7 @@ syn keyword cppStatement static_assert
syn keyword cxxConstants nullptr
syn match cxxConstants "\<C::[A-Za-z_][A-Z_a-z0-9]*\>"
syn match cxxConstants "\<k[A-Z][A-Za-z_][A-Z_a-z0-9]*\>"
syn match cxxConstants "\<\(C::[A-Za-z_]\|k[A-Z]\)[A-Z_a-z0-9]*\>"
syn keyword cxxExceptionNames Exception Exceptions
syn match cxxExceptionNames "\<[A-Z][A-Za-z0-9_]*Exception\>"
@ -37,13 +36,17 @@ syn match cxxStlConstant "\(std::\)\@<=\(endl\|flush\)\>"
syn match cxxStlKeywords "\(\<std::\)\@<=string\>"
syn match cxxStlKeywords "\(\<std::\)\@<=mutex\>"
syn match cxxStlKeywords "\(std::\)\@<=\(unique\|shared\|weak\)_ptr\(<\)\@="
" syn match cxxStlTypes "\(std::\)\@<=\(vector\|array\|deque\|list\|pair\|\(priority_\)\?queue\|stack\|\(unordered_\)\?\(multi\)\?\(set\|map\)\)\(<\|;\| \)\@="
syn match cxxStlKeywords "\(std::\)\@<=\(unique_ptr\)\(<\|;\| \|\>\)\@="
syn match cxxStlKeywords "\(std::\)\@<=\(shared_ptr\)\(<\|;\| \|\>\)\@="
syn match cxxStlKeywords "\(std::\)\@<=\(weak_ptr\)\(<\|;\| \|\>\)\@="
syn match cxxStlKeywords "\(std::\)\@<=nullptr_t\>"
syn match cxxStlKeywords "\(std::\)\@<=function\>"
syn match cxxStlFunctions "\(std::\)\@<=make_\(unique\|shared\)\(<\)\@="
syn match cxxStlFunctions "\(std::\)\@<=make_\(pair\|tuple\)\((\|<\)\@="
syn match cxxStlFunctions "\(std::\)\@<=addressof\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=tie\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=copy\(_\(n\|backward\|if\)\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=find\(_\(if\|first_of\|end\)\?\)\((\)\@="
@ -115,6 +118,7 @@ if version >= 508 || !exists("did_cxx_syntax_inits")
HiLink cxxStlFunctions cppStatement
HiLink cxxStlPrefix Caller
HiLink cxxStlTraits MetaFunction
HiLink cxxMetaFunction MetaFunction
HiLink cxxStlDangerousFunction Dangerous

View File

@ -1 +1,40 @@
syn keyword doxygenParam contained tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite
syn region doxygenBody contained start=+\(/\*[*!]\)\@<!<\|[^<]\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueCommentWhite,doxygenTODO,doxygenSpecial,doxygenOtherTags,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell,doxygenFixedWidth
syn region doxygenBriefLine contained start=+\<\k+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contains=doxygenFixedWidth skipwhite keepend matchgroup=xxx
" Permit Ticked parameters
syn match doxygenParamName contained +`[A-Za-z0-9_:]\+`+ nextgroup=doxygenSpecialMultilineDesc,doxygenSpecialSingleLineDesc
" Too Recursive
" syn al @cxxInDoxygen syntax/cpp.vim
" Make all C++ code in a doxygen block look kinda like natural C++
"syn match doxygenSpecialMultilineDesc "`"
syn match doxygenCommentPreprocHighlight " \+\* " contained
syn region doxygenFixedWidth matchgroup=Comment start=+`+ skip=+ * + end=+`+ contained contains=cxxObjects,cxxMetaFunction,cxxConstants,cppStatement,cxxExceptionNames,cxxErrorNames,cxxCast,cxxStlPrefix,cxxStlTypes,cxxStlService,cxxStlKeywords,cxxStlFunctions,cxxStlTraits,cxxStlExceptionNames,cxxStlDangerousFunction,cppAccess,cppModifier,cppType,cppExceptions,cppOperator,cppCast,cppStorageClass,cppStructure,cppBoolean,cppConstant,cppModifier,cppRawString,cppNumber,cppRawStringDelimiter,cStatement,cLabel,cRepeat,cTodo,cBadContinuation,cSpecial,cFormat,cString,cCppString,cCppSkip,cStringGroup,cCharacter,cSpecialCharacter,cBlock,cParenGroup,cParen,cCppParen,cBadBlock,cNumber,cNumbers,cNumbersCom,cOctal,cOctalZero,cFloat,cOctalError,cCommentSkip,cCommentL,cCommentString,cComment2String,cComment,cOperator,cStatement,cStructure,cStorageClass,cConstant,cBitField,cUserCont,cPreProcGroup,doxygenCommentPreprocHighlight,cDefine,cNamedConstant
"syn region doxygenFixedWidth start=+`+ skip=+ * + end=+`+ contained contains=@cxx,@cpp
syn region doxygenFixedWidth start=+\~\~\~+ skip=+ * + end=+\~\~\~+ contained contains=cxxObjects,cxxMetaFunction,cxxConstants,cppStatement,cxxExceptionNames,cxxErrorNames,cxxCast,cxxStlPrefix,cxxStlTypes,cxxStlService,cxxStlKeywords,cxxStlFunctions,cxxStlTraits,cxxStlExceptionNames,cxxStlDangerousFunction,cppAccess,cppModifier,cppType,cppExceptions,cppOperator,cppCast,cppStorageClass,cppStructure,cppBoolean,cppConstant,cppModifier,cppRawString,cppNumber,cppRawStringDelimiter,cStatement,cLabel,cRepeat,cTodo,cBadContinuation,cSpecial,cFormat,cString,cCppString,cCppSkip,cStringGroup,cCharacter,cSpecialCharacter,cBlock,cParenGroup,cParen,cCppParen,cBadBlock,cNumber,cNumbers,cNumbersCom,cOctal,cOctalZero,cFloat,cOctalError,cCommentSkip,cCommentL,cCommentString,cComment2String,cComment,cOperator,cStatement,cStructure,cStorageClass,cConstant,cBitField,cUserCont,cPreProc,cPreProcGroup,doxygenCommentPreprocHighlight,cDefine,cNamedConstant
"syn region doxygenFixedWidth start=+\~\~\~+ skip=+ * + end=+\~\~\~+ contained contains=@cxx,@cpp
"syn match doxygenFixedWidth +`.\+`+ contained
syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,doxygenFixedWidth,@doxygenHtmlGroup,@Spell skipwhite keepend
syn region doxygenSpecialSingleLineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenOtherTags,doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenFixedWidth,doxygenHashLink,@doxygenHtmlGroup,doxygenTODO,@Spell skipwhite keepend
"syn keyword doxygenOther contained : nextgroup=doxygenSpecialMultilineDesc skipwhite
"syn match doxygenMagic
" +\(\<[npcbea]\>\|\<em\>\|\<ref\|\<link\>\>\|\<f\$\|[$\\&<>#]\)\@!+ nextgroup=doxygenParam,doxygenRetval,doxygenBriefWord,doxygenBold,doxygenBOther,doxygenOther,doxygenOtherTODO,doxygenOtherWARN,doxygenOtherBUG,doxygenPage,doxygenGroupDefine,doxygenCodeRegion,doxygenVerbatimRegion,doxygenDotRegion
hi link doxygenFixedWidth None
hi link doxygenOtherTags doxygenOther
hi link doxygenSpecialSingleLineDesc doxygenSpecialMultilineDesc
hi link doxygenCommentPreprocHighlight PreProc

View File

@ -78,6 +78,10 @@ hi cIf0 ctermfg=gray
" End of ron above.
"set t_Co=8
"hi StatusUnwrap ctermfg=236 ctermbg=none cterm=none
"hi StatusUnwrap ctermfg=brown ctermbg=none cterm=none
"hi StatusUnwrap ctermfg=236 ctermbg=none cterm=none
hi StatusUnwrap ctermfg=58 ctermbg=none cterm=none
hi Comment ctermfg=darkgrey cterm=bold
hi Identifier ctermfg=cyan
hi Object ctermfg=red

View File

@ -1,11 +1,10 @@
"au BufNewFile,BufRead *.i,*.l setf c
au BufNewFile,BufRead mk* setf make
au BufNewFile,BufRead mk* set filetype=make
"au BufNewFile,BufRead *.slogo setf c
au BufNewFile,BufRead *.tex map _ {!}fmt -p -s -w 70
au BufNewFile,BufRead *.tex set textwidth=78
au BufNewFile,BufRead *.java set tabstop=4
au BufNewFile,BufRead *.java set shiftwidth=4
"au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h setf cpp
" Alephaish
au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set sw=4
@ -15,7 +14,7 @@ au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set sta
au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set noet
au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set tw=150
au BufNewFile,BufRead */cshenv/tcshrc.* setf tcsh
au BufNewFile,BufRead */cshenv/tcshrc.* set filetype=tcsh
" falcish
"au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set ts=3
@ -33,6 +32,6 @@ au BufNewFile,BufRead */cshenv/tcshrc.* setf tcsh
au FileType * setlocal formatoptions=tcq
if has("syntax")
syntax on
endif
"if has("syntax")
" syntax on
"endif

View File

@ -15,3 +15,8 @@ function! MyFoldText()
return v:folddashes . sub
endif
endfunction
function! SyntaxItem()
return synIDattr(synID(line("."),col("."),1),"name")
endfunction

View File

@ -1,5 +1,5 @@
function! GetYearGlyph()
" TODO Write a full parser which adjusts for some "second centry"
" TODO Write a full parser which adjusts for some "second century"
" point generates:
" 00 - 09 as \`0 - \`9
" 10 - 19 as \'0 - \'9
@ -36,16 +36,20 @@ endfunction
" when I start.
set statusline= " reset the status line, for ADAM's colorful status line
set statusline+=%1*[%02.03n]%0* " max/min for buf #, in []
set statusline+=Pos:\ %4*%3l/%3L%0* " Pos: '.'/'$',
set statusline+=\ %2*%c%2V%0* " Column # and tab detect
set statusline+=\ %5*@%0* " Colored @ for percent
set statusline+=\ %6*%P%0* " Percent thru file
set statusline+=\ File:\ %3*%<%-f%0* " File: Path left trim and align
set statusline+=%4*%(\ (%M%R%H)%)%0* " File editing mode (+/-,RO,HLP)
set statusline+=%= " Divider between left & right align
set statusline+=\ %9*X=%02B " Current char byte val in hex
set statusline= " reset the status line, for ADAM's colorful status line
set statusline+=%1*[%02.05n]%0* " max/min for buf #, in []
set statusline+=Pos:\ %4*%3l/%3L%0* " Pos: '.'/'$',
set statusline+=\ %2*%c%2V%0* " Column # and tab detect
set statusline+=\ %5*@%0* " Colored @ for percent
set statusline+=\ %6*%P%0* " Percent thru file
set statusline+=\ File:\ %3*%<%-f%0* " File: Path left trim and align
set statusline+=%4*%(\ (%M%R%H)%)%0* " File editing mode (+/-,RO,HLP)
set statusline+=%= " Divider between left & right align
set statusline+=\ Syn:\ %2*%{SyntaxItem()}%0* " Setup syntax highlighting group display
set statusline+=\ %9*X=%02B " Current char byte val in hex
"Lastly put the time in classic Magenta, like my TCSH prompt:
set statusline+=\ %8*%{GetYearGlyph()}-%{strftime('%m-%d\ %H:%M')}