You are not logged in.

#1 2009-04-19 03:11:06

trobins
Member
Registered: 2009-04-05
Posts: 27

Looking for an editor...

Under Arch, I find myself editing configuration files. In the past I have used kwrite (or its big sister kate - does multi-documents) because they can do syntax highlighting.

When I print on my inkjet, I get neat color coding that helps me read the printouts.  I can also set headers and footers, and choose font, size and color for them. Very nice. But...

So far I have found no way to make any sort of default settings that stick! I have to go through the procedure for every file I print. I checked out gedit and it's nice too. Same limitation: printing settings don't stick as defaults.

I have systematically installed, checked, and uninstalled every editor I can find in the repos.

Anyone know of an editor that does syntax highlighting, and allows me to set printing defaults?

Tim

Offline

#2 2009-04-19 03:27:08

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Looking for an editor...

it's a good ol case of unix one tool for one job. 

use vim for your editing (it takes practice i know...) then use enscript for your printing.  i've barely used it myself, but i do believe you can set up a config file to get consistent printing with a myriad of options.

Offline

#3 2009-04-19 04:14:57

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Looking for an editor...

I use Vim for editing as well, although you'll find a myriad of different opinions (as I'm sure you know).  But I've never had to print config files with syntax highlighting... do you mind me asking why?  It seems unusual to me that this would come in handy often enough to set options for every time.  Printing is generally something I do from a browser, not an editor.

Moving along... have not used enscript, but (depending on your specific needs) you may want to try using Vim's :TOhtml command to export a script to a .html file with syntax highlighting, then printing it with your browser of choice.

Offline

#4 2009-04-19 04:26:24

Killa B
Member
From: United States
Registered: 2008-10-28
Posts: 42
Website

Re: Looking for an editor...

I use vim a lot, but when I want to actually be productive (coding, site design) I use gedit. The fact that vim is a console application means it comes with some interface limitations. GUI applications like gedit are much better suited for editing, IMO. For example, it's a lot faster to type Ctrl+S then to type Esc, :w, i.

Trent's solution sounds like a good idea. It probably wouldn't be too hard to write a script that automates the process for you.

Offline

#5 2009-04-19 12:04:06

fogobogo
Member
Registered: 2008-08-24
Posts: 83

Re: Looking for an editor...

you might want to check out this site:
http://www.texteditors.org/cgi-bin/wiki.pl?HomePage

Offline

#6 2009-04-19 12:24:39

SkonesMickLoud
Arch Linux f@h Team Member
From: The D of C
Registered: 2008-09-20
Posts: 178

Re: Looking for an editor...

I believe that Geany does what you're looking for.

Offline

#7 2009-04-19 12:28:16

Lexion
Member
Registered: 2008-03-23
Posts: 510

Re: Looking for an editor...

+1 vim

I don't print, but vim is really good for editing config files.


urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand

Offline

#8 2009-04-19 15:51:52

trobins
Member
Registered: 2009-04-05
Posts: 27

Re: Looking for an editor...

With all due respect and thanks for the replies, I think you all have missed my point.

Kwrite does everything I need. Except that there is no way to set default characteristics for printing. For example:

I want the standard header with date on the left, filename in the center, and page number on the right. But I want that in Arial Black, 14pt, and in red. I can set all those things easily, but Kwrite has no facility built in to allow me to specify that as my default. The next time I print (even during the SAME SESSION), I must go through that rigamarole again.

There is no way within Kwrite to specify margins on the page. I CAN access printer properties from Kwrite's print dialog and set margins there, but if I expect to have those settings remain, the ONLY way is to access the CUPS control panel and make those margins the default for my printer for EVERY printing application. Workable, but not what I want.

Kwrite has a kwriteconfig file in /usr/bin, but it is read only, and a binary file - not something I can modify (assuming it contains the settings I need to change.)

So... Any more suggestions? Are there extensions to kwrite that might solve the problem?

Thanks to all for the suggestions but, the graphical vim doesn't print. Jedit as far as I can see doesn't allow headers/footers on printed docs. And SkonesMickLoud, thanks for the link. I'll wade through it later.

Tim

Offline

#9 2009-04-19 16:34:10

fogobogo
Member
Registered: 2008-08-24
Posts: 83

Re: Looking for an editor...

I see. this is indeed a bit difficult. I mostly don't print anything but maybe theres some app for print profiling? Sorry I can't help you more. sad

Offline

#10 2009-04-19 19:52:20

darthaxul
Member
Registered: 2008-09-24
Posts: 156

Re: Looking for an editor...

One im hooked on is called bluefish
tabbed views, syntax highlight...drooling....

Offline

#11 2009-04-19 20:02:26

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Looking for an editor...

trobins,

I don't know kwrite at all seeing that I haven't used it in years, but as already mentioned by brisbin33, enscript should be able do what you want. My printing needs are different than yours, but I've used enscript with scite, geany, and now vim. I just set up a little script in each editor. It should be fairly straight forward to do it in kwrite.

Offline

#12 2009-04-19 20:07:28

oopsicrappe
Member
Registered: 2009-01-18
Posts: 17

Re: Looking for an editor...

Have you tried enscript yet? I've never used it, but from looking at the man page I think it will probably do what you want.

EDIT: skottish, you beat me to it. I should have refreshed the page before posting.

Last edited by oopsicrappe (2009-04-19 20:11:21)

Offline

#13 2009-04-19 20:18:26

trobins
Member
Registered: 2009-04-05
Posts: 27

Re: Looking for an editor...

darthaxul wrote:

One im hooked on is called bluefish
tabbed views, syntax highlight...drooling....

Yep, a great editor with a HUGE array of features if one is creating code. But it lacks one critical feature: it has no print capability. sad

I consider the ability to print of critical importance in an editor. Having had many systems crash irreparably over the past 30 years I've been involved with computers, I find that a paper copy of critical data is invaluable. During my first week running Arch, I managed to crash my install 4 times. Having printouts of the critical files made recovery easy. I could see their contents and compare them with what I'd changed, then correct the problem.

I set out a week ago to create a notebook containing printouts of manuals, .conf files, menu.lst, fstab, etc., but I am compulsive about having presentable documents. It looks like I will just have to use OOo Writer and create my own macros to color-code text. At least in Writer, I can set headers and footers that persist, and other document properties.

I must say, I am very disappointed that not one editor I have looked at (now over 20 and counting) can do what I want. Thanks all for the suggestions. I'll keep plugging away.

Tim

Offline

#14 2009-04-20 13:32:08

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Looking for an editor...

brisbin33 wrote:

then use enscript for your printing.  i've barely used it myself, but i do believe you can set up a config file to get consistent printing with a myriad of options.

skottish wrote:

as already mentioned by brisbin33, enscript should be able do what you want

oppsicrappe wrote:

Have you tried enscript yet? I've never used it, but from looking at the man page I think it will probably do what you want.

um... you still haven't addressed this suggestion.  no go? why?

trobins wrote:

I must say, I am very disappointed that not one editor...

you're not looking for an editor; an editor edits files.  i still think you're looking for a printing program.

Last edited by brisbin33 (2009-04-20 13:33:10)

Offline

#15 2009-04-20 14:14:25

trobins
Member
Registered: 2009-04-05
Posts: 27

Re: Looking for an editor...

I found enscript in the repos and installed it. But I am a complete noob at this. How is it used? It doesn't appear as a separate app on the menu, nor does it appear as any option on any editor's menu. Sorry to seem dense, but for more than 20 years, I've been using text editors that had print capability built in.

Tim

Offline

#16 2009-04-20 14:14:40

arunix
Member
From: /home/kurali
Registered: 2009-04-08
Posts: 93

Re: Looking for an editor...

What about "emacs" ?


Minds are like parachutes. They only function when they are open.

Offline

#17 2009-04-20 14:33:53

trobins
Member
Registered: 2009-04-05
Posts: 27

Re: Looking for an editor...

arunix wrote:

What about "emacs" ?

I'll spend some time with it, but the learning curve appears very steep. The first obstacle I'll have to overcome is that apparently emacs knows nothing about any printers I have installed (an HP laserjet 6P and an HP inkjet 5280c). Otherwise, it looks interesting.

Thanks.

Tim

Offline

#18 2009-04-20 14:43:22

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Looking for an editor...

trobins wrote:

I found enscript in the repos and installed it. But I am a complete noob at this. How is it used?

well, i've only checked it out, don't use it on a regular basis; so i'll defer to skottish on this.  but...

after looking over the manpage it seems like it could go like this.

set up a config file for enscript.  here you can define all the printing preferences you want including header text; syntax highlighting; and printer locations.  then you'd simply "cat $file | enscript". 

From the sounds of your needs, spending some time with "man enscript" would be very beneficial for you.

Offline

#19 2009-04-20 14:44:08

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: Looking for an editor...

I think you should take a look at

man enscript

Personally I think printing out configs is a waste of time and paper. Backing them up is a very good thing to do of course, however I consider a flash drive or webspace the better way to do this. But if hardcopies work for you, I won't get in your way wink .

Offline

#20 2009-04-21 06:55:56

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: Looking for an editor...

Garns wrote:

Personally I think printing out configs is a waste of time and paper. Backing them up is a very good thing to do of course, however I consider a flash drive or webspace the better way to do this. But if hardcopies work for you, I won't get in your way wink .

+ you cant do

diff /etc/bla.conf /reality/pieceofpaperinmyhand


☃ Snowman ☃

Offline

#21 2009-04-21 07:00:17

Gigamo
Member
Registered: 2008-01-19
Posts: 394

Re: Looking for an editor...

http://www.redcareditor.com looks/is promising. Not sure about printing though.

Offline

Board footer

Powered by FluxBB