Browse Source

bash: vimcat заменен на source-highlight

master
Maxim Likhachev 11 years ago
parent
commit
fc5d5b3e19
  1. 12
      etc/shell/bash/aliases
  2. 72
      etc/soft/source-hl/default.style

12
etc/shell/bash/aliases

@ -41,7 +41,6 @@ alias pstree="pstree -U -h" #noindex
alias mkdir="mkdir -p -v" #noindex alias mkdir="mkdir -p -v" #noindex
alias j="jobs -l" #noindex alias j="jobs -l" #noindex
alias dirs="dirs -v" #noindex alias dirs="dirs -v" #noindex
alias vcat=vimcat #noindex
alias src=vimcat #noindex alias src=vimcat #noindex
#- Замена стандартных путей для конфигурационных файлов #- Замена стандартных путей для конфигурационных файлов
@ -344,6 +343,17 @@ fucheck() {
} | xargs -0 -n2 mv -v } | xargs -0 -n2 mv -v
} }
#- Вывод файлов с подсветкой синтаксиса
vcat() {
source-highlight \
-f esc \
-i "$1" \
-o STDOUT \
--line-number=' ' \
--style-file=$SHELLRC/etc/soft/source-hl/default.style
echo
}
#- Поиск пути к исполняемому файлу, просмотр кода функций и псевдонимов #- Поиск пути к исполняемому файлу, просмотр кода функций и псевдонимов
which() { #noindex which() { #noindex
(alias; declare -f) \ (alias; declare -f) \

72
etc/soft/source-hl/default.style

@ -0,0 +1,72 @@
bgcolor "white"; // the background color for documents
context gray; // the color for context lines (when specified with line ranges)
keyword blue b ; // for language keywords
type darkgreen ; // for basic types
usertype teal ; // for user defined types
string pink; // for strings and chars
regexp orange f ; // for strings and chars
specialchar pink f ; // for special chars, e.g., \n, \t, \\
comment black b; // for comments
number purple; // for literal numbers
preproc darkblue b ; // for preproc directives (e.g. #include, import)
symbol blue b; // for simbols (e.g. <, >, +)
function cyan b; // for function calls and declarations
cbracket blue b; // for block brackets (e.g. {, })
todo cyan b; // for TODO and FIXME
code brightgreen b; // for code snippets
//Predefined variables and functions (for instance glsl)
predef_var darkblue ;
predef_func darkblue b ;
// for OOP
classname teal ; // for class names, e.g., in Java and C++
// line numbers
linenum yellow f;
// Internet related
url blue u, f;
// other elements for ChangeLog and Log files
date blue b ;
time, file darkblue b ;
ip, name darkgreen ;
// for Prolog, Perl...
variable green;
// explicit for Latex
italics darkgreen i;
bold darkgreen b;
underline darkgreen u;
fixed green f;
argument darkgreen;
optionalargument purple;
math orange;
bibtex blue;
// for diffs
oldfile orange;
newfile darkgreen;
difflines blue;
// for css
selector purple;
property blue;
value darkgreen i;
// for oz
atom orange;
meta i;
// for file system
path orange;
// for C (or other language) labels
label teal b;
// for errors
error purple;
warning darkgreen;
Loading…
Cancel
Save