Просмотр исходного кода

More git shortcuts, IRB fixes and getting farther with vim.

Lucas Stadler лет назад: 14
Родитель
Сommit
fcda95eca0
3 измененных файлов с 20 добавлено и 8 удалено
  1. 13 4
      .gitconfig
  2. 3 3
      .irbrc
  3. 4 1
      .vimrc

+ 13 - 4
.gitconfig

3
	email = mi.au@papill0n.org
3
	email = mi.au@papill0n.org
4
[core]
4
[core]
5
	editor = vi
5
	editor = vi
6
[diff]
7
	color = true
8
[merge]
6
[merge]
9
	conflictstyle = diff3
7
	conflictstyle = diff3
10
[status]
11
	color = true
12
[alias]
8
[alias]
13
	st = status --short --branch
9
	st = status --short --branch
10
	lol = log --pretty=oneline --abbrev-commit --graph --decorate
11
	ba = branch -a
12
[format]
13
	pretty = %C(magenta)%h%Creset %Cgreen[%cr]%Creset (%an) %s
14
[color]
15
	ui = auto
16
# Some shortcuts
17
[url "git://github.com/"]
18
	insteadOf = hub:
19
[url "git@github.com:"]
20
	insteadOf = gh:
21
[url "git@heroku.com:"]
22
	insteadOf = heroku:

+ 3 - 3
.irbrc

13
    @history = hist_file
13
    @history = hist_file
14
    @src     = hist_src
14
    @src     = hist_src
15
    
15
    
16
    @last_history = File.read(@history).lines.map &:strip rescue []
16
    @last_history = File.read(@history).lines.map(&:strip) rescue []
17
    @last_history.each do |line|
17
    @last_history.each do |line|
18
      @src.push line
18
      @src.push line
19
    end
19
    end
20
    
20
    
21
    at_exit do
21
    at_exit do
22
      unless @last_history == @src.to_a.uniq
22
      unless @last_history == @src.to_a.reverse.uniq.reverse
23
        puts "Writing changed history back to #{@history}"
23
        puts "Writing changed history back to #{@history}"
24
        File.write @history, @src.to_a.uniq.reduce { |x,y| "#{x}\n#{y}" }
24
        File.write @history, @src.to_a.reverse.uniq.reverse.reduce { |x,y| "#{x}\n#{y}" }
25
      end
25
      end
26
    end
26
    end
27
  end
27
  end

+ 4 - 1
.vimrc

26
set backspace=indent,eol,start
26
set backspace=indent,eol,start
27
27
28
"""
28
"""
29
call pathogen#infect()
29
call pathogen#infect('~/t/vim/')
30
30
31
""" Mappin' stuff around a little bit (please :)
31
""" Mappin' stuff around a little bit (please :)
32
map q :quit<CR>
32
map q :quit<CR>
66
66
67
autocmd BufNewFile,BufRead *.arc set ft=lisp
67
autocmd BufNewFile,BufRead *.arc set ft=lisp
68
68
69
" Make folds a little more acceptable :)
70
highlight Folded ctermbg=255
71
69
" Local .vimrc files
72
" Local .vimrc files
70
if getcwd() != $HOME && filereadable('.vimrc')
73
if getcwd() != $HOME && filereadable('.vimrc')
71
	source .vimrc
74
	source .vimrc