Commit initial.

This commit is contained in:
Cacahuete 2022-03-26 22:10:37 +01:00
commit d3c1fbdeb6
4 changed files with 316 additions and 0 deletions

116
.bashrc Normal file
View File

@ -0,0 +1,116 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|xterm-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='| ${debian_chroot:+($debian_chroot)}\[\033[32m\]\u\[\033[37m\]@\[\033[31m\]\h\[\033[00m\]:\[\033[36m\]\W \[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
export TERM=xterm-256color

66
.tmux.conf Normal file
View File

@ -0,0 +1,66 @@
# Force 256 colors
set -g default-terminal "xterm-256color"
bind r source-file ~/.tmux.conf \; display-message " Configuration rechargée"
bind c command-prompt -p " Nom de la nouvelle fenêtre :" "new-window -n '%%'"
# I'm better off with the defaults
#bind | split-window -h
#bind - split-window -v
#unbind '"'
#unbind %
################################################################################
# Movements
# Better moves between windows
bind -n C-Left select-window -p
bind -n C-Right select-window -n
# Better moves between panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Vimify (a little)
set-window-option -g mode-keys vi
#bind -t vi-copy 'v' begin-selection
#bind -t vi-copy 'y' copy-selection
# TODO: Need to be able to copy to clipboard
################################################################################
# Global behaviour tuning
#set -g monitor-activity on
#set -g visual-activity on
set -g base-index 1
set -g pane-base-index 1
set -g history-limit 10000
set -g display-time 1000
################################################################################
# About the status bar
set -g status-style fg=black,bg=colour45
set -g status-justify centre
setw -g window-status-format '#[bg=colour27] #I #[bg=colour33] #W '
setw -g window-status-current-format '#[bg=colour165] #I #[bg=colour201] #W '
setw -g window-status-activity-style fg=colour124
set -g status-left '#[bg=colour27] #S #[bg=colour33] #h '
set -g status-right '' # Could display date/time :)
set -g status-left-length 30
set -g status-right-length 20
################################################################################
# Some more styling
set -g pane-border-style bg=default
set -g pane-border-style fg=white
set -g pane-active-border-style fg=cyan

125
.vimrc Normal file
View File

@ -0,0 +1,125 @@
" DISPLAY SETTINGS:
" Display line numbers
set number
"colorscheme desert
colorscheme slate
" Show the 80th column (recent VIM)
set colorcolumn=80
" Enable complete folding of windows
set winminheight=0
" Split options
set splitbelow
set splitright
" How to display invisible characters
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
noremap <F2> :set list!<CR>
" Scroll by x cols when wrapping enabled
set sidescroll=1
" Allways keep x cols around the cursor
set sidescrolloff=3
" Toggle wrap mode
noremap <F5> :set wrap!<CR>
" SEARCH SETTINGS:
set ignorecase
" Highlight search results
set hlsearch
" Search while typing
set incsearch
" Press F3 to toggle highlighting on/off, and show current value.
":noremap <F3> :set hlsearch! hlsearch?<CR>
noremap <F3> :nohlsearch<CR>
" EDITION SETTINGS:
" Insert space for tab
set expandtab
" One tab is x spaces
set tabstop=4
" Indentation is x spaces
set autoindent
set shiftwidth=4
" No automatic return carriage
set textwidth=0
" Allow for edition everywhere
"set virtualedit=all
noremap <F4> :set virtualedit=all<CR>
noremap <S-F4> :set virtualedit=""<CR>
" FROM INTERNET SETTINGS:
" enter the current millenium
set nocompatible
" enable syntax and plugins (for netrw)
syntax enable
filetype plugin on
" FINDING FILES:
" Search down into subfolders
" Provides tab-completion for all file-related tasks
set path+=**
" Display all matching files when we tab complete
set wildmenu
" NOW WE CAN:
" - Hit tab to :find by partial match
" - Use * to make it fuzzy
" THINGS TO CONSIDER:
" - :b lets you autocomplete any open buffer
" FILE BROWSING:
" Tweaks for browsing
let g:netrw_banner=0 " disable annoying banner
"let g:netrw_browse_split=4 " open in prior window
let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view
"let g:netrw_list_hide=netrw_gitignore#Hide()
"let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
" NOW WE CAN:
" - :edit a folder to open a file browser
" - <CR>/v/t to open in an h-split/v-split/tab
" - check |netrw-browse-maps| for more mappings
" SNIPPETS:
" Read an empty HTML template and move cursor to title
nnoremap ,html :-1read $HOME/.vim/.skeleton.html<CR>3jwf>a
" NOW WE CAN:
" - Take over the world!
" (with much fewer keystrokes)

9
README.md Normal file
View File

@ -0,0 +1,9 @@
Penser a supprimer les fichiers d'origine:
`rm .vimrc .tmux.conf .bashrc`
Et a creer un lien symbolique pour chaque:
`ln -s ~/config/.vimrc ~/.vimrc`