set mouse=a
"Linha no cursors
set cursorline
"highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
hi CursorLine cterm=bold ctermbg=darkred ctermfg=white guibg=darkred guifg=white
hi CursorColumn cterm=bold ctermbg=darkred ctermfg=white guibg=darkred guifg=white
"Mostra numeros das linhas do lado esquerdo
set nu
"Mostra dados na barra de status - Ex Nome do arquivo, linha e coluna
set statusline=%F%m%r%h%w\ -\ %{&ff}\ -\ {%Y}\ \ [Linha:\ %l,\ Coluna:\ %v][%p%%]\ %=%{strftime(\"%d/%m/%y\ -\ %H:%M\")}
set laststatus=2
"set statusline=%F " Path to the file
"set statusline+=%= " Switch to the right side
"set statusline+=%l " Current line
"set statusline+=/ " Separator
"set statusline+=%L " Total lines
"Mapea dados para autocomplete
source ~/.vim/plugin/cscope_maps.vim
set omnifunc=syntaxcomplete#Complete
set tags+=~/.vim/systags
"Liga identacao automatica de codigo
filetype plugin on
filetype plugin indent on
set tabstop=4 " The width of a TAB is set to 4.
set shiftwidth=4 " Indents will have a width of 4.
set softtabstop=4 " Sets the number of columns for a TAB.
set expandtab " Expand TABs to spaces.
"Alterar tamanho das janelas
nmap <A-S-Up> :wincmd +<CR>
nmap <A-S-Down> :wincmd -<CR>
nmap <A-S-Left> :wincmd <<CR>
nmap <A-S-Right> :wincmd ><CR>
"Mover entre as janelas
nmap <A-Up> :wincmd k<CR>
nmap <A-Down> :wincmd j<CR>
nmap <A-Left> :wincmd h<CR>
nmap <A-Right> :wincmd l<CR>
nmap <C-N><C-N> :set invnumber<CR><Esc>
nmap <F7> :set invnumber <Bar>
\if exists("g:syntax_on") <Bar>
\ syntax off <Bar>
\ else <Bar>
\ syntax on <Bar>
\ endif <CR>
set lcs=tab:>-,trail:.,eol:$
nmap <F8> :set list!<CR>
"Procurar pelo texto selecionado
noremap // y/<C-R>"<CR>
"Mover texto selecionado
nnoremap <C-j> :m .+1<CR>==
nnoremap <C-k> :m .-2<CR>==
inoremap <C-j> <Esc>:m .+1<CR>==gi
inoremap <C-k> <Esc>:m .-2<CR>==gi
vnoremap <C-j> :m '>+1<CR>gv=gv
vnoremap <C-k> :m '<-2<CR>gv=gv
function! s:DiffWithGITCheckedOut()
let filetype=&ft
diffthis
vnew | exe "%!git diff " . expand("#:p:h") . "| patch -p 1 -Rs -o /dev/stdout"
exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
diffthis
endfunction
com! DiffGIT call s:DiffWithGITCheckedOut()
au BufNewFile,BufRead *.cpp,*.c,*.h,*.java syn region myCComment start="/\*" end="\*/" fold keepend transparent
"#tab navigation like firefox
nnoremap <C-t> :tabnew<CR>
inoremap <C-t> <Esc>:tabnew<CR>
nnoremap <C-w> :tabclose<CR>
nmap <A-1> 1gt
nmap <A-2> 2gt
nmap <A-3> 3gt
nmap <A-4> 4gt
nmap <A-5> 5gt
nmap <A-6> 6gt
nmap <A-7> 7gt
nmap <A-8> 8gt
nmap <A-9> 9gt
nmap <A-0> 10gt
"abrir arquivos em nova tab
"autocmd VimEnter * tab all
"autocmd BufAdd * exe 'tablast | tabe "' . expand( "<afile") .'"'
No comments:
Post a Comment