Permalink
Browse files

import dotfiles

  • Loading branch information...
0 parents commit 797d0450c821c8c07883e19e01433423917e0f08 @almet committed Sep 26, 2012
Showing with 299 additions and 0 deletions.
  1. +2 −0 .aliases
  2. +22 −0 .functions
  3. +5 −0 .gitconfig
  4. +42 −0 .hgrc
  5. +59 −0 .tmux.conf
  6. +158 −0 .vimrc
  7. +11 −0 .zshrc
@@ -0,0 +1,2 @@
+alias todo='vim -p ~/do/*'
+alias ack='ack-grep'
@@ -0,0 +1,22 @@
+function to () {
+ if test "$2"; then
+ cd "$(apparix "$1" "$2" || echo .)";
+ else
+ cd "$(apparix "$1" || echo .)";
+ fi
+ pwd
+}
+function bm () {
+ if test "$2"; then
+ apparix --add-mark "$1" "$2";
+ elif test "$1"; then
+ apparix --add-mark "$1";
+ else
+ apparix --add-mark;
+ fi
+}
+
+function upload() {
+ scp $@ alexis@172.19.2.119:/home/www/notmyidea.org/.
+ echo "http://alexis.notmyidea.org/$@"
+}
@@ -0,0 +1,5 @@
+[user]
+ name = Alexis Métaireau
+ email = alexis@notmyidea.org
+[color]
+ ui = true
42 .hgrc
@@ -0,0 +1,42 @@
+[ui]
+username = Alexis Metaireau <alexis@notmyidea.org>
+ssh = ssh -C
+merge = vimdiff
+
+[defaults]
+addremove = --similarity 100
+
+[alias]
+i. = incoming
+~ = path
+/ = root
+¹ = tip
+^ = update
+! = status
+
+[extensions]
+bookmarks =
+fetch =
+mq =
+graphlog =
+extdiff =
+color =
+rebase =
+purge =
+
+[merge-tools]
+vimdiff.executable = vim
+vimdiff.args = -d $base $local $output $other +close +close
+
+[extdiff]
+cmd.vdiff = vimdiff
+
+[diff]
+git = 1
+
+[tortoisehg]
+hgtkfork = True
+
+[auth]
+bb.prefix = https://bitbucket.org
+bb.username = ametaireau
@@ -0,0 +1,59 @@
+# UTF-8
+set-option -g status-utf8 on
+set-window-option -g utf8 on
+
+# Set 256-colour terminal
+set -g default-terminal "screen-256color"
+
+# Number of lines held in window history
+set -g history-limit 100000
+
+# Default session
+new -d -s "yeah"
+setw -g aggressive-resize on
+
+unbind C-b
+set -g prefix C-a
+# set status bar
+set-option -g status-utf8 on
+set-option -g status-bg colour11
+set-option -g status-fg colour8
+
+set-option -g status-left ' #[bold]❐ #S#[default] ⡇'
+set-option -g status-right '#[bold]#(whoami) ● #H#[default] '
+
+set-option -g status-right-length 60
+set-option -g status-left-length 60
+
+## highlight active window
+set-window-option -g window-status-current-bg colour166
+set-window-option -g window-status-current-fg colour15
+set-window-option -g window-status-current-attr bold
+set-window-option -g window-status-current-format ' #I #W '
+
+## set window notifications
+set-option -g visual-activity on
+set-option -g visual-content on
+set-window-option -g monitor-activity on
+set-window-option -g automatic-rename off
+
+## tmux window titling for X
+set-option -g set-titles on
+set-option -g set-titles-string '[#I] #W'
+set-window-option -g automatic-rename on
+set-window-option -g window-status-format ' #I #W '
+set-window-option -g window-status-attr bold
+# starts windows at 1 not 0
+set-option -g base-index 1
+
+## enable mouse
+set-option -g mouse-select-pane off
+set-window-option -g mode-keys vi
+set-window-option -g mode-mouse off
+# set-window-option -g monitor-activity off
+# set-window-option -g monitor-content off
+# set-option -g status-keys vi
+
+## pane border and colors
+set-option -g pane-active-border-fg yellow
+set-option -g pane-border-fg white
158 .vimrc
@@ -0,0 +1,158 @@
+"" include other configuration files
+source $HOME/.vimrcpy
+set directory=~/.vim/swp " store the .swp files in a specific path
+
+"" default values """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+colorscheme slate " peachpuff is good too
+"set mouse=a
+syntax on " syntax highlighting
+filetype off " to consider filetypes
+call pathogen#runtime_append_all_bundles()
+filetype plugin indent on
+set nocompatible
+
+set encoding=utf-8
+set scrolloff=3
+set autoindent
+set showmode
+set showcmd
+set hidden
+set wildmenu
+set wildmode=list:longest
+set visualbell
+set cursorline
+set ttyfast
+set ruler
+set backspace=indent,eol,start
+set laststatus=2
+"set relativenumber
+set number
+set undofile
+let mapleader = ","
+
+nnoremap / /\v
+vnoremap / /\v
+set ignorecase
+set smartcase
+set gdefault
+set incsearch
+set showmatch
+set hlsearch
+nnoremap <leader><space> :noh<cr>
+nnoremap <tab> %
+vnoremap <tab> %
+
+set wrap
+set textwidth=79
+set formatoptions=qrn1
+set list
+set listchars=tab:▸\
+
+"set acd " auto change directory
+set laststatus=2 " Always set a status line
+set tabstop=4
+set shiftwidth=4
+set softtabstop=4
+set expandtab
+
+
+nnoremap <up> <nop>
+nnoremap <down> <nop>
+nnoremap <left> <nop>
+nnoremap <right> <nop>
+inoremap <up> <nop>
+inoremap <down> <nop>
+inoremap <left> <nop>
+inoremap <right> <nop>
+nnoremap j gj
+nnoremap k gk
+
+inoremap <F1> <ESC>
+nnoremap <F1> <ESC>
+vnoremap <F1> <ESC>
+nnoremap ; :
+au FocusLost * :wa
+
+"" remove trainling slashes with w
+nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
+nnoremap <leader>q gqip
+inoremap jj <ESC>
+nnoremap <leader>w <C-w>v<C-w>l
+
+nnoremap <C-h> <C-w>h
+nnoremap <C-j> <C-w>j
+nnoremap <C-k> <C-w>k
+nnoremap <C-l> <C-w>l
+
+
+" configure expanding of tabs for various file types
+au BufRead,BufNewFile *.py set expandtab
+au BufRead,BufNewFile *.c set noexpandtab
+au BufRead,BufNewFile *.h set noexpandtab
+au BufRead,BufNewFile Makefile* set noexpandtab
+
+"" shortcuts """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+nnoremap <leader>e :NERDTreeToggle<CR>
+nnoremap <leader>t :TlistToggle<CR>
+nnoremap <A-l> gt
+nnoremap <A-h> gT
+" add spellchecking on ,c
+nnoremap <leader>fr :setlocal spell spelllang=fr<CR>
+nnoremap <leader>en :setlocal spell spelllang=en<CR>
+
+" write a file while dont getting the rights to.
+command WW w !sudo tee % > /dev/null
+
+" edit vim quickly
+nnoremap <leader>v <C-w><C-v><C-l>:e $MYVIMRC<cr>
+map <silent> <Leader>V :source ~/.vimrc<CR>:filetype detect<CR>:exe ":echo'vimrc reloaded'"<CR>
+
+" remap CTRL+N to CTRL + space
+inoremap <Nul> <C-n>
+
+nnoremap <F5> :GundoToggle<CR>
+
+" change the current buffer to equal the other
+map <silent> <Leader>< do
+" and the inverse (change the other buffer)
+map <silent> <Leader>> dp
+
+" <Leader>a to abort
+map <silent> <Leader>a :cq<CR>
+
+" useful for markdown / rst
+map <Leader>0 yypVr#
+map <Leader>1 yypVr=
+map <Leader>2 yypVr-
+map <Leader>3 yypVr~
+
+map <silent> <Leader>n ]S
+map <silent> <Leader>p [S
+
+"" Plugins configuration """"""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Tlist configuration
+let Tlist_GainFocus_On_ToggleOpen = 1
+let Tlist_Close_On_Select = 0
+let Tlist_Auto_Update = 1
+let Tlist_Process_File_Always = 1
+let Tlist_Use_Right_Window = 1
+let Tlist_WinWidth = 40
+let Tlist_Show_One_File = 1
+let Tlist_Show_Menu = 0
+let Tlist_File_Fold_Auto_Close = 0
+let Tlist_Ctags_Cmd = '/usr/bin/ctags'
+let tlist_css_settings = 'css;e:SECTIONS'
+"let Tlist_Ctags_Cmd = '/usr/local/bin/rst2ctags --taglist'
+"let tlist_rst_settings = 'rst;s:sections;i:images'
+
+
+" NerdTree configuration
+let NERDTreeIgnore = ['\.pyc$', '\.pyo$']
+let NERDChristmasTree = 1
+
+nnoremap <silent> <F3> :YRShow<cr>
+inoremap <silent> <F3> <ESC>:YRShow<cr>
+autocmd FileType gitcommit DiffGitCached | wincmd p
11 .zshrc
@@ -0,0 +1,11 @@
+# Path to your oh-my-zsh configuration.
+ZSH=$HOME/.oh-my-zsh
+ZSH_THEME="kennethreitz"
+COMPLETION_WAITING_DOTS="true"
+
+plugins=(git python debian github pip)
+
+source $ZSH/oh-my-zsh.sh
+source /usr/local/bin/virtualenvwrapper.sh
+source $HOME/.functions
+source $HOME/.aliases

0 comments on commit 797d045

Please sign in to comment.