Commits

Gabriel AHTUNE committed b739083

changed bashrc
changed tmux.conf
changed vimrc

Comments (0)

Files changed (3)

+export PATH=$PATH:~/.gem/ruby/1.9.1/bin
+
 TERM=xterm-256color
+
+shopt -s expand_aliases
+
+alias setkb='setxkbmap'
 alias ls='ls --color=auto'
 alias vi='vim'
-export EDITOR="vim"
+export EDITOR='vim'
 
 # modified commands
 alias grep='grep --color=auto'
 alias chown='chown --preserve-root'
 alias chmod='chmod --preserve-root'
 alias chgrp='chgrp --preserve-root'
+
+
+# ajouter ~/bin dans le PATH si celui-ci existe (indispensable)
+if [ -d ~/bin ] ; then
+  PATH=~/bin:"${PATH}"
+fi
+
+# ----------------------------------------------
+# USEFUL FUNCTIONS
+# ----------------------------------------------
+
+logview()
+{
+    ccze -A < $1 | less -R
+}
+
+logtail()
+{
+    tail -f $1 | ccze
+}
 bind | split-window -h
 bind - split-window -v
 
+# easily toggle synchronization (mnemonic: e is for echo)
+bind e setw synchronize-panes on
+bind E setw synchronize-panes off
+
 setw -g automatic-rename
 
 ## pane border
 set-option -g status-left "#(~/.tmux/tmux-powerline/status-left.sh)"
 set-option -g status-right "#(~/.tmux/tmux-powerline/status-right.sh)"
 
+set -g terminal-overrides 'xterm*:smcup@:rmcup@'
     autocmd bufwritepost .vimrc call Pl#Load()
 endif
 
+" close quickfix when not looking at.
+autocmd FileType qf nmap <buffer> <cr> <cr>:lcl<cr>
+
 " Backup
 set backupdir=~/.vim/backup/
 set directory=~/.vim/backup/
 
 " 80 characters limit
 set tw=79
-set colorcolumn=80
-highlight ColorColumn ctermbg=233
-" Boring on html, and raw file...
-" match ErrorMsg '\%>79v.\+'
-
-" Window geometry
-" set columns=100
-" set lines=30
 
 syntax on
 set nocompatible
 map <F8> :!/usr/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
 
 " Text, tab and indent related
-set gfn=Monaco\ Regular\ 10
+set gfn=Monaco
 set expandtab " Use spaces instead of tabs
 set smarttab
 set shiftwidth=4 " 1 tab == 4 spaces
 inoremap <M-b> <ESC>:buffers<CR>:b 
 nnoremap <Leader>b :bnext<CR>
 map <C-F3> <ESC>:bdelete<CR>
+map <Leader>x <ESC>:bd<CR>
 
 " Better window split 
 nnoremap <C-w>v <C-w>v<C-w>l
 " Shortcuts for tags (Etiquettes)
 " as C-T already mapped to new tabs ...
 nnoremap <backspace> :pop<CR>
-" ] difficult on my french keyboard
-nnoremap <C-k> <C-]>
 
 " shorcuts for buffers
 set hidden " Do not need to save file when opening a new file.
 nnoremap <leader>v V`]
 
 " save, save as
-noremap <C-s> :w<CR> 
+noremap <C-s> :w<CR>
 noremap <C-M-s> :w 
 
 "undo, redo
 
 nmap <silent> <F7> :call ToggleSpell()<CR>
 
+" Toggle 80 column marker
+inoremap <F3> <ESC>:call ToggleColorColumn()<CR>i
+vnoremap <F3> <ESC>:call ToggleColorColumn()<CR>gv
+nnoremap <F3> <ESC>:call ToggleColorColumn()<CR>
+
+func! ToggleColorColumn()
+    if exists("b:colorcolumnon") && b:colorcolumnon
+        let b:colorcolumnon = 0
+        exec ':set colorcolumn=0'
+        echo '80 column marker off'
+    else
+        let b:colorcolumnon = 1
+        exec ':set colorcolumn=80'
+        echo '80 column marker on'
+    endif
+endfunc
+
+nmap <F5> a<C-R>=strftime("%Y-%m-%d %I:%M:%S")<CR><Esc>
+imap <F5> <C-R>=strftime("%Y-%m-%d %I:%M:%S")<CR>
+
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 " Python
 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 nnoremap <Leader>cR <plug>VCSRevert
 let VCSCommandDeleteOnHide=1
 
+" git clone https://github.com/scrooloose/nerdtree.git
+nnoremap <F9> :NERDTreeToggle<CR>
+
+
+
+
 " Opted
 let g:opted_dir = '~/.opted/v003'
 
 " git clone https://github.com/rstacruz/sparkup.git
 " git clone https://github.com/tpope/vim-surround
 " git clone https://github.com/psjay/python.vim.git
-
+" git clone https://github.com/vim-scripts/tComment.git
+" git clone https://github.com/vim-scripts/mru.vim.git
+"
 " require L9 library
 " git clone https://github.com/vim-scripts/L9.git
 " hg clone https://bitbucket.org/ns9tks/vim-autocomplpop