prevent macvim automatic line break - settings

I have MacVim installed, even know I have ":set wrap" on, it automatically creates a line break whenever it hits the right side of the window.
Is there another setting I should be looking it?
This doesn't seem to be an issue in Windows.
Thanks in advance.

Problem solved - add the following lines to your vim_rc:
set wrapmargin=0
set textwidth=0

:set formatoptions-=t
Add the above line to your .vimrc file without the : to make the setting permanent.
http://vimdoc.sourceforge.net/htmldoc/change.html#fo-table.
http://vim.wikia.com/wiki/Word_wrap_without_line_breaks

Related

Vi for OS X won't show -- insert -- on status

I have tried many things such as add "set showmode" in .vimrc file and start vi with the command "vim" instead of just "vi". Nothing seems to work. I have another Mac and in that one the --Insert-- status does show up.
Any help is appreciated.
Thanks!
vim will not show the mode if (later) in the settings you have
set compatible
That cancels and/or overrides most of the vim extensions. See these for discussion:
In a .vimrc, is set nocompatible completely useless?
Setting vim filetype with modeline not working as expected
I was finally able to fix the problem.
It seems that the status was always there but the text color was the same as the background (black). As soon as I changed the theme color, I was able to see the status --Insert--.
if your trying status lines and term colours you might find this useful.
https://github.com/FallenAngelTodd/vim-status
lots used for setting different modes in the status line?

Setting the Search Path... global setting in MacVim

Noticed an interesting GUI based setting in MacVim, that seems useful but I can't seem to find any official word on what it does exactly.
It is located at Edit Menu > Global Settings > Search Path...
Once there a dialog drops down with the following:
"Enter search path for files"
Separate directory names with a comma.
.,/usr/include,,
From that editable line I get the clue that this appears to be a header search path. Something I would hope works with ctags, etc. But the setting I put in there don't seem to stick between open and closing just MacVim windows with out even quitting the MacVim Application.
Searing Vim help only really turns up new-search-path which I am not sure how to use or set if it is even related?
Is this what I think it is? The header search path. If yes then how do I set the path in my .vimrc or where needed so that the changes to it are persistent.
If this is not a header search path then what does it do?
I think you are right about its purpose, the setting is simply called path: its default value (:set path?) is .,/usr/include,, just as in your question.
You can use it to tell Vim to look for files in specific places.

Why do i sometime sees text all over editor in putty

I use putty on windows for Linux file editing.
Sometime when i type long commands then i see that text starts appearing either at the beginning of that line "on top of already written text" or sometime at some any remote corner.
But command still gets executed.
How can i fix the issue?
I had a similar issue due to a malformed $PS1 environment variable. I was having fun getting all cute with the different styles and colors and didn't realize I made a small mistake with the encodings.
Try setting it to a more basic one with this command... export PS1="\u#\h \w> "... and check if the issue still happens. If that solves it, then you can fiddle with your usual settings and see if you can correct it.
Hope this helps!

How do I turn the beep slash bell off in cygwin?

The system beep/bell happens frequently (ie, when I type a few letters then type tab to autocomplete when there are a few options).
How can I turn this off?
I googled it and tried:
set bell-style none (the command went through but nothing changed)
and
setterm -blength 0 (got a bash command not found)
Thanks!
Add set bell-style none to .inputrc in your home directory. You need to start a new shell for this to take effect; that may be why your test didn't work.
The default terminal mintty has built-in options to control the terminal bell.
Right-click on the background and click "Options..."
Select the "Terminal" section.
Change the "Bell" dropdown to "none"
Note: Here you can also enable or disable the visible bell (terminal flashing) and to highlight the taskbar icon on a bell ring.
Cut the wire to your speaker. :-)
An alternative solution that doesn't seem to be mentioned here is:
Right click on the header of the Cygwin window and chose Options...:
In the options menu, under the Terminal tab, choose "no beep":
This should take effect immediately without having to restart Cygwin.
I experienced a series of beeps when I would cat a particular file. The above tips did not silence the bell. In my case, the beeps were due to bullet points that had been copy/pasted into the file. Replacing the bullets with dashes stopped the beeping.
Use mintty. Among many other advantages over the usual console, the bell is off by default.
Path to '.inputrc:
'C:\cygwin64\home\<username>\.inputrc

XCode-like auto completion in vim (without tab)?

Greetings. I've been using vim for years, and I've recently started toying with XCode. One of the things I really like about XCode is that it will auto complete words without me hitting <TAB>.
For instance, in this image below I only need to type NSSObj and the rest is filled in automatically, no special keystroke required.
I'd like to reproduce this effect in vim.
To be clear, this question is not about how to get tab/omni-completion working in vim. I've already got tab/omni completion working just fine and that's not a problem. The question is: does anyone know how to get vim to autocomplete as I am typing ?
vimscripts has a plugin called autocomplpop.vim that does what you want.
Another option is a vim script called neocomplcache made by Shougo.

Resources