diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1 @@ + diff --git a/gitconfig b/gitconfig index 85a8a8d..461910a 100644 --- a/gitconfig +++ b/gitconfig @@ -28,7 +28,7 @@ editor = vim autocrlf = false [push] - default = simple + default = current [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f diff --git a/gitmodules-old b/gitmodules-old deleted file mode 100644 index fc2901c..0000000 --- a/gitmodules-old +++ /dev/null @@ -1,37 +0,0 @@ -[submodule "zsh/zsh-syntax-highlighting"] - path = zsh/zsh-syntax-highlighting - url = https://github.com/zsh-users/zsh-syntax-highlighting.git - -[submodule "vim/bundle/html5.vim"] - path = vim/bundle/html5.vim - url = https://github.com/othree/html5.vim -[submodule "vim/bundle/syntastic"] - path = vim/bundle/syntastic - url = https://github.com/scrooloose/syntastic.git -[submodule "vim/bundle/vim-jquery"] - path = vim/bundle/vim-jquery - url = https://github.com/itspriddle/vim-jquery.git -[submodule "vim/bundle/nerdcommenter"] - path = vim/bundle/nerdcommenter - url = https://github.com/scrooloose/nerdcommenter.git -[submodule "vim/bundle/vim-pathogen"] - path = vim/bundle/vim-pathogen - url = https://github.com/tpope/vim-pathogen.git -[submodule "vim/bundle/vim-airline"] - path = vim/bundle/vim-airline - url = https://github.com/bling/vim-airline -[submodule "vim/bundle/tagbar"] - path = vim/bundle/tagbar - url = https://github.com/majutsushi/tagbar -[submodule "vim/bundle/htmljinja"] - path = vim/bundle/htmljinja - url = https://github.com/estin/htmljinja -[submodule "vim/bundle/Better-CSS-Syntax-for-Vim"] - path = vim/bundle/Better-CSS-Syntax-for-Vim - url = https://github.com/ChrisYip/Better-CSS-Syntax-for-Vim -[submodule "vim/bundle/nerdtree"] - path = vim/bundle/nerdtree - url = https://github.com/scrooloose/nerdtree -[submodule "vim/bundle/vim-yardoc"] - path = vim/bundle/vim-yardoc - url = https://github.com/noprompt/vim-yardoc.git diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index 5b9b679..8da0e84 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -22,7 +22,7 @@ Plugin 'ChrisYip/Better-CSS-Syntax-for-Vim' Plugin 'noprompt/vim-yardoc' Plugin 'php.vim--Hodge' -Plugin 'https://bitbucket.org/teramako/jscomplete-vim.git' +Plugin 'mattn/jscomplete-vim.git' Plugin 'jelera/vim-javascript-syntax' Plugin 'othree/javascript-libraries-syntax.vim' diff --git a/vim/config/shorcuts.vim b/vim/config/shorcuts.vim index c904345..61f431d 100644 --- a/vim/config/shorcuts.vim +++ b/vim/config/shorcuts.vim @@ -1,4 +1,6 @@ -" Couper, copier et coller avec le presse-papier du système +"runtime config/keyboard-remap.vim + +"Couper, copier et coller avec le presse-papier du système if has('x11') && has('clipboard') :nmap "+dd :nmap "+yy @@ -41,7 +43,7 @@ endif " (dé)Pliage de code :nmap zc :nmap zo -:nmap :%foldc! +:nmap :%foldc!i :imap zcki :imap zoi @@ -65,11 +67,11 @@ endif :nmap gt :nmap  :call A_askFile("File to open : "):exec ":tabnew ". Filename -:imap gTi -:imap gti +:imap gTi +:imap gti -:vmap gT -:vmap gt +:vmap gT +:vmap gt " (dé)Indentation :nmap >> @@ -103,3 +105,5 @@ endif " Autres :nmap :e :nmap :w:e + +:imap vUi diff --git a/zsh/ssh_agent b/zsh/ssh_agent new file mode 100644 index 0000000..02ac1bd --- /dev/null +++ b/zsh/ssh_agent @@ -0,0 +1,19 @@ +env=~/.ssh/agent.env + +agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } + +agent_start () { + (umask 077; ssh-agent >| "$env") + . "$env" >| /dev/null +} + +agent_load_env + +# agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running +agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?) + +if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then +agent_start +fi + +unset env diff --git a/zsh/zshrc b/zsh/zshrc index 52da5c3..93f3e98 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -10,12 +10,12 @@ setopt histignorealldups sharehistory # Use emacs keybindings even if our EDITOR is set to vi bindkey -e -bindkey '^[[H' beginning-of-line # [Origin] -bindkey '^[[F' end-of-line # [Fin] +bindkey '[1~' beginning-of-line # [Origin] +bindkey '[4~' end-of-line # [Fin] bindkey '^[[2~' overwrite-mode # [Insert] bindkey '^[[3~' delete-char # [Suppr] -bindkey '^[[5~' history-search-backward # [Page-Up] -bindkey '^[[6~' history-search-forward # [Page-Down] +bindkey '[5~' history-search-backward # [Page-Up] +bindkey '[6~' history-search-forward # [Page-Down] # Keep 1000 lines of history within the shell and save it to ~/.zsh_history: HISTSIZE=1000 @@ -69,8 +69,26 @@ maj_calibre() { sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.py | sudo python -c "import sys; main=lambda x:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main('/opt')" } +find_php() { + # $1 : expression recherchée + # $2 : chemin + # $3 : option supplémentaires + arg_path=$2 + if [ -z $arg_path ]; then + arg_path="." + fi + arg_options=$3 + if [ -z $arg_options ]; then + arg_options="-n" + fi + find $arg_path -type f -iname "*.php" | xargs grep $arg_options $1 +} + #alias cclive='cclive -c' # Continue automatiquement les DL #alias cclive-best='cclive --stream best' # DL avec la qualité max alias 7z_max="7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on" alias maj="apti update && apti full-upgrade" + +# Include other files +source "$HOME/consoleConfig/zsh/ssh_agent"