disabling automatic line wrapping

522 views
Skip to first unread message

Mike Rooney

unread,
May 8, 2012, 3:00:14 PM5/8/12
to janus-...@googlegroups.com
Hello! I've been really impressed by Janus so far, but can't figure out how to disable the automatic line wrapping at what seems to be 120 characters.

I tried setting "set wrap linebreak textwidth=0" in my ~/.vimrc.after, but the lines still wrap. If I just run this command in a buffer, then it won't wrap for the life of that buffer, but of course future ones do.

I'm extra confused because https://github.com/carlhuda/janus lists "No wrap" under the customizations it ships with.

Any help would be GREATLY appreciated as this kills my flow, so thanks for any tips. Also thanks for Janus, it rocks :)

- Mike

Mike Rooney

unread,
May 8, 2012, 5:30:52 PM5/8/12
to janus-...@googlegroups.com
A-hah! I figured it out, for any else who finds this and experiences this same problem.

janus/vim/core/before/plugin/filetypes.vim:38 has
" make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
  au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79

So this happens at read-time of course due to autocmd, and overrides my change. I fixed it by adding to my ~/.vimrc.after:
au FileType python set textwidth=0

Since I saw that the PEP8 plugin was recently removed AND the README states wrapping is disabled AND this is pretty difficult to discover (I only emailed after struggling for a few days), I'd suggest at least removing the textwidth=79 from that line, and I'm happy to submit a pull request if anyone +1s. I think the better solution anyway is to use the flake8 vim plugin which would show a warning for this that can be toggled via a flake8 ignore.

- Mike

Tomas Henriquez

unread,
May 8, 2012, 5:43:37 PM5/8/12
to janus-...@googlegroups.com
+1

I had this issue when I started using janus and I never got the will power to keep looking  for a fix. I agree with having the textwidth=79 by default but it should be easy to override.

I am having a similar issue where I set ---> softtabstop=2 tabstop=2 shiftwidth=2 except for python and at some point it stops working and gets back to 4, I guess is similar to this override problem with the textwidth

--
You received this message because you are subscribed to the Google Groups "Janus - Vimius" group.
To view this discussion on the web visit https://groups.google.com/d/msg/janus-vimius/-/_dhmmYV8DgYJ.
To post to this group, send email to janus-...@googlegroups.com.
To unsubscribe from this group, send email to janus-vimius...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/janus-vimius?hl=en.



--
Tomás Henríquez


Adrian Rego

unread,
May 9, 2012, 7:16:54 AM5/9/12
to janus-...@googlegroups.com
Mike,

I'm +1 on removing textwidth=79.  Shouldn't enforce wrapping for Python if we don't do it for other filetypes.  If you send a pull request I'll merge it in.

Hassek, 

tabstops and shitftwidth are set to 2 by default.  You can set softtabstop in your ~/.vimrc.before.  Python settings should override them to 4.  Not sure how you're having that problem.

Tomas Henriquez

unread,
May 9, 2012, 11:09:09 AM5/9/12
to janus-...@googlegroups.com
ok here is how to reproduce it, first I have in my vimrc.after this lines:

set tabstop=2 softtabstop=2 shiftwidth=2 textwidth=0
au FileType python set shiftwidth=4 tabstop=4 softtabstop=4 textwidth=0

now with that said if we open an html file it get's handled with 2 spaces correctly

But if we open a python file and then we split the buffer with an html file it gets handled with 4 spaces. In the meanwhile I have been fixing this issue by writing :source ~/.vimrc.after

Just in case here is a list of my extra plugins:

jslint.vim
vim-conque
vim-powerline
vim-repeat
zencoding-vim


--
You received this message because you are subscribed to the Google Groups "Janus - Vimius" group.
To view this discussion on the web visit https://groups.google.com/d/msg/janus-vimius/-/4jQ6dMgw-sQJ.

To post to this group, send email to janus-...@googlegroups.com.
To unsubscribe from this group, send email to janus-vimius...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/janus-vimius?hl=en.

Mike Rooney

unread,
May 9, 2012, 1:22:47 PM5/9/12
to janus-...@googlegroups.com
Pull request sent, thanks!

--

Wael M. Nasreddine

unread,
May 9, 2012, 1:37:53 PM5/9/12
to janus-...@googlegroups.com
Merged, Thank you

-- 
Wael Nasreddine: Design & Coding at TechnoGate
contact | wael.na...@gmail.com - +33.6.51.24.04.34 | skype - eMxyzptlk | Github - eMxyzptlk

Adrian Rego

unread,
May 9, 2012, 6:14:50 PM5/9/12
to janus-...@googlegroups.com
New push should address this by using 'setlocal' instead of 'set'

Tomas Henriquez

unread,
May 9, 2012, 9:29:03 PM5/9/12
to janus-...@googlegroups.com
thanks, works like a charm.

On Wed, May 9, 2012 at 5:44 PM, Adrian Rego <areg...@gmail.com> wrote:
New push should address this by using 'setlocal' instead of 'set'

--
You received this message because you are subscribed to the Google Groups "Janus - Vimius" group.
To view this discussion on the web visit https://groups.google.com/d/msg/janus-vimius/-/fNktuJvdkEgJ.

To post to this group, send email to janus-...@googlegroups.com.
To unsubscribe from this group, send email to janus-vimius...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/janus-vimius?hl=en.
Reply all
Reply to author
Forward
0 new messages