Wokzombie
February 17th, 2010, 02:39 PM
Recently I've been learning C, my text editor of choice is gedit.
When you want to tell C that your string of text needs to go on a new line you type \n.
Last night I completely forgot about it and didn't close a lot of the text with \n so everything ended up in one line when I ran the code. (Actually the book told me to do it ;))
Then I went to the search & replace function in gedit and told it to replace every instance of ") with \n").
What gedit did was search for every instance of ") and actualy put it in a new line IN the editor, like I pressed enter, not what I wanted.
So I was curious what happened if I did it the other way around.
If I search for every instance of \n, the editor doesn't look for the actualy text, but it shows me every place I pressed enter instead.
Does anyone maybe know if this is supposed to happen and if I could maybe fix it? Because for the rest I really love it as an editor to learn with.
[edit] I'm talking about gedit 2.28.0 in Karmic if it matters.
When you want to tell C that your string of text needs to go on a new line you type \n.
Last night I completely forgot about it and didn't close a lot of the text with \n so everything ended up in one line when I ran the code. (Actually the book told me to do it ;))
Then I went to the search & replace function in gedit and told it to replace every instance of ") with \n").
What gedit did was search for every instance of ") and actualy put it in a new line IN the editor, like I pressed enter, not what I wanted.
So I was curious what happened if I did it the other way around.
If I search for every instance of \n, the editor doesn't look for the actualy text, but it shows me every place I pressed enter instead.
Does anyone maybe know if this is supposed to happen and if I could maybe fix it? Because for the rest I really love it as an editor to learn with.
[edit] I'm talking about gedit 2.28.0 in Karmic if it matters.