This question already has answers here:
Vim clear last search highlighting
(32 answers)
Closed 8 years ago.
So for some reason, after copying and pasting text from Sublimetext into VIM, VIM is now auto-highlighting text as I type:
This highlighting persists even when I change the colorscheme (this is with :colorscheme blue)
The only things I can find online about this regard syntax highlighting and search highlighting, not text highlighting - how do I turn this off? I just want my text to output as normal without it being highlighted some weird color.
Try running the command :noh.
Related
This question already has answers here:
Enabling markdown highlighting in Vim
(5 answers)
Closed 1 year ago.
Is there a way/plugin to enable syntax highlighting in .md files in Vim?
```js //will highlight javascript
```py //will do python etc
you can try:
':syntax on' then ':set syntax=markdown'
you can try installing a plugin such as plastic boy. If you go ahead with this solution and it caused white space at the end of lines to be highlighted. Check out this fix: https://stackoverflow.com/a/10964847/14944117
This question already has answers here:
Vim: search and highlight but do not jump
(14 answers)
Closed 2 years ago.
I was getting the cursor word as: noremap <leader>h *N, but this moves the screen. What I want is:
Highlights the <cword>; and
Not move the screen, nor the cursor.
Here is my system: Linux, running neovim v0.4.3 with python2&3 support.
OBS: I know about the plugin inkarkat/vim-mark but I got some errors and it is much more than I need.
I tried using the builtin matchadd, but could not enter the <cword> (it interprets the string literally), and within brackets it considered it a regex.
If I understand you correctly, then here is the answer to your question:
ViM: Search and highlight but do not jump
This question already has answers here:
Turning off auto indent when pasting text into vim
(25 answers)
Closed 7 years ago.
there,
I found that every-time when I copy piece of code from eclipse into vim, the format will totally be screwed up, and the indentation will be broken by adding lots of tabs in vim. Could someone has clues about how to keep the original program format when copying to vim?
Try enabling paste mode:
set paste
You probably have a different set of tabstops in eclipse and in vim. Then when you have some tabs filled by spaces and others by tabs the spacing gets all messed up.
The default tabstop in vim is 8 spaces - either change that to whatever you use in eclipse or else change the eclipse tabstops to 8.
When I get started in a new environment the first thing I do in vim is this command:
:set ts=4 sw=4 et
That sets tabstops to 4, shiftwidth to 4, and expands tabs to spaces so that you don't have this problem if you open it with a different set of tabstops.
This question already has answers here:
Make Vim show ALL white spaces as a character
(23 answers)
Closed 7 years ago.
I want to highlight tabs and spaces. In sublime text I activated an "draw_white_space": "all" option. After that all tabs and spaces is highlighting.
I want to activate the same option in vim, but all what I used didn't work.
I tried set follow options:
set listchars=tab:--
set list
How is it possible to activate it, and how to make highlighting tabs and spaces the same sympols like in picture above?
As icwnd says use
set list
set listchars=tab:▸·
However you may find that you still cannot see the characters because they are the same color as the background. Adding the following will change the color of those characters
highlight NonText guifg=#4a4a59
highlight SpecialKey guifg=#4a4a59
As Ben mentions, this does not work for spaces.
Edit
You can now do the same for spaces, see https://stackoverflow.com/a/29787362/1427295.
There is a vim plugin called spacehi which does that with tabs.
Download the spacehi.vim file, copy that into your ~/.vim/plugin/ folder, restart vim and activate/deactivate with F3.
If you don't want to use the plugin you could use this:
set list
set listchars=tab:--,trail:.,eol:¬,extends:>,precedes:<
For even nicer indentation also take a look at the vim-indent-guides.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
VIM: Don't underline leading whitespace in HTML links
Some of my lines in vim are getting weird horizontal lines in the leading whitespace. I don't know why. Maybe a plugin I have installed?
Here's a picture
Only some lines get them. I've tried closing and opening the file.
Does anyone know how to turn this off?
Those lines are part of the underline syntax highlighting of hyperlinks. Notice that they occur inside <a> tags. Some colorschemes won't underline hyperlinked content inside <a>, but if you wanted to continue using the same colorscheme you would need to modify or override the HtmlHiLink directives in the html.vim syntax files.