-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
159 lines (135 loc) · 4.49 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
" vim-sublime - A minimal Sublime Text -like vim experience bundle
" http://github.com/grigio/vim-sublime
" NB: You need a terminal with 256 colors support
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
filetype plugin indent on " required!
"
" vim-sublime basic bundles here:
"
Bundle 'L9'
Bundle 'tpope/vim-surround'
Bundle 'tomtom/tcomment_vim'
Bundle 'gcmt/breeze.vim'
Bundle 'bling/vim-airline'
Bundle 'majutsushi/tagbar'
Bundle 'tpope/vim-fugitive'
"Bundle 'Raimondi/delimitMate'
"Bundle 'kien/ctrlp.vim'
let g:ctrlp_working_path_mode='ra'
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn)$',
\ 'doc': '\v.*docs[/\]',
\ 'file': '\v\.(exe|so|dll|html|o)$',
\ }
" Color Themes
Bundle 'flazz/vim-colorschemes'
" Linters
Bundle 'scrooloose/syntastic'
" Project-ish stuff
Bundle 'scrooloose/nerdtree'
Bundle 'kien/ctrlp.vim'
" Saved snippets.
Bundle 'MarcWeber/vim-addon-mw-utils'
Bundle 'tomtom/tlib_vim'
Bundle 'garbas/vim-snipmate'
" something stupid about win32 path delimiters
let g:snippets_dir="$HOME/.vim/snippets"
" Projects
Bundle 'amiorin/vim-project'
let g:project_use_nerdtree = 1
call project#rc()
if filereadable($HOME . "/.vimrc_projects")
source $HOME/.vimrc_projects
endif
" My settings
" Enable mouse actions from the GUI
set mouse=a
if &term =~ '^screen'
" tmux knows the extended mouse mode
set ttymouse=xterm2
endif
set t_Co=256 " Force 256 color terminal.
colorscheme Monokai
set nopaste " Paste conflicts with snipmate
set pastetoggle=<F2>
syntax on
set noerrorbells " No beeps
set number " Show line numbers
set backspace=indent,eol,start " Makes backspace key more powerful.
set showcmd " Show me what I'm typing
set showmode " Show current mode.
set noswapfile " Don't use swapfile
set nobackup " Don't create annoying backup files
set splitright " Split vertical windows right to the current windows
set splitbelow " Split horizontal windows below to the current windows
set encoding=utf-8 " Set default encoding to UTF-8
set autowrite " Automatically save before :next, :make etc.
"set autoread " Automatically reread changed files without asking me anything
set laststatus=2
set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats
set showmatch " Do not show matching brackets by flickering
set incsearch " Shows the match while typing
set hlsearch " Highlight found searches
"set ignorecase " Search case insensitive...
"set smartcase " ... but not when search pattern contains upper case characters
set switchbuf=usetab,newtab " open new buffers always in new tabs
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab
set listchars=tab:▒░,trail:▓
set list
set colorcolumn=81 " 81 character color column
set guifont=Inconsolata\ Medium\ 12
nmap <F8> :TagbarToggle<CR>
"
" Basic shortcuts definitions
" most in visual mode / selection (v or ⇧ v)
"
" Find
" map <C-f> /
" indend / deindent after selecting the text with (⇧ v), (.) to repeat.
" vmap <Tab> >
" vmap <S-Tab> <
" comment / decomment & normal comment behavior
" vmap <C-m> gc
" Disable tComment to escape some entities
let g:tcomment#replacements_xml={}
" Text wrap simpler, then type the open tag or ',"
"vmap <C-w> S
" Cut, Paste, Copy
"vmap <C-x> d
"vmap <C-v> p
"vmap <C-c> y
" Undo, Redo (broken)
"nnoremap <C-z> :undo<CR>
"inoremap <C-z> <Esc>:undo<CR>
"nnoremap <C-y> :redo<CR>
"inoremap <C-y> <Esc>:redo<CR>
" Tabs
let g:airline_theme='badwolf'
let g:airline#extensions#tabline#enabled = 1
"nnoremap <C-b> :tabprevious<CR>
"inoremap <C-b> <Esc>:tabprevious<CR>i
"nnoremap <C-n> :tabnext<CR>
"inoremap <C-n> <Esc>:tabnext<CR>i
"nnoremap <C-t> :tabnew<CR>
"inoremap <C-t> <Esc>:tabnew<CR>i
"nnoremap <C-k> :tabclose<CR>
"inoremap <C-k> <Esc>:tabclose<CR>i
"
" Your overrides
"
if isdirectory(expand("$HOME/vimfiles/"))
source $HOME/vimfiles/packages.vim
source $HOME/vimfiles/shortcuts.vim
endif
let g:syntastic_check_on_open=1
let g:syntastic_enable_signs=1
let g:syntastic_error_symbol = '✗'
let g:syntastic_warning_symbol = '!'
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_config_file = '.syntastic_c_config'