Solved Vim search and replace

I am new to Freebsd. I recently had a file where I wanted to eliminate every occurance of "late" in a fstab file.
My linux experience told me that :%s/late//g would work. It did not. Despite a futile attempt to find an equivalent using
:help, I was unsuccessful. There are apparently differences between gnu vim and freebsd vim.

Two questions:
1. How would I accomplish the same thing in Freebsd vim?

2. Are there any other resources besides :help that would help me learn the Freebsd version of vim?

Thanks for any and all help. It is much appreciated. :)
 
[...] I wanted to eliminate every occurance of "late" in a fstab file.
My linux experience told me that :%s/late//g would work. It did not. Despite a futile attempt to find an equivalent using
:help, I was unsuccessful.
:%s/late//g should normally do the trick. However, the meaning of the global "g" is influenced by the options gdefault and edcompatible - verify both options are off (i.e. set to their default values).
 
Apparently, my issue was some kind of fluke.🤔 I have attempted to replicate the issue without
success. However, I do appeciate your input. Have a great day. :)
 
JFTR, there's no "GNU vim" either :cool: – the vim authors might value the clarification, hehe
Something I didn't realize until now, they have their own license too.

Vim is Charityware. You can use and copy it as much as you like, but you are
encouraged to make a donation for needy children in Uganda. Please see |kcc|
below or visit the ICCF web site, available at these URLs:

http://iccf-holland.org/
http://www.vim.org/iccf/
http://www.iccf.nl/

You can also sponsor the development of Vim. Vim sponsors can vote for
features. See |sponsor|. The money goes to Uganda anyway.

The Open Publication License applies to the Vim documentation, see
|manual-copyright|.
 
I am new to Freebsd. I recently had a file where I wanted to eliminate every occurance of "late" in a fstab file.
Just posting for documentation and completeness of failure causes:

Editing a system file needs root permissions. Vim is a very powerful editor, but TWD is limited to the superuser.
 
Editing a system file needs root permissions.
Indeed, but I'm pretty sure the "s" command (replace with regex) isn't affected, as vim lets you edit any file you are allowed to read. You just can't save it "in place", obviously 😉 (and IIRC, it will give you a warning once you start editing on a file that you're not allowed to write ...)
 
Indeed, but I'm pretty sure the "s" command (replace with regex) isn't affected, as vim lets you edit any file you are allowed to read. You just can't save it "in place", obviously 😉 (and IIRC, it will give you a warning once you start editing on a file that you're not allowed to write ...)
Indeed that's the way it should be working.
However, there are some Linuxes that mix up a regular user and the superuser: no root password set, sudo-ish command executions, first user is default in the sudoers file.

That might cause confusion when working on a system with hard devides.
 
Back
Top