Skip to content

Instantly share code, notes, and snippets.

@rmfranciacastillo
Last active January 26, 2020 23:32
Show Gist options
  • Save rmfranciacastillo/ae08b370546ea3341e61f0069fe24ba4 to your computer and use it in GitHub Desktop.
Save rmfranciacastillo/ae08b370546ea3341e61f0069fe24ba4 to your computer and use it in GitHub Desktop.
A simple .vimrc file I use to develop
"NeoBundle Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=/home/renato/.vim/bundle/neobundle.vim/
" Required:
call neobundle#begin(expand('/home/renato/.vim/bundle'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" Add or remove your Bundles here:
NeoBundle 'Shougo/neosnippet.vim'
NeoBundle 'Shougo/neosnippet-snippets'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'ctrlpvim/ctrlp.vim'
" Setups vim colorscheme
NeoBundle 'flazz/vim-colorschemes'
" IDE Navigation Directory
NeoBundle 'scrooloose/nerdtree'
" Show status bar in Vim
NeoBundle 'vim-airline/vim-airline'
" Eslint Check syntax in Vim asynchronously and fix files
NeoBundle 'dense-analysis/ale'
NeoBundle 'vim-syntastic/syntastic'
NeoBundle 'leafgarland/typescript-vim'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'jparise/vim-graphql'
NeoBundle 'digitaltoad/vim-jade'
NeoBundle 'posva/vim-vue'
NeoBundle 'isruslan/vim-es6'
NeoBundle 'chr4/nginx.vim'
"" Text Helpers =================
" Autocompleter for HTML and CSS
NeoBundle 'mattn/emmet-vim'
" Autocompletes ([], {}, "", ())
NeoBundle 'jiangmiao/auto-pairs'
" Aligns text
NeoBundle 'junegunn/vim-easy-align'
" Searcher
" NeoBundle 'junegunn/fzf' " requires: sudo apt-get install fzf
" Automatically removes Highlight
NeoBundle 'haya14busa/is.vim'
" A Vim plugin which shows a git diff in the gutter
NeoBundle 'airblade/vim-gitgutter'
" You can specify revision/branch/tag.
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
" Fast commenting tool
NeoBundle 'scrooloose/nerdcommenter'
" Auto completer
NeoBundle 'valloric/youcompleteme'
" Required:
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"End NeoBundle Scriptse------------------------
" Plugin Configs ===============================
" Color Theme
colorscheme badwolf "awesome color-scheme
" jiangmiao/auto-pairs Config
let g:AutoPairsFlyMode = 0
let g:AutoPairsShortcutBackInsert = '<M-b>'
" junegunn/vim-easy-align Config
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
" airblade/vim-gitgutter Config
nmap ]h <Plug>(GitGutterNextHunk)
nmap [h <Plug>(GitGutterPrevHunk)
" vim-syntastic/syntastic Config
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
let g:syntastic_javascript_checkers=['eslint']
" YouCompleteMe config
let g:ycm_use_clangd = 0
" End of Plugin Configs ========================
" Vim System Configs ===========================
" INDENTATION
" show existing tab with 4 spaces width
set tabstop=2
" " when indenting with '>', use 4 spaces width
set shiftwidth=2
" " On pressing tab, insert 4 spaces
set tabstop=2
" " Convert tabs into spaces
set expandtab
" TEXT modification
" Add limit column of 80
set colorcolumn=80
" Set line numbers by pressing F3
noremap <F3> :set invnumber<CR>
inoremap <F3> <C-O>:set invnumber<CR>
" Set relative number by pressing F2
noremap <F2> :set invnumber<CR>:set invrelativenumber<CR>
inoremap <F2> <C-O>:set invnumber<CR><C-O>:set invrelativenumber<CR>
" Highlight searched word
set hlsearch
" Stop vim from creating swap files
set noswapfile
" End of Vim System Configs ====================
@rmfranciacastillo
Copy link
Author

rmfranciacastillo commented Oct 28, 2019

For this gist to work vim and Neobundle must be installed:

vim(Ubuntu): sudo apt install vim
Neobundle: https://github.com/Shougo/neobundle.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment