-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
executable file
·166 lines (145 loc) · 4.24 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
160
161
162
163
164
165
166
"Use the vim settings, not vi
set nocompatible
"
"Sets the size of vim's command history:
set history=1000
"
set rtp+=/home/magdeoz/.local/lib/python3.5/site-packages/powerline/bindings/vim
"Enables the recognition files
filetype plugin on
filetype indent on
"
"Reloads the file if it is edited by an external program while open
set autoread
"
"Disable backups:
set nobackup
set noswapfile
set nowritebackup
"
"It shows the way you are
set showmode
"
" Search:
set hlsearch
set ignorecase
set smartcase
set incsearch
"
"Clear the outstanding results:
nmap <silent> <C-C> :silent noh<CR>
"
" Clipboard system:
set clipboard=unnamed
"
"Height command bar
set cmdheight=2
"
"Enable regular expressions
set magic
"
"Enable syntax highlighting
syntax on
"
"Vim color scheme
colorscheme wal
set background=dark
"highlight Normal ctermbg=DarkBlue
"Ruler breaks and number of lines:
set nolinebreak
set number
set ruler
"
"It allows navigation within a long line with j and k
set wrap
"
"Insert spaces instead of tab characters
set expandtab
"
"Smart Tabs Use
set smarttab
"
"Sets a tab as eight spaces
set shiftwidth=8
set tabstop=8
"
"Every time you close a parenthesis, bracket or brace, Vi shows where it was opened. If there is no pair.
set sm
"
"It shows the file name at the top of the prompt
set title
set laststatus=2
set encoding=utf-8
set showtabline=2
set noshowmode
set fillchars+=stl:\ ,stlnc:\
"Shortcuts
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
" Plugins
"Patogen
execute pathogen#infect()
if isdirectory(expand("~/.vim/bundle/nerdtree"))
map <C-e> :NERDTreeToggle<CR>
map <leader>e :NERDTreeFind<CR>
nmap <leader>nt :NERDTreeFind<CR>
let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$']
let NERDTreeChDirMode=0
let NERDTreeQuitOnOpen=1
let NERDTreeMouseMode=2
let NERDTreeShowHidden=1
let NERDTreeKeepTreeInNewTab=1
let g:nerdtree_tabs_open_on_gui_startup=0
endif
" YouCompleteMe
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_autoclose_preview_window_after_completion=1
nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
"Python-mode
" Override go-to.definition key shortcut to Ctrl-]
let g:pymode_rope_goto_definition_bind = "<C-]>"
"
" Override run current python file key shortcut to Ctrl-Shift-e
let g:pymode_run_bind = "<C-S-e>"
"
" Override view python doc key shortcut to Ctrl-Shift-d
let g:pymode_doc_bind = "<C-S-d>"
" vim-airline
let g:airline_theme = 'base16_grayscale'
let g:airline#extensions#syntastic#enabled = 1
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
" vim-airline
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
if !exists('g:airline_powerline_fonts')
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline_left_sep = '▶'
let g:airline_left_alt_sep = '»'
let g:airline_right_sep = '◀'
let g:airline_right_alt_sep = '«'
let g:airline#extensions#branch#prefix = '⤴' "➔, ➥, ⎇
let g:airline#extensions#readonly#symbol = '⊘'
let g:airline#extensions#linecolumn#prefix = '¶'
let g:airline#extensions#paste#symbol = 'ρ'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
else
let g:airline#extensions#tabline#left_sep = ''
let g:airline#extensions#tabline#left_alt_sep = ''
" powerline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
endif