Diferencia entre revisiones de «ConfigsProgramas»

De GhostWiki
Saltar a: navegación, buscar
(Página nueva: Configuraciones para distintos programas: !!!Screen !!Configuración .screenrc <pre> # Screen usado normalmente por Yuki # Skip the startup message startup_message off caption alwa...)
 
Línea 1: Línea 1:
 
Configuraciones para distintos programas:
 
Configuraciones para distintos programas:
 +
Screen
 +
Configuración .screenrc
  
!!!Screen
 
 
!!Configuración .screenrc
 
<pre>
 
 
# Screen usado normalmente por Yuki
 
# Screen usado normalmente por Yuki
 
# Skip the startup message
 
# Skip the startup message
Línea 12: Línea 10:
 
caption string "%{Bk}%-w%{kB}%n %t%{-}%+w      %=| %0c | %Y-%m-%d "
 
caption string "%{Bk}%-w%{kB}%n %t%{-}%+w      %=| %0c | %Y-%m-%d "
 
#hardstatus alwayslastline
 
#hardstatus alwayslastline
#hardstatus string "%{= kg}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}]%{=b C}[ %d %M %c ]%{W}"
+
#hardstatus string "%{= kg}%{G}%H %{g}?%= %{= kw}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}?%{=b C}%d %M %c?%{W}"
  
 
#para ir a la ventana anterior y siguiente
 
#para ir a la ventana anterior y siguiente
Línea 45: Línea 43:
 
bind -c select_2n 9 select 29
 
bind -c select_2n 9 select 29
 
bind -c select_2n - select -
 
bind -c select_2n - select -
</pre>
 
  
----
+
Ejemplo con splits
!!Ejemplo con splits
+
 
<pre>
 
 
split -v
 
split -v
 
screen -t bash bash
 
screen -t bash bash
Línea 68: Línea 64:
 
caption always
 
caption always
 
hardstatus alwayslastline "%{Bk}%-w%{kB}%n %t%{-}%+w      %=| %0c | %Y-%m-%d "
 
hardstatus alwayslastline "%{Bk}%-w%{kB}%n %t%{-}%+w      %=| %0c | %Y-%m-%d "
</pre>
 
  
!!!Terminator
+
Terminator
!!Ejemplo de configuración sencilla
+
Ejemplo de configuración sencilla
<pre>
+
 
 
scrollbar_position=disabled
 
scrollbar_position=disabled
 
background_color=#31353A
 
background_color=#31353A
Línea 78: Línea 73:
 
font=Mono 11
 
font=Mono 11
 
palette=#000000000000:#aaaa00000000:#0000aaaa0000:#aaaa55550000:#00000000aaaa:#aaaa0000aaaa:#0000aaaaaaaa:#aaaaaaaaaaaa:#555555555555:#ffff55555555:#5555ffff5555:#ffffffff5555:#55555555ffff:#ffff5555ffff:#5555ffffffff:#ffffffffffff
 
palette=#000000000000:#aaaa00000000:#0000aaaa0000:#aaaa55550000:#00000000aaaa:#aaaa0000aaaa:#0000aaaaaaaa:#aaaaaaaaaaaa:#555555555555:#ffff55555555:#5555ffff5555:#ffffffff5555:#55555555ffff:#ffff5555ffff:#5555ffffffff:#ffffffffffff
</pre>
 
 
!!!.emacs
 
<pre>
 
;;Añadir extensiones de ficheros a los modos.
 
(add-to-list 'auto-mode-alist '("\\.icc" . c++-mode))
 
(add-to-list 'auto-mode-alist '("\\.c.in" . c-mode))
 
(add-to-list 'auto-mode-alist '("\\.xml.in" . sgml-mode))
 
(add-to-list 'auto-mode-alist '("\\.xslt" . sgml-mode))
 
(add-to-list 'auto-mode-alist '("\\.xslt.in" . sgml-mode))
 
 
;;Tabulador de 4
 
(setq default-tab-width 4);
 
 
;;Arrancar el servidor de emacs, para poder utilizar emacsclient (para no abrir otra ventana al escribir los correos con un editor externo)
 
;;To start the server... to allow emacsclient use
 
(server-start)
 
 
;;Asociar función con la tecla F9, que nos pregunta por el comando a ejecutar y nos pone el output en donde estemos con el cursor.
 
  
(defun ska-insert-exec-text (command)
+
.emacs
  "Insert the output of an executable programm at the
 
current cursor postion."
 
  (interactive "sEnter command-string:  \n")
 
  (insert (shell-command-to-string  command)))
 
;; If you do not use GNUEmacs, try with this other command
 
;;  (insert (exec-to-string command)))
 
(global-set-key (kbd "<f9>") 'ska-insert-exec-text)
 
  
</pre>
+
.vimrc
  
!!!.vimrc
 
<pre>
 
 
"Para usar consola de fondo oscuro
 
"Para usar consola de fondo oscuro
 
set background=dark
 
set background=dark
Línea 128: Línea 95:
  
 
"Subrayame la línea actual, pa localizarme rapidamente al cambiar de viewports o lo que sea.
 
"Subrayame la línea actual, pa localizarme rapidamente al cambiar de viewports o lo que sea.
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
+
au BufReadPost? * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
  
  
Línea 147: Línea 114:
  
  
 +
.gitconfig
  
</pre>
 
 
!!!.gitconfig
 
 
Varios alias para no tener que escribir tanto. Aparte, añadido el programa "meld" para ver las diferencias.
 
Varios alias para no tener que escribir tanto. Aparte, añadido el programa "meld" para ver las diferencias.
  
 
Nota: Las palabras que no están sangradas (user, color...) deben ir entre corchetes (],[), pero el wiki les pone un enlace, así que no los pongo.
 
Nota: Las palabras que no están sangradas (user, color...) deben ir entre corchetes (],[), pero el wiki les pone un enlace, así que no los pongo.
<pre>
 
user
 
    name = Your name
 
    email = your_nameATserver.com
 
color
 
    branch = auto
 
    diff = auto
 
    grep = auto
 
    status = auto
 
    ui = auto
 
    interactive = auto
 
diff
 
    tool=meld
 
merge
 
    tool=meld
 
alias
 
    a = add
 
    c = commit
 
    co = checkout
 
    d = diff --color-words
 
    dn = diff --name-status
 
    ds = diff --stat
 
    l = log
 
    b = branch
 
    #ficheros ignorados, por el .gitignored
 
    i = ls-files --others -i --exclude-standard
 
    sb = show-branch
 
    #distintas maneras de ver la grafica
 
    g = log --graph --pretty=oneline --abbrev-commit --decorate
 
    #lg = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
 
    lg = log --graph --all --pretty=format:'%C(yellow)%h%Creset -%C(bold green)%d %Creset%s%C(cyan) %ar %Cblue%an'
 
    ld = log --graph --all --pretty=format:'%C(yellow)%h%Creset -%C(bold green)%d %Creset%s%C(cyan) %ar %Cblue%an' --date-order
 
    #me enseña los cambios del commit pasado como parametro o del último
 
    l1 = log -1 -p
 
    st = status
 
</pre>
 

Revisión del 11:07 31 ago 2010

Configuraciones para distintos programas: Screen Configuración .screenrc

  1. Screen usado normalmente por Yuki
  2. Skip the startup message

startup_message off

caption always caption string "%{Bk}%-w%{kB}%n %t%{-}%+w  %=| %0c | %Y-%m-%d "

  1. hardstatus alwayslastline
  2. hardstatus string "%{= kg}%{G}%H %{g}?%= %{= kw}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}?%{=b C}%d %M %c?%{W}"
  1. para ir a la ventana anterior y siguiente

bindkey -k k8 prev bindkey -k k9 next

  1. 040126 To be able to select windows with n > 9 ->
  2. press "C-a - #" instead of just "C-a #"

bind - command -c select_1n bind -c select_1n 0 select 10 bind -c select_1n 1 select 11 bind -c select_1n 2 select 12 bind -c select_1n 3 select 13 bind -c select_1n 4 select 14 bind -c select_1n 5 select 15 bind -c select_1n 6 select 16 bind -c select_1n 7 select 17 bind -c select_1n 8 select 18 bind -c select_1n 9 select 19

  1. para ir a las ventasnas 20 en adelante haciendo
  2. "Control+a -- #" para ir a la ventana #

bind -c select_1n - command -c select_2n bind -c select_2n 0 select 20 bind -c select_2n 1 select 21 bind -c select_2n 2 select 22 bind -c select_2n 3 select 23 bind -c select_2n 4 select 24 bind -c select_2n 5 select 25 bind -c select_2n 6 select 26 bind -c select_2n 7 select 27 bind -c select_2n 8 select 28 bind -c select_2n 9 select 29 bind -c select_2n - select -

Ejemplo con splits

split -v screen -t bash bash split focus down screen -t telnet telnet localhost 4000 focus down screen -t htop htop split focus down screen -t bash2 bash split focus down screen -t elinks elinks http://www.google.com

  1. y de regalo te añado esto ;-D

startup_message off caption always hardstatus alwayslastline "%{Bk}%-w%{kB}%n %t%{-}%+w  %=| %0c | %Y-%m-%d "

Terminator Ejemplo de configuración sencilla

scrollbar_position=disabled background_color=#31353A foreground_color=#ffffff font=Mono 11 palette=#000000000000:#aaaa00000000:#0000aaaa0000:#aaaa55550000:#00000000aaaa:#aaaa0000aaaa:#0000aaaaaaaa:#aaaaaaaaaaaa:#555555555555:#ffff55555555:#5555ffff5555:#ffffffff5555:#55555555ffff:#ffff5555ffff:#5555ffffffff:#ffffffffffff

.emacs

.vimrc

"Para usar consola de fondo oscuro set background=dark

"Busquedas molonas al vuelo set hlsearch set incsearch

"Tabulaciones siempre a 4 espacios, con indentado automagico set expandtab set shiftwidth=4 set softtabstop=4 set autoindent

"El cursor, siempre a 4 filas del borde de pantalla, gracias. set scrolloff=4

"Subrayame la línea actual, pa localizarme rapidamente al cambiar de viewports o lo que sea. au BufReadPost? * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif


"Para ir al fichero siguiente/anterior cuando abrimos varios a la vez:

map <silent> <F10> :n<CR>
map <silent> <F9> :N<CR>

" pressing < or > will let you indent/unident selected lines vnoremap < <gv vnoremap > >gv

" para que cuando escribamos mal, nos lo acepte command! Qa qa command! Q q command! W w command! Wq wq


.gitconfig

Varios alias para no tener que escribir tanto. Aparte, añadido el programa "meld" para ver las diferencias.

Nota: Las palabras que no están sangradas (user, color...) deben ir entre corchetes (],[), pero el wiki les pone un enlace, así que no los pongo.