Archive

Posts Tagged ‘gedit’

Gedit for LaTeX

September 18th, 2009 4 comments

I’m a gnome user. Yes – I really do like the look and feel. truly madly deeply . . . And I’m fond of gedit – I know its a rather simply editor – but I see it as an advantage. Trust me – simplicity isn’t always a bad thing 😉
But there’s one thing which occasionally annoys me – writing LaTeX in gedit can be cumbersome as there’s no support for all the things one has to do when creating a LaTeX-document so I used to switch between half a dozen apps to get this done. But recently I stumbled upon a plugin that merges everything needed into gedit:
http://live.gnome.org/Gedit/LaTeXPlugin
(ubuntu 9.04 users can “sudo aptitude install gedit-latex-plugin” and are ready to go – except there is a newer release candidate available from the link . . .)
I needed to install some extra packages like rubber and poppler(for python) but then gedit looks like this when opening a tex-file:
gedit01
gedit02
As you can see it provides an embedded preview, specialized syntax highlighting and (in the pane on the left) symbol-insertion as well as a structured tree-view of your LaTeX-file so you can jump to your desired section easily. The additional toolbar on the top provides lstlisting insertion as well as the usual stuff like, imageinsertion, all kinds of listings as well as matrices and bibliographies.

Have fun while you can,
Willi

Categories: linux Tags: ,

C Code Beautifier in gedit

May 22nd, 2009 5 comments

Wer kennt es nicht, der Quellcode des anderen sieht sch***e aus, aber man muß/will ihn trotzdem lesen. Ich hab für gedit eine einfache Möglichkeit gefunden:

  • indent http://www.gnu.org/software/indent/ installieren (sudo aptitude install indent)
  • gedit Preferences: External Tools plugin aktivieren
  • External Tools plugin konfigurieren

Jetzt im External Tools Manager ein neues “Tool” anlegen:
Name (z.B. “CodeBeautify”)
Description (z.B. “Make a BenchIT compatible code reformatting (K&R style)”)
Shortcut Key (z.B. “<Control>F12”)
Command:

#!/bin/sh
indent  'FLAGS'

Input: Current document
Output: Replace current document
Applicability: All Documents

Meine Flags sind (etwas abgewandelter Kernighan & Ritchie Style für C Datein des BenchIT Projekts):

-nbad -bap -nbbb -sob -c40 -cd40 -ncdb -cp40 -d0 -nfc1 -fca -sc -br -ce -cdw -cli3
-cbi3 -nss -npcs -ncs -saf -sai -saw -nprs -di1 -nbc -nbfda -nbfde -npsl -brs -brf
-i3 -ci3 -lp -ip3 -l80 -nbbo -nhnl -nut

(Indent bringt einige vordefinierte Styles mit, d.h. man muß nicht gezwungenermaßen eine große Menge an Flags angeben.)

Hat man eine beliebige C Datei geöffnet einfach Control+F12 drücken und schon ist die Datei formatiert.

Categories: linux, software Tags: , , ,

f95 snippets for gedit

April 6th, 2009 1 comment

stefan used the “snippets” plugin while presenting us some code of his practical. these plugin is really powerful to reduce time while programming. fortran is supported by default, but there are no implemented snippets. so i searched some minutes for some snippets, but nothing.

i want this, so i have to implement it 😉
f95 snippets

Categories: linux, nerdcore, software Tags: , ,