Skip to content

Commit

Permalink
Update time
Browse files Browse the repository at this point in the history
- Add unit test tricks makegreen and nose compiler
- Update underwater color scheme
- Add some custom snippets, unit tests, lint stuff
  • Loading branch information
mitechie committed Jan 30, 2011
1 parent 787f41d commit c5cbef6
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 95 deletions.
13 changes: 4 additions & 9 deletions .vim/.netrwhist
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =8
let g:netrw_dirhist_1='/home/rharding/configs/pyvim/bundle'
let g:netrw_dirhist_2='/home/rharding/configs/pyvim/.vim.bak'
let g:netrw_dirhist_3='/home/rharding/src/qmail/qmail/qmail_app/public/css'
let g:netrw_dirhist_4='/home/rharding/configs/dotfiles/awesome/autostart'
let g:netrw_dirhist_5='/home/rharding/.irssi'
let g:netrw_dirhist_6='/home/rharding/configs/dotfiles/awesome/autostart'
let g:netrw_dirhist_7='/home/rharding/configs/pyvim/bundle'
let g:netrw_dirhist_8='/home/rharding/.offlineimap'
let g:netrw_dirhist_cnt =3
let g:netrw_dirhist_1='/home/rharding/configs/pyvim/.vim/bundle/Vim-nosecompiler'
let g:netrw_dirhist_2='/home/rharding/configs/pyvim/.vim/bundle/vim-makegreen'
let g:netrw_dirhist_3='/home/rharding/configs/pyvim/.vim/bundle/Vim-nosecompiler'
214 changes: 133 additions & 81 deletions .vim/colors/underwater-mod.vim
Original file line number Diff line number Diff line change
@@ -1,98 +1,150 @@
" Maintainer: Mario Gutierrez (mario@mgutz.com)
" Original Theme: Dmitry Kichenko (dmitrykichenko@gmail.com)
" Last Change: Jun 23, 2010
" Last Change: Dec 28, 2010
" Version: 0.3

set background=dark
let colors_name = "underwater-mod"

set background=dark
hi clear

if exists("syntax_on")
syntax reset
syntax reset
endif

let colors_name = "underwater-mod"

" Vim >= 7.0 specific colors
if version >= 700
" highlights current line
hi CursorLine guibg=#18374F
" cursor's colour
hi CursorColumn guibg=#ffffff
"hi MatchParen guifg=#ffffff guibg=#439ea9 gui=bold
hi MatchParen guifg=magenta guibg=bg gui=bold
hi Pmenu guifg=#dfeff6 guibg=#1E415E
hi PmenuSel guifg=#dfeff6 guibg=#2D7889

" Search
hi IncSearch guifg=#E2DAEF guibg=#AF81F4 gui=bold
hi Search guifg=#E2DAEF guibg=#AF81F4 gui=none
hi CursorLine guibg=#18374F
hi CursorColumn guibg=#18374F
hi MatchParen guifg=magenta guibg=bg gui=bold
hi Pmenu guifg=#dfeff6 guibg=#1E415E
hi PmenuSel guifg=#dfeff6 guibg=#2D7889

hi IncSearch guifg=bg guibg=#AF81F4 gui=bold
hi Search guifg=bg guibg=#AF81F4 gui=none
endif

" General colors
hi Cursor guifg=NONE guibg=#55A096 gui=none
"hi Normal guifg=#e3f3fa guibg=#102235 gui=none
hi Normal guifg=#e3f3fa guibg=#0B1724 gui=none
" e.g. tildes at the end of file
hi NonText guifg=#2F577C guibg=bg gui=none
hi LineNr guifg=#233f59 guibg=bg gui=none
hi StatusLine guifg=#ffec99 guibg=#0a1721 gui=none
hi StatusLineNC guifg=#233f59 guibg=#0a1721 gui=none
hi VertSplit guifg=#0a1721 guibg=#0a1721 gui=none
"""""""" General colors

hi Cursor guifg=black guibg=#55A096 gui=none
hi Folded guifg=#68CEE8 guibg=#1A3951 gui=none
hi FoldColumn guifg=#1E415E guibg=#1A3951 gui=none
hi Title guifg=cyan guibg=NONE gui=bold
hi LineNr guifg=#1c3249 guibg=bg gui=none
hi Normal guifg=#e3f3fa guibg=#102235 gui=none
hi NonText guifg=#1c3249 guibg=bg gui=none
hi StatusLine guifg=#ffec99 guibg=#0a1721 gui=none
hi StatusLineNC guifg=#4e6f91 guibg=#0a1721 gui=none
hi TabLine guifg=#555555 guibg=#dddddd gui=none
hi TabLineSel guifg=#101010 guibg=#b0b0b0 gui=none
hi TabLineFill guifg=fg guibg=#dddddd gui=none
hi Title guifg=#ef7760 guibg=bg gui=none
hi VertSplit guifg=#0a1721 guibg=#0a1721 gui=none
" Selected text color
hi Visual guifg=#dfeff6 guibg=#24557A gui=none
"hi SpecialKey guifg=#3e71a1 guibg=#102235 gui=none

" Syntax highlighting
"
hi Comment guifg=#3e71a1 guibg=bg gui=italic
hi Todo guifg=#ADED80 guibg=#579929 gui=bold
hi Constant guifg=#96defa gui=none
hi String guifg=#89e14b gui=italic
" names of variables in PHP
hi Identifier guifg=#8ac6f2 gui=none
" Function names as in python. currently purleish
hi Function guifg=#AF81F4 gui=none
" declarations of type, e.g. int blah
hi Type guifg=#41B2EA gui=none
" statement, such as 'hi' right here
hi Statement guifg=#68CEE8 gui=none
hi Keyword guifg=#8ac6f2 gui=none
" specified preprocessed words (like bold, italic etc. above)
hi PreProc guifg=#ef7760 gui=none
hi Number guifg=#96defa gui=none
hi Special guifg=#DFEFF6 gui=none

" Ruby
hi rubyInterpolation guifg=#b9e19d guibg=bg
hi rubyInterpolationDelimiter guifg=#b9e19d guibg=bg
hi link rubyStringDelimiter String
""hi erubyDelimiter guifg=#f8c6bd guibg=bg
hi link erubyDelimiter PreProc

" HTML
hi link htmlTag Statement
hi link htmlEndTag Statement
hi link htmlTagName Statement

" XML
hi link xmlTag htmlTag
hi link xmlEndTag htmlEndTag
hi link xmlTagName htmlTagName

" NERDTree
hi link treePart LineNr
hi link treePartFile treePart
hi link treeDirSlash treePart
hi link treeDir Statement
hi link treeClosable PreProc
hi link treeOpenable treeClosable
hi link treeUp treeClosable
hi treeFlag guifg=#3e71a1 guibg=bg gui=none
hi link treeHelp Comment
hi link treeLink Type

hi link markdownCode Function
hi link markdownCodeBlock Function

hi ErrorMsg guifg=fg guibg=#C62626
hi WarningMsg guifg=#C62626 guibg=bg



"""""""" Syntax highlighting

hi Comment guifg=#4e6f91 guibg=bg gui=italic
hi Constant guifg=#ffc287 guibg=bg gui=none
hi Function guifg=#AF81F4 guibg=bg gui=none
hi Identifier guifg=#889ce8 guibg=bg gui=none
hi Ignore guifg=bg guibg=bg gui=none
hi link Number Constant
hi PreProc guifg=#ef7760 guibg=bg gui=none
hi Keyword guifg=#8ac6f2 guibg=bg gui=none
hi Special guifg=#b9e19d guibg=bg gui=none
hi Statement guifg=#68CEE8 guibg=bg gui=none
hi String guifg=#89e14b guibg=bg gui=italic
hi Todo guifg=#ADED80 guibg=bg gui=bold
hi Type guifg=#5ba0eb guibg=bg gui=none
hi Underlined guifg=#8ac6f2 guibg=bg gui=underline


"""""""" Coffee

hi link coffeeInterpolation Special


"""""""" ERB

hi link erubyDelimiter PreProc


"""""""" HAML

hi link hamlAttributes htmlArg
hi link hamlTag htmlTag
hi link hamlTagName htmlTagName
hi link hamlIdChar hamlId
hi link hamlClassChar hamlClass
hi link hamlInterpolation Special


"""""""" HTML

hi link htmlTag Statement
hi link htmlEndTag Statement
hi link htmlTagName Statement
hi link htmlSpecialChar Constant


"""""""" JavaScript

hi link javaScriptFunction Function
hi link javaScriptDocSeeTag Underlined


"""""""" Markdown - tpope's

hi link markdownCodeBlock Statement
hi link markdownCode Statement
hi link markdownCodeDelimiter Statement
hi link markdownHeadingDelimiter Title
hi link markdownLinkText Underlined
hi link markdownLinkTextDelimiter Comment
hi link markdownLinkDelimiter Comment
hi link markdownListMarker Constant
hi link markdownUrl Comment


"""""""" NERDTree

hi link treeClosable PreProc
hi link treeDir Statement
hi link treeDirSlash NonText
hi link treeExecFile Type
hi treeFlag guifg=#3e71a1 guibg=bg gui=none
hi link treeHelp Comment
hi link treeLink Type
hi link treePart NonText
hi link treePartFile NonText
hi link treeOpenable treeClosable
hi link treeUp treeClosable


"""""""" Ruby

hi rubyAccess guifg=#ef7760 guibg=bg gui=italic
hi link rubyBlockParameter Normal
hi link rubyInterpolation Special
hi link rubyInterpolationDelimiter Special
hi link rubyStringDelimiter String


"""""""" SH

hi link shQuote String


"""""""" XML

hi link xmlEndTag htmlEndTag
hi link xmlTag htmlTag
hi link xmlTagName htmlTagName

" vim: set sw=4 sts=4 et :
1 change: 1 addition & 0 deletions .vim/dict.add
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ SqlAlchemy
admin
popup
username
Codemash
15 changes: 12 additions & 3 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ endif
" ==================================================
let mapleader="," " change the leader to be a comma vs slash
set textwidth=79 " Try this out to see how textwidth helps
set ch=3 " Make command line two lines high
set ch=1 " Make command line two lines high
set ls=2 " allways show status line
set tabstop=4 " numbers of spaces of tab character
set shiftwidth=4 " numbers of spaces to (auto)indent
Expand Down Expand Up @@ -238,6 +238,13 @@ set spellfile=~/.vim/dict.add
nmap <leader>c :copen<CR>
nmap <leader>cc :cclose<CR>
nmap <leader>l :lopen<CR>
nmap <leader>ll :lclose<CR>
nmap <leader>ln :lN<CR>
nmap <leader>lp :lN<CR>


" for when we forget to use sudo to open/edit a file
cmap w!! w !sudo tee % >/dev/null
Expand Down Expand Up @@ -372,7 +379,8 @@ au bufwritepost * if getline(1) =~ "^#!" | if getline(1) =~ "/bin/" | silent !ch
" ==================================================
au BufReadPost quickfix map <buffer> <silent> <CR> :.cc <CR> :ccl
au BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
" au BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
au BufRead *.py compiler nose
au BufRead *.py set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m

" ==================================================
Expand Down Expand Up @@ -417,7 +425,7 @@ nmap <silent> <Leader>b :LustyJuggler<CR>
" NERDTree
" http://www.vim.org/scripts/script.php?script_id=1658
let NERDTreeIgnore = ['\.pyc$', '\.pyo$']
map <leader>t :NERDTree<CR>
map <leader>a :NERDTree<CR>
" tComment
" http://www.vim.org/scripts/script.php?script_id=1173
Expand Down Expand Up @@ -462,6 +470,7 @@ ino <silent> <leader>n <c-r>=ShowAvailableSnips()<cr>
" Pyflakes
" http://www.vim.org/scripts/script.php?script_id=3161
" default config for underlines of syntax errors in gvim
let g:pyflakes_use_quickfix = 0

" Gist - github pastbin
" http://www.vim.org/scripts/script.php?script_id=2423
Expand Down
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ plugins, and copy them over to the `.vim/bundle` directory.

ToDo
----
- need pylint or pyflakes preferably with highlighting in the page via spell
- need an upgrade script command to walk through the plugins and pull updates

2 changes: 2 additions & 0 deletions bundle_list
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ git://github.com/mitechie/pyflakes-pathogen.git
#http://github.com/kevinw/pyflakes-vim.git
http://github.com/tomtom/tlib_vim.git
https://github.com/tpope/vim-fugitive.git
https://mitechie@github.com/mitechie/vim-makegreen.git
https://github.com/olethanh/Vim-nosecompiler.git
12 changes: 12 additions & 0 deletions custom_snippets/javascript-custom.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,15 @@ snippet doc
* ${1|some_doc}
*
*/

snippet jslint
/*jslint eqeqeq: false, browser: true, debug: true, onevar: true, plusplus: false, newcap: false */
/*global $: false, window: false, self: false, escape: false, mor: false, sprintf: false */

snippet clos
(function () {
${1|code}
}());

snippet deb
debugger;
22 changes: 22 additions & 0 deletions custom_snippets/python-custom.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,26 @@
snippet dmp
log.debug(${1|somevar})

snippet testfile
"""${1|Dockblock}"""
from unittest import TestCase

class Test${2|class}(TestCase):
"""${3|TestGroup}"""

def setUp(self):
"""Setup Tests"""
pass

def tearDown(self):
"""Tear down each test"""
pass

snippet tst
def test_${1|method}(self):
"""${2|description}"""

assert ${3|Something}, "${4|Output}"

snippet ass
assert ${1|condition}, "${2|explanation}"
4 changes: 3 additions & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,17 @@ def fix_xmledit():
subprocess.call('ln -s {0} {1}'.format(xml, html), shell=True)
subprocess.call('ln -s {0} {1}'.format(xml, mako), shell=True)


def copy_custom_snippets():
"""We need to add our custom snippets after the plugin is downloaded/setup
"""
import glob, shutil, os
copy_to = os.path.expanduser('~/.vim/bundle/snipmate.vim.git/snippets')
for file in glob.glob("custom_snippets/*.snippets"):
shutil.copy(file, copy_to)


for conf_file in CONFIG_FILES:
removefile(conf_file)
linkfile(conf_file)
Expand Down

0 comments on commit c5cbef6

Please sign in to comment.