rxi / lite

A lightweight text editor written in Lua
MIT License
7.42k stars 352 forks source link

How is lite meant to be used? #271

Closed trevortomesh closed 3 years ago

trevortomesh commented 3 years ago

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.

trevortomesh commented 3 years ago

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

quou commented 3 years ago

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.

trevortomesh commented 3 years ago

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'

[C]: in function 'xpcall'
[string "local core..."]:2: in main chunk
drmargarido commented 3 years ago

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.

quou commented 3 years ago

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'

[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.

trevortomesh commented 3 years ago

Is that allowed?

On Tue., Mar. 30, 2021, 4:15 a.m. Veridis Quo, @.***> wrote:

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'

[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.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rxi/lite/issues/271#issuecomment-810099408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASJEX6XN6SQTDCHXYVHITTTGGQC5ANCNFSM42BHIBBQ .