Skip to content

Instantly share code, notes, and snippets.

@mmriis
Created December 22, 2016 08:59
Show Gist options
  • Select an option

  • Save mmriis/8e41dc65bb66548fc815887b87f20fd1 to your computer and use it in GitHub Desktop.

Select an option

Save mmriis/8e41dc65bb66548fc815887b87f20fd1 to your computer and use it in GitHub Desktop.

Revisions

  1. mmriis created this gist Dec 22, 2016.
    30 changes: 30 additions & 0 deletions .vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    execute pathogen#infect()

    set number
    syntax on
    set tabstop=4
    set shiftwidth=4
    set expandtab
    set list
    set listchars=tab:\ \ ,extends:»,precedes:«,trail:▒,nbsp:·
    set statusline+=%F
    set laststatus=2
    set iskeyword+=\-
    set nowrap
    set ttyfast
    set mouse=a
    set clipboard=unnamedplus


    autocmd StdinReadPre * let s:std_in=1
    autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
    autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

    map <C-n> :NERDTreeToggle<CR>
    augroup ansible-vault
    " We don't want a various options which write unencrypted data to disk
    autocmd FileType ansible-vault set noswapfile noundofile nobackup
    autocmd FileType ansible-vault silent %!ansible-vault decrypt
    autocmd FileType ansible-vault autocmd BufWritePre,FileWritePre * silent %!ansible-vault encrypt
    augroup END