updated vim state

This commit is contained in:
Paul 2021-09-25 16:06:06 +02:00
parent 0051523e8c
commit bcc5d11f25
2 changed files with 27 additions and 8 deletions

View File

@ -10,6 +10,9 @@ vim:
defaults_vim:
name: "g:skip_defaults_vim"
value: 1
rustfmt_autosave:
name: g:rustfmt_autosave
value: 1
sets:
fileencoding:
name: fileencoding
@ -20,6 +23,10 @@ vim:
encoding:
name: encoding
value: utf-8
eol:
name: eol
nofixeol:
name: nofixeol
nocompatible:
name: nocompatible
mouse:
@ -36,8 +43,6 @@ vim:
value: indent,eol,start
autoindent:
name: autoindent
nofixeol:
name: nofixeol
nocindent:
name: nocindent
ic:

View File

@ -1,16 +1,24 @@
"{{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "vim/map.jinja" import vim with context %}
" VIM global configs
colorscheme {{ vim.config.use_theme }}
filetype plugin on
{%- if vim.config.use_syntax %}
syntax on
{%- endif %}
{% for key, value in vim.config.lets.items() %}
let {{ value.name }}{% if value.value is defined %}={{ value.value }}{% endif %}
{%- endfor %}
{% for key, value in vim.config.sets.items() %}
set {{ value.name }}{% if value.value is defined %}={{ value.value }}{% endif %}
{% macro cfg(command, setting) -%}
{% for key, value in setting.items() %}
{{ command }} {{ value.name }}{% if value.value is defined %}={{ value.value }}{% endif %}
{%- endfor %}
{% endmacro -%}
" VIM lets
{{- cfg("let", vim.config.lets) }}
" VIM sets
{{- cfg("set", vim.config.sets) }}
nnoremap <F9> :!%:p
@ -26,9 +34,15 @@ if has("autocmd")
endif
" NERDTree
set wildignore+=*.pyc,*.o,*.obj,*.svn,*.swp,*.class,*.hg,*.DS_Store,*.min.*
let g:NERDTreeShowHidden = 1
let g:NERDTreeMinimalUI = 1
let g:NERDTreeIgnore = []
let g:NERDTreeStatusline = ''
let g:NERDTreeRespectWildIgnore=1
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
nnoremap <silent> <C-b> :NERDTreeToggle<CR>
nnoremap <silent> <C-b> :NERDTreeToggle<CR>
" Support for end-of-lines
" au BufWritePre * :set binary | set noeol
" au BufWritePost * :set nobinary | set eol