Skip to content

Latest commit

 

History

History
124 lines (86 loc) · 4.23 KB

File metadata and controls

124 lines (86 loc) · 4.23 KB

Issue tracker for Hackerman Text

FAQ

How to setup code completion

Ollama

  1. Install Ollama, and download one of the recommended models (e.g. https://ollama.com/library/qwen2.5-coder)
  2. Update your .hackerman config file (Right-Click or Cmd + Shift + P to open function explorer, then select Open Config File)
  3. Find and edit this section:
    [models]
    
    -- ollama
    code_completion                     ollama, qwen2.5-coder:1.5b
        
  4. Code completion can be triggered with Code Completion (or Cmd + K)

Mistral

  1. Create Mistral account, and get your api key (see https://docs.mistral.ai/getting-started/quickstart)
  2. Update your .hackerman config file (Right-Click or Cmd + Shift + P to open function explorer, then select Open Config File)
  3. Find and edit this section (replace API_KEY with your Mistral api key):
    [models]
    
    -- cloud providers
    code_completion                     mistral, codestral-latest, API_KEY
        
  4. Code completion can be triggered with Code Completion (or Cmd + K)

Inception

  1. Create Inception account, and get your api key (see https://docs.inceptionlabs.ai/get-started/authentication)
  2. Update your .hackerman config file (Right-Click or Cmd + Shift + P to open function explorer, then select Open Config File)
  3. Find and edit this section (replace API_KEY with your Inception api key):
    [models]
    
    -- cloud providers
    code_completion                     inception, mercury-coder, API_KEY
        
  4. Code completion can be triggered with Code Completion (or Cmd + K)

How to use inline commands

Inline commands can be triggered with Inline Commands (or Cmd + Shift + Return).

Shell and Python eval

This feature is only allowed in .txt and .md files by default. You can change allowed files in your .hackerman config file.

% echo 'hello'
hello
42**42
150130937545296572356771972164254457814047970568738777235893533016064

Org-mode code execution

You an execute Python, Lua, JavaScript, and Hy code in your .org files. Move cursor inside code block and run Inline Commands (or Cmd + Shift + Return).

(defn main [name]
    (print "Welcome to Hy in org-mode," name "!")
)
(main name)
#+RESULTS: True
: Welcome to Hy in org-mode, Michael !

How to use custom scripts

This feature is disabled by default. You can enable in your .hackerman config file.

scripts_enabled                     true
allow_unsafe_scripts                false -- allow imports

Scripts are loaded from .../Application Support/Hackerman Text/.hackerman-scripts. You can provide a path to your own .py file if stored elsewhere.

path_to_scripts_file                path/to/plugins.py -- path to scripts file, requires restart

Other and misc

  • Right click to Show Function Explorer (or Cmd + Shift + P), this list shows all active key bindings
  • Double click on line number to Fold Line (or Cmd + L)
  • Double click on word to select, Cmd plus double click on another word to add to selection
  • Select text then Select Next Match (or Cmd + E) to select next exact match, Unselect Next Match (or Cmd + Shift + E) to unselect last added match
  • Find with Find In File (or Cmd + F), Esc, then Select Matches to select/add cursor to each match
  • Select brace to highlight open and/or close brace (on-demand brace match)
  • If not working out of projects (e.g. dropped folder on editor), Show File Explorer (or Cmd + P) to open file epxplorer, then type e.g. hackerman/ to quickly find files in specific folders