-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
91 lines (66 loc) · 2.03 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
set nocompatible " be iMproved, required
filetype off " required by vundle
" 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 'tpope/vim-fugitive'
Plugin 'Valloric/YouCompleteMe'
Plugin 'tomasr/molokai'
Plugin 'majutsushi/tagbar'
Plugin 'plasticboy/vim-markdown'
Plugin 'tpope/vim-surround'
Plugin 'ivanov/vim-ipython'
Plugin 'scrooloose/nerdtree'
Plugin 'fholgado/minibufexpl.vim'
Plugin 'altercation/vim-colors-solarized'
Plugin 'bling/vim-airline'
Plugin 'scrooloose/nerdcommenter'
call vundle#end()
"
" General settings
"
" Create and load views silently on all files
autocmd BufWinLeave * if expand("%") != "" | mkview | endif
autocmd BufWinEnter * if expand("%") != "" | loadview | endif
" Enable automatic indentation
filetype plugin indent on
" Enable syntax highlighting
syntax on
" Enable 256 color support
set t_Co=256
" Solarized color scheme
let g:solarized_termcolors=256
set background=dark
colorscheme solarized
" Always show line numbers
:set number
" Fix copying in terminal with line numbers enabled
:set mouse=a
" Autostart
autocmd vimenter * NERDTree " Open NERDTree
"autocmd vimenter * MBEOpen " Open minibufexplorer
autocmd vimenter * wincmd w " Switch to buffer with open file
" Autoend
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
"
" Custom key mappings
"
" Remap flake8 to avoid no mapping bug
autocmd FileType python map <buffer> <F3> :call Flake8()<CR>
" Open/Close NERDTree with Ctrl+N
map <C-n> :NERDTreeToggle<CR>
" Map ctrl-movement keys to window switching
map <C-k> <C-w><Up>
map <C-j> <C-w><Down>
map <C-l> <C-w><Right>
map <C-h> <C-w><Left>
" Switch to alternate file
map <C-Tab> :bnext<cr>
map <C-S-Tab> :bprevious<cr>
" Set paste toggle button
map <F10> :set invpaste<CR>
set pastetoggle=<F10>
" Map solarized color toggle
call togglebg#map("<F2>")