Merge branch 'syntax-flip'
This commit is contained in:
4
tcshrc
4
tcshrc
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
32
vim/after/syntax/cplusplus.vim
Normal file
32
vim/after/syntax/cplusplus.vim
Normal file
@ -0,0 +1,32 @@
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
syn include @cxxInDoxygen syntax/cpp.vim
|
||||
|
||||
unlet b:current_syntax
|
||||
|
||||
" This enables Basic C++ support, with my extensions.
|
||||
"let c_no_bracket_error=1
|
||||
"let c_no_curly_error=1
|
||||
"if version < 600
|
||||
" so <sfile>:p:h/cpp.vim
|
||||
"else
|
||||
" runtime! syntax/cpp.vim
|
||||
"endif
|
||||
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
" This enables doxygen simultaneous with C++.
|
||||
if version < 600
|
||||
so <sfile>:p:h/doxygen.vim
|
||||
else
|
||||
runtime! syntax/doxygen.vim
|
||||
endif
|
||||
|
||||
|
||||
let b:current_syntax = "cplusplus"
|
||||
syn sync clear
|
||||
syn sync fromstart
|
@ -1,14 +1,7 @@
|
||||
" ADAM C++ vim syntax after extensions
|
||||
|
||||
" This enables doxygen simultaneous with C++.
|
||||
if version < 600
|
||||
so <sfile>:p:h/doxygen.vim
|
||||
else
|
||||
runtime! syntax/doxygen.vim
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
@ -19,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\>"
|
||||
@ -44,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\)\?\)\((\)\@="
|
||||
@ -122,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
|
||||
|
||||
|
@ -1 +1,35 @@
|
||||
syn keyword doxygenParam contained tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite
|
||||
|
||||
|
||||
|
||||
" Permit Ticked parameters
|
||||
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
syn match blueCommentStar "^[ ]*\*[ ]*" contained containedin=doxygenBriefLine,doxygenFixedWidth,@doxyNestedCxx
|
||||
|
||||
" Make all C++ code in a doxygen block look kinda like natural C++
|
||||
"syn match doxygenSpecialMultilineDesc "`"
|
||||
|
||||
syn cluster doxyNestedCXX contains=@cxxInDoxygen,blueCommentStar
|
||||
syn cluster doxyNeedsFixedWidth contains=doxygenBody,doxygenSpecialMultilineDesc,doxygenBriefLine,doxygenBrief
|
||||
|
||||
syn region doxygenFixedWidth containedin=@doxyNeedsFixedWidth matchgroup=Comment start=+@code+ skip=+^\n+ keepend end=+@endcode+ contains=@doxyNestedCXX
|
||||
|
||||
syn region doxygenFixedWidth containedin=@doxyNeedsFixedWidth matchgroup=Comment start=+\~\~\~+ skip=+^\n+ end=+\~\~\~+ contains=@doxyNestedCXX
|
||||
|
||||
syn region doxygenFixedWidth containedin=@doxyNeedsFixedWidth matchgroup=Comment start=+`+ end=+`+ keepend contains=@doxyNestedCXX
|
||||
|
||||
"syn match doxygenFixedWidth +`.\+`+ contained
|
||||
|
||||
|
||||
"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 blueCommentStar doxygenSpecialContinueComment
|
||||
|
@ -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
|
||||
|
35
vim/filetype.vim
Normal file
35
vim/filetype.vim
Normal file
@ -0,0 +1,35 @@
|
||||
" Cynlib
|
||||
" .cc and .cpp files can be C++ or Cynlib.
|
||||
au BufNewFile,BufRead *.cc
|
||||
\ if exists("cynlib_syntax_for_cc")|setf cynlib|else|set filetype=cpp.cplusplus|endif
|
||||
au BufNewFile,BufRead *.cpp
|
||||
\ if exists("cynlib_syntax_for_cpp")|setf cynlib|else|set filetype=cpp.cplusplus|endif
|
||||
|
||||
" C++
|
||||
au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl set filetype=cpp.cplusplus
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.C,*.H set filetype=cpp.cplusplus
|
||||
endif
|
||||
|
||||
function! CheckForADAM()
|
||||
if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1
|
||||
if exists("g:c_syntax_for_h")
|
||||
setf objc
|
||||
else
|
||||
setf objcpp
|
||||
endif
|
||||
elseif exists("g:c_syntax_for_h")
|
||||
setf c
|
||||
elseif exists("g:ch_syntax_for_h")
|
||||
setf ch
|
||||
else
|
||||
setf cpp.cplusplus
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" .h files can be C, Ch C++, ObjC or ObjC++.
|
||||
" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is
|
||||
" detected automatically.
|
||||
au BufNewFile,BufRead *.h setf cpp.cplusplus "call CheckForADAM()
|
||||
au BufNewFile,BufRead *.cxx,*.cpp,*.hpp,*.cc,*.h setf cpp.cplusplus
|
||||
|
@ -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
|
||||
|
@ -15,3 +15,8 @@ function! MyFoldText()
|
||||
return v:folddashes . sub
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! SyntaxItem()
|
||||
return synIDattr(synID(line("."),col("."),1),"name")
|
||||
endfunction
|
||||
|
||||
|
@ -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')}
|
||||
|
Reference in New Issue
Block a user