Skip to content

Instantly share code, notes, and snippets.

@gnuget
Created February 4, 2011 06:14
Show Gist options
  • Save gnuget/810812 to your computer and use it in GitHub Desktop.
Save gnuget/810812 to your computer and use it in GitHub Desktop.
Mi vimrc
"Basicas, color de tema, encoding,tabs etc
set t_Co=256
colorscheme xoria256
set gfn=Monospace
set encoding=utf-8
set nocompatible
filetype on
filetype plugin on
set hlsearch
set ignorecase
set incsearch
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set smartindent
set textwidth=0
set nowrap
set number
set scrolljump=5
set scrolloff=3
set backspace=start,eol
set wildmode=longest:list,full
noremap :!php -l %
set showmatch
syntax on
"tipos de archivo
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
autocmd FileType python set omnifunc=pythoncomplete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
"que los .module y .install los tome como archivos php
au BufRead,BufNewFile *.module set filetype=php
au BufRead,BufNewFile *.install set filetype=php
"modo para objective-J
augroup objective-j
au! BufRead,BufNewFile *.j set filetype=objective-j
au! Syntax objective-j source ~/.vim/syntax/objj.vim
augroup ENDu BufRead,BufNewFile *.j set filetype=js
"ctp highlight
"au BufNewFile,BufRead *.ctp set filetype html
"Formato para la Statusbar
set laststatus=2
set statusline=%<%f\ %=\:\b%n%y%m%r%w\ %l,%c%V\ %P
set formatoptions+=tcq " basic formatting of text and comments
"Haciendo que las tabs tengan un nombre mas decente
function! GuiTabLabel()
" add the tab number
let label = '['.tabpagenr()
" modified since the last save?
let buflist = tabpagebuflist(v:lnum)
for bufnr in buflist
if getbufvar(bufnr, '&modified')
let label .= '*'
break
endif
endfor
" count number of open windows in the tab
let wincount = tabpagewinnr(v:lnum, '$')
if wincount > 1
let label .= ', '.wincount
endif
let label .= '] '
" add the file name without path information
let n = bufname(buflist[tabpagewinnr(v:lnum) - 1])
let label .= fnamemodify(n, ':t')
return label
endfunction
set guitablabel=%{GuiTabLabel()}
"NerdTree en un F
map <F2> :NERDTreeToggle<cr>
"Para navegar entre tabs
:nmap <F3> :tabprevious<CR>
:nmap <F4> :tabnext<CR>
:map <F3> :tabprevious<CR>
:map <F4> :tabnext<CR>
:imap <F3> <Esc>:tabprevious<CR>i
:imap <F4> <Esc>:tabnext<CR>i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment