[SOLVED] Gedit and Kate's serious troubles in C++.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It is Ubuntu 14.04. I have used Gedit for the past year or so mostly to write gnu fortran programs. Now I need to write code in C++ and immediately I got many serious problems. Let say I need to paste a chunk of code from another C++ program. Instead of pasting it in one place it would do it in numerous places which gives me a bunch of compile errors. I then installed kate and opened my file in it. Before I even saw any code I got pages and pages of strange output in the terminal and one of the lines really impressed me: "The application may misbehave" and misbehave it did. It is impossible to use because it mangles the code so badly I have to manually find places where it placed various chunks of code and remove them. The funny thing is that when I do search operation it goes through ALL files in the directory and finds similar patterns and lists them. It is a nightmare.
What is a good editor for C++ code? I would appreciate if people with experience would comment.
Thanks, but I would prefer to hear from someone with direct experience: C++ and the editor's name, I guess. I just discovered one more problem. Apparently kate also inserted garbage into an unrelated file (written in fortran) and I had to edit it to clear.
John_W, thanks. I did some googling and discovered that anjuta has been designed specifically for C++, so I installed that. It is my second day with it now and it seems to be working. Very little trouble, if any so far. Thanks, - Alex
/* Rant alert, directed at no one in particular... */
You can waste days and days trying to find and figure out how to use just the perfect integrated GUI desktop office editor for code editing, then hope the next round of new features does not break your use...
Or you can learn the very simple, powerful and always available shell/terminal based editors, which have the side benefit of working seamlessly and perfectly and simply within the total Unix-like environment of GNU/Linux. This means that as a by-product you get instant access to all those wonderful search and replace, sort, cut, paste, modify, script and custom on-the-fly filter tools - all for free, at your fingertips with zero additional hassle at all!
Of course that means you must work in a terminal window (ick! shudder!) and learn such difficult to remember navigational commands as cd and ls, and a few totally nightmarish modifiers like -a and -l, not to mention working through the built-in tutorial on the editor... and of course, you will need to organize your work and not rely on always having a pointy-clicky Open recent file... option to remember where it was for you .
But a day or two spent thinking about what you are doing vs days and days of ultimately fruitless search for just the perfect GUI application to do it for you seems like a small price to pay for a proven, reliable, simple, infinitely versatile and better way of doing things.
Of course there is that "old fashioned" stigma, and the loss of all that perceived pointy-clicky, if sometimes non-functional and cumbersome, GUI convenience...
/* End rant */
Last edited by astrogeek; 10-11-2015 at 02:31 PM.
Reason: tpos, typs, typos
Well, on close inspection anjuta is even worse than Gedit and kate in mangling C++ code. I am desperate. I am wasting a lot of time trying to remove rogue pastes. I'm marking this thread as non-solved.
Anjuta also cannot search through the text. It freezes, changes the colour of the interface and then quits.
Also I wonder how could people release raw, untested editors like those?
Well, on close inspection anjuta is even worse than [kateB]gedi[/B]t and kate in mangling C++ code. I am desperate. I am wasting a lot of time trying to remove rogue pastes. I'm marking this thread as non-solved.
Anjuta also cannot search through the text. It freezes, changes the colour of the interface and then quits.
Also I wonder how could people release raw, untested editors like those?
I guess I will try to go back to VIM.
- Alex
How is anyone supposed to help you when your description of these problems are so vague? What's a 'rogue paste'? Can you reproduce this issue you seem to invoke in every editor you touch? Without knowing anything about your specific problems, it's useless to suggest even more text editing programs for you to misuse.
Quote:
Originally Posted by AlexBB
Also I wonder how could people release raw, untested editors like those?
Open source software doesn't come with a warranty.
To the last poster. What I am doing is converting gnu fortran program into an equivalent C++ program. So, I take a subroutine from Gfortran code, copy it and open the .cpp file. I find a place between two previously debugged C++ routines and paste what I have in clipboard. The code pastes there but I also find chunks of it a hundred lines below, fifty lines upwards, etc. Sometimes parts of it, like one line will be added to my previously debugged C++ lines, etc.
Is it a clear description? Obviously one cannot work like this. Interestingly I haven't had this problem when working on fortran code I moved chunks of code between the files, etc. What is the problem?
Also I wonder how could people release raw, untested editors like those?
gedit and Kate or Kwrite
are not untested !
they have been the default basic text editors for many years
also they ARE BASIC TEXT EDITORS -- for general use
converting FORTRAN to c++
f77 ? f90? what
FORTRAN is a mess
Quote:
So, I take a subroutine from Gfortran code, copy it and open the .cpp
the two do not mix well but ...
Quote:
I find a place between two previously debugged C++ routines and past what I have in clipboard. The code pastes there but I also find chunks of it a hundred lines below, fifty lines upwards, etc. Sometimes parts of it, like one line will be added to my previously debugged C++ lines, etc.
????????????????????
odd and is needing a WTF
the closet thing to that would be ...
is this fortran code by chance on a HTML <iframe> text section on some web page
that is using some CRAZY messed up CSS to be displayed on a telephone screen
this is NOT normal for opining a *.F77 or *.F90 code file and a *cpp file in tabs in kate or gedit
What the OP is describing is not Gedit standard behavior. If things are pasting to different places, it's either user error or a serious system memory problem. If you're getting the same things happening with multiple editors, then it's not the editor, it's something else.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.