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
|
# File 'manifests/params.pp', line 1
class vim::params {
$nocompatible = true
$background = 'dark'
$backspace = '2'
$lastposition = true
$indent = true
$matchparen = true
$powersave = true
$ruler = false
$syntax = true
$misc = ['hlsearch','showcmd','showmatch','ignorecase','smartcase','incsearch','autowrite','hidden']
$maps = {}
$code = []
case $::osfamily {
'Debian': {
$package = 'vim-nox'
$editor_name = 'vim.nox'
$set_as_default = true
$set_editor_cmd = "update-alternatives --set editor /usr/bin/${editor_name}"
$test_editor_set = "test /etc/alternatives/editor -ef /usr/bin/${editor_name}"
$conf = '/etc/vim/vimrc'
}
'RedHat': {
$package = 'vim-enhanced'
$set_as_default = false
$set_editor_cmd = undef
$test_editor_set = undef
$conf = '/etc/vimrc'
}
'FreeBSD': {
$package = 'vim-lite'
$set_as_default = false
$set_editor_cmd = undef
$test_editor_set = undef
$conf = '/usr/local/etc/vim/vimrc'
}
'Suse': {
$package = 'vim'
$set_as_default = false
$set_editor_cmd = undef
$test_editor_set = undef
$conf = '/etc/vimrc'
}
'Gentoo': {
$package = 'app-editors/vim'
$set_as_default = true
$set_editor_cmd = 'eselect editor set /usr/bin/vim'
$test_editor_set = 'eselect editor show|grep /usr/bin/vim'
$conf = '/etc/vimrc'
}
'Solaris': {
if($::operatingsystemrelease =~ /^(5\.11|11|11\.\d+)$/){
$package = '/editor/vim'
$conf = '/usr/share/vim/vimrc'
$set_as_default = false
$set_editor_cmd = undef
$test_editor_set = undef
}else{
fail("vim::params: Unsupported platform: ${::osfamily}/${::operatingsystemrelease}")
}
}
default: {
case $::operatingsystem {
default: {
fail("vim::params: Unsupported platform: ${::osfamily}/${::operatingsystem}")
}
}
}
}
}
|