|
| 1 | +# Splitmark Configuration |
| 2 | + |
| 3 | +Splitmark supports user configuration through a `.splitmarkrc` file in your home directory. |
| 4 | + |
| 5 | +## Configuration File Location |
| 6 | + |
| 7 | +- **Linux/macOS**: `~/.splitmarkrc` |
| 8 | +- **Windows**: `C:\Users\YourUsername\.splitmarkrc` |
| 9 | + |
| 10 | +## Automatic Creation |
| 11 | + |
| 12 | +On first run, splitmark will automatically create a default configuration file if one doesn't exist. |
| 13 | + |
| 14 | +## Platform-Specific Default Location |
| 15 | + |
| 16 | +Splitmark automatically detects the correct Documents folder for your platform: |
| 17 | + |
| 18 | +- **Windows**: Uses PowerShell to detect your actual Documents folder (handles OneDrive redirection) |
| 19 | + - Example: `C:\Users\YourName\OneDrive\Documents\Splitmark` |
| 20 | + - Or: `C:\Users\YourName\Documents\Splitmark` (if not using OneDrive) |
| 21 | +- **macOS**: `~/Documents/Splitmark` |
| 22 | +- **Linux**: Uses XDG Documents directory or `~/Documents/Splitmark` |
| 23 | + |
| 24 | +## Default Configuration |
| 25 | + |
| 26 | +```json |
| 27 | +{ |
| 28 | + "defaultLocation": "~/Documents/Splitmark", |
| 29 | + "layout": "side", |
| 30 | + "showPreview": true, |
| 31 | + "columnWidthRatio": 75, |
| 32 | + "theme": { |
| 33 | + "editor": { |
| 34 | + "background": "#1e1e1e", |
| 35 | + "foreground": "#d4d4d4", |
| 36 | + "lineNumber": "#858585", |
| 37 | + "cursor": "#ffffff", |
| 38 | + "selection": "#264f78" |
| 39 | + }, |
| 40 | + "syntax": { |
| 41 | + "keyword": "#C586C0", |
| 42 | + "string": "#CE9178", |
| 43 | + "number": "#B5CEA8", |
| 44 | + "comment": "#6A9955", |
| 45 | + "function": "#DCDCAA", |
| 46 | + "variable": "#9CDCFE", |
| 47 | + "type": "#4EC9B0", |
| 48 | + "operator": "#D4D4D4" |
| 49 | + }, |
| 50 | + "preview": { |
| 51 | + "background": "#1e1e1e", |
| 52 | + "foreground": "#d4d4d4", |
| 53 | + "heading": "#ffffff", |
| 54 | + "link": "#3794ff", |
| 55 | + "code": { |
| 56 | + "background": "#2d2d2d", |
| 57 | + "foreground": "#d4d4d4" |
| 58 | + } |
| 59 | + } |
| 60 | + } |
| 61 | +} |
| 62 | +``` |
| 63 | + |
| 64 | +## Configuration Options |
| 65 | + |
| 66 | +### `defaultLocation` |
| 67 | +- **Type**: String (file path) |
| 68 | +- **Default**: `~/Documents/Splitmark` |
| 69 | +- **Description**: Default directory for saving markdown files when no path is specified |
| 70 | + |
| 71 | +### `layout` |
| 72 | +- **Type**: String |
| 73 | +- **Values**: `"side"` or `"bottom"` |
| 74 | +- **Default**: `"side"` |
| 75 | +- **Description**: Default preview layout (side-by-side or top-bottom) |
| 76 | + |
| 77 | +### `showPreview` |
| 78 | +- **Type**: Boolean |
| 79 | +- **Default**: `true` |
| 80 | +- **Description**: Whether to show the preview pane by default |
| 81 | + |
| 82 | +### `columnWidthRatio` |
| 83 | +- **Type**: Number |
| 84 | +- **Values**: `25`, `50`, or `75` |
| 85 | +- **Default**: `75` |
| 86 | +- **Description**: Editor width percentage in side-by-side layout (75%, 50%, or 25%) |
| 87 | + |
| 88 | +### `theme` |
| 89 | +- **Type**: Object |
| 90 | +- **Description**: Color theme settings for editor, syntax highlighting, and preview |
| 91 | +- **Note**: Currently uses VSCode Dark+ theme colors by default |
| 92 | + |
| 93 | +## File Path Resolution |
| 94 | + |
| 95 | +Splitmark intelligently resolves file paths based on your configuration: |
| 96 | + |
| 97 | +### Simple Filename |
| 98 | +```bash |
| 99 | +splitmark notes.md |
| 100 | +# Creates: ~/Documents/Splitmark/notes.md |
| 101 | +``` |
| 102 | + |
| 103 | +### Folder + Filename |
| 104 | +```bash |
| 105 | +splitmark projects/myapp/README.md |
| 106 | +# Creates: ~/Documents/Splitmark/projects/myapp/README.md |
| 107 | +# Automatically creates folders if they don't exist |
| 108 | +``` |
| 109 | + |
| 110 | +### Relative Paths (Current Directory) |
| 111 | +```bash |
| 112 | +splitmark ./local.md |
| 113 | +# Uses current directory, not default location |
| 114 | +``` |
| 115 | + |
| 116 | +### Relative Paths (Parent Directory) |
| 117 | +```bash |
| 118 | +splitmark ../parent.md |
| 119 | +# Uses parent directory, not default location |
| 120 | +``` |
| 121 | + |
| 122 | +### Absolute Paths |
| 123 | +```bash |
| 124 | +splitmark /absolute/path/to/file.md |
| 125 | +# Uses exact path specified |
| 126 | +``` |
| 127 | + |
| 128 | +## CLI Option Overrides |
| 129 | + |
| 130 | +Command-line options override configuration file settings: |
| 131 | + |
| 132 | +```bash |
| 133 | +# Override layout |
| 134 | +splitmark file.md --layout bottom |
| 135 | + |
| 136 | +# Disable preview |
| 137 | +splitmark file.md --no-preview |
| 138 | +``` |
| 139 | + |
| 140 | +## Example Workflows |
| 141 | + |
| 142 | +### Personal Notes |
| 143 | +```bash |
| 144 | +# Quick note - saved to ~/Documents/Splitmark/ |
| 145 | +splitmark quick-note.md |
| 146 | + |
| 147 | +# Organized notes |
| 148 | +splitmark meetings/2024-01-15.md |
| 149 | +splitmark ideas/project-alpha.md |
| 150 | +``` |
| 151 | + |
| 152 | +### Project Documentation |
| 153 | +```bash |
| 154 | +# Change default location in config |
| 155 | +{ |
| 156 | + "defaultLocation": "~/projects/docs" |
| 157 | +} |
| 158 | + |
| 159 | +# Now all files go to ~/projects/docs by default |
| 160 | +splitmark api.md # ~/projects/docs/api.md |
| 161 | +splitmark guides/setup.md # ~/projects/docs/guides/setup.md |
| 162 | +``` |
| 163 | + |
| 164 | +## Customizing Your Config |
| 165 | + |
| 166 | +Edit `~/.splitmarkrc` with your preferred settings: |
| 167 | + |
| 168 | +```json |
| 169 | +{ |
| 170 | + "defaultLocation": "/path/to/your/notes", |
| 171 | + "layout": "bottom", |
| 172 | + "showPreview": true, |
| 173 | + "columnWidthRatio": 50 |
| 174 | +} |
| 175 | +``` |
| 176 | + |
| 177 | +Changes take effect the next time you launch splitmark. |
0 commit comments