Skip to content

Instantly share code, notes, and snippets.

@cornedor
Created February 2, 2016 22:47
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 cornedor/cc9d47a6dc6c446c86ea to your computer and use it in GitHub Desktop.
Save cornedor/cc9d47a6dc6c446c86ea to your computer and use it in GitHub Desktop.
set nocompatible
" Vundle
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'Valloric/YouCompleteMe'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'easymotion/vim-easymotion'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'mxw/vim-jsx'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'cakebaker/scss-syntax.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-airline/vim-airline'
Plugin 'airblade/vim-gitgutter'
call vundle#end()
filetype plugin indent on
set backspace=indent,eol,start
" start scroll earlier
set scrolloff=3
" Syntax and colors
set t_Co=256
set background=dark
syntax on
colorscheme molotov
set cursorline
if has('gui_running')
set guifont=Cousine\ for\ Powerline\ 10
endif
" Undo
set undofile
set undodir=~/.vim/undo
set undolevels=1000
set undoreload=10000
" performance
set ttyfast
set lazyredraw
" Invisible characters
set list
" let g:indent_guides_enable_on_vim_startup=1
set listchars=tab:▸\ ,eol:¬
set list listchars+=space:·
" set whitespace color
highlight Whitespace ctermfg=DarkGrey guifg=Grey20
match Whitespace /\s/
" More natural splitting
set splitbelow
set splitright
" Set default indent
set tabstop=2
set shiftwidth=2
set expandtab
" Enable mouse
set mouse=a
" Search"
set ignorecase
set smartcase
" Completion
set completeopt-=preview
:inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
\ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <M-,> pumvisible() ? '<C-n>' :
\ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
" Conceal
set conceallevel=1
set concealcursor=nvic
" JavaScript thanks to pangloss/vim-javascript
let g:javascript_conceal_function = "λ"
let g:javascript_conceal_return = "<"
let g:javascript_conceal_prototype = "#"
" Easymotion
nmap s <Plug>(easymotion-overwin-f2)
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)
map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
map n <Plug>(easymotion-next)
map N <Plug>(easymotion-prev)
" JSX
let g:jsx_ext_required = 0
" CtrlP
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
if executable("ag")
let g:ctrlp_user_command = 'ag %s -i --nocolor --nogroup --ignore ''.git'' --ignore ''.DS_Store'' --ignore ''node_modules'' --hidden -g ""'
else
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
endif
set updatetime=250
" Airline
let g:airline#extensions#tabline#enabled=1
let g:airline_powerline_fonts=1
set laststatus=2
set noshowmode

sudo apt install silversearcher-ag

git clone git@github.com:powerline/fonts.git
./install.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment