Re: line editor keybindings
On Di, 13 Mär 2018, Florian Lohoff wrote: > On Tue, Mar 13, 2018 at 11:13:08AM +0100, Marco Dickert wrote: > > On 2018-03-13 20:50:20, Erik Christiansen wrote: > > > On 13.03.18 10:09, andreas.muel...@biologie.uni-osnabrueck.de wrote: > > > > can I switch the editor key bindings to the vi style ? > > > There is better than that - you can use vim as the mutt editor, with > > > this line in ~/.muttrc: > > > > > > set editor=vim > > > > You also may want to use a mutt-dedicated vim configuration, like I do: > > > > > > set editor="/usr/bin/vim -c ~/.mutt/vimrc" > > > > As an alternative: > > au BufRead,BufNewFile /home/flo/tmp/mutt-* set noai tw=72 ft=mail spell > > Obviously you need to change you path for your setup. Even better: Make sure to have a `:filetype plugin on` in your .vimrc and then drop all your mutt related settings below ~/.vim/ftplugin/mail.vim (create non-existent directories). Then you only need `:set editor=vim` because Vim already recognizes mutt mails as filetype=mail. See also here: https://www.256bit.org/~chrisbra/cms/vim_as_e-mail_editor.html regards, Christian -- MS-DOS must die!
Re: line editor keybindings
On 13.03.18 11:13, Marco Dickert wrote: > On 2018-03-13 20:50:20, Erik Christiansen wrote: > > On 13.03.18 10:09, andreas.muel...@biologie.uni-osnabrueck.de wrote: > > > can I switch the editor key bindings to the vi style ? > > There is better than that - you can use vim as the mutt editor, with > > this line in ~/.muttrc: > > > > set editor=vim > > You also may want to use a mutt-dedicated vim configuration, like I do: > > > set editor="/usr/bin/vim -c ~/.mutt/vimrc" > Yes, good point. It can alternatively be handled by a vim autocommand, e.g.: au BufNewFile,BufRead ~/Desktop/mutt-* call Set_for_mutt() function! Set_for_mutt() setlocal textwidth=72 setlocal formatoptions=qrjt " Change subthread Subject: noremap ^[gg/^Subject:^MWi [Was: ^OB " "Don't quote sig in email replies: normal :g/^> -- $/,/^$/-1d^M/^$^M^L endfunction And for prompting for attachments if they're mentioned in the email, install CheckAttach.vim & enable it by filetype: " CheckAttach.vim is a filetype plugin. filetype plugin on Note: In ~/.muttrc , there's: set tmpdir="~/Desktop" # If not in ~/postponed after a crash, look here. The autocommand's second field needs to match. Separate .vimrc files slightly smaller, but raise the problem of maintaining multiple copies, when common lines are edited. When there's only one, the problem does not arise. Erik
Re: line editor keybindings
oh yes, I already have that setting.. but I mean the "littel" line at the bottom of my mutt witch I can enter with the ':' char in my bash I switch to that behavior with set -o vi some hints ? - thanks! - greetings Andreas On 13.03.18 20:50, Erik Christiansen wrote: > On 13.03.18 10:09, andreas.muel...@biologie.uni-osnabrueck.de wrote: > > > > can I switch the editor key bindings to the vi style ? > > There is better than that - you can use vim as the mutt editor, with > this line in ~/.muttrc: > > set editor=vim > > On a *nix platform, it would be very poor to be unable to use your > favourite editor everywhere. > > Erik -- Andreas Müller - Raum: 35/114b - Tel: 2875
Re: line editor keybindings
On Tue, Mar 13, 2018 at 11:13:08AM +0100, Marco Dickert wrote: > On 2018-03-13 20:50:20, Erik Christiansen wrote: > > On 13.03.18 10:09, andreas.muel...@biologie.uni-osnabrueck.de wrote: > > > can I switch the editor key bindings to the vi style ? > > There is better than that - you can use vim as the mutt editor, with > > this line in ~/.muttrc: > > > > set editor=vim > > You also may want to use a mutt-dedicated vim configuration, like I do: > > > set editor="/usr/bin/vim -c ~/.mutt/vimrc" > As an alternative: au BufRead,BufNewFile /home/flo/tmp/mutt-* set noai tw=72 ft=mail spell Obviously you need to change you path for your setup. Flo -- Florian Lohoff f...@zz.de UTF-8 Test: The 🐈 ran after a 🐁, but the 🐁 ran away signature.asc Description: PGP signature
Re: line editor keybindings
On 2018-03-13 20:50:20, Erik Christiansen wrote: > On 13.03.18 10:09, andreas.muel...@biologie.uni-osnabrueck.de wrote: > > can I switch the editor key bindings to the vi style ? > There is better than that - you can use vim as the mutt editor, with > this line in ~/.muttrc: > > set editor=vim You also may want to use a mutt-dedicated vim configuration, like I do: set editor="/usr/bin/vim -c ~/.mutt/vimrc" My ~/.mutt/vimrc looks like this: syntax on set background=dark set showcmd set showmatch set tabstop=4 set sw=4 set expandtab set ft=mail set tw=80 -- Marco Dickert ma...@misterunknown.de https://misterunknown.de smime.p7s Description: S/MIME cryptographic signature
Re: line editor keybindings
On 13.03.18 10:09, andreas.muel...@biologie.uni-osnabrueck.de wrote: > > can I switch the editor key bindings to the vi style ? There is better than that - you can use vim as the mutt editor, with this line in ~/.muttrc: set editor=vim On a *nix platform, it would be very poor to be unable to use your favourite editor everywhere. Erik
line editor keybindings
Hi, can I switch the editor key bindings to the vi style ? greetings Andreas -- Andreas Müller