Skip to content

Instantly share code, notes, and snippets.

@tncbbthositg
Last active June 4, 2018 13:24
Show Gist options
  • Save tncbbthositg/ad75dcae03c5ca7abcaa1f0e3f061958 to your computer and use it in GitHub Desktop.
Save tncbbthositg/ad75dcae03c5ca7abcaa1f0e3f061958 to your computer and use it in GitHub Desktop.
The vim configuration I use for development
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/syntastic'
Plug 'vim-airline/vim-airline'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-commentary'
Plug 'slim-template/vim-slim'
Plug 'kchmck/vim-coffee-script'
Plug 'janko-m/vim-test'
Plug 'benmills/vimux'
Plug 'terryma/vim-multiple-cursors'
Plug 'puppetlabs/puppet-syntax-vim'
Plug 'elzr/vim-json'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
" Plug 'quramy/tsuquyomi'
Plug 'leafgarland/typescript-vim'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
call plug#end()
nnoremap <silent> <Leader>+ :exe "vertical resize " . (winheight(0) * 3/2)<CR>
nnoremap <silent> <Leader>- :exe "vertical resize " . (winheight(0) * 2/3)<CR>
nnoremap <silent> <CR> :noh<CR><CR>
nmap <leader>nt :NERDTreeToggle<cr>
nmap <leader>ntf :NERDTreeFind<cr>
nmap <leader>p <C-p>
nmap <leader>pf <C-p><C-f>
nmap <silent> <leader>tn :wa<CR> :TestNearest<CR>
nmap <silent> <leader>tf :wa<CR> :TestFile<CR>
nmap <silent> <leader>ta :wa<CR> :TestSuite<CR>
nmap <silent> <leader>tl :wa<CR> :TestLast<CR>
nmap <silent> <leader>tv :wa<CR> :TestVisit<CR>
vmap <C-c> :w !pbcopy<CR><CR>
syntax enable
filetype on
set number
set softtabstop=2 shiftwidth=2 expandtab
set scrolloff=5
set background=dark
set hlsearch
let NERDTreeShowHidden=1
let g:multi_cursor_exit_from_visual_mode=0
let g:multi_cursor_exit_from_insert_mode=0
:au FocusLost * :wa
autocmd BufWritePre * :%s/\s\+$//e
au BufNewFile,BufRead *.*slim set filetype=slim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment