"{{ salt['pillar.get']('salt_managed', default='Salt Managed') }} {%- from "neovim/map.jinja" import neovim with context %} " NeoVIM global configs colorscheme {{ neovim.config.use_theme }} filetype plugin on {%- if neovim.config.use_syntax %} syntax on {%- endif %} {% macro cfg(command, setting) -%} {% for key, value in setting.items() %} {{ command }} {{ value.name }}{% if value.value is defined %}={{ value.value }}{% endif %} {%- endfor %} {% endmacro -%} " NeoVIM lets {{- cfg("let", neovim.config.lets) }} " NeoVIM sets {{- cfg("set", neovim.config.sets) }} nnoremap :!%:p if has("autocmd") au VimEnter,InsertLeave * silent execute '!echo -ne "\e[2 q"' | redraw! au InsertEnter,InsertChange * \ if v:insertmode == 'i' | \ silent execute '!echo -ne "\e[6 q"' | redraw! | \ elseif v:insertmode == 'r' | \ silent execute '!echo -ne "\e[4 q"' | redraw! | \ endif au VimLeave * silent execute '!echo -ne "\e[ q"' | redraw! 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 :NERDTreeToggle " Support for end-of-lines " au BufWritePre * :set binary | set noeol " au BufWritePost * :set nobinary | set eol vnoremap g vnoremap g vnoremap g vnoremap g