aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION4
-rw-r--r--vim/autoload/markdown.vim9
-rw-r--r--vim/autoload/scratch_buffer.vim (renamed from vim/autoload/scratch.vim)2
m---------vim/bundle/paste_insert0
-rw-r--r--vim/plugin/scratch.vim2
-rw-r--r--vim/plugin/scratch_buffer.vim2
-rw-r--r--vim/vimrc4
-rw-r--r--vim/vimrc.stub4
8 files changed, 15 insertions, 12 deletions
diff --git a/VERSION b/VERSION
index a56d4a94..24ce0023 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v6.41.0
-Sun, 23 Jun 2019 05:22:48 +0000
+tejr dotfiles v6.42.0
+Sun, 23 Jun 2019 21:52:53 +0000
diff --git a/vim/autoload/markdown.vim b/vim/autoload/markdown.vim
index c0818246..8bac8045 100644
--- a/vim/autoload/markdown.vim
+++ b/vim/autoload/markdown.vim
@@ -11,8 +11,13 @@ function! markdown#Heading(char) abort
" heading text
let underline = repeat(a:char, strlen(heading))
- " Append the heading text to the buffer on a new line after the heading
- call append(pos[1], underline)
+ " If the line after this one looks like it's already an underline, replace
+ " it; otherwise, create a new underline
+ if getline(pos[1] + 1) =~# '^[-=]\{2,}$'
+ call setline(pos[1] + 1, underline)
+ else
+ call append(pos[1], underline)
+ endif
" Move to the first column of the underline we just inserted
let pos[1] += 1
diff --git a/vim/autoload/scratch.vim b/vim/autoload/scratch_buffer.vim
index bf6566dc..c0ef7cfc 100644
--- a/vim/autoload/scratch.vim
+++ b/vim/autoload/scratch_buffer.vim
@@ -1,4 +1,4 @@
-function! scratch#(mods, count, ...) abort
+function! scratch_buffer#(mods, count, ...) abort
let command = []
call add(command, a:mods)
if a:count
diff --git a/vim/bundle/paste_insert b/vim/bundle/paste_insert
-Subproject 17de75eb35838c3f588f1556f53dc574d78a2fa
+Subproject 3aa186ae48096ff1de1aa608832d40e87791809
diff --git a/vim/plugin/scratch.vim b/vim/plugin/scratch.vim
deleted file mode 100644
index 399f5a31..00000000
--- a/vim/plugin/scratch.vim
+++ /dev/null
@@ -1,2 +0,0 @@
-command! -bar -count=0 -nargs=* Scratch
- \ call scratch#(<q-mods>, <q-count>, <f-args>)
diff --git a/vim/plugin/scratch_buffer.vim b/vim/plugin/scratch_buffer.vim
new file mode 100644
index 00000000..c209c8b1
--- /dev/null
+++ b/vim/plugin/scratch_buffer.vim
@@ -0,0 +1,2 @@
+command! -bar -count=0 -nargs=* ScratchBuffer
+ \ call scratch_buffer#(<q-mods>, <q-count>, <f-args>)
diff --git a/vim/vimrc b/vim/vimrc
index b9b491e9..e88fe8b0 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1627,10 +1627,10 @@ nnoremap <silent> <Leader>* *N
nmap <Leader>8 <Leader>*
"" Leader,` opens a scratch buffer, horizontally split
nnoremap <silent> <Leader>`
- \ :<C-U>Scratch<CR>
+ \ :<C-U>ScratchBuffer<CR>
"" Leader,~ opens a scratch buffer, vertically split
nnoremap <silent> <Leader>~
- \ :<C-U>vertical Scratch<CR>
+ \ :<C-U>vertical ScratchBuffer<CR>
" And last, but definitely not least, I'm required by Vim fanatic law to
" include a mapping that reloads my whole configuration. This uses the
diff --git a/vim/vimrc.stub b/vim/vimrc.stub
index 00a44ba3..29a9e1bf 100644
--- a/vim/vimrc.stub
+++ b/vim/vimrc.stub
@@ -21,7 +21,5 @@ endif
"
set runtimepath-=~/.vim
set runtimepath-=~/.vim/after
-set compatible
-set shortmess+=I
-set t_Co=0
+set compatible shortmess+=I t_Co=0
silent! source ~/.exrc