-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
142 lines (118 loc) · 3.93 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
set nocompatible
filetype off
" Vundle
"set rtp+=~/.vim/bundle/Vundle.vim
"call vundle#begin()
"Plugin 'gmarik/Vundle.vim'
"Plugin 'powerline/fonts'
"Plugin 'Valloric/YouCompleteMe'
"Plugin 'airblade/vim-gitgutter'
"Plugin 'vim-airline/vim-airline'
"Plugin 'vim-airline/vim-airline-themes'
"Plugin 'dhruvasagar/vim-table-mode'
"Plugin 'easymotion/vim-easymotion'
"Plugin 'flazz/vim-colorschemes'
"Plugin 'hallison/vim-markdown'
"Plugin 'junegunn/vim-easy-align'
"Plugin 'kien/ctrlp.vim'
"Plugin 'kien/rainbow_parentheses.vim'
"Plugin 'mattn/emmet-vim'
"Plugin 'mustache/vim-mustache-handlebars'
"Plugin 'nathanaelkane/vim-indent-guides'
"Plugin 'nelstrom/vim-markdown-folding'
"Plugin 'osyo-manga/vim-over'
"Plugin 'pangloss/vim-javascript'
"Plugin 'rust-lang/rust.vim'
"Plugin 'scrooloose/nerdcommenter'
"Plugin 'scrooloose/syntastic'
"Plugin 'thinca/vim-qfreplace'
"Plugin 'tpope/vim-fugitive'
"Plugin 'vim-scripts/kwbdi.vim'
"Plugin 'wellle/targets.vim'
"call vundle#end()
"-----------------------------------------------------------------------------
" General
"-----------------------------------------------------------------------------
syntax on
filetype plugin indent on
set number
set encoding=utf-8
set list listchars=tab:→\ ,trail:·
let mapleader=","
set nowrap
set backspace=indent,eol,start
set whichwrap+=<,>,[,]
set nohlsearch
set cpoptions+=$
set tabstop=4
set shiftwidth=4
set expandtab
set hidden
set pastetoggle=<F3>
set shell=bash " Let zsh know how to run things on the command line
set nobackup " Don't constantly write backup files
set noswapfile " Ain't nobody got time for swap files
set ignorecase " Ignore case when searching
set hlsearch " Highlight last used search pattern
set incsearch " Do incremental searching
"-----------------------------------------------------------------------------
" Formattings
"-----------------------------------------------------------------------------
" t = auto wrap using textwidth
set formatoptions+=tc
set textwidth=79
" Allow modelines
set modeline
"-----------------------------------------------------------------------------
" GUI
"-----------------------------------------------------------------------------
" Remove gvim toolbar, scrollbars, and menu
set guioptions=ac
" Change background for column > 80 chars
"let &colorcolumn=join(range(80,999), ",")
"-----------------------------------------------------------------------------
" Folding
"-----------------------------------------------------------------------------
" Use syntax folding method
set fdm=syntax
"-----------------------------------------------------------------------------
" Plugin Settings
"-----------------------------------------------------------------------------
" powerline
set laststatus=2
set t_Co=256
set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 10
" airline
let g:airline_powerline_fonts=1
let g:airline_theme='powerlineish'
let g:airline_detect_modified=1
let g:airline#extensions#branch#enabled=1
let g:airline#extensions#syntastic#enabled=1
" ctrlp
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.(git|hg|svn)|node_modules|tmp|dist)$',
\ 'file': '\v\.(exe|so|dll|class)$',
\ }
let g:ctrlp_working_path_mode = 'a'
" python-mode
let g:pymode_doc = 0
set completeopt=menu
" Bug -> https://github.com/klen/python-mode/issues/342
let g:pymode_rope_lookup_project = 0
let g:pymode_rope = 0
"-----------------------------------------------------------------------------
" Mappings
"-----------------------------------------------------------------------------
nnoremap <Leader>fr :call VisualFindAndReplace()<CR>
xnoremap <Leader>fr :call VisualFindAndReplaceWithSelection()<CR>
"-----------------------------------------------------------------------------
" Functions
"-----------------------------------------------------------------------------
function! VisualFindAndReplace()
:OverCommandLine%s/
:w
endfunction
function! VisualFindAndReplaceWithSelection() range
:'<,'>OverCommandLine s/
:w
endfunction