Friday, September 22, 2017

Change LiteIDE file type tab spacing

LiteIDE is a nice IDE for developing golang program, but there is one thing which made me cringing. The tab is most default to 4 spaces, but in some situation, you do not want it to be 4 spaces, but 2. To change that, you will need to find this file liteeditor.xml from this directory /Applications/LiteIDE.app/Contents/Resources/liteapp/mimetype, then make changes to that file to add your new type for example jinja2 template file. You can simply add the extention like *.j2 to one of the existing entries just like this one:

<glob pattern="*.j2"/>

Then you can open up LiteIDE and change the tab space to 2 or whatever number you desire.

Tuesday, September 19, 2017

Only get git repository file without any git metadata

1. Do a git pull to get latest from the repo
2. Run the following command to get the latest code into /var/tmp/junk directory

git archive --format=tar --prefix=junk/ HEAD | (cd /var/tmp/ && tar xf -)