Last active
May 23, 2019 19:28
-
-
Save rafaelvieiras/65d64f19d270e9364d2b4a670a2e54f8 to your computer and use it in GitHub Desktop.
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
" Specify a directory for plugins | |
" - For Neovim: ~/.local/share/nvim/plugged | |
" - Avoid using standard Vim directory names like 'plugin' | |
call plug#begin('~/.vim/plugged') | |
Plug 'sonph/onehalf', {'rtp': 'vim/'} | |
Plug 'neomake/neomake' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'mattn/emmet-vim' | |
Plug 'w0rp/ale' | |
Plug 'scrooloose/nerdtree' | |
Plug 'Valloric/YouCompleteMe', { 'do': './install.py' } | |
" Vim-Plug | |
Plug 'HerringtonDarkholme/yats.vim' | |
Plug 'mhartington/nvim-typescript', {'do': './install.sh'} | |
" For async completion | |
Plug 'Shougo/deoplete.nvim' | |
" For Denite features | |
Plug 'Shougo/denite.nvim' | |
" Initialize plugin system | |
call plug#end() | |
colorscheme onehalfdark | |
" Possibilitar o armazenamento de varios arquivos em memoria | |
set hidden | |
" Mostrar Numero de Linhas | |
set number | |
set relativenumber | |
" Prewie do subistitute | |
set inccommand=split | |
" When writing a buffer (no delay), and on normal mode changes (after 750ms). | |
call neomake#configure#automake('nw', 750) | |
" Enable deoplete at startup | |
let g:deoplete#enable_at_startup = 1 | |
" NERDTree on ctrl+n | |
let NERDTreeShowHidden=1 | |
map <silent> <C-n> :NERDTreeToggle<CR> | |
" close NERDTree after a file is opened | |
let g:NERDTreeQuitOnOpen=1 | |
" make FZF respect gitignore if `ag` is installed | |
" you will obviously need to install `ag` for this to work | |
if (executable('ag')) | |
let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""' | |
else | |
"ctrl+p ignore files in .gitignore | |
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f'] | |
endif | |
" make emmet behave well with JSX in JS and TS files | |
let g:user_emmet_settings = { | |
\ 'javascript' : { | |
\ 'extends' : 'jsx', | |
\ }, | |
\ 'typescript' : { | |
\ 'extends' : 'tsx', | |
\ }, | |
\} | |
" fix files on save | |
let g:ale_fix_on_save = 1 | |
" lint after 1000ms after changes are made both on insert mode and normal mode | |
let g:ale_lint_on_text_changed = 'always' | |
let g:ale_lint_delay = 1000 | |
" use nice symbols for errors and warnings | |
let g:ale_sign_error = '✗\ ' | |
let g:ale_sign_warning = '⚠\ ' | |
" fixer configurations | |
let g:ale_fixers = { | |
\ '*': ['remove_trailing_lines', 'trim_whitespace'], | |
\} | |
let mapleader="\<space>" | |
let g:airline_theme='onehalfdark' | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif<Paste> | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif | |
" KeyMap | |
nnoremap <C-P> :Files<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment