1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
# vimb - the vim like browser
This is the development branch for the new webkit2 port of vimb. This branch
does not work and lags a lot of features of the webkit1 version of vimb. So
this is only meant to be the playground for the developers at the moment.
If you like to have a working vimb, please use the master branch.
## Patching and Coding style
### File Layout
- Comment with LICENSE and possibly short explanation of file/tool
- Headers
- Macros
- Types
- Function declarations
- Include variable names
- For short files these can be left out
- Group/order in logical manner
- Global variables
- Function definitions in same order as declarations
- main
### C Features
- Do not mix declarations and code
- Do not use for loop initial declarations
- Use `/* */` for comments, not `//`
### Headers
- Place system/libc headers first in alphabetical order
- If headers must be included in a specific order comment to explain
- Place local headers after an empty line
### Variables
- Global variables not used outside translation unit should be declared static
- In declaration of pointers the `*` is adjacent to variable name, not type
### Indentation
- the code is indented by 4 spaces - if you use vim to code you can set
`:set expandtab ts=4 sts=4 sw=4`
- it's a good advice to orientate on the already available code
- if you are using `indent`, following options describe best the code style
- `--k-and-r-style`
- `--case-indentation4`
- `--dont-break-function-decl-args`
- `--dont-break-procedure-type`
- `--dont-line-up-parentheses`
- `--no-tabs`
## directories
├── doc documentation like manual page
└── src all sources to build vimb
├── scripts JavaScripts that are compiled in for various purposes
└── webextension Source files for the webextension
## dependencies
- webkit2gtk-4.0 >= 2.3.5
## compile and run
To inform vimb during compile time where the webextension should be loaded
from, the `RUNPREFIX` option can be set to a full qualified path to the
directory where the extension should be stored in.
To run vimb without installation you could run as a sandbox like this
make runsandbox
This will compile and install vimb into the local _sandbox_ folder in the
project directory.
## Tasks
1. general infrastructure and built
- [x] write make file
- [x] allow to built as sandbox for local testing
- [x] add a way to specify the target of the webextension shared objects
this is now available with the `RUNPREFIX` option for the make
- [x] establish communication channel between the vimb instance and the now
required webextension (dbus)
- [x] use propper authorization for dbus peers
- [ ] queue settings that needs to be pushed to the webextension until the
dbus connection is established.
2. migrate as many of the features of the webkit1 vimb
- [x] starting with custom config file `--config,-c` option
- [ ] running multiple ex-commands during startup `--cmd,-C` options
- [ ] starting with a named profile `--profile,-p` option
- [ ] xembed `--embed,-e` option
- [ ] socket support `--socket,-s` and `--dump,-d` option to print the actual
used socket path to stdout
- [ ] kiosk-mode `--kiosk,-k`
- [ ] allow to start vimb reading html from `stdin` by `vimb -`
- [ ] browser modes normal, input, command, pass-through and hintmode
- [x] download support
- [ ] editor command
- [ ] external downloader
- [ ] hinting
- [x] searching and matching of search results
- [x] navigation j, k, h, l, ...
- [ ] history and history lookup
- [ ] completion
- [ ] HSTS
- [ ] auto-response-header
- [x] cookies support
- [x] register support and `:register` command
- [ ] read it later queue
- [ ] show scroll indicator in statusbar as top, x%, bottom or all
how can we get this information from webview easily?
- [x] find a way to disable the scrollbars on the main frame
Can be achieved by `document.documentElement.style.overflow =
'hidden';` in _scripts.js_
- [ ] page marks - maybe we change make them global (shared between
instances and to work also if the page was reloaded or changed like
the marks in vim)
- [x] zooming
- [x] default zoom
- [x] yanking
- [x] keymapping
- [ ] URL handler
- [x] shortcuts
- [ ] autocommands and augroups
3. documentation
4. testing
- [ ] write automatic test to the essential main features
- [ ] adapt the manual test cases and add some more to avoid regressions
before a release
- [ ] write new test cases for essential things like mode switching of vimb
when clicking form fields or tabbing over them.
5. new features and changed behaviour
- [ ] try to use the webkit2 feature of running multiple pages with related
view instance `webkit_web_view_new_with_related_view`
- [ ] allow setting of different scopes, global and instance (new feature)
- [x] remove the settings related to the gui like `status-color-bg` this was
only a hack and is not recommended for new gtk3 applications. the
color and font settings should be setup by css instead.
- [ ] webkit2 does not provide the view mode `source` so maybe this is going
to be removed together with the `gf` keybinding or we find a simple
workaround for this
# license
Information about the license are found in the file LICENSE.
|