Re: Mutt + Vim tricks (replace Nano)
On Mon, 29 Sep 2003 22:51:35 -0700, Bill Moseley <moseley@hank.org> penned:
>
> For example, I'd like to map ^J to gq} to warp a paragraph -- and it
> I'd like it to work in editing or command/normal mode. I'd also like to
> start in insert mode, I think. I might like ^A and ^E for start and end
> of line as I find it easier to type than ^ and $, at least for my
> fingers. Seems like for email I don't really need to jump out of Insert
> mode very often.
>
I just created the following last night. ctrl-j aligns the paragraph to
78 chars; ctrl-k makes it flow; use ':let my_tw=x' before ctrl-L
to align it to some arbitrary number.
" Ctrl-J/K formats the current paragraph
" gggqG would do the whole file
map <C-J> :let old_tw = &tw<CR>:set tw=78<CR>gqap:let &tw=old_tw<CR>
map <C-K> :let old_tw = &tw<CR>:set tw=99999<CR>gqap:let &tw=old_tw<CR>
let my_tw = 30
map <C-L> :let old_tw = &tw<CR>:let &tw=my_tw<CR>gqap:let &tw=old_tw<CR>
--
monique
My pointless ramblings:
http://www.bounceswoosh.org/phorum/index.php?f=6
Reply to: