Browse Source

Merge branch 'master' of ssh://master/home/manu/public_git/kolter-dotfiles

Emmanuel Bouthenot 12 years ago
parent
commit
f50a7bfee8
14 changed files with 266 additions and 80 deletions
  1. 6 3
      .gitmodules
  2. 13 0
      .inputrc
  3. 3 3
      .mailfilter
  4. 18 13
      .mutt/conf/mailboxes
  5. 1 1
      .mutt/muttrc
  6. 19 0
      .tigrc
  7. 1 1
      .vim/bundle/fugitive
  8. 1 1
      .vim/bundle/gundo
  9. 1 1
      .vim/bundle/pathogen
  10. 1 0
      .vim/bundle/taglist
  11. 94 51
      .vim/vimrc
  12. 99 0
      .zsh.d/bin/lftp-mirror
  13. 1 1
      .zsh.d/externals.d/zsh-syntax-highlighting
  14. 8 5
      .zsh.d/zshrc

+ 6 - 3
.gitmodules

@@ -3,10 +3,13 @@
 	url = git://github.com/zsh-users/zsh-syntax-highlighting.git
 [submodule ".vim/bundle/pathogen"]
 	path = .vim/bundle/pathogen
-	url = http://github.com/tpope/vim-pathogen.git
+	url = git://github.com/tpope/vim-pathogen.git
 [submodule ".vim/bundle/gundo"]
 	path = .vim/bundle/gundo
-	url = http://github.com/sjl/gundo.vim
+	url = git://github.com/sjl/gundo.vim
 [submodule ".vim/bundle/fugitive"]
 	path = .vim/bundle/fugitive
-	url = http://github.com/tpope/vim-fugitive.git
+	url = git://github.com/tpope/vim-fugitive.git
+[submodule ".vim/bundle/taglist"]
+	path = .vim/bundle/taglist
+	url = git://github.com/vim-scripts/taglist.vim.git

+ 13 - 0
.inputrc

@@ -0,0 +1,13 @@
+#
+# Readline configuration file (~/.inputrc)
+# 2012, kolter <kolter@openics.org>
+#
+#  This file is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY
+#
+
+set show-all-if-ambiguous on
+set completion-ignore-case on
+set completion-map-case on
+set bell-style visible
+

+ 3 - 3
.mailfilter

@@ -28,7 +28,7 @@ if (/^X-BeenThere:\s*(.*)@rmll\.info/)
         to $MAILDIR/.rmll.09.$MATCH1
     }
 }
-if (/^From:.*reservation@rmll\.info/ || /^From:.*tpeweb@paybox\.com/)
+if (/^From:.*reservation@rmll\.info/ || /^From:.*tpeweb@paybox\.com/ || /^From:.*noreply@ogone\.com/)
 {
     to $MAILDIR/.rmll.resa
 }
@@ -106,7 +106,7 @@ if (/^List-Id:.*<(.*)\.lists\.parinux\.org>/)
 }
 
 ### FrNog
-if (/^List-Id: .*frnog=FRnOG\.org/)
+if (/^List-Id: .*frnog=FRnOG\.org/ || /^List-Id:.*<frnog\.frnog\.org>/)
 {
     to $MAILDIR/.groups.frnog
 }
@@ -166,7 +166,7 @@ if (/^List-Id:.*<(.*)\.listes\.sud-ouest\.org>/)
 }
 
 ### SYMPA Lists
-if (/^List-Id:.*<sympa-(.*)\.cru\.fr>/)
+if (/^List-Id:.*<sympa-(.*)\.listes\.renater\.fr>/)
 {
     exception {
         `test -d $MAILDIR/.sympa.$MATCH1`

+ 18 - 13
.mutt/conf/mailboxes

@@ -54,13 +54,14 @@ mailboxes +.rmll.comite
 mailboxes +.rmll.discussion
 mailboxes +.rmll.admins
 mailboxes +.rmll.resa
-mailboxes +.rmll.11
-mailboxes +.rmll.11.org
-mailboxes +.rmll.11.themes
-mailboxes +.rmll.11.notif
-mailboxes +.rmll.11.audiovideo
-mailboxes +.rmll.11.village
-mailboxes +.rmll.11.participants
+
+mailboxes +.rmll.12
+mailboxes +.rmll.12.org
+mailboxes +.rmll.12.themes
+mailboxes +.rmll.12.notif
+mailboxes +.rmll.12.audiovideo
+mailboxes +.rmll.12.village
+mailboxes +.rmll.12.participants
 
 mailboxes +.debian-france
 mailboxes +.debian-france.ag
@@ -107,9 +108,6 @@ mailboxes +.sympa.packagers
 mailboxes +.sympa.users
 mailboxes +.sympa.fr
 
-mailboxes +.kde
-mailboxes +.kde.kwrite-devel
-
 mailboxes +.groups
 mailboxes +.groups.asyd_sysadmin
 mailboxes +.groups.asyd_emacs
@@ -135,9 +133,13 @@ mailboxes +.debian.pkg.pwman3
 mailboxes +.debian.pkg.weechat
 mailboxes +.debian.pkg.wkhtmltopdf
 
-mailboxes +.rmll
-mailboxes +.rmll.09
-mailboxes +.rmll.09.org
+mailboxes +.rmll.11
+mailboxes +.rmll.11.org
+mailboxes +.rmll.11.themes
+mailboxes +.rmll.11.notif
+mailboxes +.rmll.11.audiovideo
+mailboxes +.rmll.11.village
+mailboxes +.rmll.11.participants
 mailboxes +.rmll.10
 mailboxes +.rmll.10.org
 mailboxes +.rmll.10.programme
@@ -153,3 +155,6 @@ mailboxes +.rmll.10.village
 mailboxes +.rmll.10.participants
 mailboxes +.rmll.10.benevoles
 mailboxes +.rmll.10.rmll-uesi
+mailboxes +.rmll
+mailboxes +.rmll.09
+mailboxes +.rmll.09.org

+ 1 - 1
.mutt/muttrc

@@ -12,7 +12,7 @@
 set realname        = "Emmanuel Bouthenot"
 set from            = "kolter@openics.org"
 set signature       = "~/.signatures/main"
-alternates          "(kolter|emmanuel\.bouthenot|manu)@(openics\.org|debian\.org|free\.fr|bouthenot\.name)"
+alternates          "(kolter|emmanuel\.bouthenot|manu|emmanuel)@(openics\.org|debian\.org|free\.fr|bouthenot\.name)"
 
 set envelope_from   = yes                       # set return-path to from instead of user@hostname
 set hostname        = openics.org

+ 19 - 0
.tigrc

@@ -0,0 +1,19 @@
+#
+# Base configuration
+#
+# Syntax: set <option> = <value>
+
+set show-rev-graph = yes        # Show revision graph?
+set line-number-interval = 5    # Interval between line numbers
+set tab-size = 8                # Number of spaces pr tab
+
+#
+# Key configuration
+#
+# Syntax: bind <keymap> <key> <request>
+
+bind generic E !git format-patch -1 %(commit)
+bind generic r !git revert %(commit)
+bind generic T !tig-tag %(commit)
+
+# vim: ft=muttrc

+ 1 - 1
.vim/bundle/fugitive

@@ -1 +1 @@
-Subproject commit 1b7e4070f5f7b7522422f5b00a75b323cc314daf
+Subproject commit 0abe1fb12232abe5b7bdfa4d244f04faf3450ba3

+ 1 - 1
.vim/bundle/gundo

@@ -1 +1 @@
-Subproject commit 12b6f67aeb892519385529b2b5cdda55cc428d9d
+Subproject commit 4c376a8061fa335228da420937ce385b847dd56a

+ 1 - 1
.vim/bundle/pathogen

@@ -1 +1 @@
-Subproject commit ab64b4ddd0c184a528780b498a0b0a5b40248f7c
+Subproject commit 5e3fdd3a8a3b244e1fedd0f5597f4a9879e16c3b

+ 1 - 0
.vim/bundle/taglist

@@ -0,0 +1 @@
+Subproject commit 53041fbc45398a9af631a20657e109707a455339

+ 94 - 51
.vim/vimrc

@@ -24,12 +24,12 @@ set directory=~/.vim/tmp "directory to place swap files in
 
 "Encoding settings
 if has("multi_byte")
-	if &termencoding == ""
-		let &termencoding = &encoding
-	endif
-	set encoding=utf-8
-	setglobal fileencoding=utf-8 bomb
-	set fileencodings=ucs-bom,utf-8,default,latin1
+    if &termencoding == ""
+        let &termencoding = &encoding
+    endif
+    set encoding=utf-8
+    setglobal fileencoding=utf-8 bomb
+    set fileencodings=ucs-bom,utf-8,default,latin1
 endif
 
 "Syntax highlight
@@ -148,17 +148,17 @@ set softtabstop=4
 set showmatch "brace/parenthese/bracket matching
 set nowrap "wrap long lines
 if has("multi_byte")
-	set showbreak="…"
+    set showbreak="…"
 else
-	set showbreak="+++"
+    set showbreak="+++"
 endif
 
 "show some not printable chars
 set list
 if has("multi_byte")
-	set listchars=trail:·,extends:>,precedes:<,nbsp:•,tab:→\ 
+    set listchars=trail:·,extends:>,precedes:<,nbsp:•,tab:→\ 
 else
-	set listchars=tab:>.,trail:·,extends:>,precedes:<,nbsp:%
+    set listchars=tab:>.,trail:·,extends:>,precedes:<,nbsp:%
 endif
 
 "search settings
@@ -181,10 +181,10 @@ set foldlevel=1
 "
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 if has('autocmd')
-	autocmd BufRead ~/.mutt/tmp/mutt-* set filetype=mail
-	autocmd FileType mail set autoindent expandtab formatoptions=tcqn
-	autocmd FileType mail vmap D dO[...]<CR>
-	autocmd FileType mail call EnableSpellChecking()
+    autocmd BufRead ~/.mutt/tmp/mutt-* set filetype=mail
+    autocmd FileType mail set autoindent expandtab formatoptions=tcqn
+    autocmd FileType mail vmap D dO[...]<CR>
+    autocmd FileType mail call EnableSpellChecking()
 endif
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -198,11 +198,11 @@ filetype plugin indent on
 "
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 if has('autocmd')
-	"reload Vim config file after saving
-	autocmd BufWritePost $MYVIMRC :source $MYVIMRC
-	"always limit the width for text files
-	autocmd BufRead *.txt set tw=78
-	autocmd QuickFixCmdPre * botright cwindow 5
+    "reload Vim config file after saving
+    autocmd BufWritePost $MYVIMRC :source $MYVIMRC
+    "always limit the width for text files
+    autocmd BufRead *.txt set tw=78
+    autocmd QuickFixCmdPre * botright cwindow 5
 endif
 
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -211,21 +211,21 @@ endif
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 "set spellfile=~/.vim/spell/words
 function! EnableSpellChecking()
-	setlocal spell spelllang=fr,en_us
-	let b:spell = 1
+    setlocal spell spelllang=fr,en_us
+    let b:spell = 1
 endfunction
 
 function! DisableSpellChecking()
-	setlocal nospell
-	unlet b:spell
+    setlocal nospell
+    unlet b:spell
 endfunction
 
 function! ToggleSpell()
-	if !exists("b:spell")
-		execute 'call EnableSpellChecking()'
-	else
-		execute 'call DisableSpellChecking()'
-	endif
+    if !exists("b:spell")
+        execute 'call EnableSpellChecking()'
+    else
+        execute 'call DisableSpellChecking()'
+    endif
 endfunction
 
 nmap <F4> :call ToggleSpell()<CR>
@@ -237,18 +237,29 @@ imap <F4> <Esc>:call ToggleSpell()<CR>a
 "
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 " Settings for taglist.vim
-let Tlist_Use_Right_Window=1
-let Tlist_Auto_Open=0
-"let Tlist_Enable_Fold_Column=0
-let Tlist_Compact_Format=1
-"let Tlist_WinWidth=28
-let Tlist_Exit_OnlyWindow=1
-let Tlist_File_Fold_Auto_Close=1
-let Tlist_Process_File_Always=1
-"dip F1 to open previous buffersplay tags only for the current buffer
-let Tlist_Show_One_File=1
-let Tlist_Use_SingleClick=1
-let Tlist_Ctags_Cmd="~/.vim/bin/ctags-exuberant"
+
+" Define ctags parser path
+let Tlist_Ctags_Cmd = "~/.vim/bin/ctags-exuberant"
+"Tlist pane get focus on toggle
+let Tlist_GainFocus_On_ToggleOpen = 1
+" Tlist pane is closed once something is selected
+"let Tlist_Close_On_Select = 1
+" vim exists if the Tlist window is the last remaining
+let Tlist_Exit_OnlyWindow = 1
+" highlight current position in tag list
+let Tlist_Auto_Highlight_Tag = 1
+" Update the tag list regularly
+let Tlist_Auto_Update = 0
+" remove empty lines on Tlist pane
+let Tlist_Compact_Format = 1
+" show functions/methods signatures
+"let Tlist_Display_Prototype = 1
+" show only the tags for the current buffer
+let Tlist_Show_One_File = 1
+" Tlist pane width
+let Tlist_WinWidth = 50
+
+" toggle Tlist with F9
 nnoremap <silent> <F9> :Tlist<CR>
 
 
@@ -257,16 +268,48 @@ nnoremap <silent> <F9> :Tlist<CR>
 "
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 function! CleanClose()
-	let todelbufNr = bufnr("%")
-	let newbufNr = bufnr("#")
-	if ((newbufNr != -1) && (newbufNr != todelbufNr) && buflisted(newbufNr))
-		exe "b".newbufNr
-	else
-		bnext
-	endif
-	if (bufnr("%") == todelbufNr)
-		new
-	endif
-	exe "bd".todelbufNr
+    let todelbufNr = bufnr("%")
+    let newbufNr = bufnr("#")
+    if ((newbufNr != -1) && (newbufNr != todelbufNr) && buflisted(newbufNr))
+        exe "b".newbufNr
+    else
+        bnext
+    endif
+    if (bufnr("%") == todelbufNr)
+        new
+    endif
+    exe "bd".todelbufNr
 endfunction
 
+
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Load pathogen
+"
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+if filereadable($HOME . "/.vim/bundle/pathogen/autoload/pathogen.vim")
+    source ~/.vim/bundle/pathogen/autoload/pathogen.vim
+    call pathogen#infect()
+endif
+
+
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Gundo Setup
+"
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" Gundo sidebar on the right
+let g:gundo_right = 1
+" Gundo layout
+let g:gundo_width = 60
+let g:gundo_preview_height = 40
+" Gundo status lines
+let g:gundo_tree_statusline = "Gundo"
+let g:gundo_preview_statusline = "Gundo Preview"
+" Preview pane below the buffer
+let g:gundo_preview_bottom = 1
+" Close Gundo panes on revert
+let g:gundo_close_on_revert = 1
+
+" F3 key to show/hide Gundo sidebar
+nnoremap <F3> :GundoToggle<CR>

+ 99 - 0
.zsh.d/bin/lftp-mirror

@@ -0,0 +1,99 @@
+#!/bin/sh
+
+set -e
+
+usage() {
+cat <<EOH
+USAGE: $(basename "$0") [OPTIONS]
+
+Mirror specified remote directory to local directory using lftp
+
+Options:
+    -l  Local directory     (default: '$LOCAL_DIR')
+    -r  Remote directory    (default: '$REMOTE_DIR')
+    -R  Reverse mirroring   (default: $REVERSE)
+    -u  FTP username        (default: '$USERNAME')
+    -p  FTP password        (default: '$PASSWORD')
+    -P  FTP port            (default: '$PORT')
+    -n  Dry-run mode        (default: $DRYRUN)
+    -v  Verbose mode        (default: $VERBOSE)
+EOH
+}
+
+LOCAL_DIR=
+REMOTE_DIR=
+REVERSE=0
+USERNAME="anonymous"
+PASSWORD="${USER}@$(dnsdomainname)"
+PORT=21
+DRYRUN=0
+VERBOSE=0
+
+while getopts "l:r:u:p:P:nvRh" OPT ; do
+    case "$OPT" in 
+        \?|h)
+            usage
+            exit 0
+            ;;
+        l)
+            LOCAL_DIR="$OPTARG"
+            ;;
+        r)
+            REMOTE_DIR="$OPTARG"
+            ;;
+        R)
+            REVERSE=1
+            ;;
+        u)
+            USERNAME="$OPTARG"
+            ;;
+        p)
+            PASSWORD="$OPTARG"
+            ;;
+        P)
+            PORT="$OPTARG"
+            ;;
+        n)
+            DRYRUN=1
+            ;;
+        v)
+            VERBOSE=1
+            ;;
+    esac
+done
+
+if [ -z "$LOCAL_DIR" ]; then
+    printf "ERR: Local path is not defined (option -l)\n"
+    usage
+    exit 1
+fi
+
+if [ -z "$REMOTE_DIR" ]; then
+    printf "ERR: Remote path is not defined (option -r)\n"
+    usage
+    exit 1
+fi
+
+if [ "$REVERSE" = 0 ] && [ ! -d "$LOCAL_DIR" ]; then
+    mkdir -p "$LOCAL_DIR"
+fi
+
+MIRROR_OPTIONS="--delete-first --reverse --only-newer --no-perms --no-umask --ignore-time"
+if [ "$REVERSE" = 1 ]; then
+    MIRROR_OPTIONS="$MIRROR_OPTIONS --reverse"
+fi
+if [ "$DRYRUN" = 1 ]; then
+    MIRROR_OPTIONS="$MIRROR_OPTIONS --dry-run"
+fi
+if [ "$VERBOSE" = 1 ]; then
+    MIRROR_OPTIONS="$MIRROR_OPTIONS --verbose"
+fi
+
+lftp -c "\
+    set ftp:list-options -a; \
+    lcd $LOCAL_DIR ; \
+    open -u $USERNAME,$PASSWORD -p $PORT $REMOTE_DIR ; \
+    mirror $MIRROR_OPTIONS \
+"
+
+exit 0

+ 1 - 1
.zsh.d/externals.d/zsh-syntax-highlighting

@@ -1 +1 @@
-Subproject commit d2715e2cb3294880bbc6a75b91288243054218d0
+Subproject commit 732b7d6e65c0349ee1d89b698bf9cd8a30c1015d

+ 8 - 5
.zsh.d/zshrc

@@ -47,11 +47,14 @@ for f in $DOTZSHDIR/config.d/*.zsh ; do
 done
 
 # sourcing externals plugins
-for d in $DOTZSHDIR/externals.d/*; do
-    if [ -f "$d/${d##*/}.zsh" ]; then
-        source "$d/${d##*/}.zsh"
-    fi
-done
+# some features are not well supported by zsh <= 4.3.6
+if [ "$(printf "%02d%02d%02d" $(echo ${ZSH_VERSION:gs/./ /}))" -gt "040306" ]; then
+    for d in $DOTZSHDIR/externals.d/*; do
+        if [ -f "$d/${d##*/}.zsh" ]; then
+            source "$d/${d##*/}.zsh"
+        fi
+    done
+fi
 
 # using 'sudo zsh'
 if [ "$SUDO_USER" -a "$UID" = 0 ]; then