Sunday, February 5, 2017

Re: Sed substitution did not go as planned...

On 2017-02-04 05:14, Marcus Martinez wrote:
> ...and modified the first ten lines using Sed substitution...
> :1,10 s/^/--/
>
> After running this command the beginning of lines 1 through 10 do
> have the "--" correctly placed. However, the first character of
> each line in the file is now highlighted (as shown in the attached
> image). The pattern now recurs for any text file I open with vim.
>
> Why does this happen? How can I "undo" this new pattern so that vim
> does not highlight the first character of each line?

Why? You have 'hls' set, so it highlights the last thing you
searched for. In this case, /^/ which is the beginning of the line.

How can you undo it? A couple different ways:

- if you like the search highlighting but just want to hide it for
these search results, use ":noh" to turn it off until the next time
you do a search

- alternatively, you can search for junk that isn't in your file:

/lkasjdfdlkjgadslkgjads

- if the highlighting annoys you all the time, you use

:set nohls

to turn it off completely.


I generally fly with 'nohls' set and only turn it on when I actually
want that functionality. I also remap control+L (usually just a
simple :redraw of the screen) to also do a :noh in the process:

:nnoremap <c-L> :noh<cr><c-L>

which feels intuitive to me. YMMV.

You can read more at

:help 'hls'
:help :noh

-tim





--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Sed substitution did not go as planned...


On Sat, Feb 4, 2017 at 8:14 AM, Marcus Martinez <marcus.martinez.807@gmail.com> wrote:
...
 
:1,10 s/^/--/

After running this command the beginning of lines 1 through 10 do have the "--" correctly placed. However, the first character of each line in the file is now highlighted (as shown in the attached image). The pattern now recurs for any text file I open with vim.

If you run :nohlsearch does that leading yellow column go?

It is showing you the last search, since ^ matches the beginning of every line, that is why it is there.

:h hlsearch

HTH,
David 

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Vim as external editor for thunderbird

> the current version of thunderbird I cannot use (g)vim as external editor,
> nor was an appropriate plugin listed in the thunderbird pages

Wouldn't this be better addressed to the Thunderbird people? They seem to
have been the ones who broke it.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vim as external editor for thunderbird

Greetings from a rainy Northern Italy!

After a new installation of my Linux box (xubuntu 16.10) I noticed that in the current version of thunderbird I cannot use (g)vim as external editor, nor was an appropriate plugin listed in the thunderbird pages ( _Muttator_ does not call vim, it should simulate vim). I found some plugins, but is it possible to call the editor from within thunderbird? It used to be possible in the recent past.

thanks as usual!
guido

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, February 4, 2017

Sed substitution did not go as planned...

Hello,

I am using Vim version 7.4.160 on AIX.

I opened my text file...
vim foo.txt

...and modified the first ten lines using Sed substitution...
:1,10 s/^/--/

After running this command the beginning of lines 1 through 10 do have the "--" correctly placed. However, the first character of each line in the file is now highlighted (as shown in the attached image). The pattern now recurs for any text file I open with vim.

Why does this happen? How can I "undo" this new pattern so that vim does not highlight the first character of each line?

Thanks,
Marcus Martinez

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, February 3, 2017

Re: path autoexpansion (autcompletion) when saving files or changing directories

On Friday, February 3, 2017 at 5:40:47 PM UTC-8, Victoria Stuart wrote:
> SOLUTION!
>
> OK, I solved it. I had a series of "ser wildignore=" lines in my .vimrc. Commenting out those and restarting nvim solved this issue.
>
> Thanks again for your help; much appreciated. :-D

"set wildignore=" I meant (typo).

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: path autoexpansion (autcompletion) when saving files or changing directories

SOLUTION!

OK, I solved it. I had a series of "ser wildignore=" lines in my .vimrc. Commenting out those and restarting nvim solved this issue.

Thanks again for your help; much appreciated. :-D

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.