ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

LLVM

by whitequark ST2/ST3

LLVM assembly syntax highlighting and snippets

Details

  • 2016.11.20.11.44.19
  • github.​com
  • github.​com
  • 3 years ago
  • 3 hours ago
  • 7 years ago

Installs

  • Total 3K
  • Win 924
  • OS X 1K
  • Linux 1K
Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31
Windows 0 2 0 2 0 1 0 0 1 0 0 2 0 0 0 0 0 0 1 1 0 3 0 0 0 0 0 1 0 2 1 0 2 0 0 0 0 0 1 0 0 1 0 0 0
OS X 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 2 0 1 0 1 1 1 1 1 0 1 0 0 2 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1
Linux 0 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 1 1 2 0 1 0 1 2 0 0 0 2 3 1 0 1 0 1 0 1 0 0 0 1 1 0 3 1 1

Readme

Source
raw.​githubusercontent.​com

LLVM TextMate Bundle

This is a TextMate Bundle for viewing and editing LLVM (Low Level Virtual Machine) assembly files (.ll).

Installation

For background on installing TextMate Bundles read Installing a Bundle.

Install Location

If you plan on making changes to the Bundle that you want me to pickup, you must install in a different location than you would typically install TextMate Bundles. If you use the TextMate Bundle editor to edit a bundle in any location other than ~/Library/Application Support/TextMate/Bundles, it will create delta files which are very difficult to merge.

Normal Install

cd ~/Library/Application\ Support/TextMate/Pristine\ Copy/Bundles
git clone git@github.com:hansstimer/llvm.tmbundle.git 
osascript -e 'tell app "TextMate" to reload bundles'

Development Install

cd ~/Library/Application Support/TextMate/Bundles
git clone git@github.com:hansstimer/llvm.tmbundle.git 
osascript -e 'tell app "TextMate" to reload bundles'

Non TextMate Install

There are other editors that have some level of TextMate Bundle compatibility:

  • Sublime Text 2
  • Vico
  • VIM (with SnipMate plugin)
  • and many more

Please see the documentation for your editor as to where to put the files. Not all Bundle features will work with all editors, however most editors support TextMate snippet files now days.

Use

These are the snippets implemented:

Instruction Short Cut
alloca alloca
branch conditionally br
branch unconditionally bru
call call
def def
getelementptr getelementptr
hello world program hello
icmp icmp
load load
ret ret
store store

The syntax highlighting is basic, but it is enough to help clarify the elements of an LLVM file.

Contributing to LLVM.tmbundle

I'm happy to merge any fixes/additions people might have.

A word of caution on making changes outside the TextMate Bundle editor; you must make sure you create a new UUID for each new file you add to the bundle. TextMate uses the UUID to provide for a kind of inheritance and to support name changes. Most other editors which use the same files don't care about the UUIDs, but non unique UUIDs will break TextMate.

Each file contains a UUID that can not be replicated in any other file in any other Bundle. The TextMate Bundle editor will take care of this for you automatically, but if you use a text editor you will need to generate a new UUID for each new item you add to the bundle i.e. a new snippet. You can create a new UUID with uuidgen.