Преглед на файлове

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

Lucas Stadler преди 14 години
родител
ревизия
fcda95eca0
променени са 3 файла, в които са добавени 20 реда и са изтрити 8 реда
  1. 13 4
      .gitconfig
  2. 3 3
      .irbrc
  3. 4 1
      .vimrc

+ 13 - 4
.gitconfig

@ -3,11 +3,20 @@
3 3
	email = mi.au@papill0n.org
4 4
[core]
5 5
	editor = vi
6
[diff]
7
	color = true
8 6
[merge]
9 7
	conflictstyle = diff3
10
[status]
11
	color = true
12 8
[alias]
13 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,15 +13,15 @@ class StoredHistory
13 13
    @history = hist_file
14 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 17
    @last_history.each do |line|
18 18
      @src.push line
19 19
    end
20 20
    
21 21
    at_exit do
22
      unless @last_history == @src.to_a.uniq
22
      unless @last_history == @src.to_a.reverse.uniq.reverse
23 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 25
      end
26 26
    end
27 27
  end

+ 4 - 1
.vimrc

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