Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better install system

  • Loading branch information...
commit 3b3056472cf5db2bba9f6ab5b85a8f2fb9c92a6a 1 parent 6283bd6
@twooster authored
View
0  to-be-installed → MANIFEST
File renamed without changes
View
61 home/.vim/syntax/python.vim
@@ -89,6 +89,12 @@ if exists("python_highlight_all") && python_highlight_all != 0
let python_highlight_builtin_funcs = 1
endif
endif
+ if !exists("python_highlight_self")
+ let python_highlight_self = 1
+ endif
+ if !exists("python_highlight_magic")
+ let python_highlight_magic = 1
+ endif
if !exists("python_highlight_exceptions")
let python_highlight_exceptions = 1
endif
@@ -120,7 +126,7 @@ syn keyword pythonStatement global assert
syn keyword pythonStatement lambda yield
syn keyword pythonStatement with
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
-syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
+syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained contains=pythonMagicFunc
syn keyword pythonRepeat for while
syn keyword pythonConditional if elif else
syn keyword pythonPreCondit import from as
@@ -249,29 +255,33 @@ if exists("python_highlight_builtin_objs") && python_highlight_builtin_objs != 0
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
endif
-if exists("python_highlight_conventional") && python_highlight_conventional != 0
- syn keyword pythonConventional __init__ __new__ __call__ __del__ __repr__ __str__
- syn keyword pythonConventional __lt__ __gt__ __le__ __ge__ __eq__ __ne__
- syn keyword pythonConventional __cmp__ __rcmp__ __hash__ __nonzero__ __unicode__
- syn keyword pythonConventional __getattr__ __setattr__ __delattr__ __getattribute__
- syn keyword pythonConventional __get__ __set__ __delete__ __slots__ __metaclass__
- syn keyword pythonConventional __instancecheck__ __subclasscheck__ __call__
- syn keyword pythonConventional __len__ __getitem__ __setitem__ __deltiem__
- syn keyword pythonConventional __iter__ __reversed__ __contains__
- syn keyword pythonConventional __setslice__ __delslice__
- syn keyword pythonConventional __add__ __sub__ __mul__ __floordiv__ __mod__
- syn keyword pythonConventional __divmod__ __pow__ __lshift__ __rshift__
- syn keyword pythonConventional __and__ __xor__ __or__ __div__ __truediv__
- syn keyword pythonConventional __radd__ __rsub__ __rmul__ __rdiv__ __rtruediv__
- syn keyword pythonConventional __rfloordiv__ __rmod__ __rdivmod__ __rpow__
- syn keyword pythonConventional __rlshift__ __rrshift__ __rand__ __ror__
- syn keyword pythonConventional __iadd__ __isub__ __imul__ __idiv__ __itruediv__
- syn keyword pythonConventional __ifloordiv__ __imod__ __ipow__ __ilshift__
- syn keyword pythonConventional __irshift__ __iand__ __ixor__ __ior__
- syn keyword pythonConventional __neg__ __pos__ __abs__ __invert__ __complex__
- syn keyword pythonConventional __int__ __long__ __float__ __oct__ __hex__
- syn keyword pythonConventional __index__ __coerce__ __enter__ __exit__
- syn keyword pythonConventional self
+if exists("python_highlight_magic") && python_highlight_magic != 0
+ " Conventional and magic names
+ syn keyword pythonMagicFunc __init__ __new__ __call__ __del__ __repr__ __str__
+ syn keyword pythonMagicFunc __lt__ __gt__ __le__ __ge__ __eq__ __ne__
+ syn keyword pythonMagicFunc __cmp__ __rcmp__ __hash__ __nonzero__ __unicode__
+ syn keyword pythonMagicFunc __getattr__ __setattr__ __delattr__ __getattribute__
+ syn keyword pythonMagicFunc __get__ __set__ __delete__ __slots__ __metaclass__
+ syn keyword pythonMagicFunc __instancecheck__ __subclasscheck__ __call__
+ syn keyword pythonMagicFunc __len__ __getitem__ __setitem__ __deltiem__
+ syn keyword pythonMagicFunc __iter__ __reversed__ __contains__
+ syn keyword pythonMagicFunc __setslice__ __delslice__
+ syn keyword pythonMagicFunc __add__ __sub__ __mul__ __floordiv__ __mod__
+ syn keyword pythonMagicFunc __divmod__ __pow__ __lshift__ __rshift__
+ syn keyword pythonMagicFunc __and__ __xor__ __or__ __div__ __truediv__
+ syn keyword pythonMagicFunc __radd__ __rsub__ __rmul__ __rdiv__ __rtruediv__
+ syn keyword pythonMagicFunc __rfloordiv__ __rmod__ __rdivmod__ __rpow__
+ syn keyword pythonMagicFunc __rlshift__ __rrshift__ __rand__ __ror__
+ syn keyword pythonMagicFunc __iadd__ __isub__ __imul__ __idiv__ __itruediv__
+ syn keyword pythonMagicFunc __ifloordiv__ __imod__ __ipow__ __ilshift__
+ syn keyword pythonMagicFunc __irshift__ __iand__ __ixor__ __ior__
+ syn keyword pythonMagicFunc __neg__ __pos__ __abs__ __invert__ __complex__
+ syn keyword pythonMagicFunc __int__ __long__ __float__ __oct__ __hex__
+ syn keyword pythonMagicFunc __index__ __coerce__ __enter__ __exit__
+endif
+
+if exists("python_highlight_self") && python_highlight_self != 0
+ syn keyword pythonSelf self
endif
if exists("python_highlight_builtin_funcs") && python_highlight_builtin_funcs != 0
@@ -378,6 +388,7 @@ if version >= 508 || !exists("did_python_syn_inits")
HiLink pythonDocTest Special
HiLink pythonDocTest2 Special
+ HiLink pythonSelf Special
HiLink pythonNumber Number
HiLink pythonHexNumber Number
@@ -388,7 +399,7 @@ if version >= 508 || !exists("did_python_syn_inits")
HiLink pythonHexError Error
HiLink pythonBinError Error
- HiLink pythonConventional Structure
+ HiLink pythonMagicFunc Structure
HiLink pythonBuiltinObj Structure
HiLink pythonBuiltinFunc Function
View
8 home/.vimrc
@@ -51,6 +51,7 @@
" }
" Vim UI {
+ colorscheme molokai
set cursorline " highlight current line
set incsearch " BUT do highlight as you type you
" search phrase
@@ -105,6 +106,9 @@
" Sets up past-80-column highlighting
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
+ " Turn on all python highlighting
+ let python_highlight_all = 1
+ let python_slow_sync = 1
" }
" Folding {
@@ -156,6 +160,8 @@
nnoremap \ :buf #<CR>
nmap <leader>d :bprevious<CR>:bdelete #<CR>
+ " Highlighting debuging: TODO: Remove
+ map <C-F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
" }
" Autocommands {
@@ -167,7 +173,7 @@
" GUI Settings {
if has("gui_running")
" Basics {
- colorscheme molokai
+ colorscheme mustang
set columns=120
set guifont=Tamzen:h15
set guioptions=ce
View
13 install.sh
@@ -4,6 +4,8 @@
# Set inner-field-seperator (IFS) to blank
# read using:
# -r raw mode, ignoring backslashes
+./refresh.sh
+
while IFS= read -r file; do
# get basename by trimming longest */ at beginning
base="${file##*/}"
@@ -16,6 +18,11 @@ while IFS= read -r file; do
echo Making directory $dirto...
mkdir -p "$dirto"
fi
- echo Copying to $HOME/$file
- cp -p "$prefix/$file" "$HOME/$file"
-done < to-be-installed
+ if [[ "$HOME/$file" -nt "$prefix/$file" ]]; then
+ echo "Destination file appears to be newer, please confirm copy:"
+ cp -ip "$prefix/$file" "$HOME/$file"
+ else
+ echo Copying to $HOME/$file
+ cp -p "$prefix/$file" "$HOME/$file"
+ fi
+done < "$manifest"
View
13 refresh.sh
@@ -1,7 +1,12 @@
#!/bin/bash
. ./settings.sh
-cd "$prefix"
-echo "Files to be included:"
-echo "---------------------"
-git ls-files | tee ../to-be-installed
+command -v git >/dev/null 2>&1
+if [ $? -eq 0 ]; then
+ cd "$prefix"
+ echo "Updating file list from git repository. Files to be included:"
+ echo "---------------------"
+ git ls-files | tee "../$manifest"
+else
+ echo "Unable to find 'git'; cannot update repository."
+fi
View
4 reverse-install.sh
@@ -1,7 +1,7 @@
#!/bin/bash
. ./settings.sh
-
+./refresh.sh
# Set inner-field-seperator (IFS) to blank
# read using:
# -r raw mode, ignoring backslashes
@@ -12,4 +12,4 @@ while IFS= read -r file; do
else
echo "Skipping older file: $file"
fi
-done < to-be-installed
+done < "$manifest"
View
2  settings.sh
@@ -1,2 +1,2 @@
prefix="home"
-
+manifest="MANIFEST"
Please sign in to comment.
Something went wrong with that request. Please try again.