Skip to content

Commit a276266

Browse files
Added auto completion suggestion
1 parent b314e76 commit a276266

File tree

1 file changed

+86
-43
lines changed

1 file changed

+86
-43
lines changed

.vimrc

+86-43
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ filetype off " required
33

44
" set the runtime path to include Vundle and initialize
55
set rtp+=~/.vim/bundle/Vundle.vim
6+
67
call vundle#begin()
78
" alternatively, pass a path where Vundle should install plugins
89
"call vundle#begin('~/some/path/here')
@@ -16,13 +17,20 @@ Plugin 'tpope/vim-fugitive'
1617
Plugin 'scrooloose/nerdtree'
1718
Plugin 'scrooloose/syntastic'
1819
Plugin 'scrooloose/nerdcommenter'
19-
Plugin 'kien/ctrlp.vim'
20+
" Plugin 'kien/ctrlp.vim'
2021
Plugin 'bling/vim-airline'
2122
Plugin 'vim-airline/vim-airline-themes'
2223
Plugin 'airblade/vim-gitgutter'
2324
Plugin 'majutsushi/tagbar'
25+
Plugin 'dracula/vim'
26+
Plugin 'altercation/vim-colors-solarized'
2427
Plugin 'morhetz/gruvbox'
25-
" plugin from http://vim-scripts.org/vim/scripts.html
28+
Plugin 'junegunn/goyo.vim'
29+
Plugin 'tomasr/molokai'
30+
Plugin 'lifepillar/vim-mucomplete'
31+
" Plugin 'junegunn/fzf'
32+
" Plugin 'yggdroot/indentline'
33+
" plugin from http://vm-scripts.org/vim/scripts.html
2634
" Plugin 'L9'
2735
" Git plugin not hosted on GitHub
2836
" Plugin 'git://git.wincent.com/command-t.git'
@@ -64,71 +72,106 @@ let g:signify_line_highlight=1
6472
let g:tagbar_ctags_bin="/usr/local/bin/ctags"
6573

6674
" Faster CtrlP search
67-
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f']
75+
"let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f']
76+
77+
"let g:solarized_termcolors=256
6878

69-
set number relativenumber
79+
set number "relativenumber
7080
set textwidth=99
71-
set colorcolumn=100
81+
"set colorcolumn=101
7282
set softtabstop=4 shiftwidth=4 expandtab
7383
set background=dark
7484
set title
7585
set hlsearch
76-
set cursorline
86+
"set cursorline
7787
set clipboard=unnamed
7888

89+
" Fuzzy file built-in
90+
set path+=**
91+
set wildmenu
92+
set wildignore+=*/min/*,*/vendor/*,*/node_modules/*,*/bower_components/*,*/storage/*
93+
94+
" MuComplete
95+
set completeopt+=menuone,noselect
96+
let g:mucomplete#enable_auto_at_startup=1
97+
98+
" let dimension=&colorcolumn + 5
99+
"
100+
" " Indent config
101+
" let g:indentLine_char_list = ['|', '¦', '┆', '┊']
102+
"
103+
" "Goyo config
104+
" let g:goyo_width=dimension
105+
" let g:goyo_height=95
106+
" let g:goyo_linenr=1
107+
79108
" NERDCommenter config
80109
let g:NERDSpaceDelims=1
81110
let g:NERDCustomDelimiters={'c':{ 'left': '/**', 'right': '*/'}}
82111
let g:NERDCommentEmptyLines=1
83112

84-
if &term =~ '256color' || &term == 'screen'
85-
" Disable Background Color Erase (BCE) so that color schemes
86-
" " work properly when Vim is used inside tmux and GNU screen.
87-
set t_ut=
88-
set t_Co=256
89-
endif
113+
"if &term =~ '256color' || &term == 'screen'
114+
" " Disable Background Color Erase (BCE) so that color schemes
115+
" " " work properly when Vim is used inside tmux and GNU screen.
116+
" set t_ut=
117+
" set t_Co=256
118+
"endif
90119

91120
if &term == 'linux' || &term == 'screen'
92-
colorscheme solarized
121+
" colorscheme solarized
93122
else
94-
colorscheme dracula
123+
" colorscheme dracula
95124
endif
96125

126+
au BufRead, BufNewFile *.vue set filetype=vue
97127
autocmd FileType html setlocal shiftwidth=2 tabstop=2
98-
"Allow transparent background
99-
autocmd ColorScheme * highlight Normal ctermbg=None
128+
autocmd FileType vue setlocal shiftwidth=4 tabstop=4
129+
"Allow transparent bg
130+
"autocmd ColorScheme * highlight Normal ctermbg=None
100131

101-
syntax on
132+
autocmd ColorScheme * highlight Comment cterm=italic
133+
134+
syntax enable
102135
" colorscheme github
103-
colorscheme gruvbox
136+
" colorscheme gruvbox
137+
" colorscheme solarized
138+
colorscheme molokai
104139

105140
" Key Bindings
106141
nmap <F7> :NERDTreeToggle<CR>
107142
nmap <F8> :TagbarToggle<CR>
108143
109144
" Auto Session
110-
function! MakeSession()
111-
let b:sessiondir = $HOME . "/.vim/sessions" . getcwd()
112-
if (filewritable(b:sessiondir) != 2)
113-
exe 'silent !mkdir -p ' b:sessiondir
114-
redraw!
115-
endif
116-
let b:filename = b:sessiondir . '/session.vim'
117-
exe "mksession! " . b:filename
118-
endfunction
119-
120-
function! LoadSession()
121-
let b:sessiondir = $HOME . "/.vim/sessions" . getcwd()
122-
let b:sessionfile = b:sessiondir . "/session.vim"
123-
if (filereadable(b:sessionfile))
124-
exe 'source ' b:sessionfile
125-
else
126-
echo "No session loaded."
127-
endif
128-
endfunction
129-
130-
if (argc() == 0)
131-
au VimEnter * nested :call LoadSession()
132-
endif
133-
134-
au VimLeave * :call MakeSession()
145+
" function! MakeSession()
146+
" let b:sessiondir = $HOME . "/.vim/sessions" . getcwd()
147+
" if (filewritable(b:sessiondir) != 2)
148+
" exe 'silent !mkdir -p ' b:sessiondir
149+
" redraw!
150+
" endif
151+
" let b:filename = b:sessiondir . '/session.vim'
152+
" exe "mksession! " . b:filename
153+
" endfunction
154+
"
155+
" function! LoadSession()
156+
" let b:sessiondir = $HOME . "/.vim/sessions" . getcwd()
157+
" let b:sessionfile = b:sessiondir . "/session.vim"
158+
" if (filereadable(b:sessionfile))
159+
" exe 'source ' b:sessionfile
160+
" else
161+
" echo "No session loaded."
162+
" endif
163+
" endfunction
164+
165+
" if (argc() == 0)
166+
" au VimEnter * nested :call LoadSession()
167+
" endif
168+
169+
augroup VCenterCursor
170+
au!
171+
au BufEnter,WinEnter,WinNew,VimResized *,*.*
172+
\ let &scrolloff=winheight(win_getid())/2
173+
augroup END
174+
175+
" au VimLeave * :call MakeSession()
176+
" au BufRead,BufEnter,BufNewFile * IndentLinesReset
177+
" au VimEnter * Goyo

0 commit comments

Comments
 (0)