Last active
May 7, 2021 16:11
-
-
Save Gabrielgtt/205692aad42886c0f6ac0d47a089afaa to your computer and use it in GitHub Desktop.
Meu vimrc com comandos e atalhos úteis pra vida
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augroup FileTypeSpecificAutocommands | |
autocmd FileType go setlocal tabstop=2 softtabstop=2 shiftwidth=2 | |
autocmd FileType javascript setlocal tabstop=2 softtabstop=2 shiftwidth=2 | |
autocmd FileType javascript.jsx setlocal tabstop=2 softtabstop=2 shiftwidth=2 | |
autocmd FileType typescript setlocal tabstop=2 softtabstop=2 shiftwidth=2 | |
augroup END | |
set background=dark | |
execute pathogen#infect() | |
call pathogen#helptags() | |
let mapleader=" " | |
set nu rnu ts=4 sw=4 si ai et | |
set splitright | |
set splitbelow | |
set hlsearch | |
set incsearch | |
set cursorline | |
inoremap {<CR> {<CR>}<Esc>O | |
nnoremap <Leader>h :noh<CR> | |
nnoremap <Leader>t :NERDTreeToggle<CR> | |
nnoremap <Leader>s :update<CR> | |
nnoremap <Leader>c : | |
" Mapas de splits | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l | |
" Mapas do FZF | |
nnoremap <Leader>ff :Files<CR> | |
nnoremap <Leader>fa :Files ~/<CR> | |
nnoremap <Leader>fr :Rg<CR> | |
nnoremap <Leader>fh :History<CR> | |
nnoremap <Leader>f: :History:<CR> | |
nnoremap <Leader>b :Windows<CR> | |
" Mapas do Git | |
nnoremap <Leader>gs :Git<CR> | |
nnoremap <Leader>gb :Git blame<CR> | |
nnoremap <Leader>gp :Git push<CR> | |
" Git merge | |
nnoremap <Leader>gm :Gvdiffsplit!<CR> | |
nnoremap <Leader>gh :diffget //2<CR> | |
nnoremap <Leader>gl :diffget //3<CR> | |
nnoremap cp va{Vy<C-o>va{<Esc>pO<Esc>j | |
nnoremap Q @q | |
colorscheme gruvbox | |
let g:airline_theme='deus' | |
" If installed using git | |
set rtp+=~/.fzf | |
" ajeitando Ctrl setas | |
if &term =~ '^screen' | |
" tmux will send xterm-style keys when its xterm-keys option is on | |
execute "set <xUp>=\e[1;*A" | |
execute "set <xDown>=\e[1;*B" | |
execute "set <xRight>=\e[1;*C" | |
execute "set <xLeft>=\e[1;*D" | |
endif | |
" Precisa pra o vimwiki | |
syntax on | |
set nocompatible | |
filetype plugin on | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment