On Wed, 2012-04-18 at 21:26 -0600, Dave Smith wrote: > Instead, you get an error for a missing \ character when wrapping a long line. > > Does anyone know how to make Vim auto-indent Python code as well as it > does C++ code? I keep finding edge cases where Vim screws up (both > with auto-indent and code folding).
Sounds like you're trying to cut across the grain. Adding a \ should rarely be necessary. When writing long lines there's often a () or [] you can take advantage of instead of using \. If you're getting long lines as a result of deep nesting, that's a sign it's time to refactor. As for vim, all I use is: set autoindent filetype plugin indent on Not perfect, but good enough for most lines. I don't think it's possible to get vim to do a great job of indenting or folding because it was designed to work best with C-like languages. /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
