tomkersten-vixploder 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +105 -0
- data/PostInstall.txt +21 -0
- data/README.rdoc +131 -0
- data/Rakefile +21 -0
- data/bin/256colors2.pl +63 -0
- data/bin/colortest +365 -0
- data/bin/vixplode +10 -0
- data/lib/dotfiles/aliases +30 -0
- data/lib/dotfiles/gvimrc +20 -0
- data/lib/dotfiles/vim/.VimballRecord +2 -0
- data/lib/dotfiles/vim/after/ftplugin/actionscript_snippets.vim +9 -0
- data/lib/dotfiles/vim/after/ftplugin/aspvbs_snippets.vim +17 -0
- data/lib/dotfiles/vim/after/ftplugin/c_snippets.vim +58 -0
- data/lib/dotfiles/vim/after/ftplugin/css_snippets.vim +30 -0
- data/lib/dotfiles/vim/after/ftplugin/django_model_snippets.vim +61 -0
- data/lib/dotfiles/vim/after/ftplugin/django_template_snippets.vim +32 -0
- data/lib/dotfiles/vim/after/ftplugin/f-script_snippets.vim +14 -0
- data/lib/dotfiles/vim/after/ftplugin/haskell_snippets.vim +9 -0
- data/lib/dotfiles/vim/after/ftplugin/html_snippets.vim +57 -0
- data/lib/dotfiles/vim/after/ftplugin/java_snippets.vim +52 -0
- data/lib/dotfiles/vim/after/ftplugin/javascript_snippets.vim +10 -0
- data/lib/dotfiles/vim/after/ftplugin/latex_snippets.vim +13 -0
- data/lib/dotfiles/vim/after/ftplugin/logo_snippets.vim +9 -0
- data/lib/dotfiles/vim/after/ftplugin/markdown_snippets.vim +10 -0
- data/lib/dotfiles/vim/after/ftplugin/movable_type_snippets.vim +14 -0
- data/lib/dotfiles/vim/after/ftplugin/objc_snippets.vim +53 -0
- data/lib/dotfiles/vim/after/ftplugin/ocaml_snippets.vim +26 -0
- data/lib/dotfiles/vim/after/ftplugin/perl_snippets.vim +23 -0
- data/lib/dotfiles/vim/after/ftplugin/php_snippets.vim +30 -0
- data/lib/dotfiles/vim/after/ftplugin/phpdoc_snippets.vim +19 -0
- data/lib/dotfiles/vim/after/ftplugin/propel_snippets.vim +14 -0
- data/lib/dotfiles/vim/after/ftplugin/python_snippets.vim +202 -0
- data/lib/dotfiles/vim/after/ftplugin/rails_snippets.vim +54 -0
- data/lib/dotfiles/vim/after/ftplugin/ruby_snippets.vim +32 -0
- data/lib/dotfiles/vim/after/ftplugin/sh_snippets.vim +12 -0
- data/lib/dotfiles/vim/after/ftplugin/slate_snippets.vim +19 -0
- data/lib/dotfiles/vim/after/ftplugin/smarty_snippets.vim +35 -0
- data/lib/dotfiles/vim/after/ftplugin/symfony_snippets.vim +21 -0
- data/lib/dotfiles/vim/after/ftplugin/tcl_snippets.vim +14 -0
- data/lib/dotfiles/vim/after/ftplugin/template_toolkit_snippets.vim +13 -0
- data/lib/dotfiles/vim/after/ftplugin/tex_snippets.vim +13 -0
- data/lib/dotfiles/vim/after/ftplugin/xhtml_snippets.vim +48 -0
- data/lib/dotfiles/vim/autoload/fakeclip.vim +253 -0
- data/lib/dotfiles/vim/autoload/rails.vim +4377 -0
- data/lib/dotfiles/vim/autoload/rubycomplete.vim +802 -0
- data/lib/dotfiles/vim/colors/inkpot.vim +212 -0
- data/lib/dotfiles/vim/colors/ir_black.vim +212 -0
- data/lib/dotfiles/vim/colors/ir_black_mod.vim +213 -0
- data/lib/dotfiles/vim/colors/railscasts.vim +100 -0
- data/lib/dotfiles/vim/colors/rubyblue.vim +74 -0
- data/lib/dotfiles/vim/colors/twilight.vim +75 -0
- data/lib/dotfiles/vim/colors/twilight2.vim +74 -0
- data/lib/dotfiles/vim/colors/wombat256.vim +302 -0
- data/lib/dotfiles/vim/compiler/eruby.vim +41 -0
- data/lib/dotfiles/vim/compiler/ruby.vim +68 -0
- data/lib/dotfiles/vim/compiler/rubyunit.vim +35 -0
- data/lib/dotfiles/vim/doc/NERD_tree.txt +1235 -0
- data/lib/dotfiles/vim/doc/fakeclip.txt +190 -0
- data/lib/dotfiles/vim/doc/matchit.txt +406 -0
- data/lib/dotfiles/vim/doc/project.txt +710 -0
- data/lib/dotfiles/vim/doc/rails.txt +1123 -0
- data/lib/dotfiles/vim/doc/snippets_emu.txt +354 -0
- data/lib/dotfiles/vim/doc/surround.txt +218 -0
- data/lib/dotfiles/vim/doc/tags +433 -0
- data/lib/dotfiles/vim/filetype.vim +13 -0
- data/lib/dotfiles/vim/ftdetect/gist.vim +3 -0
- data/lib/dotfiles/vim/ftdetect/ruby.vim +14 -0
- data/lib/dotfiles/vim/ftplugin/eruby.vim +101 -0
- data/lib/dotfiles/vim/ftplugin/ruby.vim +230 -0
- data/lib/dotfiles/vim/indent/eruby.vim +73 -0
- data/lib/dotfiles/vim/indent/ruby.vim +373 -0
- data/lib/dotfiles/vim/plugin/NERD_tree.vim +3536 -0
- data/lib/dotfiles/vim/plugin/comments.vim +321 -0
- data/lib/dotfiles/vim/plugin/fakeclip.vim +174 -0
- data/lib/dotfiles/vim/plugin/fuzzyfinder.vim +1676 -0
- data/lib/dotfiles/vim/plugin/fuzzyfinder_textmate.vim +150 -0
- data/lib/dotfiles/vim/plugin/gist.vim +241 -0
- data/lib/dotfiles/vim/plugin/gitdiff.vim +141 -0
- data/lib/dotfiles/vim/plugin/matchit.vim +812 -0
- data/lib/dotfiles/vim/plugin/mru.vim +787 -0
- data/lib/dotfiles/vim/plugin/rails.vim +310 -0
- data/lib/dotfiles/vim/plugin/rspec.vim +12 -0
- data/lib/dotfiles/vim/plugin/snippets.vim +17 -0
- data/lib/dotfiles/vim/plugin/snippetsEmu.vim +973 -0
- data/lib/dotfiles/vim/plugin/supertab.vim +531 -0
- data/lib/dotfiles/vim/plugin/surround.vim +632 -0
- data/lib/dotfiles/vim/ref_vimrc +80 -0
- data/lib/dotfiles/vim/ruby/fuzzy_file_finder.rb +353 -0
- data/lib/dotfiles/vim/syntax/eruby.vim +85 -0
- data/lib/dotfiles/vim/syntax/haml.vim +113 -0
- data/lib/dotfiles/vim/syntax/mkd.vim +86 -0
- data/lib/dotfiles/vim/syntax/ruby.vim +324 -0
- data/lib/dotfiles/vim/syntax/sass.vim +93 -0
- data/lib/dotfiles/vimrc +269 -0
- data/lib/vixplode/cli.rb +73 -0
- data/lib/vixploder.rb +6 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/vixplode_cli_spec.rb +15 -0
- data/spec/vixploder_spec.rb +7 -0
- data/tasks/rspec.rake +21 -0
- metadata +202 -8
@@ -0,0 +1,93 @@
|
|
1
|
+
" Vim syntax file
|
2
|
+
" Language: Sass (Syntactically Awesome StyleSheets)
|
3
|
+
" Maintainer: Dmitry A. Ilyashevich <dmitry.ilyashevich@gmail.com>
|
4
|
+
" License: This file can be redistribued and/or modified under the same terms
|
5
|
+
" as Vim itself.
|
6
|
+
"
|
7
|
+
" Version: 0.1
|
8
|
+
" Last Change: 2007-08-04
|
9
|
+
" Notes: Last synced with Haml 1.7
|
10
|
+
" Based on css.vim
|
11
|
+
" TODO: tag names, attributes and values control
|
12
|
+
|
13
|
+
" For version 5.x: Clear all syntax items
|
14
|
+
" For version 6.x: Quit when a syntax file was already loaded
|
15
|
+
if version < 600
|
16
|
+
syntax clear
|
17
|
+
elseif exists("b:current_syntax")
|
18
|
+
finish
|
19
|
+
endif
|
20
|
+
|
21
|
+
if !exists("main_syntax")
|
22
|
+
let main_syntax = 'sass'
|
23
|
+
endif
|
24
|
+
|
25
|
+
syn region sassAttributes start="^\s*:[a-zA-Z0-9\-_]\+" end="$" oneline keepend contains=sassAttributesIncluded,sassValue,sassConstantIncluded,sassColour,sassValueInteger,sassValueNumber,sassValueLength,sassValueAngle,sassValueTime,sassValueFrequency
|
26
|
+
syn match sassAttributesIncluded contained ":[a-zA-Z0-9\-_]\+"
|
27
|
+
|
28
|
+
syn region sassConstant start="^\s*![a-zA-Z0-9\-_]\+" end="$" oneline keepend contains=sassConstantIncluded,sassColour,sassStringQQ,sassStringQ,sassValueInteger,sassValueNumber,sassValueLength,sassValueAngle,sassValueTime,sassValueFrequency
|
29
|
+
syn match sassConstantIncluded contained "![a-zA-Z0-9\-_]\+"
|
30
|
+
|
31
|
+
syn match sassColour contained "#[0-9a-fA-F]\{3\}"
|
32
|
+
syn match sassColour contained "#[0-9a-fA-F]\{6\}"
|
33
|
+
|
34
|
+
syn match sassValue contained " [a-zA-Z0-9-_\"]\+" contains=sassStringQQ,sassStringQ
|
35
|
+
|
36
|
+
syn region sassSelector start="^\s*[\.\#]\{0,1\}[a-zA-Z0-9\-_]\+" end="$" oneline keepend contains=sassSelectorIncluded
|
37
|
+
syn match sassSelectorIncluded contained "[\.\#][a-zA-Z0-9\-_]\+"
|
38
|
+
|
39
|
+
syn match sassValueInteger contained "[-+]\=\d\+"
|
40
|
+
syn match sassValueNumber contained "[-+]\=\d\+\(\.\d*\)\="
|
41
|
+
syn match sassValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
|
42
|
+
syn match sassValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
|
43
|
+
syn match sassValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
|
44
|
+
syn match sassValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
|
45
|
+
|
46
|
+
syn match sassUnicodeEscape "\\\x\{1,6}\s\?"
|
47
|
+
syn match sassSpecialCharQQ contained +\\"+
|
48
|
+
syn match sassSpecialCharQ contained +\\'+
|
49
|
+
syn region sassStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=sassUnicodeEscape,sassSpecialCharQQ
|
50
|
+
syn region sassStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=sassUnicodeEscape,sassSpecialCharQ
|
51
|
+
|
52
|
+
syn match sassComment "\s*//.*$" contains=@Spell,sassTodo
|
53
|
+
syn keyword sassTodo TODO FIXME XXX contained
|
54
|
+
|
55
|
+
" Define the default highlighting.
|
56
|
+
" For version 5.7 and earlier: only when not done already
|
57
|
+
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
58
|
+
if version >= 508 || !exists("did_haml_syntax_inits")
|
59
|
+
if version < 508
|
60
|
+
let did_haml_syntax_inits = 1
|
61
|
+
command -nargs=+ HiLink hi link <args>
|
62
|
+
else
|
63
|
+
command -nargs=+ HiLink hi def link <args>
|
64
|
+
endif
|
65
|
+
|
66
|
+
HiLink sassSelector Statement
|
67
|
+
HiLink sassSelectorIncluded Statement
|
68
|
+
HiLink sassAttributesIncluded Type
|
69
|
+
HiLink sassValue Normal
|
70
|
+
|
71
|
+
HiLink sassConstantIncluded Constant
|
72
|
+
" HiLink sassConstant Constant
|
73
|
+
HiLink sassColour Constant
|
74
|
+
HiLink sassNumber Number
|
75
|
+
|
76
|
+
HiLink sassStringQQ sassStringQ
|
77
|
+
HiLink sassStringQ String
|
78
|
+
HiLink sassUnicodeEscape sassSpecialCharQ
|
79
|
+
HiLink sassSpecialCharQQ sassSpecialCharQ
|
80
|
+
HiLink sassSpecialCharQ String
|
81
|
+
|
82
|
+
HiLink sassComment Comment
|
83
|
+
HiLink sassTodo Todo
|
84
|
+
|
85
|
+
delcommand HiLink
|
86
|
+
endif
|
87
|
+
let b:current_syntax = "sass"
|
88
|
+
|
89
|
+
if main_syntax == 'sass'
|
90
|
+
unlet main_syntax
|
91
|
+
endif
|
92
|
+
|
93
|
+
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
|
data/lib/dotfiles/vimrc
ADDED
@@ -0,0 +1,269 @@
|
|
1
|
+
set nocompatible "Put in VIM mode, not vi...standard vi is too old-school, even for me
|
2
|
+
|
3
|
+
" This is a hacked method of determining the platform we are on...
|
4
|
+
let s:platform = system("uname")
|
5
|
+
let s:on_linux = s:platform =~? "linux"
|
6
|
+
let s:on_mac = has('macunix') || s:platform =~? 'Darwin'
|
7
|
+
|
8
|
+
"-------- Terminal setup
|
9
|
+
set term=xterm-256color
|
10
|
+
|
11
|
+
set t_Co=256 "Set terminal to 256 colors
|
12
|
+
|
13
|
+
"-------- Syntax & coloring
|
14
|
+
syntax on "Turns on syntax highlighting...SHOULD BE AFTER 't_Co' & 'term' declarations
|
15
|
+
"colorscheme railscasts "disabling until I get it linux-compatible
|
16
|
+
colorscheme rubyblue
|
17
|
+
|
18
|
+
|
19
|
+
" Some of this was taken from or added to from the 'vimrc_example.vim' file
|
20
|
+
" shipped with OS X
|
21
|
+
" Credit:
|
22
|
+
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
23
|
+
" Last change: 2008 Jul 02
|
24
|
+
"
|
25
|
+
if has("autocmd")
|
26
|
+
" Enable file type detection.
|
27
|
+
" Use the default filetype settings, so that mail gets 'tw' set to 72,
|
28
|
+
" 'cindent' is on in C files, etc.
|
29
|
+
" Also load indent files, to automatically do language-dependent indenting.
|
30
|
+
filetype on "Turns on file type detection
|
31
|
+
filetype indent on "Enable loading the plugin files for specific file types
|
32
|
+
filetype plugin on "Allow plugins to do fancy things with file-type detection
|
33
|
+
set fileformats=unix,dos,mac "This gives the end-of-line (<EOL>) formats that will be used/tried
|
34
|
+
|
35
|
+
" For all text files set 'textwidth' to 78 characters.
|
36
|
+
autocmd FileType text setlocal textwidth=90
|
37
|
+
|
38
|
+
augroup mkd
|
39
|
+
autocmd BufRead *.mkd set ai formatoptions=tcroqn2 comments=n:>
|
40
|
+
autocmd BufRead *.markdown set ai formatoptions=tcroqn2 comments=n:>
|
41
|
+
augroup END
|
42
|
+
|
43
|
+
" Put these in an autocmd group, so that we can delete them easily.
|
44
|
+
augroup vimrcEx
|
45
|
+
au!
|
46
|
+
|
47
|
+
" For all text files set 'textwidth' to 78 characters.
|
48
|
+
autocmd FileType text setlocal textwidth=78
|
49
|
+
|
50
|
+
" When editing a file, always jump to the last known cursor position.
|
51
|
+
" Don't do it when the position is invalid or when inside an event handler
|
52
|
+
" (happens when dropping a file on gvim).
|
53
|
+
" Also don't do it when the mark is in the first line, that is the default
|
54
|
+
" position when opening a file.
|
55
|
+
autocmd BufReadPost *
|
56
|
+
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
57
|
+
\ exe "normal! g`\"" |
|
58
|
+
\ endif
|
59
|
+
|
60
|
+
augroup END
|
61
|
+
endif " has("audocmd")
|
62
|
+
|
63
|
+
"Arrow-key mappings, for the 'unconverted' ;-)
|
64
|
+
if s:on_linux
|
65
|
+
" Up
|
66
|
+
set t_ku=OA
|
67
|
+
" Down
|
68
|
+
set t_kd=OB
|
69
|
+
" Right
|
70
|
+
set t_kr=OC
|
71
|
+
" Left
|
72
|
+
set t_kl=OD
|
73
|
+
elseif s:on_mac
|
74
|
+
" Up
|
75
|
+
set t_ku=[A
|
76
|
+
" Down
|
77
|
+
set t_kd=[B
|
78
|
+
" Right
|
79
|
+
set t_kr=[C
|
80
|
+
" Left
|
81
|
+
set t_kl=[D
|
82
|
+
endif
|
83
|
+
|
84
|
+
|
85
|
+
"-------- Folding
|
86
|
+
set foldmethod=syntax "Syntax highlighting items specify folds
|
87
|
+
|
88
|
+
"Not sure how I feel about these two yet
|
89
|
+
set foldopen=all "Auto-opens folds on all possible 'autocmds'
|
90
|
+
set foldclose=all "Auto-closes folds on all possible autocmds
|
91
|
+
|
92
|
+
set foldtext=getline(v:foldstart) "Set text displayed in "foldbar" when code is folded
|
93
|
+
set fillchars=fold:\ "Fill foldline "empty space" with...empty spaces (instead of default "-" character)
|
94
|
+
set foldcolumn=1 "Sets width of "foldcolumn" on left of screen used to display foldstatus indicators
|
95
|
+
set foldlevel=1 "Folds below 1-level. Class/Module-level definitions expanded...all others folded by default
|
96
|
+
|
97
|
+
"-------- Tabs
|
98
|
+
set softtabstop=2 "Tabs are 2-spaces...using instead of 'tabstop' as per:
|
99
|
+
" 'Tabs should always be displayed as mod-8 horizontal spaces so that your
|
100
|
+
" code looks the same in less/more as in your editor; not everyone is going to
|
101
|
+
" be using the same tab width setting as you, so using ?set sts? to get what you
|
102
|
+
" want for indentation is a much better strategy and will let other people work
|
103
|
+
" with your code easily, too.'
|
104
|
+
" -Comment by 'Jeremy' in" Jamis Buck's 'VIM Follow-up'
|
105
|
+
" article, http://bit.ly/BRG8
|
106
|
+
|
107
|
+
set shiftwidth=2 "Number of spaces to use for each step of (auto)indent
|
108
|
+
set expandtab "Replace "tab" characters with the number of spaces defined
|
109
|
+
" by "tabstop" (aka: "soft tabs")
|
110
|
+
|
111
|
+
set smarttab "When on, a <Tab> in front of a line inserts blanks according to 'shiftwidth'. 'tabstop'
|
112
|
+
" or 'softtabstop' is used in other places
|
113
|
+
|
114
|
+
set cindent "Get the amount of indent for line according the C indenting rules
|
115
|
+
set cpoptions-=J "Put 1 space character after a line ending with a "." when
|
116
|
+
" joining lines (with Shift-J). Without this option, 2-spaces would be retained
|
117
|
+
|
118
|
+
"-------- Window Preferences
|
119
|
+
set winminheight=0 "The minimal height of a window, when it's not the current window.
|
120
|
+
" Setting to zero windows will only display their
|
121
|
+
" associated 'status line
|
122
|
+
|
123
|
+
"-------- Searching
|
124
|
+
set hlsearch "When there is a previous search pattern, highlight all its matches.
|
125
|
+
set ignorecase "The case of normal letters is ignored when searching
|
126
|
+
set smartcase "Override the 'ignorecase' option if the search pattern contains upper
|
127
|
+
" case characters. Essentially, this makes searches with
|
128
|
+
" capital letters case-sensitive. If you're going to go
|
129
|
+
" to all the effort of hitting both <Shift> AND a
|
130
|
+
" letter, your search tool better take it into
|
131
|
+
" consideration.
|
132
|
+
|
133
|
+
set list "Display unprintable characters, such as
|
134
|
+
" trailing spaces and tabs (Depends on
|
135
|
+
" "listchars" settings).
|
136
|
+
set listchars=tab:>-,trail:. "Strings to use in 'list' mode.
|
137
|
+
" trail:c Character to show for trailing spaces. When omitted,
|
138
|
+
" trailing spaces are blank. In this
|
139
|
+
" case, a trailing "." will be added.
|
140
|
+
" This is used to identify people who use
|
141
|
+
" IDE's.
|
142
|
+
" tab:xy Two characters to be used to show a Tab. The first
|
143
|
+
" char is used once. The second char is repeated to
|
144
|
+
" fill the space that the Tab normally occupies.
|
145
|
+
" "tab:>-" will show a Tab that takes four spaces as
|
146
|
+
" ">---". When omitted, a Tab is show as ^I.
|
147
|
+
|
148
|
+
set confirm "Always confirms before performing an operation which
|
149
|
+
" may produce undesireable consequences (...within reason).
|
150
|
+
" An example would be saving a file before exiting with
|
151
|
+
" a ":q"
|
152
|
+
|
153
|
+
|
154
|
+
set vb "Use visual bell instead of beeping when errors/messages
|
155
|
+
" occur. If _no_ bells or visual feedback you can
|
156
|
+
" replace this setting with:
|
157
|
+
" :set vb t_vb=
|
158
|
+
|
159
|
+
"-------- Misc
|
160
|
+
set scrolloff=3 "Put 3-lines of padding when scrolling up/down off screen to give context
|
161
|
+
|
162
|
+
if has('mouse')
|
163
|
+
set mouse=a "Enables the use of the mouse...even in the terminal
|
164
|
+
endif
|
165
|
+
|
166
|
+
set ruler "Displays line number, column number, and %-location of
|
167
|
+
" cursor in file (on bottom of screen)
|
168
|
+
|
169
|
+
set number "Displays line numbers on the sidebar
|
170
|
+
|
171
|
+
set showmatch "When a bracket is inserted, briefly jump to the matching one.
|
172
|
+
set matchtime=1 "Tenths of a second to show the matching paren, when 'showmatch' is set
|
173
|
+
set backspace=indent,eol,start "Allows backspacing over autoindents and line breaks, allows deletion from before the point
|
174
|
+
" where the current insertion began
|
175
|
+
|
176
|
+
set cursorline "Highlights the line the cursor is currently on.
|
177
|
+
"set cursorcolumn "Highlights the column the cursor is currently in. (Sometimes) Useful when checking
|
178
|
+
" indentation. Here mostly for personal reference
|
179
|
+
|
180
|
+
|
181
|
+
"-------- Mappings
|
182
|
+
"Set the map leader...this is the default character, just put it in here
|
183
|
+
" to be explicit. Mappings which include "<leader>" would start with this
|
184
|
+
" charachter. For example. "map <leader>f <some_command>" would create a mapping for
|
185
|
+
" \-f (backslash-f) to '<some_command>'
|
186
|
+
let mapleader='\'
|
187
|
+
|
188
|
+
"Switch to the next "higher" windows with <C-K>
|
189
|
+
noremap <C-J> <C-W>j<C-W>_
|
190
|
+
|
191
|
+
"Switch to the next "higher" windows with <C-J>
|
192
|
+
noremap <C-K> <C-W>k<C-W>_
|
193
|
+
|
194
|
+
"Hide the highlighted search results with "?"
|
195
|
+
noremap ? :nohlsearch<CR>
|
196
|
+
|
197
|
+
"Set up TextMate-like cmd-T file searching using <leader>-f ('backslash'-f)
|
198
|
+
noremap <leader>f :FuzzyFinderTextMate<CR>
|
199
|
+
|
200
|
+
"Toggle NERDTree window using F3 key
|
201
|
+
noremap <F3> :NERDTreeToggle<CR>
|
202
|
+
noremap <C-d> :NERDTreeToggle<CR>
|
203
|
+
|
204
|
+
|
205
|
+
"-------- FuzzyFinderTextmate plugin settings
|
206
|
+
"Limit the number of matches returned to 50 in FuzzyFinder searches
|
207
|
+
let g:fuzzy_matching_limit='50'
|
208
|
+
|
209
|
+
"Ignore the following glob file patters in FuzzyFinder searches
|
210
|
+
let g:fuzzy_ignore='*.log'
|
211
|
+
|
212
|
+
" If we are in a Rails app, just search across the app, lib, config, spec, and test
|
213
|
+
" directories
|
214
|
+
if filereadable(expand('./vendor'))
|
215
|
+
let g:fuzzy_roots=['app', 'lib', 'config', 'spec', 'test']
|
216
|
+
endif
|
217
|
+
|
218
|
+
"-------- Most Recently Used File (MRU) plugin mapping & config
|
219
|
+
"Open Most Recently Used window with Ctl+o
|
220
|
+
noremap <C-o> :MRU<CR>
|
221
|
+
|
222
|
+
"Set max entries in MRU option window
|
223
|
+
let MRU_Max_Entries = 30
|
224
|
+
|
225
|
+
"Gist (http://gist.github.com) integration
|
226
|
+
" Gist plugin options. Be sure to add a 'github'
|
227
|
+
" section to your global .gitconfig file.
|
228
|
+
" Example of .gitconfig section:
|
229
|
+
" [github]
|
230
|
+
" user = <your username>
|
231
|
+
" token = <your account token>
|
232
|
+
" Set up clipboard to use OS X's 'pbcopy' command
|
233
|
+
if s:on_mac
|
234
|
+
let g:gist_clip_command = 'pbcopy'
|
235
|
+
elseif s:on_linux
|
236
|
+
let g:gist_clip_command = 'xclip -selection clipboard'
|
237
|
+
endif
|
238
|
+
|
239
|
+
|
240
|
+
"-------- Tab mappings
|
241
|
+
"Close tabs with tc
|
242
|
+
noremap tc :tabclose<CR>
|
243
|
+
|
244
|
+
"Create new tab with Ctl+t
|
245
|
+
noremap tt :tabnew<CR>
|
246
|
+
|
247
|
+
|
248
|
+
"-------- Autocommands
|
249
|
+
autocmd! BufWritePost .vimrc source %
|
250
|
+
|
251
|
+
"-------- Abbreviations
|
252
|
+
"Some lorem ispum text
|
253
|
+
abbreviate lorem Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum bibendum hendrerit ante. Phasellus vitae enim id erat fringilla fermentum. Pellentesque tellus. Cras eros magna, pretium ac, tincidunt id, tincidunt eget, mi. Fusce tristique sollicitudin eros. Nam augue nisi, volutpat non, cursus a, aliquam ac, magna. Sed rhoncus, ipsum vitae semper ultrices, ante nunc faucibus nunc, sed iaculis elit metus condimentum turpis. Suspendisse suscipit. Nulla eget nulla. Aliquam varius sem quis tortor. Proin eu dolor a lacus lobortis luctus. Phasellus interdum. Maecenas quis sem. Nulla facilisi.
|
254
|
+
|
255
|
+
"Typing 'hh' will give you a '=>'
|
256
|
+
abbreviate hh =>
|
257
|
+
|
258
|
+
"-------- Local Overrides
|
259
|
+
"If you have options you'd like to override locally for
|
260
|
+
"some reason (don't want to store something in a
|
261
|
+
"publicly-accessible repository, machine-specific settings, etc.),
|
262
|
+
"you can create a '.local_vimrc' file in your home directory
|
263
|
+
"(ie: ~/.local_vimrc) and it will be 'sourced' here and override
|
264
|
+
"any settings in this file.
|
265
|
+
"
|
266
|
+
"NOTE: YOU MAY NOT WANT TO ADD ANY LINES BELOW THIS
|
267
|
+
if filereadable(expand('~/.local_vimrc'))
|
268
|
+
source ~/.local_vimrc
|
269
|
+
end
|
data/lib/vixplode/cli.rb
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'optparse'
|
3
|
+
require 'highline'
|
4
|
+
require 'ftools'
|
5
|
+
|
6
|
+
module Vixplode
|
7
|
+
class CLI
|
8
|
+
def self.execute(stdout, arguments=[])
|
9
|
+
options = {
|
10
|
+
:path => '~'
|
11
|
+
}
|
12
|
+
mandatory_options = %w( )
|
13
|
+
|
14
|
+
parser = OptionParser.new do |opts|
|
15
|
+
opts.banner = <<-BANNER.gsub(/^ /,'')
|
16
|
+
This application is wonderful because...
|
17
|
+
|
18
|
+
Usage: #{File.basename($0)} [options]
|
19
|
+
|
20
|
+
Options are:
|
21
|
+
BANNER
|
22
|
+
opts.separator ""
|
23
|
+
opts.on("-p", "--path=PATH", String,
|
24
|
+
"This is a sample message.",
|
25
|
+
"For multiple lines, add more strings.",
|
26
|
+
"Default: ~") { |arg| options[:path] = arg }
|
27
|
+
opts.on("-h", "--help",
|
28
|
+
"Show this help message.") { stdout.puts opts; exit }
|
29
|
+
opts.parse!(arguments)
|
30
|
+
|
31
|
+
if mandatory_options && mandatory_options.find { |option| options[option.to_sym].nil? }
|
32
|
+
stdout.puts opts; exit
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
source_dir = File.expand_path(File.dirname(__FILE__) + "/../dotfiles")
|
37
|
+
destination_dir = File.expand_path("~")
|
38
|
+
backup_directory = File.expand_path("~/vixploder_backup/")
|
39
|
+
path = options[:path]
|
40
|
+
|
41
|
+
puts "Backing up current settings in case a restore is necessary..."
|
42
|
+
if File.exists?(backup_directory)
|
43
|
+
msg= "Directory #{backup_directory} already exists! Please move it and issue this command again."
|
44
|
+
#raise ArgumentError, msg
|
45
|
+
else
|
46
|
+
Dir.mkdir(backup_directory) unless File.exists?(backup_directory)
|
47
|
+
end
|
48
|
+
|
49
|
+
# copy current .vimrc file to ~/vixploder_vim_backups
|
50
|
+
["~/.vimrc", "~/.vim", "~/.gvimrc", "~/.aliases"].each do |file|
|
51
|
+
file_to_backup = File.expand_path(file)
|
52
|
+
puts "Attempting to back up '#{file_to_backup}' to '#{backup_directory}'"
|
53
|
+
if File.exists?(file_to_backup)
|
54
|
+
if File.symlink?(file_to_backup)
|
55
|
+
File.safe_unlink(file_to_backup) if File.symlink?(file_to_backup)
|
56
|
+
else
|
57
|
+
File.move file_to_backup, backup_directory, true
|
58
|
+
end
|
59
|
+
puts "Move of '#{file_to_backup}' to '#{backup_directory}' complete"
|
60
|
+
else
|
61
|
+
puts "No '#{file}' to back up."
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# symlink to included files
|
66
|
+
Dir.open(source_dir).each do |f|
|
67
|
+
next if f == ".." || f == "."
|
68
|
+
File.safe_unlink("#{destination_dir}/.#{f}") if File.symlink?("#{destination_dir}/.#{f}")
|
69
|
+
File.symlink("#{source_dir}/#{f}", "#{destination_dir}/.#{f}")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
data/lib/vixploder.rb
ADDED
data/script/console
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/console
|
3
|
+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
+
|
5
|
+
libs = " -r irb/completion"
|
6
|
+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/vixploder.rb'}"
|
9
|
+
puts "Loading dev_configurator gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|