Skip to content

Instantly share code, notes, and snippets.

@localhostdotdev
Created March 17, 2019 20:38
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 localhostdotdev/aa25d1c81f3f3b67ac35eccf1692f251 to your computer and use it in GitHub Desktop.
Save localhostdotdev/aa25d1c81f3f3b67ac35eccf1692f251 to your computer and use it in GitHub Desktop.
set tabstop=2 shiftwidth=2 expandtab
set autoindent
set smarttab
syntax on
set shell=/bin/bash
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/vundle'
Plugin 'tpope/vim-haml'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-markdown'
Plugin 'altercation/vim-colors-solarized'
Plugin 'cakebaker/scss-syntax.vim'
Plugin 'yaymukund/vim-rabl'
Plugin 'bogado/file-line'
Plugin 'kchmck/vim-coffee-script'
Plugin 'slim-template/vim-slim'
Plugin 'joukevandermaas/vim-ember-hbs'
Plugin 'datanoise/vim-crystal'
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'
call vundle#end()
filetype plugin indent on
imap ,t <Esc>:tabnew<CR>
set nobackup
set nowritebackup
set noswapfile
set whichwrap+=<,>,h,l,[,]
set wildignore+=*.png,*.jpg,*.woff,*.js.gz,*.css.gz
set scrolloff=3
highlight ColorColumn ctermbg=magenta
call matchadd('ColorColumn', '\%101v', 100)
autocmd BufNewFile,BufRead *.json set ft=javascript
autocmd BufNewFile,BufRead Gemfile set filetype=ruby
autocmd BufNewFile,BufRead *.prawn set filetype=ruby
autocmd BufNewFile,BufRead Guardfile set filetype=ruby
autocmd InsertLeave * set iminsert=0
set backspace=indent,eol,start
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
highlight ExtraTabs ctermbg=red guibg=red
match ExtraTabs /\t/
nmap <S-Up> v<Up>
nmap <S-Down> v<Down>
nmap <S-Left> v<Left>
nmap <S-Right> v<Right>
vmap <S-Up> <Up>
vmap <S-Down> <Down>
vmap <S-Left> <Left>
vmap <S-Right> <Right>
imap <S-Up> <Esc>v<Up>
imap <S-Down> <Esc>v<Down>
imap <S-Left> <Esc>v<Left>
imap <S-Right> <Esc>v<Right>
set viminfo='100,<1000,s100,h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment