Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usage: add startup commands section #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ laptop doesn't have a three button mouse.
Words that are selected or clicked on can be "executed" to control the editor, either by
selecting the word and then pressing the Enter key, or by clicking with the middle mouse button.
(When executing with the keyboard, it will first check if the file exists and open it if applicable,
similarly to searching with the mouse.) See COMMANDS.md for a list of built in commands.
similarly to searching with the mouse.)

For details about all built in commands, see COMMANDS.md.

If executing a point in a word instead of a selection, that word will be executed.

Expand All @@ -155,8 +157,6 @@ filename there is only for reference, and updated when a new file is opened if t
happens to be a prefix. There is currently no way to change the filename and save the file to another
name.

For details about all available commands, see COMMANDS.md.

When the word (or selection) isn't an internal plugin command (generally commands with a capital first
letter by convention, although that's not enforced), de will try to execute the shell command selected
and pass the selected text (or the whole file if nothing is selected) to the processes's STDIN.
Expand All @@ -174,3 +174,8 @@ the return code, and insert the output even if the process reports an error.

Finally, the scripts directory contains some wrapper scripts that may be useful to put in your path
and execute from the tagline.

## Startup Commands

At startup, de will run any Commands in `~/.de/startup`. At the moment, this is
probably only useful for setting **TermWidth**.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually use mine for both TermWidth and WarnAlpha (to compensate for the fact that the shade of red is different between my Mac at work and my Linux machine at home. I think the Mac does gamma correction and X doesn't..)

Theoretically, you could also use it to do some kind of shell command to do pre-processing before displaying a file (ie. you can add |gofmt to automatically have gofmt applied to any file you open, but you probably don't want to just in case you're opening something other than a go file..)