Vim Ack search highlight - vim

I'm using MacVim with the ack Plugin (https://github.com/mileszs/ack.vim). I've updated my Plugins and Vim itself, and now when I search for something, the highlight color of the search bar is in turquoise (see screenshot), and you can't really read the text.
I've already read through ack help and some threads, but I couldn't find a option where I can adjust the color.
How can I change it back to the old color?

I'm not sure this is the cause of your issue, but Vim added a new highlighting group in patch 8.0.0641, which is called QuickFixLine.
The default colors which were chosen seemed to make the current entry in the quickfix window difficult to read with several colorschemes. An issue was opened on the bug tracker of the Vim repository, and the highlighting group was linked to Search in patch 8.0.0653.
So, if your Vim version is between 8.0.0641 and 8.0.0652, you may need to update Vim again to a newer version.
If you can't update immediately, then maybe you could temporarily link QuickFixLine to Search:
:hi! link QuickFixLine Search

Related

How to remove row lines in vim?

How do i remove the row lines at the start of the line? I typed the command
:s/^/# /
while in command mode and it suddenly appeared. I typed the command again, but it's still in my editor. I was trying to comment out a few blocks of code. This is the stackoverflow page I was following: What's a quick way to comment/uncomment lines in Vim?
Please see the image below to see what I'm pertaining to. Thanks in advance!
Vim highlights the current search pattern; this is the 'incsearch' option; either you have it explicitly turned on in your ~/.vimrc, or you use a recent Vim 8 version that has this enabled by the defaults.
Check with :hi IncSearch; it should show the same white-underscore-onblack formatting as your screenshot. You can also use a :hi command to customize this (or choose a different colorscheme).
To turn this off, use
:nohlsearch
You can shorten that to :noh; some people also define a mapping to quickly clear this. Alternatively, you can also search for something else.

vim spell: autoupdating suggestion-window for plain text?

I know great autocompletion plugins like YouCompleteMe for coding. I would like to have something similar for plain text files: A suggestion window (for the german language!) automatically popping up at the lets say 6th char in every word updating with each new character typed until it gets selected with ENTER or TAB else being dropped.
All I could achieve with spell is some remapping of C-x C-k to faciliate the popup, I still have to discard the autoselection with C-e which is somewhat annoying to me.
So with the power of vimscript (or some already existing plugin): Can we make this happen?
The acp.vim plugin (formerly named AutoComplPop) automatically opens the completion popup as you type. With the g:acp_completeOption configuration, you can make it use a dictionary source.
Note that the plugin still works, but hasn't seen any maintenance in the recent past. Another alternative might be neocomplete, but it (and its related plugins like neocomplcache) have also seen much turmoil.

bottom custom oh-my-zsh like statusbars for vim

I saw this picture in one of the CodeSchool's Screencast. #GreggPollack has customised his vim to look like one in the bottom picture.
I really like this bottom strip and that syntax highlighting for insert and other stuff on bottom command strip. I have the same strips for $prompts for my terminal with oh-my-zsh agnoster theme. How would I do that for vim?
The "bottom strip" is called statusline and its customization options are described in the following help page :help 'statusline'.
But most people prefer to use plugins for this purpose, which already include extensions that automatically fill in the statusline with extra information related with the currently opened file. The information displayed typically depend on the plugins under use.
The two most famous plugins for statusline configuration are:
Powerline
Airline

GVIM : in /root/.vimrc i have ":colorscheme desert" which worked, but where would i have found this value if someone hadn't told me?

So in GVIM i changed the color-scheme to
desert
but i never understood how to find this line
:colorscheme desert
so i could place it in
/root/.vimrc
file.
where would i have found out about " :colorscheme desert " ?
You could read the help (it is quite long and very detailed)
:h
Opens up to the main help for vim. Under getting started you will see the following. You might have to scroll down a bit (Use Control+f to page down)
usr_toc.txt Table Of Contents
Getting Started
usr_01.txt About the manuals
usr_02.txt The first steps in Vim
usr_03.txt Moving around
usr_04.txt Making small changes
usr_05.txt Set your settings
usr_06.txt Using syntax highlighting
usr_07.txt Editing more than one file
usr_08.txt Splitting windows
usr_09.txt Using the GUI
usr_10.txt Making big changes
usr_11.txt Recovering from a crash
usr_12.txt Clever tricks
It seems the that usr_06.txt is related to syntax highlighting so that might be worth reading. So type :h usr_06.txt or <c-]> (Control+]) to jump to that file when your cursor is on top of it.
Once you are in there you can look at the table of contents again.
06.1 Switching it on
06.2 No or wrong colors?
06.3 Different colors
06.4 With colors or without colors
06.5 Printing with colors
06.6 Further reading
Different colors seems to be what you want. So type :h 06.3 (or <c-]>) and the first paragraph talks about changing the colorscheme.
Control+] jumps to a tag and is talked about in :h tagsrch.txt (And on the line "Jump to a subject" immediately as you open :h)
The help have an auto completion feature.
So you can type, :help color followed by Ctrl+d. You won't necessary find the good entry right of the bat but it should put you on the right track. It would have shown you a colorscheme option.
An alternative is to use :helpgrep. :helpgrep color should give you a list of help file wich contains the string color.
On Debian Linux, it's part of the the vim-runtime package and sits in /usr/share/vim/vim73/colors/desert.vim. You can list contents of this direcory for more options. I don't think they have hard-coded color schemes in vim itself, so vim help will not list them for you.
I suppose like most other vim plugins, customized color schemes can also be put in ~/.vim directory.

Changing vim 'gutter' color

See the screenshot of how I have vim configured below. The 'gutter' i.e. where the '+' and '~' symbols appear show my git status using this amazing sublime text port for vim: https://github.com/airblade/vim-gitgutter
How do I change the color of the gutter where there are no '+'/'~' symbols? I.e. the grey part? This is how you change the number column: VIM initial settings: change backgound color for line number on the left side? but I can't find how to change the 'gutter' color.
Any ideas?
Many thanks.
This "gutter" is called the signs column. (See :help signs for more information.) The highlight group associated with this column is called SignColumn, and can be set like this (using the example from the help section):
:highlight SignColumn guibg=darkgrey
To change the color in your ~/.vimrc so that your gutter is the same color as where your line numbers show up is the following:
highlight clear SignColumn
The git-gutter docs have some other helpful suggestions.
Another option that hasn't been mentioned is to eliminate the sign column entirely and put the signs into the number column.
Adding this to your ~/.vimrc
set signcolumn=number
produces
(this is using custom symbols with the Ale plugin in iterm Vim).
This is available in "full" Vim versions 7.4.2201 or newer that include the +signs feature (I use the version installed by Homebrew on MacOS).
From the screenshot, I think you're using https://github.com/altercation/vim-colors-solarized/ as your colorscheme, as I was. Another solution for this particular case is to switch to https://github.com/ericbn/vim-solarized, as #altercation's version has a bunch of open PRs fixing that very issue and no changes in the last decade.

Resources