Supported File Types
This content is for the 1.0.0 version. Switch to the latest version for up-to-date documentation.
This page lists how PocketCmd treats a file you open from the SFTP browser or a workspace: which files open in the code editor, which languages it highlights and which files go to the preview. The same rules apply in both places.
Syntax highlighting
Section titled “Syntax highlighting”The editor picks a language from the file name, case-insensitively. There is no manual language selector. A file that opens in the editor but matches nothing below is shown as plain text, so the editor opens more file types than it highlights.
| Language | Extensions and file names |
|---|---|
| Bash, Shell, Zsh | .sh, .bash, .zsh |
| C | .c |
| C/C++ header | .h |
| C++ | .cpp, .cc, .cxx, .hpp, .hh |
| Config | .conf, .cfg (INI-style highlighting) |
| CSS | .css |
| Dart | .dart |
| Dockerfile | Dockerfile, Dockerfile.*, .dockerfile |
| Env | .env, names starting with .env. |
| Go | .go |
| HTML | .html, .htm |
| INI | .ini |
| Java | .java |
| JavaScript | .js, .mjs, .cjs, .jsx |
| JSON | .json |
| Kotlin | .kt, .kts |
| Makefile | Makefile, GNUmakefile, .makefile, .mk |
| Markdown | .md, .markdown |
| Python | .py |
| Ruby | .rb |
| Rust | .rs |
| SQL | .sql |
| Swift | .swift |
| TOML | .toml (INI-style highlighting) |
| TypeScript | .ts, .tsx |
| XML | .xml |
| YAML | .yaml, .yml |
.txt and .log files open in the editor without highlighting. The language also sets the comment syntax for Toggle line comment.
What opens in the editor
Section titled “What opens in the editor”A file opens in the code editor unless its extension marks it as binary. Unknown extensions and names without an extension (README, .bashrc, id_rsa.pub) open in the editor too. When the editor loads a file, it checks the first 8 KiB for NUL bytes; a file that contains one is shown as Binary file and cannot be edited. UTF-16 files are exempt from that check.
| File size | Behavior |
|---|---|
| Up to 2 MB | Opens directly. |
| 2 MB to 16 MB | The editor shows the size and opens the file after you tap Load anyway. |
| Over 16 MB | Not opened. Download the file instead. |
What opens in the preview
Section titled “What opens in the preview”| Type | Extensions |
|---|---|
| Images | .jpg, .jpeg, .png, .gif, .webp, .bmp |
.pdf |
|
| Other binary files | Archives (.zip, .tar, .gz, .7z, …), documents (.docx, .xlsx, …), audio and video, executables and libraries, databases (.db, .sqlite), fonts and other image formats such as .heic or .tiff |
Binary files that cannot be previewed show their details and can be downloaded. PEM files, certificates and SVG files are text and open in the editor.
See Text Editor for editing and saving, and Workspaces for the project view.