Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tons of changes

  • Loading branch information...
commit b06c589f0340e8cda98c96ac79a50c03c1ed46b2 1 parent 6bb0c67
Francisco J authored
View
9 Rakefile
@@ -9,6 +9,11 @@ namespace :install do
install("ruby")
end
+ desc "Misc dotfiles"
+ task :misc do
+ install("misc")
+ end
+
desc "Install git related dotfiles"
task :git => "generate:gitconfig" do
install("git")
@@ -22,11 +27,11 @@ namespace :install do
desc "Install shell related dotfiles"
task :shell do
install("zsh")
-
+
#install oh-my-zsh
system %Q{rm -rf "$HOME/.oh-my-zsh"}
system %Q{/usr/bin/env git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh}
-
+
#Add customization to oh-my-zsh
replace_file("oh-my-zsh/custom/functions.zsh", true)
replace_file("oh-my-zsh/custom/completion.zsh", true)
View
2  bash/bashrc
@@ -1 +1,3 @@
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
+
+PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
View
41 gvimrc/vimrc
@@ -6,7 +6,7 @@ set nocompatible
filetype off " Asked by Vundle
" ******************************************************************************
-" Setup vundler and plugins
+" Setup Vundle and plugins
" ******************************************************************************
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
@@ -59,13 +59,23 @@ Bundle 'tpope/vim-bundler'
" Testing stuff "{{{
Bundle 'xolox/vim-notes'
+Bundle 'jgdavey/tslime.vim'
+Bundle 'jgdavey/vim-turbux'
+Bundle 'tomtom/tlib_vim'
+Bundle 'tomtom/tselectbuffer_vim'
+Bundle 'vim-scripts/TailMinusF'
"}}}
" ******************************************************************************
" Make it pretty
" ******************************************************************************
-set background=light
+if !has('gui_running')
+ set background=light
+ let g:solarized_termtrans = 1
+endif
+
colorscheme solarized
+
set guioptions=ac
set number
set cursorline
@@ -89,7 +99,8 @@ let g:notes_directory = '~/Documents/Notes'
let g:easytags_cmd = "/usr/local/bin/ctags"
" Use solarized to highlight trailing white spaces
let g:solarized_hitrail = 1
-
+" Don't mess with yankring
+let g:yankring_manual_clipboard_check = 1
"}}}
" Filetype highlighting and indentation activation"{{{
@@ -140,6 +151,13 @@ set ignorecase
set smartcase
"}}}
+" Folding "{{{
+set foldmethod=indent
+set foldnestmax=10
+set nofoldenable
+set foldlevel=1
+"}}}
+
" Don't forget to set missing ft for Ruby files
au BufRead,BufNewFile {caprc,autotest,.caprc} set ft=ruby
@@ -162,9 +180,7 @@ autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
" Some extras to rails.vim "{{{
autocmd User Rails Rnavcommand steps features/step_definitions -glob=**/*
-autocmd User Rails Rnavcommand routes config -glob=*.* -suffix= -default=routes.rb
-autocmd User Rails Rnavcommand initializer config/initializers -glob=**/*
-autocmd User Rails Rnavcommand factories spec test -glob=**/* -default=factories
+autocmd User Rails Rnavcommand factories spec test -glob=factories/* -default=factories
"}}}
" ******************************************************************************
" Some custom key mapping
@@ -177,12 +193,15 @@ map <silent> <F2> :FixWhitespace<CR>
map <silent> ,n :noh<CR>
nnoremap <silent> ,<space> :NERDTreeToggle<CR>
noremap ,a :Ack<space>
-map <Leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
-map <Leader>te :tabe <C-R>=expand("%:p:h") . "/" <CR>
+map ,e :e <C-R>=expand("%:p:h") . "/" <CR>
+map ,te :tabe <C-R>=expand("%:p:h") . "/" <CR>
+map ,v <C-w>r
+map ,s <C-w>s
+nmap Q gqq
"}}}
" VIMRC mappings"{{{
-nmap <silent> ,ev :e $MYVIMRC
-nmap <silent> ,sv :so $MYVIMRC
+nmap <silent> ,,ev :e $MYVIMRC
+nmap <silent> ,,sv :so $MYVIMRC
"}}}
" Code indenting"{{{
imap ,f <Esc> mmgg=G`m^
@@ -207,6 +226,8 @@ nmap <C-Left> <C-W><<C-W><
nmap <C-Right> <C-W>><C-W>>
nmap <C-Up> <C-W>+<C-W>+
nmap <C-Down> <C-W>-<C-W>-
+noremap ,b :TSelectBuffer<CR>
+inoremap ,b <C-o>:TSelectBuffer<CR>
"}}}
" Tabularize mappings"{{{
nmap <silent> ,a= :Tabularize /=<CR>
View
38 misc/tmux
@@ -0,0 +1,38 @@
+set -g default-terminal screen-256color
+bind R source-file ~/.tmux.conf \; display-message " Config reloaded..."
+
+set -g mode-keys vi
+unbind [
+bind Escape copy-mode
+unbind p
+bind p paste-buffer
+bind-key -t vi-copy 'v' begin-selection
+bind-key -t vi-copy 'y' copy-selection
+
+# Status colors
+set -g status-bg black
+set -g status-fg white
+set -g status-left '#[fg=green]#H'
+set-window-option -g window-status-current-bg red
+
+# Right status
+set -g status-right '#[fg=yelow]#(uptime | cut -d ":" -f4-)'
+
+# Activity monitor
+setw -g monitor-activity on
+set -g visual-activity on
+# Don't rename the windows
+setw -g automatic-rename off
+
+# Set movement keys as in Vim
+unbind h
+bind h select-pane -L
+unbind j
+bind j select-pane -D
+unbind k
+bind k select-pane -U
+unbind l
+bind l select-pane -R
+
+# Go to last selected window
+bind-key C-a last-window
View
22 oh-my-zsh/custom/functions.zsh
@@ -1,29 +1,29 @@
function c(){
- cd /projects/$1;
+ cd /projects/$1;
}
function v(){
- cd /projects/$1;
+ cd /projects/$1;
mvim;
}
function h(){
- cd ~/$1;
+ cd ~/$1;
}
# Completion functions
function _rake_tasks_completion(){
- if [ -f Rakefile ]; then
- recent=`last_modified .rake_tasks~ Rakefile **/*.rake`
- if [[ $recent != '.rake_tasks~' ]]; then
- rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~
- fi
- compadd `cat .rake_tasks~`
- fi
+ if [ -f Rakefile ]; then
+ recent=`last_modified .rake_tasks~ Rakefile **/*.rake`
+ if [[ $recent != '.rake_tasks~' ]]; then
+ rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~
+ fi
+ compadd `cat .rake_tasks~`
+ fi
}
function last_modified(){
- ls -t $* 2> /dev/null | head -n 1
+ ls -t $* 2> /dev/null | head -n 1
}
View
24 others/config/schedule.rb
@@ -0,0 +1,24 @@
+# Use this file to easily define all of your cron jobs.
+#
+# It's helpful, but not entirely necessary to understand cron before proceeding.
+# http://en.wikipedia.org/wiki/Cron
+
+# Example:
+#
+# set :output, "/path/to/my/cron_log.log"
+#
+# every 2.hours do
+# command "/usr/bin/some_great_command"
+# runner "MyModel.some_method"
+# rake "some:great:rake:task"
+# end
+#
+# every 4.days do
+# runner "AnotherModel.prune_old_records"
+# end
+
+# Learn more: http://github.com/javan/whenever
+
+every 1.day, at: '15:00' do
+ command "logrotate --state=/tmp/logrotate.state /projects/dot-files/others/logrotate.conf"
+end
View
6 others/logrotate.conf
@@ -0,0 +1,6 @@
+/projects/*/log/*.log {
+ daily
+ missingok
+ rotate 2
+ copytruncate
+}
View
14 ruby/irbrc
@@ -1,9 +1,9 @@
#!/usr/bin/ruby
-require 'rubygems'
-require 'pry'
-
-# Use pry for the console if it exists
-Pry.start
-
-exit
+# require 'rubygems'
+# require 'pry'
+#
+# # Use pry for the console if it exists
+# Pry.start
+#
+# exit
View
4 zsh/zshrc
@@ -33,7 +33,7 @@ alias annotate="annotate --exclude tests,fixtures --position after --show-indexe
alias be="bundle exec"
alias rst="touch tmp/restart.txt"
alias git="hub"
-alias cu='cucumber'
+alias cu='bundle exec cucumber'
alias rvmnginx='rvmsudo /opt/nginx/sbin/nginx'
alias nginxconf='_ mvim /opt/nginx/conf/nginx.conf'
@@ -41,3 +41,5 @@ alias redisserv='redis-server /usr/local/etc/redis.conf'
alias less=$PAGER
alias zless=$PAGER
+
+PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
Please sign in to comment.
Something went wrong with that request. Please try again.