Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Config_Files
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Maxime Bombar
Config_Files
Commits
41f28458
Commit
41f28458
authored
Dec 03, 2019
by
Maxime Bombar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opam setup vimrc
parent
6e4f8211
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
.vimrc
.vimrc
+32
-0
No files found.
.vimrc
View file @
41f28458
...
...
@@ -175,3 +175,35 @@ set history=50
"~" " Pour charger de la configuration après la configuration crans
"~" source ~/.vimrc_after
" ## added by OPAM user-setup for vim / base ## 93ee63e278bdfc07d1139a748ed3fff2 ## you can edit, but keep this line
let
s:opam_share_dir
=
system
(
"opam config var share"
)
let
s:opam_share_dir
=
substitute
(
s:opam_share_dir
,
'[\r\n]*$'
,
''
,
''
)
let
s:opam_configuration
=
{}
function
!
OpamConfOcpIndent
()
execute
"set rtp^="
.
s:opam_share_dir
.
"/ocp-indent/vim"
endfunction
let
s:opam_configuration
[
'ocp-indent'
]
=
function
(
'OpamConfOcpIndent'
)
function
!
OpamConfOcpIndex
()
execute
"set rtp+="
.
s:opam_share_dir
.
"/ocp-index/vim"
endfunction
let
s:opam_configuration
[
'ocp-index'
]
=
function
(
'OpamConfOcpIndex'
)
function
!
OpamConfMerlin
()
let
l
:
dir
=
s:opam_share_dir
.
"/merlin/vim"
execute
"set rtp+="
.
l
:
dir
endfunction
let
s:opam_configuration
[
'merlin'
]
=
function
(
'OpamConfMerlin'
)
let
s:opam_packages
=
[
"ocp-indent"
,
"ocp-index"
,
"merlin"
]
let
s:opam_check_cmdline
=
[
"opam list --installed --short --safe --color=never"
]
+
s:opam_packages
let
s:opam_available_tools
=
split
(
system
(
join
(
s:opam_check_cmdline
)))
for
tool
in
s:opam_packages
" Respect package order (merlin should be after ocp-index)
if
count
(
s:opam_available_tools
,
tool
)
>
0
call
s:opam_configuration
[
tool
]()
endif
endfor
" ## end of OPAM user-setup addition for vim / base ## keep this line
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