2

I'm a college student majoring in CS, and that means I spend a lot of time poking around in vim. I'm still a complete noob, but I love editing text in the terminal--it's more fun than writing documents has any right to be.

However, I'm curious if there's a basic, low-frills document format I can use (from within vim) to typeset my homework assignments. I'm familiar enough with LaTeX, and if it were possible I'd use it for everything, but it has two main disadvantages:

  1. It takes a long time to write an entire LaTeX document, and
  2. LaTeX doesn't handle code very well.

With that in mind, I'd like to know if some format exists which addresses both these needs and is still easy to hash out quickly from a terminal-based text editor. I use vim for literally everything else I write, so the need to keep LibreOffice Writer around just for homeworks seems a bit overbearing to me.

Thanks!

  • 3
    what format do you need eventually? HTML? PDF? except for latex, there are many plain text based ML, like markdown, reStructuredText, textile, AsciiDoc... most of them could be converted into HTML, PDF even latex. If you could just submit plain text file, you don't need those, just .txt is enough. – Kent Sep 13 '13 at 20:14
  • Ad 1: Use an editor that knows LaTeX; e.g. TeXworks. Ad 2: `listings` does all you need. Please ask further questions on TeX at http://tex.stackexchange.com/ – Martin Schröder Sep 14 '13 at 20:36

1 Answers1

4

I would tend towards something light like Markdown, but the needed capabilities depend on what requirements you have for the output (formatting and styling).

I find the AsciiDoc project quite interesting. From their website:

AsciiDoc is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, blogs and UNIX man pages. AsciiDoc files can be translated to many formats including HTML, PDF, EPUB, man page. AsciiDoc is highly configurable: both the AsciiDoc source file syntax and the backend output markups (which can be almost any type of SGML/XML markup) can be customized and extended by the user.

It even comes with a Vim syntax.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • I use txt2tags (txt2tags.org). Worth taking a look. Syntax is not part of a default Vim install, but at its website there is a vim syntax file. It can even output LaTex format. – Jean Waghetti Sep 13 '13 at 20:54