Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "this enables the mouse (scrolling, clicking...)
- set mouse=a
- set tabstop=4
- set shiftwidth=4
- set expandtab
- set cindent
- set foldmethod=indent
- set tabpagemax=200
- set runtimepath=~/.vim,~/.vim/vim-fuzzyfinder,~/.vim/vim-l9,~/.vim/nerdtree,~/.vim/vim72,~/.vim/vim-phpunit
- set ruler
- set rulerformat=%55(%{strftime('%a\ %b\ %e\ %I:%M\ %p')}\ %5l,%-6(%c%V%)\ %P%)
- set ofu=syntaxcomplete#Complete
- set mousemodel=popup
- "para que no salga el mensaje de Este archivo swap ya existe
- "ojo hay que crear previamente el directorio ~/tmp
- set backupdir=~/tmp
- set lines=60
- set columns=157
- map tp :set invpaste paste?<enter>
- set showmode
- if &diff
- set t_Co=256
- colorscheme murphy
- else
- colorscheme darkblue
- endif
- set nocompatible " be iMproved
- filetype off " required!
- set rtp+=~/.vim/bundle/vundle/
- call vundle#rc()
- " let Vundle manage Vundle
- " required!
- Bundle 'gmarik/vundle'
- " My Bundles here:
- "
- " original repos on github
- Bundle 'Valloric/YouCompleteMe'
- "Bundle 'Lokaltog/vim-easymotion'
- "Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
- "Bundle 'tpope/vim-rails.git'
- " vim-scripts repos
- "Bundle 'L9'
- "Bundle 'FuzzyFinder'
- " non github repos
- "Bundle 'git://git.wincent.com/command-t.git'
- " ...
- filetype plugin indent on " required!
- "
- " Brief help
- " :BundleList - list configured bundles
- " :BundleInstall(!) - install(update) bundles
- " :BundleSearch(!) foo - search(or refresh cache first) for foo
- " :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
- "
- " see :h vundle for more details or wiki for FAQ
- " NOTE: comments after Bundle command are not allowed..
- syntax on
- map 11 ^i//<esc>
- map 22 ^:s/\/\///<enter>
- map! <? <?php ?><esc>hi
- map tn :tabnew \| :FufFile pattern:<enter>
- map gs <C-w><C-]><C-w>TzR
- map gf <C-w>gf zR<esc> :tabmove 1<enter> :tabp<enter>
- map gl :!git log -p %<enter>
- map fo :FufFile <enter>
- map fr :FufRenewCache<enter>
- map gj :tabnext<enter>
- map gk :tabprevious<enter>
- map g9 :tablast<enter>
- map gn \c<Space>
- """"""""""""""""""""""Xdebug
- "inicia el debugger y muestra el valor y el tipo de la variable
- map gu ^^o$aux=0;<esc>:w<enter><F10>:! ~/vim_debug.sh &<enter><F5>
- "cierra el debugger y borra la linea auxiliar que habiamos añadido
- map gi <F6><F6>gk<F10>dd:w<enter>k
- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
- map gm gg=G''
- map go :w<enter> :chromiumreload<enter><c-l>
- map <S-Enter> O<Esc>
- map <CR> o<Esc>
- map fo :FufFile pattern:<enter>
- vmap <F9> :call ExecMySQL()<CR>
- nmap <F9> V:call ExecMySQL()<CR>
- ":nnoremap gp avar_dump();<Esc>
- :nnoremap gl adie("fasfs");<Esc>
- "añade espacios con el espacio en normal mode
- :nnoremap <space> i<space><esc>
- map terr Oerror_log(sprintf('%100s', __LINE__ . '::' . __METHOD__ . ':: ') . 'here' . "\n", 3, '/tmp/tmp_log');<esc>0f(w
- map ttry Otry {<enter>//some code here<enter>} catch (\Exception $e) {<enter>echo $e->getMessage();<enter>}<esc>3k^
- map tfunc O/**<enter>* @todo fill function documentation here<enter>*/<enter>public function replaceMyName()<enter>{<enter>}<esc>kkf(
- map tfor Oforeach($collection as $object) {<enter>}<esc>k0f(w
- map tif Oif (true) {<enter>//some code here<enter>}<esc>2kft
- map telse Oif (true) {<enter>//some code here<enter>} else {<enter>//some code here<enter>}<esc>4kft
- let s:windowmapnr = 0
- let s:wins='123456780!@#$%^&*()'
- while (s:windowmapnr < strlen(s:wins))
- exe 'noremap <silent> <M-' . s:wins[s:windowmapnr] . '> ' . (s:windowmapnr + 1) . 'gt'
- exe 'imap <silent> <M-' . s:wins[s:windowmapnr] . '> <C-O>' . (s:windowmapnr + 1) . 'gt'
- exe 'cmap <silent> <M-' . s:wins[s:windowmapnr] . '> <C-C>' . (s:windowmapnr + 1) . 'gt'
- exe 'vmap <silent> <M-' . s:wins[s:windowmapnr] . '> <C-C>' . (s:windowmapnr + 1) . 'gt'
- let s:windowmapnr += 1
- endwhile
- unlet s:windowmapnr s:wins
- "endmap tabs
- " vsearch.vim
- " Visual mode search
- function! s:VSetSearch()
- let temp = @@
- norm! gvy
- let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g')
- let @@ = temp
- endfunction
- vnoremap * :<C-u>call <SID>VSetSearch()<CR>//<CR>
- vnoremap # :<C-u>call <SID>VSetSearch()<CR>??<CR>
- :nnoremap tl :buffers<CR>:buffer<Space>
- "first, enable status line always
- set laststatus=2
- set foldlevel=99
- " now set it up to change the status line based on mode
- "if version >= 700
- " au InsertEnter * hi StatusLine term=reverse ctermbg=5 gui=undercurl guisp=White
- " au InsertLeave * hi StatusLine term=reverse ctermfg=0 ctermbg=2 gui=bold,reverse
- "endif
- let g:phpcs_std_list="PEAR"
- let g:phpcs_max_output = 0 " Unlimited output.
- "comprueba que exista el archivo .custom_vimrc antes de cargarlo, porque sino
- "da error
- let FILEA=expand("./.custom_vimrc")
- if filereadable(FILEA)
- source .custom_vimrc
- endif
- "filetype plugin on
- "au FileType php set omnifunc=phpcomplete#CompletePHP
- "borra los espacios en blanco al final de las lineas (trailing spaces) cuando se salva el archivo.
- autocmd BufWritePre * :%s/\s\+$//e
- "twig highlighting
- au BufRead,BufNewFile *.twig set syntax=htmljinja
- let g:neocomplcache_enable_at_startup = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement