updated vim state
This commit is contained in:
parent
0051523e8c
commit
bcc5d11f25
@ -10,6 +10,9 @@ vim:
|
|||||||
defaults_vim:
|
defaults_vim:
|
||||||
name: "g:skip_defaults_vim"
|
name: "g:skip_defaults_vim"
|
||||||
value: 1
|
value: 1
|
||||||
|
rustfmt_autosave:
|
||||||
|
name: g:rustfmt_autosave
|
||||||
|
value: 1
|
||||||
sets:
|
sets:
|
||||||
fileencoding:
|
fileencoding:
|
||||||
name: fileencoding
|
name: fileencoding
|
||||||
@ -20,6 +23,10 @@ vim:
|
|||||||
encoding:
|
encoding:
|
||||||
name: encoding
|
name: encoding
|
||||||
value: utf-8
|
value: utf-8
|
||||||
|
eol:
|
||||||
|
name: eol
|
||||||
|
nofixeol:
|
||||||
|
name: nofixeol
|
||||||
nocompatible:
|
nocompatible:
|
||||||
name: nocompatible
|
name: nocompatible
|
||||||
mouse:
|
mouse:
|
||||||
@ -36,8 +43,6 @@ vim:
|
|||||||
value: indent,eol,start
|
value: indent,eol,start
|
||||||
autoindent:
|
autoindent:
|
||||||
name: autoindent
|
name: autoindent
|
||||||
nofixeol:
|
|
||||||
name: nofixeol
|
|
||||||
nocindent:
|
nocindent:
|
||||||
name: nocindent
|
name: nocindent
|
||||||
ic:
|
ic:
|
||||||
|
@ -1,16 +1,24 @@
|
|||||||
"{{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
"{{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
||||||
{%- from "vim/map.jinja" import vim with context %}
|
{%- from "vim/map.jinja" import vim with context %}
|
||||||
|
|
||||||
|
" VIM global configs
|
||||||
colorscheme {{ vim.config.use_theme }}
|
colorscheme {{ vim.config.use_theme }}
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
{%- if vim.config.use_syntax %}
|
{%- if vim.config.use_syntax %}
|
||||||
syntax on
|
syntax on
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% for key, value in vim.config.lets.items() %}
|
|
||||||
let {{ value.name }}{% if value.value is defined %}={{ value.value }}{% endif %}
|
{% macro cfg(command, setting) -%}
|
||||||
{%- endfor %}
|
{% for key, value in setting.items() %}
|
||||||
{% for key, value in vim.config.sets.items() %}
|
{{ command }} {{ value.name }}{% if value.value is defined %}={{ value.value }}{% endif %}
|
||||||
set {{ value.name }}{% if value.value is defined %}={{ value.value }}{% endif %}
|
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
{% endmacro -%}
|
||||||
|
|
||||||
|
" VIM lets
|
||||||
|
{{- cfg("let", vim.config.lets) }}
|
||||||
|
|
||||||
|
" VIM sets
|
||||||
|
{{- cfg("set", vim.config.sets) }}
|
||||||
|
|
||||||
nnoremap <F9> :!%:p
|
nnoremap <F9> :!%:p
|
||||||
|
|
||||||
@ -26,9 +34,15 @@ if has("autocmd")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" NERDTree
|
" NERDTree
|
||||||
|
set wildignore+=*.pyc,*.o,*.obj,*.svn,*.swp,*.class,*.hg,*.DS_Store,*.min.*
|
||||||
let g:NERDTreeShowHidden = 1
|
let g:NERDTreeShowHidden = 1
|
||||||
let g:NERDTreeMinimalUI = 1
|
let g:NERDTreeMinimalUI = 1
|
||||||
let g:NERDTreeIgnore = []
|
let g:NERDTreeIgnore = []
|
||||||
let g:NERDTreeStatusline = ''
|
let g:NERDTreeStatusline = ''
|
||||||
|
let g:NERDTreeRespectWildIgnore=1
|
||||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
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
|
Loading…
Reference in New Issue
Block a user