Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
home
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Murukesh Mohanan
home
Commits
9c5d304e
Commit
9c5d304e
authored
Apr 16, 2016
by
Murukesh Mohanan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin segregation
parent
fe09b48c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
20 deletions
+46
-20
.vim/.gitignore
.vim/.gitignore
+1
-1
.vim/autoload/plug.vim
.vim/autoload/plug.vim
+28
-10
.vim/vimrc
.vim/vimrc
+17
-9
No files found.
.vim/.gitignore
View file @
9c5d304e
.VimballRecord
.netrwhist
doc/*
bundle/*/doc/tags
plugged
view
spell/en.utf-8.add.spl
autoload/plug.vim.olg
.vim/autoload/plug.vim
View file @
9c5d304e
...
...
@@ -977,7 +977,7 @@ function! s:update_finish()
call
s:log4
(
name
,
'Updating submodules. This may take a while.'
)
let
out
.=
s:bang
(
'git submodule update --init --recursive 2>&1'
,
spec
.
dir
)
endif
let
msg
=
printf
(
'%s %s: %s'
,
v
:
shell_error ?
'x'
:
'-'
,
name
,
get
(
s:lines
(
out
),
-1
,
''
))
let
msg
=
printf
(
'%s %s: %s'
,
v
:
shell_error ?
'x'
:
'-'
,
name
,
s:lastline
(
out
))
if
v
:
shell_error
call
add
(
s:update
.
errors
,
name
)
call
s:regress_bar
()
...
...
@@ -1145,7 +1145,7 @@ while 1 " Without TCO, Vim stack is bound to explode
let
has_tag
=
has_key
(
spec
,
'tag'
)
if
!
new
let
error
=
s:git_validate
(
spec
,
0
)
let
[
error
,
_
]
=
s:git_validate
(
spec
,
0
)
if
empty
(
error
)
if
pull
let
fetch_opt
=
(
has_tag &&
!
empty
(
globpath
(
spec
.
dir
,
'.git/shallow'
)))
?
'--depth 99999999'
:
''
...
...
@@ -1860,11 +1860,18 @@ function! s:git_validate(spec, check_branch)
let
err
=
printf
(
'Invalid branch: %s (expected: %s). Try PlugUpdate.'
,
\
branch
,
a:spec
.
branch
)
endif
if
empty
(
err
)
let
commits
=
len
(
s:lines
(
s:system
(
printf
(
'git rev-list origin/%s..HEAD'
,
a:spec
.
branch
),
a:spec
.
dir
)))
if
!
v
:
shell_error && commits
let
err
=
join
([
printf
(
'Diverged from origin/%s by %d commit(s).'
,
a:spec
.
branch
,
commits
),
\
'Reinstall after PlugClean.'
],
"\n"
)
endif
endif
endif
else
let
err
=
'Not found'
endif
return
err
return
[
err
,
err
=~
#
'PlugClean'
]
endfunction
function
!
s:rm_rf
(
dir
)
...
...
@@ -1875,15 +1882,23 @@ endfunction
function
!
s:clean
(
force
)
call
s:prepare
()
call
append
(
0
,
'Searching for
unuse
d plugins in '
.
g:plug_home
)
call
append
(
0
,
'Searching for
invali
d plugins in '
.
g:plug_home
)
call
append
(
1
,
''
)
" List of valid directories
let
dirs
=
[]
let
errs
=
{}
let
[
cnt
,
total
]
=
[
0
,
len
(
g:plugs
)]
for
[
name
,
spec
]
in
items
(
g:plugs
)
if
!
s:is_managed
(
name
)
||
empty
(
s:git_validate
(
spec
,
0
))
if
!
s:is_managed
(
name
)
call
add
(
dirs
,
spec
.
dir
)
else
let
[
err
,
clean
]
=
s:git_validate
(
spec
,
1
)
if
clean
let
errs
[
spec
.
dir
]
=
s:lines
(
err
)[
0
]
else
call
add
(
dirs
,
spec
.
dir
)
endif
endif
let
cnt
+=
1
call
s:progress_bar
(
2
,
repeat
(
'='
,
cnt
),
total
)
...
...
@@ -1907,11 +1922,14 @@ function! s:clean(force)
if
!
has_key
(
allowed
,
f
)
&& isdirectory
(
f
)
call
add
(
todo
,
f
)
call
append
(
line
(
'$'
),
'- '
.
f
)
if
has_key
(
errs
,
f
)
call
append
(
line
(
'$'
),
' '
.
errs
[
f
])
endif
let
found
=
filter
(
found
,
'stridx(v:val, f) != 0'
)
end
endwhile
normal
!
G
4
redraw
if
empty
(
todo
)
call
append
(
line
(
'$'
),
'Already clean.'
)
...
...
@@ -1920,12 +1938,12 @@ function! s:clean(force)
for
dir
in
todo
call
s:rm_rf
(
dir
)
endfor
call
append
(
line
(
'$'
),
'Removed.'
)
call
append
(
3
,
[
'Removed.'
,
''
]
)
else
call
append
(
line
(
'$'
),
'Cancelled.'
)
call
append
(
3
,
[
'Cancelled.'
,
''
]
)
endif
endif
normal
!
G
4
endfunction
function
!
s:upgrade
()
...
...
@@ -1972,7 +1990,7 @@ function! s:status()
for
[
name
,
spec
]
in
items
(
g:plugs
)
if
has_key
(
spec
,
'uri'
)
if
isdirectory
(
spec
.
dir
)
let
err
=
s:git_validate
(
spec
,
1
)
let
[
err
,
_
]
=
s:git_validate
(
spec
,
1
)
let
[
valid
,
msg
]
=
[
empty
(
err
),
empty
(
err
)
?
'OK'
:
err
]
else
let
[
valid
,
msg
]
=
[
0
,
'Not found. Try PlugInstall.'
]
...
...
.vim/vimrc
View file @
9c5d304e
...
...
@@ -119,33 +119,41 @@ endfunction
"execute pathogen#infect()
call plug#begin()
Plug 'murukeshm/vim-manpager'
" Common plugins
Plug 'vim-scripts/diffchar.vim'
Plug 'scrooloose/nerdtree'
Plug 'ervandew/supertab'
Plug 'scrooloose/syntastic'
Plug 'dag/vim2hs', {'for': 'hs'}
Plug 'tpope/vim-surround'
Plug 'bling/vim-airline'
Plug 'tpope/vim-fugitive'
Plug 'lervag/vimtex', {'for': 'tex'}
Plug 'tomasr/molokai'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'gabrielelana/vim-markdown', {'for': 'markdown'}
Plug 'majutsushi/tagbar', {'for': ['cpp', 'c', 'go', 'sh', 'js']}
Plug '
fatih/vim-go', {'for': 'go'}
Plug '
godlygeek/tabular'
if executable('cmake')
" YCM command lifted from vim-plug readme
Plug 'Valloric/YouCompleteMe', { 'do': YCMInstallCmd(), 'for': ['cpp', 'c', 'go', 'sh', 'js', 'vim'] }
autocmd! User YouCompleteMe if !has('vim_starting') | call youcompleteme#Enable() | endif
endif
Plug 'godlygeek/tabular'
if !has('windows')
if executable('go')
Plug 'fatih/vim-go', {'for': 'go'}
endif
if executable('latex')
Plug 'lervag/vimtex', {'for': 'tex'}
endif
if executable('ghc')
Plug 'dag/vim2hs', {'for': 'hs'}
endif
if executable('man')
Plug 'murukeshm/vim-manpager'
endif
if executable('dpkg')
Plug 'vim-scripts/deb.vim'
endif
if executable('logrotate')
Plug 'moon-musick/vim-logrotate'
endif
call plug#end()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment