Last active
October 29, 2024 16:23
-
-
Save Riverfount/4f92cd7eaad829b3afcac71361499cdc to your computer and use it in GitHub Desktop.
Minhas configurações do vim
This file contains hidden or 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
let mapleader = ',' " Map the leader key to a comma. | |
set nocompatible " Inicia o Vim no modo incompatível com o Vi. | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim " Configura a runtime para incluir o Vunle e inicializa | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' " Faz com que o Vundle administre o Vundle | |
Plugin 'vim-scripts/indentpython.vim' " Configura o VIM para auto-identação no Python | |
Plugin 'dense-analysis/ale' " Configura Lint para Análise estática de Código | |
Plugin 'preservim/nerdtree' | |
Plugin 'ryanoasis/vim-devicons' | |
Plugin 'fisadev/vim-isort' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'raimondi/delimitmate' | |
Plugin 'vim-syntastic/syntastic' | |
Plugin 'nathanaelkane/vim-indent-guides' | |
call vundle#end() " Todos os plugins devem estar antes desta linha | |
syntax on " Habilita destaque de sintaxe. | |
filetype plugin indent on " Detecta indentação pelo tipo de arquivo. | |
set t_Co=256 " Habilita 256 cores. | |
set title " Exibe título na janela do terminal. | |
set mouse=a " Habilita o uso do mouse em todos os modos | |
set encoding=utf-8 " Define codificação de caracteres para UTF-8. | |
set backspace=indent,eol,start " Habilita voltar apagando até a indentação, | |
" o fim da linha (juntando com a linha | |
" acima) e até o início da inserção. | |
set number " Habilitando 'number' e 'relativenumber' o número | |
set relativenumber " da linha corrente é exibido em vez de 0. | |
set hidden " Permite ocultar o buffer corrente não salvo | |
" ao abrir outro buffer. | |
set noerrorbells " Inibe a sinalização de erros. | |
set noswapfile " Não cria arquivos temporários. | |
set nobackup " Não cria arquivos de backup. | |
set undodir=~/.vim/undodir " Define onde os arquivos de undo serão criados. | |
set undofile " Habilita o undo persistente. | |
let $RTP=split(&runtimepath, ',')[0] " Define o caminho dos recursos do Vim. | |
let $RC="$HOME/.vimrc" " Define o caminho e o nome do arquivo rc. | |
set path=.,** " Define caminhos para buscas. | |
set autoindent " Copia a indentação atual para a linha seguinte. | |
set shiftwidth=4 " Define a largura do deslocamento para 4 espaços. | |
set tabstop=4 " Define o número de espaços que um <TAB> ocupa. | |
set expandtab " Substitui o caracter <TAB> por espaços no INSERT mode | |
set cursorline " Destaca a linha em que o cursor está | |
colorscheme gruvbox " Define o tema de cor do editor | |
set colorcolumn=120 " Define a coluna de limite de caracteres | |
set background=dark " Define o tema escuro | |
" Set up Vim-Airline | |
let g:airline_theme='base16_gruvbox_dark_hard' | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#tabline#formatter = 'unique_tail_improved' | |
let g:airline#extensions#branch#enabled=1 | |
if !exists('g:airline_symbols') | |
let g:airline_symbols = {} | |
endif | |
hi! Normal ctermbg=NONE guibg=NONE | |
" powerline symbols | |
let g:airline_left_sep = '' | |
let g:airline_left_alt_sep = '' | |
let g:airline_right_sep = '' | |
let g:airline_right_alt_sep = '' | |
let g:airline_symbols.branch = '' | |
let g:airline_symbols.readonly = '' | |
let g:airline_symbols.linenr = '☰' | |
let g:airline_symbols.maxlinenr = '' | |
let g:airline_symbols.dirty='⚡' | |
" NERDtree key map | |
nnoremap <leader>n :NERDTreeFocus<CR> | |
nnoremap <C-n> :NERDTree<CR> | |
nnoremap <C-t> :NERDTreeToggle<CR> | |
nnoremap <C-f> :NERDTreeFind<CR> | |
let g:webdevicons_enable_nerdtree = 1 | |
" Start NERDTree and leave the cursor in it. | |
autocmd VimEnter * NERDTree | |
autocmd VimEnter * wincmd p | |
" whether or not to show the nerdtree brackets around flags | |
let g:webdevicons_conceal_nerdtree_brackets = 1 | |
let g:nerdtree_tabs_no_startup_for_diff = 0 | |
" Set up of Syntatic | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 0 | |
" Closes the NERDTree if we close the last file | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" Open terminal splited bottom | |
set splitbelow | |
" Open a terminal | |
nnoremap <leader>t :terminal<CR> | |
" Set up of Indent Guides | |
let g:indent_guides_enable_on_vim_startup = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment