2

Trying to remove newlines with a regular expression (not shift-j). I have one vim install where

:g/conf/s/\n//  

works as intended, removing a newline from all lines containing 'conf'.
I have a second install where the same command has no obvious effect at all, other than highlighting the last character in the line.
Is there something that I can look for in the configurations to find out why one install is working as expected and one isn't?
Both installs are Linux, vim 7.4, 2013-08-10 build.

4
  • Is it possible the ignorecase setting differs between the two? (:se ic?)
    – DJMcMayhem
    May 16, 2019 at 15:15
  • Do they both use the same .vimrc and $HOME? You can get those values with :echo $MYVIMRC and :echo $HOME.
    – padawin
    May 16, 2019 at 15:17
  • 'noignorecase' is set in both cases. They don't use the same configuration files. Different users, different machines. I can echo out the contents of .vimrc and also look at :set all, but I'm not sure what I'm looking for. .vimrc is pretty bare-bones in both. May 16, 2019 at 15:23
  • Editing the same file? Sure of the fileformat (unix v. dos endings)?
    – D. Ben Knoble
    May 16, 2019 at 19:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.