Remove specific vimrc for mutt and add goyo config to vim
This commit is contained in:
parent
f7b29241ab
commit
6db22475e6
@ -348,7 +348,7 @@ bind index,pager y edit-label
|
||||
*** Open in Vim
|
||||
#+BEGIN_SRC conf
|
||||
bind index,pager V noop
|
||||
macro index,pager V "|nvim -u ~/.vim/vimrc.mutt -c 'setlocal ft=mail' -c 'setlocal buftype=nofile' -<enter>" "open in vim"
|
||||
macro index,pager V "|nvim -c 'setlocal ft=mail' -c 'setlocal buftype=nofile' -<enter>" "open in vim"
|
||||
#+END_SRC
|
||||
|
||||
*** Make quick html view macro
|
||||
@ -776,7 +776,7 @@ unset record
|
||||
|
||||
** Use Vim to compose email, with a few default options.
|
||||
#+BEGIN_SRC conf
|
||||
set editor = "nvim -u ~/.vim/vimrc.mutt -c ':Goyo' -c '/\\n--' -c ':noh' -c 'startinsert'"
|
||||
set editor = "nvim -c ':Goyo' -c '/\\n--' -c ':noh' -c 'startinsert'"
|
||||
#+END_SRC
|
||||
|
||||
** Basic Options
|
||||
|
@ -778,9 +778,39 @@ let g:webdevicons_enable_ctrlp = 1
|
||||
|
||||
** junegunn/goyo.vim
|
||||
#+BEGIN_SRC conf
|
||||
let g:goyo_width=100
|
||||
let g:goyo_margin_top = 2
|
||||
let g:goyo_margin_bottom = 2
|
||||
let g:goyo_width=100
|
||||
let g:goyo_margin_top = 2
|
||||
let g:goyo_margin_bottom = 2
|
||||
#+END_SRC
|
||||
|
||||
This is for soft line breaks
|
||||
#+BEGIN_SRC conf
|
||||
function! s:goyo_enter()
|
||||
set wrap linebreak nolist textwidth=0 wrapmargin=0
|
||||
|
||||
let b:quitting = 0
|
||||
let b:quitting_bang = 0
|
||||
autocmd QuitPre <buffer> let b:quitting = 1
|
||||
cabbrev <buffer> q! let b:quitting_bang = 1 <bar> q!
|
||||
endfunction
|
||||
#+END_SRC
|
||||
|
||||
Quit Vim if this is the only remaining buffer
|
||||
#+BEGIN_SRC conf
|
||||
function! s:goyo_leave()
|
||||
if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1
|
||||
if b:quitting_bang
|
||||
qa!
|
||||
else
|
||||
qa
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
autocmd! User GoyoEnter call <SID>goyo_enter()
|
||||
autocmd! User GoyoLeave call <SID>goyo_leave()
|
||||
#+END_SRC
|
||||
|
||||
** tpope/vim-surround
|
||||
|
Loading…
Reference in New Issue
Block a user