-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
170 lines (134 loc) · 4.18 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
if !exists("g:os")
if has("win64") || has("win32") || has("win16")
let g:os = "Windows"
else
let g:os = substitute(system('uname'), '\n', '', '')
endif
endif
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'scrooloose/nerdtree'
Plugin 'altercation/vim-colors-solarized'
Plugin 'chriskempson/base16-vim'
Bundle 'davidhalter/jedi-vim'
"Plugin 'Valloric/YouCompleteMe'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'vim-flake8'
Bundle 'takac/vim-hardtime'
Plugin 'easymotion/vim-easymotion'
Plugin 'tmhedberg/SimpylFold'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdcommenter'
Plugin 'tell-k/vim-autopep8'
"Plugin 'scrooloose/syntastic'
Plugin 'janko-m/vim-test'
Plugin '907th/vim-auto-save'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"
"
""""""""""""""""""""""""""""""""
"Colour
""""""""""""""""""""""""""""""""
syntax enable
let base16colorspace=256
colorscheme base16-ocean
let g:airline_theme='base16_ocean'
let airline_theme='base16_ocean'
set background=dark
set encoding=utf-8
set spell spelllang=en_gb
let mapleader=","
imap jk <Esc>
function! NumberToggle()
if(&relativenumber == 1)
set number
set norelativenumber
else
set relativenumber
endif
endfunc
set number
call NumberToggle()
au BufNewFile,BufRead *.py
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
au BufNewFile,BufRead *.js, *.html, *.css |
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2
set noswapfile
set pastetoggle=<F3>
set splitbelow
set splitright
map <F2> :NERDTreeToggle<CR>
map <leader>rr :w !python <cr>
nmap <leader>ll :w <cr> :!latexmk -xelatex % <cr>
nmap <leader>lv :!evince %:r.pdf & <cr>
nnoremap <C-n> :call NumberToggle()<cr>
let NERDTreeIgnore = ['\.pyc$']
let g:hardtime_default_on = 0
let g:EasyMotion_do_mapping = 0 " Disable default mappings
" Jump to anywhere you want with minimal keystrokes, with just one key binding.
" `s{char}{label}`
"nmap s <Plug>(easymotion-overwin-f)
" or
" `s{char}{char}{label}`
" Need one more keystroke, but on average, it may be more comfortable.
nmap s <Plug>(easymotion-overwin-f2)
" Turn on case insensitive feature
let g:EasyMotion_smartcase = 1
" JK motions: Line motions
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)
let g:ctrlp_map = '<c-p>'
set wildignore+=*.pyc
nnoremap <Leader>b :CtrlPBuffer <cr>
nnoremap <Leader>h :CtrlP ~<cr>
let g:SimpylFold_docstring_preview=1
let g:SimpylFold_fold_import = 0
nnoremap <space> za
set laststatus=2
set statusline+="%{fugitive#statusline()}"
let g:autopep8_max_line_length=100
let g:autopep8_disable_show_diff=1
let &colorcolumn="80,".join(range(100,999),",")
nmap <silent> <leader>t :TestNearest<CR>
nmap <silent> <leader>T :TestFile<CR>
nmap <silent> <leader>a :TestSuite<CR>
nmap <silent> <leader>l :TestLast<CR>
nmap <silent> <leader>g :TestVisit<CR>
let g:auto_save = 1 " enable AutoSave on Vim startup
let g:jedi#auto_close_doc = 1
let g:jedi#show_call_signatures = 2