-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
146 lines (110 loc) · 3.55 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
" hdevieux Vim configuration
"----------------------------------"
" General Stuff "
"----------------------------------"
set history=50
let mapleader = " "
let g:mapleader = " "
nmap <leader>w :w<cr>
nmap <leader>e :wq!<cr>
nmap <leader>q :q!<cr>
nmap <leader>s :ConqueTermVSplit bash<cr>
nmap <leader>d :ConqueTermSplit bash<cr>
" Replicate evil-escape-key-sequence
:imap kj <Esc>
" My notepad
nmap <leader>n :vnew ~/tmp/notepad<cr>
execute pathogen#infect('~/.vim/bundle/{}')
set encoding=utf8
set runtimepath+=$HOME/.vim/plugin/
" put swap files in ~/tmp/
set directory=~/tmp/
"----------------------------------"
" NERDTree setup "
"----------------------------------"
set runtimepath+=$HOME/.vim/bundle/nerdtree
"Start NERDtree in the current path of VIM
"map my leader and t to open nerdtree
map <leader>t :NERDTree %:p:h<CR>
"Start my nerdtree plugin if no files are specified:
autocmd vimenter * if !argc() | NERDTree | endif
"----------------------------------"
" User Interface "
"----------------------------------"
set ignorecase
set smartcase
set incsearch
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set ruler
set autoindent
set confirm
set hlsearch
syntax enable
set showmatch
filetype plugin on
set number
set splitbelow
set splitright
" Disabling this for now
" set cursorline
" set nocursorcolumn
"----------------------------------"
" Some Shell developement stuff "
"----------------------------------"
autocmd Filetype sh setlocal expandtab ts=4 sw=4 sts=4
"----------------------------------"
" Some Python developement stuff "
"----------------------------------"
autocmd Filetype python setlocal expandtab ts=4 sw=4 sts=4
let g:syntastic_python_checkers = ["flake8"]
let g:syntastic_python_flake8_args = "--max-line-length=160"
"----------------------------------"
" Some C/C++ developement stuff "
"----------------------------------"
autocmd Filetype cpp setlocal noexpandtab ts=4 sw=4 sts=4
autocmd Filetype c setlocal noexpandtab ts=4 sw=4 sts=4
"----------------------------------"
" Some Go developement stuff "
"----------------------------------"
autocmd Filetype go setlocal noexpandtab ts=4 sw=4 sts=4
let g:go_disable_autoinstall = 0
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
"----------------------------------"
" Colors "
"----------------------------------"
colorscheme henri-default
"----------------------------------"
" Moving Arond "
"----------------------------------"
map <space> /
map <c-space> ?
" Return to last edit position when opening files
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
" Remember info about open buffers on close
set viminfo^=%
" Easier switching between tabs
nmap <leader><tab> :tabn<cr>
" Switching between splits
nmap <leader>j <C-W><C-J>
nmap <leader>k <C-W><C-K>
nmap <leader>l <C-W><C-L>
nmap <leader>h <C-W><C-H>
"----------------------------------"
" Airline Conf "
"----------------------------------"
let g:airline_left_sep='>'
"----------------------------------"
" Status Line "
"----------------------------------"
" This one sucked....
"set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
" This is the latest beauty. Still need to add some things.
set statusline=%t[%{strlen(&fenc)?&fenc:'none'}]%m%r%y%=%c,%l/%L\ %P