Created
August 11, 2016 15:29
-
-
Save gotar/5e54707490bf1253cf48cce31218e8d9 to your computer and use it in GitHub Desktop.
vimrc file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocp | |
set encoding=utf-8 | |
call plug#begin('~/.vim/plugged') | |
Plug 'kien/ctrlp.vim' | |
Plug 'rking/ag.vim' | |
Plug 'tpope/vim-bundler' | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-endwise' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-rake' | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'tpope/vim-vinegar' | |
Plug 'w0ng/vim-hybrid' | |
Plug 'godlygeek/tabular' | |
Plug 'elixir-lang/vim-elixir' | |
Plug 'reedes/vim-pencil' | |
Plug 'ervandew/supertab' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'Valloric/YouCompleteMe', { 'do': './install.sh' } | |
Plug 'slim-template/vim-slim' | |
Plug 'kchmck/vim-coffee-script' | |
call plug#end() | |
filetype plugin indent on | |
syntax enable | |
set number | |
set showcmd | |
set laststatus=2 | |
set statusline=%<%f\ %{fugitive#head()}\ %y%r%m%=%l:%c\ \ %p | |
set noshowmode | |
set cursorline | |
set clipboard=unnamed | |
set backup | |
set noswapfile | |
set backupdir=~/.vim/backup// | |
set undodir=~/.vim/undo// | |
set undofile | |
set history=50 | |
set nowrap | |
set tabstop=2 softtabstop=2 shiftwidth=2 | |
set smarttab | |
set shiftround | |
set expandtab | |
set backspace=indent,eol,start | |
set autoindent | |
set cindent | |
set cinoptions=l1,j1 | |
set autoread | |
set hidden | |
set list | |
set listchars=tab:▸\ ,eol:¬ | |
set showbreak=↪ | |
set fillchars=diff:⣿,vert:│ | |
set diffopt+=vertical | |
set ruler | |
set hlsearch | |
set incsearch | |
set gdefault | |
set ignorecase | |
set smartcase | |
set scrolloff=3 | |
set sidescroll=1 | |
set sidescrolloff=10 | |
" set splitright | |
" set splitbelow | |
set shell=/bin/bash | |
set wildmenu | |
set wildignore+=.hg,.git,.svn,.DS_Store | |
set ttyfast | |
set lazyredraw | |
set shortmess=filmnrwxsAIc | |
set noerrorbells | |
set novisualbell | |
set autoread | |
set autowrite | |
set t_vb= | |
set tags+=./.git/tags | |
let g:mapleader = "\<space>" | |
let g:hybrid_use_Xresources = 1 | |
set background=dark | |
colorscheme hybrid | |
autocmd BufWritePre * :%s/\s\+$//e | |
augroup vimrc | |
autocmd! | |
autocmd VimResized * :wincmd = | |
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif | |
autocmd InsertLeave * if expand('%') != '' | update | endif | |
autocmd FileType gitcommit setl spell | |
autocmd FileType gitcommit setl diffopt+=vertical | |
autocmd FileType netrw setl bufhidden=wipe | |
augroup END | |
augroup pencil | |
autocmd! | |
autocmd FileType markdown,mkd call pencil#init() | |
\ | setl spell spl=pl sw=2 ts=2 | |
autocmd FileType text call pencil#init({'wrap': 'hard', 'textwidth': 72}) | |
\ | setl spell spl=pl sw=2 ts=2 | |
augroup END | |
map \\ gcc | |
nnoremap <silent> <cr> :nohlsearch<bar>:echo<cr><cr> | |
nnoremap ; : | |
nnoremap ! :! | |
nnoremap ;w :w<cr> | |
cnoremap Ag Ag! | |
nnoremap <c-t> :CtrlPTag<cr> | |
cmap W w | |
cmap WQ wq | |
cmap wQ wq | |
cmap Q q | |
vnoremap < <gv | |
vnoremap > >gv | |
let g:ctrlp_custom_ignore = '\v[\/](\.(git|hg|svn))$' | |
let g:ctrlp_reuse_window = 'netrw\|help\|quickfix' | |
let g:ctrlp_use_caching = 0 | |
let g:ctrlp_user_command = [ | |
\ '.git', | |
\ 'cd %s && git ls-files . -co --exclude-standard', | |
\ 'find %s -type f' | |
\ ] | |
let g:ctrlp_working_path_mode = 'r' | |
let g:netrw_dirhistmax = 0 | |
let g:ycm_collect_identifiers_from_tags_files = 1 | |
let g:ycm_seed_identifiers_with_syntax = 1 | |
let g:ycm_complete_in_comments = 1 | |
let g:ycm_complete_in_strings = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment