vlang / ved Goto Github PK
View Code? Open in Web Editor NEW1 MB text editor written in V with hardware accelerated text rendering. Compiles in <1s.
License: GNU General Public License v3.0
1 MB text editor written in V with hardware accelerated text rendering. Compiles in <1s.
License: GNU General Public License v3.0
Vid segfaults whenever trying to open a folder with it, no matter how many files there are in that actual folder
Output :
infrandomness@ir-pc vid]$ ./vid lolz/
['./vid', 'lolz/']
PATH="lolz/" cur_dir="/home/infrandomness/sources/vid"
load session "/home/infrandomness/.vid/session"
['lolz/1', '', '']
Segmentation fault (core dumped)
Environment :
OS : Fedora 32 (Thirty Two) with kernel 5.6.13-300.fc32.x86_64
V version : 0.1.27 4af4a8f
Vid version : ad1b74e
(Just tell me if you need more logs or more informations about my environment)
When trying to open a file with vid
it fails to open a file due to os.home_dir()
appending a path separator, while the constants prepend the same separator. This results in a path such as $home//.vid/tasks
-- note the double //
.
I would typically not expect a home_dir()
function to append the trailing path separator, but I realize that is a decision in the language itself to indicate a folder. Either way, vid
, or on a more tedious level os
, should probably be updated.
I think the C libnvim library should be used.
This will save a lot of time.
I realized that implementing all Vim's commands, undo, terminal emulation etc is too hard and an unnecessary re-invention of the wheel :)
The README says "vid is an open source editor" but there is no source in the repository
V 0.1.23 320174b
When use dd
delete.
./vid
create window wnd=0xc2ddd0 ptr==0xc2d160
Trying to load font from RobotoMono-Regular.ttf
new gg text context vao=3
timer.load_tasks()
["./vid"]
add_workspace("/home/server/work/vid")
load session "/home/server/.vid/session"
V panic: array.delete: index out of range (i == 1, a.len == 1)
| 0x41e3cf | ./vid()
| 0x41d336 | ./vid()
| 0x43c59f | ./vid()
| 0x437bc8 | ./vid()
| 0x436c89 | ./vid()
| 0x7fa38055d9ea | /usr/lib/x86_64-linux-gnu/libglfw.so.3(+0xd9ea)
| 0x42ca72 | ./vid()
| 0x434e37 | ./vid()
| 0x43ff7e | ./vid()
| 0x7fa37f7d2830 | /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)
| 0x403079 | ./vid()
I use Dvorak keyboard layout, and it seems vid is unable to recognize it. Just to let you know.
Awesome works 👍
$ v.
/home/Henrixounez/perso/v/vid/vid.v:613:53: undefined: `GLFW_KEY_R`
Command git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries [path to v repo]/thirdparty/freetype/
was executed (of course instead of "[path to v repo]" was inserted absolute path to v repo). Output of v:
["strings", "strconv.ftoa", "strings", "hash.wyhash", "strconv", "os", "gx", "gg", "gx", "os", "time"]
.\timer.v:25:0: error: unknown module `freetype`
v-0.1.29\v\examples\vid-master\vid-master>v run vid.v
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
vid.v:62:2: error: unknown type `View`
60 | splits_per_workspace int
61 | page_height int
62 | views []View
| ~~~~~~~~~~~~~~~~~~~~~~~
63 | cur_split int
64 | view &View
vid.v:64:2: error: unknown type `View`
62 | views []View
63 | cur_split int
64 | view &View
| ~~~~~~~~~~~~~~~~~~~~~~
65 | mode EditorMode
66 | just_switched bool // for keydown/char events to avoid dup keys
vid.v:86:2: error: unknown type `Timer`
84 | chunks []Chunk
85 | is_building bool
86 | timer Timer
| ~~~~~~~~~~~~~~~~~~~~~~
87 | task_start_unix u64
88 | cur_task string
vid.v:98:2: error: unknown type `Config`
96 | gg_lines []string
97 | gg_pos int
98 | cfg Config
| ~~~~~~~~~~~~~~~~~~~~~~~
99 | }
100 |
vid.v:173:10: error: unknown method: `Config.init_colors`
171 | }
172 | vid.handle_segfault()
173 | vid.cfg.init_colors()
| ~~~~~~~~~~~~~
174 | vid.page_height = size.height / vid.line_height - 1
175 | // TODO V keys only
vid.v:198:14: error: unknown function: new_timer
196 | })
197 | println('FULL SCREEN=${!is_window}')
198 | vid.timer = new_timer(vid.vg)
| ~~~~~~~~~~~~~~~~~
199 | vid.load_all_tasks()
200 |
vid.v:199:6: error: unknown method: `Vid.load_all_tasks`
197 | println('FULL SCREEN=${!is_window}')
198 | vid.timer = new_timer(vid.vg)
199 | vid.load_all_tasks()
| ~~~~~~~~~~~~~~~~
200 |
201 | // TODO linux and windows
vid.v:223:13: error: unknown method: `View.open_file`
221 | vid.add_workspace(workspace)
222 | vid.open_workspace(0)
223 | vid.view.open_file(path)
| ~~~~~~~~~~~~~~~
224 | }
225 | }
vid.v:306:19: error: mismatched types `void` and `void`
304 | now := time.now()
305 | // Coords
306 | y := (vid.view.y - vid.view.from) * vid.line_height + vid.line_height
| ^
307 | // Cur line
308 | line_x := split_width * (vid.cur_split - from) + vid.view.padding_left + 10
vid.v:308:73: error: mismatched types `void` and `any_int`
306 | y := (vid.view.y - vid.view.from) * vid.line_height + vid.line_height
307 | // Cur line
308 | line_x := split_width * (vid.cur_split - from) + vid.view.padding_left + 10
| ^
309 | vid.vg.draw_rect(line_x, y - 1, split_width - vid.view.padding_left - 10, vid.line_height, vid.cfg.vcolor)
310 | // V selection
vid.v:309:29: error: mismatched types `void` and `any_int`
307 | // Cur line
308 | line_x := split_width * (vid.cur_split - from) + vid.view.padding_left + 10
309 | vid.vg.draw_rect(line_x, y - 1, split_width - vid.view.padding_left - 10, vid.line_height, vid.cfg.vcolor)
| ^
310 | // V selection
311 | mut v_from := vid.view.vstart + 1
vid.v:311:32: error: mismatched types `void` and `any_int`
309 | vid.vg.draw_rect(line_x, y - 1, split_width - vid.view.padding_left - 10, vid.line_height, vid.cfg.vcolor)
310 | // V selection
311 | mut v_from := vid.view.vstart + 1
| ^
312 | mut v_to := vid.view.vend + 1
313 | if view.vend < view.vstart {
vid.v:312:28: error: mismatched types `void` and `any_int`
310 | // V selection
311 | mut v_from := vid.view.vstart + 1
312 | mut v_to := vid.view.vend + 1
| ^
313 | if view.vend < view.vstart {
314 | // Swap start and end if we go beyond the start
vid.v:315:26: error: mismatched types `void` and `any_int`
313 | if view.vend < view.vstart {
314 | // Swap start and end if we go beyond the start
315 | v_from = vid.view.vend + 1
| ^
316 | v_to = vid.view.vstart + 1
317 | }
vid.v:316:26: error: mismatched types `void` and `any_int`
314 | // Swap start and end if we go beyond the start
315 | v_from = vid.view.vend + 1
316 | v_to = vid.view.vstart + 1
| ^
317 | }
318 | for yy := v_from; yy <= v_to; yy++ {
vid.v:318:34: error: invalid operation: ++ (non-numeric type `void`)
316 | v_to = vid.view.vstart + 1
317 | }
318 | for yy := v_from; yy <= v_to; yy++ {
| ~~
319 | vid.vg.draw_rect(line_x, (yy - vid.view.from) * vid.line_height,
320 | split_width - vid.view.padding_left, vid.line_height, vid.cfg.vcolor)
vid.v:319:32: error: mismatched types `void` and `void`
317 | }
318 | for yy := v_from; yy <= v_to; yy++ {
319 | vid.vg.draw_rect(line_x, (yy - vid.view.from) * vid.line_height,
| ^
320 | split_width - vid.view.padding_left, vid.line_height, vid.cfg.vcolor)
321 | }
vid.v:323:19: error: unknown method: `View.line`
321 | }
322 | // Tab offset for cursor
323 | line := vid.view.line()
| ~~~~~~
324 | mut cursor_tab_off := 0
325 | for i := 0; i < line.len && i < vid.view.x; i++ {
vid.v:325:23: error: unknown selector expression
323 | line := vid.view.line()
324 | mut cursor_tab_off := 0
325 | for i := 0; i < line.len && i < vid.view.x; i++ {
| ~~~
326 | // if rune != '\t' {
327 | if int(line[i]) != vid.cfg.tab {
vid.v:327:17: error: type `void` does not support indexing
325 | for i := 0; i < line.len && i < vid.view.x; i++ {
326 | // if rune != '\t' {
327 | if int(line[i]) != vid.cfg.tab {
| ^
328 | break
329 | }
vid.v:340:19: error: ! operator can only be used with bool types
338 | v := vid.views[i]
339 | mut name := v.short_path
340 | if v.changed && !v.path.ends_with('/out') {
| ^
341 | name = '$name [+]'
342 | }
vid.v:341:10: error: cannot assign `string` to `name` of type `void`
339 | mut name := v.short_path
340 | if v.changed && !v.path.ends_with('/out') {
341 | name = '$name [+]'
| ~~
342 | }
343 | vid.vg.draw_text(vid.split_x(i - from) + v.padding_left + 10, 1, name, vid.cfg.file_name_cfg)
vid.v:343:10: error: unknown method: `gg.Context.draw_text`
341 | name = '$name [+]'
342 | }
343 | vid.vg.draw_text(vid.split_x(i - from) + v.padding_left + 10, 1, name, vid.cfg.file_name_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
344 | }
345 | // Git diff stats
vid.v:347:10: error: unknown method: `gg.Context.draw_text`
345 | // Git diff stats
346 | if vid.git_diff_plus != '+' {
347 | vid.vg.draw_text(vid.win_width - 400, 1, vid.git_diff_plus, vid.cfg.plus_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
348 | }
349 | if vid.git_diff_minus != '-' {
vid.v:350:10: error: unknown method: `gg.Context.draw_text`
348 | }
349 | if vid.git_diff_minus != '-' {
350 | vid.vg.draw_text(vid.win_width - 350, 1, vid.git_diff_minus, vid.cfg.minus_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
351 | }
352 | // Workspaces
vid.v:356:9: error: unknown method: `gg.Context.draw_text`
354 | cur_space := vid.workspace_idx + 1
355 | space_name := short_space(vid.workspace)
356 | vid.vg.draw_text(vid.win_width - 220, 1, '[$space_name]', vid.cfg.file_name_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
357 | vid.vg.draw_text(vid.win_width - 150, 1, '$cur_space/$nr_spaces', vid.cfg.file_name_cfg)
358 | // Time
vid.v:357:9: error: unknown method: `gg.Context.draw_text`
355 | space_name := short_space(vid.workspace)
356 | vid.vg.draw_text(vid.win_width - 220, 1, '[$space_name]', vid.cfg.file_name_cfg)
357 | vid.vg.draw_text(vid.win_width - 150, 1, '$cur_space/$nr_spaces', vid.cfg.file_name_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
358 | // Time
359 | vid.vg.draw_text(vid.win_width - 50, 1, now.hhmm(), vid.cfg.file_name_cfg)
vid.v:359:9: error: unknown method: `gg.Context.draw_text`
357 | vid.vg.draw_text(vid.win_width - 150, 1, '$cur_space/$nr_spaces', vid.cfg.file_name_cfg)
358 | // Time
359 | vid.vg.draw_text(vid.win_width - 50, 1, now.hhmm(), vid.cfg.file_name_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
360 | // vid.vg.draw_text(vid.win_width - 550, 1, now.hhmmss(), file_name_cfg)
361 | // vim top right next to current time
vid.v:374:10: error: unknown method: `gg.Context.draw_text`
372 | task_x := vid.win_width - split_width - task_text_width - 10
373 | // vid.timer.vg.draw_text(task_x, 1, vid.timer.cur_task.to_upper(), file_name_cfg)
374 | vid.vg.draw_text(task_x, 1, vid.cur_task, vid.cfg.file_name_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
375 | // Draw current task time
376 | task_time_x := (vid.nr_splits - 1) * split_width - 50
vid.v:377:10: error: unknown method: `gg.Context.draw_text`
375 | // Draw current task time
376 | task_time_x := (vid.nr_splits - 1) * split_width - 50
377 | vid.vg.draw_text(task_time_x, 1, '${vid.task_minutes()}m',
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
378 | vid.cfg.file_name_cfg)
379 | }
vid.v:392:35: error: mismatched types `void` and `void`
390 | }
391 | // Cursor
392 | cursor_x := line_x + (vid.view.x + cursor_tab_off * vid.cfg.tab_size) * vid.char_width
| ^
393 | vid.vg.draw_empty_rect(cursor_x, y - 1, vid.char_width, vid.line_height, vid.cfg.cursor_color)
394 | // query window
vid.v:393:37: error: mismatched types `void` and `any_int`
391 | // Cursor
392 | cursor_x := line_x + (vid.view.x + cursor_tab_off * vid.cfg.tab_size) * vid.char_width
393 | vid.vg.draw_empty_rect(cursor_x, y - 1, vid.char_width, vid.line_height, vid.cfg.cursor_color)
| ^
394 | // query window
395 | if vid.mode == .query {
vid.v:396:7: error: unknown method: `Vid.draw_query`
394 | // query window
395 | if vid.mode == .query {
396 | vid.draw_query()
| ~~~~~~~~~~~~
397 | }
398 | }
vid.v:413:36: error: mismatched types `void` and `int`
411 | // Lines
412 | mut line_nr := 1// relative y
413 | for j := view.from; j < view.from + vid.page_height && j < view.lines.len; j++ {
| ^
414 | line := view.lines[j]
415 | if line.len > 5000 {
vid.v:415:3: error: type `void` does not support indexing
413 | for j := view.from; j < view.from + vid.page_height && j < view.lines.len; j++ {
414 | line := view.lines[j]
415 | if line.len > 5000 {
| ~~
416 | panic('line len too big! views[$i].lines[$j] ($line.len) path=$vid.view.path')
417 | }
vid.v:416:56: error: unknown selector expression
414 | line := view.lines[j]
415 | if line.len > 5000 {
416 | panic('line len too big! views[$i].lines[$j] ($line.len) path=$vid.view.path')
| ~~~
417 | }
418 | x := split_x + view.padding_left
vid.v:422:23: error: mismatched types `void` and `any_int`
420 | // Error bg
421 | if view.error_y == j {
422 | vid.vg.draw_rect(x + 10, y - 1, split_width - view.padding_left - 10, vid.line_height, vid.cfg.errorbgcolor)
| ^
423 | }
424 | // Line number
vid.v:425:20: error: mismatched types `void` and `any_int`
423 | }
424 | // Line number
425 | line_number := j + 1
| ^
426 | vid.vg.draw_text(x+3, y, '$line_number', vid.cfg.line_nr_cfg)
427 | // Tab offset
vid.v:426:10: error: unknown method: `gg.Context.draw_text`
424 | // Line number
425 | line_number := j + 1
426 | vid.vg.draw_text(x+3, y, '$line_number', vid.cfg.line_nr_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
427 | // Tab offset
428 | mut line_x := x + 10
vid.v:428:19: error: mismatched types `void` and `any_int`
426 | vid.vg.draw_text(x+3, y, '$line_number', vid.cfg.line_nr_cfg)
427 | // Tab offset
428 | mut line_x := x + 10
| ^
429 | mut nr_tabs := 0
430 | // for k := 0; k < line.len; k++ {
vid.v:437:4: error: operator += not defined on left operand type `void`
435 | }
436 | nr_tabs++
437 | line_x += vid.char_width * vid.cfg.tab_size
| ~~~~~~
438 | }
439 | // Number of chars to display in this view
vid.v:440:11: error: unknown selector expression
438 | }
439 | // Number of chars to display in this view
440 | if line.len > 0 {
| ~~~
441 | // mut max := (split_width - view.padding_left - vid.char_width * TAB_SIZE *
442 | // nr_tabs) / vid.char_width - 1
vid.v:451:6: error: assignment mismatch: 1 variable(s) but `limit()` returns 0 value(s)
449 | // max = line.len
450 | }
451 | s := line.limit(max)
| ~~
452 | if view.hl_on {
453 | vid.draw_line(line_x, y, s)// SYNTAX HL
vid.v:456:12: error: unknown method: `gg.Context.draw_text`
454 | }
455 | else {
456 | vid.vg.draw_text(line_x, y, line, vid.cfg.txt_cfg)// NO SYNTAX
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
457 | }
458 | }
vid.v:464:88: error: mismatched types `void` and `int`
462 |
463 | fn (vid &Vid) max_chars(nr_tabs int) int {
464 | width := vid.split_width() -vid.view.padding_left - vid.char_width * vid.cfg.tab_size * nr_tabs
| ^
465 | return width / vid.char_width - 1
466 | }
vid.v:465:15: error: mismatched types `void` and `int`
463 | fn (vid &Vid) max_chars(nr_tabs int) int {
464 | width := vid.split_width() -vid.view.padding_left - vid.char_width * vid.cfg.tab_size * nr_tabs
465 | return width / vid.char_width - 1
| ^
466 | }
467 |
vid.v:481:10: error: unknown method: `gg.Context.draw_text`
479 | if line.contains('[32m') &&
480 | line.contains('PASS') {
481 | vid.vg.draw_text(x, y, line[5..], vid.cfg.green_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
482 | return
483 | }
vid.v:486:10: error: unknown method: `gg.Context.draw_text`
484 | else if line.contains('[31m') &&
485 | line.contains('FAIL') {
486 | vid.vg.draw_text(x, y, line[5..], vid.cfg.red_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
487 | return
488 | //} else if line[0] == `-` {
vid.v:539:23: error: unknown function: is_alpha_underscore
537 | }
538 | // Key
539 | for i < line.len && is_alpha_underscore(int(line[i])) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
540 | i++
541 | }
vid.v:551:10: error: unknown method: `gg.Context.draw_text`
549 | }
550 | if vid.is_ml_comment {
551 | vid.vg.draw_text(x, y, line, vid.cfg.comment_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
552 | return
553 | }
vid.v:556:10: error: unknown method: `gg.Context.draw_text`
554 | if vid.chunks.len == 0 {
555 | // println('no chunks')
556 | vid.vg.draw_text(x, y, line, vid.cfg.txt_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
557 | return
558 | }
vid.v:570:11: error: unknown method: `gg.Context.draw_text`
568 | if chunk.start > pos + 1 {
569 | s := line[pos..chunk.start]
570 | vid.vg.draw_text(x + pos * vid.char_width, y, s, vid.cfg.txt_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
571 | }
572 | // Keyword string etc
vid.v:574:7: error: assignment mismatch: 1 variable(s) 0 value(s)
572 | // Keyword string etc
573 | typ := chunk.typ
574 | cfg := match typ {
| ~~
575 | .a_key { vid.cfg.key_cfg }
576 | .a_string { vid.cfg.string_cfg }
vid.v:580:10: error: unknown method: `gg.Context.draw_text`
578 | }
579 | s := line[chunk.start..chunk.end]
580 | vid.vg.draw_text(x + chunk.start * vid.char_width, y, s, cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
581 | pos = chunk.end
582 | // Final text chunk
vid.v:585:11: error: unknown method: `gg.Context.draw_text`
583 | if i == vid.chunks.len - 1 && chunk.end < line.len {
584 | final := line[chunk.end..line.len]
585 | vid.vg.draw_text(x + pos * vid.char_width, y, final, vid.cfg.txt_cfg)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
586 | }
587 | }
vid.v:617:11: error: unexpected symbol `placeholder`
615 | }
616 | // Reset error line
617 | vid.view.error_y = -1
| ~~~~~~~
618 | match vid.mode {
619 | .normal { vid.key_normal(key, mod) }
vid.v:623:24: error: unknown method: `Timer.key_down`
621 | .insert { vid.key_insert(key, mod) }
622 | .query { vid.key_query(key, super) }
623 | .timer { vid.timer.key_down(key, super) }
| ~~~~~~~~~~~~~~~~~~~~~
624 | }
625 | }
vid.v:646:14: error: unknown method: `View.r`
644 | if !vid.just_switched && vid.prev_key == .r {
645 | if s != 'r' {
646 | vid.view.r(s)
| ~~~~
647 | vid.prev_key = 0
648 | vid.prev_cmd = 'r'
vid.v:678:8: error: unknown method: `Vid.ctrlp_open`
676 | .enter {
677 | if vid.query_type == .ctrlp {
678 | vid.ctrlp_open()
| ~~~~~~~~~~~~
679 | }
680 | else if vid.query_type == .cam {
vid.v:684:13: error: unknown method: `View.open_file`
682 | }
683 | else if vid.query_type == .open {
684 | vid.view.open_file(vid.query)
| ~~~~~~~~~~~~~~~~~~~~
685 | }
686 | else if vid.query_type == .task {
vid.v:698:14: error: unknown method: `View.open_file`
696 | path := line.all_before(':')
697 | line_nr := line[path.len+1..].int() -1
698 | vid.view.open_file(vid.workspace + '/' + path)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
699 | vid.view.move_to_line(line_nr)
700 | vid.view.zz()
vid.v:699:14: error: unknown method: `View.move_to_line`
697 | line_nr := line[path.len+1..].int() -1
698 | vid.view.open_file(vid.workspace + '/' + path)
699 | vid.view.move_to_line(line_nr)
| ~~~~~~~~~~~~~~~~~~~~~
700 | vid.view.zz()
701 | vid.mode = .normal
vid.v:700:14: error: unknown method: `View.zz`
698 | vid.view.open_file(vid.workspace + '/' + path)
699 | vid.view.move_to_line(line_nr)
700 | vid.view.zz()
| ~~~~
701 | vid.mode = .normal
702 | }
vid.v:705:9: error: unknown method: `Vid.git_grep`
703 | else {
704 | // Otherwise just do a git grep on a submitted query
705 | vid.git_grep()
| ~~~~~~~~~~
706 | }
707 | return
vid.v:710:8: error: unknown method: `Vid.search`
708 | }
709 | else {
710 | vid.search(false)
| ~~~~~~~~~~~~~
711 | }
712 | vid.mode = .normal
vid.v:751:23: error: cannot use `void` as type `bool` in return argument
749 |
750 | fn (vid &Vid) is_in_blog() bool {
751 | return vid.view.path.contains('/blog/') && vid.view.path.contains('2020')
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
752 | }
753 |
vid.v:766:12: error: unknown method: `View.backspace`
764 | match key {
765 | .backspace {
766 | vid.view.backspace(vid.cfg.backspace_go_up)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
767 | }
768 | .enter {
vid.v:769:12: error: unknown method: `View.enter`
767 | }
768 | .enter {
769 | vid.view.enter()
| ~~~~~~~
770 | }
771 | .escape {
vid.v:775:12: error: unknown method: `View.insert_text`
773 | }
774 | .tab {
775 | vid.view.insert_text('\t')
| ~~~~~~~~~~~~~~~~~
776 | }
777 | .left {
vid.v:779:14: error: invalid operation: -- (non-numeric type `void`)
777 | .left {
778 | if vid.view.x > 0 {
779 | vid.view.x--
| ~~
780 | }
781 | }
vid.v:783:12: error: unknown method: `View.l`
781 | }
782 | .right {
783 | vid.view.l()
| ~~~
784 | }
785 | .up {
vid.v:786:12: error: unknown method: `View.k`
784 | }
785 | .up {
786 | vid.view.k()
| ~~~
787 | //vid.refresh = false
788 | }
vid.v:790:12: error: unknown method: `View.j`
788 | }
789 | .down {
790 | vid.view.j()
| ~~~
791 | //vid.refresh = false
792 | }
vid.v:796:12: error: unknown method: `View.save_file`
794 | }
795 | if (key == .k || key == .s) && super {
796 | vid.view.save_file()
| ~~~~~~~~~~~
797 | vid.mode = .normal
798 | return
vid.v:807:12: error: unknown method: `View.insert_text`
805 | // Insert macro TODO customize
806 | if super && key == .g {
807 | vid.view.insert_text('<code></code>')
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
808 | vid.view.x -= 7
809 | }
vid.v:808:12: error: unexpected symbol `placeholder`
806 | if super && key == .g {
807 | vid.view.insert_text('<code></code>')
808 | vid.view.x -= 7
| ^
809 | }
810 | // Autocomplete
vid.v:826:19: error: unknown method: `View.line`
824 |
825 | fn (mut vid Vid) ctrl_n() {
826 | line := vid.view.line()
| ~~~~~~
827 | mut i := vid.view.x - 1
828 | end := i
vid.v:827:22: error: mismatched types `void` and `any_int`
825 | fn (mut vid Vid) ctrl_n() {
826 | line := vid.view.line()
827 | mut i := vid.view.x - 1
| ^
828 | end := i
829 | for i > 0 && is_alpha_underscore(int(line[i])) {
vid.v:829:15: error: unknown function: is_alpha_underscore
827 | mut i := vid.view.x - 1
828 | end := i
829 | for i > 0 && is_alpha_underscore(int(line[i])) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
830 | i--
831 | }
vid.v:830:4: error: invalid operation: -- (non-numeric type `void`)
828 | end := i
829 | for i > 0 && is_alpha_underscore(int(line[i])) {
830 | i--
| ~~
831 | }
832 | if !is_alpha_underscore(int(line[i])) {
vid.v:832:6: error: unknown function: is_alpha_underscore
830 | i--
831 | }
832 | if !is_alpha_underscore(int(line[i])) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
833 | i++
834 | }
vid.v:833:4: error: invalid operation: ++ (non-numeric type `void`)
831 | }
832 | if !is_alpha_underscore(int(line[i])) {
833 | i++
| ~~
834 | }
835 | mut word := line[i..end + 1]
vid.v:835:26: error: mismatched types `void` and `any_int`
833 | i++
834 | }
835 | mut word := line[i..end + 1]
| ^
836 | word = word.trim_space()
837 | // Dont autocomplete if fewer than 3 chars
vid.v:836:2: error: type `void` does not support indexing
834 | }
835 | mut word := line[i..end + 1]
836 | word = word.trim_space()
| ~~~~
837 | // Dont autocomplete if fewer than 3 chars
838 | if word.len < 3 {
vid.v:838:10: error: unknown selector expression
836 | word = word.trim_space()
837 | // Dont autocomplete if fewer than 3 chars
838 | if word.len < 3 {
| ~~~
839 | return
840 | }
vid.v:844:13: error: unknown method: `View.insert_text`
842 | // If any word starts with our subword, add the rest
843 | if map_word.starts_with(word) {
844 | vid.view.insert_text(map_word[word.len..])
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
845 | return
846 | }
vid.v:871:13: error: unknown method: `View.shift_right`
869 | if shift {
870 | // >
871 | vid.view.shift_right()
| ~~~~~~~~~~~~~
872 | }
873 | else {
vid.v:880:13: error: unknown method: `View.shift_left`
878 | if shift {
879 | // <
880 | vid.view.shift_left()
| ~~~~~~~~~~~~
881 | }
882 | }
vid.v:927:13: error: unknown method: `View.shift_a`
925 | .a {
926 | if shift {
927 | vid.view.shift_a()
| ~~~~~~~~~
928 | vid.prev_cmd = 'A'
929 | vid.set_insert()
vid.v:940:31: error: unknown method: `View.shift_c`
938 | }
939 | if shift {
940 | vid.prev_insert = vid.view.shift_c()
| ~~~~~~~~~
941 | vid.set_insert()
942 | }
vid.v:950:13: error: unknown method: `View.dd`
948 | }
949 | if vid.prev_key == .d {
950 | vid.view.dd()
| ~~~~
951 | return
952 | }
vid.v:963:9: error: unknown method: `View.ce`
961 | }
962 | if vid.prev_key == .c {
963 | view.ce()
| ~~~~
964 | }
965 | else if vid.prev_key == .d {
vid.v:966:9: error: unknown method: `View.de`
964 | }
965 | else if vid.prev_key == .d {
966 | view.de()
| ~~~~
967 | }
968 | }
vid.v:971:13: error: unknown method: `View.shift_i`
969 | .i {
970 | if shift {
971 | vid.view.shift_i()
| ~~~~~~~~~
972 | vid.set_insert()
973 | vid.prev_cmd = 'I'
vid.v:981:13: error: unknown method: `View.join`
979 | .j {
980 | if shift {
981 | vid.view.join()
| ~~~~~~
982 | }
983 | else if super {
vid.v:989:13: error: unknown method: `View.j`
987 | else {
988 | // println('J isb=$vid.is_building')
989 | vid.view.j()
| ~~~
990 | // if !vid.is_building {
991 | //vid.refresh = false
vid.v:996:12: error: unknown method: `View.k`
994 | }
995 | .k {
996 | vid.view.k()
| ~~~
997 | // if !vid.is_building {
998 | //vid.refresh = false
vid.v:1004:8: error: unknown method: `Vid.search`
1002 | if shift {
1003 | // backwards search
1004 | vid.search(true)
| ~~~~~~~~~~~~
1005 | }
1006 | else {
vid.v:1007:8: error: unknown method: `Vid.search`
1005 | }
1006 | else {
1007 | vid.search(false)
| ~~~~~~~~~~~~~
1008 | }
1009 | }
vid.v:1023:13: error: unknown method: `View.shift_o`
1021 | }
1022 | else if shift {
1023 | vid.view.shift_o()
| ~~~~~~~~~
1024 | vid.set_insert()
1025 | }
vid.v:1027:13: error: unknown method: `View.o`
1025 | }
1026 | else {
1027 | vid.view.o()
| ~~~
1028 | vid.set_insert()
1029 | }
vid.v:1035:8: error: unknown method: `Vid.load_git_tree`
1033 | vid.mode = .query
1034 | vid.query_type = .ctrlp
1035 | vid.load_git_tree()
| ~~~~~~~~~~~~~~~
1036 | vid.query = ''
1037 | vid.just_switched = true
V panic: array.get: index out of range (i == 0, a.len == 0)
print_backtrace_skipping_top_frames is not implemented
While editing your website, I noticed that many lines have extra space at the end. Many editors will auto-trim those off, causing much git-diff noise. It would help for vid to audo-trimp EOL whitespace.
Or better, support EditorConfig.
I tried to build vid and the error showed up as follows:
$ v .
get_type() bad type
ft &freetype.FreeType
^
/(...)/vid/timer.v:25:22: unknown type `freetype.FreeType`
I use Manjaro Linux and have extra/freetype2
installed.
Encountered the following issue when building and filing as advised:
Feel free to rename the issue name.
warning: use "_linux.v" file name instead of "/home/username/sandbox/v_stuff/v/vlib/ui/ui_lin.v"
warning: ./vid.v:5:6: the following imports were never used:
v -version
V 0.1.24 0d93eeb
v .
./timer.v:155:61: wrong number of arguments in call to `gg.GG*.draw_line(f32, f32, f32, f32)`
153| '${hour:02d}', time_cfg)
154| }
155| t.gg.draw_line(hour_x, hour_y, hour_x + hour_width, hour_y, gx.gray)
^
156| }
157| // Large left vertical line
OS version: Linux, elementary OS Hera, x64
Hi.
I plan to do a PoC of creating a linux kernel driver using V. Could you please save me some time with suggestions about what ti start with? I think it should use a different library that doesn't use system calls, but tue kernel API, right? (Eg kmalloc)
Can't go further than one character behind, thus can't add to the end of a line.
I saw the comment on https://github.com/vlang/vid/blob/80532b878123176d5380ecc0ed77e07716e8043d/view.v#L507 and would suggest reusing/mimicking the curated clipboard support as matured over the years in Neovim:
https://github.com/neovim/neovim/blob/master/runtime/autoload/provider/clipboard.vim
(that is the most advanced, seamless, and most multiplatform clipboard solution I've ever heard of)
I'm not sure what's causing it, but lack of memory is surely not a problem. I'm on a Pi Zero W, running Arch Linux ARM with 512MB of memory (64MB for GPU), 1.000GHz cpu.
Vid takes about 10 seconds to show up, and takes almost 7 seconds for any action to take place.
Let me know if more information is needed.
$ ./vid -window
...
...
...
file "-window" does not exist
Like vimtutor, but better.
I got following error, when I type a key or two.
V panic: array index out of range: 0 / 0
Please let me know if you need how to get detail of this error.
It seems to only support GUI.
but it is difficult to run GUI in some cases
Hello,
It's a funny project? You need to fix the problems.
Anyway, i find a bug and problem in this, so while are you trying to enter some keys. it will crash.
['./vid', 'config.v']
PATH="config.v" cur_dir="/home/max/v/examples/vid"
add_workspace(".")
open file "config.v"
getting words
saving session...
load session "/home/max/.vid/session"
['config.v', '']
open file "config.v"
getting words
saving session...
V panic: substr(1, 0) out of bounds (len=21)
| 0x5629655041c2 | ./vid(+0x161c2)
| 0x56296551b4ea | ./vid(+0x2d4ea)
| 0x56296551de74 | ./vid(+0x2fe74)
| 0x56296551ad54 | ./vid(+0x2cd54)
| 0x562965519dfa | ./vid(+0x2bdfa)
| 0x7f4761f4e0b6 | /usr/lib/libglfw.so.3(+0x170b6)
| 0x562965511e28 | ./vid(+0x23e28)
| 0x56296552bd65 | ./vid(+0x3dd65)
| 0x7f4761c2b023 | /usr/lib/libc.so.6(__libc_start_main+0xf3)
| 0x5629654f19de | ./vid(+0x39de)
Regards,
Max Base
No ui module is available for linux (and window).
$ v .
V panic: cannot import module ui (no .v files in "/home/Henrixounez/code/v/vlib/ui").
Mouse support, etc.
Right now you have to know Vim to use Vid.
.\vid.v:487:17: error: undefined: glfw.KEY_ESCAPE
485| break
486| }
487| // String
488| if line[i] == \'
{
489| i++
// in the vid directory
v .
warning: use "_windows.v" file name instead of "D:\software\vlang\repo\v\vlib\ui\ui_win.v"
D:\software\vlang\repo\v\thirdparty\glad\glad.o not found
There are glad.c and glad.h in the thirdparty\glad directory,but not glad.o
Is vid supported in windows?
As I was checking out this editor I noticed what appears to be a slow memory leak. I am on windows 10 fresh install fully updated. It took about 30 minutes or so of just leaving vid up in the background to get to about 500MB. All I did was open up a file, execute a few commands, and let it run in the background while I was working on something else. Here are the screenshots
error adding symbols: File in wrong format
collect2.exe: error: ld returned 1 exit status
V error: C error. This should never happen.
On Ubuntu 18.04 (mentioned dependencies installed)
v version
: V 0.1.22 be4eaa6
Output of v .
:
warning: use "_linux.v" file name instead of "/home/pp/git/v/vlib/ui/ui_lin.v"
./vid.v:1152:34: `vid` is declared as mutable, but it was never changed
1150|
1151| // Find current word under cursor
1152| fn (vid mut Vid) word_under_cursor() string {
^
1153| line := vid.view.line()
1154| // First go left
I tried to open vid's README.md in vid, and got this:
$ vid ./vid
create window wnd=0x7fba70d12ea0 ptr==0x7fba70d12990
Trying to load font from RobotoMono-Regular.ttf
new gg text context vao=3
<some cyrillic>
load session "/Users/foo//.vppsession"
[]
open file "README.md"
getting words
saving session...
V panic: substr(131, 73) out of bounds (len=170)
.\vid.v:480:17: error: undefined: glfw.KEY_LEFT_SUPER
478| break
479| }
480| // End of /**/
481| if i > 0 && line[i - 1] == *
&& line[i] == /
{
482| // All before */ is still a comment
V 0.1.29 c01fd4a
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Expected v to cross compile
Got:
v -os windows nbody.v
/home/ghs/v/thirdparty/tcc/lib/openlibm.o not found, building it...
exec failed for thirdparty object build cmd:
x86_64-w64-mingw32-gcc -fPIC -c -o "/home/ghs/v/thirdparty/tcc/lib/openlibm.o" "/home/ghs/v/thirdparty/tcc/lib/openlibm.c"
builder error: sh: 1: x86_64-w64-mingw32-gcc: not found
When will the code be released?
cant wait to try it out.
Right now everything is hardcoded.
As title above.
freetype2 and glfw-x11 is installed (couldn't find freetype6 and 'normal' glfw)
$ git clone https://github.com/vlang/vid
$ cd vid
$ v .
$ ./vid
A fullscreen app opens and closes immediately leaving behind this log:
create window wnd=0x556517844fc0 ptr==0x556517843f10
Trying to load font from RobotoMono-Regular.ttf
Parçalama arızası (çekirdek döküldü) // this says segmentation fault (core halted?)
RobotoMono-Regular.ttf does exists in vid folder. This problem is probably caused from freetype or glfw but not entirely sure.
v .
.vid.c:118:10: fatal error: 'ft2build.h' file not found
#include "ft2build.h"
^~~~~~~~~~~~
1 error generated.V panic: C error. This should never happen. Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
brew install freetype is done how do I pass header locations to v during compilation.
v version
V 0.1.17
osx version
10.14.6
OS
Windows Subsystem for Linux (Ubuntu)
$ ./vid vid.v
vid: /build/glfw3-KYdbSD/glfw3-3.2.1/src/monitor.c:394: glfwGetVideoMode: Assertion `monitor != NULL' failed.
Aborted (core dumped)
./timer.v:155:61: wrong number of arguments in call to `gg.GG*.draw_line(f32, f32, f32, f32)`
153| '${hour:02d}', time_cfg)
154| }
155| t.gg.draw_line(hour_x, hour_y, hour_x + hour_width, hour_y, gx.gray)
^
156| }
157| // Large left vertical line
Can you publish binary files for Windows/Linux/macOS ?I just want to try .
OS
System Version: macOS 10.15.1 (19B88)
Kernel Version: Darwin 19.0.0
V
$ v --version
V 0.1.24 25e7cee
vid
$ git rev-parse --verify HEAD
f8cb1f3715cf96c0eca834b6273baf26d2a07468
Build
$ v .
/private/var/folders/q3/bf76j42160j2nt4s2tz1_fd40000gn/T/v/vid.tmp.c:4216:7: warning: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversio...
(Use `v -g` to print the entire error message)
V error: C error. This should never happen.
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
C compiler=cc
/Users/x/git/v/vlib/gl/gl.v:15:7: warning: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion]
void* ok= gladLoadGL ( ) ;
^ ~~~~~~~~~~~~~~
/Users/x/git/v/vlib/gl/gl.v:43:34: warning: incompatible pointer types passing 'byte **' (aka 'unsigned char **') to parameter of type 'const GLchar *const *' (aka 'const char *const *') [-Wincompatible-pointer-types]
glShaderSource ( shader , a , & source .str , b ) ;
^~~~~~~~~~~~~
/Users/x/git/v/vlib/gl/gl.v:43:51: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const GLint *' (aka 'const int *'); take the address with & [-Wint-conversion]
glShaderSource ( shader , a , & source .str , b ) ;
^
&
/Users/x/git/v/vlib/gl/gl.v:77:45: warning: passing 'byte [512]' to parameter of type 'GLchar *' (aka 'char *') converts between pointers to integer types with different sign [-Wpointer-sign]
glGetShaderInfoLog ( shader , 512 , 0 , info_log ) ;
^~~~~~~~
/Users/x/git/v/vlib/gl/gl.v:83:48: warning: passing 'byte [1024]' to parameter of type 'GLchar *' (aka 'char *') converts between pointers to integer types with different sign [-Wpointer-sign]
glGetProgramInfoLog ( program , 1024 , 0 , info_log ) ;
^~~~~~~~
/Users/x/git/v/vlib/gl/gl.v:147:43: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
glDrawElements ( mode , count , typ , indices ) ;
^~~~~~~
/Users/x/git/v/vlib/gl/gl.v:177:74: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
glVertexAttribPointer ( index , size , typ , normalized , stride , ptr ) ;
^~~
/Users/x/git/v/vlib/stbi/stbi.v:52:39: warning: passing 'char *' to parameter of type 'const stbi_uc *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
res .data = stbi_load_from_memory ((char*) buf , 3812 , & res .width , & res .height , & res .nr_channels , flag ) ;
^~~~~~~~~~~
/Users/x/git/v/thirdparty/stb_image/stb_image.h:1287:55: note: passing argument to parameter 'buffer' here
STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
^
/Users/x/git/v/vlib/uiold/ui_darwin.v:28:2: warning: incompatible function pointer types passing 'void (*)(void *, void *, void *)' to parameter of type 'EventHandlerUPP' (aka 'int (*)(struct OpaqueEventHandlerCallRef *, struct OpaqueEventRef *, void *)') [-Wincompatible-function-pointer-types]
InstallApplicationEventHandler(&uiold__focus_app, 1, &eventType, NULL, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/CarbonEvents.h:15098:57: note: expanded from macro 'InstallApplicationEventHandler'
InstallEventHandler( GetApplicationEventTarget(), (handler), (numTypes), (list), (userData), (outHandlerRef) )
^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/CarbonEventsCore.h:2594:26: note: passing argument to parameter 'inHandler' here
EventHandlerUPP inHandler,
^
/Users/x/git/v/vlib/glfw/glfw.v:247:23: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'GLFWcursor *' (aka 'struct GLFWcursor *') [-Wint-conversion]
glfwSetCursor ( 0 , GLFW_IBEAM_CURSOR ) ;
^~~~~~~~~~~~~~~~~
/Users/x/git/v/thirdparty/glfw/GLFW/glfw3.h:1051:37: note: expanded from macro 'GLFW_IBEAM_CURSOR'
#define GLFW_IBEAM_CURSOR 0x00036002
^~~~~~~~~~
/Users/x/git/v/thirdparty/glfw/GLFW/glfw3.h:4329:60: note: passing argument to parameter 'cursor' here
GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
^
/Users/x/git/v/vlib/glfw/glfw.v:252:30: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'GLFWcursor *' (aka 'struct GLFWcursor *') [-Wint-conversion]
glfwSetCursor ( w ->data , GLFW_IBEAM_CURSOR ) ;
^~~~~~~~~~~~~~~~~
/Users/x/git/v/thirdparty/glfw/GLFW/glfw3.h:1051:37: note: expanded from macro 'GLFW_IBEAM_CURSOR'
#define GLFW_IBEAM_CURSOR 0x00036002
^~~~~~~~~~
/Users/x/git/v/thirdparty/glfw/GLFW/glfw3.h:4329:60: note: passing argument to parameter 'cursor' here
GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
^
/Users/x/git/v/vlib/glfw/glfw.v:272:14: warning: initializing 'GLFWvidmode *' (aka 'struct GLFWvidmode *') with an expression of type 'const GLFWvidmode *' (aka 'const struct GLFWvidmode *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
GLFWvidmode* mode= glfwGetVideoMode ( glfwGetPrimaryMonitor ( ) ) ;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/x/git/v/vlib/glm/glm.v:254:31: warning: incompatible integer to pointer conversion assigning to 'f32 *' (aka 'float *') from 'int' [-Wint-conversion]
res [/*ptr!*/ 0 ]/*rf32 1*/ = 1 ;
^ ~
/Users/x/git/v/vlib/glm/glm.v:255:31: warning: incompatible integer to pointer conversion assigning to 'f32 *' (aka 'float *') from 'int' [-Wint-conversion]
res [/*ptr!*/ 5 ]/*rf32 1*/ = 1 ;
^ ~
/Users/x/git/v/vlib/glm/glm.v:256:32: warning: incompatible integer to pointer conversion assigning to 'f32 *' (aka 'float *') from 'int' [-Wint-conversion]
res [/*ptr!*/ 10 ]/*rf32 1*/ = 1 ;
^ ~
/Users/x/git/v/vlib/glm/glm.v:261:32: warning: incompatible integer to pointer conversion assigning to 'f32 *' (aka 'float *') from 'int' [-Wint-conversion]
res [/*ptr!*/ 15 ]/*rf32 1*/ = 1 ;
^ ~
/Users/x/git/v/vlib/freetype/freetype.v:116:23: warning: passing 'int *' to parameter of type 'GLuint *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
glGenTextures ( 1 , & texture ) ;
^~~~~~~~~
/Users/x/git/v/vlib/freetype/freetype.v:168:7: warning: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'FT_Error' (aka 'int') [-Wint-conversion]
void* ret= FT_Init_FreeType ( & ft ) ;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/x/git/v/vlib/freetype/freetype.v:188:7: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
ret = ((int)( FT_New_Face ( ft , (char*) font_path .str , 0 , & face ) ) ) ;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 warnings generated.
ld: warning: directory not found for option '-L/opt/local/lib'
ld: library not found for -lglfw
clang: error: linker command failed with exit code 1 (use -v to see invocation)
V error: C error. This should never happen.
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
The program crashes in the following cases (may be more, I'm still trying it, I'm trying to familiarize myself with the project):
When on edit mode:
when you press w on the end of line
when you press l (L) on an empty buffer (haven't loaded any file)
when you press dd on an empty buffer it deletes a line which is supposed to not exist and if
you press it again then it crashes
I've fixed these cases and I'm doing a PR with those fixes.
Don't know what are the goals of vid, but when I saw that vid wants to have some configuration (colors, ...), needs undo, wants non-vim controls, then I asked myself why not to save some work and use nvim as backend (as e.g. https://github.com/equalsraf/neovim-qt/ does)?
The performance shall be also very good, there are mature Emacs (or other controls "styles") plugins, etc.
Or vice versa - make vid stay a backend and just implement Language Server Protocol and use any frontend (graphical or console or whatever) you like.
^Just thoughts...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.