Hi guys, I've been having an odd problem with my automatic text wrapping in vim. I wrap my text with the "gq" command, sometimes as "gqap" (to wrap a paragraph), sometimes as "gggqG" (to wrap the whole document). I've been using vim for years and I don't recall ever having this issue.
Just recently, it started doing something really weird. I think a picture is worth a thousand words, so here's a blog post I've been working on: http://old.nabble.com/file/p27554664/vim-problem.png Here's the contents of my vimrc: 1 set number 2 set nowrap 3 set tabstop=2 4 set expandtab 5 set shiftwidth=2 6 set autoindent 7 set smartindent 8 set hlsearch 9 10 au BufRead,BufNewFile *.cltex set filetype=cltex 11 au BufRead,BufNewFile *.gnarly set filetype=gnarly 12 au BufRead,BufNewFile *.ocamltex set filetype=ocamltex 13 au BufRead,BufNewFile *.scala set filetype=scala 14 au BufReadPost,BufNew *.profile set syntax=profile Here are some things I've tried: 1. Changing the text width. In this particular case, I've got the text width set to 65 -- ":set tw=65" -- but I've tried it with text widths of 55, 60, 65, 70, and 75. Changing the text width will usually fix the paragraph in question, but then another one will start doing the same thing. 2. Manually correcting the paragraph. But unfortunately, as soon as I use the "gq" command again, it goes right back. 3. Uninstalling and reinstalling vim. No change. 4. Playing with my vimrc. It might have something to do with the shiftwidth because when I took out that line, I got the same problem, except indented 8 spaces instead of 2: http://old.nabble.com/file/p27554664/vim-problem-2.png (This image is not showing up on the preview. If it doesn't display when I post, I'll try reposting it in a reply ... hopefully you get the idea though.) Anyway, my programmer husband (who has been a major vim user and Linux geek for years and years and years) has never seen this happen. And I've done a few google searches, but beyond "vim text wrapping problem" (which doesn't turn up much) I don't know what to look for. So sorry for the information overload, and especially if this is a routine problem. But any help is much appreciated! Joyce (who is pretty baffled and would just like her text wrapping to work :D) -- View this message in context: http://old.nabble.com/Text-wrapping-with-%22gq%22-is-doing-something-really-weird-...-tp27554664p27554664.html Sent from the Vim - General mailing list archive at Nabble.com. -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php