diff --git a/plugin/autoformat.vim b/plugin/autoformat.vim index f4fa25f..fb4283e 100644 --- a/plugin/autoformat.vim +++ b/plugin/autoformat.vim @@ -1,10 +1,5 @@ " Function for finding the formatters for this filetype " Result is stored in b:formatters - -if !exists('g:autoformat_autoindent') - let g:autoformat_autoindent = 1 -endif - function! s:find_formatters(...) " Detect verbosity let verbose = &verbose || g:autoformat_verbosemode == 1 @@ -347,6 +342,3 @@ function! s:RemoveTrailingSpaces() endtry endfunction command! RemoveTrailingSpaces call s:RemoveTrailingSpaces() - -" Put the uncopyable messages text into the buffer -command! PutMessages redir @" | messages | redir END | put diff --git a/plugin/utils.vim b/plugin/utils.vim new file mode 100644 index 0000000..1a22b8d --- /dev/null +++ b/plugin/utils.vim @@ -0,0 +1,20 @@ + +" Simple python-based random number generator +function! g:Random() +if has("python3") +python3 << EOF +import random +result = random.randrange(1, 1000000) +vim.command('return ' + str(result)) +EOF +else +python << EOF +import random +result = random.randrange(1, 1000000) +vim.command('return ' + str(result)) +EOF +endif +endfunction + +" Put the uncopyable messages text into the buffer +command! PutMessages redir @" | messages | redir END | put