Skip to content

Instantly share code, notes, and snippets.

@pdobrowolski
Created May 27, 2015 17:01
Show Gist options
  • Save pdobrowolski/aeacfce36ccd6bcb38a2 to your computer and use it in GitHub Desktop.
Save pdobrowolski/aeacfce36ccd6bcb38a2 to your computer and use it in GitHub Desktop.
Vimrc
" Select your Leader key
let mapleader = "\<Space>"
"Plugins
call plug#begin()
Plug 'tpope/vim-sensible'
Plug 'kien/ctrlp.vim'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
map <leader>d :execute 'NERDTreeToggle ' .getcwd()<CR>
Plug 'altercation/vim-colors-solarized'
Plug 'terryma/vim-expand-region'
Plug 'Lokaltog/vim-easymotion'
let g:EasyMotion_do_mapping = 0 " Disable default mappings
let g:EasyMotion_smartcase = 1
" easier moving to lines
nmap s <Plug>(easymotion-s2)
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)
" search improvement
map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
map n <Plug>(easymotion-next)
map N <Plug>(easymotion-prev)
Plug 'ervandew/supertab'
Plug 'bling/vim-airline'
let g:airline_theme='solarized'
let g:airline_left_sep=''
let g:airline_right_sep=''
" Navitate freely between tmux and vim
Plug 'christoomey/vim-tmux-navigator'
" Airline style of tmux status line
Plug 'edkolev/tmuxline.vim'
let g:tmuxline_powerline_separators = 0
call plug#end()
"Mappings
nnoremap <Leader>o :CtrlP<CR>
nnoremap <Leader>i :CtrlPBuffer<CR>
nnoremap <Leader>w :w<CR>
nnoremap <Leader>q :q<CR>
nnoremap <Leader>s :wq<CR>
nnoremap <Leader>b :make<CR>
vmap <Leader>y "+y
vmap <Leader>d "+d
nmap <Leader>p "+p
nmap <Leader>P "+P
vmap <Leader>p "+p
vmap <Leader>P "+P
noremap Y y$
vnoremap <silent> y y`]
vnoremap <silent> p p`]
nnoremap <silent> p p`]
noremap gV `[v`]
nmap <Leader><Leader> V
vmap v <Plug>(expand_region_expand)
vmap <C-v> <Plug>(expand_region_shrink)
nnoremap <CR> G
nnoremap <BS> gg
nnoremap <Leader><Tab> <C-^>
"Settings
set mouse=a "Enable the mouse
set number "Show line numbers
set tabstop=4 shiftwidth=4 expandtab "Tab settings (tabs as spaces)
set list "Display whitespaces as characters
set background=dark
colorscheme solarized
@pdobrowolski
Copy link
Author

@pdobrowolski
Copy link
Author

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