Buckets:
| --- | |
| title: Prečice tipki | |
| description: Prilagodite svoje veze tipki. | |
| --- | |
| OpenCode ima listu veza tipki koje možete prilagoditi putem `tui.json`. | |
| ```json title="tui.json" | |
| { | |
| "$schema": "https://opencode.ai/tui.json", | |
| "keybinds": { | |
| "leader": "ctrl+x", | |
| "app_exit": "ctrl+c,ctrl+d,<leader>q", | |
| "editor_open": "<leader>e", | |
| "theme_list": "<leader>t", | |
| "sidebar_toggle": "<leader>b", | |
| "scrollbar_toggle": "none", | |
| "username_toggle": "none", | |
| "status_view": "<leader>s", | |
| "tool_details": "none", | |
| "session_export": "<leader>x", | |
| "session_new": "<leader>n", | |
| "session_list": "<leader>l", | |
| "session_timeline": "<leader>g", | |
| "session_fork": "none", | |
| "session_rename": "none", | |
| "session_share": "none", | |
| "session_unshare": "none", | |
| "session_interrupt": "escape", | |
| "session_compact": "<leader>c", | |
| "session_child_first": "<leader>down", | |
| "session_child_cycle": "<leader>right", | |
| "session_child_cycle_reverse": "<leader>left", | |
| "session_parent": "<leader>up", | |
| "messages_page_up": "pageup,ctrl+alt+b", | |
| "messages_page_down": "pagedown,ctrl+alt+f", | |
| "messages_line_up": "ctrl+alt+y", | |
| "messages_line_down": "ctrl+alt+e", | |
| "messages_half_page_up": "ctrl+alt+u", | |
| "messages_half_page_down": "ctrl+alt+d", | |
| "messages_first": "ctrl+g,home", | |
| "messages_last": "ctrl+alt+g,end", | |
| "messages_next": "none", | |
| "messages_previous": "none", | |
| "messages_copy": "<leader>y", | |
| "messages_undo": "<leader>u", | |
| "messages_redo": "<leader>r", | |
| "messages_last_user": "none", | |
| "messages_toggle_conceal": "<leader>h", | |
| "model_list": "<leader>m", | |
| "model_cycle_recent": "f2", | |
| "model_cycle_recent_reverse": "shift+f2", | |
| "model_cycle_favorite": "none", | |
| "model_cycle_favorite_reverse": "none", | |
| "variant_cycle": "ctrl+t", | |
| "variant_list": "none", | |
| "command_list": "ctrl+p", | |
| "agent_list": "<leader>a", | |
| "agent_cycle": "tab", | |
| "agent_cycle_reverse": "shift+tab", | |
| "input_clear": "ctrl+c", | |
| "input_paste": "ctrl+v", | |
| "input_submit": "return", | |
| "input_newline": "shift+return,ctrl+return,alt+return,ctrl+j", | |
| "input_move_left": "left,ctrl+b", | |
| "input_move_right": "right,ctrl+f", | |
| "input_move_up": "up", | |
| "input_move_down": "down", | |
| "input_select_left": "shift+left", | |
| "input_select_right": "shift+right", | |
| "input_select_up": "shift+up", | |
| "input_select_down": "shift+down", | |
| "input_line_home": "ctrl+a", | |
| "input_line_end": "ctrl+e", | |
| "input_select_line_home": "ctrl+shift+a", | |
| "input_select_line_end": "ctrl+shift+e", | |
| "input_visual_line_home": "alt+a", | |
| "input_visual_line_end": "alt+e", | |
| "input_select_visual_line_home": "alt+shift+a", | |
| "input_select_visual_line_end": "alt+shift+e", | |
| "input_buffer_home": "home", | |
| "input_buffer_end": "end", | |
| "input_select_buffer_home": "shift+home", | |
| "input_select_buffer_end": "shift+end", | |
| "input_delete_line": "ctrl+shift+d", | |
| "input_delete_to_line_end": "ctrl+k", | |
| "input_delete_to_line_start": "ctrl+u", | |
| "input_backspace": "backspace,shift+backspace", | |
| "input_delete": "ctrl+d,delete,shift+delete", | |
| "input_undo": "ctrl+-,super+z", | |
| "input_redo": "ctrl+.,super+shift+z", | |
| "input_word_forward": "alt+f,alt+right,ctrl+right", | |
| "input_word_backward": "alt+b,alt+left,ctrl+left", | |
| "input_select_word_forward": "alt+shift+f,alt+shift+right", | |
| "input_select_word_backward": "alt+shift+b,alt+shift+left", | |
| "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete", | |
| "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace", | |
| "history_previous": "up", | |
| "history_next": "down", | |
| "terminal_suspend": "ctrl+z", | |
| "terminal_title_toggle": "none", | |
| "tips_toggle": "<leader>h", | |
| "display_thinking": "none" | |
| } | |
| } | |
| ``` | |
| --- | |
| ## Leader tipka | |
| OpenCode koristi `leader` (vodeću) tipku za većinu povezivanja tipki. Ovo izbjegava sukobe u vašem terminalu. | |
| Prema zadanim postavkama, `ctrl+x` je vodeća tipka i većina radnji zahtijeva da prvo pritisnete vodeću tipku, a zatim i prečicu. Na primjer, da biste započeli novu sesiju, prvo pritisnite `ctrl+x`, a zatim pritisnite `n`. | |
| Ne morate koristiti vodeću tipku za svoje veze tipki, ali preporučujemo da to učinite. | |
| --- | |
| ## Onemogućavanje prečica tipki | |
| Možete onemogućiti spajanje tipki dodavanjem ključa u `tui.json` s vrijednošću "none". | |
| ```json title="tui.json" | |
| { | |
| "$schema": "https://opencode.ai/tui.json", | |
| "keybinds": { | |
| "session_compact": "none" | |
| } | |
| } | |
| ``` | |
| --- | |
| ## Prečice za radnu površinu | |
| Unos prompta aplikacije OpenCode za desktop podržava uobičajene prečice u stilu Readline/Emacs za uređivanje teksta. One su ugrađene i trenutno se ne mogu konfigurirati putem `opencode.json`. | |
| | Prečica | Akcija | | |
| | -------- | ------------------------------------------------ | | |
| | `ctrl+a` | Prelazak na početak trenutnog reda | | |
| | `ctrl+e` | Prelazak na kraj trenutnog reda | | |
| | `ctrl+b` | Pomjeri kursor za jedan znak unazad | | |
| | `ctrl+f` | Pomicanje kursora naprijed za jedan znak | | |
| | `alt+b` | Pomjeri kursor za jednu riječ unazad | | |
| | `alt+f` | Pomjeri kursor za jednu riječ unaprijed | | |
| | `ctrl+d` | Izbriši znak ispod kursora | | |
| | `ctrl+k` | Kill do kraja reda | | |
| | `ctrl+u` | Kill do početka reda | | |
| | `ctrl+w` | Kill prethodnu riječ | | |
| | `alt+d` | Kill sljedeću riječ | | |
| | `ctrl+t` | Transponirajte znakove | | |
| | `ctrl+g` | Otkaži iskakanje / poništi odgovor na pokretanje | | |
| --- | |
| ## Shift+Enter | |
| Neki terminali ne šalju modifikatorske tipke sa Enter prema zadanim postavkama. Možda ćete trebati konfigurirati svoj terminal da pošalje `Shift+Enter` kao escape sekvencu. | |
| ### Windows Terminal | |
| Otvorite svoj `settings.json` na: | |
| ``` | |
| %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json | |
| ``` | |
| Dodajte ovo u niz korijenskog nivoa `actions`: | |
| ```json | |
| "actions": [ | |
| { | |
| "command": { | |
| "action": "sendInput", | |
| "input": "\u001b[13;2u" | |
| }, | |
| "id": "User.sendInput.ShiftEnterCustom" | |
| } | |
| ] | |
| ``` | |
| Dodajte ovo u niz korijenskog nivoa `keybindings`: | |
| ```json | |
| "keybindings": [ | |
| { | |
| "keys": "shift+enter", | |
| "id": "User.sendInput.ShiftEnterCustom" | |
| } | |
| ] | |
| ``` | |
| Sačuvajte datoteku i ponovo pokrenite Windows Terminal ili otvorite novu karticu. | |
Xet Storage Details
- Size:
- 6.53 kB
- Xet hash:
- 100712ee60930eb46b8b15bd6b855b5440f50d6143ad088e8865f820817f05f8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.