aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-22 17:08:05 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-22 17:08:05 +1200
commitd7adb2669ba7ce9ff628c2c7d293262df562d179 (patch)
tree5f0e4788f77abe6e97986e2980f5ac19ba868fd4 /vim
parentRound out and apply alternate filetypes plugin (diff)
downloaddotfiles-d7adb2669ba7ce9ff628c2c7d293262df562d179.tar.gz
dotfiles-d7adb2669ba7ce9ff628c2c7d293262df562d179.zip
Use <Plug> mapping for :Fortune
Diffstat (limited to 'vim')
-rw-r--r--vim/plugin/fortune.vim3
-rw-r--r--vim/vimrc3
2 files changed, 4 insertions, 2 deletions
diff --git a/vim/plugin/fortune.vim b/vim/plugin/fortune.vim
index e800bfee..9355f1b0 100644
--- a/vim/plugin/fortune.vim
+++ b/vim/plugin/fortune.vim
@@ -1,6 +1,9 @@
command! -bar Fortune
\ call fortune#()
+nnoremap <silent> <Plug>(Fortune)
+ \ :<C-U>Fortune<CR>
+
function! s:FortuneVimEnter() abort
if !argc() && line2byte('$') == -1
try | Fortune | catch | endtry
diff --git a/vim/vimrc b/vim/vimrc
index 7ce683a8..bfcfdd52 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1615,8 +1615,7 @@ nmap <Leader>1 <Leader>!
nmap <Leader># <Plug>(AlternateFileType)
nmap <Leader>3 <Leader>#
"" Leader,$/4 gives me my fortune
-nnoremap <Leader>$
- \ :<C-U>Fortune<CR>
+nmap <Leader>$ <Plug>(Fortune)
nmap <Leader>4 <Leader>$
"" Leader,&/7 escapes regex metacharacters
nmap <Leader>& <Plug>(RegexEscape)