.vimrc

My.vimrc. Tal cual. Disfruten, enjoy, viel Spass.


" Commands that must be at the beging of the file:
autocmd!
"if $COMPUTERNAME == "NEWPC"
"ab mypc vista
"else
"ab mypc dell25
"endif
if 'nike.quantum.physik.uni-potsdam.de'==hostname()
let cpp_append="CPLUS_INCLUDE_PATH=:/Users/carlosp/investigacion/cpp:.:/Users/carlosp/investigacion/cpp:. "
let Tlist_Ctags_Cmd='/sw/bin/ctags-exuberant'
else
let cpp_append=""
endif
" Bueno pues modifique
" Nueva linea 84:
" \'Float too large'."\n".
" Linea 90:
" original let g:Tex_IgnoreLevel = 7
" mia let g:Tex_IgnoreLevel = 8
"
" Comandos generales
"Este es para mac, se sigue de la siguiente pagina
"http://www.vim.org/tips/tip.php?tip_id=21
set clipboard=unnamed
set go+=a
colorscheme desert
syntax enable
set laststatus=2
"set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%,%p)\ %P
set statusline=%<%f%m%Y\ %h%m%r%=%-14.(%l/%L,%c%V%)\ %p%%%P
"set foldmethod=syntax
set smarttab
set ic
set incsearch
set textwidth=0 "no text wrapping
" http://vim-latex.sourceforge.net/index.php?subject=download&title=Download
" REQUIRED. This makes vim invoke latex-suite when you open a tex file.
filetype plugin on
set path=.,,/home/carlosp/texmf/bibtex/bib
" http://www.stripey.com/vim/keys.html
set whichwrap=h,l,~,[,]
"From http://www.abbeyworkshop.com/howto/osx/osxVim/index.html
" turn on the "visual bell" - which is much quieter than the "audio blink"
set autowrite
set vb
" make that backspace key work the way it should
set backspace=indent,eol,start
" To change the extension:
" http://vim.wikia.com/wiki/Replace_the_file_name_extension
" let $savemaketexpdf=':w \|!make %<.pdf' | echo $savemaketexpdf
let $CFPmake_cpp=cpp_append." make %< && ./%<"
"let $CFPmake_cpp=":w \| !make %< && ./%<"
" let $CFPmake_pdf="make %<.pdf && cp %<.pdf /tmp"
let $CFPmake_pdf="rubber --pdf %< && cp %<.pdf /tmp"
" let $CFPmake_pdf_bib=":w \| !make BIB='true' %<.pdf && cp %<.pdf /tmp"
let $CFPmake_pdf_bib=$CFPmake_pdf
"let CFPmake=CFPmake_pdf
" Tabs
" see http://vim.wikia.com/wiki/Alternative_tab_navigation
" tab navigation like firefox
:nmap :tabprevious
:nmap :tabnext
:map :tabprevious
:map :tabnext
:imap :tabpreviousi
:imap :tabnexti
:nmap :tabnew
:imap :tabnew

“Mappings and keys
let mapleader=”ç”
let mapleader=”-”
nmap t :ToggleWord
nmap :w
imap :wa
nmap :w:!make
imap :w:!makea
nmap :!dict -P ‘less -d -r’
imap :!dict -P ‘less -d -r’ a
nmap :set hls!
imap :set hls!a
nmap :set foldmethod=syntaxzMzvz.
imap :set foldmethod=syntaxzMzvz.a
nmap ma[{gqji gq]}`a
imap ma[{gqji gq]}`aa
nmap ma ?\\end{\\|\\section\\|\\chapter\\|\\subsection\\|^\s\{}$\\|%?1gq/\\item\\|\\begin{\\|^\s\{}$\\|%/-1:noh`a
imap ma?\\end{\\|^\s\{}$\\|%?1gq/\\begin{\\|^\s\{}$\\|%/-1:noh`aa
map @:
imap @: a
noremap ,c :sil s/^/=escape(b:comment_leader,’\/’)/:set nohls
noremap ,u :sil s/^\V=escape(b:comment_leader,’\/’)//e:set nohls
” for mac OSX
” :nmap ,pt :call setreg(”\”",system(”pbpaste”))p
” :nmap ,cp y:call system(”pbcopy”, getreg(”\”"))
map :make
imap :makea

” Functions:
” ok so I will have to implement a function.
” usefull links are
” http://www.vim.org/tips/tip.php?tip_id=32
” http://www.xs4all.nl/~josvanr/vim/array.vim
” http://vimdoc.sourceforge.net/htmldoc/usr_41.html#script
” searchpair
“imap ,1 :w \| !make 2dmera && ./2dmera aimap ,1 :w \| !make 2dmera && ./2dmera a
” This function must get the first line number searching for
” \end \begin \item \itemize or whatever.
function! NextStop()
“let n = searchpos(”\\end”)
“%?1gq/\\item\\|\\begin{\\|^\s\{}$\\|%/-1:noh`a
“let arr=g:arrnew
“let seachpositions=()
“let current_line=
let seachpositions=[]
call add(seachpositions, search(’\\end’,'n’))
call add(seachpositions, search(’\\section’,'n’))
call add(seachpositions, search(’\\chapter’,'n’))
call add(seachpositions, search(’\\subsection’,'n’))
“http://www.vim.org/tips/tip.php?tip_id=72
call add(seachpositions, search(’^[\ \t]*\n’,'n’))
“while n < strlen(a:str1) && a:str1[n] == a:str2[n]
” let n = n+1
“endwhile
” return char2nr(a:str1[n]) - char2nr(a:str2[n]) ” for Strcmp()
“return seachpositions
return seachpositions
endfun
“”"”"
” Filetype specifics:
let b:comment_leader = ‘# ‘
au FileType haskell,vhdl,ada let b:comment_leader = ‘– ‘
au FileType tex,matlab let b:comment_leader = ‘% ‘
au FileType vim let b:comment_leader = ‘” ‘
au FileType c,cpp let b:comment_leader = ‘// ‘
au FileType make let b:comment_leader = ‘# ‘
au FileType sh,awk,gtkrc let b:comment_leader = ‘# ‘
au FileType manconf let b:comment_leader = ‘# ‘
autocmd BufNewFile,BufRead,BufEnter .vimrc set foldmethod=indent

” txt
autocmd BufNewFile,BufRead *.txt set spl=en_us spell
autocmd BufNewFile,BufRead proy_seligman.txt set spl=es spell
autocmd BufNewFile,BufRead receta_alf.txt set spl=es spell
autocmd BufNewFile,BufRead solutions.txt set spl=de spell

” Matlab
autocmd BufNewFile,BufRead,BufEnter *.m set foldmethod=indent
let CFPmake_matlab=”:w \| !matlab -nosplash -nodisplay -nojvm -nodesktop -logfile /tmp/matlab_log < %<.m”
autocmd BufNewFile,BufRead,BufEnter *.m setlocal makeprg=$CFPmake_matlab

” Fortran
autocmd FileType fortran set expandtab
autocmd FileType fortran set shiftwidth=2
autocmd FileType fortran set softtabstop=2
let fortran_free_source=1
let fortran_more_precise=1
let fortran_fold=1
autocmd FileType fortran set textwidth=0

“TEX
if ‘nike.quantum.physik.uni-potsdam.de’==hostname()
let Tex_ViewRule_pdf=”open ”
else
endif
autocmd BufNewFile,BufRead *.tex setlocal filetype=tex
autocmd BufNewFile,BufRead *.tex setlocal spl=en_us spell
autocmd BufNewFile,BufRead *.tex setlocal makeprg=$CFPmake_pdf
syn region texRefZone matchgroup=texStatement start=”\\v\=eref{” end=”}\|%stopzone\>” contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start=”\\v\=Eref{” end=”}\|%stopzone\>” contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start=”\\v\=eref{” end=”}\|%stopzone\>” contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start=”\\v\=sref{” end=”}\|%stopzone\>” contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start=”\\v\=fref{” end=”}\|%stopzone\>” contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start=”\\v\=Fref{” end=”}\|%stopzone\>” contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start=”\\v\=ead{” end=”}\|%stopzone\>” contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start=”\\v\=author{” end=”}\|%stopzone\>” contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start=”\\v\=address{” end=”}\|%stopzone\>” contains=@texRefGroup
let Tex_UseMakefile=0
autocmd FileType tex let Tex_Leader=’?’
autocmd FileType tex let Tex_UseMakefile=1
autocmd FileType tex let Tex_UseMakefile=0
” para incluir algunos environments que uso mucho redefino la variable
” ver
” http://vim-latex.sourceforge.net/documentation/latex-suite.html#customizing-what-to-fold
autocmd FileType tex let Tex_FoldedEnvironments=”mywork,tikzpicture,pcolumn,pbox,verbatim,comment,eq,gather,aling,fold,figure,table,thebilbiography,keywords,abstract,titlepage,minipage,itemize,frame,thebibliography”
autocmd FileType tex let Tex_FoldedCommands=”fold”
autocmd BufRead article_Purity.tex setl spl=en_gb spell
autocmd BufRead defensa.tex setl spl=es spell
autocmd BufRead charla_ifunam.tex setl spl=es spell
autocmd BufRead rollo07.tex setl spl=es spell
autocmd BufRead article_time_reversal.tex setl spl=en_gb spell
autocmd BufRead distribution_eigenvalues.tex setl spl=en_gb spell
autocmd BufRead carta_de_presentacion_IFUNAM.tex setl spl=es spell
autocmd BufRead solicitud_ifunam.tex setl spl=es spell
autocmd BufRead plan_trabajo_unam_2009.tex setl spl=es spell
autocmd BufRead weizmann.tex setl spl=es spell
autocmd BufRead thomas_recomendacion.tex setl spl=es spell
autocmd BufRead solicitud_daad.tex setl spl=es spell
autocmd BufRead london.tex setl spl=en_gb spell
autocmd BufRead NewFermionMera2.tex setl makeprg=$CFPmake_pdf_bib
autocmd BufRead daad.tex setl makeprg=$CFPmake_pdf_bib
autocmd BufRead CV2008.tex setl makeprg=$CFPmake_pdf_bib
autocmd BufRead visualize_eigen.tex setl makeprg=$CFPmake_pdf_bib
autocmd BufRead conacyt_renovacion.tex setl spl=es spell
autocmd BufRead plan_trabajo_unam_2009.tex setl makeprg=$CFPmake_pdf_bib
“autocmd BufRead letter_n.tex set spl=en_us spell
“autocmd BufRead intro.tex set spl=en_us spell

” Makefile
autocmd BufNewFile,BufRead make.* set filetype=make
autocmd FileType make syn region makeFold start=”#start” end=”#end” fold

” cpp
autocmd BufNewFile,BufRead,BufEnter *.cpp set syntax=c.doxygen
” Toca poner algo como que si esta en diff no ponga cambio de
” syntanx ni de foldmethod
autocmd BufNewFile,BufRead,BufEnter *.cpp set foldmethod=syntax
autocmd BufNewFile,BufRead *.cpp setlocal makeprg=$CFPmake_cpp
autocmd BufNewFile,BufRead,BufEnter *.cpp set autoindent
autocmd BufNewFile,BufRead,BufEnter *.cpp set cindent
autocmd BufNewFile,BufRead,BufEnter *.cpp set shiftwidth=2
autocmd BufNewFile,BufRead,BufEnter *.cpp set expandtab
” autocmd BufRead *.cpp TlistOpen

” NOTAS
” Para sumar uno a toooodos los numeros de una linea…
” :.!perl -p -e ’s/(\d+)/($1+1)/ge’

” para insertar texto con tildes ver :help digraphs
” En particular para insertar ? se oprime (en insert mode Ctrl-k a’ )
“para convertir el formato de tildes, se puede tener en cuetna que
“range s[ubstitute]/pattern/string/cgiI
“g Replace all occurrences in the line (without g - only first).

“Para hacer varios comandos a la vez se usa el caracter “|”
“por ejemplo
“:w | ! make distribution_eigenvalues.pdf
“para poner un font:
“set guifont=*
“luego se elige. me sirve Sans Regular 12


” imap ? , ver
” http://www.nabble.com/utf8-%2B-imap-td20440778.html
” o
” http://www.nabble.com/Accute-accent-problem-td5244472.html
” finalmente comente la linea mala del
” ~/.vim/ftplugin/latex-suite/envmacros.vim

” OJO mirar :help local
” y :help setlocal!!!
” para evitar los lios cno los diferentes buffers.


” con :reg peudo ver los registros que tengo

” Croe que toca poner el shell obligarlo a que sea bash…
” mirar entones
” http://www.vim.org/htmldoc/options.html#%27shell%27

Physics simple question

consider 2 qubit unitaries U and V. Assume that there exists to separable states (psi_u and psi_v) such that U psi_u and V psi_v have maximal entanglement. Are these two unitaries equivalent modulo local unitaries?

Yes, it sounds trivial, but I have not been able to come up with a solution.

Deutsch und firefox

Ich habe ein sehr schoen ding machen. Das ist nur fuer Firefox Benutzer: hier!!!

Vim, un commando util

Pues, muy sencillo el comando: “z.”. Simplemente hace el scroll apropiado para que el cursor quede centrado.

Geek aprendiendo aleman…

Bueno pues hice un script para crear imagenes que tengan los nombres de cosas en aleman. Asi puedo llenar la casa de avisos… :P a ver que les parece.

cat makefile:

FILLCOLORDER = blue
FILLCOLORDIE = pink
FILLCOLORDAS = green

PRECOMMAND = echo -n $(basename $@)| sed s/_/\ /| convert -background black -fill
POSTCOMMAND = -bordercolor black -border 20×20 -stroke darkblue -strokewidth 2 -font /usr/share/fonts/truetype/myfonts/Ravie.ttf -pointsize 48  label:@- $@

das_%.jpg ::

$(PRECOMMAND) $(FILLCOLORDAS) $(POSTCOMMAND)

die_%.jpg ::

$(PRECOMMAND) $(FILLCOLORDIE) $(POSTCOMMAND)

der_%.jpg ::

$(PRECOMMAND) $(FILLCOLORDER) $(POSTCOMMAND)

all :: das_Wasser.jpg die_Zeit.jpg der_Sessel.gif

das_Wasser.jpg

y eso se hace no mas con

carlosp@breit ~/investigacion/german/images $ make -B das_Wasser.jpg

Soundtrack

Creo que una banda sonora que no es muy famosa (al menos no lo es tanto como Pulp Fiction, Matrix etc) y que creo que deberia ser escuchada es la de Leaving Las Vegas. Otra que es medianamente conocida y me gusto mucho es la de Snatch.

Noticia: Tengo 46132 comentiarios en la lista de espera a ver si los apruebo o no.

Noticia: TODOS son spam

varias observaciones

Bueno, hace rato que no posteo…. en fin…. mucho que contar y miedo a escribir…

1. Deezer ta bueno. ofrece alternativas interesantes….
2. Tomar trazas en sistemas de fermiones no es tan trivial. Al menos no se puede ahcer como uno acostumbra.
3. Aprendo aleman, lentamente, pero toodos los dias practico.

Tschuss

estoy contento

Pues si, varios motivos de felicidad en estos dias. Uno, liberaron a Alf. A lo bien se alegra el corazon. Dos, mi chica anda por aca. Tenemos planes etc. Tres, la liberacion de Ingrid y otros personajes emblematicos. Que mas quiero?? bueno por fin me pagaron… vivo muy bien, vivo en una GRAN ciudad. Trabajo bien, con una buena persona. es mas, se los presento.

 Jens and the group

Bueno, pues nada un saludo a la raza.

Um… como posdata, me corte el pelo.

Como suena un fisico cuando duerme

Asi sueno yo cuando cuando duermo. Jejejejeje

Me voy

bueno, hace mucho mucho tiemp oque no escribo nada. perdon a los fanaticos de este sitio. En fin, ya ando haciendo maletas. me voy a berlin. me voy a trabajar co nun man muy muy duro (chingon). me voy a una ciudad que me interesa mucho mucho. al principio no tendre mucha lana, pero si lo suficiente para vivir. me duele dejar mexico, taba bueno… pero la vida cambia. que si quiero volver? si, seguro que si. dejo cosas aca que quiero. y a colombia??? tambien, porque no. al final somos gitanos. Y para no perder la costumbre…

Primera escena: El rey leyendo una revista de comics.

Segunda: El rey leyendo Cien años de soledad

Tercera: El rey leyendo la enciclopedia britanica.

Nombre de la obra: El Rey Leon