Postea tu .bashrc/alias/scripts/.vimrc

Iniciado por leogtz, 26 Junio 2011, 11:26 AM

0 Miembros y 1 Visitante están viendo este tema.

Dark Side

Pues actualmente tengo configurado lo siguiente:

.bash_aliases
Código (bash) [Seleccionar]

  alias cd..='cd ..'
  alias la='ls -la'
  alias ll='ls -l'
  alias pingg='ping google.com'
  alias update='sudo apt-get update'
  alias upgrade='sudo apt-get upgrade'
  alias aptinsall='sudo apt-get install'
  alias aptsearch='sudo apt-cache search'
  alias :q='exit'


.bashrc
Código (bash) [Seleccionar]

# User settings
screenfetch-dev
#PS1='\[\e[0;34m\][\W]\[\e[m\] ' Prompt en formato [dirActual]
#PS1='[\u@\h \W]\$ ' Prompt en formato [usr@host dirActual]
PS1='\n\e[0;37m\]┌─\e[1;34m\][\u@\h] - \e[0;37m\][\D{%d/%m/%y} - \t]\e[1;34m\] - [\w]\n\e[0;37m\]└─> \e[1;34m\]\$ \e[0;0m\]'


El prompt queda de la siguiente forma:

┌─[user@host] - [dd/mm/yy - HH:mm:ss] - [~]
└─> $

Y el .vimrc

  1 set number
  2 set wrap
  3 set incsearch
  4 set hlsearch
  5 set expandtab
  6 set autoindent
  7 set wildmenu
  8 set textwidth=80
  9 set tabstop=8
10
11 "Activar uso del mouse
12         set mouse=a
13
14 "Tecla para mostrar/ocultar NERDTree
15         map <F2> :NERDTreeToggle<cr>
16
17 "Tema
18         colorscheme desert
19
20 "Movimiento entre ventanas
21         map <C-J> <C-W>j<C-W>_
22         map <C-K> <C-W>k<C-W>_
23         map <C-L> <C-W>l<C-W>_
24         map <C-H> <C-W>h<C-W>_
25
26 "Movimiento entre pestañas
27         map <S-H> gT
28         map <S-L> gt


SalU2!
Dark Side

v4clox

Uso bastante la shell pero nunca me habia parado a configurarla, soy un mal linuxero...
Ser libre no es elegir a tu jefe.

Algabe

Código (bash) [Seleccionar]
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
alias ls='ls --color=auto'

export LANG=en_US.UTF-8
export EDITOR="nano"
export synclient VertEdgeScroll=1

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1500
HISTFILESIZE=3000

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups
HISTCONTROL=ignoredups
HISTIGNORE=":htop*:ls*:su*:history*:pacman*:exit*"

#PS1='[\u@\h \W]\$ '
#PS1='\[\033[0;41m\] \u@\h\[\033[01;36m\]\W \$ \[\033[00m\] '
#PS1='\[\e[1;32m\][\u\[\e[m\]@\[\e[1;33m\]\h\[\e[1;34m\] \w]\[\e[1;36m\] \$\[\e[1;37m\] '
#PS1='&#9484;&#9472;&#9472;[\u@\h][\w][\t]\n&#9492;&#9472;&#9472;[\$] '
#PS1='&#9484;&#9472;[\u][\A][\w]\n&#9492;&#9472;[\$] '
PS1='\[\e[1;34m\]&#9484;&#9472; \e[1;32m\u\e[m@\e[1;33m\h\e[1;34m [\e[m\t\e[1;34m] [\e[m\w\e[1;34m] \n &#9492;&#9472; $ \[\e[m\]'
#PS1='\[\033[1;32m\]\u@\h\[\033[1;36m\] \W \$\[\033[00m\] '

# 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 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 -lh --color=auto'
    alias ll='ls -lh --color=auto'
    alias dir='ls -lh --color=auto'
    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

setxkbmap -layout "latam" -option "grp:alt_shift_toggle"
set completion-ignore-case on
#siv -t -c4
alsi -a -u c1=blue c2=blue

J414NP3R


Me gustaría aumentar el margen en la terminal de gnome, debido a que por defecto no tiene márgenes.

A lo que me refiero es a aumentar el espacio entre el borde de la ventana y el texto de entrada/salida de la consola.

Por ejemplo:

=[X][-][ ]=============Mi Terminal==================
|                                                  |
|  $> echo "Hay margen arriba, a la izquierda y a  |
|  la derecha."                                    |
|                                                  |
|                                                  |
|                                                  |
====================================================


Si alguien tiene idea de como hacer esto le agradezco su ayuda.

Un saludo.

lawish

# .bashrc

# User specific aliases and functions

Ose nada de nada
GML group
Slacker

danny920825

Hola a todos, aqui traigo un script que me gustaria que revisaran y obvio que acepto sugerencias en cuanto al codigo. El objetivo es que haga una salva de las trazas del squid (access.log) en una carpeta llamada salvas ubicada en la raiz. Si puede ser mejorado, no se lo callen por favor.


#!/bin/bash
#INFORMACION DEL SCRIPT:
#ESTE SCRIPT SIRVE PARA HACER UNA SALVA DEL ACCESS.LOG DEL SQUID.

#VARIABLES
DIA=`date +%d`
MES=`date +%m`
YEAR=`date +%y`
HORA=`date +%H%M`
ARCHIVO=trazas-$DIA$MES$YEAR$HORA.log




#DETENER SQUID
service squid stop
echo "Squid detenido esperando 2 segundos para continuar"

#ESPERAMOS POR SI ACASO
sleep 2s

#MOVER EL ARCVHIVO DE LOS LOG's
echo "Moviendo el archivo de las trazas para /salvas/"
mv /var/log/squid/access.log /salvas/$ARCHIVO
echo "listo"


#CREACION DEL ARCHIVO NUEVO
echo "Creando el nuevo archivo en blanco"
touch /var/log/squid/access.log
echo "Listo"

#PERMISO DE ESCRITURA AL NUEVO ARCHIVO
echo "Asigando permisos al nuevo archivo"
chmod 777 /var/log/squid/access.log
echo "listo"

#INICIAMOS EL SQUID
echo "Iniciando el squid"
service squid start
echo "Listo, copia realizada con exito"

#ESPERAMOS POR SI ACASO
sleep 5s

#SALIMOS
exit 0
"Los que reniegan de Dios es por desesperación de no encontrarlo".
   Miguel de Unamuno

estudianteaprendiendo

muy interesante realmente estoy empezando a usar kali linux bueno no soy programador ni nada estoy estudiando otra cosa nada relacionado con informática pero encuentro interesante todo esto tengo un problema con eso de que no se reconoce un comando eso de la modificacion .bashrc podria aydarme ?

#msfpayload -h
bash: msfpayload : no se encontro la orden

es lo que me aparece espero puedan orientar mese que esto ya lo e colocado en un tema pero al leer un poco de tu proyecto me resulta interesante saber si puede solucionar mi problema  y si no igualmente gracias

dac

#37
.zshrc

#{{{ ZSH Modules
   autoload -U compinit promptinit zcalc zsh-mime-setup
   autoload -U colors && colors
   autoload -Uz vcs_info
   compinit
   promptinit
   zsh-mime-setup
#}}}

#{{{ Options
   # See `man zshoptions`

   setopt CORRECT
   setopt GLOB_COMPLETE
   setopt RM_STAR_WAIT
   setopt ZLE
   setopt VI
   setopt NO_HUP
   setopt IGNORE_EOF
   setopt NO_BEEP
   setopt NUMERIC_GLOB_SORT
   setopt EXTENDED_GLOB
   setopt RC_EXPAND_PARAM
   setopt APPEND_HISTORY
   setopt  COMPLETE_IN_WORD
   setopt prompt_subst
   setopt nohashdirs
   setopt nohashcmds
   unsetopt FLOW_CONTROL
   unsetopt LIST_AMBIGUOUS

   # History options
   setopt EXTENDED_HISTORY
   setopt SHARE_HISTORY
   setopt HIST_IGNORE_DUPS
   setopt HIST_IGNORE_ALL_DUPS
   setopt HIST_REDUCE_BLANKS
   setopt HIST_IGNORE_SPACE
   setopt HIST_NO_STORE
   setopt HIST_VERIFY
   setopt HIST_SAVE_NO_DUPS
   setopt HIST_EXPIRE_DUPS_FIRST
   setopt HIST_FIND_NO_DUPS
#}}}

#{{{ Variables
   export EDITOR=vim
   export PAGER=less
   export JAVA_HOME="/usr"
   export _JAVA_AWT_WM_NONREPARENTING=1
   export KEYTIMEOUT=1  # Reduce vi-mode lag
   export ANDROID_HOME="/opt/android-sdk"
   export ANDROID_SWT="/usr/share/java"
   export ANDROID_TOOLS="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
   export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/opt/opencascade/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:$ANDROID_TOOLS"
   declare -U path

   # History
   HISTFILE=~/.history
   SAVEHIST=1000
   HISTSIZE=1000
#}}}

#{{{ Aliases
   alias x='startx'
   alias p='ping 8.8.8.8'
   alias ls='ls --color'
   alias vi='/usr/bin/vim'
   alias vim='nvim'
   alias emacs='emacs -nw'
   alias am='alsamixer' alsamixer='alsamixer -g -c 0'
#}}}

#{{{ Completion
   # See `man zshcompsys

   zstyle ':completion::complete:*' use-cache 1
   zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
   zstyle ':completion:*' verbose yes
   zstyle ':completion:*:descriptions' format '%B%d%b'
   zstyle ':completion:*:messages' format '%d'
   zstyle ':completion:*' group-name ''
   zstyle ':completion:*' auto-description 'specify: %d'
   zstyle ':completion:*:default' list-prompt '%S%M matches%s'
   zstyle ':completion:*:default' menu 'select=0'
   zstyle ':completion:*' file-sort modification reverse
   zstyle ':completion:*' list-colors "=(#b) #([0-9]#)*=36=31"
   zstyle ':completion:*:manuals' separate-sections true
   zstyle ':completion:*:corrections' format '%B%d (errors %e)%b'
   zstyle ':completion::*:(rm|vi):*' ignore-line true
   zstyle ':completion:*' ignore-parents parent pwd
   zstyle ':completion::approximate*:*' prefix-needed false
#}}}

#{{{ Key bindings
   # Special keys works properly

   bindkey '\e[1~' beginning-of-line
   bindkey '\e[4~' end-of-line
   bindkey '\e[A' up-line-or-history
   bindkey '\e[B' down-line-or-history
   bindkey '\eOA' up-line-or-history
   bindkey '\eOB' down-line-or-history
   bindkey '\e[C' forward-char
   bindkey '\e[D' backward-char
   bindkey '\eOC' forward-char
   bindkey '\eOD' backward-char
#}}}

#{{{ Prompt
   zstyle ':vcs_info:*' stagedstr '%F{28}^'
   zstyle ':vcs_info:*' unstagedstr '%F{11}^'
   zstyle ':vcs_info:*' check-for-changes true
   zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r'
   zstyle ':vcs_info:*' enable git svn

   precmd()
   {
       if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
           zstyle ':vcs_info:*' formats ' [%F{green}%b%c%u%F{normal}]'
       } else {
           zstyle ':vcs_info:*' formats ' [%F{green}%b%c%u%F{red}^%F{normal}]'
       }

       vcs_info
   }

   PROMPT='%{$fg[blue]%}%B%n%b%{$reset_color%}@%{$fg[magenta]%}%B%M%b%{$reset_color%} %1~ ${vcs_info_msg_0_}%{$reset_color%}%# '
#}}}

#{{{ Vi-mode
   # From `oh-my-zsh` vi-mode plugin

   # Ensures that $terminfo values are valid and updates editor information when
   # the keymap changes.
   function zle-keymap-select zle-line-init zle-line-finish {
     # The terminal must be in application mode when ZLE is active for $terminfo
     # values to be valid.
     if (( ${+terminfo[smkx]} )); then
       printf '%s' ${terminfo[smkx]}
     fi
     if (( ${+terminfo[rmkx]} )); then
       printf '%s' ${terminfo[rmkx]}
     fi

     zle reset-prompt
     zle -R
   }

   # Ensure that the prompt is redrawn when the terminal size changes.
   TRAPWINCH() {
     if [[ -o zle ]]; then
       zle reset-prompt
       zle -R
     fi
   }

   zle -N zle-line-init
   zle -N zle-line-finish
   zle -N zle-keymap-select
   zle -N edit-command-line


   bindkey -v

   # Avoid dropping keystrokes after ESC hit
   bindkey -as '\e' ''

   # allow v to edit the command line
   # autoload -Uz edit-command-line
   # bindkey -M vicmd 'v' edit-command-line

   # allow ctrl-p, ctrl-n, ctrl-r for navigate history (standard behaviour)
   bindkey '^P' up-history
   bindkey '^N' down-history
   bindkey '^r' history-incremental-search-backward

   # Incrementar search for / and ?
   bindkey -M vicmd "/" history-incremental-search-backward
   bindkey -M vicmd "?" history-incremental-search-forward

   # allow ctrl-h, ctrl-w, ctrl-? for char and word deletion (standard behaviour)
   bindkey '^?' backward-delete-char
   bindkey '^h' backward-delete-char
   bindkey '^w' backward-kill-word

   # Some extra vim like bindings
   bindkey -a 'gg' beginning-of-buffer-or-history
   bindkey -a 'G' end-of-buffer-or-history
   bindkey -a 'u' undo
   bindkey -a '^R' redo

   # Mode indicator right prompt
   function zle-line-init zle-keymap-select
   {
       RPS1="${${KEYMAP/vicmd/}/(main|viins)/-- INSERT --}"
       RPS2=$RPS1
       zle reset-prompt
   }

   # Allow Copy/Paste with the system clipboard
   # behave as expected with vim commands ( y/p/d/c/s )
   [[ -n $DISPLAY ]] && (( $+commands[xclip] )) && {

     function cutbuffer() {
       zle .$WIDGET
       echo $CUTBUFFER | xclip -selection clipboard
     }

     zle_cut_widgets=(
       vi-backward-delete-char
       vi-change
       vi-change-eol
       vi-change-whole-line
       vi-delete
       vi-delete-char
       vi-kill-eol
       vi-substitute
       vi-yank
       vi-yank-eol
     )
     for widget in $zle_cut_widgets
     do
       zle -N $widget cutbuffer
     done

     function putbuffer() {
       zle copy-region-as-kill "$(xclip -selection clipboard -o)"
       zle .$WIDGET
     }

     zle_put_widgets=(
       vi-put-after
       vi-put-before
     )
     for widget in $zle_put_widgets
     do
       zle -N $widget putbuffer
     done
   }
#}}}

#{{{ Misc
   # Deactivate Software flow control
   stty -ixon

   # Set proper terminal for SCREEN and TMUX
   if [[ -z $TMUX ]]; then
       if [ -e /usr/share/terminfo/x/xterm+256color ]; then
           export TERM='xterm-256color'
       else
           export TERM='xterm'
       fi
   else
       if [ -e /usr/share/terminfo/s/screen-256color ]; then
           # export TERM='screen-256color'
           export TERM='xterm-256color'
       else
           export TERM='screen'
       fi
   fi

   # Autorun TMUX (Only when X11 is running)
   # if [[ (-e /tmp/.X0-lock) ]]; then
   #     if [[ -n $TMUX ]]; then
   #         # Tmux running, do nothing
   #     else
   #         tmux -2
   #     fi
   # fi
#}}}

#{{{ First Init
   # Auto start X11 and Wifi connection
   if [[ ! (-e /tmp/.X0-lock) ]]; then
       # ~/.wifi.sh
       ./.ether.sh
       startx
   fi
#}}}


# vim:fdm=marker





.nvimrc

"{{{ VIM-PLUG
   call plug#begin('~/.vim/plugged')
   Plug 'wellle/targets.vim'
   Plug 'tpope/vim-commentary'
   Plug 'tpope/vim-surround'
   Plug 'tpope/vim-fugitive'
   Plug 'tpope/vim-unimpaired'
   Plug 'tpope/vim-repeat'
   Plug 'michaeljsmith/vim-indent-object'
   Plug 'scrooloose/syntastic'
   Plug 'scrooloose/nerdtree'
   Plug 'vim-scripts/taglist.vim'
   Plug 'kien/ctrlp.vim'
   Plug 'thanthese/Tortoise-Typing'
   Plug 'mbbill/undotree'
   Plug 'alx741/vinfo'
   Plug 'godlygeek/tabular'
   Plug 'bruno-/vim-man'
   Plug 'altercation/vim-colors-solarized'
   Plug 'junegunn/goyo.vim'
   Plug 'jceb/vim-orgmode'
   Plug 'EinfachToll/DidYouMean'
   Plug 'tommcdo/vim-exchange'
   Plug 'vitalk/vim-simple-todo'
   Plug 'powerman/vim-plugin-viewdoc'

   " On-demand loading
   Plug 'scrooloose/syntastic', { 'on': 'SyntasticCheck' }
   Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
   Plug 'vim-scripts/taglist.vim', { 'on': 'TlistToggle' }
   Plug 'thanthese/Tortoise-Typing', { 'on': 'TortoiseTyping' }
   Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' }
   Plug 'alx741/vinfo', { 'on': 'Vinfo' }
   Plug 'godlygeek/tabular', { 'on': 'Tabularize' }
   Plug 'bruno-/vim-man', { 'on': 'Man' }
   Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
   call plug#end()
"}}}


"{{{ Auto Commands
   " Reset format options when filetypes are loaded
   autocmd FileType * set formatoptions=tcrql

   " Trigger StyleMarks
   autocmd VimEnter,BufWinEnter,BufWinLeave * call StyleMarks()
"}}}


"{{{ Maps
   " Get raid of vim 'exclusivity' madness
   " All movements are now inclusive
   " onoremap h vh
   " onoremap l vl
   " onoremap b vb
   " onoremap B vB
   " onoremap F vF
   " onoremap T vT
   " onoremap ^ v^
   " onoremap g^ vg^
   " onoremap + v+
   " onoremap g+ vg+
   " onoremap ( v(
   " onoremap ` v`

   " Move with visual lines
   nnoremap j gj
   nnoremap k gk
   nnoremap J gJ
   nnoremap 0 g0
   nnoremap ^ g^
   nnoremap $ g$

   " Search for visual selected area
   vnoremap // y/<C-R>"<CR>

   " Terminal mode leaving
   tnoremap <esc> <C-\><C-n>

   " Toggle folds
   nnoremap <space> za

   " Remove highlights using escape (this prevent using especial keys mappings!)
   nnoremap <silent><esc> :noh<CR><esc>

   """"  LEADER mappings
   " Remove trailing white spaces ( \w )
   map <silent><leader>f :call Format() <CR>
   " Toggle spelling ( \s )
   nnoremap <leader>s :call ToggleSpell() <cr>
   " Trigger TagList plugin ( \t )
   nnoremap <leader>t :TlistToggle <cr>
   " Trigger UndoTree plugin ( \u )
   nnoremap <leader>u :UndotreeToggle <cr>
   " Trigger NerdTree plugin ( \n )
   nnoremap <leader>n :NERDTreeToggle <cr>
   " Trigger Ctags program for the current directory
   nnoremap <silent><leader>c :!ctags -R . <cr>
"}}}


"{{{ Options and Configurations
   " Status line
   set statusline=[%n]\ %t\ [%{strlen(&fenc)?&fenc:'none'},\ %{&ff}]
   set statusline+=\ [ft=%Y]\ %r\ %m
   set statusline+=%=%c:%l/%L\ %P

   " Color scheme
   colors solarized

   " Set various options
   syntax on
   syntax spell toplevel
   set t_CO=16
   set lazyredraw
   set textwidth=80
   set linebreak
   set timeoutlen=1000 ttimeoutlen=0
   " set cursorline
   set tabstop=4
   set softtabstop=4
   set shiftwidth=4
   set expandtab
   set smarttab
   set showcmd
   set completeopt-=preview
   set completeopt+=longest
   set number
   set showmatch
   set hlsearch
   set incsearch
   set ignorecase
   set smartcase
   set backspace=2
   set autoindent
   set cindent
   set ruler
   set autoread
   set nojoinspaces
   set background=light
   set wrapscan
   set laststatus=2
   set wildmenu
   set wildmode=longest,list,full
   set wildignore=*.o,*.class
   set hidden
   set foldenable
   set foldmethod=syntax
   set foldnestmax=2
   set foldlevel=3
   let c_no_comment_fold=1

   " Formatting options:
   "  * Auto wrap text using textwidth
   "  * Auto wrap comments using textwidth
   "  * Auto insert comment leader while inserting
   "  * Auto formatting of paragraphs
   "  * Don't auto brake lines
   set formatoptions=tcrql

   " Config the backup system
   set backup
   set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
   set backupskip=/tmp/*,/private/tmp/*
   set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
   set writebackup
"}}}


"{{{ Plugins configuration
   " Syntastic
   let $PYTHONPATH='/usr/lib/python3.4/site-packages'
   let g:syntastic_mode_map = {
       \ 'mode' : 'passive',
       \ 'active_filetypes' : [],
       \ 'passive_filetypes' : [] }

   " Targets
   " let g:targets_aiAI = 'aIAi'
"}}}


"{{{ Misc
   " Set SDCC paths
   set path+=/usr/share/sdcc/include/pic14,/usr/share/sdcc/include/pic16
   set path+=/usr/share/sdcc/non-free/include/pic14,/usr/share/sdcc/non-free/include/pic16

   " Sudo Write
   command W w !sudo tee % >/dev/null
"}}}


"{{{ Personal functions

   " Help files tags jump
   " [g , ]g
   nmap [g <Plug>unimpairedHelpTagPrevious
   nmap ]g <Plug>unimpairedHelpTagNext

   nnoremap <silent> <Plug>unimpairedHelpTagPrevious :call <SID>HelpTag(1)<CR>
   nnoremap <silent> <Plug>unimpairedHelpTagNext     :call <SID>HelpTag(0)<CR>

   function! s:HelpTag(reverse)
     call search('|\S\+|', a:reverse ? 'bW' : 'W')
   endfunction


   " Format document
   "
   " * Removes trailing white spaces
   " * Removes blank lines at the end of the file
   " * Replaces tabs with spaces
   " * Re-Indent
   "
   " * If: C, CPP, PHP or JAVA code: format using 'astyle'
   "       * Style: allman
   "       * Braces in the first column
   "       * Spaces between operators
   "
   " * Leaves 'formatprg' option clean so `gq` can be used with the default
   "   behavior
   function! Format()
       silent! execute 'norm! mz'

       if &ft ==? 'c' || &ft ==? 'cpp' || &ft ==? 'php'
           set formatprg=astyle\ --mode=c\ --style=allman\ -j\ -p\ -f\ -xe\ -xC80\ -H
           silent! execute 'norm! gggqG'
       elseif &ft ==? 'java'
           set formatprg=astyle\ --mode=java\ --style=allman\ -j\ -p\ -f\ -xe\ -xC80\ -H
           silent! execute 'norm! gggqG'
       endif

       silent! execute '%s/\s\+$//ge'
       silent! execute 'g/\v^$\n*%$/norm! dd'
       silent! execute 'retab'
       silent! execute 'gg=G'
       silent! execute 'norm! `z'
       set formatprg=
   endfunction


   " Alternate between { NOSPELL, EN, ES } spelling
   function! ToggleSpell()
       if &spell ==? 0
           set spelllang=en
           set spell
           echom "Spell [EN]"

       elseif &spell ==? 1
           if &spelllang ==? 'en'
               set spelllang=es
               echom "Spell [ES]"

           elseif &spelllang ==? 'es'
               set spelllang=en
               set nospell
               echom "NO Spell"
           endif
       endif
   endfunction


   " Marks over length lines and trailing white spaces as errors
   function! StyleMarks()
       highlight OverLength ctermbg=blue ctermfg=white
       call matchadd('OverLength', '\%81v.\+', 100)

       highlight Trailing ctermbg=blue ctermfg=white
       call matchadd('Trailing', '\s\+$', 100)

       highlight Debugme ctermbg=red ctermfg=white
       call matchadd('Debugme', 'debugme', 100)
       call matchadd('Debugme', 'DEBUGME', 100)
   endfunction
"}}}

" vim:fdm=marker





.tmux.conf

# Set the current working directory based on the current pane's current
# working directory (if set; if not, use the pane's starting directory)
# when creating # new windows and splits.
bind-key c new-window -c '#{pane_current_path}'
bind-key '"' split-window -c '#{pane_current_path}'
bind-key % split-window -h -c '#{pane_current_path}'

# use UTF8
set -g utf8
set-window-option -g utf8 on

# Index start from 1 (insted of 0)
set -g base-index 1

set -g status-keys vi
set -g history-limit 10000
setw -g mode-keys vi
setw -g mode-mouse off

# make tmux display things in 256 colors
set -g default-terminal "screen-256color"

# set scrollback history to 10000 (10k)
set -g history-limit 10000

# set Ctrl-s as the default prefix key combination
# and unbind C-b to free it up
set -g prefix C-s
unbind C-b

# use send-prefix to pass C-a through to application
bind C-s send-prefix

# shorten command delay
set -sg escape-time 1


# map Vi movement keys as pane movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# map Vi selectio/copy keys
bind-key -t vi-copy 'v' begin-selection # Begin selection in copy mode.
bind-key -t vi-copy 'C-v' rectangle-toggle # Begin selection in copy mode.
bind-key -t vi-copy 'y' copy-selection # Yank selection in copy mode


# resize panes using PREFIX H, J, K, L
bind-key H resize-pane -L 5
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key L resize-pane -R 5


#### COLOR (Solarized light)
#
## default statusbar colors
set-option -g status-bg white #base2
set-option -g status-fg yellow #yellow
set-option -g status-attr default
#
## default window title colors
set-window-option -g window-status-fg brightyellow #base00
set-window-option -g window-status-bg default
##set-window-option -g window-status-attr dim
#
## active window title colors
set-window-option -g window-status-current-fg brightred #orange
set-window-option -g window-status-current-bg default
##set-window-option -g window-status-current-attr bright
#
## pane border
set-option -g pane-border-fg white #base2
set-option -g pane-active-border-fg brightcyan #base1
#
## message text
set-option -g message-bg white #base2
set-option -g message-fg brightred #orange
#
## pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
#
## clock
set-window-option -g clock-mode-colour green #green


# ----------------------
# Status Bar
# -----------------------
set -g status-right '#(~/.tmuxbar.sh)'
set-option -g status on                # turn the status bar on
set -g status-utf8 on                  # set utf-8 for the status bar
set -g status-interval 15              # set update frequency (default 15 seconds)
set -g status-justify centre           # center window list for clarity
# set-option -g status off                      # Hide tmux bar by default
bind-key a set -g status               # Toggle tmux bar visibility
# set-option -g status-position top    # position the status bar at top of screen

# visual notification of activity in other windows
# setw -g monitor-activity on
# set -g visual-activity on



#######################
# Tmux Plugin manager
#######################

# List of plugins
# Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins '              \
 tmux-plugins/tpm                 \
 tmux-plugins/tmux-sensible       \
 tmux-plugins/tmux-resurrect       \
 tmux-plugins/tmux-yank       \
'
# Other examples:
# github_username/plugin_name    \
# git@github.com/user/plugin     \
# git@bitbucket.com/user/plugin  \

# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'





.ratpoisonrc

#{{{ Bindigs
   # Escape
   escape C-g

   # Abort with ESC
   bind Escape abort

   # Only window
   unbind q
   bind o only

   # Start graphical terminal emulator instance
   bind c exec gnome-terminal

   # Give temporally control to DWM
   bind W tmpwm dwm

   # Close current window
   bind Q delete
   unbind C-k

   # Vi keys
   bind j focusdown
   bind h focusleft
   bind k focusup
   bind l focusright
   bind J exchangedown
   bind H exchangeleft
   bind K exchangeup
   bind L exchangeright

   # Vi splits
   unbind S
   bind s vsplit
   bind v hsplit
#}}}

# Banish the mouse pointer in every window change
addhook key banish

# Put cursor where it was previously
warp on

# Don't convert cursor in a box while waiting commands
set waitcursor 0

# Messages config
msgwait 2
startup_message off
set fgcolor black
set bgcolor papaya whip

# More informative date and time
bind a exec ratpoison -c "echo $( acpi -b | awk '{ print $3, $4 }' | tr -d ',' ) ||  $( date "+%F %r" )"

# If there is more than 1 screen, give focus to the second one
nextscreen

# vim:fdm=marker



Me han fascinado muchos ficheros de configuracion, buen post. Saludos cordiales desde Ecuador!

qwartz 2.0

Ya es algo viejo el post pero igual y alguien le sirve :D

Dotfiles: https://github.com/qwartz2/dotfiles

VIM
Tengo la config. de vim dividida en varios archivos, solo por tener un poco mas organizado nada especial.

~/
.vimrc
.vim/
   |- vimrc/
      |- basic.vim
      |- plugins.vim
   |- colors/
       |- hybrid.vim

*hybrid.vim es el esquema de colores que utilizo para vim

~/.vimrc
Código (python) [Seleccionar]

source ~/.vim/vimrc/basic.vim
source ~/.vim/vimrc/plugins.vim


~/.vim/vimrc/basic.vim
Código (python) [Seleccionar]

"
" Basic Config. of VIM
" Author - @qwartz_
"

" -----------------------
" General
" -----------------------

"/*
set encoding=utf8
set nocompatible
set history=1000
" set colorcolumn=80
"*/

"/* Not Backup
set noswapfile
set nobackup
"*/

"/* Indented
set autoindent
set expandtab       
set shiftwidth=4
set softtabstop=4
"*/

"/* Folding
set foldmethod=marker
set foldmarker=/*,*/
"*/

" -----------------------
"  Interface
" -----------------------

"/* Basic
set background=dark
colorscheme hybrid
syntax on
set number
"*/

"/* More
set relativenumber
set cursorline
set cursorcolumn
set showmatch " opening and closing parentheses
set mouse=a
set ruler
set laststatus=2 " status  bar
set wildmenu " autocomplete bar
set t_Co=256
"*/

" -----------------------
"  Basic Mapping
" -----------------------
let mapleader=","

"/* change column numbers
nmap <F5> :set invrelativenumber<CR>
imap <F5> <ESC>:set invrelativenumber<CR>a
"*/

"/* resize panels
nmap h :vertical res +2<CR>
nmap l :vertical res -2<CR> 
nmap j :res +2<CR>
nmap k :res -2<CR>
"*/

"/* split window
nmap <Leader>h :split<CR>
nmap <Leader>v :vsplit<CR>
"*/



~/.vim/vimrc/plugins.vim
Código (python) [Seleccionar]

" Plugins
" Author - @qwartz_
"
" -----------------------
"  Plugins
" -----------------------
call plug#begin('~/.vim/plugged')

"/* list plugins
" Uncomment the plugins you want to install!
" Basic;
Plug 'jiangmiao/auto-pairs'
Plug 'vim-scripts/AutoComplPop'
Plug 'scrooloose/nerdtree'   
"
" More;
"Plug 'ervandew/supertab'
" ----> Snippets <----
"Plug 'garbas/vim-snipmate'
"Plug 'MarcWeber/vim-addon-mw-utils'
"Plug 'tomtom/tlib_vim'
"Plug 'garbas/vim-snipmate'
"Plug 'honza/vim-snippets'
"*/
call plug#end()

" -----------------------
"  Config. Plugins
" -----------------------

"/* NERDTree
nmap <Leader>nt :NERDTreeToggle<CR>
let NERDTreeQuitOnOpen=1
let NERDTreeWinSize=20
"*/


*Para instalar plugins utilizo: vim-plug















¿Eres un uno o un cero?