-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
176 lines (135 loc) · 4.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
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
167
168
169
170
171
172
173
174
175
176
" Vim vundle
set nofoldenable " disable folding
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
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'
Plugin 'preservim/nerdtree'
Plugin 'nordtheme/vim'
Plugin 'frazrepo/vim-rainbow'
" Plugin 'valloric/youcompleteme'
" Plugin 'vim-python/python-syntax'
" Plugin 'mattn/emmet-vim'
" Plugin 'ryanoasis/vim-devicons'
Plugin 'tmsvg/pear-tree'
Plugin 'sheerun/vim-polyglot'
Plugin 'christoomey/vim-sort-motion'
" Plugin 'christoomey/vim-titlecase'
Plugin 'christoomey/vim-g-dot'
Plugin 'mg979/vim-visual-multi'
Plugin 'chrisbra/vim-commentary'
" Plugin 'suan/vim-instant-markdown'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
" Plugin 'turbio/bracey.vim'
" Plugin 'fatih/vim-go'
" Plugin 'davidhalter/jedi-vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" Jump a line when a word doesn't fit the screen instead of cutting it
set linebreak
" Pressing jj instead of 'Esc' to enter INSERT mode.
imap jj <Esc>
imap kk <Esc>
" Visualizes numbers on the left of the screen according to the line you are
" and shows the line you are in.
set relativenumber number
" Light colorscheme for dark background
set background=dark
" Shows text in color according to your main colorscheme.
syntax on
" Mapping Ctrl+c and Ctrl+v working in insert mode.
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <C-r><C-o>+
" Go back where cursor was
" nmap <Space> ``
" Highlight search clearing highlighted with enter.
set incsearch
" set hlsearch
nnoremap <CR> :noh<CR>
" Insert spaces from normal mode
nnoremap <Space> i<Space><Esc>
" Ignore case sensitive
set ignorecase
" Peachpuff colorscheme
colorscheme nord
" Changes color background of the line you are in
set cursorline
hi CursorLine term=bold cterm=NONE ctermfg=NONE ctermbg=235
" Shows line numbers in a dark grey color.
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
highlight CursorLineNR term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
highlight MatchParen term=bold cterm=NONE ctermfg=NONE ctermbg=DarkGrey gui=NONE guifg=DarkGrey guibg=NONE
" Moving between splited terminals by ^H ^J ^K and ^L
set splitbelow
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" ^N for opening NerdTree
map <C-n> :NERDTreeToggle<CR>
" Open and close terminal with ^Q
noremap <C-q> :terminal<CR>
tnoremap <C-q> <C-\><C-n>:q!<CR>
" Write ``` with g`
nnoremap g` i```<CR>```<Esc>O
inoremap g` ```<CR>```<Esc>O
" Execute python files with F9
autocmd FileType python imap <buffer> <F9> <esc>:w<CR>:!clear<CR>:exec '!python3' shellescape(@%, 1)<CR>
autocmd FileType python map <buffer> <F9> :w<CR>:!clear<CR>:exec '!python3' shellescape(@%, 1)<CR>
" Execute pudb with F6
autocmd FileType python imap <buffer> <F6> <esc>:w<CR>:!clear<CR>:exec '!python3 -m pudb.run' shellescape(@%, 1)<CR>
autocmd FileType python map <buffer> <F6> :w<CR>:!clear<CR>:exec '!python3 -m pudb.run' shellescape(@%, 1)<CR>
" Execute HTML files in Firefox with F9, change to workspace 2 and Enter again
" the html file
autocmd FileType html imap <buffer> <F9> <esc>:w<CR>:!clear<CR>:exec '!firefox' shellescape(@%, 1)<CR>:exec '!i3-msg workspace2'<CR><CR>
autocmd FileType html map <buffer> <F9> :w<CR>:!clear<CR>:exec '!firefox' shellescape(@%, 1)<CR>:exec '!i3-msg workspace2'<CR><CR>
" Changed NerdTree arrows
let g:NERDTreeDirArrowExpandable = '>'
let g:NERDTreeDirArrowCollapsible = 'v'
" Full highlighting in python files
let g:python_highlight_all = 1
" DevIcons needed configuration
set encoding=UTF-8
" Set split below
set splitbelow
" Terminal size
set termwinsize=10x0
" Change window from terminal with ^H ^J ^K ^L
tnoremap <C-J> <C-W><C-J>
tnoremap <C-K> <C-W><C-K>
tnoremap <C-L> <C-W><C-L>
tnoremap <C-H> <C-W><C-H>
" Normal mode in terminal with jj
tnoremap jj <C-\><C-n>
" Changes Search highlight color
highlight Search ctermbg=DarkGrey
" Enables Emmet only in html and css files.
let g:user_emmet_install_global = 0
autocmd FileType html,css EmmetInstall
" Completes html tags pressing ,, (, 2 times).
let g:user_emmet_leader_key=','
" Disable Markdown realtime and autostart
let g:instant_markdown_slow = 1
let g:instant_markdown_autostart = 0
filetype plugin on
set omnifunc=syntaxcomplete#Complete
highlight Pmenu ctermfg=15 ctermbg=4 guifg=#ffffff guibg=#000000
"" Shows tags and </> in white color.
"highlight link htmlTagName white
"highlight link htmlTag htmlTagName
"highlight link htmlEndTag htmlTagName
"
" Enable rainbow brackets
let g:rainbow_active = 1
" Enable smooth scrolling
set t_TI=^[[4?h
set t_TE=^[[4?l