From 737934e0151b8cef9dc77c192b50661aa52c5ddf Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 21 Jun 2015 22:22:56 +0200 Subject: [PATCH 01/12] Also ignoring other vim swap files. --- globalgitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/globalgitignore b/globalgitignore index 1377554..3819313 100644 --- a/globalgitignore +++ b/globalgitignore @@ -1 +1,2 @@ *.swp +*.swo From 9bf605fe1f6c22fae167275aa5468041f188628f Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 21 Jun 2015 22:23:57 +0200 Subject: [PATCH 02/12] Adding glsl-hightlighting to vim. --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 0fa9714..5cf051e 100644 --- a/vimrc +++ b/vimrc @@ -18,6 +18,7 @@ if exists("*vundle#begin") Plugin 'garbas/vim-snipmate' Plugin 'honza/vim-snippets' Plugin 'alfredodeza/coveragepy.vim' + Plugin 'tikhomirov/vim-glsl' " All of your Plugins must be added before the following line call vundle#end() " required From a4b1e5ffde202f6b77cf443df20d42bc3aa4a98e Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 21 Jun 2015 22:27:36 +0200 Subject: [PATCH 03/12] Now using zgen. --- zshrc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/zshrc b/zshrc index 2304311..6d922eb 100644 --- a/zshrc +++ b/zshrc @@ -1,3 +1,27 @@ +source /usr/share/zsh/scripts/zgen/zgen.zsh + +# check if there's no init script +if ! zgen saved; then + echo "Creating a zgen save" + + #zgen oh-my-zsh + + # plugins + #zgen oh-my-zsh plugins/gitfast + #zgen oh-my-zsh plugins/sudo + #zgen oh-my-zsh plugins/command-not-found + #zgen load zsh-users/zsh-syntax-highlighting + + ## completions + #zgen load zsh-users/zsh-completions src + + # theme + zgen oh-my-zsh themes/juanghurtado + + # save all to init script + zgen save +fi + alias sudo='sudo ' alias tasks="ps -u fab" alias update-grub="grub-mkconfig -o /boot/grub/grub.cfg" From 3a708cad02aba509768f4abd62a71ff2ee23cb11 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 21 Jun 2015 22:27:59 +0200 Subject: [PATCH 04/12] Querying more mirrors. --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 6d922eb..23f6eca 100644 --- a/zshrc +++ b/zshrc @@ -26,7 +26,7 @@ alias sudo='sudo ' alias tasks="ps -u fab" alias update-grub="grub-mkconfig -o /boot/grub/grub.cfg" alias sml2p='/home/fab/.Sync-my-L2P/Sync-my-L2P.run' -alias update-mirrors='sh -c "reflector -p http -l 20 --sort rate | tee /etc/pacman.d/mirrorlist"' +alias update-mirrors='sh -c "reflector -p http -l 50 --sort rate | tee /etc/pacman.d/mirrorlist"' alias ssh='ssh ' alias ping='ping ' alias aur-update='pacaur -Syu --devel --noconfirm' From a73a64ae4cbfdc1c2a9937b57a95e9261d682b63 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 21 Jun 2015 22:28:43 +0200 Subject: [PATCH 05/12] Color ls output. --- zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zshrc b/zshrc index 23f6eca..a403289 100644 --- a/zshrc +++ b/zshrc @@ -46,6 +46,7 @@ alias gdfs='git diff --staged' alias gad='git add' alias gcm='git commit' alias resource='source ~/.zshrc' +alias ls='ls --color=auto' if [ -f .zsh_environment ] then source ~/.zsh_environment From b6adbf36731e5acbb23761ffad5558bd0df4605b Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 21 Jun 2015 22:33:49 +0200 Subject: [PATCH 06/12] Making git happy. --- zshrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 6a15724..a418f2e 100644 --- a/zshrc +++ b/zshrc @@ -46,6 +46,10 @@ alias gdfs='git diff --staged' alias gad='git add' alias gcm='git commit' alias resource='source ~/.zshrc' +alias bootlfs='sudo screen -d -m VBoxHeadless -s LFS > /dev/null' +alias emacs='emacs -nw' +alias aiawiki='ssh aia -L 80:ldap2:80' +alias rbtv='livestreamer twitch.tv/rocketbeanstv &' alias ls='ls --color=auto' if [ -f .zsh_environment ] then @@ -63,16 +67,22 @@ then fi source ~/.zsh_functions export EDITOR=vim -export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.1.0/bin export ASPROOT=~/.asp +export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.2.0/bin +export LFS=/mnt/lfs #vi mode bindkey -v export KEYTIMEOUT=1 - +bindkey -M viins 'fd' vi-cmd-mode bindkey -M vicmd 'k' history-beginning-search-backward bindkey -M vicmd 'j' history-beginning-search-forward #backspace working after returning from command mode bindkey '^?' backward-delete-char bindkey '^h' backward-delete-char + +source /usr/share/doc/pkgfile/command-not-found.zsh + +# Automatically source virtualenv +source /usr/bin/virtualenvwrapper_lazy.sh From f01659eb8459dc632c8c7d7e8a359eab41c1023d Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 21 Jun 2015 22:34:16 +0200 Subject: [PATCH 07/12] Changing git pager. --- gitconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/gitconfig b/gitconfig index ee9fb2d..3b1a982 100644 --- a/gitconfig +++ b/gitconfig @@ -6,5 +6,6 @@ [core] editor = vim -c 'startinsert' excludesfile = ~/.globalgitignore + pager = less -F -X [push] default = simple From f1a1761f59559c32ed71606d829a95d038aac5f4 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 21 Jun 2015 22:35:33 +0200 Subject: [PATCH 08/12] Adding conditions for sourcing files. --- zshrc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index a418f2e..9c2de3b 100644 --- a/zshrc +++ b/zshrc @@ -82,7 +82,13 @@ bindkey -M vicmd 'j' history-beginning-search-forward bindkey '^?' backward-delete-char bindkey '^h' backward-delete-char -source /usr/share/doc/pkgfile/command-not-found.zsh +if [ -f /usr/share/doc/pkgfile/command-not-found.zsh ] +then + source /usr/share/doc/pkgfile/command-not-found.zsh +fi -# Automatically source virtualenv -source /usr/bin/virtualenvwrapper_lazy.sh +if [ -f /usr/bin/virtualenvwrapper_lazy.sh ] +then + # Automatically source virtualenv + source /usr/bin/virtualenvwrapper_lazy.sh +fi From d6bb3b6172e40dda0784d16df34bb684876af76b Mon Sep 17 00:00:00 2001 From: Faerbit Date: Mon, 22 Jun 2015 23:05:32 +0200 Subject: [PATCH 09/12] Map F8 for python files. --- vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vimrc b/vimrc index 5cf051e..1a69dc3 100644 --- a/vimrc +++ b/vimrc @@ -60,6 +60,9 @@ if argc() == 2 endif "Map on python files +au FileType python :map i +au FileType python :imap import pdb; pdb.set_trace() +"Map on python files au FileType python :map :Coveragepy show au FileType python :imap From a0000e507f930afe74479f2e65855dc9b983d1fe Mon Sep 17 00:00:00 2001 From: Faerbit Date: Mon, 22 Jun 2015 23:12:20 +0200 Subject: [PATCH 10/12] Adding better-whitespace plugin to vim. --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 1a69dc3..483413d 100644 --- a/vimrc +++ b/vimrc @@ -19,6 +19,7 @@ if exists("*vundle#begin") Plugin 'honza/vim-snippets' Plugin 'alfredodeza/coveragepy.vim' Plugin 'tikhomirov/vim-glsl' + Plugin 'ntpeters/vim-better-whitespace' " All of your Plugins must be added before the following line call vundle#end() " required From 3f058ee38d1f5d2386fa9e27e969bc42986ad49e Mon Sep 17 00:00:00 2001 From: Faerbit Date: Wed, 24 Jun 2015 12:59:36 +0200 Subject: [PATCH 11/12] Changing back to grml zsh. Displaying current virtualenv. --- zsh_functions | 4 ++++ zshrc | 60 ++++++++++++++++++--------------------------------- 2 files changed, 25 insertions(+), 39 deletions(-) diff --git a/zsh_functions b/zsh_functions index 63dd076..0e827e9 100644 --- a/zsh_functions +++ b/zsh_functions @@ -64,3 +64,7 @@ pacman_disowned(){ comm -23 "$fs" "$db" } + +virtual_env_prompt() { + REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) } +} diff --git a/zshrc b/zshrc index 9c2de3b..c4ed756 100644 --- a/zshrc +++ b/zshrc @@ -1,26 +1,20 @@ -source /usr/share/zsh/scripts/zgen/zgen.zsh - -# check if there's no init script -if ! zgen saved; then - echo "Creating a zgen save" - - #zgen oh-my-zsh - - # plugins - #zgen oh-my-zsh plugins/gitfast - #zgen oh-my-zsh plugins/sudo - #zgen oh-my-zsh plugins/command-not-found - #zgen load zsh-users/zsh-syntax-highlighting - - ## completions - #zgen load zsh-users/zsh-completions src - - # theme - zgen oh-my-zsh themes/juanghurtado - - # save all to init script - zgen save +# source all other zsh files +if [ -f .zsh_environment ] +then + source ~/.zsh_environment fi +#for accounts whithout root +if [ -f .zsh_grml ] +then + source ~/.zsh_grml +fi +#for untrusted machines +if [ -f .zsh_sensitive ] +then + source ~/.zsh_sensitive +fi +source ~/.zsh_functions +export EDITOR=vim alias sudo='sudo ' alias tasks="ps -u fab" @@ -51,22 +45,6 @@ alias emacs='emacs -nw' alias aiawiki='ssh aia -L 80:ldap2:80' alias rbtv='livestreamer twitch.tv/rocketbeanstv &' alias ls='ls --color=auto' -if [ -f .zsh_environment ] -then - source ~/.zsh_environment -fi -#for accounts whithout root -if [ -f .zsh_grml ] -then - source ~/.zsh_grml -fi -#for untrusted machines -if [ -f .zsh_sensitive ] -then - source ~/.zsh_sensitive -fi -source ~/.zsh_functions -export EDITOR=vim export ASPROOT=~/.asp export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.2.0/bin export LFS=/mnt/lfs @@ -89,6 +67,10 @@ fi if [ -f /usr/bin/virtualenvwrapper_lazy.sh ] then - # Automatically source virtualenv + # Automatically source virtualenv source /usr/bin/virtualenvwrapper_lazy.sh fi + +# displaying current virtual env +grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f' +zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs percent From bdf4ba32857f5d20c812b53cc3e67b111154fd6b Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sun, 28 Jun 2015 19:27:30 +0200 Subject: [PATCH 12/12] Adding syntax highlighting on arch. --- zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zshrc b/zshrc index c4ed756..fa88f8d 100644 --- a/zshrc +++ b/zshrc @@ -44,6 +44,7 @@ alias bootlfs='sudo screen -d -m VBoxHeadless -s LFS > /dev/null' alias emacs='emacs -nw' alias aiawiki='ssh aia -L 80:ldap2:80' alias rbtv='livestreamer twitch.tv/rocketbeanstv &' +alias taketv='livestreamer twitch.tv/taketv &' alias ls='ls --color=auto' export ASPROOT=~/.asp export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.2.0/bin @@ -71,6 +72,11 @@ then source /usr/bin/virtualenvwrapper_lazy.sh fi +if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] +then + source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +fi + # displaying current virtual env grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f' zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs percent