This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
103 lines (78 loc) · 2.95 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
"----------------------------------------
" NeoBundle initialization:
"---------------------------------------
" Note: Skip initialization for vim-tiny or vim-small.
if 0 | endif
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath^=~/.vim/bundle/neobundle.vim/
" Required:
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
NeoBundle 'vim-airline/vim-airline'
NeoBundle 'vim-airline/vim-airline-themes'
NeoBundle 'bling/vim-bufferline'
NeoBundle 'scrooloose/nerdtree'
NeoBundle 'scrooloose/nerdcommenter'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'easymotion/vim-easymotion'
NeoBundle 'majutsushi/tagbar'
NeoBundle 'altercation/vim-colors-solarized'
" Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"----------------------------------------
"Misc section:
"----------------------------------------
let mapleader=" "
noremap <LEADER>n :NERDTreeToggle<CR>
nmap <LEADER>s <Plug>(easymotion-overwin-f)
nmap <LEADER>b :<C-U>execute "<c-r>=v:count==0 ? "b#" :"b" . v:count<CR>"<CR>
nmap <LEADER>t :TagbarToggle<CR>
nmap <LEADER>in4 :setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=4<CR>
nmap <LEADER>ie4 :setlocal noexpandtab shiftwidth=4 softtabstop=4 tabstop=4<CR>
nmap <LEADER>in2 :setlocal expandtab shiftwidth=2 softtabstop=2 tabstop=2<CR>
nmap <LEADER>ie2 :setlocal noexpandtab shiftwidth=2 softtabstop=2 tabstop=2<CR>
nmap <LEADER>fn :cn<CR>
nmap <LEADER>fp :cp<CR>
nmap <LEADER>fl :clist<CR>
nmap <LEADER>ls :ls<CR>
" Search for selected text, forwards or backwards.
vnoremap <silent> * :<C-U>
\let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR>
\gvy/<C-R><C-R>=substitute(
\escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR>
\gV:call setreg('"', old_reg, old_regtype)<CR>
vnoremap <silent> # :<C-U>
\let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR>
\gvy?<C-R><C-R>=substitute(
\escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR>
\gV:call setreg('"', old_reg, old_regtype)<CR>
nmap <F4> :w \| !bjosh connect -d int_trunc int_trunc.bjosh<CR>
set hlsearch
set nu
set history=1000
" Show status bar always
set laststatus=2
syntax enable
set background=dark
colorscheme solarized
" Tab related stuff
" This needs to be a autocmd which is run after the ftplugins(filetype
" plugins) are executed, to overwrite the tab settings of this plugins.
"autocmd FileType python setlocal noexpandtab shiftwidth=4 softtabstop=4 tabstop=4
set expandtab shiftwidth=2 softtabstop=2 tabstop=2
let g:bufferline_echo = 0
let g:EasyMotion_do_mapping = 0
":ScratchBuffer makes current buffer disposable
command! ScratchBuffer setlocal buftype=nofile noswapfile