From: Frank Brehm Date: Thu, 25 Feb 2016 22:01:39 +0000 (+0100) Subject: Adding basic/editors.sls X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=c3edbaddc717bbe55c68421573592a525e9c2d20;p=salt%2Fstates.git Adding basic/editors.sls --- diff --git a/basic/editors.sls b/basic/editors.sls new file mode 100644 index 0000000..8acdecf --- /dev/null +++ b/basic/editors.sls @@ -0,0 +1,22 @@ +vim: + pkg.installed: + - name: vim + +vimrc: + file.managed: + - name: /etc/vim/vimrc.local + - source: salt://basic/files/vimrc + - mode: 644 + - user: root + - group: root + - require: + - pkg: vim + +default-editor: + alternatives.set: + - name: editor + - path: /usr/bin/vim.basic + - require: + - pkg: vim + +# vim: filetype=sls tabstop=2 shiftwidth=2 diff --git a/basic/files/vimrc b/basic/files/vimrc new file mode 100644 index 0000000..c37139d --- /dev/null +++ b/basic/files/vimrc @@ -0,0 +1,39 @@ +set noai +set nohlsearch +set fo="tcq" +set modeline +set showmatch +set ignorecase + +autocmd FileType sls set tabstop=2 expandtab shiftwidth=2 softtabstop=2 +autocmd FileType python set tabstop=4 expandtab shiftwidth=4 softtabstop=4 +autocmd FileType sh set tabstop=4 expandtab shiftwidth=4 softtabstop=4 +autocmd FileType perl set tabstop=4 noexpandtab shiftwidth=4 + +set listchars=tab:»·,trail:· +" set list + +if has("multi_byte") + set encoding=utf-8 + setglobal fileencoding=utf-8 +else + echoerr "Sorry, this version of (g)vim was not compiled with +multi_byte" +endif + +if has("autocmd") + " Jump to the last position on opening + autocmd BufReadPost * + \ if ! exists("g:leave_my_cursor_position_alone") | + \ if line("'\"") > 0 && line ("'\"") <= line("$") | + \ exe "normal g'\"" | + \ endif | + \ endif +endif " has("autocmd") + + +filetype plugin off + +color delek + +syntax on + diff --git a/top.sls b/top.sls index 94bf527..8804e1f 100644 --- a/top.sls +++ b/top.sls @@ -1,16 +1,17 @@ base: 'ns2.uhu-banane.de': - debian.apt + - basic.editors - basic.localization - basic.pkgs # - basic.rsync - basic.rsyslog - basic.shells - basic.skel -# - basic.editors 'ns3.uhu-banane.de': - debian.apt + - basic.editors - basic.localization - basic.pkgs - basic.rsyslog