Reply-To: [email protected] In-Reply-To: <[email protected]>
On Wed, Mar 16, 2011 at 10:39:43AM -0700, Bee wrote: > On Mar 16, 12:02 am, Erik Christiansen <[email protected]> > wrote: > > > > I'll try to fly for a while without '2', but will have to change my > > habits for it to (potentially) work. If it doesn't, I suppose I could > > try modelines or au, to fudge my way to a working compromise. > > Create two mappings to switch: > > map <Leader>fon :set fo-=2 fo+=n<cr> > map <Leader>fo2 :set fo-=n fo+=2<cr> > > Or one to toggle: > > function! Foo() > if &fo =~ "2" > set fo-=2 fo+=n > else > set fo-=n fo+=2 > endif > endfun > map <Leader>foo :call Foo()<cr> Oooooh! Thank you very much for those. :-) While simple mappings normally appeal most, I have F12 as pastetoggle, and another handy toggle on F11 could be learnt by association. After using fo-=2 fo+=n for a day or two, I now have to try to find out what is causing frequent weirdness when formatting a simple paragraph, devoid of any digits, and therefore incapable of triggering the current formatlistpat, IIUC. With: formatoptions=croqltn formatlistpat=^\s*\(\d\|\a\)\+\.\s* autoindent textwidth=72 Vim now mishandles a gq} performed on: » I couldn't see anything but screw heads when hovering over the last two photos. (But then I'm arguably GUI dyslexic, possibly due to decades pushing characters.) « giving this oddly skewed result: » I couldn't see anything but screw heads when hovering over the last two photos. (But then I'm arguably GUI dyslexic, possibly due to decades pushing characters.) « Although that can't trigger the \d in formatlistpat, removing the 'n' from formatoptions allowed gq} to work: » I couldn't see anything but screw heads when hovering over the last two photos. (But then I'm arguably GUI dyslexic, possibly due to decades pushing characters.) « My Vim 7.1 is the latest for the Ubuntu 8.04.4 LTS on this host. Perhaps I have to build from source, to try a more current Vim on this host. It might be easier to defer attempts to get numbered lists to work. ;-) Ah!, that spurious indent occurred spontaneously on a line wrap while typing in insert mode. OK, a quick check to see that I have the build-essential and linux-headers-$(uname -r) packages on this box, fetch the 7.3 source, and "sudo make": checking for tgetent in -lncurses... no checking for tgetent in -ltermlib... no checking for tgetent in -ltermcap... no checking for tgetent in -lcurses... no no terminal library found checking for tgetent()... configure: error: NOT FOUND! You need to install a terminal library; for example ncurses. Fine, let's do: $ sudo apt-get install ncurses ... Package ncurses is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package ncurses has no installation candidate OK, after an: $ apt-cache search curses | more let's try this, in case the name changed: $ sudo apt-get install ncurses-base ... ncurses-base is already the newest version. Ah, this might have terminal libraries: $ sudo apt-get install ncurses-term Nah, that didn't help in the slightest. It's getting late. Maybe I have to look for the ncurses .deb for ubuntu 8.04 LTS at some other site ... tomorrow. Erik -- "Meddle not in the affairs of Wizards, mortal ... For thou art crunchy and taste good with ketchup" -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
