queries
bash.scm c.scm cpp.scm css.scm dockerfile.scm go.scm html.scm javascript.scm lua.scm markdown.scm php.scm python.scm sql.scm tsx.scm typescript.scmsamples
format.txt lsp.c ollama.py test.c test.cpp test.css test.dockerfile test.html test.js test.lua test.md test.php test.py test.rb test.sh test.sql test.ts test.tsxvendor
github.com
mitjafelicijan
go-tree-sitter
.gitignore LICENSE Makefile README.md alloc.c alloc.h api.h array.h atomic.h bindings.c bindings.go bindings.h bits.h clock.h error_costs.h get_changed_ranges.c get_changed_ranges.h host.h iter.go language.c language.h length.h lexer.c lexer.h node.c parser.c parser.h point.h ptypes.h query.c reduce_action.h reusable_node.h stack.c stack.h subtree.c subtree.h test_grammar.go test_grammar.js test_grammar_generate.sh tree.c tree.h tree_cursor.c tree_cursor.h umachine.h unicode.h urename.h utf.h utf16.h utf8.h wasm_store.c wasm_store.hnsf
termbox-go
AUTHORS LICENSE README.md api.go api_common.go api_windows.go collect_terminfo.py escwait.go escwait_darwin.go syscalls_darwin.go syscalls_darwin_amd64.go syscalls_dragonfly.go syscalls_freebsd.go syscalls_linux.go syscalls_netbsd.go syscalls_openbsd.go syscalls_windows.go termbox.go termbox_common.go termbox_windows.go terminfo.go terminfo_builtin.go
DOCS.md
raw
1# QWE Editor Documentation
2
3QWE is a modal text editor written in Go.
4
5## Modes
6
7- **Normal**: Navigation and text manipulation (default).
8- **Insert**: Text entry.
9- **Visual**: Character-wise selection.
10- **Visual Line**: Line-wise selection.
11- **Visual Block**: Rectangular block selection.
12- **Command**: Colon commands (`:`).
13- **Find**: Incremental search (`/`).
14- **Fuzzy**: File/buffer switching.
15- **Replace**: Pattern replacement.
16- **Confirm**: Action confirmation.
17
18## Keybindings
19
20### Navigation (Normal Mode)
21
22| Key | Action |
23|-----|--------|
24| `Arrows` | Move cursor |
25| `w` / `q` | Next / Previous word |
26| `Q` / `W` | Line start / End |
27| `{` / `}` | Top / Bottom of file |
28| `[` / `]` | Previous / Next empty line |
29| `Ctrl+O` / `Ctrl+I` | Jump history back / forward |
30| `Ctrl+N` / `Ctrl+P` | Next / Previous buffer |
31| `zz` | Center screen |
32
33### Editing (Normal Mode)
34
35| Key | Action |
36|-----|--------|
37| `i` / `I` | Insert (before cursor / start of line) |
38| `a` / `A` | Append (after cursor / end of line) |
39| `o` / `O` | Open new line (below / above) |
40| `x` | Delete character |
41| `dd` | Delete line |
42| `D` | Delete to end of line |
43| `cw` | Change word |
44| `C` | Change to end of line |
45| `cc` / `s` | Change character |
46| `y` | Yank current line |
47| `p` / `P` | Paste (below / above) |
48| `u` / `U` | Undo / Redo |
49| `zx` | Toggle comment |
50| `zq` | Format text (80 char wrap) |
51| `J` | Join lines |
52| `Alt+Up/Down` | Move lines up / down |
53| `Alt+Left/Right`| Unindent / Indent |
54| `Ctrl+A` / `Ctrl+Z`| Increment / Decrement number |
55| `c(`, `d[`, etc. | Change / Delete inside delimiters |
56
57### Visual Mode
58
59| Key | Action |
60|-----|--------|
61| `v` / `V` / `Ctrl+V` | Enter Visual / Visual Line / Visual Block |
62| `y` / `d` / `x` | Yank / Delete selection |
63| `c` / `p` | Change / Paste selection |
64| `zx` / `zq` | Comment / Format selection |
65| `~` | Toggle case |
66| `o` | Swap cursor and selection anchor |
67| `R` | Enter Range Replace mode |
68| `Leader+o` | Ollama AI Code Completion |
69
70### Multi-cursor
71
72| Key | Action |
73|-----|--------|
74| `Ctrl+X` | Add cursor at next word match |
75| `Ctrl+Up/Down` | Add cursor above / below |
76| `Esc` | Clear secondary cursors |
77
78### Search & Find
79
80| Key | Action |
81|-----|--------|
82| `/` | Start search |
83| `n` / `N` | Next / Previous result |
84| `Leader+p` | Find Files |
85| `Leader+b` | Find Buffers |
86| `Leader+w` | Find Warnings (Diagnostics) |
87| `Leader+m` | Find Bookmarks |
88| `Leader+q` | Clear Highlighting |
89
90### LSP & Features
91
92| Key | Action |
93|-----|--------|
94| `gd` | Go to Definition |
95| `gf` | Go to File |
96| `Ctrl+K` | Show Hover Information |
97| `Ctrl+N` (Insert) | Trigger Autocomplete |
98| `F1` - `F5` | Goto Bookmark 1-5 |
99| `Leader+F1-F5` | Set Bookmark 1-5 |
100| `Leader+d` | Delete current buffer |
101| `Leader+l` | Toggle debug window |
102
103## Commands (:)
104
105| Command | Action |
106|---------|--------|
107| `:w [file]` | Save buffer |
108| `:wa` | Save all buffers |
109| `:q` / `:q!` | Quit (force) |
110| `:wq` | Save and quit |
111| `:waq` | Save all and quit |
112| `:bd` / `:bd!` | Close buffer (force) |
113| `:n` | New buffer |
114| `:e <file>` | Open file |
115| `:reload` | Reload from disk |
116| `:help` | Show help |
117| `:mouse` | Toggle mouse support |
118| `:debug` | Toggle debug window |
119| `:!cmd` | Run shell command |
120| `:r!cmd` | Run shell command and insert output |
121| `:<number>` | Jump to line |
122
123## Technical Features
124
125### Language Server Protocol (LSP)
126Supports Hover, Autocomplete, Diagnostics, and Go to Definition via JSON-RPC. Default servers: `gopls` (Go), `clangd` (C/C++), `typescript-language-server` (JS/TS), `pyright-langserver` (Python).
127
128### AI Integration
129Local completion via Ollama API. Triggered with `Leader+o` on visual selection.
130
131### Tree-sitter
132Syntax highlighting via Tree-sitter. Supported: Go, C, C++, JS/TS, Python, Bash, CSS, PHP, SQL, Markdown, Dockerfile.
133
134### Multi-cursor
135Simultaneous editing with multiple cursors. Supports vertical and pattern-based cursor addition.
136
137### Range Replacement
138Triggered with `R` in visual mode. Syntax: `/pattern/replacement/flags`. Supports regex and `g`/`i` flags.