From 40df9669c207c37d9976e04b5073249f31f33d3d Mon Sep 17 00:00:00 2001
From: "Kenneth Benzie (Benie)" <k.benzie83@gmail.com>
Date: Mon, 20 Nov 2017 21:17:30 +0000
Subject: [PATCH] Remove autocmd to right string white space

---
 autoload/do.vim      |  9 +++++++++
 plugin/commands.vim  |  2 ++
 plugin/functions.vim | 15 ---------------
 3 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/autoload/do.vim b/autoload/do.vim
index 0c78d93..944a67e 100644
--- a/autoload/do.vim
+++ b/autoload/do.vim
@@ -9,3 +9,12 @@ function! do#isort()
   call system('isort '.expand('%:p'))
   edit!
 endfunction
+
+" TODO: Make do#rstrip_lines work on a range
+function! do#rstrip_lines()
+  let l:line = line('.')
+  let l:column = col('.')
+  execute '%s/\s\+$//e'
+  nohlsearch
+  call cursor(l:line, l:column)
+endfunction
diff --git a/plugin/commands.vim b/plugin/commands.vim
index c1e034f..fa618e8 100644
--- a/plugin/commands.vim
+++ b/plugin/commands.vim
@@ -1 +1,3 @@
 command! ISort call do#isort()
+" TODO: Make RStripLines work on a range
+command! RStripLines call do#rstrip_lines()
diff --git a/plugin/functions.vim b/plugin/functions.vim
index ae87d2e..5959e53 100644
--- a/plugin/functions.vim
+++ b/plugin/functions.vim
@@ -39,21 +39,6 @@ function! s:Synstack()
 endfunction
 command Synstack :call s:Synstack()
 
-" Strip trailing whitespace
-function! s:StripWhitespace()
-  let l:line = line('.')
-  let l:column = col('.')
-  execute '%s/\s\+$//e'
-  nohlsearch
-  call cursor(l:line, l:column)
-endfunction
-command! StripWhitespace :call s:StripWhitespace()
-augroup strip_white_space
-  " Strip whitespace on buffer write
-  autocmd!
-  autocmd BufWritePre * :call s:StripWhitespace()
-augroup END
-
 " Stringify
 " Make a code block in to a C string literal
 function! s:Stringify()