Skip to content

Instantly share code, notes, and snippets.

@mateushnsoares
Last active October 17, 2020 20:26
Show Gist options
  • Save mateushnsoares/a3cbe133bee1c063212ec1900c3843e7 to your computer and use it in GitHub Desktop.
Save mateushnsoares/a3cbe133bee1c063212ec1900c3843e7 to your computer and use it in GitHub Desktop.
map q :quit<CR> " Shortcut to quit editor
map <C-b> :NERDTreeToggle<CR> " Shortcut to toogle NERDTree (plugin)
" Add shortcuts like ctrl+s to save, ctrl+c to copy etc
" Need of gvim instaled but run in vim
source $VIMRUNTIME/mswin.vim
behave mswin
" Numbers
highlight LineNr ctermfg=gray
set number
set numberwidth=4
set ruler
" Indentation
set autoindent
set cindent
set smartindent
" Tab Options
set shiftwidth=2
set tabstop=2
set softtabstop=2
set expandtab
" Set default encoding to utf-8
set encoding=utf-8
set termencoding=utf-8
" Disable backups and swap files
set nobackup
set nowritebackup
set noswapfile
set mouse=a " Make work more fine the copy with mouse
set wrap " Active visual line break
set laststatus=2 " Add some informations to status bar
set incsearch " Colorize the items of the search without need press enter
set confirm " Open menu to confirmations
set cc=80
set wrap
set wildmode=list:longest
" Jump 2 lines by scroll
noremap <C-e> 2<C-e>
noremap <C-y> 2<C-y>
set wildmenu " Option to autocomplete with tab the options of vim in comand-line mode
autocmd BufWritePre * :%s/\s\+$//e " Remove blank spaces on save
let g:coc_global_extensions = [ 'coc-tsserver' ] " TS Server
let g:airline_theme='dracula'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
call plug#begin('~/.vim/plugged')
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'editorconfig/editorconfig-vim'
Plug 'mattn/emmet-vim'
Plug 'scrooloose/nerdtree'
Plug 'terryma/vim-multiple-cursors'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'neoclide/coc.nvim' , { 'branch' : 'release' }
Plug 'tpope/vim-bundler'
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'ervandew/supertab'
Plug 'w0rp/ale'
Plug 'styled-components/vim-styled-components', { 'branch': 'main' }
call plug#end()
autocmd BufWritePre * :%s/\s\+$//e " Remove blank spaces on save
syntax on
" Set default encoding to utf-8
set encoding=utf-8
set termencoding=utf-8
" Ale
let g:ale_sign_error = '●' " Less aggressive than the default '>>'
let g:ale_sign_warning = '.'
let g:ale_lint_on_enter = 0 " Less distracting when opening a new file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment