Command line parameters

Usage:

  • cudatext [ key … ] filename …

Supported keys:

  • -h, —help - Show command line help and exit
  • -v, —version - Show application version and exit
  • -z=[text|binary|hex|unicode] - Open files from command line in internal viewer, using given viewer mode
  • -r - Open files from command line in read-only mode
  • -e=value - Open all files from command line in given encoding
  • -el - Show possible encoding names and exit
  • -n - Ignore option "ui_one_instance", and force new app window
  • -nh - Ignore saved file history (caret, selection, scroll position)
  • -ns - Ignore saved session
  • -w=left,top,width,height - Set position/size of window (up to 4 numbers should be specified, any can be skipped to keep previous value)
  • -i - Read the contents of stdin to a new document (Unix only), can be used in Unix shell like: "ls -l | cudatext -i"

Notes:

  • Filenames can be with ":line" or ":line:column" suffix to place caret.
  • Folders can be specified too. They will be opened as a "project" in the Project Manager.
  • Project files (.cuda-proj) can be loaded.
  • Session files (.cuda-session) can be loaded, if Session Manager installed.
  • Non-existing file name can be specified, program will ask to create it.

macOS

On macOS you cannot run "cudatext", but you can open Terminal and create the alias for "cudatext":

  1. alias cudatext=open\ /Applications/CudaText.app\ --args

This allows to open in Terminal commands like "cudatext ~/filename.html".