TERRIBLE code editor/tags
#1 Members - Reputation: 213
Posted 22 May 2011 - 10:55 AM
I love this site but I absolutely hate the code editor. I am sorry, but its really the worst edtior/tag I have ever seen on any site.
1) When I paste formated code in the code tabs the formation is gone. I have to reformat ever single line. Extremely annoying.
2) Selection of multiple lines does not work. I wanted to select (per mouse) multiple lines of code but after some lines the selection just stops.
3) The rendering is really fucked up. I formatted ever single line by hand and it was perfectly aligned in the preview. Bu when I submit everything is fucked up and not aligned!
4) The code view with the black background and the colorful words is just plain ugly. Feels like a unix console from 1980. Why not just a syntax highlighting like visual studio?
Sorry for the criticism, but I am really pissed off right now. I spend 10 minutes to format just some lines of code and it still looks like shit. All other sites are know have nice and good looking editor/tags. Btw: I am using Opera 10.
I can't believe I am the only one who thinks the code tags are terrible...
#4 Members - Reputation: 2408
Posted 22 May 2011 - 11:52 AM
The way it makes tabs eight spaces in a code box is still a bit of an annoyance but I just added a tabs-to-spaces feature to my text editor and make sure I run any actual code from an editor through that before I post.
Staff? Would it be possible to address the length of tabs in code boxes? Now pasting this, just from a plain text editor, with some tabs:
int main()
{
for(int i=0;i<10;++i)
{
std::cout << "Icky\n";
}
}
I don't know anyone who has their tabs set to that many spaces in real code and find it hard to read, but it would be nice to be able to just paste direct from an IDE without having to mess about replacing the tabs with spaces.
Minor nitpick, sure you have lots of more important things to worry about.
#5 Members - Reputation: 213
Posted 22 May 2011 - 12:04 PM
int main() {
int a;
int b;
int c;
}
Thanks for the tip about RTE. I switched it off and indeed: the editor is MUCH better now.But the code tag still looks so unbelievable ugly. I can barely see the dark blue brackets on the dark background. Seriously, even NO highlighing at all would be better. The old syntax highlighting was 100times better:/
#6 Members - Reputation: 2408
Posted 22 May 2011 - 12:09 PM
int main() { int a; int b; int c; }
But the code tag still looks so unbelievable ugly. I can barely see the dark blue brackets on the dark background.
Mmm, just tried the black alpha theme and it isn't that bad in my view, but it does look a lot nicer in classic, if you can bear all the bright pages. Never got on with black theme, myself.
#7 Members - Reputation: 213
Posted 22 May 2011 - 01:08 PM
I switched the theme to the bright one and yes, now it's readable:)
int main() { int a; int b; int c; }
But the code tag still looks so unbelievable ugly. I can barely see the dark blue brackets on the dark background.
Mmm, just tried the black alpha theme and it isn't that bad in my view, but it does look a lot nicer in classic, if you can bear all the bright pages. Never got on with black theme, myself.
I still think it is a little bit odd, having default settings that are bad. If I were an admin I would switch of RTE and the black them by default.
#8 Banned - Reputation: 356
Posted 22 May 2011 - 01:29 PM
app::app()
{
}
app::~app()
{
}
void app::configure()
{
call_configure.call();
}
void app::init()
{
input.on_input += owl::app::input_delegate(&app::input_event, this);
// Load script
script = owl::script::script_ptr(new owl::script::script());
script->init();
script->load("lua_main.lua");
call_init.call();
}
EDIT: Yap. Not even avoiding the code tags. The editor keeps duplicating new lines randomly and also ignoring tabs.
#9 Senior Staff - Reputation: 4277
Posted 22 May 2011 - 10:12 PM
int main() { int a; int b; int c; }Thanks for the tip about RTE. I switched it off and indeed: the editor is MUCH better now.
But the code tag still looks so unbelievable ugly. I can barely see the dark blue brackets on the dark background. Seriously, even NO highlighing at all would be better. The old syntax highlighting was 100times better:/
Dark blue brackets on the dark background? The background is a light gray (?). We are not currently maintaining the black theme since we have been a white site for almost six years now. We don't have the manpower to try and keep two radically different color variations up to date.
#10 Senior Staff - Reputation: 4277
Posted 22 May 2011 - 10:15 PM
source lang="cpp"
/source
[/font]
#12 Senior Staff - Reputation: 4277
Posted 22 May 2011 - 10:25 PM
I wanna
The source tag inclusion is relatively new.. but don't omit the lang="cpp" argument as it seems to mangle the code right now. I posted about it here:
http://www.gamedev.net/blog/1037/entry-2249817-new-syntax-highlighting-in-forums-and-journals/
#13 Banned - Reputation: 356
Posted 22 May 2011 - 10:43 PM
I wanna
The source tag inclusion is relatively new.. but don't omit the lang="cpp" argument as it seems to mangle the code right now. I posted about it here:
http://www.gamedev.n...s-and-journals/
[source lang="cpp"]void owl::render::gui::gui::input_event(const owl::app::input_event& e){ root->input_event(e);}void owl::render::gui::gui::hide_dialog(){ root->pop_dialog();}void owl::render::gui::gui::show_file_dialog(){ root->add_dialog(dialog.file); dialog.file->set_visible(true); dialog.file->move( (root->get_width()-dialog.file->get_width())/2, (root->get_height()-dialog.file->get_height())/2);}void owl::render::gui::gui::messagebox(const std::string& text ){ root->add_dialog(dialog.messagebox); dialog.messagebox->set_visible(true); dialog.messagebox->move( (root->get_width()-dialog.messagebox->get_width())/2, (root->get_height()-dialog.messagebox->get_height())/2);}[/source]
EDIT: YAY!
EDIT2: When I touch it, it gets broken!
#14 Senior Staff - Reputation: 4277
Posted 23 May 2011 - 05:17 AM
#15 Members - Reputation: 2408
Posted 23 May 2011 - 05:33 AM
[source lang="cpp"]void Application::OnActionCommand(USHORT CommandID){ switch(CommandID) { case IDA_EXIT: PostMessage(AppHw,WM_CLOSE,0,0); break; }}[/source]
[EDIT] Yay! Tabs work properly with the source and cpp tags. Thanks, Mr Tanczos. Should really keep more up to date.
[EDIT] Wait, I see what owl means. As soon as I edit a post then save the changes, the source and lang=cpp box goes back to behaving like the code box. Weird.
[EDIT] Until I refresh, then come back again. Never mind, probably a cache issue or something.
#16 Banned - Reputation: 356
Posted 23 May 2011 - 01:48 PM
I did notice that sometimes on a subsequent edit is that the syntax highlighter doesn't immediately load.
I think it might be related to the edit box being handled with ajax. Some way to re-run the java after edit could solve it tough.
That's a gorgeous source tag. Keep it.
#18 Staff - Reputation: 8906
Posted 24 May 2011 - 03:04 AM
This way people using the RTE UI would get partial benefit of the new syntax highlighter, and if I understand how the system functions posts already using the defective tag should also be improved for future viewers.
This is all of course assuming you haven't found a way to actually provide UI for the new source tag; if you can do that it would be a preferred solution, and ideally some of the other options (such as the ability to highlight some lines) should be exposed.
From what I understand there's a simple way to change the HTML output of BBCode tags, so if I'm correct this should be a very quick and simple change to make?
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#19 Senior Staff - Reputation: 4277
Posted 24 May 2011 - 06:07 AM
I would like to propose that the existing code tag be modified so that it doesn't use it's broken syntax highlighter anymore and instead uses the new syntax highlighter like the source tag; as there is no way at present to provide an argument deciding which language to highlight with the code tag it should use the "text" (plain text) brush, giving a nice box with a mono-spaced font and scrollbar but not risking incorrect colouring.
This way people using the RTE UI would get partial benefit of the new syntax highlighter, and if I understand how the system functions posts already using the defective tag should also be improved for future viewers.
This is all of course assuming you haven't found a way to actually provide UI for the new source tag; if you can do that it would be a preferred solution, and ideally some of the other options (such as the ability to highlight some lines) should be exposed.
From what I understand there's a simple way to change the HTML output of BBCode tags, so if I'm correct this should be a very quick and simple change to make?
I had to write a custom plugin for this and it has to sort of compete with the native processing of posts as well since the syntax highlighter wants absolutely ZERO br tags in the source code and IPB wants to put br tags in. Right now the RTE for this software is also very basic in terms of what you can add on plugin wise.. Version 3.2 of IPB can't get here fast enough for me. I want tags in the forums and and the brand new RTE that includes your own personal media library that you can upload images and other files to to link from in posts. Maybe then we'll get some sophistication with the plugins we can write.. finally.






