-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
173 lines (144 loc) · 4.27 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
syntax on
set autochdir
set autoindent
set autowrite
set backspace=2
"set cursorline
"set colorcolumn=80
set expandtab
set incsearch
set ignorecase
set laststatus=2
set modelines=2
set nobackup
set nocompatible
set nowritebackup
"set number
"set mouse=a
set pastetoggle=<F7>
"set ruler
set shiftwidth=4
set showmatch
set smartcase
set splitright
set tabstop=4
set textwidth=0
set wildmode=longest,list,full
set wildmenu
let mapleader=","
" cindent setup - from ecrampton
" N-s: don't indent inside namespaces
" g0: don't indent C++ scope declarations
" :0: don't ident cases inside switch
set cindent
set cino=N-s,g0
" Plugin Configuration
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'bufexplorer.zip'
Plugin 'bufkill.vim'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/nerdcommenter'
Plugin 'tpope/vim-commentary'
Plugin 'altercation/vim-colors-solarized'
Plugin 'arcticicestudio/nord-vim'
Plugin 'Lokaltog/vim-monotone'
"Plugin 'airblade/vim-gitgutter'
" Plugin 'derekwyatt/vim-fswitch'
" Plugin for .tmux.conf
Plugin 'tmux-plugins/vim-tmux'
Plugin 'rodjek/vim-puppet'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'junegunn/vim-easy-align'
Plugin 'pangloss/vim-javascript'
Plugin 'itchyny/lightline.vim'
" Racket
Plugin 'benknoble/vim-racket'
"Plugin 'tpope/vim-surround.git'
Plugin 'junegunn/rainbow_parentheses.vim'
"Plugin 'MicahElliott/vrod'
""Plugin 'guns/vim-sexp'
Plugin 'jpalardy/vim-slime'
Plugin 'benknoble/vim-sexp'
Plugin 'tpope/vim-sexp-mappings-for-regular-people'
" Python
"Plugin 'vim-scripts/indentpython.vim'
Plugin 'Vimjas/vim-python-pep8-indent'
" All of your Plugins must be added before the following line
call vundle#end() " required
" filetype (required for Vundle)
filetype on
filetype plugin on
filetype indent on
" Color scheme
"set t_Co=256
set background=dark
"let g:solarized_termcolors = 256
let g:solarized_termtrans = 1
"colorscheme solarized
colorscheme nord
"let g:ctrlp_extensions = ['switcher','changes','mixed']
let g:ctrlp_extensions = ['changes','mixed']
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
" Start interactive EasyAlign in visual mode (e.g. vip<Enter>)
vmap <Enter> <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
let g:lightline = { 'colorscheme' : 'solarized', }
" NERDTree
let NERDTreeWinSize=41
" Close vim if the only window left open is NERDTree.
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" I usually have a vertical split, so make sure the splits are even each time
" NERDTree appears and disappears
nmap <leader>e :NERDTreeToggle<cr><C-w>=
" bufexplorer
let g:bufExplorerShowRelativePath=1
" gitgutter
highlight clear SignColumn " better gutter coloring with solarized
set updatetime=750
" Key bindings
nmap <leader>t :TagbarToggle<cr>
" Other useful hacks
" Custom macros
map <F2> oprintf ("%s: %s (%d)\n", __FILE__, __PRETTY_FUNCTION__, __LINE__);<ESC>==
map <F3> ofprintf (stderr, "%s: %s (%d)\n", __FILE__, __PRETTY_FUNCTION__, __LINE__);<ESC>==
" Python syntax options
let python_highlight_all = 1
" Jump to last position when opening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
au BufEnter *.rkt,*.rktl set filetype=racket
au filetype racket set lisp
au filetype racket set autoindent
endif
" I despise trailing whitespace. Show it to me so I can nuke it!
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
function! NukeTrailingWhiteSpace()
%s/\s\+$//e
endfunction
nmap <leader>w :call NukeTrailingWhiteSpace()<CR>
let g:slime_target = "vimterminal"
let g:slime_vimterminal_cmd = "racket"
let g:slime_vimterminal_config = {"norestore": 1, "term_rows": "10", "term_finish": "close"}
set splitbelow
augroup rainbow_lisp
autocmd!
autocmd FileType lisp,clojure,scheme,racket RainbowParentheses
augroup END
" Python
" au BufNewFile,BufRead *.py
" \ set tabstop=4
" \ set softtabstop=4
" \ set shiftwidth=4
" \ set textwidth=79
" \ set expandtab
" \ set autoindent
" \ set fileformat=unix
" \ set encoding=utf-8