Browse Source

Add some config files

Andrea Miglietta 7 years ago
parent
commit
df63dd399f
10 changed files with 158 additions and 5 deletions
  1. 0 1
      .bashrc
  2. 41 0
      .bashrc
  3. 0 1
      .gitconfig
  4. 5 0
      .gitconfig
  5. 0 1
      .pythonrc
  6. 18 0
      .pythonrc
  7. 0 1
      .vim/colors/tshdarkbg.vim
  8. 36 0
      .vim/colors/tshdarkbg.vim
  9. 0 1
      .vimrc
  10. 58 0
      .vimrc

+ 0 - 1
.bashrc

@@ -1 +0,0 @@
-/home/andreatsh/.bashrc

+ 41 - 0
.bashrc

@@ -0,0 +1,41 @@
+# ~/.bashrc
+
+# If not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+# Don't put duplicate lines in the history
+# Don't save commands which start with a space
+export HISTCONTROL=ignoredups:erasedups:ignorespace
+export HISTTIMEFORMAT="%Y/%m/%d %R "
+export HISTFILESIZE=100000
+
+# Append to the history file, don't overwrite it
+shopt -s histappend
+
+PS1='\[\033[01;34m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h\[\033[00;37m\]:\[\033[01;35m\]\w \A \[\033[00m\]$ '
+
+
+if [[ -f /etc/bash_completion ]]
+then
+    source /etc/bash_completion
+fi
+
+if [[ -r $HOME/.bash_aliases ]]
+then
+    source $HOME/.bash_aliases
+fi
+
+if [[ -x /usr/bin/dircolors ]]
+then
+	if [[ -r $HOME/.colors ]]
+    then
+        eval $(dircolors $HOME/.colors)
+    else
+		echo nonciao
+        eval $(dircolors -b)
+    fi
+fi
+
+export EDITOR='/usr/bin/vim'
+export PYTHONSTARTUP=$HOME/.pythonrc
+

+ 0 - 1
.gitconfig

@@ -1 +0,0 @@
-/home/andreatsh/.gitconfig

+ 5 - 0
.gitconfig

@@ -0,0 +1,5 @@
+[user]
+	name = Andrea Miglietta
+	email = andrea.miglietta92@gmail.com
+[github]
+    user = andreatsh

+ 0 - 1
.pythonrc

@@ -1 +0,0 @@
-/home/andreatsh/.pythonrc

+ 18 - 0
.pythonrc

@@ -0,0 +1,18 @@
+# Python startup config file 
+# Created by andreatsh 
+
+import atexit, os 
+import rlcompleter, readline
+
+readline.parse_and_bind('tab:complete')
+historyPath = os.path.expanduser("~/.pyhistory")
+
+def save_history(historyPath=historyPath):
+   readline.write_history_file(historyPath)
+
+if os.path.exists(historyPath):
+   readline.read_history_file(historyPath)
+
+atexit.register(save_history)
+
+

+ 0 - 1
.vim/colors/tshdarkbg.vim

@@ -1 +0,0 @@
-/home/andreatsh/.vim/colors/tshdarkbg.vim

+ 36 - 0
.vim/colors/tshdarkbg.vim

@@ -0,0 +1,36 @@
+"
+" Author: Andrea Miglietta <andrea.miglietta92@gmail.com>
+"
+
+hi clear
+if exists("syntax_on")
+    syntax reset
+endif
+
+set background=dark
+let g:colors_name = "tshdarkbg"
+
+
+" highlight group
+" see :help highlight-group
+hi Comment      ctermfg=14     ctermbg=NONE   term=NONE        
+"hi DiffAdd      ctermfg=0      ctermbg=10     term=NONE 
+"hi DiffChange   ctermfg=0      ctermbg=11     term=NONE 
+"hi DiffDelete   ctermfg=0      ctermbg=9      term=NONE 
+"hi DiffText     ctermfg=0      ctermbg=3      term=NONE 
+hi IncSearch    ctermfg=9      ctermbg=11     term=NONE        
+hi Normal       ctermfg=7      ctermbg=0      term=NONE        
+hi Search       ctermfg=9      ctermbg=11     term=bold,reverse
+hi Visual       ctermfg=NONE   ctermbg=240    term=reverse     
+hi WildMenu     ctermfg=0      ctermbg=11     term=bold        
+
+" syntax highlighting for group-name
+" see :help group-name
+hi Constant     ctermfg=13     ctermbg=NONE
+hi Error        ctermfg=7      ctermbg=9
+hi Preproc      ctermfg=140    ctermbg=NONE
+hi Special      ctermfg=9      ctermbg=NONE
+hi Statement    ctermfg=130    ctermbg=NONE
+hi Type         ctermfg=40     ctermbg=NONE
+hi Todo         ctermfg=11     ctermbg=8      cterm=bold
+

+ 0 - 1
.vimrc

@@ -1 +0,0 @@
-/home/andreatsh/.vimrc

+ 58 - 0
.vimrc

@@ -0,0 +1,58 @@
+" Make Vim no Vi-compatible
+set nocompatible
+
+" Enable syntax highlighting on a dark background
+syntax on
+set background=dark
+
+" Indentation/Tab 
+set autoindent
+set expandtab     
+set shiftwidth=4   
+set tabstop=4      
+"set textwidth=79
+
+" Incremental and highlight search
+set incsearch
+set hlsearch
+
+" Default history value is 20
+set history=100    
+
+" Press F12 before pasting text to avoid crazy indentation
+set pastetoggle=<F12>
+
+" Show matching brackets.
+set showmatch
+
+" Enable wildmenu 
+set wildmenu
+set wildignore+=*.swp,*.bak
+set wildignorecase
+set wildmode=full
+
+" Set backup 
+if has("vms")
+  set nobackup
+else
+  set backup 
+  set backupdir=~/.vim/backup
+  set directory=~/.vim/swap
+endif
+
+" Jump to the last position when reopening a file
+if has("autocmd")
+  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
+endif
+
+" Load personal colorscheme
+colo tshdarkbg
+
+nnoremap ;b :buffer *
+
+augroup Shebang
+  autocmd BufNewFile *.sh 0put =\"#!/bin/bash\"|$
+  autocmd BufNewFile *.py 0put =\"#!/usr/bin/python\"|$
+augroup END
+
+