-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc-USER
More file actions
114 lines (94 loc) · 3.87 KB
/
vimrc-USER
File metadata and controls
114 lines (94 loc) · 3.87 KB
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
"https://www.digitalocean.com/community/tutorials/how-to-use-vundle-to-manage-vim-plugins-on-a-linux-vps
"INSTALL-VUNDLE: git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" This is the Vundle package, which can be found on GitHub.
" For GitHub repos, you specify plugins using the
" 'user/repository' format
Plugin 'gmarik/vundle'
"NerdTree
Plugin 'scrooloose/nerdtree.git'
"Block Commenter
Plugin 'scrooloose/nerdcommenter'
"NerdTree GIT flags
Plugin 'xuyuanp/nerdtree-git-plugin'
" To get plugins from Vim Scripts, you can reference the plugin
" by name as it appears on the site
Plugin 'Buffergator'
"Full path fuzzy file finder
Plugin 'ctrlpvim/ctrlp.vim'
"Git wrapper
Plugin 'tpope/vim-fugitive'
"Git diff
Plugin 'airblade/vim-gitgutter'
"
Plugin 'pearofducks/ansible-vim'
"Show HTML color -NON FUNZIONA-
"Plugin 'lilydjwg/colorizer'
"Plugin 'chrisbra/colorizer'
"Highlights the word under the cursor
Plugin 'RRethy/vim-illuminate'
"Pulse everytime you scroll the search results
Plugin 'inside/vim-search-pulse'
"
Plugin 'ekalinin/Dockerfile.vim'
"Show indent lines
Plugin 'nathanaelkane/vim-indent-guides'
let g:indent_guides_guide_size = 1
"
" Now we can turn our filetype functionality back on
filetype plugin indent on
"
" NerdTree plugin
"
"Open a NERDTree automatically when vim starts up if no files were specified
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
"Close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
"Ctrl+n shortcut
map <C-n> :NERDTreeToggle<CR>
"NerdTree File Highlighting
function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
endfunction
"Automatically close NerdTree when opening a file
"let NERDTreeQuitOnOpen = 1
call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515')
call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515')
call NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515')
call NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515')
call NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515')
call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515')
""""""""""""""""""""""""""""
" => Statusline
""""""""""""""""""""""""""""
"set statusline=\ %F%m%r%h%w%y[%p%%][%l,%L/%v]
" Always hide the statusline
set laststatus=2
"set statusline=%t "tail of the filename
set statusline=%F "file path
set statusline+=%m "modified flag
set statusline+=%h "help file flag
set statusline+=%r "read only flag
set statusline+=%w "preview window flag
set statusline+=\ [%{strlen(&fenc)?&fenc:'none'}, "file encoding
set statusline+=%{&ff}] "file format
set statusline+=%y "filetype
set statusline+=[buf:%n] "buffer number
set statusline+=%{FugitiveStatusline()} "add GIT branch
set statusline+=%= "left/right separator
set statusline+=[l:\ %l/%L] "cursor line/total lines
set statusline+=[c:\ %c] "cursor column
set statusline+=\ %p%% "percent through file