Merge branch 'master' of github.com:adamlsd/cshenv

This commit is contained in:
ADAM David Alan Martin
2021-03-03 18:30:51 -05:00
11 changed files with 327 additions and 218 deletions

View File

@ -36,7 +36,7 @@ sp_balance_nested_parens=true
align_keep_tabs=false align_keep_tabs=false
align_with_tabs=false align_with_tabs=false
align_on_tabstop=false align_on_tabstop=false
align_number_left=false #align_number_left=false
align_func_params=false align_func_params=false
align_same_func_call_params=false align_same_func_call_params=false
align_var_def_colon=false align_var_def_colon=false

View File

@ -7,6 +7,7 @@ set csi='['
set ansi_bright='1' set ansi_bright='1'
set ansi_dim='0' set ansi_dim='0'
set ansi_color='m' set ansi_color='m'
set ansi_reverse='7'
set ansi_black='30' set ansi_black='30'
set ansi_red='31' set ansi_red='31'
@ -20,6 +21,7 @@ set ansi_white='37'
set bright="$csi$ansi_bright$ansi_color" set bright="$csi$ansi_bright$ansi_color"
set dim="$csi$ansi_dim$ansi_color" set dim="$csi$ansi_dim$ansi_color"
set reverse="$csi$ansi_reverse$ansi_color"
set black="$csi$ansi_black$ansi_color" set black="$csi$ansi_black$ansi_color"

View File

@ -6,7 +6,7 @@
set date_color="${dim_magenta}" set date_color="${dim_magenta}"
set time_color="${bright_magenta}" set time_color="${bright_magenta}"
set text_color="${bright_white}" set text_color="${bright_white}"
set oldp_color="${dim_white}" set oldp_color="${dim}"
set brace_color="${bright_yellow}" set brace_color="${bright_yellow}"
set host_color="${bright_blue}" set host_color="${bright_blue}"
set name_color="${bright_cyan}" set name_color="${bright_cyan}"
@ -15,7 +15,7 @@ set path_color="${bright_green}"
set line_color="${dim_red}" set line_color="${dim_red}"
set prompt_color="${dim_white}" set prompt_color="${dim_white}"
set depth_color="${dim_yellow}" set depth_color="${dim_yellow}"
set command_color="${dim_white}" set command_color="${dim}"
set color_start="%{" set color_start="%{"
set color_end="%}" set color_end="%}"

View File

@ -6,11 +6,6 @@ if( $?CSHENV_DEBUG ) then
echo "Sourcing prompt setup and definitions..." echo "Sourcing prompt setup and definitions..."
endif endif
if( $?CSHENV_DEBUG ) then
echo "Trying to fix tty bug"
endif
if( ! $?unknown_tty ) then if( ! $?unknown_tty ) then
set unknown_tty="?" set unknown_tty="?"
if( $?CSHENV_DEBUG ) then if( $?CSHENV_DEBUG ) then
@ -18,97 +13,96 @@ if( ! $?unknown_tty ) then
endif endif
endif endif
setenv CSHENV_CACHE_DIR ~/.tcsh_cache
# R G Y B C M
set reference_colors=( ${csi}91m ${csi}92m ${csi}93m ${csi}38\;5\;33m ${csi}95m ${csi}96m )
# R G Y B M
set reference_colors=( ${csi}91m ${csi}92m ${csi}93m ${csi}38\;5\;33m ${csi}96m )
# Select a set of Unicode codepoints for prompt referencing...
set referencechars_raw=""
# Nuke Symbol
set referencechars_raw="${referencechars_raw} 2622"
# Keyboard Symbol (Didn't look good -- spilled (not pushed) over 1.5 cells)
set keyboard_sym="2328"
set referencechars_raw="${referencechars_raw} ${keyboard_sym}"
# Telephone (Spills over 1 cell.)
set referencechars_raw="${referencechars_raw} 260e"
# Clover
set referencechars_raw="${referencechars_raw} 2618"
# Music notes
#set referencechars_raw="${referencechars_raw} 2669 266a 266b 266c"
# One Single music note,
#set referencechars_raw="${referencechars_raw} 266a"
# One double music note
#set referencechars_raw="${referencechars_raw} 266b"
set referencechars_raw="${referencechars_raw} 266c"
# Dice
#set referencechars_raw="${referencechars_raw} 2680 2681 2682 2683 2684 2685"
# Card suits
set referencechars_raw="${referencechars_raw} 2660 2663 2665 2666"
# Inner planet symbols (Mercury, Venus, Earth, Mars)
set referencechars_raw="${referencechars_raw} 263f 2640 2641 2642"
# Outer Planet symbols (Jupiter, Saturn, Uranus, Neptune, Pluto)
#set referencechars_raw="${referencechars_raw} 2643 2644 2645 2646 2647"
# Hollow Chess pieces
#set referencechars_raw="${referencechars_raw} 2654 2655 2656 2657 2658 2659"
# Filled Chess pieces
#set referencechars_raw="${referencechars_raw} 265a 265b 265c 265d 265e 265f"
# Roman Numerals
#set referencechars_raw="${referencechars_raw} 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 216a 216b"
# More symbols -- Recycling, Biohazard, Peace Sign, Atom, swords, flag, worktools, scales, fleur-de-lis, star, Face
#set referencechars_raw="${referencechars_raw} 267B 2623 262e 269b 2694 2692 2696 269a 2605 263b"
# Wider symbols -- Cedeuceus, Anchor,
#set referencechars_raw="${referencechars_raw} 2624 2693"
# Zodiac symbols
#set referencechars_raw="${referencechars_raw} 2658 2649 264a 264b 264c 264d 264e 264f 2650 2651 2652 2653"
# Misc stuff -- colour? baseball Takes up too many width slots. Throws off alignment.
#set referencechars_raw="${referencechars_raw} 26be"
#echo ${referencechars[1]}
set prompt_hcolor=0
set prompt_hsym=0
set referencechars=()
foreach ch ($referencechars_raw)
set referencechars=( $referencechars `env LC_ALL=C.UTF-8 printf "\u${ch}"` )
end
# Rotation
alias precmd 'source ${CSHENV_DIR}/tcshrc.prompt.final'
#alias postcmd echo doit
set promptchars='%#' set promptchars='%#'
set default_screen_offset_count=80
set prompt_simple="${oldp_color_seq}[%n@%m: %c]%# " set prompt_simple="${oldp_color_seq}[%n@%m: %c]%# "
# Screens are almost certainly not a million chars wide.
switch( $CSHENV_SYSTEM ) # If they are... oh well, that's a really weird one.
set date_prefix="%{${csi}A${csi}1000000G${csi}18D%}"
# All BSD derived systems (and actually most non-GNU tools) have the 6th entry for stty being columns set date_suffix="%{${csi}G${csi}1B%}"
case Darwin: #set screen_return="%{8%}"
#FALLTHROUGH set date_prompt_core="${date_color_seq}%{%Y-%W-%D %}${time_color_seq}%{%P%}"
# TODO: Figure out a collapse?
#case *BSD: #Is this legal in CSH?
#FALLTHROUGH
case FreeBSD:
#FALLTHROUGH
case NetBSD:
#FALLTHROUGH
case OpenBSD:
if( $?CSHENV_DEBUG ) then
echo "Using BSDish stty for width"
endif
set screen_offset_count=`stty -a | head -1 | awk '{print $6}' | sed -e "s/;//g"`
breaksw
# SysV variants:
# Linux (and Cygwin) are not BSD behavior, and make cols the 7th entry be stty
case Cygwin:
case Linux:
# SYSV type systems seem to be settling on this as the common mechanism.
case AIX:
case SunOS:
if( $?CSHENV_DEBUG ) then
echo "Linux prompt width for stty blows..."
endif
#Some cshes don't like the split line here!
set screen_offset_count=`stty -a | head -1 | sed -e 's/;//g' | awk '{print $7}' | sed -e 's/;//g'`
breaksw
default:
#We don't know how to handle this case. Just use a guessed
#value of 80, since we cannot tell.
set screen_offset_count=$default_screen_offset_count
echo "Using a default screen offset value"
breaksw
endsw
if( $?CSHENV_DEBUG ) then
echo "Screen offset computed to be: ${screen_offset_count}"
endif
set screen_width=$screen_offset_count
#echo $screen_offset_count
@ screen_offset_count = $screen_offset_count - 18
#echo "A"
set screen_offset=""
set n="1"
if ( ! -d $CSHENV_CACHE_DIR ) then
mkdir $CSHENV_CACHE_DIR
endif
#echo $screen_offset_count
if ( -f ${CSHENV_CACHE_DIR}/screen.$screen_width ) then
source ${CSHENV_CACHE_DIR}/screen.$screen_width
else
while ( ${n} < ${screen_offset_count} )
set screen_offset="${screen_offset} "
@ n = ($n + 1)
end
echo "set screen_offset='${screen_offset}'" > ${CSHENV_CACHE_DIR}/screen.${screen_width}
#echo "Make a manual cache entry for screen width."
endif
set date_prompt_core="${date_color_seq}%Y-%W-%D ${time_color_seq}%P"
set date_prompt_left="${date_prompt_core}" set date_prompt_left="${date_prompt_core}"
set date_prompt="${screen_offset}${date_prompt_core}" set date_prompt="${date_prefix}${date_prompt_core}${date_suffix}"
#unset edit #unset edit
if( $?CSHENV_DEBUG ) then if( $?CSHENV_DEBUG ) then
@ -116,10 +110,10 @@ if( $?CSHENV_DEBUG ) then
endif endif
set depth_prompt=" ${depth_color_seq}(${shlvl})" set depth_prompt=" ${depth_color_seq}(${shlvl})${text_color_seq}\- "
if( $?CSHENV_HIDE_SHELL_LEVEL_AT_ONE ) then if( $?CSHENV_HIDE_SHELL_LEVEL_AT_ONE ) then
if( $shlvl == 1 ) then if( $shlvl == 1 ) then
set depth_prompt="" set depth_prompt="${text_color_seq}\- "
endif endif
endif endif
@ -130,15 +124,10 @@ set host_prompt="${host_color_seq}${CSHENV_HOSTNAME}"
set path_prompt="${path_color_seq}%c02" set path_prompt="${path_color_seq}%c02"
set end_prompt="${prompt_color_seq}%#${command_color_seq} " set end_prompt="${prompt_color_seq}%#${command_color_seq} "
set prompt_cool="${date_prompt}${text_color_seq}%L${brace_color_seq}\[${line_prompt}${depth_prompt}${text_color_seq}\- ${user_prompt}${at_color_seq}@${host_prompt}${text_color_seq}\: ${path_prompt}${brace_color_seq}\]${end_prompt}"
if( ! ${?cshenv_user_prompt_override} ) then
set prompt="$prompt_cool"
endif
alias oldp 'set prompt="$prompt_simple"; set cshenv_user_prompt_override' alias oldp 'set prompt="$prompt_simple"; set cshenv_user_prompt_override'
alias newp 'set prompt="$prompt_cool"; set cshenv_user_prompt_override' alias newp 'set prompt="$prompt_cool"; set cshenv_user_prompt_override'
source ${CSHENV_DIR}/tcshrc.prompt.final
########################### ###########################
# vim:filetype=tcsh # vim:filetype=tcsh
########################### ###########################

51
tcshrc.prompt.final Normal file
View File

@ -0,0 +1,51 @@
############################
### Final Prompt Setting ###
############################
@ prompt_hcolor = $prompt_hcolor % ${#reference_colors}
@ prompt_hsym = $prompt_hsym % ${#referencechars}
if( ${prompt_hcolor} == 0 ) then
#if( $?CSHENV_DEBUG ) then
#echo colorshuffle
#endif
#echo 
set reference_colors=`shuf -e $reference_colors`
endif
if( ${prompt_hsym} == 0 ) then # && ${prompt_hcolor} == 0 ) then
if( $?CSHENV_DEBUG ) then
echo symbolshuffle
endif
#echo 
set referencechars=`shuf -e $referencechars`
#set reference_colors=`shuf -e $reference_colors`
endif
@ prompt_hcolor = ${prompt_hcolor} + 1
@ prompt_hsym = ${prompt_hsym} + 1
if( $?CSHENV_DEBUG ) then
echo ${prompt_hcolor} ${prompt_hsym}
echo "Setting prompt"
endif
set prompt_reference_core="%{${reference_colors[${prompt_hcolor}]}%}${referencechars[${prompt_hsym}]}"
#if( ${referencechars[${prompt_hsym}]} == `env LC_ALL=C.UTF-8 printf "\u2328"` ) then
# set prompt_reference="%{${dim}%}<${prompt_reference_core} %{${dim}%}> "
#else
# set prompt_reference="%{${dim}%}< ${prompt_reference_core} %{${dim}%}> "
#endif
set prompt_reference="%{${dim}%}< ${prompt_reference_core} %{${dim}%}> "
#set prompt_reference="%{${csi}0;48\;5\;7m%}(${prompt_reference_core}%{${csi}0;48\;5\;7m%})%{${dim}%}"
#set prompt_reference="${prompt_reference_core}%{${text_color_seq}%} \- "
set prompt_cool="\n${date_prompt}${brace_color_seq}\[${prompt_reference}${line_prompt}${depth_prompt}${user_prompt}${at_color_seq}@${host_prompt}${text_color_seq}\: ${path_prompt}${brace_color_seq}\]${end_prompt}"
if( ! ${?cshenv_user_prompt_override} ) then
set prompt="$prompt_cool"
endif
###########################
# vim:filetype=tcsh
###########################

View File

@ -8,7 +8,7 @@ syn keyword cppType noexcept decltype
" I dislike the exception highlighting for these control statements. " I dislike the exception highlighting for these control statements.
syn keyword cppStatement try throw catch syn keyword cppStatement try throw catch
syn keyword cppStatement static_assert "syn keyword cppStatement static_assert
syn keyword cxxConstants nullptr syn keyword cxxConstants nullptr
@ -23,68 +23,97 @@ syn match cxxErrorNames "\<[A-Z][A-Za-z0-9_]*Error\>"
syn match cxxCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*\(<\)\@=" syn match cxxCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*\(<\)\@="
syn match cxxStlPrefix "\<std\(::\)\@=" syn cluster cxxLibraryBits contains=cxxStlKeywords,cxxStlFunctions,cxxStlService,cxxStlTypes,cxxStlConstant,cxxStlExceptionNames
syn cluster cxxIgnoreCGroupingErrors contains=NONE
syn cluster cParenGroup add=@cxxIgnoreCGroupingErrors
syn cluster cxxIgnoreCGroupingErrors add=@cxxLibraryBits
"syn cluster cxxLibrary contains=cxxStlLibrary,cxxBoostLibrary
"syn region cxxStlLibrary start="\<std\(::\)\@<=" end="\( \|<\|(\)"
"syn region cxxBoostLibrary start="\<boost\(::\)\@<=" end="\( \|<\|(\)"
"syn region cxxStlLibrary start="\<std\(::\)\@<=" end="\( \|<\|(\|;\)\@="
syn region cxxStlLibrary matchgroup=cxxLibPrefix start="\<\(std\)\z(::\)\@=" matchgroup=NONE skip="\z1" end="\>" transparent
syn region cxxBoostLibrary matchgroup=cxxLibPrefix start="\<\(boost\)\z(::\)\@=" matchgroup=NONE skip="\z1" end="\>" transparent
"syn match "::" containedin=@cxxLibrary contained
"end="::\(.*\)\@>\>"
" Broken?
"syn region cxxStlLibrary start="\(\<std\)\(::\)" end="\( \|;\|(\|<\|$\)\@="
"syn region cxxBoostLibrary start="\(\<\(bp_\)\?boost\)\(::\)\@=" end="\( \|;\|(\|<\|$\)\@="
syn match cxxStlTypes "\(\<std::\)\@<=\(\(i\|o\)\(f\|string\)\?stream\)\>"
syn match cxxStlTypes "\(\<std::\)\@<=\(iostream\)\>"
syn match cxxStlTypes "\(\<std::\)\@<=basic_string\(<\)\@="
syn match cxxStlTypes "\(std::\)\@<=\(vector\|array\|deque\|list\|pair\|\(priority_\)\?queue\|stack\|\(unordered_\)\?\(multi\)\?\(set\|map\)\)\(<\|;\| \)\@="
syn match cxxStlService "\(std::\)\@<=\(cout\|clog\|cerr\)\>" syn keyword cxxStlKeywords containedin=cxxStlLibrary,cxxBoostLibrary string_view mutex thread contained
syn match cxxStlConstant "\(std::\)\@<=\(endl\|flush\)\>" syn keyword cxxStlKeywords containedin=cxxStlLibrary string contained
syn match cxxStlKeywords "\(\<std::\)\@<=string\>" syn keyword cxxStlKeywords containedin=cxxStlLibrary,cxxBoostLibrary function contained
syn match cxxStlKeywords "\(\<std::\)\@<=mutex\>"
" 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 keyword cxxStlTypes containedin=cxxStlLibrary iostream istream ostream fstream ifstream ofstream contained
syn match cxxStlFunctions "\(std::\)\@<=make_\(pair\|tuple\)\((\|<\)\@=" syn keyword cxxStlTypes containedin=cxxStlLibrary stringstream istringstream ostringstream contained
syn keyword cxxStlTypes containedin=cxxStlLibrary iostream basic_string vector deque list pair queue priority_queue stack map multimap set multiset contained
syn match cxxStlFunctions "\(std::\)\@<=addressof\((\)\@=" syn keyword cxxStlTypes containedin=cxxStlLibrary,cxxBoostLibrary array contained
syn match cxxStlFunctions "\(std::\)\@<=tie\((\)\@=" syn keyword cxxStlTypes containedin=cxxStlLibrary,cxxBoostLibrary unordered_map unordered_multimap contained
syn match cxxStlFunctions "\(std::\)\@<=copy\(_\(n\|backward\|if\)\)\?\((\)\@=" syn keyword cxxStlTypes containedin=cxxStlLibrary,cxxBoostLibrary unordered_set unordered_multiset contained
syn match cxxStlFunctions "\(std::\)\@<=find\(_\(if\|first_of\|end\)\?\)\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=count\(_if\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=\(transform\|mismatch\|equal\|accumulate\|move\)\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=search\(_n\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=fill\(_n\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=generate\(_n\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=replace\(_copy\)\?\(_if\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=\(unique\|reverse\|rotate\)\(_copy\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=\(stable_\)\?\(partition\|sort\)\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=partial_sort\(_copy\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=\(inplace_\)\?merge\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=\(inplace_\)\?merge\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=set_\(union\|intersection\|\(symmetric_\)\?difference\)\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=\(push\|pop\|make\|is\|sort\)_heap\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=\(min\|max\)\(_element\)\?\((\)\@="
syn match cxxStlFunctions "\(std::\)\@<=\(front_\|back_\)\?\(inserter\)\((\)\@="
syn match cxxStlTraits "\(std::\)\@<=\(is_convertible\)\(<\)\@="
syn match cxxStlTraits "\(std::\)\@<=\(is_\(default_\)\?constructible\)\(<\)\@="
syn match cxxStlFunctions "\<\(back_inserter\|begin\|end\)\((\)\@=" syn keyword cxxStlService containedin=cxxStlLibrary cout clog cerr contained
syn keyword cxxStlConstant containedin=cxxStlLibrary endl flush contained
syn match cxxStlExceptionNames "\(std::\)\@<=exception\>" " Smart pointers
syn match cxxStlExceptionNames "\(std::\)\@<=runtime_error\>" syn keyword cxxStlFunctions containedin=cxxStlLibrary,cxxBoostLibrary make_shared make_tuple contained
syn match cxxStlExceptionNames "\(std::\)\@<=logic_error\>" syn keyword cxxStlKeywords containedin=cxxBoostLibrary scoped_ptr contained
syn match cxxStlExceptionNames "\(std::\)\@<=bad_typeid\>" syn keyword cxxStlKeywords containedin=cxxStlLibrary,cxxBoostLibrary shared_ptr weak_ptr contained
syn match cxxStlExceptionNames "\(std::\)\@<=bad_cast\>" syn keyword cxxStlFunctions containedin=cxxStlLibrary make_unique contained
syn match cxxStlExceptionNames "\(std::\)\@<=bad_alloc\>" syn keyword cxxStlKeywords containedin=cxxStlLibrary unique_ptr nullptr_t contained
syn match cxxStlExceptionNames "\(std::\)\@<=bad_array_new_length\>"
syn match cxxStlExceptionNames "\(std::\)\@<=bad_exception\>"
syn match cxxStlExceptionNames "\(std::\)\@<=invalid_argument\>"
syn match cxxStlExceptionNames "\(std::\)\@<=domain_error\>"
syn match cxxStlExceptionNames "\(std::\)\@<=out_of_range\>"
syn match cxxStlExceptionNames "\(std::\)\@<=range_error\>"
syn match cxxStlExceptionNames "\(std::\)\@<=\(overflow\|underflow\)_error\>"
" Algorithms
syn keyword cxxStlFunctions containedin=cxxStlLibrary make_pair tie addressof contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary copy copy_n copy_if copy_backward replace_copy_if replace_copy contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary find find_if find_first_of find_end contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary count count_if search search_n contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary transform mismatch equal accumulate move contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary generate generate_n fill fill_n contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary unique reverse rotate contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary unique_copy reverse_copy rotate_copy contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary sort stable_sort partition stable_partition contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary partial_sort partial_sort_copy contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary merge inplace_merge contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary set_union set_intersection contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary set_difference set_symmetric_difference contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary make_heap is_heap sort_heap push_heap pop_heap contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary min max min_element max_element contained
syn keyword cxxStlFunctions containedin=cxxStlLibrary getline contained
" Metafunctions/Traits
syn keyword cxxStlTraits containedin=cxxStlLibrary is_convertible contained
syn keyword cxxStlTraits containedin=cxxStlLibrary is_constructible is_default_constructible contained
" Free floating STL functions
syn keyword cxxStlFreeFunctions back_inserter front_inserter inserter begin end
" Exceptions
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary exception contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary runtime_error contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary logic_error contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary bad_typeid contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary bad_cast contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary bad_alloc contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary bad_array_new_length contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary bad_exception contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary invalid_argument contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary domain_error contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary out_of_range contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary range_error contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary overflow_error contained
syn keyword cxxStlExceptionNames containedin=cxxStlLibrary underflow_error contained
" Some common boost-only bits I use
syn keyword cxxStlKeywords contained containedin=cxxBoostLibrary lexical_cast
" Highlight dangerous things
syn match cxxStlDangerousFunction "\(\.\)\@<=release()" syn match cxxStlDangerousFunction "\(\.\)\@<=release()"
@ -99,6 +128,9 @@ if version >= 508 || !exists("did_cxx_syntax_inits")
command -nargs=+ HiLink hi def link <args> command -nargs=+ HiLink hi def link <args>
endif endif
"HiLink cxxStlLibrary cxxLibPrefix
"HiLink cxxBoostLibrary cxxLibPrefix
HiLink cxxObjects Object HiLink cxxObjects Object
HiLink cxxCast cxxStatement HiLink cxxCast cxxStatement
@ -116,7 +148,10 @@ if version >= 508 || !exists("did_cxx_syntax_inits")
HiLink cxxStlTypes Object HiLink cxxStlTypes Object
HiLink cxxStlKeywords cppType HiLink cxxStlKeywords cppType
HiLink cxxStlFunctions cppStatement HiLink cxxStlFunctions cppStatement
HiLink cxxStlPrefix Caller HiLink cxxStlFreeFunctions cppStatement
HiLink cxxLibPrefix Caller
HiLink cxxStlTraits MetaFunction HiLink cxxStlTraits MetaFunction
HiLink cxxMetaFunction MetaFunction HiLink cxxMetaFunction MetaFunction

View File

@ -23,21 +23,28 @@ let g:colors_name="adam"
" Last Change: 2013 May 24 " Last Change: 2013 May 24
set background=dark set background=dark
hi Normal ctermfg=lightgrey hi Normal ctermfg=lightgrey start=<esc>[0m stop=<esc>[0m
"hi NonText ctermfg=yellow ctermbg=grey "hi NonText ctermfg=yellow ctermbg=grey
hi comment ctermfg=green "hi comment ctermfg=green
hi constant ctermfg=magenta cterm=bold hi constant ctermfg=magenta term=none start=<esc>[95m stop=<esc>[0m
"hi constant ctermfg=magenta cterm=bold
"hi identifier ctermfg=cyan cterm=NONE "hi identifier ctermfg=cyan cterm=NONE
hi statement ctermfg=yellow cterm=NONE hi statement ctermfg=yellow cterm=NONE term=none start=<esc>[93m stop=<esc>[0m
hi preproc ctermfg=blue hi preproc ctermfg=blue term=none start=<esc>[94m stop=<esc>[0m
hi type ctermfg=green cterm=bold hi type ctermfg=green term=none start=<esc>[92m stop=<esc>[0m
"hi type ctermfg=green cterm=bold
"hi special ctermfg=yellow "hi special ctermfg=yellow
hi ErrorMsg ctermfg=White ctermbg=Red hi Special ctermfg=Blue guifg=Blue term=none start=<esc>[94m stop=<esc>[0m
hi ErrorMsg ctermfg=White ctermbg=Red term=none start=<esc>[97;101m stop=<esc>[0m
hi WarningMsg ctermfg=Black ctermbg=Green hi WarningMsg ctermfg=Black ctermbg=Green
hi Error ctermbg=Red "hi Error ctermbg=Red
hi Todo ctermfg=Black ctermbg=yellow " Highlight for TODO XXX FIXME, etc.
hi Cursor ctermfg=blue hi Todo ctermfg=Black ctermbg=yellow term=none start=<esc>[103;90m stop=<esc>[0m
hi Directory ctermfg=Blue
hi Cursor ctermfg=blue term=none start=<esc>[94m stop=<esc>[0m
hi Directory ctermfg=Blue term=none start=<esc>[94m stop=<esc>[0m
hi ModeMsg ctermfg=white cterm=bold term=bold start=<esc>[97m stop=<esc>[0m
" Directory thru netrw " Directory thru netrw
@ -50,29 +57,29 @@ hi netrwSymLink ctermfg=Cyan
"hi Cursor guibg=#60a060 guifg=#00ff00 "hi Cursor guibg=#60a060 guifg=#00ff00
" ctermfg=#00ff00 " ctermfg=#00ff00
hi Search ctermbg=brown ctermfg=white cterm=bold hi Search ctermbg=brown ctermfg=white cterm=bold term=bold start=<esc>[48;5;130;97m stop=<esc>[0m
"hi IncSearch cterm=NONE ctermbg=steelblue "hi IncSearch cterm=NONE ctermbg=steelblue
hi LineNr ctermfg=yellow hi LineNr ctermfg=yellow term=none start=<esc>[93m stop=<esc>[0m
hi title ctermbg=yellow ctermfg=white hi title ctermbg=yellow ctermfg=darkgreen term=none start=<esc>[103;32m stop=<esc>[0m
hi ShowMarksHL ctermbg=yellow ctermfg=black cterm=bold hi ShowMarksHL ctermbg=yellow ctermfg=black cterm=bold
hi CursorLine ctermbg=yellow ctermfg=black cterm=bold hi CursorLine ctermbg=yellow ctermfg=black cterm=bold
"hi StatusLineNC cterm=NONE ctermfg=lightblue ctermbg=darkblue "hi StatusLineNC cterm=NONE ctermfg=lightblue ctermbg=darkblue
"hi StatusLine cterm=bold ctermfg=cyan ctermbg=blue "hi StatusLine cterm=bold ctermfg=cyan ctermbg=blue
hi label ctermfg=yellow hi label ctermfg=yellow term=none start=<esc>[93m stop=<esc>[0m
hi operator ctermfg=yellow hi operator ctermfg=yellow term=none start=<esc>[93m stop=<esc>[0m
hi clear Visual hi clear Visual
hi Visual cterm=reverse term=reverse hi Visual cterm=reverse term=reverse
hi DiffChange ctermfg=darkgreen hi DiffChange ctermfg=darkgreen term=none start=<esc>[32m stop=<esc>[0m
hi DiffFile ctermfg=green hi DiffFile ctermfg=green term=none start=<esc>[92m stop=<esc>[0m
hi DiffSubname ctermfg=cyan hi DiffSubname ctermfg=cyan term=none start=<esc>[96m stop=<esc>[0m
hi DiffIndexLine ctermfg=cyan hi DiffIndexLine ctermfg=cyan term=none start=<esc>[96m stop=<esc>[0m
hi diffAdded ctermfg=blue hi diffAdded ctermfg=blue term=none start=<esc>[94m stop=<esc>[0m
hi diffRemoved ctermfg=red hi diffRemoved ctermfg=red term=none start=<esc>[91m stop=<esc>[0m
hi DiffLine ctermfg=yellow hi DiffLine ctermfg=yellow term=none start=<esc>[93m stop=<esc>[0m
"hi DiffLine ctermfg=magenta "hi DiffLine ctermfg=magenta
hi Folded ctermbg=darkgrey hi Folded ctermbg=darkgrey
hi FoldColumn ctermbg=darkgrey ctermfg=white hi FoldColumn ctermbg=darkgrey ctermfg=white
hi cIf0 ctermfg=gray hi cIf0 ctermfg=gray term=none start=<esc>[38;2;100;100;100m stop=<esc>[0m
"hi diffOnly ctermfg=red cterm=bold "hi diffOnly ctermfg=red cterm=bold
" End of ron above. " End of ron above.
@ -82,53 +89,55 @@ hi cIf0 ctermfg=gray
"hi StatusUnwrap ctermfg=brown ctermbg=none cterm=none "hi StatusUnwrap ctermfg=brown ctermbg=none cterm=none
"hi StatusUnwrap ctermfg=236 ctermbg=none cterm=none "hi StatusUnwrap ctermfg=236 ctermbg=none cterm=none
hi StatusUnwrap ctermfg=58 ctermbg=none cterm=none hi StatusUnwrap ctermfg=58 ctermbg=none cterm=none
hi Comment ctermfg=darkgrey cterm=bold hi Comment ctermfg=darkgrey cterm=none term=NONE term=none start=<esc>[38;5;242m stop=<esc>[0m
hi Identifier ctermfg=cyan hi Identifier ctermfg=cyan cterm=none term=none start=<esc>[96m stop=<esc>[0m
hi Object ctermfg=red hi Object ctermfg=red term=none start=<esc>[91m stop=<esc>[0m
hi Exception ctermfg=brown hi Exception ctermfg=brown term=none start=<esc>[38;5;130m stop=<esc>[0m
hi Service ctermfg=green hi Service ctermfg=green start=<esc>[32m stop=<esc>[0m
hi Error ctermbg=red ctermfg=white cterm=bold hi Error ctermbg=red ctermfg=white cterm=none term=none start=<esc>[101;97m stop=<esc>[0m
hi Caller ctermfg=cyan hi Caller ctermfg=cyan term=NONE start=<esc>[96m stop=<esc>[0m
hi Target ctermfg=green ctermbg=red hi Target ctermfg=green ctermbg=red
hi Sync ctermfg=green ctermbg=red hi Sync ctermfg=green ctermbg=red
hi Debug ctermfg=darkgreen hi Debug ctermfg=darkgreen
hi MetaFunction ctermfg=darkcyan hi MetaFunction ctermfg=darkcyan
hi Dangerous ctermfg=red ctermbg=white cterm=bold,underline,italic hi Dangerous term=none start=<esc>[1;7;97;101;3;4;6m stop=<esc>[0m ctermfg=white ctermbg=red cterm=reverse,bold,underline,italic
"hi Dangerous ctermfg=red ctermbg=white cterm=bold,underline,italic start=<esc>[31;47;1;5m stop=<esc>[0m
"hi Type ctermfg=lightgreen "hi Type ctermfg=lightgreen
hi CommentSpecial ctermfg=Magenta guifg=Magenta
hi SpecialComment ctermfg=Magenta guifg=Magenta hi CommentSpecial ctermfg=Magenta guifg=Magenta term=none start=<esc>[35m stop=<esc>[0m
hi SpecialComment ctermfg=Magenta guifg=Magenta term=none start=<esc>[35m stop=<esc>[0m
" Seems to doc "@" in comments " Seems to doc "@" in comments
hi doxygenSpecial ctermfg=Magenta guifg=Magenta hi doxygenSpecial ctermfg=Magenta guifg=Magenta term=none start=<esc>[35m stop=<esc>[0m
hi doxygenCommentSpecial ctermfg=Magenta guifg=Magenta hi doxygenCommentSpecial ctermfg=Magenta guifg=Magenta term=none start=<esc>[35m stop=<esc>[0m
hi doxygenBriefSpecial ctermfg=Magenta guifg=Magenta hi doxygenBriefSpecial ctermfg=Magenta guifg=Magenta term=none start=<esc>[35m stop=<esc>[0m
" Brief text " Brief text
hi doxygenBrief ctermfg=cyan cterm=bold,underline hi doxygenBrief ctermfg=cyan cterm=bold,underline term=none start=<esc>[36;1;4m stop=<esc>[0m
hi doxygenComment ctermfg=Blue guifg=Blue hi doxygenComment ctermfg=Blue guifg=Blue term=none start=<esc>[94m stop=<esc>[0m
"hi doxygenSpecialTypeOnelineDesc cterm=bold ctermfg=LightMagenta guifg=firebrick3 gui=bold "hi doxygenSpecialTypeOnelineDesc cterm=bold ctermfg=LightMagenta guifg=firebrick3 gui=bold
hi doxygenParam ctermfg=Magenta cterm=bold hi doxygenParam ctermfg=Magenta cterm=bold term=none start=<esc>[95m stop=<esc>[0m
hi doxygenParamName ctermfg=darkblue cterm=bold,underline hi doxygenParamName ctermfg=darkblue cterm=bold,underline term=none start=<esc>[34;1;4m stop=<esc>[0m
"@note, @return, etc TODO: split these out, probably by forking doxygen.vim "@note, @return, etc TODO: split these out, probably by forking doxygen.vim
hi doxygenOther ctermfg=darkyellow cterm=underline hi doxygenOther ctermfg=darkyellow cterm=underline term=none start=<esc>[33;4m stop=<esc>[0m
"non-brief body "non-brief body
hi doxygenBody ctermfg=lightcyan hi doxygenBody ctermfg=lightcyan term=none start=<esc>[96m stop=<esc>[0m
hi doxygenSpecialMultilineDesc ctermfg=cyan hi doxygenSpecialMultilineDesc ctermfg=cyan term=none start=<esc>[36m stop=<esc>[0m
hi NamedConstant ctermfg=blue hi NamedConstant ctermfg=blue term=none start=<esc>[94m stop=<esc>[0m
"hi Example ctermfg=white "hi Example ctermfg=white
"hi DocNotes ctermfg=yellow "hi DocNotes ctermfg=yellow
@ -147,15 +156,27 @@ hi NamedConstant ctermfg=blue
" This is from vimrc.colors -- I may reintegrate it back together. " This is from vimrc.colors -- I may reintegrate it back together.
"hi User0 ctermfg=green ctermbg=green term=bold "hi User0 ctermfg=green ctermbg=green term=bold
hi statusline ctermfg=white ctermbg=black hi statusline ctermfg=white ctermbg=black cterm=reverse term=reverse start=<esc>[97;40m stop=<esc>[0m
hi User1 ctermfg=red ctermbg=white term=standout hi statuslinenc ctermfg=grey ctermbg=grey cterm=reverse term=reverse start=<esc>[37;47m stop=<esc>[0m
hi User2 ctermfg=darkmagenta ctermbg=white term=standout hi User1 ctermfg=red ctermbg=white term=standout term=none start=<esc>[91;107m stop=<esc>[0m
hi User3 ctermfg=blue ctermbg=white term=standout hi User2 ctermfg=darkmagenta ctermbg=white term=standout term=none start=<esc>[35;107m stop=<esc>[0m
hi User4 ctermfg=cyan ctermbg=white term=standout hi User3 ctermfg=blue ctermbg=white term=standout term=none start=<esc>[34;107m stop=<esc>[0m
hi User5 ctermfg=brown ctermbg=white term=standout hi User4 ctermfg=darkcyan ctermbg=white term=standout term=none start=<esc>[36;107m stop=<esc>[0m
hi User6 ctermfg=darkgreen ctermbg=white term=standout hi User5 ctermfg=brown ctermbg=white term=standout term=none start=<esc>[33;107m stop=<esc>[0m
hi User8 ctermfg=magenta ctermbg=black term=bold hi User6 ctermfg=darkgreen ctermbg=white term=standout term=none start=<esc>[32;107m stop=<esc>[0m
hi User9 ctermfg=white ctermbg=black term=bold hi User8 ctermfg=magenta ctermbg=black term=bold term=none start=<esc>[95;40m stop=<esc>[0m
hi User9 ctermfg=white ctermbg=black term=bold term=none start=<esc>[97;40m stop=<esc>[0m
hi NonText ctermfg=blue term=none start=<esc>[94m stop=<esc>[0m
hi EndOfBuffer ctermfg=blue term=none start=<esc>[94m stop=<esc>[0m
hi MoreMsg ctermfg=2 gui=bold guifg=SeaGreen term=none start=<esc>[92m stop=<esc>[0m
hi Question ctermfg=2 gui=bold guifg=SeaGreen term=none start=<esc>[92m stop=<esc>[0m
hi TabLine term=underline cterm=underline ctermfg=15 ctermbg=242 gui=underline guibg=DarkGrey start=<esc>[48;5;242;38;5;15m stop=<esc>[0m
hi TabLineSel term=bold cterm=bold gui=bold
hi TabLineFill term=reverse cterm=reverse gui=reverse
hi WildMenu ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow term=none start=<esc>[48;5;11;30m stop=<esc>[0m
" The vim colorscheme does everything, and some of the non-status-bar colors affect non-source bits. " The vim colorscheme does everything, and some of the non-status-bar colors affect non-source bits.
" I may have to maintain everything in this combined form " I may have to maintain everything in this combined form

View File

@ -23,3 +23,5 @@ source ~/.vim/vimrc.functions
source ~/.vim/vimrc.fileprefs source ~/.vim/vimrc.fileprefs
source ~/.vim/vimrc.statusline source ~/.vim/vimrc.statusline
set shell=/bin/tcsh
"set t_Co=1

View File

@ -10,12 +10,12 @@
" hi User9 ctermfg=white ctermbg=black cterm=bold " hi User9 ctermfg=white ctermbg=black cterm=bold
"hi User0 ctermfg=green ctermbg=green term=bold "hi User0 ctermfg=green ctermbg=green term=bold
hi statusline ctermfg=lightgrey ctermbg=black "hi statusline ctermfg=lightgrey ctermbg=black
hi User1 ctermfg=red ctermbg=white term=standout "hi User1 ctermfg=red ctermbg=white term=standout
hi User2 ctermfg=darkmagenta ctermbg=white term=standout "hi User2 ctermfg=darkmagenta ctermbg=white term=standout
hi User3 ctermfg=blue ctermbg=white term=standout "hi User3 ctermfg=blue ctermbg=white term=standout
hi User4 ctermfg=cyan ctermbg=white term=standout "hi User4 ctermfg=cyan ctermbg=white term=standout
hi User5 ctermfg=brown ctermbg=white term=standout "hi User5 ctermfg=brown ctermbg=white term=standout
hi User6 ctermfg=darkgreen ctermbg=white term=standout "hi User6 ctermfg=darkgreen ctermbg=white term=standout
hi User8 ctermfg=magenta ctermbg=black term=bold "hi User8 ctermfg=magenta ctermbg=black term=bold
hi User9 ctermfg=white ctermbg=black term=bold "hi User9 ctermfg=white ctermbg=black term=bold

View File

@ -16,6 +16,9 @@ au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set tw=150
au BufNewFile,BufRead */cshenv/tcshrc.* set filetype=tcsh au BufNewFile,BufRead */cshenv/tcshrc.* set filetype=tcsh
au BufNewFile,BufRead */src/bp/*.cpp,*/src/bp/*.hpp syn region cxxBoostLibrary matchgroup=cxxLibPrefix start="\<\(bp_boost\)\z(::\)\@=" matchgroup=NONE skip="\z1" end="\>" transparent
au BufNewFile,BufRead */src/bp/*.cpp,*/src/bp/*.hpp syn region cxxBoostVerbotenLibrary matchgroup=cxxStlDangerousFunction start="\<\(boost\)\z(::\)\@=" matchgroup=NONE skip="\z1" end="\>" transparent
" falcish " falcish
"au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set ts=3 "au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set ts=3
"au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set sts=3 "au BufNewFile,BufRead *.cpp,*.hpp,*.cc,*.h set sts=3

View File

@ -18,5 +18,11 @@ endfunction
function! SyntaxItem() function! SyntaxItem()
return synIDattr(synID(line("."),col("."),1),"name") return synIDattr(synID(line("."),col("."),1),"name")
let res = []
for id in synstack(line("."), col("."))
let res = res + [ synIDattr( id, "name" ) ]
endfor
"return synIDattr(synID(line("."),col("."),1),"name")
"return join( res, ":" )
endfunction endfunction