Thanks a lot Ben. This is great help and clarification.
On Feb 13, 2:55 pm, Ben Fritz <[email protected]> wrote: > On Feb 13, 10:52 am, Daniel Choi <[email protected]> wrote: > > > autocmd BufRead,BufNewFile *.txt,*.rdoc,README,TODO,CHANGELOG,NOTES > > setlocal lbr > > You should also set wrap, in case it isn't set already. I.e. replace > "setlocal lbr" with "setlocal wrap lbr". It may be wise to also set > the 'showbreak' option to something, but not strictly necessary. :help > 'showbreak'. > > setlocal display=lastline would also be a good idea. :help 'display' > > > autocmd BufRead,BufNewFile *.txt,*.rdoc,README,TODO,CHANGELOG,NOTES > > map j gj > > autocmd BufRead,BufNewFile *.txt,*.rdoc,README,TODO,CHANGELOG,NOTES > > map k gk > > You probably want "map <buffer> j gj" and "map <buffer> j gj" instead. > Using <buffer> means that the mapping won't also be used in windows > with other files. > > Of course there would be nothing wrong with dispensing with the > autocmd entirely and just putting "map j gj" directly in your .vimrc. > > > (I'm not sure what the "comments=etc." stuff does; I copied this stuff > > from someone's blog.) > > The 'comments' make Vim aware of comment markers when doing > autoformatting so they can be accounted for. Probably not something > you need for prose, though it looks like it's used in your case so you > can automatically get a sort of list bullet if your format options > include 'r' or 'o'. See :help 'comments' and :help 'formatoptions'. > > > > > But is there are a way to get soft wrapping at a certain textwidth? > > I'd like to avoid having the wrap margin depend on the width of my > > terminal window. > > Nope, sorry. You can try using a split window and adjusting the size > of that instead of your terminal window. That could even be done > automatically using vimscript, though I think it would get annoying. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
