vendredi 4 décembre 2015

un peu d'historique et de tenue

À la suite de la lecture de cet article, j'ai été amené à modifier mes fichiers .bashrc et .vimrc pour les rendre plus sympas. J'ai regardé un peu d'autres ressources et voilà finalement ce que j'ai ajouté à mon .bashrc

# no duplicate in history
export HISTCONTROL=ignoreboth:erasedups

# do not make noise. Also visible can cause delays.
set bell-style none

# Don't echo ^C etc (new in bash 4.1)
# Note this only works for the command line itself,
# not if already running a command.
set echo-control-characters off

# Enable coloring for tab completions with bash >= 4.3
set colored-stats on

# Note this must be done before the settings below
# Caveats:
#   Broken on bash 3.2 (can't move cursor to EOL).
#   ^L only works in command mode and when line is empty
set editing-mode vi
set -o vi

# By default up/down are bound to previous-history
# and next-history respectively. The following does the
# same but gives the extra functionality where if you
# type any text (or more accurately, if there is any text
# between the start of the line and the cursor),
# the subset of the history starting with that text
# is searched (like 4dos for e.g.).
# Note to get rid of a line just Ctrl-C
bind '"\e[B": history-search-forward'
bind '"\e[A": history-search-backward'

Et voici les ajoûts de mon .vimrc :

set bs=2
let g:is_posix=1
set listchars=tab:>-,trail:.,extends:> 

Les autres suggestions ne m'ont pas intéressé finalement. Pour vim, je n'ai pas vu grande différence pour l'instant, mais pour bash, c'est nettement mieux !

Mais pour vim j'ai aussi installé deux extensions assez chouettes :

  1. syntastic pour la coloration syntaxique ;
  2. vim-airline pour une belle ligne d'état (vim et gvim).

Aucun commentaire:

Enregistrer un commentaire