rxi / lite

A lightweight text editor written in Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How is lite meant to be used?

trevortomesh opened this issue · comments

odd question -- but I cannot seem to get lite to open a directory that is not the directory it is currently sitting in (ubuntu linux -- I just downloaded the pre-built file folder).

So -- are you meant to have a decentralized version of lite in each project that you are working on? If so, that's cool.

Never mind... I figured it out. Stupid question.

commented

The way I use lite is by copying the executable and it's data folder into my /bin folder. That way I can use it like any other commands, when I want to open a project I simply fire up a terminal and type the good old lite path/to/project/.

That could caused clashes with other things, especially the data folder, on some systems, though, so you could place it in your documents folder and add that folder to your %PATH variable. Note that on Unix this will have to be automated on startup, there's a couple of ways to do this, Google a couple for your specific system.

When I do that I get:

Error: [string "local core..."]:8: module 'core' not found:
no field package.preload['core']
no file '/usr/bin/data/core/init.lua'
no file '/usr/bin/data/core.lua'
no file '/usr/local/share/lua/5.2/core.lua'
no file '/usr/local/share/lua/5.2/core/init.lua'
no file '/usr/local/lib/lua/5.2/core.lua'
no file '/usr/local/lib/lua/5.2/core/init.lua'
no file './core.lua'
no file '/usr/local/lib/lua/5.2/core.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './core.so'
stack traceback:
[C]: in function 'require'
[string "local core..."]:8: in function <[string "local core..."]:2>
[C]: in function 'xpcall'
[string "local core..."]:2: in main chunk

I create a symlink in the bin folder to the lite folder. Then have a script with rofi in dmenu mode to create a "project launcher". And have the script with rofi bind to a shortcut in the keyboard.

commented

When I do that I get:

Error: [string "local core..."]:8: module 'core' not found:
no field package.preload['core']
no file '/usr/bin/data/core/init.lua'
no file '/usr/bin/data/core.lua'
no file '/usr/local/share/lua/5.2/core.lua'
no file '/usr/local/share/lua/5.2/core/init.lua'
no file '/usr/local/lib/lua/5.2/core.lua'
no file '/usr/local/lib/lua/5.2/core/init.lua'
no file './core.lua'
no file '/usr/local/lib/lua/5.2/core.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './core.so'
stack traceback:
[C]: in function 'require'
[string "local core..."]:8: in function <[string "local core..."]:2>
[C]: in function 'xpcall'
[string "local core..."]:2: in main chunk

You probably forgot to copy the data folder. It has to be in the same location as the executable.