LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   programing editor features (https://www.linuxquestions.org/questions/programming-9/programing-editor-features-137831/)

Boomba 01-23-2004 11:21 AM

programing editor features
 
hi

i'm new to linux but i've programmed under windows alot..and I'm used to the good old colour highlighting of visul studio and textpad...is there a way to make my text editor (gedit) in linux to do the same thing? if not... is there a good text editor out there that will?

thanx in advance
Boomba,

jtshaw 01-23-2004 11:40 AM

I don't have gedit so I am not sure how it works. But I do know that vim, emacs, kate, and numerous other editors will do syntax highlighting for many different programming languages. Kate is probably the most similar to what you are used to using out of those I listed. Vi and Emacs are very powerful and are both great editors but the commands take some getting used to.

ronware 01-23-2004 12:04 PM

Re: programing editor features
 
Quote:

Originally posted by Boomba
hi

i'm new to linux but i've programmed under windows alot..and I'm used to the good old colour highlighting of visul studio and textpad...is there a way to make my text editor (gedit) in linux to do the same thing? if not... is there a good text editor out there that will?

thanx in advance
Boomba,

vim, specifically 'gvim'. It takes some getting used-to, but it is fast and very capable, and has syntax highlighting, folding, etc. etc.

amos 01-23-2004 06:54 PM

I've just tried it and there seem to be two ways of getting gedit to highlight your source code for instance if you were writing in c++:

1. Start gedit, save the new blank document as myprog.cpp and the highlighting will automatically come into force when you start typing (this is how it works in kate, kwrite and various other X-based editors).

Or

2. Start gedit, click on View/Highlight Mode/Sources and select c++. When you start typing the text should be highlighted.

Cheers
Amos

Boomba 01-23-2004 08:11 PM

both of those didnt work :( I dont even have a "Highlight Mode" feature in my gedit...does that mean I should get the newest version?..if so..how do i get it..and how do I install it? I have yet to install something that is not an .rpm file successfully on Red Hat.

boomba,

amos 01-24-2004 10:47 AM

The version I tried it with was 2.4.0, it was installed automatically when I installed Slack 9.1.

http://gedit.sourceforge.net/download.php

seems to suggest that you look for a Red Hat Binary from Red Hat, but if you're already using a version which came with RH9 then I'm not sure whether there'll be a newer one.

Maybe its time to bite the bullet and learn the "./configure, make, make install (as su)" dance for compiling and installing software from source. Its very rare that I actually use a package manager to install anything.

Cheers
Amos

Boomba 01-25-2004 12:58 PM

Quote:

Maybe its time to bite the bullet and learn the "./configure, make, make install (as su)" dance for compiling and installing software from source. Its very rare that I actually use a package manager to install anything.
belive me I would love to learn it..I've been trying to figure it out while getting help from this board on it as well..but I've had no luck...i'm having alot of trouble installing manually..once I try to type in the cammand "make" as super user it always gives me an error...can you give me instructions on how to install the specific gedit 2.4 file? I would really apreciate it:)

thanx in advance
Boomba

amos 01-25-2004 02:28 PM

I can give you generic instructions.

1. Get the package you want as a tarball

e.g. somepack-1.2.3.tar.gz

or somepack-1.2.3.tar.bz2

2. I have a Directory called downloads in my home directory which I use for doing this sort of thing, place the tarball there, startup a shell and cd into the directory which holds the tarball (on my system /home/amos/downloads)

3. For the package ending tar.gz type (at the shell prompt):

tar zxvf somepack-1.2.3.tar.gz

for the package ending tar.bz2 type:

tar jxvf somepack-1.2.3.tar.bz2

Both of these commands will extract the files from the zipped tarball, usually into a new directory called somepack-1.2.3 or something similar. I now usually remove the original tarball using konqueror and at the shell prompt cd into the new directory. At the same time I will usually enter the new directory in konqueror as well, in order to read any READMEs or INSTALLs which the package authors have included. If they are just generic then I move on to the compiling bit (you may have other work to do first eg installing any dependencies).

4. When you are ready type:

./configure

at the command prompt. This step sets things up for your system, checking for missing packages, finding where libraries are etc. If all goes well (ie you can't see any error messages) proceed to the next step. If there are problems you may have to install new packages or tell the configure script where to find specific packages look at the output of ./configure --help if this is the case.

5. Once configure has run type the following:

make

This builds the binaries according to the options provided/found in the configure script. If configure has finished alright then this will usually work too (It may take some time, depending on your systems resources, kdevelop takes me between 1 and 2 hours or longer to compile). So far we have only been working in our own /home/amos/downloads/somepack-1.2.3/ directory, and hence we have not needed to be the su.

6. Become the super user by typing:

su

type in your password. You should still be in the same directory. Now type:

make install

this installs the binaries where they need to be e. /bin, /usr/bin, /usr/local/bin.

If this is in your path then you can access the binary by typing its name as a normal user at the command prompt.

Hope this helps

Cheers
Amos


All times are GMT -5. The time now is 12:36 AM.