Created
September 28, 2017 08:54
My vimrc
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') | |
let g:plug_url_format = 'git@github.com:%s.git' | |
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 'tpope/vim-speeddating' | |
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' | |
Plug 'chrisbra/Colorizer' | |
Plug 'slashmili/alchemist.vim' | |
Plug 't9md/vim-textmanip' | |
Plug 'alvan/vim-closetag' | |
" Language (gramma) fixers | |
Plug 'rhysd/vim-grammarous' | |
Plug 'dpelle/vim-LanguageTool' | |
Plug 'bogado/file-line' | |
Plug 't9md/vim-ruby-xmpfilter' | |
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 | |
let g:grammarous#languagetool_cmd = 'languagetool' | |
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 | |
map \\ gcc | |
nnoremap <silent> <cr> :nohlsearch<bar>:echo<cr><cr> | |
nnoremap ; : | |
nnoremap ! :! | |
nnoremap ;w :w<cr> | |
cnoremap Ag Ag! | |
" Easier split navigations | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
nnoremap <c-t> :CtrlPTag<cr> | |
cmap W w | |
cmap WQ wq | |
cmap wQ wq | |
cmap Q q | |
vnoremap < <gv | |
vnoremap > >gv | |
" Moving code around | |
xmap <Space>d <Plug>(textmanip-duplicate-down) | |
nmap <Space>d <Plug>(textmanip-duplicate-down) | |
xmap <Space>D <Plug>(textmanip-duplicate-up) | |
nmap <Space>D <Plug>(textmanip-duplicate-up) | |
xmap <C-j> <Plug>(textmanip-move-down) | |
xmap <C-k> <Plug>(textmanip-move-up) | |
xmap <C-h> <Plug>(textmanip-move-left) | |
xmap <C-l> <Plug>(textmanip-move-right) | |
" toggle insert/replace with <F10> | |
nmap <F10> <Plug>(textmanip-toggle-mode) | |
xmap <F10> <Plug>(textmanip-toggle-mode) | |
" xmpfilter | |
nmap <buffer> <F4> <Plug>(xmpfilter-run) | |
xmap <buffer> <F4> <Plug>(xmpfilter-run) | |
imap <buffer> <F4> <Plug>(xmpfilter-run) | |
nmap <buffer> <F3> <Plug>(xmpfilter-mark) | |
xmap <buffer> <F3> <Plug>(xmpfilter-mark) | |
imap <buffer> <F3> <Plug>(xmpfilter-mark) | |
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 | |
let g:languagetool_jar="/usr/share/languagetool/lib/languagetool.jar" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment