Things I wish to do in VIM but currently cannot.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Things I wish to do in VIM but currently cannot.

kunjaan
Hi,
   Is there someway I can make the VIM line break after 80 characters. I dont want the text to wrap around but create a new line. And I wish it would break off the complete last word. So instead of   fo in the previous and o in the next line, can it break with foo in the next line?

Im also facing some problems, I looked around in the forum and didnt find any solutions discussed. Im sorry if this has been resolved earlier.

1. When I end my comment and press enter, I get a # in the new line. This is cool but when I delete # and want to start a line of code, I dont get syntax highlighting there. IT=t still thinks what Im typing is a comment. Is this a bug or am I doing it wrong?

2. One more thing is that I have set the shiftwidth to 4. But when I press Ctrl+S to save the document, the cursor jumps to the beginning of the sentence. I then need to manually go back to my original position to begin the code. Is there a way I can resolve this?

Thank you for reading this. I am new to Ruby and Vim. I hope you guys help me out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Things I wish to do in VIM but currently cannot.

zopio
Have you tried turning on the format options in your ~/.vimrc file?  type :help format-options to see a full list of what you can set, but adding :set fo+=aw2tq should allow you to do the type of text-wrapping that you're looking for.

kunjaan wrote
Hi,
   Is there someway I can make the VIM line break after 80 characters. I dont want the text to wrap around but create a new line. And I wish it would break off the complete last word. So instead of   fo in the previous and o in the next line, can it break with foo in the next line?

Im also facing some problems, I looked around in the forum and didnt find any solutions discussed. Im sorry if this has been resolved earlier.

1. When I end my comment and press enter, I get a # in the new line. This is cool but when I delete # and want to start a line of code, I dont get syntax highlighting there. IT=t still thinks what Im typing is a comment. Is this a bug or am I doing it wrong?

2. One more thing is that I have set the shiftwidth to 4. But when I press Ctrl+S to save the document, the cursor jumps to the beginning of the sentence. I then need to manually go back to my original position to begin the code. Is there a way I can resolve this?

Thank you for reading this. I am new to Ruby and Vim. I hope you guys help me out.
Loading...