-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
123 lines (95 loc) · 2.9 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
set nocompatible
filetype off
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 'gmarik/Vundle.vim'
Bundle 'Valloric/YouCompleteMe'
Plugin 'bling/vim-airline'
Plugin 'sjl/badwolf'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdcommenter'
Plugin 'toyamarinyon/vim-swift'
Plugin 'xolox/vim-session'
Plugin 'xolox/vim-misc'
Plugin 'scrooloose/nerdtree'
Plugin 'Raimondi/delimitMate'
Plugin 'mileszs/ack.vim'
Plugin 'majutsushi/tagbar'
Plugin 'nvie/vim-flake8'
Plugin 'easymotion/vim-easymotion'
" 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
set shiftwidth=4
set tabstop=4
set softtabstop=4
set autoindent
set expandtab
set ignorecase
set smartcase
set laststatus=2
let g:airline#extensions#tabline#enabled = 1
set nu
set runtimepath^=~/.vim/bundle/ctrlp.vim
" Ignore some files
let g:ctrlp_custom_ignore='tmp$\|\.git$\|\.hg$\|\.svn$\|\.pyc$\|\.png$\|\.jpg$\|\.otf$\|\.woff$\|\.mp3$\|\.ico$\|\.pdf$\|\.woff2$\|\.ttf$\|\.eot$\|\.svg$'
" Ignores .pyc files from searches and stuff
let g:ycm_autoclose_preview_window_after_completion=1
nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
nnoremap <leader>G :YcmCompleter GoToImplementation<CR>
" Leader = ,
let mapleader = ","
" }}}
" ##### General mappings {{{
" ##### Tabs {{{
nnoremap <leader>t :tabnew<cr>
nnoremap <leader>e :tabedit
nnoremap <leader>c :tabclose<cr>
nnoremap <leader>n :tabnext<cr>
nnoremap <leader>p :tabprevious<cr>
" }}}
" Go to start of line with H and to the end with $
noremap H ^
noremap L $
noremap <leader>fs :set lines=999 columns=9999<cr>
" Easy buffer navigation
nnoremap gn :bn<CR>
nnoremap gp :bp<CR>
nnoremap gd :bw<CR>
nmap <S-Enter> O<Esc>
colorscheme badwolf
set relativenumber
let g:session_autosave = 'yes'
let g:session_autoload = 'no'
" tell it to use an undo file
set undofile
set undodir=~/.vimundo/
" Supress warning when moving out from unsaved buffers
set hidden
" Supress warning when reloading file
setl autoread
silent! nmap <C-n> :NERDTreeToggle<CR>
silent! map <F3> :NERDTreeFind<CR>
let g:NERDTreeMapActivateNode="<F3>"
let g:NERDTreeMapPreview="<F4>"
" Map for tagbar
nmap <F8> :TagbarToggle<CR>
if filereadable('.vimrclocal')
so .vimrclocal
endif