Added SOA plugin

This commit is contained in:
Fergal Moran
2018-03-13 10:53:18 +00:00
parent 7c0deab170
commit e72318d344
2 changed files with 23 additions and 4 deletions

15
.vimrc
View File

@@ -27,8 +27,11 @@ set nowritebackup
set noswapfile set noswapfile
set mouse=a set mouse=a
set colorcolumn=121
" stop hiding fucking quotes " stop hiding fucking quotes
set conceallevel=0 set conceallevel=3
let mapleader="," let mapleader=","
" unhighlight search on pressing return " unhighlight search on pressing return
@@ -97,17 +100,18 @@ Plugin 'ap/vim-buftabline'
Plugin 'elzr/vim-json' Plugin 'elzr/vim-json'
Plugin 'morhetz/gruvbox' Plugin 'morhetz/gruvbox'
Plugin 'ryanoasis/vim-devicons'
if system("uname -m") != "armv7l\n" if system("uname -m") != "armv7l\n"
Plugin 'Valloric/YouCompleteMe' Plugin 'Valloric/YouCompleteMe'
Plugin 'marijnh/tern_for_vim' Plugin 'marijnh/tern_for_vim'
Plugin 'OmniSharp/omnisharp-vim' Plugin 'OmniSharp/omnisharp-vim'
Plugin 'OrangeT/vim-csharp' Plugin 'OrangeT/vim-csharp'
endif endif
Plugin 'ryanoasis/vim-devicons'
" step 2: font configuration " step 2: font configuration
" " These are the basic settings to get the font to work (required): " " These are the basic settings to get the font to work (required):
" set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Nerd\ Font\ Complete\ 12 set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Nerd\ Font\ Complete\ 12
" set guifont=FuraMono-Medium\ Powerline\ 12 set guifont=Fira\ Code\ Medium\ for\ Powerline\ Plus\ Nerd\ File\ Types\ Medium\ 12
set encoding=utf-8 set encoding=utf-8
" " required if using https://github.com/bling/vim-airline " " required if using https://github.com/bling/vim-airline
let g:airline_powerline_fonts=1 let g:airline_powerline_fonts=1
@@ -213,6 +217,9 @@ set background=dark
syntax enable syntax enable
filetype plugin indent on filetype plugin indent on
"pyflake settings
let g:flake8_show_quickfix=0
"Added by android-vim: "Added by android-vim:
set tags+=/home/fergalm/.vim/tags set tags+=/home/fergalm/.vim/tags
autocmd Filetype java setlocal omnifunc=javacomplete#Complete autocmd Filetype java setlocal omnifunc=javacomplete#Complete

12
plugin/named.vim Normal file
View File

@@ -0,0 +1,12 @@
" Inspired by http://www.debian-administration.org/article/381/Updating_bind_serial_numbers_automatically
function UPDSERIAL(date, num)
if (strftime("%Y%m%d") == a:date)
return a:date . a:num+1
endif
return strftime("%Y%m%d") . '01'
endfunction
command Soa :%s/\(2[0-9]\{7}\)\([0-9]\{2}\)\(\s*;\s*serial\s*\)/\=UPDSERIAL(submatch(1),submatch(2)) . submatch(3)/g
autocmd BufNewFile,BufRead /etc/bind/primary/* Soa