utils 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
data/TODO CHANGED
@@ -1,3 +1,8 @@
1
1
  - A default for searched/discovered files should be configurable, and be
2
2
  modifiable via command line options.
3
3
  - Mark trailing spaces in vim
4
+ - When finding many places in the same file only jump to the first occurence if
5
+ a cli option is given.
6
+ - Make it configurable to find the same file many times via different symlinks
7
+ or to find it only once.
8
+ - Stop finder from going in infinite symlink circles
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.19
1
+ 0.0.20
data/bin/search CHANGED
@@ -10,7 +10,7 @@ def edit_files(pattern, pathes)
10
10
  editor = Utils::Editor.new do |config|
11
11
  config.wait = true
12
12
  end
13
- editor.edit_remote_send("<ESC>/#{pattern}<CR>")
13
+ editor.edit_remote_send("<ESC>/#{pattern.source}<CR>")
14
14
  for path in pathes
15
15
  STDERR.puts "Edit #{path}"
16
16
  editor.edit(path)
@@ -3,7 +3,6 @@
3
3
  " General Settings
4
4
  "set autochdir
5
5
  "set wildmode=list:full
6
- "set swapsync=
7
6
  set autoindent
8
7
  set autowrite
9
8
  set backspace=indent,eol,start
@@ -205,21 +204,23 @@ map <C-k> <C-W>k<C-W>_
205
204
  map <C-l> <ESC>:bn<CR>
206
205
  map <C-h> <ESC>:bp<CR>
207
206
  " Configure navigation keys
208
- " noremap <Up> <Nop>
209
- " noremap <Down> <Nop>
210
- " noremap <Left> <Nop>
211
- " noremap <Right> <Nop>
212
- " noremap <Ins> <Nop>
213
- " noremap <End> <Nop>
214
- " noremap <Home> <Nop>
215
- " noremap <End> <Nop>
216
- " noremap <PageUp> <Nop>
217
- " noremap <PageDown> <Nop>
218
- cnoremap <C-A> <Home>
219
- cnoremap <C-F> <Right>
220
- cnoremap <C-B> <Left>
221
- cnoremap <Esc>b <S-Left>
222
- cnoremap <Esc>f <S-Right>
207
+ noremap <Up> <Nop>
208
+ noremap <Down> <Nop>
209
+ noremap <Left> <Nop>
210
+ noremap <Right> <Nop>
211
+ noremap <Ins> <Nop>
212
+ noremap <End> <Nop>
213
+ noremap <Home> <Nop>
214
+ noremap <End> <Nop>
215
+ noremap <PageUp> <Nop>
216
+ noremap <PageDown> <Nop>
217
+ cnoremap <C-0> <Home>
218
+ cnoremap <C-^> <Home>
219
+ cnoremap <C-$> <End>
220
+ cnoremap <C-H> <Left>
221
+ cnoremap <C-L> <Right>
222
+ cnoremap <C-K> <Up>
223
+ cnoremap <C-J> <Down>
223
224
  vnoremap < <gv
224
225
  vnoremap > >gv
225
226
  " Marks
data/lib/utils/editor.rb CHANGED
@@ -66,7 +66,7 @@ module Utils
66
66
  else
67
67
  edit_file(filename)
68
68
  end
69
- else
69
+ elsif !filenames.empty?
70
70
  edit_file(*filenames)
71
71
  end
72
72
  end
data/lib/utils/grepper.rb CHANGED
@@ -107,8 +107,11 @@ class Utils::Grepper
107
107
  @queue and @queue << line
108
108
  if @args['l']
109
109
  @output << @filename
110
- elsif @args['L'] or @args['e']
110
+ elsif @args['L']
111
111
  @output << "#{@filename}:#{file.lineno}"
112
+ elsif @args['e']
113
+ @output << "#{@filename}:#{file.lineno}"
114
+ break
112
115
  else
113
116
  @output << red("#{@filename}:#{file.lineno}")
114
117
  if @args['B'] or @args['C']
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.0.19'
3
+ VERSION = '0.0.20'
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,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "utils"
5
- s.version = "0.0.19"
5
+ s.version = "0.0.20"
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 = "2011-08-29"
9
+ s.date = "2011-08-31"
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", "discover", "edit", "edit_wait", "errf", "git-empty", "myex", "number_files", "path", "probe", "same_files", "search", "sedit", "sshscreen", "strip_spaces", "unquarantine_apps", "untest", "utils-install-config", "vacuum_firefox_sqlite", "xmp"]
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.19
4
+ version: 0.0.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-29 00:00:00.000000000Z
12
+ date: 2011-08-31 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gem_hadar
16
- requirement: &2153168560 !ruby/object:Gem::Requirement
16
+ requirement: &2165412080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.0.11
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2153168560
24
+ version_requirements: *2165412080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spruz
27
- requirement: &2153168120 !ruby/object:Gem::Requirement
27
+ requirement: &2165411640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.2.13
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2153168120
35
+ version_requirements: *2165411640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: term-ansicolor
38
- requirement: &2153167700 !ruby/object:Gem::Requirement
38
+ requirement: &2165411220 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2153167700
46
+ version_requirements: *2165411220
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: dslkit
49
- requirement: &2153167280 !ruby/object:Gem::Requirement
49
+ requirement: &2165410800 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0.2'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2153167280
57
+ version_requirements: *2165410800
58
58
  description: This ruby gem provides some useful command line utilities
59
59
  email: flori@ping.de
60
60
  executables: