Permalink
Browse files

add minimal nagios indention

  • Loading branch information...
1 parent f490f48 commit fb8a829b611c252a5745ab325fff9b45b900ac09 Elmar Athmer committed Aug 15, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 ftplugin/nagios.vim
View
@@ -1 +1,17 @@
map <F5> :w<CR>:!service icinga reload<CR>
+
+
+map <leader>t :Tabularize /^\s\+\w\+\s\+\zs<cr>
+vmap <leader>t :Tabularize /^\s\+\w\+\s\+\zs<cr>
+
+
+"function! IcingaReformat()
+ "reindent everything that's indented
+ ":%s/^\s\+\ze\w/ /
+
+ "} is never idented
+ ":%s/^\s\+}/}/
+
+ "Tabularize the second column of definitions between {}
+ ":%g/{\s*\n\zs\(\n\|.\)\{-}\ze}/g/^\s\+\w\+.*$/Tabularize /^\s\+\w\+\s\+\zs\ze\w\+
+"endfunction

0 comments on commit fb8a829

Please sign in to comment.