Giter VIP home page Giter VIP logo

gedit-ledger's Introduction

gedit-ledger

Summary

Ledger support for the gedit text editor, including:

  • Basic syntax highlighting
  • Transaction snippet
  • Git commit command script for version control

I through this together in a few hours, so don't expect everything to be perfect. The syntax highlighting doesn't cover all the syntax that ledger supports and doesn't help catch any mistakes.

The git commit probably doesn't belong here, but it's used for version controlling my ledger files, so here it is.

The goal of this project was to get some ledger support for a basic text editor so that my wife can update our ledger file. I personally use vim and the excellent vim-ledger plugin.

Installation

Clone this repo and copy the files for gedit and gtksourceview (the syntax highlighting engine gedit uses):

mkdir -p ~/.local/share/gtksourceview-3.0/language-specs
cp ledger.lang ~/.local/share/gtksourceview-3.0/language-specs
cp git-commit ~/.config/gedit/tools
cp ledger.xml ~/.config/gedit/snippets

Oh, don't forget to enable the Snippets and Tools plugins in gedit preferences. If you're using git to version control your ledger files, enable the git plugin that shows added/removed/modified lines.

You may want to assign a hotkey to the transaction snippet and the git-commit tool, too.

TODO

  • Syntax highlighting
    • Catch common mistakes (not having the correct spacing and match () and [] for virtual accounts)
    • Non-dollar commodities
    • Commodity transactions like: 2 BTC @ $800
    • Non-transaction statements
  • More snippets
    • For alternative secondary accounts
    • Splits
  • Get rid of the git commit command script and find some other way to support Git in gedit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.