utils 0.0.55 → 0.0.56

Sign up to get free protection for your applications and to get access to all the features.
@@ -183,7 +183,8 @@ map <leader>e :e <C-R>=substitute(expand("%:p:h") . "/", " ", "\\\\ ", "g")<CR>
183
183
  map <leader>t :tabe <C-R>=substitute(expand("%:p:h") . "/", " ", "\\\\ ", "g")<CR>
184
184
  map <leader>s :split <C-R>=substitute(expand("%:p:h") . "/", " ", "\\\\ ", "g")<CR>
185
185
  map <leader>c :cd <C-R>=substitute(expand("%:p:h") . "/", " ", "\\\\ ", "g")<CR>
186
- map <leader>K :%s/\([^:]\):\([^:'" ]\{1,\}\) *=>/\1\2:/g<CR>
186
+ map <leader>h :call Csymbolhash()<CR>
187
+ map <leader>H :%call Csymbolhash()<CR>
187
188
  map <leader>C :call Ccamelunderscore()<CR>
188
189
 
189
190
  " Switch of search highlighting
@@ -421,7 +422,7 @@ function! Cfind(...)
421
422
  set grepformat=%f
422
423
  set grepprg=discover
423
424
  let @/=args[0]
424
- silent exec "silent gr -a 'a-zA-Z0-9' -c -i " . args_string
425
+ silent execute "silent gr -a 'a-zA-Z0-9' -c -i " . args_string
425
426
  copen
426
427
  redraw!
427
428
  endfunction
@@ -439,19 +440,19 @@ function! Cgrep(...)
439
440
  set grepprg=search
440
441
  set hlsearch
441
442
  let @/=args[0]
442
- silent exec "silent gr -c -i " . args_string
443
+ silent execute "silent gr -c -i " . args_string
443
444
  copen
444
445
  redraw!
445
446
  endfunction
446
447
 
447
448
  function! Ctest(...)
448
- exec 'w'
449
+ execute 'w'
449
450
  if a:0 == 0
450
451
  let name = expand('<cword>')
451
452
  else
452
453
  let name = a:1
453
454
  end
454
- exec 'make ' . expand('%') . ' ' . name
455
+ execute 'make ' . expand('%') . ' ' . name
455
456
  endfunction
456
457
 
457
458
  function! Cclassify(...)
@@ -481,29 +482,40 @@ function! Cdeclassify(...)
481
482
  let args = copy(a:000)
482
483
  end
483
484
  let output = system("classify -s -d " . join(map(copy(args), 'shellescape(v:val)'), ' '))
484
- exec "normal a" . output
485
+ execute "normal a" . output
485
486
  endfunction
486
487
 
487
488
  function! Ccamelunderscore(...)
488
- exec 'w'
489
+ execute 'w'
489
490
  let name = expand('<cWORD>')
490
491
  let output = system('classify -t ' . name)
491
- exec "normal ciW" . output
492
+ execute "normal ciW" . output
493
+ endfunction
494
+
495
+ function! Csymbolhash() range
496
+ execute join([ 'silent ', a:firstline, ',', a:lastline, 's/\([^:]\):\([^:', "'", '" ]\{1,\}\) *=>/\1\2:/g' ])
492
497
  endfunction
493
498
 
494
499
  function! Ccreatetags()
495
- call system("bundle exec create_tags")
500
+ call system("bundle execute create_tags")
501
+ endfunction
502
+
503
+ function! PrintGivenRange() range
504
+ echo "firstline ".a:firstline." lastline ".a:lastline
505
+ " Do some more things
496
506
  endfunction
497
507
 
498
508
  comclear
499
509
  command -bar -nargs=1 OpenURL :!open <args>
500
- command -bar -nargs=* -complete=file Find :call Cfind(<f-args>)
501
- command -bar -nargs=* -complete=file Grep :call Cgrep(<f-args>)
502
- command -bar -nargs=* -complete=file Test :call Ctest(<f-args>)
503
- command -bar -nargs=* -complete=file Classify :call Cclassify(<f-args>)
504
- command -bar -nargs=* -complete=file PathClassify :call CpathClassify(<f-args>)
505
- command -bar -nargs=* -complete=file Declassify :call Cdeclassify(<f-args>)
506
- command Createtags :call Ccreatetags()
510
+ command -bar -nargs=* -complete=file Find call Cfind(<f-args>)
511
+ command -bar -nargs=* -complete=file Grep call Cgrep(<f-args>)
512
+ command -bar -nargs=* -complete=file Test call Ctest(<f-args>)
513
+ command -bar -nargs=* -complete=file Classify call Cclassify(<f-args>)
514
+ command -bar -nargs=* -complete=file PathClassify call CpathClassify(<f-args>)
515
+ command -bar -nargs=* -complete=file Declassify call Cdeclassify(<f-args>)
516
+ command Createtags call Ccreatetags()
517
+ command -range Symbolhash <line1>,<line2>call Csymbolhash()
518
+ command -range PrintGivenRange <line1>,<line2>call PrintGivenRange()
507
519
 
508
520
  function! Iexec(cmd)
509
521
  let output = system(a:cmd)
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.0.55'
3
+ VERSION = '0.0.56'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/utils.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "utils"
5
- s.version = "0.0.55"
5
+ s.version = "0.0.56"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Florian Frank"]
9
- s.date = "2012-09-25"
9
+ s.date = "2012-09-28"
10
10
  s.description = "This ruby gem provides some useful command line utilities"
11
11
  s.email = "flori@ping.de"
12
12
  s.executables = ["chroot-exec", "chroot-libs", "classify", "create_tags", "discover", "edit", "edit_wait", "enum", "errf", "git-empty", "myex", "number_files", "path", "probe", "same_files", "search", "sedit", "sshscreen", "strip_spaces", "unquarantine_apps", "untest", "utils-install-config", "utils-utilsrc", "vacuum_firefox_sqlite", "xmp"]
13
13
  s.extra_rdoc_files = ["README.rdoc", "lib/utils/config/config_file.rb", "lib/utils/config.rb", "lib/utils/editor.rb", "lib/utils/file_xt.rb", "lib/utils/finder.rb", "lib/utils/grepper.rb", "lib/utils/irb.rb", "lib/utils/md5.rb", "lib/utils/patterns.rb", "lib/utils/version.rb", "lib/utils.rb"]
14
- s.files = [".gitignore", "COPYING", "Gemfile", "README.rdoc", "Rakefile", "TODO", "VERSION", "bin/chroot-exec", "bin/chroot-libs", "bin/classify", "bin/create_tags", "bin/discover", "bin/edit", "bin/edit_wait", "bin/enum", "bin/errf", "bin/git-empty", "bin/myex", "bin/number_files", "bin/path", "bin/probe", "bin/same_files", "bin/search", "bin/sedit", "bin/sshscreen", "bin/strip_spaces", "bin/unquarantine_apps", "bin/untest", "bin/utils-install-config", "bin/utils-utilsrc", "bin/vacuum_firefox_sqlite", "bin/xmp", "lib/utils.rb", "lib/utils/config.rb", "lib/utils/config/config_file.rb", "lib/utils/config/gdb/asm", "lib/utils/config/gdb/ruby", "lib/utils/config/gdbinit", "lib/utils/config/irbrc", "lib/utils/config/rdebugrc", "lib/utils/config/rvmrc", "lib/utils/config/screenrc", "lib/utils/config/utilsrc", "lib/utils/config/vim/after/syntax/haml.vim", "lib/utils/config/vim/after/syntax/html.vim", "lib/utils/config/vim/autoload/Align.vim", "lib/utils/config/vim/autoload/AlignMaps.vim", "lib/utils/config/vim/autoload/rails.vim", "lib/utils/config/vim/autoload/rubycomplete.vim", "lib/utils/config/vim/autoload/sqlcomplete.vim", "lib/utils/config/vim/autoload/vimball.vim", "lib/utils/config/vim/colors/flori.vim", "lib/utils/config/vim/compiler/coffee.vim", "lib/utils/config/vim/compiler/eruby.vim", "lib/utils/config/vim/compiler/ruby.vim", "lib/utils/config/vim/compiler/rubyunit.vim", "lib/utils/config/vim/doc/coffee-script.txt", "lib/utils/config/vim/ftdetect/coffee.vim", "lib/utils/config/vim/ftdetect/eco.vim", "lib/utils/config/vim/ftdetect/ragel.vim", "lib/utils/config/vim/ftdetect/ruby.vim", "lib/utils/config/vim/ftdetect/slim.vim", "lib/utils/config/vim/ftplugin/coffee.vim", "lib/utils/config/vim/ftplugin/eruby.vim", "lib/utils/config/vim/ftplugin/ruby.vim", "lib/utils/config/vim/ftplugin/xml.vim", "lib/utils/config/vim/indent/IndentAnything_html.vim", "lib/utils/config/vim/indent/coffee.vim", "lib/utils/config/vim/indent/eruby.vim", "lib/utils/config/vim/indent/javascript.vim", "lib/utils/config/vim/indent/ruby.vim", "lib/utils/config/vim/indent/slim.vim", "lib/utils/config/vim/plugin/AlignMapsPlugin.vim", "lib/utils/config/vim/plugin/AlignPlugin.vim", "lib/utils/config/vim/plugin/Decho.vim", "lib/utils/config/vim/plugin/IndentAnything.vim", "lib/utils/config/vim/plugin/bufexplorer.vim", "lib/utils/config/vim/plugin/cecutil.vim", "lib/utils/config/vim/plugin/fugitive.vim", "lib/utils/config/vim/plugin/lusty-explorer.vim", "lib/utils/config/vim/plugin/rails.vim", "lib/utils/config/vim/plugin/rubyextra.vim", "lib/utils/config/vim/plugin/surround.vim", "lib/utils/config/vim/plugin/taglist.vim", "lib/utils/config/vim/plugin/test/IndentAnything/test.js", "lib/utils/config/vim/plugin/vimballPlugin.vim", "lib/utils/config/vim/syntax/Decho.vim", "lib/utils/config/vim/syntax/coffee.vim", "lib/utils/config/vim/syntax/eco.vim", "lib/utils/config/vim/syntax/eruby.vim", "lib/utils/config/vim/syntax/javascript.vim", "lib/utils/config/vim/syntax/ragel.vim", "lib/utils/config/vim/syntax/ruby.vim", "lib/utils/config/vim/syntax/slim.vim", "lib/utils/config/vimrc", "lib/utils/editor.rb", "lib/utils/file_xt.rb", "lib/utils/finder.rb", "lib/utils/grepper.rb", "lib/utils/irb.rb", "lib/utils/md5.rb", "lib/utils/patterns.rb", "lib/utils/version.rb", "utils.gemspec"]
14
+ s.files = [".gitignore", "COPYING", "Gemfile", "README.rdoc", "Rakefile", "TODO", "VERSION", "bin/chroot-exec", "bin/chroot-libs", "bin/classify", "bin/create_tags", "bin/discover", "bin/edit", "bin/edit_wait", "bin/enum", "bin/errf", "bin/git-empty", "bin/myex", "bin/number_files", "bin/path", "bin/probe", "bin/same_files", "bin/search", "bin/sedit", "bin/sshscreen", "bin/strip_spaces", "bin/unquarantine_apps", "bin/untest", "bin/utils-install-config", "bin/utils-utilsrc", "bin/vacuum_firefox_sqlite", "bin/xmp", "lib/utils.rb", "lib/utils/config.rb", "lib/utils/config/config_file.rb", "lib/utils/config/gdb/asm", "lib/utils/config/gdb/ruby", "lib/utils/config/gdbinit", "lib/utils/config/irbrc", "lib/utils/config/rdebugrc", "lib/utils/config/rvmrc", "lib/utils/config/screenrc", "lib/utils/config/utilsrc", "lib/utils/config/vim/after/syntax/haml.vim", "lib/utils/config/vim/after/syntax/html.vim", "lib/utils/config/vim/autoload/Align.vim", "lib/utils/config/vim/autoload/AlignMaps.vim", "lib/utils/config/vim/autoload/rails.vim", "lib/utils/config/vim/autoload/rubycomplete.vim", "lib/utils/config/vim/autoload/sqlcomplete.vim", "lib/utils/config/vim/autoload/vimball.vim", "lib/utils/config/vim/colors/flori.vim", "lib/utils/config/vim/compiler/coffee.vim", "lib/utils/config/vim/compiler/eruby.vim", "lib/utils/config/vim/compiler/ruby.vim", "lib/utils/config/vim/compiler/rubyunit.vim", "lib/utils/config/vim/doc/coffee-script.txt", "lib/utils/config/vim/doc/fugitive.txt", "lib/utils/config/vim/ftdetect/coffee.vim", "lib/utils/config/vim/ftdetect/eco.vim", "lib/utils/config/vim/ftdetect/ragel.vim", "lib/utils/config/vim/ftdetect/ruby.vim", "lib/utils/config/vim/ftdetect/slim.vim", "lib/utils/config/vim/ftplugin/coffee.vim", "lib/utils/config/vim/ftplugin/eruby.vim", "lib/utils/config/vim/ftplugin/ruby.vim", "lib/utils/config/vim/ftplugin/xml.vim", "lib/utils/config/vim/indent/IndentAnything_html.vim", "lib/utils/config/vim/indent/coffee.vim", "lib/utils/config/vim/indent/eruby.vim", "lib/utils/config/vim/indent/javascript.vim", "lib/utils/config/vim/indent/ruby.vim", "lib/utils/config/vim/indent/slim.vim", "lib/utils/config/vim/plugin/AlignMapsPlugin.vim", "lib/utils/config/vim/plugin/AlignPlugin.vim", "lib/utils/config/vim/plugin/Decho.vim", "lib/utils/config/vim/plugin/IndentAnything.vim", "lib/utils/config/vim/plugin/bufexplorer.vim", "lib/utils/config/vim/plugin/cecutil.vim", "lib/utils/config/vim/plugin/fugitive.vim", "lib/utils/config/vim/plugin/lusty-explorer.vim", "lib/utils/config/vim/plugin/rails.vim", "lib/utils/config/vim/plugin/rubyextra.vim", "lib/utils/config/vim/plugin/surround.vim", "lib/utils/config/vim/plugin/taglist.vim", "lib/utils/config/vim/plugin/test/IndentAnything/test.js", "lib/utils/config/vim/plugin/vimballPlugin.vim", "lib/utils/config/vim/syntax/Decho.vim", "lib/utils/config/vim/syntax/coffee.vim", "lib/utils/config/vim/syntax/eco.vim", "lib/utils/config/vim/syntax/eruby.vim", "lib/utils/config/vim/syntax/javascript.vim", "lib/utils/config/vim/syntax/ragel.vim", "lib/utils/config/vim/syntax/ruby.vim", "lib/utils/config/vim/syntax/slim.vim", "lib/utils/config/vimrc", "lib/utils/editor.rb", "lib/utils/file_xt.rb", "lib/utils/finder.rb", "lib/utils/grepper.rb", "lib/utils/irb.rb", "lib/utils/md5.rb", "lib/utils/patterns.rb", "lib/utils/version.rb", "utils.gemspec"]
15
15
  s.homepage = "http://github.com/flori/utils"
16
16
  s.rdoc_options = ["--title", "Utils - Some useful command line utilities", "--main", "README.rdoc"]
17
17
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.55
4
+ version: 0.0.56
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-25 00:00:00.000000000 Z
12
+ date: 2012-09-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gem_hadar
@@ -191,6 +191,7 @@ files:
191
191
  - lib/utils/config/vim/compiler/ruby.vim
192
192
  - lib/utils/config/vim/compiler/rubyunit.vim
193
193
  - lib/utils/config/vim/doc/coffee-script.txt
194
+ - lib/utils/config/vim/doc/fugitive.txt
194
195
  - lib/utils/config/vim/ftdetect/coffee.vim
195
196
  - lib/utils/config/vim/ftdetect/eco.vim
196
197
  - lib/utils/config/vim/ftdetect/ragel.vim
@@ -256,7 +257,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
256
257
  version: '0'
257
258
  segments:
258
259
  - 0
259
- hash: 147024533922954409
260
+ hash: -907059496113185001
260
261
  required_rubygems_version: !ruby/object:Gem::Requirement
261
262
  none: false
262
263
  requirements: