Skip to content

Instantly share code, notes, and snippets.

@GusGA
Created August 26, 2016 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GusGA/c9d37cc524c6ec3e7257e37bb84eb6ea to your computer and use it in GitHub Desktop.
Save GusGA/c9d37cc524c6ec3e7257e37bb84eb6ea to your computer and use it in GitHub Desktop.
set encoding=utf-8
set nocompatible " We're running Vim, not Vi!
filetype off
:set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'mattn/emmet-vim'
Plugin 'fatih/vim-go'
Plugin 'scrooloose/nerdtree'
"Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-rails'
Plugin 'vim-ruby/vim-ruby'
Plugin 'tpope/vim-endwise'
Plugin 'skalnik/vim-vroom'
Plugin 'tpope/vim-fugitive'
Plugin 'orenhe/pylint.vim'
Plugin 'avakhov/vim-yaml'
Plugin 'kien/ctrlp.vim'
"Plugin 'aklt/plantuml-syntax'
Plugin 'Valloric/YouCompleteMe'
Plugin 'YankRing.vim'
Plugin 'AutoComplPop'
Plugin 'satanas/rename.vim'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'pangloss/vim-javascript'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'scrooloose/syntastic'
Plugin 'rstacruz/sparkup'
Plugin 'ajh17/Spacegray.vim'
Plugin 'majutsushi/tagbar'
Plugin 'slim-template/vim-slim.git'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'morhetz/gruvbox'
Plugin 'elixir-lang/vim-elixir'
Plugin 'kchmck/vim-coffee-script'
Plugin 'ngmy/vim-rubocop'
call vundle#end()
"set statusline=%t%m%r%h%w\ [POS=%04l,%04v]\ [%p%%]\ [LEN=%L]
set cursorline
set number
set numberwidth=5
colorscheme gruvbox
let g:gruvbox_contrast_dark='hard'
set background=dark
let g:airline_powerline_fonts=1
let g:solarized_termcolors=256
let g:Powerline_symbols = 'fancy'
" Strip white space
autocmd BufWritePre * :%s/\s\+$//e
" Formatting (some of these are for coding in C and C++)
set modeline
set ls=2 " Always show status bar
set ts=2 " Tabs are 2 spaces
set bs=2 " Backspace over everything in insert mode
set shiftwidth=4 " Tabs under smart indent
set softtabstop=4
set autoindent
"set smarttab
set expandtab
set nowrap " Line wrapping off
set showmatch " Show matching brackets.
set incsearch " Incremental searches
set ignorecase " Ignore case in searches
set smartcase " Ignore case except when you type upper case letters
set hlsearch " Highlight searches
set mat=5 " Bracket blinking.
set list
set listchars=tab:→-,trail:·
set scrolloff=3 " when scrolling, keep cursor 3 lines away from screen border
set colorcolumn=120
set noswapfile " disable swap - all buffers will be opened in memory
set mouse=a " enable mouse scrolling in OSX
syntax on
filetype plugin indent on " Enable filetype-specific indenting and plugins
autocmd FileType python setlocal ts=4 shiftwidth=4 softtabstop=4 "foldmethod=indent foldlevel=99
autocmd FileType ruby setlocal ts=2 shiftwidth=2 softtabstop=2 "foldmethod=indent
autocmd FileType javascript setlocal ts=2 shiftwidth=2 softtabstop=2 "foldmethod=syntax
autocmd FileType coffee setlocal ts=2 shiftwidth=2 softtabstop=2 "foldmethod=syntax
autocmd FileType css setlocal ts=2 shiftwidth=2 softtabstop=2 "foldmethod=syntax
autocmd FileType php setlocal ts=4 softtabstop=4 "foldmethod=syntax
autocmd FileType cpp setlocal ts=4 softtabstop=4 "foldmethod=syntax
autocmd FileType hpp setlocal ts=4 softtabstop=4 "foldmethod=syntax
autocmd FileType scala setlocal ts=2 shiftwidth=2 softtabstop=2 "foldmethod=indent
autocmd FileType html setlocal ts=2 shiftwidth=2 softtabstop=2 "foldmethod=indent
"autocmd FileType python compiler pylint
" Shorcuts for tabs
:nmap <C-tab> :tabnext .<CR>
:nmap <C-S-tab> :tabprevious
:nmap <C-t> :tabnew .<CR>
:nmap <C-o> :CtrlP<CR>
:nmap <C-l> :TagbarToggle<CR>
map <F3> :NERDTreeToggle<CR>
let g:syntastic_ruby_checkers = ['mri', 'rubocop']
" Rubocop file
let g:vimrubocop_config = '~/.rubocop.yml'
let g:vimrubocop_keymap = 0
" nmap <Leader>r :Rubocop<CR>
"TagBar Mapping
"Golang
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
let g:airline_theme='powerlineish'
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" 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 = ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment