You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set nocompatible " Use VIM settings rather than
" Vi settings; this *must* be
" first in .vimrc
syntax enable "keeps your current color settings
syntax on "highlight syntax permanently
filetype plugin indent on
set number " numbered lines (set nu)
set autoindent " auto-identacao (set ai)
set cindent " revolves around the recoil style (set ci cindent)
set shiftwidth=4 " creates 4 spaces in the tab
set tabstop=4 " changes the width of tab
set softtabstop=4 " option to cause <Tab> and <BS> to the correct number of spaces
set expandtab " creates spaces instead of tab
set showmatch " shows the beginning of a new closed block { },[ ], ( ) (set sm)
set incsearch " increases search (set is)
set hlsearch " Highlight search (set hls)
set smartcase " considers uppercase of lowercase (set smartcase scs)
set hidden " Hide buffers when they are abandoned
set nobackup " no backup
set noswapfile " no swap file
set nowritebackup " no write backup
set mouse=a " Enable mouse usage (all modes)
set showcmd " Show (partial) command in status line.
set ruler " ruler
set linebreak " does not share the word EOL
set visualbell " disable beep
set path+=** " find files with :find myfile.txt
set scrolloff=0 " Lines visible above or below the cursor
set clipboard=unnamedplus "copy to clipboard
set completeopt=longest,menuone
"set background=dark " background
"set makeprg=php\ -1\ %
"set errorformat=%m\ in\ %f\ on\ line\ %1
"set foldmethod=indent
"set foldminlines=5
2 - AUTOCOMPLETE in specific languages
"
" AUTOCOMPLETE in specific languages
" ----------------------------------------
"
autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP
autocmd FileType html setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
autocmd FileType c setlocal omnifunc=ccomplete#Complete
autocmd FileType cpp setlocal omnifunc=omni#cpp#complete#Main
autocmd FileType hpp setlocal omnifunc=omni#cpp#complete#Main
3 - AUTOCMD by file type
"
" AUTOCMD by file type
" ----------------------------------------
"
if has("autocmd")
autocmd BufEnter *.phtml set syn=php " Files found ZendFramework
autocmd BufEnter *.ctp set syn=php " Files found CackePHP
autocmd BufRead,BufNewFile,BufReadPost *.php set filetype=php.html
autocmd BufRead,BufNewFile,BufReadPost *.cpp set filetype=cpp.c
autocmd BufRead,BufNewFile,BufReadPost *.twig set filetype=twig.html
endif